biz-email-builder-shared 1.6.98 → 1.6.103

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.
@@ -1 +1 @@
1
- {"version":3,"file":"branding.entity.d.ts","sourceRoot":"","sources":["../../src/entity/branding.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,QAAQ,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAE1D,MAAM,WAAW,MAAO,SAAQ,QAAQ;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACnD,UAAU,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC9D,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;CAC5B;AA8BD,eAAO,MAAM,UAAU;;;;OAAsC,CAAC"}
1
+ {"version":3,"file":"branding.entity.d.ts","sourceRoot":"","sources":["../../src/entity/branding.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,QAAQ,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAE1D,MAAM,WAAW,MAAO,SAAQ,QAAQ;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACnD,UAAU,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC9D,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;CAC5B;AAgCD,eAAO,MAAM,UAAU;;;;OAAsC,CAAC"}
@@ -10,6 +10,8 @@ const TypographySchema = new mongoose_1.Schema({
10
10
  text: { type: String, required: true },
11
11
  fontSize: { type: Number, required: true },
12
12
  hex: { type: String, required: true },
13
+ lineHeight: { type: Number, required: true },
14
+ fontWeight: { type: Number, required: true },
13
15
  }, { _id: false });
14
16
  const BrandSchema = new mongoose_1.Schema({
15
17
  name: { type: String, required: true, trim: true },
@@ -0,0 +1,18 @@
1
+ import { Document, Types } from "mongoose";
2
+ export interface IGroupUser extends Document {
3
+ groupId: Types.ObjectId;
4
+ firstName: string | null;
5
+ lastName: string | null;
6
+ email: string;
7
+ isDeleted: boolean;
8
+ deletedAt: Date | null;
9
+ updatedBy: Types.ObjectId;
10
+ createdAt: Date;
11
+ updatedAt: Date;
12
+ }
13
+ export declare const GroupUserModel: import("mongoose").Model<IGroupUser, {}, {}, {}, Document<unknown, {}, IGroupUser> & IGroupUser & Required<{
14
+ _id: unknown;
15
+ }> & {
16
+ __v: number;
17
+ }, any>;
18
+ //# sourceMappingURL=group-user.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"group-user.entity.d.ts","sourceRoot":"","sources":["../../src/entity/group-user.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAiB,KAAK,EAAE,MAAM,UAAU,CAAC;AAE1D,MAAM,WAAW,UAAW,SAAQ,QAAQ;IACxC,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC;IACxB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC1B,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACnB;AAiBD,eAAO,MAAM,cAAc;;;;OAAoD,CAAC"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GroupUserModel = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const GroupUserSchema = new mongoose_1.Schema({
6
+ groupId: { type: mongoose_1.Schema.Types.ObjectId, ref: "group", required: true },
7
+ firstName: { type: String, default: null },
8
+ lastName: { type: String, trim: true, default: null },
9
+ email: { type: String, required: true },
10
+ isDeleted: { type: Boolean, default: false },
11
+ deletedAt: { type: Date, default: null },
12
+ updatedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: "user", required: true },
13
+ }, {
14
+ timestamps: true,
15
+ });
16
+ exports.GroupUserModel = (0, mongoose_1.model)("group-user", GroupUserSchema);
@@ -0,0 +1,17 @@
1
+ import { Document, Types } from "mongoose";
2
+ export interface IGroup extends Document {
3
+ name: string;
4
+ organisationId: Types.ObjectId | null;
5
+ isDeleted: boolean;
6
+ deletedAt: Date | null;
7
+ updatedBy: Types.ObjectId;
8
+ createdBy: Types.ObjectId;
9
+ createdAt: Date;
10
+ updatedAt: Date;
11
+ }
12
+ export declare const GroupModel: import("mongoose").Model<IGroup, {}, {}, {}, Document<unknown, {}, IGroup> & IGroup & Required<{
13
+ _id: unknown;
14
+ }> & {
15
+ __v: number;
16
+ }, any>;
17
+ //# sourceMappingURL=group.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"group.entity.d.ts","sourceRoot":"","sources":["../../src/entity/group.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAiB,KAAK,EAAE,MAAM,UAAU,CAAC;AAE1D,MAAM,WAAW,MAAO,SAAQ,QAAQ;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC;IACtC,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC1B,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC1B,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAgBD,eAAO,MAAM,UAAU;;;;OAAsC,CAAC"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GroupModel = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const groupSchema = new mongoose_1.Schema({
6
+ name: { type: String, required: true },
7
+ organisationId: { type: mongoose_1.Schema.Types.ObjectId, ref: "organisation", required: false, default: null },
8
+ isDeleted: { type: Boolean, default: false },
9
+ deletedAt: { type: Date, default: null },
10
+ updatedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: "user", required: true },
11
+ createdBy: { type: mongoose_1.Schema.Types.ObjectId, ref: "user", required: true },
12
+ }, {
13
+ timestamps: true,
14
+ });
15
+ exports.GroupModel = (0, mongoose_1.model)("group", groupSchema);
@@ -16,4 +16,6 @@ export * from "./socket.entity";
16
16
  export * from "./campaign.entity";
17
17
  export * from "./campaignUsers.entity";
18
18
  export * from "./branding.entity";
19
+ export * from "./group.entity";
20
+ export * from "./group-user.entity";
19
21
  //# 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;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,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,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC"}
@@ -32,3 +32,5 @@ __exportStar(require("./socket.entity"), exports);
32
32
  __exportStar(require("./campaign.entity"), exports);
33
33
  __exportStar(require("./campaignUsers.entity"), exports);
34
34
  __exportStar(require("./branding.entity"), exports);
35
+ __exportStar(require("./group.entity"), exports);
36
+ __exportStar(require("./group-user.entity"), exports);
@@ -0,0 +1,24 @@
1
+ import { Types } from 'mongoose';
2
+ export declare enum PendingNotificationStatus {
3
+ PENDING = "pending",
4
+ ACCEPTED = "accepted",
5
+ EXPIRED = "expired",
6
+ CANCELLED = "cancelled"
7
+ }
8
+ export interface IPendingNotification {
9
+ templateId: Types.ObjectId;
10
+ requesterId: Types.ObjectId;
11
+ deferredBy: Types.ObjectId;
12
+ deferredAt: Date;
13
+ status: PendingNotificationStatus;
14
+ expiresAt: Date;
15
+ acceptedAt?: Date;
16
+ createdAt: Date;
17
+ updatedAt: Date;
18
+ }
19
+ export declare const PendingNotificationModel: import("mongoose").Model<IPendingNotification, {}, {}, {}, import("mongoose").Document<unknown, {}, IPendingNotification> & IPendingNotification & {
20
+ _id: Types.ObjectId;
21
+ } & {
22
+ __v: number;
23
+ }, any>;
24
+ //# sourceMappingURL=pendingNotification.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pendingNotification.entity.d.ts","sourceRoot":"","sources":["../../src/entity/pendingNotification.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,EAAE,MAAM,UAAU,CAAC;AAEhD,oBAAY,yBAAyB;IACnC,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,SAAS,cAAc;CACxB;AAED,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC3B,WAAW,EAAE,KAAK,CAAC,QAAQ,CAAC;IAE5B,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC3B,UAAU,EAAE,IAAI,CAAC;IACjB,MAAM,EAAE,yBAAyB,CAAC;IAClC,SAAS,EAAE,IAAI,CAAC;IAChB,UAAU,CAAC,EAAE,IAAI,CAAC;IAClB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAeD,eAAO,MAAM,wBAAwB;SAA0rH,MAAO,QAAQ;;;OAAxnH,CAAC"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PendingNotificationModel = exports.PendingNotificationStatus = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ var PendingNotificationStatus;
6
+ (function (PendingNotificationStatus) {
7
+ PendingNotificationStatus["PENDING"] = "pending";
8
+ PendingNotificationStatus["ACCEPTED"] = "accepted";
9
+ PendingNotificationStatus["EXPIRED"] = "expired";
10
+ PendingNotificationStatus["CANCELLED"] = "cancelled";
11
+ })(PendingNotificationStatus || (exports.PendingNotificationStatus = PendingNotificationStatus = {}));
12
+ const PendingNotificationSchema = new mongoose_1.Schema({
13
+ templateId: { type: mongoose_1.Schema.Types.ObjectId, ref: 'template', required: true },
14
+ requesterId: { type: mongoose_1.Schema.Types.ObjectId, ref: 'user', required: true },
15
+ // requesterName: { type: String, required: true, trim: true },
16
+ deferredBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'user', required: true },
17
+ deferredAt: { type: Date, default: Date.now, required: true },
18
+ status: { type: String, enum: Object.values(PendingNotificationStatus), default: PendingNotificationStatus.PENDING, },
19
+ expiresAt: { type: Date, required: true },
20
+ acceptedAt: { type: Date, default: null },
21
+ }, { timestamps: true });
22
+ exports.PendingNotificationModel = (0, mongoose_1.model)('pendingNotification', PendingNotificationSchema);
@@ -9,6 +9,7 @@ interface ITemplateShare {
9
9
  isRevoked: boolean;
10
10
  revokedAt: Date;
11
11
  revokedBy: Types.ObjectId;
12
+ organisationId: Types.ObjectId;
12
13
  createdAt: Date;
13
14
  updatedAt: Date;
14
15
  }
@@ -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;SACywH,MAAO,QAAQ;;;OADztH,CAAC"}
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,cAAc,EAAE,KAAK,CAAC,QAAQ,CAAC;IAC/B,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAgBD,eAAO,MAAM,kBAAkB;SACsoH,MAAO,QAAQ;;;OADtlH,CAAC"}
@@ -11,8 +11,7 @@ const TemplateShareSchema = new mongoose_1.Schema({
11
11
  comment: { type: String, default: "" },
12
12
  isRevoked: { type: Boolean, default: false },
13
13
  revokedAt: { type: Date, default: null },
14
- revokedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'user', required: true }
15
- }, {
16
- timestamps: true,
17
- });
14
+ revokedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'user', required: true },
15
+ organisationId: { type: mongoose_1.Schema.Types.ObjectId, ref: 'organisation', required: false, default: null },
16
+ }, { timestamps: true, });
18
17
  exports.TemplateShareModel = (0, mongoose_1.model)("template-share", TemplateShareSchema);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biz-email-builder-shared",
3
- "version": "1.6.98",
3
+ "version": "1.6.103",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [