@intlayer/backend 5.8.0-canary.0 → 5.8.0
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.
- package/dist/cjs/schemas/organization.schema.cjs.map +1 -1
- package/dist/cjs/schemas/session.schema.cjs.map +1 -1
- package/dist/cjs/services/tag.service.cjs.map +1 -1
- package/dist/cjs/utils/AI/askDocQuestion/embeddings.json +35862 -24576
- package/dist/cjs/utils/errors/ErrorHandler.cjs +3 -3
- package/dist/cjs/utils/errors/ErrorHandler.cjs.map +1 -1
- package/dist/esm/schemas/organization.schema.mjs.map +1 -1
- package/dist/esm/schemas/session.schema.mjs.map +1 -1
- package/dist/esm/services/tag.service.mjs.map +1 -1
- package/dist/esm/utils/AI/askDocQuestion/embeddings.json +35862 -24576
- package/dist/esm/utils/errors/ErrorHandler.mjs +1 -1
- package/dist/esm/utils/errors/ErrorHandler.mjs.map +1 -1
- package/dist/types/schemas/organization.schema.d.ts +2 -2
- package/dist/types/schemas/organization.schema.d.ts.map +1 -1
- package/dist/types/schemas/session.schema.d.ts +2 -2
- package/dist/types/schemas/session.schema.d.ts.map +1 -1
- package/dist/types/services/tag.service.d.ts +1 -1
- package/dist/types/services/tag.service.d.ts.map +1 -1
- package/dist/types/utils/errors/ErrorHandler.d.ts +1 -1
- package/dist/types/utils/errors/ErrorHandler.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -21,10 +21,10 @@ __export(ErrorHandler_exports, {
|
|
|
21
21
|
ErrorHandler: () => ErrorHandler
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(ErrorHandler_exports);
|
|
24
|
+
var import_httpStatusCodes = require('./../../utils/httpStatusCodes.cjs');
|
|
24
25
|
var import_config = require("@intlayer/config");
|
|
25
26
|
var import_logger = require('./../../logger/index.cjs');
|
|
26
27
|
var import_responseData = require('./../../utils/responseData.cjs');
|
|
27
|
-
var import_export = require('./../../export.cjs');
|
|
28
28
|
var import_express_intlayer = require("express-intlayer");
|
|
29
29
|
var import_errorCodes = require('./errorCodes.cjs');
|
|
30
30
|
class ErrorHandler {
|
|
@@ -63,7 +63,7 @@ class ErrorHandler {
|
|
|
63
63
|
"Error",
|
|
64
64
|
error.message ?? JSON.stringify(error),
|
|
65
65
|
void 0,
|
|
66
|
-
error.httpStatusCode ??
|
|
66
|
+
error.httpStatusCode ?? import_httpStatusCodes.HttpStatusCodes.INTERNAL_SERVER_ERROR_500,
|
|
67
67
|
isPaginatedResponse
|
|
68
68
|
);
|
|
69
69
|
}
|
|
@@ -91,7 +91,7 @@ class ErrorHandler {
|
|
|
91
91
|
const errorTitle = (0, import_express_intlayer.t)(title, import_config.Locales.ENGLISH);
|
|
92
92
|
const errorMessage = (0, import_express_intlayer.t)(message, import_config.Locales.ENGLISH);
|
|
93
93
|
import_logger.logger.error(errorMessage, messageDetails);
|
|
94
|
-
const status = statusCode ??
|
|
94
|
+
const status = statusCode ?? import_httpStatusCodes.HttpStatusCodes.INTERNAL_SERVER_ERROR_500;
|
|
95
95
|
if (isPaginatedResponse) {
|
|
96
96
|
const responseData2 = (0, import_responseData.formatPaginatedResponse)({
|
|
97
97
|
error: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/utils/errors/ErrorHandler.ts"],"sourcesContent":["// Import required modules and types from their respective locations.\nimport { Locales } from '@intlayer/config';\nimport { logger } from '@logger';\nimport { formatPaginatedResponse, formatResponse } from '@utils/responseData';\nimport type { Response } from 'express';\n// @ts-ignore express-intlayer not build yet\nimport
|
|
1
|
+
{"version":3,"sources":["../../../../src/utils/errors/ErrorHandler.ts"],"sourcesContent":["// Import required modules and types from their respective locations.\nimport type { UserAPI } from '@/types/user.types';\nimport { HttpStatusCodes } from '@/utils/httpStatusCodes';\nimport { Locales } from '@intlayer/config';\nimport { logger } from '@logger';\nimport { formatPaginatedResponse, formatResponse } from '@utils/responseData';\nimport type { Response } from 'express';\n// @ts-ignore express-intlayer not build yet\nimport type { LanguageContent } from 'express-intlayer';\nimport { t } from 'express-intlayer';\nimport { type ErrorCodes, errorData } from './errorCodes';\nimport type { AppError } from './ErrorsClass';\n\n// Define a class named 'ErrorHandler' to encapsulate error handling logic.\nexport class ErrorHandler {\n /**\n * Handles generic error responses by formatting and sending a JSON response.\n * @param res - The response object provided by Express.js.\n * @param errorKey - A key representing the specific error.\n * @param statusCode - (Optional) A specific HTTP status code to use for the response.\n * @param isPaginatedResponse - Flag to determine if the response should be paginated.\n */\n static handleGenericErrorResponse(\n res: Response,\n errorKey: ErrorCodes,\n errorDetails?: object,\n statusCode?: HttpStatusCodes,\n isPaginatedResponse: boolean = false\n ) {\n const error = errorData[errorKey];\n const status = statusCode ?? error.statusCode; // Use the provided status code or default to the one in errorData.\n\n // Delegate to a more customizable error response handler.\n this.handleCustomErrorResponse(\n res,\n errorKey,\n error.title,\n error.message,\n errorDetails,\n status,\n isPaginatedResponse\n );\n }\n\n /**\n * Handles application-specific error responses by formatting and sending a JSON response.\n * @param res - The response object provided by Express.js.\n * @param error - The error object.\n * @param messageDetails - (Optional) Additional message details to include in the response.\n * @param isPaginatedResponse - (Optional) Flag to determine if the response should be paginated.\n */\n static handleAppErrorResponse(\n res: Response,\n error: AppError,\n messageDetails?: object,\n isPaginatedResponse: boolean = false\n ) {\n if (!error.isAppError) {\n this.handleCustomErrorResponse(\n res,\n error.errorKey ?? 'UNKNOWN_ERROR',\n 'Error',\n error.message ?? JSON.stringify(error),\n undefined,\n error.httpStatusCode ?? HttpStatusCodes.INTERNAL_SERVER_ERROR_500,\n isPaginatedResponse\n );\n }\n\n const isMultilingual = error.isMultilingual ?? false;\n // Delegate to a more customizable error response handler.\n this.handleCustomErrorResponse(\n res,\n error.errorKey,\n isMultilingual ? error.multilingualTitle : error.title,\n isMultilingual ? error.multilingualMessage : error.message,\n error.messageDetails ?? messageDetails,\n error.httpStatusCode,\n isPaginatedResponse\n );\n }\n\n /**\n * Handles more customizable error responses with detailed error messages and codes.\n * @param res - The response object.\n * @param errorKey - Error code key used to fetch the corresponding message and default status.\n * @param message - The localized error message object.\n * @param messageDetails - (Optional) Additional message details to include in the response.\n * @param statusCode - (Optional) HTTP status code, defaults to 500 if not specified.\n * @param isPaginatedResponse - Determines if the error should be part of a paginated response.\n */\n static handleCustomErrorResponse<T>(\n res: Response,\n errorKey: ErrorCodes | string,\n title: LanguageContent<string> | string,\n message: LanguageContent<string> | string,\n messageDetails?: object,\n statusCode?: HttpStatusCodes,\n isPaginatedResponse: boolean = false\n ) {\n const errorTitle = t(title as LanguageContent<string>, Locales.ENGLISH);\n const errorMessage = t(message as LanguageContent<string>, Locales.ENGLISH);\n logger.error(errorMessage, messageDetails); // Log the English version of the error message.\n const status = statusCode ?? HttpStatusCodes.INTERNAL_SERVER_ERROR_500; // Default to 500 if no status code is provided.\n\n if (isPaginatedResponse) {\n // Format the response as a paginated error response if requested.\n const responseData = formatPaginatedResponse<T>({\n error: {\n code: errorKey,\n title: errorTitle,\n message: errorMessage,\n },\n status,\n });\n res.status(status).json(responseData);\n return;\n }\n\n // Format the response as a standard non-paginated error response.\n const responseData = formatResponse<UserAPI>({\n error: {\n code: errorKey,\n title: errorTitle,\n message: errorMessage,\n ...messageDetails,\n },\n status,\n });\n\n res.status(status).json(responseData);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,6BAAgC;AAChC,oBAAwB;AACxB,oBAAuB;AACvB,0BAAwD;AAIxD,8BAAkB;AAClB,wBAA2C;AAIpC,MAAM,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQxB,OAAO,2BACL,KACA,UACA,cACA,YACA,sBAA+B,OAC/B;AACA,UAAM,QAAQ,4BAAU,QAAQ;AAChC,UAAM,SAAS,cAAc,MAAM;AAGnC,SAAK;AAAA,MACH;AAAA,MACA;AAAA,MACA,MAAM;AAAA,MACN,MAAM;AAAA,MACN;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA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,YAAY;AAAA,EACtC;AACF;","names":["responseData"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/schemas/organization.schema.ts"],"sourcesContent":["import { OrganizationSchema } from '@/
|
|
1
|
+
{"version":3,"sources":["../../../src/schemas/organization.schema.ts"],"sourcesContent":["import { OrganizationSchema } from '@/types/organization.types';\nimport {\n MEMBERS_MIN_LENGTH,\n NAME_MAX_LENGTH,\n NAME_MIN_LENGTH,\n} from '@utils/validation/validateOrganization';\nimport { Schema } from 'mongoose';\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 },\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 ret.id = ret._id.toString(); // convert _id to id\n delete ret._id; // remove _id\n },\n },\n toObject: {\n virtuals: true,\n transform(doc, ret: any) {\n ret.id = ret._id; // convert _id to id\n delete ret._id; // remove _id\n },\n },\n }\n);\n\n// Add virtual field for id\norganizationSchema.virtual('id').get(function () {\n return this._id.toString();\n});\n"],"mappings":"AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAAc;AACvB,SAAS,kBAAkB;AAEpB,MAAM,qBAAqB,IAAI;AAAA,EACpC;AAAA,IACE,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU;AAAA,MACV,WAAW;AAAA,MACX,WAAW;AAAA,IACb;AAAA,IACA,YAAY;AAAA,MACV,MAAM,CAAC,OAAO,MAAM,QAAQ;AAAA,MAC5B,KAAK;AAAA,MACL,UAAU;AAAA,MACV,WAAW;AAAA,IACb;AAAA,IACA,WAAW;AAAA,MACT,MAAM,CAAC,OAAO,MAAM,QAAQ;AAAA,MAC5B,KAAK;AAAA,MACL,UAAU;AAAA,MACV,WAAW;AAAA,IACb;AAAA,IACA,WAAW;AAAA,MACT,MAAM,OAAO,MAAM;AAAA,MACnB,KAAK;AAAA,MACL,UAAU;AAAA,IACZ;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA;AAAA,IACE,YAAY;AAAA,IAEZ,QAAQ;AAAA,MACN,UAAU;AAAA;AAAA,MACV,YAAY;AAAA;AAAA,MACZ,UAAU,KAAK,KAAU;AACvB,YAAI,KAAK,IAAI,IAAI,SAAS;AAC1B,eAAO,IAAI;AAAA,MACb;AAAA,IACF;AAAA,IACA,UAAU;AAAA,MACR,UAAU;AAAA,MACV,UAAU,KAAK,KAAU;AACvB,YAAI,KAAK,IAAI;AACb,eAAO,IAAI;AAAA,MACb;AAAA,IACF;AAAA,EACF;AACF;AAGA,mBAAmB,QAAQ,IAAI,EAAE,IAAI,WAAY;AAC/C,SAAO,KAAK,IAAI,SAAS;AAC3B,CAAC;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/schemas/session.schema.ts"],"sourcesContent":["import { SessionSchema } from '@/
|
|
1
|
+
{"version":3,"sources":["../../../src/schemas/session.schema.ts"],"sourcesContent":["import { SessionSchema } from '@/types/session.types';\nimport { Schema } from 'mongoose';\n\nexport const sessionSchema = new Schema<SessionSchema>(\n {\n activeOrganizationId: {\n type: Schema.Types.ObjectId,\n ref: 'Organization',\n required: false,\n },\n activeProjectId: {\n type: Schema.Types.ObjectId,\n ref: 'Project',\n required: false,\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 ret.id = ret._id.toString(); // convert _id to id\n delete ret._id; // remove _id\n },\n },\n toObject: {\n virtuals: true,\n transform(doc, ret: any) {\n ret.id = ret._id; // convert _id to id\n delete ret._id; // remove _id\n },\n },\n }\n);\n"],"mappings":"AACA,SAAS,cAAc;AAEhB,MAAM,gBAAgB,IAAI;AAAA,EAC/B;AAAA,IACE,sBAAsB;AAAA,MACpB,MAAM,OAAO,MAAM;AAAA,MACnB,KAAK;AAAA,MACL,UAAU;AAAA,IACZ;AAAA,IACA,iBAAiB;AAAA,MACf,MAAM,OAAO,MAAM;AAAA,MACnB,KAAK;AAAA,MACL,UAAU;AAAA,IACZ;AAAA,EACF;AAAA,EACA;AAAA,IACE,YAAY;AAAA,IAEZ,QAAQ;AAAA,MACN,UAAU;AAAA;AAAA,MACV,YAAY;AAAA;AAAA,MACZ,UAAU,KAAK,KAAU;AACvB,YAAI,KAAK,IAAI,IAAI,SAAS;AAC1B,eAAO,IAAI;AAAA,MACb;AAAA,IACF;AAAA,IACA,UAAU;AAAA,MACR,UAAU;AAAA,MACV,UAAU,KAAK,KAAU;AACvB,YAAI,KAAK,IAAI;AACb,eAAO,IAAI;AAAA,MACb;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/services/tag.service.ts"],"sourcesContent":["import type { Organization } from '@/
|
|
1
|
+
{"version":3,"sources":["../../../src/services/tag.service.ts"],"sourcesContent":["import type { Organization } from '@/types/organization.types';\nimport type { Tag, TagData, TagDocument } from '@/types/tag.types';\nimport { TagModel } from '@models/tag.model';\nimport { GenericError } from '@utils/errors';\nimport type { TagFilters } from '@utils/filtersAndPagination/getTagFiltersAndPagination';\nimport { type TagFields, validateTag } from '@utils/validation/validateTag';\nimport type { Types } from 'mongoose';\n\n/**\n * Finds tags based on filters and pagination options.\n * @param filters - MongoDB filter query.\n * @param skip - Number of documents to skip.\n * @param limit - Number of documents to limit.\n * @returns List of tags matching the filters.\n */\nexport const findTags = async (\n filters: TagFilters,\n skip = 0,\n limit = 100\n): Promise<TagDocument[]> =>\n await TagModel.find(filters).skip(skip).limit(limit);\n\n/**\n * Finds a tag by its ID.\n * @param tagId - The ID of the tag to find.\n * @returns The tag matching the ID.\n */\nexport const getTagById = async (\n tagId: string | Types.ObjectId\n): Promise<TagDocument> => {\n const tag = await TagModel.findById(tagId);\n\n if (!tag) {\n throw new GenericError('TAG_NOT_FOUND', { tagId });\n }\n\n return tag;\n};\n\nexport const getTagsByKeys = async (\n keys: string[],\n organizationId: string | Organization['id']\n): Promise<TagDocument[]> => {\n const tags = await TagModel.find({ key: { $in: keys }, organizationId });\n\n return tags;\n};\n\n/**\n * Counts the total number of tags that match the filters.\n * @param filters - MongoDB filter query.\n * @returns Total number of tags.\n */\nexport const countTags = async (filters: TagFilters): Promise<number> => {\n const result = await TagModel.countDocuments(filters);\n\n if (typeof result === 'undefined') {\n throw new GenericError('TAG_COUNT_FAILED', { filters });\n }\n\n return result;\n};\n\n/**\n * Creates a new tag in the database.\n * @param tag - The tag data to create.\n * @returns The created tag.\n */\nexport const createTag = async (tag: TagData): Promise<TagDocument> => {\n const errors = await validateTag(tag, ['key']);\n\n if (Object.keys(errors).length > 0) {\n throw new GenericError('TAG_INVALID_FIELDS', { errors });\n }\n\n return await TagModel.create(tag);\n};\n\n/**\n * Updates an existing tag in the database by its ID.\n * @param tagId - The ID of the tag to update.\n * @param tag - The updated tag data.\n * @returns The updated tag.\n */\nexport const updateTagById = async (\n tagId: string | Types.ObjectId,\n tag: Partial<Tag>\n): Promise<TagDocument> => {\n const updatedKeys = Object.keys(tag) as TagFields;\n\n const errors = validateTag(tag, updatedKeys);\n\n if (Object.keys(errors).length > 0) {\n throw new GenericError('TAG_INVALID_FIELDS', {\n tagId,\n errors,\n });\n }\n\n const result = await TagModel.updateOne({ _id: tagId }, tag);\n\n if (result.matchedCount === 0) {\n throw new GenericError('TAG_UPDATE_FAILED', { tagId });\n }\n\n return await getTagById(tagId);\n};\n\n/**\n * Deletes a tag from the database by its ID.\n * @param tagId - The ID of the tag to delete.\n * @returns The result of the deletion operation.\n */\nexport const deleteTagById = async (\n tagId: string | Types.ObjectId\n): Promise<TagDocument> => {\n const tag = await TagModel.findByIdAndDelete(tagId);\n\n if (!tag) {\n throw new GenericError('TAG_NOT_FOUND', { tagId });\n }\n\n return tag;\n};\n"],"mappings":"AAEA,SAAS,gBAAgB;AACzB,SAAS,oBAAoB;AAE7B,SAAyB,mBAAmB;AAUrC,MAAM,WAAW,OACtB,SACA,OAAO,GACP,QAAQ,QAER,MAAM,SAAS,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,KAAK;AAO9C,MAAM,aAAa,OACxB,UACyB;AACzB,QAAM,MAAM,MAAM,SAAS,SAAS,KAAK;AAEzC,MAAI,CAAC,KAAK;AACR,UAAM,IAAI,aAAa,iBAAiB,EAAE,MAAM,CAAC;AAAA,EACnD;AAEA,SAAO;AACT;AAEO,MAAM,gBAAgB,OAC3B,MACA,mBAC2B;AAC3B,QAAM,OAAO,MAAM,SAAS,KAAK,EAAE,KAAK,EAAE,KAAK,KAAK,GAAG,eAAe,CAAC;AAEvE,SAAO;AACT;AAOO,MAAM,YAAY,OAAO,YAAyC;AACvE,QAAM,SAAS,MAAM,SAAS,eAAe,OAAO;AAEpD,MAAI,OAAO,WAAW,aAAa;AACjC,UAAM,IAAI,aAAa,oBAAoB,EAAE,QAAQ,CAAC;AAAA,EACxD;AAEA,SAAO;AACT;AAOO,MAAM,YAAY,OAAO,QAAuC;AACrE,QAAM,SAAS,MAAM,YAAY,KAAK,CAAC,KAAK,CAAC;AAE7C,MAAI,OAAO,KAAK,MAAM,EAAE,SAAS,GAAG;AAClC,UAAM,IAAI,aAAa,sBAAsB,EAAE,OAAO,CAAC;AAAA,EACzD;AAEA,SAAO,MAAM,SAAS,OAAO,GAAG;AAClC;AAQO,MAAM,gBAAgB,OAC3B,OACA,QAC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