async create(request) {
    const id = request.getId({ ifMissing: "ignore" });
    const userId = request.getKuid();
    const refresh = request.getRefresh();
    const silent = request.getBoolean("silent");
    const { index, collection } = request.getIndexAndCollection();

    const validated = await global.kuzzle.validation.validate(request, false);

    // Add metadata
    const pipeMetadataResult = await this.pipe(
      "generic:document:injectMetadata",
      {
        metadata: {
          author: userId,
          createdAt: Date.now(),
          updatedAt: null,
          updater: null,
        },
        request,
      },
    );

    const created = await this.ask(
      "core:storage:public:document:create",
      index,
      collection,
      {
        ...validated.getBody(),
        _kuzzle_info: pipeMetadataResult.metadata,
      },
      {
        id,
        injectKuzzleMeta: false,
        refresh,
        userId,
      },
    );

    if (!silent) {
      await this.ask(
        "core:realtime:document:notify",
        validated,
        actionEnum.CREATE,
        created,
      );
    }

    return created;
  }
Create a new document

@param {KuzzleRequest} request
@returns {Promise<Object>}