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iB,GAAQ,sBAAsB,CAC/R,UAAW,GACX,OAAQ,EAAa,GACrB,cAAgC,MAAjB,EAAwB,EAAgB,CAAC,EACxD,UACC,OAEL,MACF,IAAK,SACH,EAAiB,GAAQ,CACvB,KAAM,CAAC,SAET,MACF,IAAK,UACH,EAAiB,GAAQ,CACvB,KAAM,CAAC,eAYb,EAAiB,GAAQ,CACvB,KAAM,EAGZ,CACA,MAAM,EAAY,IAAI,gBAAgB,OAAO,EAAkB,GAE/D,OADW,MAAX,GAA2B,EAAQ,SAAS,GAAW,EAAU,OAAO,KACjE,CACL,MAAO,EAAM,EAAW,GACxB,OAAQ,EACT,EAEC,mBAAqB","file":"/npm/expressbolt@1.0.23/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/expressbolt@1.0.23/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n  for (var prop in b || (b = {}))\n    if (__hasOwnProp.call(b, prop))\n      __defNormalProp(a, prop, b[prop]);\n  if (__getOwnPropSymbols)\n    for (var prop of __getOwnPropSymbols(b)) {\n      if (__propIsEnum.call(b, prop))\n        __defNormalProp(a, prop, b[prop]);\n    }\n  return a;\n};\nvar __export = (target, all) => {\n  for (var name in all)\n    __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n  if (from && typeof from === \"object\" || typeof from === \"function\") {\n    for (let key of __getOwnPropNames(from))\n      if (!__hasOwnProp.call(to, key) && key !== except)\n        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n  }\n  return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n  // If the importer is in node compatibility mode or this is not an ESM\n  // file that has been converted to a CommonJS file using a Babel-\n  // compatible transform (i.e. \"__esModule\" has not been set), then set\n  // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n  isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n  mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar __async = (__this, __arguments, generator) => {\n  return new Promise((resolve, reject) => {\n    var fulfilled = (value) => {\n      try {\n        step(generator.next(value));\n      } catch (e) {\n        reject(e);\n      }\n    };\n    var rejected = (value) => {\n      try {\n        step(generator.throw(value));\n      } catch (e) {\n        reject(e);\n      }\n    };\n    var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);\n    step((generator = generator.apply(__this, __arguments)).next());\n  });\n};\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n  CrudController: () => crud_controller_default,\n  CrudService: () => crud_service_default,\n  errorCenter: () => errorCenter,\n  generateDynamicSchema: () => crud_model_default\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/files/crud.controller.ts\nvar import_http_status2 = __toESM(require(\"http-status\"));\n\n// src/files/crud.service.ts\nvar import_http_status = __toESM(require(\"http-status\"));\n\n// src/files/responseMessage.ts\nfunction responseMessage(msg, config = \"production\") {\n  switch (msg.success) {\n    case true:\n      return {\n        message: msg.message,\n        data: msg.data,\n        success: msg.success,\n        doc_length: msg.doc_length\n      };\n    case false:\n      return {\n        message: msg.message,\n        error: msg.error,\n        success: msg.success,\n        stack: config === \"development\" ? msg.stack : {}\n      };\n  }\n}\nvar responseMessage_default = responseMessage;\n\n// src/files/error.handler.ts\nvar CustomError = class _CustomError extends Error {\n  constructor(status, message, isOperational = true) {\n    super(message);\n    this.status = status;\n    this.isOperational = isOperational;\n    Object.setPrototypeOf(this, _CustomError.prototype);\n  }\n};\nvar errorCenter = ({\n  error,\n  response,\n  env = \"development\"\n}) => {\n  var _a;\n  const error_status = (_a = error.statusCode) != null ? _a : 500;\n  let error_message = error.message;\n  if (error_message.includes(\"E11000\")) {\n    error_message = \"data already exist in the database\";\n  }\n  const error_info = error.information;\n  response.status(error_status).json(\n    responseMessage_default(\n      {\n        message: error_info,\n        success: false,\n        data: error_message,\n        stack: error.stack\n      },\n      env\n    )\n  );\n};\nvar error_handler_default = CustomError;\n\n// src/files/query.ts\nvar Queries = class {\n  /**\n   * The constructor function takes in a model and request_query as parameters and assigns them to the\n   * corresponding properties of the class.\n   * @param {any} model - The `model` parameter is used to pass in the model object. This object\n   * represents the data structure or schema of the entity that you are working with. It typically\n   * includes properties and methods that define how the data is stored, retrieved, and manipulated.\n   * @param {any} request_query - The `request_query` parameter is an object that contains the query\n   * parameters from an HTTP request. These query parameters are typically used to filter or sort data\n   * when querying a database or API.\n   */\n  constructor(model, request_query) {\n    this.model = model;\n    this.request_query = request_query;\n  }\n  /**\n   * The filter function removes excluded fields from the query object and converts it into a string\n   * that can be used to filter the model.\n   * @returns The filter() method is returning the updated instance of the object.\n   */\n  filter() {\n    const queryObj = __spreadValues({}, this.request_query);\n    const excludedFields = [\"page\", \"sort\", \"limit\", \"fields\"];\n    excludedFields.forEach((el) => delete queryObj[el]);\n    let queryStr = JSON.stringify(queryObj);\n    queryStr = queryStr.replace(/\\b(gte|gt|lte|lt)\\b/g, (match) => `$${match}`);\n    this.model = this.model.find(JSON.parse(queryStr));\n    return this;\n  }\n  /**\n   * The sort() function sorts the model based on the provided sort query parameter or defaults to\n   * sorting by the created_at field in descending order.\n   * @returns the updated object with the sorted model.\n   */\n  sort() {\n    if (this.request_query.sort) {\n      const sortBy = this.request_query.sort.split(\",\").join(\" \");\n      this.model = this.model.sort(sortBy);\n    } else {\n      this.model = this.model.sort(\"-createdAt\");\n    }\n    return this;\n  }\n  /**\n   * The `limitFields` function selects specific fields from a model based on the `fields` query\n   * parameter, or selects all fields except `__v` if no `fields` parameter is provided.\n   * @returns the updated object.\n   */\n  limitFields() {\n    if (this.request_query.fields) {\n      const fields = this.request_query.fields.split(\",\").join(\" \");\n      this.model = this.model.select(fields);\n    } else {\n      this.model = this.model.select(\"-__v\");\n    }\n    return this;\n  }\n  /**\n   * The `paginate` function is used to set the page and limit for pagination in a TypeScript\n   * application.\n   * @returns The paginate() function returns the modified object itself (this) after applying the skip\n   * and limit operations on the model.\n   */\n  paginate() {\n    const page = this.request_query.page * 1 || 1;\n    const limit = this.request_query.limit * 1 || 100;\n    const skip = (page - 1) * limit;\n    this.model = this.model.skip(skip).limit(limit);\n    return this;\n  }\n};\nvar query_default = Queries;\n\n// src/files/crud.service.ts\nvar CrudService = class _CrudService {\n  /**\n   * The `create` function creates a document in a MongoDB collection.\n   * It takes in a `CrudModelI` object, the data to be created, and a filter to check for existing documents.\n   * It returns a Promise that resolves to a response message containing the successfully created document.\n   *\n   * @param {Object} param - An object containing the `modelData`, `data`, and `check` properties.\n   * @param {CrudModelI<T>} param.modelData - A `CrudModelI` object representing the MongoDB collection.\n   * @param {T} param.data - The data to be created.\n   * @param {FilterQuery<T & Document>} param.check - A filter to check for existing documents.\n   * @returns {Promise<any>} A Promise that resolves to a response message containing the successfully created document.\n   */\n  static create(_0) {\n    return __async(this, arguments, function* ({\n      check,\n      modelData,\n      data\n    }) {\n      const find = Object.keys(check).length !== 0 ? yield modelData.Model.findOne(check) : null;\n      if (find) {\n        throw new error_handler_default(\n          import_http_status.default.BAD_REQUEST,\n          `the data for:  ${JSON.stringify(\n            Object.keys(check).join(\", \")\n          )} already exists in the database`\n        );\n      }\n      const create = new modelData.Model(data);\n      const created = yield create.save();\n      if (!created) {\n        throw new error_handler_default(\n          import_http_status.default.BAD_REQUEST,\n          `${modelData.Model.collection.collectionName} is not successfully created`\n        );\n      }\n      const dat = yield modelData.Model.findById(created._id).select(\n        modelData.select.join(\" \")\n      );\n      return responseMessage_default({\n        success: true,\n        data: dat,\n        message: \"Successfully created\"\n      });\n    });\n  }\n  /**\n   * The function `createMany` creates multiple documents in a MongoDB collection based on an array of data.\n   * It takes in a `CrudModelI` object, an array of data, and an array of filters to check for existing documents.\n   * It returns a Promise that resolves to a response message containing the successfully created documents.\n   *\n   * @param {Object} param - An object containing the `modelData`, `data`, and `check` properties.\n   * @param {CrudModelI<T>} param.modelData - A `CrudModelI` object representing the model to be created.\n   * @param {T[]} param.data - An array of data to be created.\n   * @param {FilterQuery<T & Document>[]} param.check - An array of filters to check for existing documents.\n   * @returns {Promise<any>} A Promise that resolves to a response message containing the successfully created documents.\n   */\n  static createMany(_0) {\n    return __async(this, arguments, function* ({\n      check,\n      data,\n      modelData\n    }) {\n      if (check) {\n        const checks = check.map((findr) => {\n          return Object.keys(findr).length !== 0 ? modelData.Model.findOne(findr) : null;\n        });\n        const finds = yield Promise.all(checks);\n        finds.forEach((find, index) => {\n          if (find) {\n            throw new error_handler_default(\n              import_http_status.default.BAD_REQUEST,\n              `the data ${JSON.stringify(\n                Object.keys(check[index]).join(\", \")\n              )} already exists in the database`\n            );\n          }\n        });\n      }\n      const created = yield modelData.Model.insertMany(data);\n      if (!created) {\n        throw new error_handler_default(\n          import_http_status.default.BAD_REQUEST,\n          `${modelData.Model.collection.collectionName} is not successfully created`\n        );\n      }\n      const selectedData = yield Promise.all(\n        created.map(\n          (item) => modelData.Model.findById(item._id).select(modelData.select.join(\" \"))\n        )\n      );\n      return responseMessage_default({\n        success: true,\n        data: selectedData,\n        message: \"Successfully created\"\n      });\n    });\n  }\n  /**\n   * The `update` static method is used to update a document in a database based on specified criteria.\n   *\n   * @param {Object} params - The `params` object contains the necessary parameters for the update operation.\n   * @param {CrudModelI<T>} params.modelData - The `modelData` parameter represents the model(s) to update.\n   * @param {UpdateQuery<T>} params.data - The `data` parameter represents the update data.\n   * @param {FilterQuery<T & Document>} params.filter - The `filter` parameter represents the criteria to\n   * identify the document(s) to update.\n   * @returns {Promise<any>} The method returns a promise that resolves to a response message containing the\n   * updated document and a success status.\n   */\n  static update(_0) {\n    return __async(this, arguments, function* ({\n      data,\n      filter,\n      modelData\n    }) {\n      const dataF = [];\n      const findAndUpdate = modelData.select.length > 0 ? yield modelData.Model.findOneAndUpdate(filter, data).select(\n        modelData.select.join(\" \")\n      ) : yield modelData.Model.findOneAndUpdate(filter, data);\n      if (!findAndUpdate) {\n        throw new error_handler_default(\n          import_http_status.default.BAD_REQUEST,\n          `{modelData.Model.collection.collectionName} not updated successfully`\n        );\n      } else {\n        dataF.push(findAndUpdate);\n      }\n      return responseMessage_default({\n        success: true,\n        data: dataF[0],\n        message: \"Successfully updated\"\n      });\n    });\n  }\n  /**\n   * This function retrieves multiple documents from a MongoDB collection based on the provided\n   * filter, model, populate, and query parameters.\n   * @param {Object} params - The `params` object contains the necessary parameters for the getMany\n   * operation.\n   * @param {CrudModelI<T>} params.modelData - The `modelData` parameter represents the model(s) to\n   * retrieve documents from.\n   * @param {FilterQuery<T> | null} params.filter - The `filter` parameter represents the criteria to\n   * identify the documents to retrieve.\n   * @param {PopulateFieldI<T> | PopulateFieldI<T>[]} params.populate - The `populate` parameter\n   * represents the fields to populate in the retrieved documents.\n   * @param {typeof request.query} params.query - The `query` parameter represents the query parameters\n   * from the request.\n   * @returns {Promise<any>} The method returns a promise that resolves to a response message object\n   * containing the retrieved documents, a success status, and other relevant information.\n   */\n  static getMany(_0) {\n    return __async(this, arguments, function* ({\n      filter,\n      modelData,\n      populate,\n      query\n    }) {\n      const all = [];\n      const processModel = (model) => __async(this, null, function* () {\n        let modelFind = filter ? model.Model.find(filter) : model.Model.find();\n        if (model.select) {\n          modelFind = modelFind.select(model.select.join(\" \"));\n        }\n        if (populate) {\n          modelFind = _CrudService.populateModel(modelFind, populate);\n        }\n        const queryf = new query_default(modelFind, query).filter().limitFields().paginate().sort();\n        const queryG = yield queryf.model;\n        if (!queryG) {\n          throw new error_handler_default(import_http_status.default.NOT_FOUND, `${model} is not fetched`);\n        }\n        all.push(queryG);\n      });\n      yield processModel(modelData);\n      return responseMessage_default({\n        success: true,\n        message: \"Data fetched successfully\",\n        data: all[0],\n        doc_length: yield _CrudService.getModelLength(modelData, filter)\n      });\n    });\n  }\n  static getModelLength(model, filter) {\n    return __async(this, null, function* () {\n      const count = yield model.Model.countDocuments(filter || {});\n      return count;\n    });\n  }\n  /**\n   * The function `populateModel` populates a model with specified fields and nested fields based on\n   * the provided criteria.\n   * @param {any} modelFind - The `modelFind` parameter is the model object that you want to populate\n   * with additional data. It could be a Mongoose model instance or any other object that supports\n   * population of fields.\n   * @param {PopulateFieldI<T> | PopulateFieldI<T>[]} populate - The `populate` parameter in the\n   * `populateModel` function is used to specify which fields in the model should be populated with\n   * additional data. It can be a single `PopulateFieldI` object or an array of `PopulateFieldI`\n   * objects. Each `PopulateFieldI` object\n   * @returns The `populateModel` function returns the result of populating the specified fields in the\n   * modelFind object based on the populate configuration provided.\n   */\n  static populateModel(modelFind, populate) {\n    if (!populate) {\n      return modelFind;\n    }\n    const populateArr = Array.isArray(populate) ? populate : [populate];\n    return populateArr.reduce((model, pop) => {\n      var _a;\n      if (!pop.path) {\n        return model;\n      }\n      return model.populate({\n        path: pop.path,\n        select: (_a = pop.fields) == null ? void 0 : _a.join(\" \"),\n        populate: pop.second_layer_populate\n      });\n    }, modelFind);\n  }\n  /**\n   * The function `delete` is an asynchronous static method in TypeScript that deletes data based on\n   * the provided filter query and model data, handling errors and returning a success message.\n   * @param  - The `delete` method you provided is an asynchronous function that deletes data from a\n   * database using the given `modelData` and `data` parameters. Here's a breakdown of the parameters:\n   * @returns The `delete` method is returning a Promise that resolves to an object with the following\n   * properties:\n   * - `success`: a boolean value indicating the success status of the deletion operation\n   * - `message`: a string message indicating that the deletion was successful\n   * - `data`: a string value indicating that the data was deleted\n   */\n  static delete(_0) {\n    return __async(this, arguments, function* ({\n      data,\n      modelData\n    }) {\n      const delet = yield modelData.Model.deleteOne(data);\n      if (!delet) {\n        throw new error_handler_default(\n          import_http_status.default.NOT_FOUND,\n          `{modelData.Model.collection.collectionName} is not successfully deleted`\n        );\n      }\n      return responseMessage_default({\n        success: true,\n        message: \"Deleted successfully\",\n        data: \"deleted\"\n      });\n    });\n  }\n  /**\n   * This TypeScript function deletes multiple documents based on a filter query using the deleteMany\n   * method and returns a success message.\n   * @param  - The `deleteMany` function takes in two parameters:\n   * @returns The `deleteMany` function returns a Promise that resolves to an object with the following\n   * properties:\n   * - `success`: a boolean indicating the success status of the deletion operation (true in\n   * this case)\n   * - `message`: a string message indicating that the deletion was successful (\"Deleted successfully\"\n   * in this case)\n   * - `data`: a string value indicating that the data was deleted (\"deleted\" in this case\n   */\n  static deleteMany(_0) {\n    return __async(this, arguments, function* ({\n      data,\n      modelData\n    }) {\n      const delet = yield modelData.Model.deleteMany(data);\n      if (!delet) {\n        throw new error_handler_default(\n          import_http_status.default.NOT_FOUND,\n          `${modelData.Model.collection.collectionName} is not successfully deleted`\n        );\n      }\n      return responseMessage_default({\n        success: true,\n        message: \"Deleted successfully\",\n        data: \"deleted\"\n      });\n    });\n  }\n  /**\n   * Asynchronously retrieves a single document from a MongoDB collection.\n   *\n   * @param {Object} params - The parameters for retrieving the document.\n   * @param {CrudModelI<T>} params.modelData - The model data for the MongoDB collection.\n   * @param {FilterQuery<T>} params.data - The filter query for finding the document.\n   * @param {PopulateFieldI<T> | PopulateFieldI<T>[]} params.populate - The populate options for the document.\n   * @returns {Promise<any>} The response message containing the retrieved document.\n   * @throws {CustomError} If the document is not found.\n   */\n  static getOne(_0) {\n    return __async(this, arguments, function* ({\n      modelData,\n      data,\n      populate\n    }) {\n      const getData = [];\n      let getOne;\n      getOne = modelData.Model.findOne(data).select(modelData.select.join(\" \"));\n      if (!getOne)\n        throw new error_handler_default(\n          import_http_status.default.NOT_FOUND,\n          `{modelData.Model.collection.collectionName} is not successfully fetched`\n        );\n      if (populate)\n        getOne = _CrudService.populateModel(getOne, populate);\n      const gotten = yield getOne.exec();\n      getData.push(gotten);\n      return responseMessage_default({\n        success: true,\n        message: \" fetched successfully\",\n        data: getData[0]\n      });\n    });\n  }\n};\nvar crud_service_default = CrudService;\n\n// src/files/crud.controller.ts\nvar CrudController = class {\n  /**\n   * Constructor for creating an instance of the class.\n   *\n   * @param {Object} options - The options object containing request, response, next, useNext, and env.\n   * @param {Request} options.request - The request object.\n   * @param {Response} options.response - The response object.\n   * @param {NextFunction} options.next - The next function.\n   * @param {boolean} [options.useNext=true] - Flag indicating whether to use the next function.\n   * @param {\"development\" | \"production\"} [options.env=\"development\"] - The environment setting.\n   */\n  constructor({\n    request,\n    response,\n    next,\n    useNext = true,\n    env = \"development\"\n  }) {\n    this.request = request;\n    this.response = response;\n    this.next = next;\n    this.useNext = useNext;\n    this.env = env;\n  }\n  /**\n   * A description of the entire function.\n   *\n   * @param {CrudModelI<T>} modelData - description of parameter\n   * @param {T} data - description of parameter\n   * @param {FilterQuery<T & Document>} check - description of parameter\n   * @return {Promise<Response | NextFunction | void>} description of return value\n   */\n  create(_0) {\n    return __async(this, arguments, function* ({\n      modelData,\n      data,\n      check\n    }) {\n      try {\n        const response = yield crud_service_default.create({ modelData, data, check });\n        return this.response.status(import_http_status2.default.CREATED).json(response);\n      } catch (error) {\n        return this.useNext ? this.next(error) : errorCenter({ env: this.env, error, response: this.response });\n      }\n    });\n  }\n  /**\n   * A function to create multiple records in the database.\n   *\n   * @param {Object} param0 - Object containing modelData, data, and check\n   * @param {CrudModelI<T>} param0.modelData - The model data for the records\n   * @param {T[]} param0.data - The array of records to be created\n   * @param {FilterQuery<T & Document>[]} param0.check - The filter query for checking existing records\n   * @return {Promise<Response | NextFunction | void>} A promise that resolves to a response or next function, or void in case of error\n   */\n  createMany(_0) {\n    return __async(this, arguments, function* ({\n      check,\n      modelData,\n      data\n    }) {\n      try {\n        const response = yield crud_service_default.createMany({ modelData, data, check });\n        return this.response.status(import_http_status2.default.CREATED).json(response);\n      } catch (error) {\n        return this.useNext ? this.next(error) : errorCenter({ env: this.env, error, response: this.response });\n      }\n    });\n  }\n  /**\n   * The function updates a model using the provided data and filter, and returns the updated response.\n   * @param {CrudModelI} modelData - A variable representing a CRUD model interface. It is used to\n   * perform CRUD operations on a specific model.\n   * @param data - The `data` parameter is an object that contains the fields and values to be updated\n   * in the database. It represents the update query that will be executed on the `modelData` collection.\n   * The type `T` represents the shape of the data object.\n   * @param filter - The `filter` parameter is a query object used to filter the documents to be\n   * updated in the database. It specifies the criteria that the documents must meet in order to be\n   * updated. The `filter` parameter is of type `FilterQuery<U>`, where `U` is the type of the filter\n   * @returns a promise that resolves to a response object.\n   */\n  update(_0) {\n    return __async(this, arguments, function* ({\n      data,\n      modelData,\n      filter\n    }) {\n      try {\n        const response = yield crud_service_default.update({ modelData, data, filter });\n        return this.response.status(import_http_status2.default.OK).json(response);\n      } catch (error) {\n        return this.useNext ? this.next(error) : errorCenter({ env: this.env, error, response: this.response });\n      }\n    });\n  }\n  /**\n   * Fetches multiple documents from the database based on the provided query parameters.\n   * Supports pagination, sorting, and field selection.\n   * Can fetch data from multiple models if an array of models is provided.\n   *\n   * @param {CrudModelI } modelData - The model(s) to fetch data from.\n   * @param {typeof this.request.query} query - The query parameters.\n   * @param {PopulateFieldI | PopulateFieldI[]} populate - The fields to populate.\n   * @param {FilterQuery<T> | null} [category=null] - The category filter.\n   * @returns {Promise<void>} - JSON response with the fetched data, success status, message, and the length of the fetched documents.\n   *\n   * @example\n   * const crud = new Crud(request, response, next);\n   * const modelData = {\n   *   Model: Model,\n   *   select: ['field1','field2'],\n   * };\n   * const query = request.query;\n   * const populate = {\n   *   model: 'relatedModel',\n   *   fields: ['field1', 'field2'],\n   *   second_layer_populate: 'nestedModel',\n   * };\n   * const category = { category: 'category1' };\n   *\n   * await crud.getMany(modelData, query, populate, category);\n   *\n   * This example initializes the `Crud` class object and calls the `getMany` method to fetch documents from the `Model` based on the provided query parameters.\n   * It also specifies the fields to be populated and the category filter.\n   */\n  getMany(_0) {\n    return __async(this, arguments, function* ({\n      filter = null,\n      modelData,\n      populate,\n      query\n    }) {\n      try {\n        const response = yield crud_service_default.getMany({\n          modelData,\n          query,\n          populate,\n          filter\n        });\n        this.response.status(import_http_status2.default.OK).json(response);\n      } catch (error) {\n        return this.useNext ? this.next(error) : errorCenter({ env: this.env, error, response: this.response });\n      }\n    });\n  }\n  /**\n   * The function is an asynchronous method that deletes data from a model using a filter query and\n   * returns the response.\n   * @param {CrudModelI} modelData - The modelData parameter is an instance of a CRUD model. It represents\n   * the model or schema that you want to perform the delete operation on. It should implement the\n   * CrudModelI interface.\n   * @param data - The `data` parameter is a filter query object used to specify the criteria for\n   * deleting documents from the database. It is of type `FilterQuery<T>`, where `T` represents the\n   * type of the documents being deleted. The `FilterQuery` type is typically used in MongoDB queries\n   * to filter documents\n   * @example - The example below shows how to use the `delete` function to delete a document from the\n   * `Model` using a filter query.\n   * const crud = new Crud(request, response, next);\n   * const modelData = {\n   *   Model: Model,\n   *   select: 'field1 field2',\n   * }\n   */\n  delete(_0) {\n    return __async(this, arguments, function* ({\n      data,\n      modelData\n    }) {\n      try {\n        const response = yield crud_service_default.delete({ modelData, data });\n        this.response.status(import_http_status2.default.OK).json(response);\n      } catch (error) {\n        return this.useNext ? this.next(error) : errorCenter({ env: this.env, error, response: this.response });\n      }\n    });\n  }\n  /**\n   * This TypeScript function deletes multiple documents based on a filter query using a CRUD service.\n   * @param  - The `deleteMany` function takes in two parameters:\n   * @returns The `deleteMany` method is returning the response from the `CrudService.deleteMany`\n   * function call if successful. If there is an error, it will either call `this.next(error)` if\n   * `this.useNext` is true, or it will call `errorCenter` function with the provided parameters.\n   */\n  deleteMany(_0) {\n    return __async(this, arguments, function* ({\n      data,\n      modelData\n    }) {\n      try {\n        const response = yield crud_service_default.deleteMany({ modelData, data });\n        this.response.status(import_http_status2.default.OK).json(response);\n      } catch (error) {\n        return this.useNext ? this.next(error) : errorCenter({ env: this.env, error, response: this.response });\n      }\n    });\n  }\n  /**\n   * The function retrieves one document from a database using a given model, data filter, and optional\n   * population fields, and returns the response as JSON.\n   * @param {CrudModelI} modelData - The `modelData` parameter is the model that you want to perform the\n   * operation on. It should be an instance of a CRUD model that implements the `CrudModelI` interface.\n   * @param data - The `data` parameter is a filter query object used to specify the conditions for\n   * finding a document in the database. It can be used to filter the documents based on certain\n   * criteria such as equality, inequality, greater than, less than, etc. The type `T` represents the\n   * type of the data\n   * @param {PopulateFieldI | PopulateFieldI[]} populate - The \"populate\" parameter is used to specify\n   * which fields of the retrieved document(s) should be populated with their referenced documents. It\n   * can be a single field or an array of fields to populate.\n   * @example\n   * ```ts\n   * CrudModelI {\n   * model: Model<any>;\n   *select: string;\n   *  }\n   *   populate: { model?: string | undefined; fields?: string | undefined } ```\n   *\n   *   @example\n   * // returns a response\n   * getOne< T the model >(modelData, category<T>, populate: { model?: string | undefined; fields?: string | undefined)})\n   */\n  getOne(_0) {\n    return __async(this, arguments, function* ({\n      data,\n      modelData,\n      populate\n    }) {\n      try {\n        const response = yield crud_service_default.getOne({ modelData, data, populate });\n        this.response.status(import_http_status2.default.OK).json(response);\n      } catch (error) {\n        this.next(error);\n      }\n    });\n  }\n};\nvar crud_controller_default = CrudController;\n\n// src/files/crud.model.ts\nvar import_mongoose = __toESM(require(\"mongoose\"));\nvar generateDynamicSchema = ({\n  fields,\n  modelName,\n  plugins,\n  schemaOptions,\n  model\n}) => {\n  const schemaDefinition = {};\n  for (const [keys, values] of Object.entries(fields)) {\n    const fieldOptions = values;\n    if (typeof fieldOptions === \"object\") {\n      schemaDefinition[keys] = fieldOptions;\n    } else if (Array.isArray(fieldOptions)) {\n      switch (typeof fieldOptions[0]) {\n        case \"string\":\n          schemaDefinition[keys] = {\n            type: [String]\n          };\n          break;\n        case \"number\":\n          schemaDefinition[keys] = {\n            type: [Number]\n          };\n          break;\n        case \"object\":\n          {\n            Object.prototype.hasOwnProperty.call(fieldOptions[0], \"ref\") && Object.prototype.hasOwnProperty.call(fieldOptions[0], \"type\") && fieldOptions[0].type === import_mongoose.default.Schema.Types.ObjectId ? schemaDefinition[keys] = fieldOptions : schemaDefinition[keys] = generateDynamicSchema({\n              modelName: \"\",\n              fields: fieldOptions[0],\n              schemaOptions: schemaOptions != null ? schemaOptions : {},\n              model\n            }).schema;\n          }\n          break;\n        case \"bigint\":\n          schemaDefinition[keys] = {\n            type: [BigInt]\n          };\n          break;\n        case \"boolean\":\n          schemaDefinition[keys] = {\n            type: [Boolean]\n          };\n          break;\n        case \"symbol\":\n          schemaDefinition[keys] = {\n            type: [String]\n          };\n          break;\n        default:\n          break;\n      }\n    } else {\n      schemaDefinition[keys] = {\n        type: fieldOptions\n      };\n    }\n  }\n  const schemaDef = new import_mongoose.Schema(schemaDefinition, schemaOptions);\n  plugins == null ? void 0 : plugins.forEach((plugin) => schemaDef.plugin(plugin));\n  return {\n    model: model(modelName, schemaDef),\n    schema: schemaDef\n  };\n};\nvar crud_model_default = generateDynamicSchema;\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n  CrudController,\n  CrudService,\n  errorCenter,\n  generateDynamicSchema\n});\n"]}