@intlayer/backend 7.5.5 → 7.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/assets/utils/AI/askDocQuestion/embeddings/docs/en/intlayer_with_react_router_v7.json +1 -8210
  2. package/dist/assets/utils/AI/askDocQuestion/embeddings/docs/en/intlayer_with_react_router_v7_fs_routes.json +1 -9236
  3. package/dist/esm/controllers/dictionary.controller.mjs +2 -1
  4. package/dist/esm/controllers/dictionary.controller.mjs.map +1 -1
  5. package/dist/esm/schemas/organization.schema.mjs +1 -4
  6. package/dist/esm/schemas/organization.schema.mjs.map +1 -1
  7. package/dist/types/controllers/dictionary.controller.d.ts.map +1 -1
  8. package/dist/types/controllers/tag.controller.d.ts.map +1 -1
  9. package/dist/types/emails/MagicLinkEmail.d.ts +4 -4
  10. package/dist/types/emails/MagicLinkEmail.d.ts.map +1 -1
  11. package/dist/types/emails/OAuthTokenCreatedEmail.d.ts +4 -4
  12. package/dist/types/emails/OAuthTokenCreatedEmail.d.ts.map +1 -1
  13. package/dist/types/emails/PasswordChangeConfirmation.d.ts +4 -4
  14. package/dist/types/emails/PasswordChangeConfirmation.d.ts.map +1 -1
  15. package/dist/types/emails/ResetUserPassword.d.ts +4 -4
  16. package/dist/types/emails/SubscriptionPaymentCancellation.d.ts +4 -4
  17. package/dist/types/emails/SubscriptionPaymentError.d.ts +4 -4
  18. package/dist/types/emails/SubscriptionPaymentSuccess.d.ts +4 -4
  19. package/dist/types/emails/SubscriptionPaymentSuccess.d.ts.map +1 -1
  20. package/dist/types/emails/ValidateUserEmail.d.ts +4 -4
  21. package/dist/types/emails/Welcome.d.ts +4 -4
  22. package/dist/types/models/dictionary.model.d.ts +4 -4
  23. package/dist/types/models/discussion.model.d.ts +2 -2
  24. package/dist/types/schemas/dictionary.schema.d.ts +6 -6
  25. package/dist/types/schemas/dictionary.schema.d.ts.map +1 -1
  26. package/dist/types/schemas/discussion.schema.d.ts +6 -6
  27. package/dist/types/schemas/organization.schema.d.ts +6 -6
  28. package/dist/types/schemas/organization.schema.d.ts.map +1 -1
  29. package/dist/types/schemas/project.schema.d.ts +6 -6
  30. package/dist/types/schemas/tag.schema.d.ts +6 -6
  31. package/dist/types/schemas/user.schema.d.ts +6 -6
  32. package/dist/types/utils/filtersAndPagination/getDictionaryFiltersAndPagination.d.ts +2 -2
  33. package/dist/types/utils/filtersAndPagination/getDiscussionFiltersAndPagination.d.ts +2 -2
  34. package/dist/types/utils/filtersAndPagination/getOrganizationFiltersAndPagination.d.ts +2 -2
  35. package/dist/types/utils/filtersAndPagination/getProjectFiltersAndPagination.d.ts +2 -2
  36. package/dist/types/utils/filtersAndPagination/getTagFiltersAndPagination.d.ts +2 -2
  37. package/package.json +11 -11
