@intlayer/backend 4.1.6 → 4.1.8
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/controllers/ai.controller.cjs +5 -5
- package/dist/cjs/controllers/dictionary.controller.cjs +1 -1
- package/dist/cjs/controllers/oAuth2.controller.cjs +1 -1
- package/dist/cjs/controllers/organization.controller.cjs +1 -1
- package/dist/cjs/controllers/project.controller.cjs +1 -1
- package/dist/cjs/controllers/projectAccessKey.controller.cjs +1 -1
- package/dist/cjs/controllers/sessionAuth.controller.cjs +1 -1
- package/dist/cjs/controllers/stripe.controller.cjs +1 -1
- package/dist/cjs/controllers/tag.controller.cjs +1 -1
- package/dist/cjs/controllers/user.controller.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/schemas/project.schema.cjs +3 -0
- package/dist/cjs/schemas/project.schema.cjs.map +1 -1
- package/dist/cjs/services/dictionary.service.cjs +1 -1
- package/dist/cjs/services/oAuth2.service.cjs +1 -1
- package/dist/cjs/services/organization.service.cjs +1 -1
- package/dist/cjs/services/project.service.cjs +1 -1
- package/dist/cjs/services/projectAccessKey.service.cjs +1 -1
- package/dist/cjs/services/sessionAuth.service.cjs +1 -1
- package/dist/cjs/services/subscription.service.cjs +1 -1
- package/dist/cjs/services/tag.service.cjs +1 -1
- package/dist/cjs/services/user.service.cjs +1 -1
- package/dist/cjs/types/project.types.cjs.map +1 -1
- package/dist/cjs/utils/AI/embeddings.json +1230 -0
- package/dist/cjs/webhooks/stripe.webhook.cjs +1 -1
- package/dist/esm/controllers/ai.controller.mjs +5 -5
- package/dist/esm/controllers/dictionary.controller.mjs +1 -1
- package/dist/esm/controllers/oAuth2.controller.mjs +1 -1
- package/dist/esm/controllers/organization.controller.mjs +1 -1
- package/dist/esm/controllers/project.controller.mjs +1 -1
- package/dist/esm/controllers/projectAccessKey.controller.mjs +1 -1
- package/dist/esm/controllers/sessionAuth.controller.mjs +1 -1
- package/dist/esm/controllers/stripe.controller.mjs +1 -1
- package/dist/esm/controllers/tag.controller.mjs +1 -1
- package/dist/esm/controllers/user.controller.mjs +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/schemas/project.schema.mjs +3 -0
- package/dist/esm/schemas/project.schema.mjs.map +1 -1
- package/dist/esm/services/dictionary.service.mjs +1 -1
- package/dist/esm/services/oAuth2.service.mjs +1 -1
- package/dist/esm/services/organization.service.mjs +1 -1
- package/dist/esm/services/project.service.mjs +1 -1
- package/dist/esm/services/projectAccessKey.service.mjs +1 -1
- package/dist/esm/services/sessionAuth.service.mjs +1 -1
- package/dist/esm/services/subscription.service.mjs +1 -1
- package/dist/esm/services/tag.service.mjs +1 -1
- package/dist/esm/services/user.service.mjs +1 -1
- package/dist/esm/utils/AI/embeddings.json +1230 -0
- package/dist/esm/webhooks/stripe.webhook.mjs +1 -1
- package/dist/types/schemas/project.schema.d.ts.map +1 -1
- package/dist/types/types/project.types.d.ts +1 -1
- package/dist/types/types/project.types.d.ts.map +1 -1
- package/package.json +12 -9
|
@@ -24,7 +24,7 @@ module.exports = __toCommonJS(stripe_webhook_exports);
|
|
|
24
24
|
var import_logger = require('./../logger/index.cjs');
|
|
25
25
|
var import_organization = require('./../services/organization.service.cjs');
|
|
26
26
|
var import_subscription = require('./../services/subscription.service.cjs');
|
|
27
|
-
var import_errors = require('./../utils/errors
|
|
27
|
+
var import_errors = require('./../utils/errors.cjs');
|
|
28
28
|
var import_stripe = require("stripe");
|
|
29
29
|
const stripe = new import_stripe.Stripe(process.env.STRIPE_SECRET_KEY);
|
|
30
30
|
const stripeWebhook = async (req, res) => {
|
|
@@ -2,11 +2,11 @@ import { getDictionariesByTags } from "./../services/dictionary.service.mjs";
|
|
|
2
2
|
import { getTagsByKeys } from "./../services/tag.service.mjs";
|
|
3
3
|
import * as tagService from "./../services/tag.service.mjs";
|
|
4
4
|
import * as askDocQuestionUtil from "./../utils/AI/askDocQuestion.mjs";
|
|
5
|
-
import * as auditContentDeclarationUtil from "./../utils/auditDictionary
|
|
6
|
-
import * as auditContentDeclarationFieldUtil from "./../utils/auditDictionaryField
|
|
7
|
-
import * as auditContentDeclarationMetadataUtil from "./../utils/auditDictionaryMetadata
|
|
8
|
-
import * as auditTagUtil from "./../utils/auditTag
|
|
9
|
-
import { ErrorHandler } from "./../utils/errors
|
|
5
|
+
import * as auditContentDeclarationUtil from "./../utils/auditDictionary.mjs";
|
|
6
|
+
import * as auditContentDeclarationFieldUtil from "./../utils/auditDictionaryField.mjs";
|
|
7
|
+
import * as auditContentDeclarationMetadataUtil from "./../utils/auditDictionaryMetadata.mjs";
|
|
8
|
+
import * as auditTagUtil from "./../utils/auditTag.mjs";
|
|
9
|
+
import { ErrorHandler } from "./../utils/errors.mjs";
|
|
10
10
|
import { formatResponse } from "./../utils/responseData.mjs";
|
|
11
11
|
const auditContentDeclaration = async (req, res, _next) => {
|
|
12
12
|
const { user, project } = res.locals;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { logger } from "./../logger/index.mjs";
|
|
2
2
|
import * as dictionaryService from "./../services/dictionary.service.mjs";
|
|
3
|
-
import { ErrorHandler } from "./../utils/errors
|
|
3
|
+
import { ErrorHandler } from "./../utils/errors.mjs";
|
|
4
4
|
import {
|
|
5
5
|
getDictionaryFiltersAndPagination
|
|
6
6
|
} from "./../utils/filtersAndPagination/getDictionaryFiltersAndPagination.mjs";
|
|
@@ -3,7 +3,7 @@ import { sessionAuthRoutes } from "./../routes/sessionAuth.routes.mjs";
|
|
|
3
3
|
import { sendEmail } from "./../services/email.service.mjs";
|
|
4
4
|
import * as sessionAuthService from "./../services/sessionAuth.service.mjs";
|
|
5
5
|
import * as userService from "./../services/user.service.mjs";
|
|
6
|
-
import { ErrorHandler } from "./../utils/errors
|
|
6
|
+
import { ErrorHandler } from "./../utils/errors.mjs";
|
|
7
7
|
import {
|
|
8
8
|
getOrganizationFiltersAndPagination
|
|
9
9
|
} from "./../utils/filtersAndPagination/getOrganizationFiltersAndPagination.mjs";
|
|
@@ -2,7 +2,7 @@ import { logger } from "./../logger/index.mjs";
|
|
|
2
2
|
import * as projectService from "./../services/project.service.mjs";
|
|
3
3
|
import * as sessionAuthService from "./../services/sessionAuth.service.mjs";
|
|
4
4
|
import * as userService from "./../services/user.service.mjs";
|
|
5
|
-
import { ErrorHandler } from "./../utils/errors
|
|
5
|
+
import { ErrorHandler } from "./../utils/errors.mjs";
|
|
6
6
|
import {
|
|
7
7
|
getProjectFiltersAndPagination
|
|
8
8
|
} from "./../utils/filtersAndPagination/getProjectFiltersAndPagination.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as projectAccessKeyService from "./../services/projectAccessKey.service.mjs";
|
|
2
|
-
import { ErrorHandler } from "./../utils/errors
|
|
2
|
+
import { ErrorHandler } from "./../utils/errors.mjs";
|
|
3
3
|
import { formatResponse } from "./../utils/responseData.mjs";
|
|
4
4
|
import { t } from "express-intlayer";
|
|
5
5
|
const addNewAccessKey = async (req, res, _next) => {
|
|
@@ -5,7 +5,7 @@ import { sendEmail } from "./../services/email.service.mjs";
|
|
|
5
5
|
import * as sessionAuthService from "./../services/sessionAuth.service.mjs";
|
|
6
6
|
import * as userService from "./../services/user.service.mjs";
|
|
7
7
|
import { generateToken } from "./../utils/CSRF.mjs";
|
|
8
|
-
import { ErrorHandler, GenericError } from "./../utils/errors
|
|
8
|
+
import { ErrorHandler, GenericError } from "./../utils/errors.mjs";
|
|
9
9
|
import { HttpStatusCodes } from "./../utils/httpStatusCodes.mjs";
|
|
10
10
|
import { mapOrganizationToAPI } from "./../utils/mapper/organization.mjs";
|
|
11
11
|
import { mapProjectToAPI } from "./../utils/mapper/project.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as subscriptionService from "./../services/subscription.service.mjs";
|
|
2
|
-
import { ErrorHandler } from "./../utils/errors
|
|
2
|
+
import { ErrorHandler } from "./../utils/errors.mjs";
|
|
3
3
|
import { retrievePlanInformation } from "./../utils/plan.mjs";
|
|
4
4
|
import { formatResponse } from "./../utils/responseData.mjs";
|
|
5
5
|
import { t } from "express-intlayer";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { logger } from "./../logger/index.mjs";
|
|
2
2
|
import * as tagService from "./../services/tag.service.mjs";
|
|
3
|
-
import { ErrorHandler } from "./../utils/errors
|
|
3
|
+
import { ErrorHandler } from "./../utils/errors.mjs";
|
|
4
4
|
import {
|
|
5
5
|
getTagFiltersAndPagination
|
|
6
6
|
} from "./../utils/filtersAndPagination/getTagFiltersAndPagination.mjs";
|
|
@@ -2,7 +2,7 @@ import { logger } from "./../logger/index.mjs";
|
|
|
2
2
|
import { sessionAuthRoutes } from "./../routes/sessionAuth.routes.mjs";
|
|
3
3
|
import { sendEmail } from "./../services/email.service.mjs";
|
|
4
4
|
import * as userService from "./../services/user.service.mjs";
|
|
5
|
-
import { ErrorHandler } from "./../utils/errors
|
|
5
|
+
import { ErrorHandler } from "./../utils/errors.mjs";
|
|
6
6
|
import { getOrganizationFiltersAndPagination } from "./../utils/filtersAndPagination/getOrganizationFiltersAndPagination.mjs";
|
|
7
7
|
import { mapUsersToAPI, mapUserToAPI } from "./../utils/mapper/user.mjs";
|
|
8
8
|
import {
|
package/dist/esm/index.mjs
CHANGED
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
} from "./controllers/sessionAuth.controller.mjs";
|
|
33
33
|
import { doubleCsrfProtection } from "./utils/CSRF.mjs";
|
|
34
34
|
import { connectDB } from "./utils/mongoDB/connectDB.mjs";
|
|
35
|
-
import { logger } from "./logger
|
|
35
|
+
import { logger } from "./logger.mjs";
|
|
36
36
|
const app = express();
|
|
37
37
|
app.disable("x-powered-by");
|
|
38
38
|
app.use(helmet());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/schemas/project.schema.ts"],"sourcesContent":["import {\n NAME_MIN_LENGTH,\n NAME_MAX_LENGTH,\n MEMBERS_MIN_LENGTH,\n} from '@utils/validation/validateProject';\nimport { Locales } from 'intlayer';\nimport { Schema } from 'mongoose';\nimport { Project, Rights, TokenRights } from '@/types/project.types';\n\nconst RightsSchema = new Schema<Rights>({\n read: { type: Boolean, required: true },\n write: { type: Boolean, required: true },\n admin: { type: Boolean, required: true },\n});\n\nexport const TokenRightsSchema = new Schema<TokenRights>({\n dictionary: { type: RightsSchema, required: true },\n project: { type: RightsSchema, required: true },\n organization: { type: RightsSchema, required: true },\n});\n\n// Define the oAuth2Access subdocument schema with timestamps\nconst oAuth2AccessSchema = new Schema(\n {\n clientId: { type: String, required: true, unique: true },\n clientSecret: { type: String, required: true },\n userId: { type: Schema.Types.ObjectId, ref: 'User', required: true },\n name: { type: String, required: true },\n expiresAt: { type: Date },\n accessToken: { type: [String], required: true },\n rights: { type: TokenRightsSchema, required: true },\n },\n {\n timestamps: true,\n }\n);\n\nconst projectConfigSchema = new Schema<Project['configuration']>(\n {\n internationalization: {\n locales: {\n type: [String],\n enum: Object.values(Locales),\n required: true,\n },\n defaultLocale: {\n type: String,\n enum: Object.values(Locales),\n },\n },\n editor: {\n applicationURL: {\n type: String,\n },\n },\n },\n {\n _id: false, // Prevents the generation of an _id field for this subdocument\n }\n);\n\nexport const projectSchema = new Schema<Project>(\n {\n organizationId: {\n type: Schema.Types.ObjectId,\n ref: 'Organization',\n required: true,\n },\n name: {\n type: String,\n required: true,\n minlength: NAME_MIN_LENGTH,\n maxlength: NAME_MAX_LENGTH,\n },\n configuration: projectConfigSchema,\n oAuth2Access: [oAuth2AccessSchema],\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 },\n {\n timestamps: true,\n }\n);\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,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A,MACR;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE,KAAK;AAAA;AAAA,EACP;AACF;AAEO,MAAM,gBAAgB,IAAI;AAAA,EAC/B;AAAA,IACE,gBAAgB;AAAA,MACd,MAAM,OAAO,MAAM;AAAA,MACnB,KAAK;AAAA,MACL,UAAU;AAAA,IACZ;AAAA,IACA,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU;AAAA,MACV,WAAW;AAAA,MACX,WAAW;AAAA,IACb;AAAA,IACA,eAAe;AAAA,IACf,cAAc,CAAC,kBAAkB;AAAA,IACjC,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,EACF;AAAA,EACA;AAAA,IACE,YAAY;AAAA,EACd;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/schemas/project.schema.ts"],"sourcesContent":["import {\n NAME_MIN_LENGTH,\n NAME_MAX_LENGTH,\n MEMBERS_MIN_LENGTH,\n} from '@utils/validation/validateProject';\nimport { Locales } from 'intlayer';\nimport { Schema } from 'mongoose';\nimport { Project, Rights, TokenRights } from '@/types/project.types';\n\nconst RightsSchema = new Schema<Rights>({\n read: { type: Boolean, required: true },\n write: { type: Boolean, required: true },\n admin: { type: Boolean, required: true },\n});\n\nexport const TokenRightsSchema = new Schema<TokenRights>({\n dictionary: { type: RightsSchema, required: true },\n project: { type: RightsSchema, required: true },\n organization: { type: RightsSchema, required: true },\n});\n\n// Define the oAuth2Access subdocument schema with timestamps\nconst oAuth2AccessSchema = new Schema(\n {\n clientId: { type: String, required: true, unique: true },\n clientSecret: { type: String, required: true },\n userId: { type: Schema.Types.ObjectId, ref: 'User', required: true },\n name: { type: String, required: true },\n expiresAt: { type: Date },\n accessToken: { type: [String], required: true },\n rights: { type: TokenRightsSchema, required: true },\n },\n {\n timestamps: true,\n }\n);\n\nconst projectConfigSchema = new Schema<Project['configuration']>(\n {\n internationalization: {\n locales: {\n type: [String],\n enum: Object.values(Locales),\n required: true,\n },\n defaultLocale: {\n type: String,\n enum: Object.values(Locales),\n },\n },\n editor: {\n applicationURL: {\n type: String,\n },\n cmsURL: {\n type: String,\n },\n },\n },\n {\n _id: false, // Prevents the generation of an _id field for this subdocument\n }\n);\n\nexport const projectSchema = new Schema<Project>(\n {\n organizationId: {\n type: Schema.Types.ObjectId,\n ref: 'Organization',\n required: true,\n },\n name: {\n type: String,\n required: true,\n minlength: NAME_MIN_LENGTH,\n maxlength: NAME_MAX_LENGTH,\n },\n configuration: projectConfigSchema,\n oAuth2Access: [oAuth2AccessSchema],\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 },\n {\n timestamps: true,\n }\n);\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,eAAe;AACxB,SAAS,cAAc;AAGvB,MAAM,eAAe,IAAI,OAAe;AAAA,EACtC,MAAM,EAAE,MAAM,SAAS,UAAU,KAAK;AAAA,EACtC,OAAO,EAAE,MAAM,SAAS,UAAU,KAAK;AAAA,EACvC,OAAO,EAAE,MAAM,SAAS,UAAU,KAAK;AACzC,CAAC;AAEM,MAAM,oBAAoB,IAAI,OAAoB;AAAA,EACvD,YAAY,EAAE,MAAM,cAAc,UAAU,KAAK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V,WAAW;AAAA,MACX,WAAW;AAAA,IACb;AAAA,IACA,eAAe;AAAA,IACf,cAAc,CAAC,kBAAkB;AAAA,IACjC,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,EACF;AAAA,EACA;AAAA,IACE,YAAY;AAAA,EACd;AACF;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DictionaryModel } from "./../models/dictionary.model.mjs";
|
|
2
2
|
import { ensureMongoDocumentToObject } from "./../utils/ensureMongoDocumentToObject.mjs";
|
|
3
|
-
import { GenericError } from "./../utils/errors
|
|
3
|
+
import { GenericError } from "./../utils/errors.mjs";
|
|
4
4
|
import { removeObjectKeys } from "./../utils/removeObjectKeys.mjs";
|
|
5
5
|
import {
|
|
6
6
|
validateDictionary
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { randomBytes } from "crypto";
|
|
2
2
|
import { OAuth2AccessTokenModel } from "./../models/oAuth2.model.mjs";
|
|
3
3
|
import { ProjectModel } from "./../models/project.model.mjs";
|
|
4
|
-
import { GenericError } from "./../utils/errors
|
|
4
|
+
import { GenericError } from "./../utils/errors.mjs";
|
|
5
5
|
import { getTokenExpireAt } from "./../utils/oAuth2.mjs";
|
|
6
6
|
import { getOrganizationById } from "./organization.service.mjs";
|
|
7
7
|
import { getUserById } from "./user.service.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OrganizationModel } from "./../models/organization.model.mjs";
|
|
2
|
-
import { GenericError } from "./../utils/errors
|
|
2
|
+
import { GenericError } from "./../utils/errors.mjs";
|
|
3
3
|
import {
|
|
4
4
|
validateOrganization
|
|
5
5
|
} from "./../utils/validation/validateOrganization.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ProjectModel } from "./../models/project.model.mjs";
|
|
2
2
|
import { ensureMongoDocumentToObject } from "./../utils/ensureMongoDocumentToObject.mjs";
|
|
3
|
-
import { GenericError } from "./../utils/errors
|
|
3
|
+
import { GenericError } from "./../utils/errors.mjs";
|
|
4
4
|
import { removeObjectKeys } from "./../utils/removeObjectKeys.mjs";
|
|
5
5
|
import {
|
|
6
6
|
validateProject
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProjectModel } from "./../models/project.model.mjs";
|
|
2
|
-
import { GenericError } from "./../utils/errors
|
|
2
|
+
import { GenericError } from "./../utils/errors.mjs";
|
|
3
3
|
import { generateClientCredentials } from "./oAuth2.service.mjs";
|
|
4
4
|
import { getProjectById } from "./project.service.mjs";
|
|
5
5
|
const addNewAccessKey = async (accessKeyData, projectId, user, organizationRights, projectRights, dictionaryRights) => {
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
MAX_AGE
|
|
8
8
|
} from "./../utils/cookies.mjs";
|
|
9
9
|
import { ensureMongoDocumentToObject } from "./../utils/ensureMongoDocumentToObject.mjs";
|
|
10
|
-
import { GenericError } from "./../utils/errors
|
|
10
|
+
import { GenericError } from "./../utils/errors.mjs";
|
|
11
11
|
import { mapUserToAPI } from "./../utils/mapper/user.mjs";
|
|
12
12
|
import { hash, genSalt, compare } from "bcrypt";
|
|
13
13
|
import { t } from "express-intlayer";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { logger } from "./../logger/index.mjs";
|
|
2
|
-
import { GenericError } from "./../utils/errors
|
|
2
|
+
import { GenericError } from "./../utils/errors.mjs";
|
|
3
3
|
import { retrievePlanInformation } from "./../utils/plan.mjs";
|
|
4
4
|
import Stripe from "stripe";
|
|
5
5
|
import { sendEmail } from "./email.service.mjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TagModel } from "./../models/tag.model.mjs";
|
|
2
|
-
import { GenericError } from "./../utils/errors
|
|
2
|
+
import { GenericError } from "./../utils/errors.mjs";
|
|
3
3
|
import { validateTag } from "./../utils/validation/validateTag.mjs";
|
|
4
4
|
const findTags = async (filters, skip = 0, limit = 100) => await TagModel.find(filters).skip(skip).limit(limit);
|
|
5
5
|
const getTagById = async (tagId) => {
|