biz-email-builder-shared 1.6.8 → 1.6.10

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.
@@ -3,4 +3,6 @@ export * from "./template.entity";
3
3
  export * from "./user-group.entitty";
4
4
  export * from "./feature.entitiy";
5
5
  export * from "./templateShare.entity";
6
+ export * from "./subscriptionPlan.entity";
7
+ export * from "./planHistory.entity";
6
8
  //# sourceMappingURL=index.d.ts.map
@@ -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"}
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"}
@@ -19,3 +19,5 @@ __exportStar(require("./template.entity"), exports);
19
19
  __exportStar(require("./user-group.entitty"), exports);
20
20
  __exportStar(require("./feature.entitiy"), exports);
21
21
  __exportStar(require("./templateShare.entity"), exports);
22
+ __exportStar(require("./subscriptionPlan.entity"), exports);
23
+ __exportStar(require("./planHistory.entity"), exports);
@@ -0,0 +1,24 @@
1
+ import mongoose from "mongoose";
2
+ export interface IPlanHistory extends Document {
3
+ userId: mongoose.Types.ObjectId;
4
+ subscriptionId: mongoose.Types.ObjectId;
5
+ purchaseDate: Date;
6
+ expiryDate?: Date;
7
+ isTransactionSuccessfull: boolean;
8
+ updatedBy: mongoose.Types.ObjectId;
9
+ }
10
+ export declare const PlanHistorySchema: mongoose.Schema<IPlanHistory, mongoose.Model<IPlanHistory, any, any, any, mongoose.Document<unknown, any, IPlanHistory> & IPlanHistory & {
11
+ _id: mongoose.Types.ObjectId;
12
+ } & {
13
+ __v: number;
14
+ }, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, IPlanHistory, mongoose.Document<unknown, {}, mongoose.FlatRecord<IPlanHistory>> & mongoose.FlatRecord<IPlanHistory> & {
15
+ _id: mongoose.Types.ObjectId;
16
+ } & {
17
+ __v: number;
18
+ }>;
19
+ export declare const PlanHistoryModel: mongoose.Model<IPlanHistory, {}, {}, {}, mongoose.Document<unknown, {}, IPlanHistory> & IPlanHistory & {
20
+ _id: mongoose.Types.ObjectId;
21
+ } & {
22
+ __v: number;
23
+ }, any>;
24
+ //# sourceMappingURL=planHistory.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planHistory.entity.d.ts","sourceRoot":"","sources":["../../src/entity/planHistory.entity.ts"],"names":[],"mappings":"AAAA,OAAO,QAA2B,MAAM,UAAU,CAAC;AAEnD,MAAM,WAAW,YAAa,SAAQ,QAAQ;IAC5C,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;IAChC,cAAc,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;IACxC,YAAY,EAAE,IAAI,CAAC;IACnB,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,wBAAwB,EAAE,OAAO,CAAC;IAClC,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;CACpC;AAED,eAAO,MAAM,iBAAiB;;;;;;;;EAON,CAAC;AAEzB,eAAO,MAAM,gBAAgB;;;;OAAyD,CAAA"}
@@ -0,0 +1,46 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.PlanHistoryModel = exports.PlanHistorySchema = void 0;
37
+ const mongoose_1 = __importStar(require("mongoose"));
38
+ exports.PlanHistorySchema = new mongoose_1.Schema({
39
+ userId: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "User", required: true },
40
+ subscriptionId: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "Subscription", required: true },
41
+ purchaseDate: { type: Date, required: true },
42
+ expiryDate: { type: Date, default: null },
43
+ isTransactionSuccessfull: { type: Boolean, required: true },
44
+ updatedBy: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "User", required: true }
45
+ }, { timestamps: true });
46
+ exports.PlanHistoryModel = (0, mongoose_1.model)("plan-history", exports.PlanHistorySchema);
@@ -5,6 +5,7 @@ export interface ISubscription extends Document {
5
5
  privateTemplateCount: number;
6
6
  publicTemplateCount: number;
7
7
  isConfigurationAllowed: boolean;
8
+ isDeleted: boolean;
8
9
  }
9
10
  export declare const SubscriptionModel: mongoose.Model<ISubscription, {}, {}, {}, mongoose.Document<unknown, {}, ISubscription> & ISubscription & {
10
11
  _id: mongoose.Types.ObjectId;
@@ -1 +1 @@
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;CACjC;AAeD,eAAO,MAAM,iBAAiB;;;;OAA2D,CAAC"}
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"}
@@ -7,8 +7,7 @@ const SubscriptionSchema = new mongoose_1.Schema({
7
7
  emailSentCount: { type: Number, default: 0 },
8
8
  privateTemplateCount: { type: Number, default: 0 },
9
9
  publicTemplateCount: { type: Number, default: 0 },
10
- isConfigurationAllowed: { type: Boolean, default: false }
11
- }, {
12
- timestamps: true,
13
- });
10
+ isConfigurationAllowed: { type: Boolean, default: false },
11
+ isDeleted: { type: Boolean, default: false }
12
+ }, { timestamps: true, });
14
13
  exports.SubscriptionModel = (0, mongoose_1.model)("Subscription", SubscriptionSchema);
@@ -0,0 +1,17 @@
1
+ import mongoose from "mongoose";
2
+ export interface ISubscriptionPlan extends Document {
3
+ planName: string;
4
+ emailSentCount: number;
5
+ privateTemplateCount: number;
6
+ publicTemplateCount: number;
7
+ isConfigurationAllowed: boolean;
8
+ isDeleted: boolean;
9
+ updatedBy: mongoose.Types.ObjectId;
10
+ deletedAt: Date;
11
+ }
12
+ export declare const SubscriptionPlanModel: mongoose.Model<ISubscriptionPlan, {}, {}, {}, mongoose.Document<unknown, {}, ISubscriptionPlan> & ISubscriptionPlan & {
13
+ _id: mongoose.Types.ObjectId;
14
+ } & {
15
+ __v: number;
16
+ }, any>;
17
+ //# sourceMappingURL=subscriptionPlan.entity.d.ts.map
@@ -0,0 +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,sBAAsB,EAAE,OAAO,CAAC;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;IACnC,SAAS,EAAE,IAAI,CAAC;CACjB;AAeD,eAAO,MAAM,qBAAqB;;;;OAAwE,CAAC"}
@@ -0,0 +1,48 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.SubscriptionPlanModel = void 0;
37
+ const mongoose_1 = __importStar(require("mongoose"));
38
+ const SubscriptionPlanSchema = new mongoose_1.Schema({
39
+ planName: { type: String, required: true },
40
+ emailSentCount: { type: Number, required: true },
41
+ privateTemplateCount: { type: Number, required: true },
42
+ publicTemplateCount: { type: Number, required: true },
43
+ isConfigurationAllowed: { type: Boolean, required: true },
44
+ isDeleted: { type: Boolean, default: false },
45
+ updatedBy: { type: mongoose_1.default.Schema.Types.ObjectId, ref: "User", required: true },
46
+ deletedAt: { type: Date, default: null }
47
+ }, { timestamps: true, });
48
+ exports.SubscriptionPlanModel = (0, mongoose_1.model)("subscription-plan", SubscriptionPlanSchema);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz-email-builder-shared",
3
- "version": "1.6.8",
3
+ "version": "1.6.10",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [