async performDocumentAlias(request, prefix) {
    const { controller, action } = request.input;
    const mustTrigger =
      controller === "document" &&
      this.documentEventAliases.mirrorList[action] &&
      (prefix !== "before" ||
        !this.documentEventAliases.notBefore.includes(action));

    if (!mustTrigger) {
      return request;
    }

    const alias = this.documentEventAliases.mirrorList[action];
    const event = `${this.documentEventAliases.namespace}:${prefix}${capitalize(
      alias,
    )}`;
    const extractor = new DocumentExtractor(request);

    const documents = await global.kuzzle.pipe(
      event,
      extractor.extract(),
      request,
    );

    return extractor.insert(documents);
  }
Triggers generic:document:* events

@warning Critical code section

@param {KuzzleRequest} request
@param {String} prefix

@returns {Promise<KuzzleRequest>}