@@ -224,7 +224,8 @@ const addDictionary = async (req, res, _next) => {
224
224
  */
225
225
  const pushDictionaries = async (req, res, _next) => {
226
226
  const { project, user, roles } = res.locals;
227
- const dictionaryData = req.body.dictionaries;
227
+ let dictionaryData = req.body.dictionaries;
228
+ if (dictionaryData && !Array.isArray(dictionaryData) && typeof dictionaryData === "object" && "dictionaries" in dictionaryData && Array.isArray(dictionaryData.dictionaries)) dictionaryData = dictionaryData.dictionaries;
228
229
  if (typeof dictionaryData === "object" && Array.isArray(dictionaryData) && dictionaryData.length === 0) {
229
230
  ErrorHandler.handleGenericErrorResponse(res, "DICTIONARIES_NOT_PROVIDED");
230
231
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"dictionary.controller.mjs","names":["clone: T","dictionaryService.findDictionaries","dictionaryService.countDictionaries","dictionaryService.getDictionaryByKey","dictionary: DictionaryData","dictionaryService.createDictionary","newDictionariesResult: PushDictionariesResultData['newDictionaries']","updatedDictionariesResult: PushDictionariesResultData['updatedDictionaries']","errorResult: PushDictionariesResultData['error']","dictionaryService.getDictionaryById","newContent: VersionedContent","dictionaryService.incrementVersion","dictionaryService.updateDictionaryByKey","result: PushDictionariesResultData","dictionaryService.updateDictionaryById","dictionaryService.deleteDictionaryById"],"sources":["../../../src/controllers/dictionary.controller.ts"],"sourcesContent":["import { isDeepStrictEqual } from 'node:util';\nimport * as eventListener from '@controllers/eventListener.controller';\nimport type {\n ContentNode,\n DictionaryId,\n Dictionary as LocalDictionary,\n LocalDictionaryId,\n} from '@intlayer/types';\nimport { logger } from '@logger';\nimport type { ResponseWithSession } from '@middlewares/sessionAuth.middleware';\nimport * as dictionaryService from '@services/dictionary.service';\nimport { ensureMongoDocumentToObject } from '@utils/ensureMongoDocumentToObject';\nimport { type AppError, ErrorHandler } from '@utils/errors';\nimport {\n type DictionaryFiltersParams,\n getDictionaryFiltersAndPagination,\n} from '@utils/filtersAndPagination/getDictionaryFiltersAndPagination';\nimport type { FiltersAndPagination } from '@utils/filtersAndPagination/getFiltersAndPaginationFromBody';\nimport { mapDictionaryToAPI } from '@utils/mapper/dictionary';\nimport { hasPermission } from '@utils/permissions';\nimport {\n formatPaginatedResponse,\n formatResponse,\n type PaginatedResponse,\n type ResponseData,\n} from '@utils/responseData';\nimport type { NextFunction, Request } from 'express';\nimport { t } from 'express-intlayer';\nimport type {\n Dictionary,\n DictionaryAPI,\n DictionaryCreationData,\n DictionaryData,\n VersionedContent,\n} from '@/types/dictionary.types';\n\nexport type GetDictionariesParams =\n FiltersAndPagination<DictionaryFiltersParams>;\nexport type GetDictionariesResult = PaginatedResponse<DictionaryAPI>;\n\nconst removeMetadata = <T extends Record<string, any>>(obj: T): T => {\n if (Array.isArray(obj)) {\n return obj.map(removeMetadata) as unknown as T;\n }\n\n if (obj && typeof obj === 'object') {\n const clone: T = {} as T;\n for (const key in obj) {\n if (key !== 'metadata') {\n clone[key] = removeMetadata(obj[key]);\n }\n }\n return clone as T;\n }\n\n return obj as T;\n};\n\n/**\n * Retrieves a list of dictionaries based on filters and pagination.\n */\nexport const getDictionaries = async (\n req: Request<GetDictionariesParams>,\n res: ResponseWithSession<GetDictionariesResult>,\n _next: NextFunction\n): Promise<void> => {\n const { user, project, roles } = res.locals;\n const { filters, sortOptions, pageSize, skip, page, getNumberOfPages } =\n getDictionaryFiltersAndPagination(req, res);\n\n if (!project) {\n ErrorHandler.handleGenericErrorResponse(res, 'PROJECT_NOT_DEFINED');\n return;\n }\n\n if (!user) {\n ErrorHandler.handleGenericErrorResponse(res, 'USER_NOT_DEFINED');\n return;\n }\n\n try {\n const dictionaries = await dictionaryService.findDictionaries(\n {\n ...filters,\n projectIds: project.id,\n },\n skip,\n pageSize,\n sortOptions\n );\n\n if (\n !hasPermission(\n roles,\n 'dictionary:read'\n )({\n ...res.locals,\n targetDictionaries: dictionaries,\n })\n ) {\n ErrorHandler.handleGenericErrorResponse(res, 'PERMISSION_DENIED');\n return;\n }\n\n const totalItems = await dictionaryService.countDictionaries(filters);\n\n const dictionariesAPI = dictionaries.map((el) => mapDictionaryToAPI(el));\n\n const responseData = formatPaginatedResponse<DictionaryAPI>({\n data: dictionariesAPI,\n page,\n pageSize,\n totalPages: getNumberOfPages(totalItems),\n totalItems,\n });\n\n res.json(responseData);\n return;\n } catch (error) {\n ErrorHandler.handleAppErrorResponse(res, error as AppError);\n return;\n }\n};\n\nexport type GetDictionariesKeysResult = ResponseData<string[]>;\n\n/**\n * Retrieves a list of dictionaries keys based on filters and pagination.\n */\nexport const getDictionariesKeys = async (\n _req: Request,\n res: ResponseWithSession<GetDictionariesKeysResult>,\n _next: NextFunction\n) => {\n const { project, roles } = res.locals;\n\n if (!project) {\n ErrorHandler.handleGenericErrorResponse(res, 'PROJECT_NOT_DEFINED');\n return;\n }\n\n try {\n const dictionaries = await dictionaryService.findDictionaries({\n projectIds: project.id,\n });\n\n if (\n !hasPermission(\n roles,\n 'dictionary:read'\n )({\n ...res.locals,\n targetDictionaries: dictionaries,\n })\n ) {\n ErrorHandler.handleGenericErrorResponse(res, 'PERMISSION_DENIED');\n return;\n }\n\n const dictionariesKeys = dictionaries.map((dictionary) => dictionary.key);\n\n const responseData = formatResponse<string[]>({\n data: dictionariesKeys,\n });\n\n res.json(responseData);\n return;\n } catch (error) {\n ErrorHandler.handleAppErrorResponse(res, error as AppError);\n return;\n }\n};\n\nexport type GetDictionariesUpdateTimestampResult = ResponseData<\n Record<DictionaryId, { key: string; updatedAt: number }>\n>;\n\n/**\n * Retrieves a list of dictionaries keys based on filters and pagination.\n */\nexport const getDictionariesUpdateTimestamp = async (\n _req: Request,\n res: ResponseWithSession<GetDictionariesUpdateTimestampResult>,\n _next: NextFunction\n) => {\n const { project, roles } = res.locals;\n\n if (!project) {\n ErrorHandler.handleGenericErrorResponse(res, 'PROJECT_NOT_DEFINED');\n return;\n }\n\n try {\n const dictionaries = await dictionaryService.findDictionaries({\n projectIds: project.id,\n });\n\n if (\n !hasPermission(\n roles,\n 'dictionary:read'\n )({\n ...res.locals,\n targetDictionaries: dictionaries,\n })\n ) {\n ErrorHandler.handleGenericErrorResponse(res, 'PERMISSION_DENIED');\n return;\n }\n\n const dictionariesUpdateTimestamp = dictionaries.reduce(\n (acc, dictionary) => ({\n ...acc,\n [dictionary.id]: {\n key: dictionary.key,\n updatedAt: new Date(dictionary.updatedAt).getTime(),\n },\n }),\n {}\n );\n\n const responseData = formatResponse<\n Record<string, { key: string; updatedAt: number }>\n >({\n data: dictionariesUpdateTimestamp,\n });\n\n res.json(responseData);\n return;\n } catch (error) {\n ErrorHandler.handleAppErrorResponse(res, error as AppError);\n return;\n }\n};\n\nexport type GetDictionaryParams = { dictionaryKey: string };\nexport type GetDictionaryQuery = { version?: string };\nexport type GetDictionaryResult = ResponseData<DictionaryAPI>;\n\n/**\n * Retrieves a list of dictionaries based on filters and pagination.\n */\nexport const getDictionaryByKey = async (\n req: Request<GetDictionaryParams, any, any, GetDictionaryQuery>,\n res: ResponseWithSession<GetDictionaryResult>,\n _next: NextFunction\n): Promise<void> => {\n const { project, user, roles } = res.locals;\n const { dictionaryKey } = req.params;\n const version = req.query.version;\n\n if (!project) {\n ErrorHandler.handleGenericErrorResponse(res, 'PROJECT_NOT_DEFINED');\n return;\n }\n if (!user) {\n ErrorHandler.handleGenericErrorResponse(res, 'USER_NOT_DEFINED');\n return;\n }\n\n try {\n const dictionary = await dictionaryService.getDictionaryByKey(\n dictionaryKey,\n project.id\n );\n\n if (\n !hasPermission(\n roles,\n 'dictionary:read'\n )({\n ...res.locals,\n targetDictionaries: [dictionary],\n })\n ) {\n ErrorHandler.handleGenericErrorResponse(res, 'PERMISSION_DENIED');\n return;\n }\n\n if (!dictionary.projectIds.map(String).includes(String(project.id))) {\n ErrorHandler.handleGenericErrorResponse(\n res,\n 'DICTIONARY_PROJECT_MISMATCH'\n );\n return;\n }\n\n const apiResult = mapDictionaryToAPI(dictionary, version);\n\n const responseData = formatResponse<DictionaryAPI>({\n data: apiResult,\n });\n\n res.json(responseData);\n return;\n } catch (error) {\n ErrorHandler.handleAppErrorResponse(res, error as AppError);\n return;\n }\n};\n\nexport type AddDictionaryBody = { dictionary: DictionaryCreationData };\nexport type AddDictionaryResult = ResponseData<DictionaryAPI>;\n\n/**\n * Adds a new dictionary to the database.\n */\nexport const addDictionary = async (\n req: Request<any, any, AddDictionaryBody>,\n res: ResponseWithSession<AddDictionaryResult>,\n _next: NextFunction\n): Promise<void> => {\n const { project, user, roles } = res.locals;\n const dictionaryData = req.body.dictionary;\n\n if (!dictionaryData) {\n ErrorHandler.handleGenericErrorResponse(res, 'DICTIONARY_DATA_NOT_FOUND');\n return;\n }\n\n if (!project) {\n ErrorHandler.handleGenericErrorResponse(res, 'PROJECT_NOT_DEFINED');\n return;\n }\n\n if (!user) {\n ErrorHandler.handleGenericErrorResponse(res, 'USER_NOT_DEFINED');\n return;\n }\n\n if (!dictionaryData.projectIds?.includes(String(project.id))) {\n ErrorHandler.handleGenericErrorResponse(res, 'DICTIONARY_PROJECT_MISMATCH');\n return;\n }\n\n const dictionary: DictionaryData = {\n key: dictionaryData.key,\n title: dictionaryData.title,\n description: dictionaryData.description,\n content: new Map([\n [\n 'v1',\n {\n // Remove metadata as markdown metadata are dynamic data inserted at build time\n content: removeMetadata(dictionaryData.content ?? {}) as ContentNode,\n },\n ],\n ]),\n creatorId: user.id,\n projectIds: dictionaryData.projectIds ?? [String(project.id)],\n };\n\n if (!hasPermission(roles, 'dictionary:write')(res.locals)) {\n ErrorHandler.handleGenericErrorResponse(res, 'PERMISSION_DENIED');\n return;\n }\n\n try {\n const newDictionary = await dictionaryService.createDictionary(dictionary);\n\n const apiResult = mapDictionaryToAPI(newDictionary);\n\n const responseData = formatResponse<DictionaryAPI>({\n message: t({\n en: 'Dictionary created successfully',\n fr: 'Dictionnaire créé avec succès',\n es: 'Diccionario creado con éxito',\n }),\n description: t({\n en: 'Your dictionary has been created successfully',\n fr: 'Votre dictionnaire a été créé avec succès',\n es: 'Su diccionario ha sido creado con éxito',\n }),\n data: apiResult,\n });\n\n res.json(responseData);\n\n eventListener.sendDictionaryUpdate([\n {\n dictionary: mapDictionaryToAPI(newDictionary),\n status: 'ADDED',\n },\n ]);\n return;\n } catch (error) {\n ErrorHandler.handleAppErrorResponse(res, error as AppError);\n return;\n }\n};\n\nexport type PushDictionariesBody = {\n dictionaries: LocalDictionary[];\n};\ntype PushDictionariesResultData = {\n newDictionaries: {\n key: string;\n localId: LocalDictionaryId;\n id: string | undefined;\n }[];\n updatedDictionaries: {\n key: string;\n localId: LocalDictionaryId;\n id: string | undefined;\n }[];\n error: {\n id: string | undefined;\n key: string;\n localId: LocalDictionaryId | undefined;\n message: string;\n }[];\n};\nexport type PushDictionariesResult = ResponseData<PushDictionariesResultData>;\n\n/**\n * Check each dictionaries, add the new ones and update the existing ones.\n * @param req - Express request object.\n * @param res - Express response object.\n * @returns Response containing the created dictionary.\n */\nexport const pushDictionaries = async (\n req: Request<any, any, PushDictionariesBody>,\n res: ResponseWithSession<PushDictionariesResult>,\n _next: NextFunction\n): Promise<void> => {\n const { project, user, roles } = res.locals;\n\n const dictionaryData = req.body.dictionaries;\n\n if (\n typeof dictionaryData === 'object' &&\n Array.isArray(dictionaryData) &&\n dictionaryData.length === 0\n ) {\n ErrorHandler.handleGenericErrorResponse(res, 'DICTIONARIES_NOT_PROVIDED');\n return;\n } else if (!dictionaryData) {\n ErrorHandler.handleGenericErrorResponse(res, 'DICTIONARY_DATA_NOT_FOUND');\n return;\n }\n\n if (!project) {\n ErrorHandler.handleGenericErrorResponse(res, 'PROJECT_NOT_DEFINED');\n return;\n }\n\n if (!user) {\n ErrorHandler.handleGenericErrorResponse(res, 'USER_NOT_DEFINED');\n return;\n }\n\n if (!hasPermission(roles, 'dictionary:write')(res.locals)) {\n ErrorHandler.handleGenericErrorResponse(res, 'PERMISSION_DENIED');\n return;\n }\n\n try {\n const existingDictionaries = dictionaryData.filter(\n (dictionary) => dictionary.id !== undefined\n );\n const newDictionaries = dictionaryData.filter(\n (dictionary) => dictionary.id === undefined\n );\n\n const newDictionariesResult: PushDictionariesResultData['newDictionaries'] =\n [];\n const updatedDictionariesResult: PushDictionariesResultData['updatedDictionaries'] =\n [];\n const errorResult: PushDictionariesResultData['error'] = [];\n\n for (const dictionaryDataEl of newDictionaries) {\n const dictionary: DictionaryData = {\n title: dictionaryDataEl.title,\n description: dictionaryDataEl.description,\n projectIds: [String(project.id)],\n creatorId: user.id,\n content: new Map([\n // Remove metadata as markdown metadata are dynamic data inserted at build time\n\n [\n 'v1',\n {\n content:\n removeMetadata(dictionaryDataEl.content) ?? ({} as ContentNode),\n },\n ],\n ]),\n key: dictionaryDataEl.key,\n };\n\n try {\n const newDictionary =\n await dictionaryService.createDictionary(dictionary);\n newDictionariesResult.push({\n key: newDictionary.key,\n localId: dictionaryDataEl.localId!,\n id: newDictionary.id,\n });\n } catch (error) {\n errorResult.push({\n id: dictionaryDataEl.id!,\n key: dictionaryDataEl.key,\n localId: dictionaryDataEl.localId!,\n message: (error as AppError).message,\n });\n }\n }\n\n for (const dictionaryDataEl of existingDictionaries) {\n const remoteDictionary = await dictionaryService.getDictionaryById(\n dictionaryDataEl.id!\n );\n\n // Remove metadata as markdown metadata are dynamic data inserted at build time\n const cleanedContent = removeMetadata(dictionaryDataEl.content);\n\n const versionList = [...(remoteDictionary.content.keys() ?? [])];\n const lastVersion = versionList[versionList.length - 1];\n\n const lastContent =\n (remoteDictionary.content.get(lastVersion)\n ?.content as DictionaryAPI['content']) ?? null;\n\n const isSameContent = isDeepStrictEqual(lastContent, cleanedContent);\n\n const newContent: VersionedContent = new Map(remoteDictionary.content);\n\n if (!isSameContent) {\n const newContentVersion =\n dictionaryService.incrementVersion(remoteDictionary);\n\n newContent.set(newContentVersion, {\n // Remove metadata as markdown metadata are dynamic data inserted at build time\n content: cleanedContent,\n });\n }\n\n const dictionary: DictionaryData = {\n ...ensureMongoDocumentToObject(remoteDictionary),\n ...dictionaryDataEl,\n content: newContent,\n projectIds: [String(project.id)],\n creatorId: user.id,\n key: remoteDictionary.key,\n };\n\n try {\n const updatedDictionary = await dictionaryService.updateDictionaryByKey(\n remoteDictionary.key,\n dictionary,\n project.id\n );\n updatedDictionariesResult.push({\n key: updatedDictionary.key,\n localId: dictionaryDataEl.localId!,\n id: updatedDictionary.id,\n });\n } catch (error) {\n errorResult.push({\n id: dictionaryDataEl.id!,\n key: dictionaryDataEl.key,\n localId: dictionaryDataEl.localId!,\n message: (error as AppError).message,\n });\n }\n }\n\n const result: PushDictionariesResultData = {\n newDictionaries: newDictionariesResult,\n updatedDictionaries: updatedDictionariesResult,\n error: errorResult,\n };\n\n const responseData = formatResponse<PushDictionariesResultData>({\n message: t({\n en: 'Dictionaries updated successfully',\n fr: 'Dictionnaires mis à jour avec succès',\n es: 'Diccionarios actualizados con éxito',\n }),\n description: t({\n en: 'Your dictionaries have been updated successfully',\n fr: 'Vos dictionnaires ont été mis à jour avec succès',\n es: 'Sus diccionarios han sido actualizados con éxito',\n }),\n data: result,\n });\n\n eventListener.sendDictionaryUpdate([\n ...newDictionariesResult.map(\n (dictionary) =>\n ({\n dictionary,\n status: 'ADDED',\n }) as eventListener.SendDictionaryUpdateArg\n ),\n ...updatedDictionariesResult.map(\n (dictionary) =>\n ({\n dictionary,\n status: 'UPDATED',\n }) as eventListener.SendDictionaryUpdateArg\n ),\n ]);\n\n res.json(responseData);\n return;\n } catch (error) {\n ErrorHandler.handleAppErrorResponse(res, error as AppError);\n return;\n }\n};\n\nexport type UpdateDictionaryParam = { dictionaryId: string };\nexport type UpdateDictionaryBody = Partial<Dictionary>;\nexport type UpdateDictionaryResult = ResponseData<DictionaryAPI>;\n\n/**\n * Updates an existing dictionary in the database.\n */\nexport const updateDictionary = async (\n req: Request<UpdateDictionaryParam, any, UpdateDictionaryBody>,\n res: ResponseWithSession<UpdateDictionaryResult>,\n _next: NextFunction\n): Promise<void> => {\n const { dictionaryId } = req.params;\n const { project, roles } = res.locals;\n const dictionaryData = req.body;\n\n if (!dictionaryData) {\n ErrorHandler.handleGenericErrorResponse(res, 'DICTIONARY_DATA_NOT_FOUND');\n return;\n }\n\n if (!project) {\n ErrorHandler.handleGenericErrorResponse(res, 'PROJECT_NOT_DEFINED');\n return;\n }\n\n if (!dictionaryData.projectIds?.includes(String(project.id))) {\n ErrorHandler.handleGenericErrorResponse(res, 'DICTIONARY_PROJECT_MISMATCH');\n return;\n }\n\n if (typeof dictionaryId === 'undefined') {\n ErrorHandler.handleGenericErrorResponse(res, 'DICTIONARY_ID_NOT_FOUND');\n return;\n }\n\n if (!hasPermission(roles, 'dictionary:write')(res.locals)) {\n ErrorHandler.handleGenericErrorResponse(res, 'PERMISSION_DENIED');\n return;\n }\n\n try {\n const updatedDictionary = await dictionaryService.updateDictionaryById(\n dictionaryId,\n dictionaryData\n );\n\n const apiResult = mapDictionaryToAPI(updatedDictionary);\n\n const responseData = formatResponse<DictionaryAPI>({\n message: t({\n en: 'Dictionary updated successfully',\n fr: 'Dictionnaire mis à jour avec succès',\n es: 'Diccionario actualizado con éxito',\n }),\n description: t({\n en: 'Your dictionary has been updated successfully',\n fr: 'Votre dictionnaire a été mis à jour avec succès',\n es: 'Su diccionario ha sido actualizado con éxito',\n }),\n data: apiResult,\n });\n\n eventListener.sendDictionaryUpdate([\n {\n dictionary: apiResult,\n status: 'UPDATED',\n },\n ]);\n\n res.json(responseData);\n return;\n } catch (error) {\n ErrorHandler.handleAppErrorResponse(res, error as AppError);\n return;\n }\n};\n\nexport type DeleteDictionaryParam = { dictionaryId: string };\nexport type DeleteDictionaryResult = ResponseData<DictionaryAPI>;\n\n/**\n * Deletes a dictionary from the database by its ID.\n */\nexport const deleteDictionary = async (\n req: Request<DeleteDictionaryParam>,\n res: ResponseWithSession<DeleteDictionaryResult>,\n _next: NextFunction\n): Promise<void> => {\n const { project, roles } = res.locals;\n const { dictionaryId } = req.params as Partial<DeleteDictionaryParam>;\n\n if (!dictionaryId) {\n ErrorHandler.handleGenericErrorResponse(res, 'DICTIONARY_ID_NOT_FOUND');\n return;\n }\n\n if (!project) {\n ErrorHandler.handleGenericErrorResponse(res, 'PROJECT_NOT_DEFINED');\n return;\n }\n\n if (!hasPermission(roles, 'dictionary:admin')(res.locals)) {\n ErrorHandler.handleGenericErrorResponse(res, 'PERMISSION_DENIED');\n return;\n }\n\n try {\n const dictionaryToDelete =\n await dictionaryService.getDictionaryById(dictionaryId);\n\n if (!dictionaryToDelete.projectIds.includes(project.id)) {\n ErrorHandler.handleGenericErrorResponse(\n res,\n 'DICTIONARY_PROJECT_MISMATCH'\n );\n return;\n }\n\n const deletedDictionary =\n await dictionaryService.deleteDictionaryById(dictionaryId);\n\n if (!deletedDictionary) {\n ErrorHandler.handleGenericErrorResponse(res, 'DICTIONARY_NOT_FOUND', {\n dictionaryId,\n });\n return;\n }\n\n logger.info(`Dictionary deleted: ${String(deletedDictionary.id)}`);\n\n const apiResult = mapDictionaryToAPI(deletedDictionary);\n\n const responseData = formatResponse<DictionaryAPI>({\n message: t({\n en: 'Dictionary deleted successfully',\n fr: 'Dictionnaire supprimé avec succès',\n es: 'Diccionario eliminado con éxito',\n }),\n description: t({\n en: 'Your dictionary has been deleted successfully',\n fr: 'Votre dictionnaire a été supprimé avec succès',\n es: 'Su diccionario ha sido eliminado con éxito',\n }),\n data: apiResult,\n });\n\n res.json(responseData);\n\n eventListener.sendDictionaryUpdate([\n {\n dictionary: apiResult,\n status: 'DELETED',\n },\n ]);\n\n return;\n } catch (error) {\n ErrorHandler.handleAppErrorResponse(res, error as AppError);\n return;\n }\n};\n"],"mappings":";;;;;;;;;;;;;AAwCA,MAAM,kBAAiD,QAAc;AACnE,KAAI,MAAM,QAAQ,IAAI,CACpB,QAAO,IAAI,IAAI,eAAe;AAGhC,KAAI,OAAO,OAAO,QAAQ,UAAU;EAClC,MAAMA,QAAW,EAAE;AACnB,OAAK,MAAM,OAAO,IAChB,KAAI,QAAQ,WACV,OAAM,OAAO,eAAe,IAAI,KAAK;AAGzC,SAAO;;AAGT,QAAO;;;;;AAMT,MAAa,kBAAkB,OAC7B,KACA,KACA,UACkB;CAClB,MAAM,EAAE,MAAM,SAAS,UAAU,IAAI;CACrC,MAAM,EAAE,SAAS,aAAa,UAAU,MAAM,MAAM,qBAClD,kCAAkC,KAAK,IAAI;AAE7C,KAAI,CAAC,SAAS;AACZ,eAAa,2BAA2B,KAAK,sBAAsB;AACnE;;AAGF,KAAI,CAAC,MAAM;AACT,eAAa,2BAA2B,KAAK,mBAAmB;AAChE;;AAGF,KAAI;EACF,MAAM,eAAe,MAAMC,iBACzB;GACE,GAAG;GACH,YAAY,QAAQ;GACrB,EACD,MACA,UACA,YACD;AAED,MACE,CAAC,cACC,OACA,kBACD,CAAC;GACA,GAAG,IAAI;GACP,oBAAoB;GACrB,CAAC,EACF;AACA,gBAAa,2BAA2B,KAAK,oBAAoB;AACjE;;EAGF,MAAM,aAAa,MAAMC,kBAAoC,QAAQ;EAIrE,MAAM,eAAe,wBAAuC;GAC1D,MAHsB,aAAa,KAAK,OAAO,mBAAmB,GAAG,CAAC;GAItE;GACA;GACA,YAAY,iBAAiB,WAAW;GACxC;GACD,CAAC;AAEF,MAAI,KAAK,aAAa;AACtB;UACO,OAAO;AACd,eAAa,uBAAuB,KAAK,MAAkB;AAC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,EACnE,cACD,CAAC;AACF;;AAGF,SAAO,KAAK,uBAAuB,OAAO,kBAAkB,GAAG,GAAG;EAElE,MAAM,YAAY,mBAAmB,kBAAkB;EAEvD,MAAM,eAAe,eAA8B;GACjD,SAAS,EAAE;IACT,IAAI;IACJ,IAAI;IACJ,IAAI;IACL,CAAC;GACF,aAAa,EAAE;IACb,IAAI;IACJ,IAAI;IACJ,IAAI;IACL,CAAC;GACF,MAAM;GACP,CAAC;AAEF,MAAI,KAAK,aAAa;AAEtB,uBAAmC,CACjC;GACE,YAAY;GACZ,QAAQ;GACT,CACF,CAAC;AAEF;UACO,OAAO;AACd,eAAa,uBAAuB,KAAK,MAAkB;AAC3D"}
1
+ {"version":3,"file":"dictionary.controller.mjs","names":["clone: T","dictionaryService.findDictionaries","dictionaryService.countDictionaries","dictionaryService.getDictionaryByKey","dictionary: DictionaryData","dictionaryService.createDictionary","newDictionariesResult: PushDictionariesResultData['newDictionaries']","updatedDictionariesResult: PushDictionariesResultData['updatedDictionaries']","errorResult: PushDictionariesResultData['error']","dictionaryService.getDictionaryById","newContent: VersionedContent","dictionaryService.incrementVersion","dictionaryService.updateDictionaryByKey","result: PushDictionariesResultData","dictionaryService.updateDictionaryById","dictionaryService.deleteDictionaryById"],"sources":["../../../src/controllers/dictionary.controller.ts"],"sourcesContent":["import { isDeepStrictEqual } from 'node:util';\nimport * as eventListener from '@controllers/eventListener.controller';\nimport type {\n ContentNode,\n DictionaryId,\n Dictionary as LocalDictionary,\n LocalDictionaryId,\n} from '@intlayer/types';\nimport { logger } from '@logger';\nimport type { ResponseWithSession } from '@middlewares/sessionAuth.middleware';\nimport * as dictionaryService from '@services/dictionary.service';\nimport { ensureMongoDocumentToObject } from '@utils/ensureMongoDocumentToObject';\nimport { type AppError, ErrorHandler } from '@utils/errors';\nimport {\n type DictionaryFiltersParams,\n getDictionaryFiltersAndPagination,\n} from '@utils/filtersAndPagination/getDictionaryFiltersAndPagination';\nimport type { FiltersAndPagination } from '@utils/filtersAndPagination/getFiltersAndPaginationFromBody';\nimport { mapDictionaryToAPI } from '@utils/mapper/dictionary';\nimport { hasPermission } from '@utils/permissions';\nimport {\n formatPaginatedResponse,\n formatResponse,\n type PaginatedResponse,\n type ResponseData,\n} from '@utils/responseData';\nimport type { NextFunction, Request } from 'express';\nimport { t } from 'express-intlayer';\nimport type {\n Dictionary,\n DictionaryAPI,\n DictionaryCreationData,\n DictionaryData,\n VersionedContent,\n} from '@/types/dictionary.types';\n\nexport type GetDictionariesParams =\n FiltersAndPagination<DictionaryFiltersParams>;\nexport type GetDictionariesResult = PaginatedResponse<DictionaryAPI>;\n\nconst removeMetadata = <T extends Record<string, any>>(obj: T): T => {\n if (Array.isArray(obj)) {\n return obj.map(removeMetadata) as unknown as T;\n }\n\n if (obj && typeof obj === 'object') {\n const clone: T = {} as T;\n for (const key in obj) {\n if (key !== 'metadata') {\n clone[key] = removeMetadata(obj[key]);\n }\n }\n return clone as T;\n }\n\n return obj as T;\n};\n\n/**\n * Retrieves a list of dictionaries based on filters and pagination.\n */\nexport const getDictionaries = async (\n req: Request<GetDictionariesParams>,\n res: ResponseWithSession<GetDictionariesResult>,\n _next: NextFunction\n): Promise<void> => {\n const { user, project, roles } = res.locals;\n const { filters, sortOptions, pageSize, skip, page, getNumberOfPages } =\n getDictionaryFiltersAndPagination(req, res);\n\n if (!project) {\n ErrorHandler.handleGenericErrorResponse(res, 'PROJECT_NOT_DEFINED');\n return;\n }\n\n if (!user) {\n ErrorHandler.handleGenericErrorResponse(res, 'USER_NOT_DEFINED');\n return;\n }\n\n try {\n const dictionaries = await dictionaryService.findDictionaries(\n {\n ...filters,\n projectIds: project.id,\n },\n skip,\n pageSize,\n sortOptions\n );\n\n if (\n !hasPermission(\n roles,\n 'dictionary:read'\n )({\n ...res.locals,\n targetDictionaries: dictionaries,\n })\n ) {\n ErrorHandler.handleGenericErrorResponse(res, 'PERMISSION_DENIED');\n return;\n }\n\n const totalItems = await dictionaryService.countDictionaries(filters);\n\n const dictionariesAPI = dictionaries.map((el) => mapDictionaryToAPI(el));\n\n const responseData = formatPaginatedResponse<DictionaryAPI>({\n data: dictionariesAPI,\n page,\n pageSize,\n totalPages: getNumberOfPages(totalItems),\n totalItems,\n });\n\n res.json(responseData);\n return;\n } catch (error) {\n ErrorHandler.handleAppErrorResponse(res, error as AppError);\n return;\n }\n};\n\nexport type GetDictionariesKeysResult = ResponseData<string[]>;\n\n/**\n * Retrieves a list of dictionaries keys based on filters and pagination.\n */\nexport const getDictionariesKeys = async (\n _req: Request,\n res: ResponseWithSession<GetDictionariesKeysResult>,\n _next: NextFunction\n) => {\n const { project, roles } = res.locals;\n\n if (!project) {\n ErrorHandler.handleGenericErrorResponse(res, 'PROJECT_NOT_DEFINED');\n return;\n }\n\n try {\n const dictionaries = await dictionaryService.findDictionaries({\n projectIds: project.id,\n });\n\n if (\n !hasPermission(\n roles,\n 'dictionary:read'\n )({\n ...res.locals,\n targetDictionaries: dictionaries,\n })\n ) {\n ErrorHandler.handleGenericErrorResponse(res, 'PERMISSION_DENIED');\n return;\n }\n\n const dictionariesKeys = dictionaries.map((dictionary) => dictionary.key);\n\n const responseData = formatResponse<string[]>({\n data: dictionariesKeys,\n });\n\n res.json(responseData);\n return;\n } catch (error) {\n ErrorHandler.handleAppErrorResponse(res, error as AppError);\n return;\n }\n};\n\nexport type GetDictionariesUpdateTimestampResult = ResponseData<\n Record<DictionaryId, { key: string; updatedAt: number }>\n>;\n\n/**\n * Retrieves a list of dictionaries keys based on filters and pagination.\n */\nexport const getDictionariesUpdateTimestamp = async (\n _req: Request,\n res: ResponseWithSession<GetDictionariesUpdateTimestampResult>,\n _next: NextFunction\n) => {\n const { project, roles } = res.locals;\n\n if (!project) {\n ErrorHandler.handleGenericErrorResponse(res, 'PROJECT_NOT_DEFINED');\n return;\n }\n\n try {\n const dictionaries = await dictionaryService.findDictionaries({\n projectIds: project.id,\n });\n\n if (\n !hasPermission(\n roles,\n 'dictionary:read'\n )({\n ...res.locals,\n targetDictionaries: dictionaries,\n })\n ) {\n ErrorHandler.handleGenericErrorResponse(res, 'PERMISSION_DENIED');\n return;\n }\n\n const dictionariesUpdateTimestamp = dictionaries.reduce(\n (acc, dictionary) => ({\n ...acc,\n [dictionary.id]: {\n key: dictionary.key,\n updatedAt: new Date(dictionary.updatedAt).getTime(),\n },\n }),\n {}\n );\n\n const responseData = formatResponse<\n Record<string, { key: string; updatedAt: number }>\n >({\n data: dictionariesUpdateTimestamp,\n });\n\n res.json(responseData);\n return;\n } catch (error) {\n ErrorHandler.handleAppErrorResponse(res, error as AppError);\n return;\n }\n};\n\nexport type GetDictionaryParams = { dictionaryKey: string };\nexport type GetDictionaryQuery = { version?: string };\nexport type GetDictionaryResult = ResponseData<DictionaryAPI>;\n\n/**\n * Retrieves a list of dictionaries based on filters and pagination.\n */\nexport const getDictionaryByKey = async (\n req: Request<GetDictionaryParams, any, any, GetDictionaryQuery>,\n res: ResponseWithSession<GetDictionaryResult>,\n _next: NextFunction\n): Promise<void> => {\n const { project, user, roles } = res.locals;\n const { dictionaryKey } = req.params;\n const version = req.query.version;\n\n if (!project) {\n ErrorHandler.handleGenericErrorResponse(res, 'PROJECT_NOT_DEFINED');\n return;\n }\n if (!user) {\n ErrorHandler.handleGenericErrorResponse(res, 'USER_NOT_DEFINED');\n return;\n }\n\n try {\n const dictionary = await dictionaryService.getDictionaryByKey(\n dictionaryKey,\n project.id\n );\n\n if (\n !hasPermission(\n roles,\n 'dictionary:read'\n )({\n ...res.locals,\n targetDictionaries: [dictionary],\n })\n ) {\n ErrorHandler.handleGenericErrorResponse(res, 'PERMISSION_DENIED');\n return;\n }\n\n if (!dictionary.projectIds.map(String).includes(String(project.id))) {\n ErrorHandler.handleGenericErrorResponse(\n res,\n 'DICTIONARY_PROJECT_MISMATCH'\n );\n return;\n }\n\n const apiResult = mapDictionaryToAPI(dictionary, version);\n\n const responseData = formatResponse<DictionaryAPI>({\n data: apiResult,\n });\n\n res.json(responseData);\n return;\n } catch (error) {\n ErrorHandler.handleAppErrorResponse(res, error as AppError);\n return;\n }\n};\n\nexport type AddDictionaryBody = { dictionary: DictionaryCreationData };\nexport type AddDictionaryResult = ResponseData<DictionaryAPI>;\n\n/**\n * Adds a new dictionary to the database.\n */\nexport const addDictionary = async (\n req: Request<any, any, AddDictionaryBody>,\n res: ResponseWithSession<AddDictionaryResult>,\n _next: NextFunction\n): Promise<void> => {\n const { project, user, roles } = res.locals;\n const dictionaryData = req.body.dictionary;\n\n if (!dictionaryData) {\n ErrorHandler.handleGenericErrorResponse(res, 'DICTIONARY_DATA_NOT_FOUND');\n return;\n }\n\n if (!project) {\n ErrorHandler.handleGenericErrorResponse(res, 'PROJECT_NOT_DEFINED');\n return;\n }\n\n if (!user) {\n ErrorHandler.handleGenericErrorResponse(res, 'USER_NOT_DEFINED');\n return;\n }\n\n if (!dictionaryData.projectIds?.includes(String(project.id))) {\n ErrorHandler.handleGenericErrorResponse(res, 'DICTIONARY_PROJECT_MISMATCH');\n return;\n }\n\n const dictionary: DictionaryData = {\n key: dictionaryData.key,\n title: dictionaryData.title,\n description: dictionaryData.description,\n content: new Map([\n [\n 'v1',\n {\n // Remove metadata as markdown metadata are dynamic data inserted at build time\n content: removeMetadata(dictionaryData.content ?? {}) as ContentNode,\n },\n ],\n ]),\n creatorId: user.id,\n projectIds: dictionaryData.projectIds ?? [String(project.id)],\n };\n\n if (!hasPermission(roles, 'dictionary:write')(res.locals)) {\n ErrorHandler.handleGenericErrorResponse(res, 'PERMISSION_DENIED');\n return;\n }\n\n try {\n const newDictionary = await dictionaryService.createDictionary(dictionary);\n\n const apiResult = mapDictionaryToAPI(newDictionary);\n\n const responseData = formatResponse<DictionaryAPI>({\n message: t({\n en: 'Dictionary created successfully',\n fr: 'Dictionnaire créé avec succès',\n es: 'Diccionario creado con éxito',\n }),\n description: t({\n en: 'Your dictionary has been created successfully',\n fr: 'Votre dictionnaire a été créé avec succès',\n es: 'Su diccionario ha sido creado con éxito',\n }),\n data: apiResult,\n });\n\n res.json(responseData);\n\n eventListener.sendDictionaryUpdate([\n {\n dictionary: mapDictionaryToAPI(newDictionary),\n status: 'ADDED',\n },\n ]);\n return;\n } catch (error) {\n ErrorHandler.handleAppErrorResponse(res, error as AppError);\n return;\n }\n};\n\nexport type PushDictionariesBody = {\n dictionaries: LocalDictionary[];\n};\ntype PushDictionariesResultData = {\n newDictionaries: {\n key: string;\n localId: LocalDictionaryId;\n id: string | undefined;\n }[];\n updatedDictionaries: {\n key: string;\n localId: LocalDictionaryId;\n id: string | undefined;\n }[];\n error: {\n id: string | undefined;\n key: string;\n localId: LocalDictionaryId | undefined;\n message: string;\n }[];\n};\nexport type PushDictionariesResult = ResponseData<PushDictionariesResultData>;\n\n/**\n * Check each dictionaries, add the new ones and update the existing ones.\n * @param req - Express request object.\n * @param res - Express response object.\n * @returns Response containing the created dictionary.\n */\nexport const pushDictionaries = async (\n req: Request<any, any, PushDictionariesBody>,\n res: ResponseWithSession<PushDictionariesResult>,\n _next: NextFunction\n): Promise<void> => {\n const { project, user, roles } = res.locals;\n\n // Normalize the input: handle both { dictionaries: [...] } and { dictionaries: { dictionaries: [...] } }\n // The latter can happen due to client-side double-wrapping issues\n let dictionaryData = req.body.dictionaries;\n if (\n dictionaryData &&\n !Array.isArray(dictionaryData) &&\n typeof dictionaryData === 'object' &&\n 'dictionaries' in dictionaryData &&\n Array.isArray(\n (dictionaryData as unknown as PushDictionariesBody).dictionaries\n )\n ) {\n dictionaryData = (dictionaryData as unknown as PushDictionariesBody)\n .dictionaries;\n }\n\n if (\n typeof dictionaryData === 'object' &&\n Array.isArray(dictionaryData) &&\n dictionaryData.length === 0\n ) {\n ErrorHandler.handleGenericErrorResponse(res, 'DICTIONARIES_NOT_PROVIDED');\n return;\n } else if (!dictionaryData) {\n ErrorHandler.handleGenericErrorResponse(res, 'DICTIONARY_DATA_NOT_FOUND');\n return;\n }\n\n if (!project) {\n ErrorHandler.handleGenericErrorResponse(res, 'PROJECT_NOT_DEFINED');\n return;\n }\n\n if (!user) {\n ErrorHandler.handleGenericErrorResponse(res, 'USER_NOT_DEFINED');\n return;\n }\n\n if (!hasPermission(roles, 'dictionary:write')(res.locals)) {\n ErrorHandler.handleGenericErrorResponse(res, 'PERMISSION_DENIED');\n return;\n }\n\n try {\n const existingDictionaries = dictionaryData.filter(\n (dictionary) => dictionary.id !== undefined\n );\n const newDictionaries = dictionaryData.filter(\n (dictionary) => dictionary.id === undefined\n );\n\n const newDictionariesResult: PushDictionariesResultData['newDictionaries'] =\n [];\n const updatedDictionariesResult: PushDictionariesResultData['updatedDictionaries'] =\n [];\n const errorResult: PushDictionariesResultData['error'] = [];\n\n for (const dictionaryDataEl of newDictionaries) {\n const dictionary: DictionaryData = {\n title: dictionaryDataEl.title,\n description: dictionaryDataEl.description,\n projectIds: [String(project.id)],\n creatorId: user.id,\n content: new Map([\n // Remove metadata as markdown metadata are dynamic data inserted at build time\n\n [\n 'v1',\n {\n content:\n removeMetadata(dictionaryDataEl.content) ?? ({} as ContentNode),\n },\n ],\n ]),\n key: dictionaryDataEl.key,\n };\n\n try {\n const newDictionary =\n await dictionaryService.createDictionary(dictionary);\n newDictionariesResult.push({\n key: newDictionary.key,\n localId: dictionaryDataEl.localId!,\n id: newDictionary.id,\n });\n } catch (error) {\n errorResult.push({\n id: dictionaryDataEl.id!,\n key: dictionaryDataEl.key,\n localId: dictionaryDataEl.localId!,\n message: (error as AppError).message,\n });\n }\n }\n\n for (const dictionaryDataEl of existingDictionaries) {\n const remoteDictionary = await dictionaryService.getDictionaryById(\n dictionaryDataEl.id!\n );\n\n // Remove metadata as markdown metadata are dynamic data inserted at build time\n const cleanedContent = removeMetadata(dictionaryDataEl.content);\n\n const versionList = [...(remoteDictionary.content.keys() ?? [])];\n const lastVersion = versionList[versionList.length - 1];\n\n const lastContent =\n (remoteDictionary.content.get(lastVersion)\n ?.content as DictionaryAPI['content']) ?? null;\n\n const isSameContent = isDeepStrictEqual(lastContent, cleanedContent);\n\n const newContent: VersionedContent = new Map(remoteDictionary.content);\n\n if (!isSameContent) {\n const newContentVersion =\n dictionaryService.incrementVersion(remoteDictionary);\n\n newContent.set(newContentVersion, {\n // Remove metadata as markdown metadata are dynamic data inserted at build time\n content: cleanedContent,\n });\n }\n\n const dictionary: DictionaryData = {\n ...ensureMongoDocumentToObject(remoteDictionary),\n ...dictionaryDataEl,\n content: newContent,\n projectIds: [String(project.id)],\n creatorId: user.id,\n key: remoteDictionary.key,\n };\n\n try {\n const updatedDictionary = await dictionaryService.updateDictionaryByKey(\n remoteDictionary.key,\n dictionary,\n project.id\n );\n updatedDictionariesResult.push({\n key: updatedDictionary.key,\n localId: dictionaryDataEl.localId!,\n id: updatedDictionary.id,\n });\n } catch (error) {\n errorResult.push({\n id: dictionaryDataEl.id!,\n key: dictionaryDataEl.key,\n localId: dictionaryDataEl.localId!,\n message: (error as AppError).message,\n });\n }\n }\n\n const result: PushDictionariesResultData = {\n newDictionaries: newDictionariesResult,\n updatedDictionaries: updatedDictionariesResult,\n error: errorResult,\n };\n\n const responseData = formatResponse<PushDictionariesResultData>({\n message: t({\n en: 'Dictionaries updated successfully',\n fr: 'Dictionnaires mis à jour avec succès',\n es: 'Diccionarios actualizados con éxito',\n }),\n description: t({\n en: 'Your dictionaries have been updated successfully',\n fr: 'Vos dictionnaires ont été mis à jour avec succès',\n es: 'Sus diccionarios han sido actualizados con éxito',\n }),\n data: result,\n });\n\n eventListener.sendDictionaryUpdate([\n ...newDictionariesResult.map(\n (dictionary) =>\n ({\n dictionary,\n status: 'ADDED',\n }) as eventListener.SendDictionaryUpdateArg\n ),\n ...updatedDictionariesResult.map(\n (dictionary) =>\n ({\n dictionary,\n status: 'UPDATED',\n }) as eventListener.SendDictionaryUpdateArg\n ),\n ]);\n\n res.json(responseData);\n return;\n } catch (error) {\n ErrorHandler.handleAppErrorResponse(res, error as AppError);\n return;\n }\n};\n\nexport type UpdateDictionaryParam = { dictionaryId: string };\nexport type UpdateDictionaryBody = Partial<Dictionary>;\nexport type UpdateDictionaryResult = ResponseData<DictionaryAPI>;\n\n/**\n * Updates an existing dictionary in the database.\n */\nexport const updateDictionary = async (\n req: Request<UpdateDictionaryParam, any, UpdateDictionaryBody>,\n res: ResponseWithSession<UpdateDictionaryResult>,\n _next: NextFunction\n): Promise<void> => {\n const { dictionaryId } = req.params;\n const { project, roles } = res.locals;\n const dictionaryData = req.body;\n\n if (!dictionaryData) {\n ErrorHandler.handleGenericErrorResponse(res, 'DICTIONARY_DATA_NOT_FOUND');\n return;\n }\n\n if (!project) {\n ErrorHandler.handleGenericErrorResponse(res, 'PROJECT_NOT_DEFINED');\n return;\n }\n\n if (!dictionaryData.projectIds?.includes(String(project.id))) {\n ErrorHandler.handleGenericErrorResponse(res, 'DICTIONARY_PROJECT_MISMATCH');\n return;\n }\n\n if (typeof dictionaryId === 'undefined') {\n ErrorHandler.handleGenericErrorResponse(res, 'DICTIONARY_ID_NOT_FOUND');\n return;\n }\n\n if (!hasPermission(roles, 'dictionary:write')(res.locals)) {\n ErrorHandler.handleGenericErrorResponse(res, 'PERMISSION_DENIED');\n return;\n }\n\n try {\n const updatedDictionary = await dictionaryService.updateDictionaryById(\n dictionaryId,\n dictionaryData\n );\n\n const apiResult = mapDictionaryToAPI(updatedDictionary);\n\n const responseData = formatResponse<DictionaryAPI>({\n message: t({\n en: 'Dictionary updated successfully',\n fr: 'Dictionnaire mis à jour avec succès',\n es: 'Diccionario actualizado con éxito',\n }),\n description: t({\n en: 'Your dictionary has been updated successfully',\n fr: 'Votre dictionnaire a été mis à jour avec succès',\n es: 'Su diccionario ha sido actualizado con éxito',\n }),\n data: apiResult,\n });\n\n eventListener.sendDictionaryUpdate([\n {\n dictionary: apiResult,\n status: 'UPDATED',\n },\n ]);\n\n res.json(responseData);\n return;\n } catch (error) {\n ErrorHandler.handleAppErrorResponse(res, error as AppError);\n return;\n }\n};\n\nexport type DeleteDictionaryParam = { dictionaryId: string };\nexport type DeleteDictionaryResult = ResponseData<DictionaryAPI>;\n\n/**\n * Deletes a dictionary from the database by its ID.\n */\nexport const deleteDictionary = async (\n req: Request<DeleteDictionaryParam>,\n res: ResponseWithSession<DeleteDictionaryResult>,\n _next: NextFunction\n): Promise<void> => {\n const { project, roles } = res.locals;\n const { dictionaryId } = req.params as Partial<DeleteDictionaryParam>;\n\n if (!dictionaryId) {\n ErrorHandler.handleGenericErrorResponse(res, 'DICTIONARY_ID_NOT_FOUND');\n return;\n }\n\n if (!project) {\n ErrorHandler.handleGenericErrorResponse(res, 'PROJECT_NOT_DEFINED');\n return;\n }\n\n if (!hasPermission(roles, 'dictionary:admin')(res.locals)) {\n ErrorHandler.handleGenericErrorResponse(res, 'PERMISSION_DENIED');\n return;\n }\n\n try {\n const dictionaryToDelete =\n await dictionaryService.getDictionaryById(dictionaryId);\n\n if (!dictionaryToDelete.projectIds.includes(project.id)) {\n ErrorHandler.handleGenericErrorResponse(\n res,\n 'DICTIONARY_PROJECT_MISMATCH'\n );\n return;\n }\n\n const deletedDictionary =\n await dictionaryService.deleteDictionaryById(dictionaryId);\n\n if (!deletedDictionary) {\n ErrorHandler.handleGenericErrorResponse(res, 'DICTIONARY_NOT_FOUND', {\n dictionaryId,\n });\n return;\n }\n\n logger.info(`Dictionary deleted: ${String(deletedDictionary.id)}`);\n\n const apiResult = mapDictionaryToAPI(deletedDictionary);\n\n const responseData = formatResponse<DictionaryAPI>({\n message: t({\n en: 'Dictionary deleted successfully',\n fr: 'Dictionnaire supprimé avec succès',\n es: 'Diccionario eliminado con éxito',\n }),\n description: t({\n en: 'Your dictionary has been deleted successfully',\n fr: 'Votre dictionnaire a été supprimé avec succès',\n es: 'Su diccionario ha sido eliminado con éxito',\n }),\n data: apiResult,\n });\n\n res.json(responseData);\n\n eventListener.sendDictionaryUpdate([\n {\n dictionary: apiResult,\n status: 'DELETED',\n },\n ]);\n\n return;\n } catch (error) {\n ErrorHandler.handleAppErrorResponse(res, error as AppError);\n return;\n }\n};\n"],"mappings":";;;;;;;;;;;;;AAwCA,MAAM,k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AM,YAAY,mBAAmB,kBAAkB;EAEvD,MAAM,eAAe,eAA8B;GACjD,SAAS,EAAE;IACT,IAAI;IACJ,IAAI;IACJ,IAAI;IACL,CAAC;GACF,aAAa,EAAE;IACb,IAAI;IACJ,IAAI;IACJ,IAAI;IACL,CAAC;GACF,MAAM;GACP,CAAC;AAEF,MAAI,KAAK,aAAa;AAEtB,uBAAmC,CACjC;GACE,YAAY;GACZ,QAAQ;GACT,CACF,CAAC;AAEF;UACO,OAAO;AACd,eAAa,uBAAuB,KAAK,MAAkB;AAC3D"}
@@ -32,10 +32,7 @@ const organizationSchema = new Schema({
32
32
  type: Boolean,
33
33
  default: false
34
34
  },
35
- domain: {
36
- type: String,
37
- required: true
38
- }
35
+ domain: { type: String }
39
36
  }, {
40
37
  timestamps: true,
41
38
  toJSON: {
@@ -1 +1 @@
1
- {"version":3,"file":"organization.schema.mjs","names":[],"sources":["../../../src/schemas/organization.schema.ts"],"sourcesContent":["import {\n MEMBERS_MIN_LENGTH,\n NAME_MAX_LENGTH,\n NAME_MIN_LENGTH,\n} from '@utils/validation/validateOrganization';\nimport { Schema } from 'mongoose';\nimport type { OrganizationSchema } from '@/types/organization.types';\nimport { planSchema } from './plans.schema';\n\nexport const organizationSchema = new Schema<OrganizationSchema>(\n {\n name: {\n type: String,\n required: true,\n minlength: NAME_MIN_LENGTH,\n maxlength: NAME_MAX_LENGTH,\n },\n membersIds: {\n type: [Schema.Types.ObjectId],\n ref: 'User',\n required: true,\n minlength: MEMBERS_MIN_LENGTH,\n },\n adminsIds: {\n type: [Schema.Types.ObjectId],\n ref: 'User',\n required: true,\n minlength: MEMBERS_MIN_LENGTH,\n },\n creatorId: {\n type: Schema.Types.ObjectId,\n ref: 'User',\n required: true,\n },\n plan: {\n type: planSchema,\n },\n ssoEnabled: {\n type: Boolean,\n default: false,\n },\n domain: {\n type: String,\n required: true,\n },\n },\n {\n timestamps: true,\n\n toJSON: {\n virtuals: true, // keep the automatic `id` getter\n versionKey: false, // drop __v\n transform(_doc, ret: any) {\n const { _id, ...rest } = ret;\n return {\n ...rest,\n id: _id.toString(),\n };\n },\n },\n toObject: {\n virtuals: true,\n transform(_doc, ret: any) {\n const { _id, ...rest } = ret;\n return {\n ...rest,\n id: _id,\n };\n },\n },\n }\n);\n\n// Add virtual field for id\norganizationSchema.virtual('id').get(function () {\n return this._id.toString();\n});\n"],"mappings":";;;;;AASA,MAAa,qBAAqB,IAAI,OACpC;CACE,MAAM;EACJ,MAAM;EACN,UAAU;EACV,WAAW;EACX,WAAW;EACZ;CACD,YAAY;EACV,MAAM,CAAC,OAAO,MAAM,SAAS;EAC7B,KAAK;EACL,UAAU;EACV,WAAW;EACZ;CACD,WAAW;EACT,MAAM,CAAC,OAAO,MAAM,SAAS;EAC7B,KAAK;EACL,UAAU;EACV,WAAW;EACZ;CACD,WAAW;EACT,MAAM,OAAO,MAAM;EACnB,KAAK;EACL,UAAU;EACX;CACD,MAAM,EACJ,MAAM,YACP;CACD,YAAY;EACV,MAAM;EACN,SAAS;EACV;CACD,QAAQ;EACN,MAAM;EACN,UAAU;EACX;CACF,EACD;CACE,YAAY;CAEZ,QAAQ;EACN,UAAU;EACV,YAAY;EACZ,UAAU,MAAM,KAAU;GACxB,MAAM,EAAE,KAAK,GAAG,SAAS;AACzB,UAAO;IACL,GAAG;IACH,IAAI,IAAI,UAAU;IACnB;;EAEJ;CACD,UAAU;EACR,UAAU;EACV,UAAU,MAAM,KAAU;GACxB,MAAM,EAAE,KAAK,GAAG,SAAS;AACzB,UAAO;IACL,GAAG;IACH,IAAI;IACL;;EAEJ;CACF,CACF;AAGD,mBAAmB,QAAQ,KAAK,CAAC,IAAI,WAAY;AAC/C,QAAO,KAAK,IAAI,UAAU;EAC1B"}
1
+ {"version":3,"file":"organization.schema.mjs","names":[],"sources":["../../../src/schemas/organization.schema.ts"],"sourcesContent":["import {\n MEMBERS_MIN_LENGTH,\n NAME_MAX_LENGTH,\n NAME_MIN_LENGTH,\n} from '@utils/validation/validateOrganization';\nimport { Schema } from 'mongoose';\nimport type { OrganizationSchema } from '@/types/organization.types';\nimport { planSchema } from './plans.schema';\n\nexport const organizationSchema = new Schema<OrganizationSchema>(\n {\n name: {\n type: String,\n required: true,\n minlength: NAME_MIN_LENGTH,\n maxlength: NAME_MAX_LENGTH,\n },\n membersIds: {\n type: [Schema.Types.ObjectId],\n ref: 'User',\n required: true,\n minlength: MEMBERS_MIN_LENGTH,\n },\n adminsIds: {\n type: [Schema.Types.ObjectId],\n ref: 'User',\n required: true,\n minlength: MEMBERS_MIN_LENGTH,\n },\n creatorId: {\n type: Schema.Types.ObjectId,\n ref: 'User',\n required: true,\n },\n plan: {\n type: planSchema,\n },\n ssoEnabled: {\n type: Boolean,\n default: false,\n },\n domain: {\n type: String,\n },\n },\n {\n timestamps: true,\n\n toJSON: {\n virtuals: true, // keep the automatic `id` getter\n versionKey: false, // drop __v\n transform(_doc, ret: any) {\n const { _id, ...rest } = ret;\n return {\n ...rest,\n id: _id.toString(),\n };\n },\n },\n toObject: {\n virtuals: true,\n transform(_doc, ret: any) {\n const { _id, ...rest } = ret;\n return {\n ...rest,\n id: _id,\n };\n },\n },\n }\n);\n\n// Add virtual field for id\norganizationSchema.virtual('id').get(function () {\n return this._id.toString();\n});\n"],"mappings":";;;;;AASA,MAAa,qBAAqB,IAAI,OACpC;CACE,MAAM;EACJ,MAAM;EACN,UAAU;EACV,WAAW;EACX,WAAW;EACZ;CACD,YAAY;EACV,MAAM,CAAC,OAAO,MAAM,SAAS;EAC7B,KAAK;EACL,UAAU;EACV,WAAW;EACZ;CACD,WAAW;EACT,MAAM,CAAC,OAAO,MAAM,SAAS;EAC7B,KAAK;EACL,UAAU;EACV,WAAW;EACZ;CACD,WAAW;EACT,MAAM,OAAO,MAAM;EACnB,KAAK;EACL,UAAU;EACX;CACD,MAAM,EACJ,MAAM,YACP;CACD,YAAY;EACV,MAAM;EACN,SAAS;EACV;CACD,QAAQ,EACN,MAAM,QACP;CACF,EACD;CACE,YAAY;CAEZ,QAAQ;EACN,UAAU;EACV,YAAY;EACZ,UAAU,MAAM,KAAU;GACxB,MAAM,EAAE,KAAK,GAAG,SAAS;AACzB,UAAO;IACL,GAAG;IACH,IAAI,IAAI,UAAU;IACnB;;EAEJ;CACD,UAAU;EACR,UAAU;EACV,UAAU,MAAM,KAAU;GACxB,MAAM,EAAE,KAAK,GAAG,SAAS;AACzB,UAAO;IACL,GAAG;IACH,IAAI;IACL;;EAEJ;CACF,CACF;AAGD,mBAAmB,QAAQ,KAAK,CAAC,IAAI,WAAY;AAC/C,QAAO,KAAK,IAAI,UAAU;EAC1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"dictionary.controller.d.ts","names":[],"sources":["../../../src/controllers/dictionary.controller.ts"],"sourcesContent":[],"mappings":";;;;;;;;;KAoCY,qBAAA,GACV,qBAAqB;KACX,qBAAA,GAAwB,kBAAkB;AAFtD;AAEA;AAuBA;AACe,cADF,eACE,EAAA,CAAA,GAAA,EAAR,OAAQ,CAAA,qBAAA,CAAA,EAAA,GAAA,EACR,mBADQ,CACY,qBADZ,CAAA,EAAA,KAAA,EAEN,YAFM,EAAA,GAGZ,OAHY,CAAA,IAAA,CAAA;AAAR,KA8DK,yBAAA,GAA4B,YA9DjC,CAAA,MAAA,EAAA,CAAA;;;;AAGJ,cAgEU,mBAhEV,EAAA,CAAA,IAAA,EAiEK,OAjEL,EAAA,GAAA,EAkEI,mBAlEJ,CAkEwB,yBAlExB,CAAA,EAAA,KAAA,EAmEM,YAnEN,EAAA,GAmEkB,OAnElB,CAAA,IAAA,CAAA;AAAO,KA4GE,oCAAA,GAAuC,YA5GzC,CA6GR,MA7GQ,CA6GD,YA7GC,EAAA;EA2DE,GAAA,EAAA,MAAA;EAKC,SAAA,EAAA,MAAA;CACL,CAAA,CAAA;;;;AAEa,cAgDR,8BAhDQ,EAAA,CAAA,IAAA,EAiDb,OAjDa,EAAA,GAAA,EAkDd,mBAlDc,CAkDM,oCAlDN,CAAA,EAAA,KAAA,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,SAAA;IAgFE,GAAA,EAAA,MAAA;IAGP,OAAA,EAcQ,iBAdkB,GAAA,SAAA;IAGlB,OAAA,EAAA,MAAA;EAKA,CAAA,EAAA;CAMA;AAAiB,KAIlB,sBAAA,GAAyB,YAJP,CAIoB,0BAJpB,CAAA;AAI9B;AAQA;;;;;AAGS,cAHI,gBAGJ,EAAA,CAAA,GAAA,EAFF,OAEE,CAAA,GAAA,EAAA,GAAA,EAFgB,oBAEhB,CAAA,EAAA,GAAA,EADF,mBACE,CADkB,sBAClB,CAAA,EAAA,KAAA,EAAA,YAAA,EAAA,GACN,OADM,CAAA,IAAA,CAAA;AACN,KA4LS,qBAAA,GA5LT;EAAO,YAAA,EAAA,MAAA;AA4LV,CAAA;AACY,KAAA,oBAAA,GAAuB,OAAQ,CAAA,YAAR,CAAA;AACvB,KAAA,sBAAA,GAAyB,YAAa,CAAA,aAAb,CAAA;AAKrC;;;AACO,cADM,gBACN,EAAA,CAAA,GAAA,EAAA,OAAA,CAAQ,qBAAR,EAAA,GAAA,EAAoC,oBAApC,CAAA,EAAA,GAAA,EACA,mBADA,CACoB,sBADpB,CAAA,EAAA,KAAA,EAEE,YAFF,EAAA,GAGJ,OAHI,CAAA,IAAA,CAAA;AACoB,KAqEf,qBAAA,GArEe;EAApB,YAAA,EAAA,MAAA;CACE;AACN,KAoES,sBAAA,GAAyB,YApElC,CAoE+C,aApE/C,CAAA;;AAmEH;AACA;AAKa,cAAA,gBA6EZ,EAAA,CAAA,GAAA,EA5EM,OA4EN,CA5Ec,qBA4Ed,CAAA,EAAA,GAAA,EA3EM,mBA2EN,CA3E0B,sBA2E1B,CAAA,EAAA,KAAA,EA1EQ,YA0ER,EAAA,GAzEE,OAyEF,CAAA,IAAA,CAAA"}
1
+ {"version":3,"file":"dictionary.controller.d.ts","names":[],"sources":["../../../src/controllers/dictionary.controller.ts"],"sourcesContent":[],"mappings":";;;;;;;;;KAoCY,qBAAA,GACV,qBAAqB;KACX,qBAAA,GAAwB,kBAA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AAA,GAAA,EAAA,GAAA,EA+De,UA/Df,CAAA,EAAA,GAAA,EAgEH,mBAhEG,CAgEiB,YAhEjB,CAAA,EAAA,KAAA,EAiED,YAjEC,EAAA,GAkEP,OAlEO,CAAA,IAAA,CAAA;AAwDE,KAgFA,eAAA,GAhFa;EACb,KAAA,EAAA,MAAA,GA+EoC,GA/ExB,CAAA,IAAA,CAAA;AAKxB,CAAA;AACyB,KA0Eb,aAAA,GAAgB,OA1EH,CA0EW,OA1EX,CAAA;AAAlB,KA2EK,eAAA,GAAkB,YA3EvB,CA2EoC,MA3EpC,CAAA;;;;AAGJ,cA6EU,SA7EV,EAAA,CAAA,GAAA,EA8EI,OA9EJ,CA8EY,eA9EZ,EAAA,GAAA,EA8EkC,aA9ElC,CAAA,EAAA,GAAA,EA+EI,mBA/EJ,CA+EwB,eA/ExB,CAAA,EAAA,KAAA,EAgFM,YAhFN,EAAA,GAiFA,OAjFA,CAAA,IAAA,CAAA;AAAO,KAsJE,eAAA,GAtJF;EAsEE,KAAA,EAAA,MAAA,GAgFoC,GAhFrB,CAAA,IAAA,CAAA;AAC3B,CAAA;AACY,KA+EA,eAAA,GAAkB,YA/EA,CA+Ea,MA/Eb,CAAA;AAK9B;;;;;;AAGS,cA+EI,SA/EJ,EAAA,CAAA,GAAA,EAgFF,OAhFE,CAgFM,eAhFN,CAAA,EAAA,GAAA,EAiFF,mBAjFE,CAiFkB,eAjFlB,CAAA,EAAA,KAAA,EAkFA,YAlFA,EAAA,GAmFN,OAnFM,CAAA,IAAA,CAAA"}
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime2 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime20 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/emails/MagicLinkEmail.d.ts
4
4
  type MagicLinkEmailProps = {
@@ -9,21 +9,21 @@ declare const MagicLinkEmailEN: {
9
9
  ({
10
10
  username,
11
11
  magicLink
12
- }: MagicLinkEmailProps): react_jsx_runtime2.JSX.Element;
12
+ }: MagicLinkEmailProps): react_jsx_runtime20.JSX.Element;
13
13
  PreviewProps: MagicLinkEmailProps;
14
14
  };
15
15
  declare const MagicLinkEmailFR: {
16
16
  ({
17
17
  username,
18
18
  magicLink
19
- }: MagicLinkEmailProps): react_jsx_runtime2.JSX.Element;
19
+ }: MagicLinkEmailProps): react_jsx_runtime20.JSX.Element;
20
20
  PreviewProps: MagicLinkEmailProps;
21
21
  };
22
22
  declare const MagicLinkEmailES: {
23
23
  ({
24
24
  username,
25
25
  magicLink
26
- }: MagicLinkEmailProps): react_jsx_runtime2.JSX.Element;
26
+ }: MagicLinkEmailProps): react_jsx_runtime20.JSX.Element;
27
27
  PreviewProps: MagicLinkEmailProps;
28
28
  };
