async delete(request) {
    const id = request.getId();
    const silent = request.getBoolean("silent");
    const refresh = request.getString("refresh", "false");
    const source = request.getBoolean("source");
    const { index, collection } = request.getIndexAndCollection();

    const document = await this.ask(
      "core:storage:public:document:get",
      index,
      collection,
      id,
    );

    await this.ask(
      "core:storage:public:document:delete",
      index,
      collection,
      id,
      {
        refresh,
      },
    );

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

    return source ? document : { _id: document._id };
  }
Delete a document through the persistent layer

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