import { AxioDB } from "../../../Services/Indexation.operation"; import { FastifyRequest } from "fastify"; export default class CRUDController { private AxioDBInstance; constructor(AxioDBInstance: AxioDB); getAllDocuments(request: FastifyRequest): Promise; getDocumentsByQuery(request: FastifyRequest): Promise; getDocumentsById(request: FastifyRequest): Promise; createNewDocument(request: FastifyRequest): Promise; createManyNewDocument(request: FastifyRequest): Promise; updateDocumentById(request: FastifyRequest): Promise; updateDocumentByQuery(request: FastifyRequest): Promise; deleteDocumentById(request: FastifyRequest): Promise; deleteDocumentByQuery(request: FastifyRequest): Promise; /** * @example * { * dbName: "myDatabase", * collectionName: "users", * aggregation: [ * { $match: { age: { $gt: 21 } } }, * { $group: { _id: "$status", count: { $sum: 1 } } } * ] * } */ runAggregation(request: FastifyRequest): Promise; }