29
29
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"MagicLinkEmail.d.ts","names":[],"sources":["../../../src/emails/MagicLinkEmail.tsx"],"sourcesContent":[],"mappings":";;;KAgBY,mBAAA;;;AAAZ,CAAA;AAKa,cAAA,gBAgEZ,EAAA;;;;KA7DE,sBAAmB,kBAAA,CAAA,GAAA,CAAA;;CAAnB;AAAmB,cA+DT,gBA/DS,EAAA;;;;KAkEnB,sBAAmB,kBAAA,CAAA,GAAA,CAAA;;AAHtB,CAAA;cAiEa;;;;KAGV,sBAAmB,kBAAA,CAAA,GAAA,CAAA;EAjEnB,YAAA,qBAAA;CAAmB"}
1
+ {"version":3,"file":"MagicLinkEmail.d.ts","names":[],"sources":["../../../src/emails/MagicLinkEmail.tsx"],"sourcesContent":[],"mappings":";;;KAgBY,mBAAA;;;AAAZ,CAAA;AAKa,cAAA,gBAgEZ,EAAA;;;;KA7DE,sBAAmB,mBAAA,CAAA,GAAA,CAAA;;CAAnB;AAAmB,cA+DT,gBA/DS,EAAA;;;;KAkEnB,sBAAmB,mBAAA,CAAA,GAAA,CAAA;;AAHtB,CAAA;cAiEa;;;;KAGV,sBAAmB,mBAAA,CAAA,GAAA,CAAA;EAjEnB,YAAA,qBAAA;CAAmB"}
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime5 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime17 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/emails/OAuthTokenCreatedEmail.d.ts
4
4
  type OAuthTokenCreatedEmailProps = {
@@ -17,7 +17,7 @@ declare const OAuthTokenCreatedEmailEN: {
17
17
  tokenDetailsUrl,
18
18
  securityLogUrl,
19
19
  supportUrl
20
- }: OAuthTokenCreatedEmailProps): react_jsx_runtime5.JSX.Element;
20
+ }: OAuthTokenCreatedEmailProps): react_jsx_runtime17.JSX.Element;
21
21
  PreviewProps: OAuthTokenCreatedEmailProps;
22
22
  };
23
23
  declare const OAuthTokenCreatedEmailFR: {
@@ -28,7 +28,7 @@ declare const OAuthTokenCreatedEmailFR: {
28
28
  tokenDetailsUrl,
29
29
  securityLogUrl,
30
30
  supportUrl
31
- }: OAuthTokenCreatedEmailProps): react_jsx_runtime5.JSX.Element;
31
+ }: OAuthTokenCreatedEmailProps): react_jsx_runtime17.JSX.Element;
32
32
  PreviewProps: OAuthTokenCreatedEmailProps;
33
33
  };
34
34
  declare const OAuthTokenCreatedEmailES: {
@@ -39,7 +39,7 @@ declare const OAuthTokenCreatedEmailES: {
39
39
  tokenDetailsUrl,
40
40
  securityLogUrl,
41
41
  supportUrl
42
- }: OAuthTokenCreatedEmailProps): react_jsx_runtime5.JSX.Element;
42
+ }: OAuthTokenCreatedEmailProps): react_jsx_runtime17.JSX.Element;
43
43
  PreviewProps: OAuthTokenCreatedEmailProps;
44
44
  };
45
45
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"OAuthTokenCreatedEmail.d.ts","names":[],"sources":["../../../src/emails/OAuthTokenCreatedEmail.tsx"],"sourcesContent":[],"mappings":";;;KAgBY,2BAAA;;;EAAA,MAAA,EAAA,MAAA,EAAA;EASC,eAAA,EAAA,MAAA;;;;cAAA;;;;;;;;KAOV,8BAA2B,kBAAA,CAAA,GAAA,CAAA;;CAA3B;AAA2B,cA2EjB,wBA3EiB,EAAA;;;;;;;;KAkF3B,8BAA2B,kBAAA,CAAA,GAAA,CAAA;;AAP9B,CAAA;cA+Ea;;;;;;;;KAOV,8BAA2B,kBAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"OAuthTokenCreatedEmail.d.ts","names":[],"sources":["../../../src/emails/OAuthTokenCreatedEmail.tsx"],"sourcesContent":[],"mappings":";;;KAgBY,2BAAA;;;EAAA,MAAA,EAAA,MAAA,EAAA;EASC,eAAA,EAAA,MAAA;;;;cAAA;;;;;;;;KAOV,8BAA2B,mBAAA,CAAA,GAAA,CAAA;;CAA3B;AAA2B,cA2EjB,wBA3EiB,EAAA;;;;;;;;KAkF3B,8BAA2B,mBAAA,CAAA,GAAA,CAAA;;AAP9B,CAAA;cA+Ea;;;;;;;;KAOV,8BAA2B,mBAAA,CAAA,GAAA,CAAA"}
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime26 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime5 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/emails/PasswordChangeConfirmation.d.ts
4
4
  type PasswordChangeConfirmationEmailProps = {
@@ -7,19 +7,19 @@ type PasswordChangeConfirmationEmailProps = {
7
7
  declare const PasswordChangeConfirmationEmailEN: {
8
8
  ({
9
9
  username
10
- }: PasswordChangeConfirmationEmailProps): react_jsx_runtime26.JSX.Element;
10
+ }: PasswordChangeConfirmationEmailProps): react_jsx_runtime5.JSX.Element;
11
11
  PreviewProps: PasswordChangeConfirmationEmailProps;
12
12
  };
