biz-email-builder-shared 1.6.10 → 1.6.12
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/entity/emailConfiguration.entity.d.ts +32 -0
- package/dist/entity/emailConfiguration.entity.d.ts.map +1 -0
- package/dist/entity/emailConfiguration.entity.js +29 -0
- package/dist/entity/feature.entitiy.d.ts.map +1 -1
- package/dist/entity/index.d.ts +1 -0
- package/dist/entity/index.d.ts.map +1 -1
- package/dist/entity/index.js +1 -0
- package/dist/entity/planHistory.entity.d.ts +47 -12
- package/dist/entity/planHistory.entity.d.ts.map +1 -1
- package/dist/entity/planHistory.entity.js +24 -40
- package/dist/entity/subscriptionPlan.entity.d.ts +5 -4
- package/dist/entity/subscriptionPlan.entity.d.ts.map +1 -1
- package/dist/entity/subscriptionPlan.entity.js +6 -5
- package/dist/entity/templateShare.entity.d.ts.map +1 -1
- package/dist/entity/user-group.entitty.d.ts.map +1 -1
- package/dist/entity/user.entity.d.ts +1 -0
- package/dist/entity/user.entity.d.ts.map +1 -1
- package/dist/entity/user.entity.js +2 -1
- package/dist/middleware/authentication.d.ts.map +1 -1
- package/dist/middleware/authentication.js +5 -1
- package/dist/types/IRequest.d.ts +1 -0
- package/dist/types/IRequest.d.ts.map +1 -1
- package/dist/utilities/cryptoUtils.d.ts +3 -0
- package/dist/utilities/cryptoUtils.d.ts.map +1 -0
- package/dist/utilities/cryptoUtils.js +26 -0
- package/dist/utilities/index.d.ts +1 -0
- package/dist/utilities/index.d.ts.map +1 -1
- package/dist/utilities/index.js +1 -0
- package/package.json +32 -32
- package/dist/entity/subscription.entity.d.ts +0 -15
- package/dist/entity/subscription.entity.d.ts.map +0 -1
- package/dist/entity/subscription.entity.js +0 -13
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
2
|
+
export declare enum CONFIG_METHOD {
|
|
3
|
+
SMTP = "SMTP",
|
|
4
|
+
GMAIL = "GMAIL"
|
|
5
|
+
}
|
|
6
|
+
export interface ISMTPConfig {
|
|
7
|
+
host: string;
|
|
8
|
+
port: number;
|
|
9
|
+
secure: boolean;
|
|
10
|
+
userName: string;
|
|
11
|
+
encryptedPassword: string;
|
|
12
|
+
}
|
|
13
|
+
export interface IGmailConfig {
|
|
14
|
+
email: string;
|
|
15
|
+
password: string;
|
|
16
|
+
}
|
|
17
|
+
export interface IEmailConfiguration extends Document {
|
|
18
|
+
userId: Types.ObjectId;
|
|
19
|
+
method: CONFIG_METHOD;
|
|
20
|
+
smtpConfig?: ISMTPConfig;
|
|
21
|
+
gmailConfig?: IGmailConfig;
|
|
22
|
+
isDeleted: boolean;
|
|
23
|
+
updatedBy: Types.ObjectId;
|
|
24
|
+
createdAt: Date;
|
|
25
|
+
updatedAt: Date;
|
|
26
|
+
}
|
|
27
|
+
export declare const EmailConfigurationModel: import("mongoose").Model<IEmailConfiguration, {}, {}, {}, import("mongoose").Document<unknown, {}, IEmailConfiguration> & IEmailConfiguration & {
|
|
28
|
+
_id: Types.ObjectId;
|
|
29
|
+
} & {
|
|
30
|
+
__v: number;
|
|
31
|
+
}, any>;
|
|
32
|
+
//# sourceMappingURL=emailConfiguration.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emailConfiguration.entity.d.ts","sourceRoot":"","sources":["../../src/entity/emailConfiguration.entity.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,EAAE,MAAM,UAAU,CAAC;AAEhD,oBAAY,aAAa;IACvB,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,mBAAoB,SAAQ,QAAQ;IACnD,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC;IACvB,MAAM,EAAE,aAAa,CAAC;IACtB,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC1B,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAiCD,eAAO,MAAM,uBAAuB;SAAgvG,MAAO,QAAQ;;;OAAjrG,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmailConfigurationModel = exports.CONFIG_METHOD = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
var CONFIG_METHOD;
|
|
6
|
+
(function (CONFIG_METHOD) {
|
|
7
|
+
CONFIG_METHOD["SMTP"] = "SMTP";
|
|
8
|
+
CONFIG_METHOD["GMAIL"] = "GMAIL";
|
|
9
|
+
})(CONFIG_METHOD || (exports.CONFIG_METHOD = CONFIG_METHOD = {}));
|
|
10
|
+
const smtpConfigSchema = new mongoose_1.Schema({
|
|
11
|
+
host: { type: String, required: true },
|
|
12
|
+
port: { type: Number, required: true },
|
|
13
|
+
secure: { type: Boolean, required: true },
|
|
14
|
+
userName: { type: String, required: true },
|
|
15
|
+
encryptedPassword: { type: String, required: true },
|
|
16
|
+
}, { _id: false });
|
|
17
|
+
const gmailConfigSchema = new mongoose_1.Schema({
|
|
18
|
+
email: { type: String, required: true },
|
|
19
|
+
password: { type: String, required: true }
|
|
20
|
+
}, { _id: false });
|
|
21
|
+
const EmailConfigurationSchema = new mongoose_1.Schema({
|
|
22
|
+
userId: { type: mongoose_1.Schema.Types.ObjectId, ref: "user", required: true, unique: true },
|
|
23
|
+
method: { type: String, enum: Object.values(CONFIG_METHOD), required: true },
|
|
24
|
+
smtpConfig: { type: smtpConfigSchema, required: false },
|
|
25
|
+
gmailConfig: { type: gmailConfigSchema, required: false },
|
|
26
|
+
isDeleted: { type: Boolean, default: false },
|
|
27
|
+
updatedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: "user" },
|
|
28
|
+
}, { timestamps: true });
|
|
29
|
+
exports.EmailConfigurationModel = (0, mongoose_1.model)("email-configuration", EmailConfigurationSchema);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.entitiy.d.ts","sourceRoot":"","sources":["../../src/entity/feature.entitiy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,EAAE,MAAM,UAAU,CAAC;AAEhD,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAA;CACzB;AAcD,eAAO,MAAM,YAAY;
|
|
1
|
+
{"version":3,"file":"feature.entitiy.d.ts","sourceRoot":"","sources":["../../src/entity/feature.entitiy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,EAAE,MAAM,UAAU,CAAC;AAEhD,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAA;CACzB;AAcD,eAAO,MAAM,YAAY;SACyzI,MAAO,QAAQ;;;OAD5xI,CAAC"}
|
package/dist/entity/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entity/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entity/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAA"}
|
package/dist/entity/index.js
CHANGED
|
@@ -21,3 +21,4 @@ __exportStar(require("./feature.entitiy"), exports);
|
|
|
21
21
|
__exportStar(require("./templateShare.entity"), exports);
|
|
22
22
|
__exportStar(require("./subscriptionPlan.entity"), exports);
|
|
23
23
|
__exportStar(require("./planHistory.entity"), exports);
|
|
24
|
+
__exportStar(require("./emailConfiguration.entity"), exports);
|
|
@@ -1,24 +1,59 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Schema, Types, Document } from "mongoose";
|
|
2
|
+
export interface ITransactionHistory {
|
|
3
|
+
subscriptionPlanId: Types.ObjectId;
|
|
4
|
+
transactionId: string;
|
|
5
|
+
isSuccessful: boolean;
|
|
6
|
+
transactionDate: Date;
|
|
7
|
+
}
|
|
8
|
+
export interface ISubscriptionQuota {
|
|
9
|
+
emailSentCount: number;
|
|
10
|
+
privateTemplateCount: number;
|
|
11
|
+
publicTemplateCount: number;
|
|
12
|
+
smtpConfigAllowed: boolean;
|
|
13
|
+
}
|
|
2
14
|
export interface IPlanHistory extends Document {
|
|
3
|
-
userId:
|
|
4
|
-
|
|
15
|
+
userId: Types.ObjectId;
|
|
16
|
+
subscriptionPlanId: Types.ObjectId;
|
|
5
17
|
purchaseDate: Date;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
18
|
+
renewalDate: Date | null;
|
|
19
|
+
notifyRenewalDate: Date | null;
|
|
20
|
+
notifyRenewalCount: number;
|
|
21
|
+
quotaResetDate: Date;
|
|
22
|
+
isTransactionSuccessful: boolean;
|
|
23
|
+
updatedBy: Types.ObjectId;
|
|
24
|
+
transactionHistory: ITransactionHistory[];
|
|
25
|
+
subscriptionQuota: ISubscriptionQuota;
|
|
9
26
|
}
|
|
10
|
-
export declare const
|
|
11
|
-
_id:
|
|
27
|
+
export declare const TransactionHistorySchema: Schema<ITransactionHistory, import("mongoose").Model<ITransactionHistory, any, any, any, Document<unknown, any, ITransactionHistory> & ITransactionHistory & {
|
|
28
|
+
_id: Types.ObjectId;
|
|
12
29
|
} & {
|
|
13
30
|
__v: number;
|
|
14
|
-
}, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions,
|
|
15
|
-
_id:
|
|
31
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ITransactionHistory, Document<unknown, {}, import("mongoose").FlatRecord<ITransactionHistory>> & import("mongoose").FlatRecord<ITransactionHistory> & {
|
|
32
|
+
_id: Types.ObjectId;
|
|
16
33
|
} & {
|
|
17
34
|
__v: number;
|
|
18
35
|
}>;
|
|
19
|
-
export declare const
|
|
20
|
-
_id:
|
|
36
|
+
export declare const SubscriptionQuotaSchema: Schema<ISubscriptionQuota, import("mongoose").Model<ISubscriptionQuota, any, any, any, Document<unknown, any, ISubscriptionQuota> & ISubscriptionQuota & {
|
|
37
|
+
_id: Types.ObjectId;
|
|
21
38
|
} & {
|
|
22
39
|
__v: number;
|
|
40
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ISubscriptionQuota, Document<unknown, {}, import("mongoose").FlatRecord<ISubscriptionQuota>> & import("mongoose").FlatRecord<ISubscriptionQuota> & {
|
|
41
|
+
_id: Types.ObjectId;
|
|
42
|
+
} & {
|
|
43
|
+
__v: number;
|
|
44
|
+
}>;
|
|
45
|
+
export declare const PlanHistorySchema: Schema<IPlanHistory, import("mongoose").Model<IPlanHistory, any, any, any, Document<unknown, any, IPlanHistory> & IPlanHistory & Required<{
|
|
46
|
+
_id: unknown;
|
|
47
|
+
}> & {
|
|
48
|
+
__v: number;
|
|
49
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, IPlanHistory, Document<unknown, {}, import("mongoose").FlatRecord<IPlanHistory>> & import("mongoose").FlatRecord<IPlanHistory> & Required<{
|
|
50
|
+
_id: unknown;
|
|
51
|
+
}> & {
|
|
52
|
+
__v: number;
|
|
53
|
+
}>;
|
|
54
|
+
export declare const PlanHistoryModel: import("mongoose").Model<IPlanHistory, {}, {}, {}, Document<unknown, {}, IPlanHistory> & IPlanHistory & Required<{
|
|
55
|
+
_id: unknown;
|
|
56
|
+
}> & {
|
|
57
|
+
__v: number;
|
|
23
58
|
}, any>;
|
|
24
59
|
//# sourceMappingURL=planHistory.entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planHistory.entity.d.ts","sourceRoot":"","sources":["../../src/entity/planHistory.entity.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"planHistory.entity.d.ts","sourceRoot":"","sources":["../../src/entity/planHistory.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAE1D,MAAM,WAAW,mBAAmB;IAClC,kBAAkB,EAAE,KAAK,CAAC,QAAQ,CAAC;IACnC,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,YAAa,SAAQ,QAAQ;IAC5C,MAAM,EAAE,KAAK,CAAC,QAAQ,CAAC;IACvB,kBAAkB,EAAE,KAAK,CAAC,QAAQ,CAAC;IACnC,YAAY,EAAE,IAAI,CAAC;IACnB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,iBAAiB,EAAE,IAAI,GAAG,IAAI,CAAC;IAC/B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,IAAI,CAAC;IACrB,uBAAuB,EAAE,OAAO,CAAC;IACjC,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC1B,kBAAkB,EAAE,mBAAmB,EAAE,CAAC;IAC1C,iBAAiB,EAAE,kBAAkB,CAAC;CACvC;AAED,eAAO,MAAM,wBAAwB;SA6B+gF,MAAO,QAAQ;;;;SAAf,MAAO,QAAQ;;;EAxBjjF,CAAC;AAEnB,eAAO,MAAM,uBAAuB;SAsBghF,MAAO,QAAQ;;;;SAAf,MAAO,QAAQ;;;EAjBjjF,CAAC;AAEnB,eAAO,MAAM,iBAAiB;;;;;;;;EAYN,CAAC;AAEzB,eAAO,MAAM,gBAAgB;;;;OAAyD,CAAC"}
|
|
@@ -1,46 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.PlanHistoryModel = exports.PlanHistorySchema = void 0;
|
|
37
|
-
const mongoose_1 =
|
|
3
|
+
exports.PlanHistoryModel = exports.PlanHistorySchema = exports.SubscriptionQuotaSchema = exports.TransactionHistorySchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
exports.TransactionHistorySchema = new mongoose_1.Schema({
|
|
6
|
+
subscriptionPlanId: { type: mongoose_1.Schema.Types.ObjectId, ref: "subscription-plan", required: true },
|
|
7
|
+
transactionId: { type: String, required: true },
|
|
8
|
+
isSuccessful: { type: Boolean, default: false },
|
|
9
|
+
transactionDate: { type: Date, required: true }
|
|
10
|
+
}, { _id: false });
|
|
11
|
+
exports.SubscriptionQuotaSchema = new mongoose_1.Schema({
|
|
12
|
+
emailSentCount: { type: Number, required: true },
|
|
13
|
+
publicTemplateCount: { type: Number, required: true },
|
|
14
|
+
privateTemplateCount: { type: Number, required: true },
|
|
15
|
+
smtpConfigAllowed: { type: Boolean, default: false }
|
|
16
|
+
}, { _id: false });
|
|
38
17
|
exports.PlanHistorySchema = new mongoose_1.Schema({
|
|
39
|
-
userId: { type: mongoose_1.
|
|
40
|
-
|
|
18
|
+
userId: { type: mongoose_1.Schema.Types.ObjectId, ref: "user", required: true },
|
|
19
|
+
subscriptionPlanId: { type: mongoose_1.Schema.Types.ObjectId, ref: "subscription-plan", required: true },
|
|
41
20
|
purchaseDate: { type: Date, required: true },
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
21
|
+
renewalDate: { type: Date, required: true, default: null },
|
|
22
|
+
notifyRenewalDate: { type: Date, required: true, default: null },
|
|
23
|
+
notifyRenewalCount: { type: Number, required: true },
|
|
24
|
+
quotaResetDate: { type: Date, required: true },
|
|
25
|
+
isTransactionSuccessful: { type: Boolean, required: true },
|
|
26
|
+
updatedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: "user", required: true },
|
|
27
|
+
transactionHistory: { type: [exports.TransactionHistorySchema], required: true },
|
|
28
|
+
subscriptionQuota: { type: exports.SubscriptionQuotaSchema, required: true }
|
|
45
29
|
}, { timestamps: true });
|
|
46
30
|
exports.PlanHistoryModel = (0, mongoose_1.model)("plan-history", exports.PlanHistorySchema);
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import mongoose from "mongoose";
|
|
2
2
|
export interface ISubscriptionPlan extends Document {
|
|
3
3
|
planName: string;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
sendEmailLimit: number;
|
|
5
|
+
privateTemplateLimit: number;
|
|
6
|
+
publicTemplateLimit: number;
|
|
7
|
+
smtpConfigAllowed: boolean;
|
|
8
8
|
isDeleted: boolean;
|
|
9
9
|
updatedBy: mongoose.Types.ObjectId;
|
|
10
10
|
deletedAt: Date;
|
|
11
|
+
isDefault: boolean;
|
|
11
12
|
}
|
|
12
13
|
export declare const SubscriptionPlanModel: mongoose.Model<ISubscriptionPlan, {}, {}, {}, mongoose.Document<unknown, {}, ISubscriptionPlan> & ISubscriptionPlan & {
|
|
13
14
|
_id: mongoose.Types.ObjectId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptionPlan.entity.d.ts","sourceRoot":"","sources":["../../src/entity/subscriptionPlan.entity.ts"],"names":[],"mappings":"AAAA,OAAO,QAA2B,MAAM,UAAU,CAAC;AAEnD,MAAM,WAAW,iBAAkB,SAAQ,QAAQ;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,
|
|
1
|
+
{"version":3,"file":"subscriptionPlan.entity.d.ts","sourceRoot":"","sources":["../../src/entity/subscriptionPlan.entity.ts"],"names":[],"mappings":"AAAA,OAAO,QAA2B,MAAM,UAAU,CAAC;AAEnD,MAAM,WAAW,iBAAkB,SAAQ,QAAQ;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;IACnC,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;CACpB;AAgBD,eAAO,MAAM,qBAAqB;;;;OAAwE,CAAC"}
|
|
@@ -37,12 +37,13 @@ exports.SubscriptionPlanModel = void 0;
|
|
|
37
37
|
const mongoose_1 = __importStar(require("mongoose"));
|
|
38
38
|
const SubscriptionPlanSchema = new mongoose_1.Schema({
|
|
39
39
|
planName: { type: String, required: true },
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
sendEmailLimit: { type: Number, required: true },
|
|
41
|
+
privateTemplateLimit: { type: Number, required: true },
|
|
42
|
+
publicTemplateLimit: { type: Number, required: true },
|
|
43
|
+
smtpConfigAllowed: { type: Boolean, required: true },
|
|
44
44
|
isDeleted: { type: Boolean, default: false },
|
|
45
45
|
updatedBy: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "User", required: true },
|
|
46
|
-
deletedAt: { type: Date, default: null }
|
|
46
|
+
deletedAt: { type: Date, default: null },
|
|
47
|
+
isDefault: { type: Boolean, default: false, index: { unique: true, partialFilterExpression: { isDefault: true } } }
|
|
47
48
|
}, { timestamps: true, });
|
|
48
49
|
exports.SubscriptionPlanModel = (0, mongoose_1.model)("subscription-plan", SubscriptionPlanSchema);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templateShare.entity.d.ts","sourceRoot":"","sources":["../../src/entity/templateShare.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAU,KAAK,EAAS,MAAM,UAAU,CAAC;AAEhD,UAAU,cAAc;IACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC;IACzB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC;IACzB,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC3B,UAAU,EAAE,cAAc,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC1B,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAkBD,eAAO,MAAM,kBAAkB;
|
|
1
|
+
{"version":3,"file":"templateShare.entity.d.ts","sourceRoot":"","sources":["../../src/entity/templateShare.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAU,KAAK,EAAS,MAAM,UAAU,CAAC;AAEhD,UAAU,cAAc;IACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC;IACzB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC;IACzB,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC3B,UAAU,EAAE,cAAc,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC1B,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAkBD,eAAO,MAAM,kBAAkB;SACywH,MAAO,QAAQ;;;OADztH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-group.entitty.d.ts","sourceRoot":"","sources":["../../src/entity/user-group.entitty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,EAAE,MAAM,UAAU,CAAC;AAEhD,UAAU,UAAU;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC3B,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAA;CACzB;AAeD,eAAO,MAAM,cAAc;
|
|
1
|
+
{"version":3,"file":"user-group.entitty.d.ts","sourceRoot":"","sources":["../../src/entity/user-group.entitty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,EAAE,MAAM,UAAU,CAAC;AAEhD,UAAU,UAAU;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC3B,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAA;CACzB;AAeD,eAAO,MAAM,cAAc;SACsqI,MAAO,QAAQ;;;OADloI,CAAC"}
|
|
@@ -13,6 +13,7 @@ interface IUser {
|
|
|
13
13
|
deletedAt: Date;
|
|
14
14
|
isDeleted: boolean;
|
|
15
15
|
updateBy: Types.ObjectId;
|
|
16
|
+
currentPlanId: Types.ObjectId;
|
|
16
17
|
}
|
|
17
18
|
export declare const UserModel: import("mongoose").Model<IUser, {}, {}, {}, import("mongoose").Document<unknown, {}, IUser> & IUser & {
|
|
18
19
|
_id: Types.ObjectId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.entity.d.ts","sourceRoot":"","sources":["../../src/entity/user.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,KAAK,CAAC;IACZ,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;IAC7B,UAAU,EAAE,OAAO,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,QAAQ,
|
|
1
|
+
{"version":3,"file":"user.entity.d.ts","sourceRoot":"","sources":["../../src/entity/user.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,UAAU,KAAK;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,KAAK,CAAC;IACZ,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;IAC7B,UAAU,EAAE,OAAO,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC;IACzB,aAAa,EAAE,KAAK,CAAC,QAAQ,CAAC;CAC/B;AAqBD,eAAO,MAAM,SAAS;SAC2qH,MAAO,QAAQ;;;OADvpH,CAAC"}
|
|
@@ -13,7 +13,8 @@ const UserSchema = new mongoose_1.Schema({
|
|
|
13
13
|
deletedAt: { type: Date, default: null },
|
|
14
14
|
isDeleted: { type: Boolean, default: false },
|
|
15
15
|
groups: { type: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'user-group' }], default: [], _id: false },
|
|
16
|
-
updateBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'user' }
|
|
16
|
+
updateBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'user' },
|
|
17
|
+
currentPlanId: { type: mongoose_1.Schema.Types.ObjectId, ref: "subscription-plan" }
|
|
17
18
|
}, {
|
|
18
19
|
timestamps: true,
|
|
19
20
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authentication.d.ts","sourceRoot":"","sources":["../../src/middleware/authentication.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGpC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE1D,QAAA,MAAM,SAAS,cACe,QAAQ,OAAO,QAAQ,QAAQ,YAAY,
|
|
1
|
+
{"version":3,"file":"authentication.d.ts","sourceRoot":"","sources":["../../src/middleware/authentication.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGpC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE1D,QAAA,MAAM,SAAS,cACe,QAAQ,OAAO,QAAQ,QAAQ,YAAY,kBA8CxE,CAAC;AAEF,QAAA,MAAM,eAAe,UAAW,KAAK,EAAE,WACT,QAAQ,OAAO,QAAQ,QAAQ,YAAY,kBAaxE,CAAC;AAEF,QAAA,MAAM,kBAAkB,aAAc,YAAY,EAAE,WACtB,QAAQ,OAAO,QAAQ,QAAQ,YAAY,kBAgBxE,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -31,6 +31,10 @@ const authorize = () => {
|
|
|
31
31
|
.populate({
|
|
32
32
|
path: "groups",
|
|
33
33
|
populate: { path: "features", select: "name" },
|
|
34
|
+
})
|
|
35
|
+
.populate({
|
|
36
|
+
path: "currentPlanId",
|
|
37
|
+
select: "_id planName"
|
|
34
38
|
})
|
|
35
39
|
.lean();
|
|
36
40
|
if (!user) {
|
|
@@ -40,7 +44,7 @@ const authorize = () => {
|
|
|
40
44
|
throw new resHandler_1.UnauthorizedRequestError(utilities_1.SERVER_MESSAGES.SE_NO_ROLE_ASSIGNED_ROLE_INVALID);
|
|
41
45
|
}
|
|
42
46
|
const { createdAt, updatedAt, deletedAt, password } = user, rest = __rest(user, ["createdAt", "updatedAt", "deletedAt", "password"]);
|
|
43
|
-
req.user = rest;
|
|
47
|
+
req.user = Object.assign({}, rest);
|
|
44
48
|
if (req.user && user.role === email_builder_utils_1.ROLES.ADMIN) {
|
|
45
49
|
req.user.isAdmin = true;
|
|
46
50
|
req.user.groups.push({ name: "DEFAULT", features: Object.values(email_builder_utils_1.FEATURE_TYPE).map((value) => ({ name: value })) });
|
package/dist/types/IRequest.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IRequest.d.ts","sourceRoot":"","sources":["../../src/types/IRequest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE1E,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,KAAK,CAAC;IACZ,UAAU,EAAE,cAAc,CAAC;IAC3B,MAAM,EAAE,KAAK,CAAC;QACV,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,YAAY,CAAA;SAAE,CAAC,CAAA;KAC1C,CAAC,CAAA;IACF,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"IRequest.d.ts","sourceRoot":"","sources":["../../src/types/IRequest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE1E,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,KAAK,CAAC;IACZ,UAAU,EAAE,cAAc,CAAC;IAC3B,MAAM,EAAE,KAAK,CAAC;QACV,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,YAAY,CAAA;SAAE,CAAC,CAAA;KAC1C,CAAC,CAAA;IACF,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,QAAS,SAAQ,OAAO;IACrC,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,IAAI,CAAC,EAAE,GAAG,CAAC;CACd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cryptoUtils.d.ts","sourceRoot":"","sources":["../../src/utilities/cryptoUtils.ts"],"names":[],"mappings":"AAKA,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAM5C;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQ5C"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.encrypt = encrypt;
|
|
7
|
+
exports.decrypt = decrypt;
|
|
8
|
+
const crypto_1 = __importDefault(require("crypto"));
|
|
9
|
+
const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY || '2c6ee24b09816a6f14f95d2838a429d8e5e8b028fbd421d24fc43b96b4a9f3c0'; // Must be 32 bytes (256 bits)
|
|
10
|
+
const IV_LENGTH = 16;
|
|
11
|
+
function encrypt(text) {
|
|
12
|
+
const iv = crypto_1.default.randomBytes(IV_LENGTH);
|
|
13
|
+
const cipher = crypto_1.default.createCipheriv('aes-256-cbc', Buffer.from(ENCRYPTION_KEY), iv);
|
|
14
|
+
let encrypted = cipher.update(text, 'utf8', 'hex');
|
|
15
|
+
encrypted += cipher.final('hex');
|
|
16
|
+
return iv.toString('hex') + ':' + encrypted;
|
|
17
|
+
}
|
|
18
|
+
function decrypt(text) {
|
|
19
|
+
const parts = text.split(':');
|
|
20
|
+
const iv = Buffer.from(parts.shift(), 'hex');
|
|
21
|
+
const encryptedText = parts.join(':');
|
|
22
|
+
const decipher = crypto_1.default.createDecipheriv('aes-256-cbc', Buffer.from(ENCRYPTION_KEY), iv);
|
|
23
|
+
let decrypted = decipher.update(encryptedText, 'hex', 'utf8');
|
|
24
|
+
decrypted += decipher.final('utf8');
|
|
25
|
+
return decrypted;
|
|
26
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utilities/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utilities/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC"}
|
package/dist/utilities/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "biz-email-builder-shared",
|
|
3
|
-
"version": "1.6.
|
|
4
|
-
"main": "dist/index.js",
|
|
5
|
-
"types": "dist/index.d.ts",
|
|
6
|
-
"files": [
|
|
7
|
-
"dist"
|
|
8
|
-
],
|
|
9
|
-
"scripts": {
|
|
10
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
11
|
-
"build": "tsc",
|
|
12
|
-
"start": "npm run build && node dist/index.js"
|
|
13
|
-
},
|
|
14
|
-
"dependencies": {
|
|
15
|
-
"email-builder-utils": "^1.0.16",
|
|
16
|
-
"express": "^4.18.2",
|
|
17
|
-
"joi": "^17.11.0",
|
|
18
|
-
"jsonwebtoken": "^9.0.2",
|
|
19
|
-
"mongoose": "^8.10.1",
|
|
20
|
-
"nodemailer": "^6.10.0",
|
|
21
|
-
"typescript": "^5.3.3"
|
|
22
|
-
},
|
|
23
|
-
"devDependencies": {
|
|
24
|
-
"@types/express": "^4.17.21",
|
|
25
|
-
"@types/jsonwebtoken": "^9.0.5",
|
|
26
|
-
"@types/nodemailer": "^6.4.17"
|
|
27
|
-
},
|
|
28
|
-
"keywords": [],
|
|
29
|
-
"author": "",
|
|
30
|
-
"license": "ISC",
|
|
31
|
-
"description": ""
|
|
32
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "biz-email-builder-shared",
|
|
3
|
+
"version": "1.6.12",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
11
|
+
"build": "tsc",
|
|
12
|
+
"start": "npm run build && node dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"email-builder-utils": "^1.0.16",
|
|
16
|
+
"express": "^4.18.2",
|
|
17
|
+
"joi": "^17.11.0",
|
|
18
|
+
"jsonwebtoken": "^9.0.2",
|
|
19
|
+
"mongoose": "^8.10.1",
|
|
20
|
+
"nodemailer": "^6.10.0",
|
|
21
|
+
"typescript": "^5.3.3"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/express": "^4.17.21",
|
|
25
|
+
"@types/jsonwebtoken": "^9.0.5",
|
|
26
|
+
"@types/nodemailer": "^6.4.17"
|
|
27
|
+
},
|
|
28
|
+
"keywords": [],
|
|
29
|
+
"author": "",
|
|
30
|
+
"license": "ISC",
|
|
31
|
+
"description": ""
|
|
32
|
+
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import mongoose from "mongoose";
|
|
2
|
-
export interface ISubscription extends Document {
|
|
3
|
-
planName: string;
|
|
4
|
-
emailSentCount: number;
|
|
5
|
-
privateTemplateCount: number;
|
|
6
|
-
publicTemplateCount: number;
|
|
7
|
-
isConfigurationAllowed: boolean;
|
|
8
|
-
isDeleted: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare const SubscriptionModel: mongoose.Model<ISubscription, {}, {}, {}, mongoose.Document<unknown, {}, ISubscription> & ISubscription & {
|
|
11
|
-
_id: mongoose.Types.ObjectId;
|
|
12
|
-
} & {
|
|
13
|
-
__v: number;
|
|
14
|
-
}, any>;
|
|
15
|
-
//# sourceMappingURL=subscription.entity.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subscription.entity.d.ts","sourceRoot":"","sources":["../../src/entity/subscription.entity.ts"],"names":[],"mappings":"AAAA,OAAO,QAA2B,MAAM,UAAU,CAAC;AAEnD,MAAM,WAAW,aAAc,SAAQ,QAAQ;IAC7C,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,sBAAsB,EAAE,OAAO,CAAC;IAChC,SAAS,EAAE,OAAO,CAAC;CACpB;AAaD,eAAO,MAAM,iBAAiB;;;;OAA2D,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SubscriptionModel = void 0;
|
|
4
|
-
const mongoose_1 = require("mongoose");
|
|
5
|
-
const SubscriptionSchema = new mongoose_1.Schema({
|
|
6
|
-
planName: { type: String, required: true },
|
|
7
|
-
emailSentCount: { type: Number, default: 0 },
|
|
8
|
-
privateTemplateCount: { type: Number, default: 0 },
|
|
9
|
-
publicTemplateCount: { type: Number, default: 0 },
|
|
10
|
-
isConfigurationAllowed: { type: Boolean, default: false },
|
|
11
|
-
isDeleted: { type: Boolean, default: false }
|
|
12
|
-
}, { timestamps: true, });
|
|
13
|
-
exports.SubscriptionModel = (0, mongoose_1.model)("Subscription", SubscriptionSchema);
|