13
13
  declare const PasswordChangeConfirmationEmailFR: {
14
14
  ({
15
15
  username
16
- }: PasswordChangeConfirmationEmailProps): react_jsx_runtime26.JSX.Element;
16
+ }: PasswordChangeConfirmationEmailProps): react_jsx_runtime5.JSX.Element;
17
17
  PreviewProps: PasswordChangeConfirmationEmailProps;
18
18
  };
19
19
  declare const PasswordChangeConfirmationEmailES: {
20
20
  ({
21
21
  username
22
- }: PasswordChangeConfirmationEmailProps): react_jsx_runtime26.JSX.Element;
22
+ }: PasswordChangeConfirmationEmailProps): react_jsx_runtime5.JSX.Element;
23
23
  PreviewProps: PasswordChangeConfirmationEmailProps;
24
24
  };
25
25
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"PasswordChangeConfirmation.d.ts","names":[],"sources":["../../../src/emails/PasswordChangeConfirmation.tsx"],"sourcesContent":[],"mappings":";;;KAcY,oCAAA;;;AAAA,cAIC,iCAJmC,EAAA;EAInC,CAAA;IAAA;EA8CZ,CA9CY,EAEV,oCA4CF,CAAA,EA5CsC,mBAAA,CAAA,GAAA,CAAA,OA4CtC;;CA5CE;AAAoC,cA8C1B,iCA9C0B,EAAA;;;KAgDpC,uCAAoC,mBAAA,CAAA,GAAA,CAAA;;AAFvC,CAAA;cAiDa;EA/CV,CAAA;IAAA;EAAA,CAAA,EAiDA,oCAjDA,CAAA,EAiDoC,mBAAA,CAAA,GAAA,CAAA,OAjDpC;EAAoC,YAAA,sCAAA"}
1
+ {"version":3,"file":"PasswordChangeConfirmation.d.ts","names":[],"sources":["../../../src/emails/PasswordChangeConfirmation.tsx"],"sourcesContent":[],"mappings":";;;KAcY,oCAAA;;;AAAA,cAIC,iCAJmC,EAAA;EAInC,CAAA;IAAA;EA8CZ,CA9CY,EAEV,oCA4CF,CAAA,EA5CsC,kBAAA,CAAA,GAAA,CAAA,OA4CtC;;CA5CE;AAAoC,cA8C1B,iCA9C0B,EAAA;;;KAgDpC,uCAAoC,kBAAA,CAAA,GAAA,CAAA;;AAFvC,CAAA;cAiDa;EA/CV,CAAA;IAAA;EAAA,CAAA,EAiDA,oCAjDA,CAAA,EAiDoC,kBAAA,CAAA,GAAA,CAAA,OAjDpC;EAAoC,YAAA,sCAAA"}
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime8 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/emails/ResetUserPassword.d.ts
4
4
  type ResetPasswordEmailProps = {
@@ -9,21 +9,21 @@ declare const ResetPasswordEmailEN: {
9
9
  ({
10
10
  username,
11
11
  resetLink
12
- }: ResetPasswordEmailProps): react_jsx_runtime8.JSX.Element;
12
+ }: ResetPasswordEmailProps): react_jsx_runtime2.JSX.Element;
13
13
  PreviewProps: ResetPasswordEmailProps;
14
14
  };
15
15
  declare const ResetPasswordEmailFR: {
16
16
  ({
17
17
  username,
18
18
  resetLink
19
- }: ResetPasswordEmailProps): react_jsx_runtime8.JSX.Element;
19
+ }: ResetPasswordEmailProps): react_jsx_runtime2.JSX.Element;
20
20
  PreviewProps: ResetPasswordEmailProps;
21
21
  };
22
22
  declare const ResetPasswordEmailES: {
23
23
  ({
24
24
  username,
25
25
  resetLink
26
- }: ResetPasswordEmailProps): react_jsx_runtime8.JSX.Element;
26
+ }: ResetPasswordEmailProps): react_jsx_runtime2.JSX.Element;
27
27
  PreviewProps: ResetPasswordEmailProps;
28
28
  };
29
29
  //#endregion
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime11 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime23 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/emails/SubscriptionPaymentCancellation.d.ts
4
4
  type SubscriptionPaymentCancellationProps = {
@@ -16,7 +16,7 @@ declare const SubscriptionPaymentCancellationEN: {
16
16
  organizationName,
17
17
  cancellationDate,
18
18
  reactivateLink
19
- }: SubscriptionPaymentCancellationProps): react_jsx_runtime11.JSX.Element;
19
+ }: SubscriptionPaymentCancellationProps): react_jsx_runtime23.JSX.Element;
20
20
  PreviewProps: SubscriptionPaymentCancellationProps;
21
21
  };
22
22
  declare const SubscriptionPaymentCancellationFR: {
@@ -26,7 +26,7 @@ declare const SubscriptionPaymentCancellationFR: {
26
26
  organizationName,
27
27
  cancellationDate,
28
28
  reactivateLink
29
- }: SubscriptionPaymentCancellationProps): react_jsx_runtime11.JSX.Element;
29
+ }: SubscriptionPaymentCancellationProps): react_jsx_runtime23.JSX.Element;
30
30
  PreviewProps: SubscriptionPaymentCancellationProps;
31
31
  };
32
32
  declare const SubscriptionPaymentCancellationES: {
@@ -36,7 +36,7 @@ declare const SubscriptionPaymentCancellationES: {
36
36
  organizationName,
37
37
  cancellationDate,
38
38
  reactivateLink
39
- }: SubscriptionPaymentCancellationProps): react_jsx_runtime11.JSX.Element;
39
+ }: SubscriptionPaymentCancellationProps): react_jsx_runtime23.JSX.Element;
40
40
  PreviewProps: SubscriptionPaymentCancellationProps;
41
41
  };
42
42
  //#endregion
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime14 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime11 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/emails/SubscriptionPaymentError.d.ts
4
4
  type SubscriptionPaymentErrorProps = {
@@ -16,7 +16,7 @@ declare const SubscriptionPaymentErrorEN: {
16
16
  organizationName,
17
17
  errorDate,
18
18
  retryPaymentLink
19
- }: SubscriptionPaymentErrorProps): react_jsx_runtime14.JSX.Element;
19
+ }: SubscriptionPaymentErrorProps): react_jsx_runtime11.JSX.Element;
20
20
  PreviewProps: SubscriptionPaymentErrorProps;
21
21
  };
22
22
  declare const SubscriptionPaymentErrorFR: {
@@ -26,7 +26,7 @@ declare const SubscriptionPaymentErrorFR: {
26
26
  organizationName,
27
27
  errorDate,
28
28
  retryPaymentLink
29
- }: SubscriptionPaymentErrorProps): react_jsx_runtime14.JSX.Element;
29
+ }: SubscriptionPaymentErrorProps): react_jsx_runtime11.JSX.Element;
30
30
  PreviewProps: SubscriptionPaymentErrorProps;
31
31
  };
32
32
  declare const SubscriptionPaymentErrorES: {
@@ -36,7 +36,7 @@ declare const SubscriptionPaymentErrorES: {
36
36
  organizationName,
37
37
  errorDate,
38
38
  retryPaymentLink
39
- }: SubscriptionPaymentErrorProps): react_jsx_runtime14.JSX.Element;
39
+ }: SubscriptionPaymentErrorProps): react_jsx_runtime11.JSX.Element;
40
40
  PreviewProps: SubscriptionPaymentErrorProps;
41
41
  };
42
42
  //#endregion
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime17 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime8 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/emails/SubscriptionPaymentSuccess.d.ts
4
4
  type SubscriptionPaymentSuccessProps = {
@@ -16,7 +16,7 @@ declare const SubscriptionPaymentSuccessEN: {
16
16
  organizationName,
17
17
  subscriptionStartDate,
18
18
  manageSubscriptionLink
19
- }: SubscriptionPaymentSuccessProps): react_jsx_runtime17.JSX.Element;
19
+ }: SubscriptionPaymentSuccessProps): react_jsx_runtime8.JSX.Element;
20
20
  PreviewProps: SubscriptionPaymentSuccessProps;
21
21
  };
22
22
  declare const SubscriptionPaymentSuccessFR: {
@@ -26,7 +26,7 @@ declare const SubscriptionPaymentSuccessFR: {
26
26
  organizationName,
27
27
  subscriptionStartDate,
28
28
  manageSubscriptionLink
29
- }: SubscriptionPaymentSuccessProps): react_jsx_runtime17.JSX.Element;
29
+ }: SubscriptionPaymentSuccessProps): react_jsx_runtime8.JSX.Element;
30
30
  PreviewProps: SubscriptionPaymentSuccessProps;
31
31
  };
32
32
  declare const SubscriptionPaymentSuccessES: {
@@ -36,7 +36,7 @@ declare const SubscriptionPaymentSuccessES: {
36
36
  organizationName,
37
37
  subscriptionStartDate,
38
38
  manageSubscriptionLink
39
- }: SubscriptionPaymentSuccessProps): react_jsx_runtime17.JSX.Element;
39
+ }: SubscriptionPaymentSuccessProps): react_jsx_runtime8.JSX.Element;
40
40
  PreviewProps: SubscriptionPaymentSuccessProps;
41
41
  };
42
42
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"SubscriptionPaymentSuccess.d.ts","names":[],"sources":["../../../src/emails/SubscriptionPaymentSuccess.tsx"],"sourcesContent":[],"mappings":";;;KAcY,+BAAA;;;EAAA,QAAA,EAAA,MAAA;EASC,gBAAA,EAAA,MAAA;;;;cAAA;;;;;;;KAMV,kCAA+B,mBAAA,CAAA,GAAA,CAAA;EAA/B,YAAA,iCAAA;CAA+B;cAkDrB;;;;;;;KAMV,kCAA+B,mBAAA,CAAA,GAAA,CAAA;EANrB,YAAA,iCAsDZ;;cAEY;;;;;;;KAMV,kCAA+B,mBAAA,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"SubscriptionPaymentSuccess.d.ts","names":[],"sources":["../../../src/emails/SubscriptionPaymentSuccess.tsx"],"sourcesContent":[],"mappings":";;;KAcY,+BAAA;;;EAAA,QAAA,EAAA,MAAA;EASC,gBAAA,EAAA,MAAA;;;;cAAA;;;;;;;KAMV,kCAA+B,kBAAA,CAAA,GAAA,CAAA;EAA/B,YAAA,iCAAA;CAA+B;cAkDrB;;;;;;;KAMV,kCAA+B,kBAAA,CAAA,GAAA,CAAA;EANrB,YAAA,iCAsDZ;;cAEY;;;;;;;KAMV,kCAA+B,kBAAA,CAAA,GAAA,CAAA"}
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime23 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime14 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/emails/ValidateUserEmail.d.ts
4
4
  type ValidateUserEmailProps = {
@@ -9,21 +9,21 @@ declare const ValidateUserEmailEN: {
9
9
  ({
10
10
  username,
11
11
  validationLink
12
- }: ValidateUserEmailProps): react_jsx_runtime23.JSX.Element;
12
+ }: ValidateUserEmailProps): react_jsx_runtime14.JSX.Element;
13
13
  PreviewProps: ValidateUserEmailProps;
14
14
  };
15
15
  declare const ValidateUserEmailFR: {
16
16
  ({
17
17
  username,
18
18
  validationLink
19
- }: ValidateUserEmailProps): react_jsx_runtime23.JSX.Element;
19
+ }: ValidateUserEmailProps): react_jsx_runtime14.JSX.Element;
20
20
  PreviewProps: ValidateUserEmailProps;
21
21
  };
22
22
  declare const ValidateUserEmailES: {
23
23
  ({
24
24
  username,
25
25
  validationLink
26
- }: ValidateUserEmailProps): react_jsx_runtime23.JSX.Element;
26
+ }: ValidateUserEmailProps): react_jsx_runtime14.JSX.Element;
27
27
  PreviewProps: ValidateUserEmailProps;
28
28
  };
29
29
  //#endregion
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime20 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime26 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/emails/Welcome.d.ts
4
4
  type WelcomeEmailProps = {
@@ -9,21 +9,21 @@ declare const WelcomeEmailEN: {
9
9
  ({
10
10
  username,
11
11
  loginLink
12
- }: WelcomeEmailProps): react_jsx_runtime20.JSX.Element;
12
+ }: WelcomeEmailProps): react_jsx_runtime26.JSX.Element;
13
13
  PreviewProps: WelcomeEmailProps;
14
14
  };
15
15
  declare const WelcomeEmailFR: {
16
16
  ({
17
17
  username,
18
18
  loginLink
19
- }: WelcomeEmailProps): react_jsx_runtime20.JSX.Element;
19
+ }: WelcomeEmailProps): react_jsx_runtime26.JSX.Element;
20
20
  PreviewProps: WelcomeEmailProps;
21
21
  };
22
22
  declare const WelcomeEmailES: {
23
23
  ({
24
24
  username,
25
25
  loginLink
26
- }: WelcomeEmailProps): react_jsx_runtime20.JSX.Element;
26
+ }: WelcomeEmailProps): react_jsx_runtime26.JSX.Element;
27
27
  PreviewProps: WelcomeEmailProps;
28
28
  };
29
29
  //#endregion
@@ -1,14 +1,14 @@
1
1
  import { Dictionary, DictionaryData } from "../types/dictionary.types.js";
2
- import * as mongoose1 from "mongoose";
2
+ import * as mongoose2 from "mongoose";
3
3
  import { Model } from "mongoose";
4
4
 
5
5
  //#region src/models/dictionary.model.d.ts
6
- declare const DictionaryModel: Model<Dictionary, {}, {}, {}, mongoose1.Document<unknown, {}, Dictionary, {}, {}> & DictionaryData & {
7
- id: mongoose1.Types.ObjectId;
6
+ declare const DictionaryModel: Model<Dictionary, {}, {}, {}, mongoose2.Document<unknown, {}, Dictionary, {}, {}> & DictionaryData & {
7
+ id: mongoose2.Types.ObjectId;
8
8
  createdAt: number;
9
9
  updatedAt: number;
10
10
  } & {
11
- _id: mongoose1.Types.ObjectId;
11
+ _id: mongoose2.Types.ObjectId;
12
12
  } & {
13
13
  __v: number;
14
14
  }, any>;
@@ -1,9 +1,9 @@
1
1
  import { Discussion } from "../types/discussion.types.js";
2
- import * as mongoose4 from "mongoose";
2
+ import * as mongoose0 from "mongoose";
3
3
  import { Model } from "mongoose";
4
4
 
5
5
  //#region src/models/discussion.model.d.ts
6
- declare const DiscussionModel: Model<Discussion, {}, {}, {}, mongoose4.Document<unknown, {}, Discussion, {}, {}> & Discussion & Required<{
6
+ declare const DiscussionModel: Model<Discussion, {}, {}, {}, mongoose0.Document<unknown, {}, Discussion, {}, {}> & Discussion & Required<{
7
7
  _id: unknown;
8
8
  }> & {
9
9
  __v: number;
@@ -1,16 +1,16 @@
1
1
  import { Dictionary, DictionarySchema } from "../types/dictionary.types.js";
2
- import * as mongoose37 from "mongoose";
2
+ import * as mongoose5 from "mongoose";
3
3
  import { Schema } from "mongoose";
4
4
 
5
5
  //#region src/schemas/dictionary.schema.d.ts
6
- declare const dictionarySchema: Schema<DictionarySchema, mongoose37.Model<DictionarySchema, any, any, any, mongoose37.Document<unknown, any, DictionarySchema, any, {}> & Omit<Dictionary, "id"> & {
7
- _id: mongoose37.Types.ObjectId;
6
+ declare const dictionarySchema: Schema<DictionarySchema, mongoose5.Model<DictionarySchema, any, any, any, mongoose5.Document<unknown, any, DictionarySchema, any, {}> & Omit<Dictionary, "id"> & {
7
+ _id: mongoose5.Types.ObjectId;
8
8
  } & Required<{
9
- _id: mongoose37.Types.ObjectId;
9
+ _id: mongoose5.Types.ObjectId;
10
10
  }> & {
11
11
  __v: number;
12
- }, any>, {}, {}, {}, {}, mongoose37.DefaultSchemaOptions, DictionarySchema, mongoose37.Document<unknown, {}, mongoose37.FlatRecord<DictionarySchema>, {}, mongoose37.ResolveSchemaOptions<mongoose37.DefaultSchemaOptions>> & mongoose37.FlatRecord<DictionarySchema> & Required<{
13
- _id: mongoose37.Types.ObjectId;
12
+ }, any>, {}, {}, {}, {}, mongoose5.DefaultSchemaOptions, DictionarySchema, mongoose5.Document<unknown, {}, mongoose5.FlatRecord<DictionarySchema>, {}, mongoose5.ResolveSchemaOptions<mongoose5.DefaultSchemaOptions>> & mongoose5.FlatRecord<DictionarySchema> & Required<{
13
+ _id: mongoose5.Types.ObjectId;
14
14
  }> & {
15
15
  __v: number;
16
16
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"dictionary.schema.d.ts","names":[],"sources":["../../../src/schemas/dictionary.schema.ts"],"sourcesContent":[],"mappings":";;;;;cAwBa,kBAAgB,OAAA,6BAAA,MAAA,iCAAA,UAAA,CAAA,uBAAA,6BAAA,KAAA,UAAA;;;EAAhB,GAAA,2BA4DZ;CA5D4B,CAAA,GAAA;EAAA,GAAA,EAAA,MAAA;CAAA,EAAA,GAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,UAAA,CAAA,oBAAA,kBAAA,qBAAA,CAAA,OAAA,EAAA,CAAA,CAAA,uBAAA,iBAAA,CAAA,EAAA,CAAA,CAAA,iCAAA,iCAAA,CAAA,wBAAA,iBAAA,CAAA,WAAA,CAAA;EAAA,GAAA,2BAAA;CAAA,CAAA,GAAA;EAAA,GAAA,EAAA,MAAA"}
1
+ {"version":3,"file":"dictionary.schema.d.ts","names":[],"sources":["../../../src/schemas/dictionary.schema.ts"],"sourcesContent":[],"mappings":";;;;;cAwBa,kBAAgB,OAAA,4BAAA,MAAA,iCAAA,SAAA,CAAA,uBAAA,6BAAA,KAAA,UAAA;;;EAAhB,GAAA,0BA4DZ;CA5D4B,CAAA,GAAA;EAAA,GAAA,EAAA,MAAA;CAAA,EAAA,GAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,SAAA,CAAA,oBAAA,kBAAA,oBAAA,CAAA,OAAA,EAAA,CAAA,CAAA,sBAAA,iBAAA,CAAA,EAAA,CAAA,CAAA,gCAAA,gCAAA,CAAA,uBAAA,iBAAA,CAAA,WAAA,CAAA;EAAA,GAAA,0BAAA;CAAA,CAAA,GAAA;EAAA,GAAA,EAAA,MAAA"}
@@ -1,16 +1,16 @@
1
1
  import { Discussion, DiscussionSchema } from "../types/discussion.types.js";
2
- import * as mongoose16 from "mongoose";
2
+ import * as mongoose81 from "mongoose";
3
3
  import { Schema } from "mongoose";
4
4
 
5
5
  //#region src/schemas/discussion.schema.d.ts
6
- declare const discussionSchema: Schema<DiscussionSchema, mongoose16.Model<DiscussionSchema, any, any, any, mongoose16.Document<unknown, any, DiscussionSchema, any, {}> & Omit<Discussion, "id"> & {
7
- _id: mongoose16.Types.ObjectId;
6
+ declare const discussionSchema: Schema<DiscussionSchema, mongoose81.Model<DiscussionSchema, any, any, any, mongoose81.Document<unknown, any, DiscussionSchema, any, {}> & Omit<Discussion, "id"> & {
7
+ _id: mongoose81.Types.ObjectId;
8
8
  } & Required<{
9
- _id: mongoose16.Types.ObjectId;
9
+ _id: mongoose81.Types.ObjectId;
10
10
  }> & {
11
11
  __v: number;
12
- }, any>, {}, {}, {}, {}, mongoose16.DefaultSchemaOptions, DiscussionSchema, mongoose16.Document<unknown, {}, mongoose16.FlatRecord<DiscussionSchema>, {}, mongoose16.ResolveSchemaOptions<mongoose16.DefaultSchemaOptions>> & mongoose16.FlatRecord<DiscussionSchema> & Required<{
13
- _id: mongoose16.Types.ObjectId;
12
+ }, any>, {}, {}, {}, {}, mongoose81.DefaultSchemaOptions, DiscussionSchema, mongoose81.Document<unknown, {}, mongoose81.FlatRecord<DiscussionSchema>, {}, mongoose81.ResolveSchemaOptions<mongoose81.DefaultSchemaOptions>> & mongoose81.FlatRecord<DiscussionSchema> & Required<{
13
+ _id: mongoose81.Types.ObjectId;
14
14
  }> & {
15
15
  __v: number;
16
16
  }>;