biz-email-builder-shared 1.6.3 → 1.6.5
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/feature.entitiy.d.ts +4 -2
- package/dist/entity/feature.entitiy.d.ts.map +1 -1
- package/dist/entity/template.entity.d.ts +4 -2
- package/dist/entity/template.entity.d.ts.map +1 -1
- package/dist/entity/templateShare.entity.d.ts +5 -3
- package/dist/entity/templateShare.entity.d.ts.map +1 -1
- package/dist/entity/templateShare.entity.js +2 -2
- package/dist/entity/user-group.entitty.d.ts +4 -2
- package/dist/entity/user-group.entitty.d.ts.map +1 -1
- package/dist/entity/user.entity.d.ts +6 -3
- package/dist/entity/user.entity.d.ts.map +1 -1
- package/dist/entity/user.entity.js +3 -2
- package/dist/middleware/authentication.d.ts +1 -1
- package/dist/middleware/authentication.d.ts.map +1 -1
- package/dist/middleware/authentication.js +4 -3
- package/dist/middleware/schemaValidate.js +1 -1
- package/dist/types/IRequest.d.ts +2 -1
- package/dist/types/IRequest.d.ts.map +1 -1
- package/dist/utilities/index.d.ts +0 -35
- package/dist/utilities/index.d.ts.map +1 -1
- package/dist/utilities/index.js +0 -43
- package/package.json +2 -2
|
@@ -7,8 +7,10 @@ interface IFeature {
|
|
|
7
7
|
deletedAt: Date;
|
|
8
8
|
updateBy: Types.ObjectId;
|
|
9
9
|
}
|
|
10
|
-
export declare const FeatureModel: import("mongoose").Model<IFeature, {}, {}, {}, import("mongoose").Document<unknown, {}, IFeature> &
|
|
10
|
+
export declare const FeatureModel: import("mongoose").Model<IFeature, {}, {}, {}, import("mongoose").Document<unknown, {}, IFeature> & IFeature & {
|
|
11
11
|
_id: Types.ObjectId;
|
|
12
|
-
}
|
|
12
|
+
} & {
|
|
13
|
+
__v: number;
|
|
14
|
+
}, any>;
|
|
13
15
|
export {};
|
|
14
16
|
//# sourceMappingURL=feature.entitiy.d.ts.map
|
|
@@ -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;SACi1I,MAAO,QAAQ;;;OADpzI,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ITemplateLayout } from "../types";
|
|
2
|
-
export declare const TemplateModel: import("mongoose").Model<ITemplateLayout, {}, {}, {}, import("mongoose").Document<unknown, {}, ITemplateLayout> &
|
|
2
|
+
export declare const TemplateModel: import("mongoose").Model<ITemplateLayout, {}, {}, {}, import("mongoose").Document<unknown, {}, ITemplateLayout> & ITemplateLayout & {
|
|
3
3
|
_id: import("mongoose").Types.ObjectId;
|
|
4
|
-
}
|
|
4
|
+
} & {
|
|
5
|
+
__v: number;
|
|
6
|
+
}, any>;
|
|
5
7
|
//# sourceMappingURL=template.entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template.entity.d.ts","sourceRoot":"","sources":["../../src/entity/template.entity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAgE3C,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"template.entity.d.ts","sourceRoot":"","sources":["../../src/entity/template.entity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAgE3C,eAAO,MAAM,aAAa;;;;OAAqD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { OWNERSHIP_TYPE } from "email-builder-utils";
|
|
1
2
|
import { Types } from "mongoose";
|
|
2
|
-
import { OWNERSHIP_TYPE } from "../utilities";
|
|
3
3
|
interface ITemplateShare {
|
|
4
4
|
sharedBy: Types.ObjectId;
|
|
5
5
|
sharedTo: Types.ObjectId;
|
|
@@ -12,8 +12,10 @@ interface ITemplateShare {
|
|
|
12
12
|
createdAt: Date;
|
|
13
13
|
updatedAt: Date;
|
|
14
14
|
}
|
|
15
|
-
export declare const TemplateShareModel: import("mongoose").Model<ITemplateShare, {}, {}, {}, import("mongoose").Document<unknown, {}, ITemplateShare> &
|
|
15
|
+
export declare const TemplateShareModel: import("mongoose").Model<ITemplateShare, {}, {}, {}, import("mongoose").Document<unknown, {}, ITemplateShare> & ITemplateShare & {
|
|
16
16
|
_id: Types.ObjectId;
|
|
17
|
-
}
|
|
17
|
+
} & {
|
|
18
|
+
__v: number;
|
|
19
|
+
}, any>;
|
|
18
20
|
export {};
|
|
19
21
|
//# sourceMappingURL=templateShare.entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templateShare.entity.d.ts","sourceRoot":"","sources":["../../src/entity/templateShare.entity.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
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;SAC0yH,MAAO,QAAQ;;;OAD1vH,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TemplateShareModel = void 0;
|
|
4
|
+
const email_builder_utils_1 = require("email-builder-utils");
|
|
4
5
|
const mongoose_1 = require("mongoose");
|
|
5
|
-
const utilities_1 = require("../utilities");
|
|
6
6
|
const TemplateShareSchema = new mongoose_1.Schema({
|
|
7
7
|
sharedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'user', required: true },
|
|
8
8
|
sharedTo: { type: mongoose_1.Schema.Types.ObjectId, ref: 'user', required: true },
|
|
9
9
|
templateId: { type: mongoose_1.Schema.Types.ObjectId, ref: 'template', required: true },
|
|
10
|
-
accessType: { type: String, enum: Object.values(
|
|
10
|
+
accessType: { type: String, enum: Object.values(email_builder_utils_1.OWNERSHIP_TYPE), required: true },
|
|
11
11
|
comment: { type: String, default: "" },
|
|
12
12
|
isRevoked: { type: Boolean, default: false },
|
|
13
13
|
revokedAt: { type: Date, default: null },
|
|
@@ -8,8 +8,10 @@ interface IUserGroup {
|
|
|
8
8
|
features: Types.ObjectId[];
|
|
9
9
|
updateBy: Types.ObjectId;
|
|
10
10
|
}
|
|
11
|
-
export declare const UserGroupModel: import("mongoose").Model<IUserGroup, {}, {}, {}, import("mongoose").Document<unknown, {}, IUserGroup> &
|
|
11
|
+
export declare const UserGroupModel: import("mongoose").Model<IUserGroup, {}, {}, {}, import("mongoose").Document<unknown, {}, IUserGroup> & IUserGroup & {
|
|
12
12
|
_id: Types.ObjectId;
|
|
13
|
-
}
|
|
13
|
+
} & {
|
|
14
|
+
__v: number;
|
|
15
|
+
}, any>;
|
|
14
16
|
export {};
|
|
15
17
|
//# sourceMappingURL=user-group.entitty.d.ts.map
|
|
@@ -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;SACgsI,MAAO,QAAQ;;;OAD5pI,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Types } from "mongoose";
|
|
2
|
-
import { ROLES } from "
|
|
2
|
+
import { ROLES } from "email-builder-utils";
|
|
3
3
|
interface IUser {
|
|
4
|
+
name: string;
|
|
4
5
|
email: string | null;
|
|
5
6
|
password: string;
|
|
6
7
|
role: ROLES;
|
|
@@ -13,8 +14,10 @@ interface IUser {
|
|
|
13
14
|
isDeleted: boolean;
|
|
14
15
|
updateBy: Types.ObjectId;
|
|
15
16
|
}
|
|
16
|
-
export declare const UserModel: import("mongoose").Model<IUser, {}, {}, {}, import("mongoose").Document<unknown, {}, IUser> &
|
|
17
|
+
export declare const UserModel: import("mongoose").Model<IUser, {}, {}, {}, import("mongoose").Document<unknown, {}, IUser> & IUser & {
|
|
17
18
|
_id: Types.ObjectId;
|
|
18
|
-
}
|
|
19
|
+
} & {
|
|
20
|
+
__v: number;
|
|
21
|
+
}, any>;
|
|
19
22
|
export {};
|
|
20
23
|
//# sourceMappingURL=user.entity.d.ts.map
|
|
@@ -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,
|
|
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,CAAA;CACzB;AAoBD,eAAO,MAAM,SAAS;SACk0H,MAAO,QAAQ;;;OAD9yH,CAAC"}
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UserModel = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
|
-
const
|
|
5
|
+
const email_builder_utils_1 = require("email-builder-utils");
|
|
6
6
|
const UserSchema = new mongoose_1.Schema({
|
|
7
|
+
name: { type: String, required: true },
|
|
7
8
|
email: { type: String, unique: true, sparse: true },
|
|
8
9
|
password: { type: String, default: null },
|
|
9
|
-
role: { type: String, default:
|
|
10
|
+
role: { type: String, default: email_builder_utils_1.ROLES.USER, enum: Object.values(email_builder_utils_1.ROLES) },
|
|
10
11
|
isVerified: { type: Boolean, default: false },
|
|
11
12
|
verificationToken: { type: String },
|
|
12
13
|
deletedAt: { type: Date, default: null },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Response, NextFunction } from "express";
|
|
2
|
-
import { FEATURE_TYPE, ROLES } from "../utilities";
|
|
3
2
|
import { IRequest } from "../types";
|
|
3
|
+
import { FEATURE_TYPE, ROLES } from "email-builder-utils";
|
|
4
4
|
declare const authorize: () => (req: IRequest, res: Response, next: NextFunction) => Promise<void>;
|
|
5
5
|
declare const checkRoleAccess: (roles: ROLES[]) => (req: IRequest, res: Response, next: NextFunction) => Promise<void>;
|
|
6
6
|
declare const checkFeatureAccess: (features: FEATURE_TYPE[]) => (req: IRequest, res: Response, next: NextFunction) => Promise<void>;
|
|
@@ -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;
|
|
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,kBA0CxE,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"}
|
|
@@ -15,6 +15,7 @@ exports.checkRoleAccess = exports.checkFeatureAccess = exports.authorize = void
|
|
|
15
15
|
const utilities_1 = require("../utilities");
|
|
16
16
|
const entity_1 = require("../entity");
|
|
17
17
|
const resHandler_1 = require("../resHandler");
|
|
18
|
+
const email_builder_utils_1 = require("email-builder-utils");
|
|
18
19
|
const authorize = () => {
|
|
19
20
|
return async function (req, res, next) {
|
|
20
21
|
try {
|
|
@@ -35,14 +36,14 @@ const authorize = () => {
|
|
|
35
36
|
if (!user) {
|
|
36
37
|
throw new resHandler_1.UnauthorizedRequestError(utilities_1.SERVER_MESSAGES.SE_USER_NOT_FOUND);
|
|
37
38
|
}
|
|
38
|
-
if (user.role === undefined || user.role === null || !Object.values(
|
|
39
|
+
if (user.role === undefined || user.role === null || !Object.values(email_builder_utils_1.ROLES).includes(user.role)) {
|
|
39
40
|
throw new resHandler_1.UnauthorizedRequestError(utilities_1.SERVER_MESSAGES.SE_NO_ROLE_ASSIGNED_ROLE_INVALID);
|
|
40
41
|
}
|
|
41
42
|
const { createdAt, updatedAt, deletedAt, password } = user, rest = __rest(user, ["createdAt", "updatedAt", "deletedAt", "password"]);
|
|
42
43
|
req.user = rest;
|
|
43
|
-
if (req.user && user.role ===
|
|
44
|
+
if (req.user && user.role === email_builder_utils_1.ROLES.ADMIN) {
|
|
44
45
|
req.user.isAdmin = true;
|
|
45
|
-
req.user.groups.push({ name: "DEFAULT", features: Object.values(
|
|
46
|
+
req.user.groups.push({ name: "DEFAULT", features: Object.values(email_builder_utils_1.FEATURE_TYPE).map((value) => ({ name: value })) });
|
|
46
47
|
}
|
|
47
48
|
next();
|
|
48
49
|
}
|
|
@@ -8,7 +8,7 @@ const validateSchema = (schema) => {
|
|
|
8
8
|
const { error } = schema.validate(req.body, { abortEarly: false });
|
|
9
9
|
if (error) {
|
|
10
10
|
const errorMessage = error.details.map((err) => err.message).join(", ");
|
|
11
|
-
|
|
11
|
+
return next(new resHandler_1.BadRequestError(`${utilities_1.SERVER_MESSAGES.SE_INVALID_INPUT}: ${errorMessage}`));
|
|
12
12
|
}
|
|
13
13
|
else {
|
|
14
14
|
next();
|
package/dist/types/IRequest.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Request } from "express";
|
|
2
|
-
import { FEATURE_TYPE, OWNERSHIP_TYPE, ROLES } from "
|
|
2
|
+
import { FEATURE_TYPE, OWNERSHIP_TYPE, ROLES } from "email-builder-utils";
|
|
3
3
|
export interface IRequestUser {
|
|
4
|
+
name: string;
|
|
4
5
|
email: string | null;
|
|
5
6
|
role: ROLES;
|
|
6
7
|
accessType: OWNERSHIP_TYPE;
|
|
@@ -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,
|
|
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;CACf;AAED,MAAM,WAAW,QAAS,SAAQ,OAAO;IACrC,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,IAAI,CAAC,EAAE,GAAG,CAAC;CACd"}
|
|
@@ -3,39 +3,4 @@ export * from "./createFolder";
|
|
|
3
3
|
export * from "./encryptionUtils";
|
|
4
4
|
export * from "./sendMailViaGmail";
|
|
5
5
|
export * from "./serverMessages";
|
|
6
|
-
export declare enum ROLES {
|
|
7
|
-
ADMIN = "ADMIN",
|
|
8
|
-
USER = "USER"
|
|
9
|
-
}
|
|
10
|
-
export declare enum RECORD_TYPE {
|
|
11
|
-
ALL = "ALL",
|
|
12
|
-
ARCHIVE = "ARCHIVE",
|
|
13
|
-
NON_ARCHIVE = "NON_ARCHIVE"
|
|
14
|
-
}
|
|
15
|
-
export declare enum OWNERSHIP_TYPE {
|
|
16
|
-
OWNER = "OWNER",
|
|
17
|
-
CO_OWNER = "CO_OWNER",
|
|
18
|
-
VIEWER = "VIEWER",
|
|
19
|
-
EDITOR = "EDITOR"
|
|
20
|
-
}
|
|
21
|
-
export declare enum FEATURE_TYPE {
|
|
22
|
-
ADD_USER = "ADD_USER",
|
|
23
|
-
DELETE_USER = "DELETE_USER",
|
|
24
|
-
UPDATE_USER = "UPDATE_USER",
|
|
25
|
-
LIST_USER = "LIST_USER",
|
|
26
|
-
ADD_USER_GROUP = "ADD_USER_GROUP",
|
|
27
|
-
DELETE_USER_GROUP = "DELETE_USER_GROUP",
|
|
28
|
-
UPDATE_USER_GROUP = "UPDATE_USER_GROUP",
|
|
29
|
-
LIST_USER_GROUP = "LIST_USER_GROUP",
|
|
30
|
-
GET_USER_GROUP = "GET_USER_GROUP",
|
|
31
|
-
PREVIEW_PRE_BUILT_TEMPLATE = "PREVIEW_PRE_BUILT_TEMPLATE",
|
|
32
|
-
CLONE_TEMPLATE = "CLONE_TEMPLATE",
|
|
33
|
-
CREATE_TEMPLATE = "CREATE_TEMPLATE",
|
|
34
|
-
GET_TEMPLATE = "GET_TEMPLATE",
|
|
35
|
-
DELETE_TEMPLATE = "DELETE_TEMPLATE",
|
|
36
|
-
SHARE_TEMPLATE = "SHARE_TEMPLATE",
|
|
37
|
-
UPDATE_TEAMPLATE = "UPDATE_TEAMPLATE",
|
|
38
|
-
LIST_TEMPLATE = "LIST_TEMPLATE",
|
|
39
|
-
SEND_EMAIL = "SEND_EMAIL"
|
|
40
|
-
}
|
|
41
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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"}
|
package/dist/utilities/index.js
CHANGED
|
@@ -14,51 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.FEATURE_TYPE = exports.OWNERSHIP_TYPE = exports.RECORD_TYPE = exports.ROLES = void 0;
|
|
18
17
|
__exportStar(require("./callWithRetries"), exports);
|
|
19
18
|
__exportStar(require("./createFolder"), exports);
|
|
20
19
|
__exportStar(require("./encryptionUtils"), exports);
|
|
21
20
|
__exportStar(require("./sendMailViaGmail"), exports);
|
|
22
21
|
__exportStar(require("./serverMessages"), exports);
|
|
23
|
-
var ROLES;
|
|
24
|
-
(function (ROLES) {
|
|
25
|
-
ROLES["ADMIN"] = "ADMIN";
|
|
26
|
-
ROLES["USER"] = "USER";
|
|
27
|
-
})(ROLES || (exports.ROLES = ROLES = {}));
|
|
28
|
-
var RECORD_TYPE;
|
|
29
|
-
(function (RECORD_TYPE) {
|
|
30
|
-
RECORD_TYPE["ALL"] = "ALL";
|
|
31
|
-
RECORD_TYPE["ARCHIVE"] = "ARCHIVE";
|
|
32
|
-
RECORD_TYPE["NON_ARCHIVE"] = "NON_ARCHIVE";
|
|
33
|
-
})(RECORD_TYPE || (exports.RECORD_TYPE = RECORD_TYPE = {}));
|
|
34
|
-
var OWNERSHIP_TYPE;
|
|
35
|
-
(function (OWNERSHIP_TYPE) {
|
|
36
|
-
OWNERSHIP_TYPE["OWNER"] = "OWNER";
|
|
37
|
-
OWNERSHIP_TYPE["CO_OWNER"] = "CO_OWNER";
|
|
38
|
-
OWNERSHIP_TYPE["VIEWER"] = "VIEWER";
|
|
39
|
-
OWNERSHIP_TYPE["EDITOR"] = "EDITOR";
|
|
40
|
-
})(OWNERSHIP_TYPE || (exports.OWNERSHIP_TYPE = OWNERSHIP_TYPE = {}));
|
|
41
|
-
var FEATURE_TYPE;
|
|
42
|
-
(function (FEATURE_TYPE) {
|
|
43
|
-
// MANAGE USER
|
|
44
|
-
FEATURE_TYPE["ADD_USER"] = "ADD_USER";
|
|
45
|
-
FEATURE_TYPE["DELETE_USER"] = "DELETE_USER";
|
|
46
|
-
FEATURE_TYPE["UPDATE_USER"] = "UPDATE_USER";
|
|
47
|
-
FEATURE_TYPE["LIST_USER"] = "LIST_USER";
|
|
48
|
-
// MANAGE GROUPS
|
|
49
|
-
FEATURE_TYPE["ADD_USER_GROUP"] = "ADD_USER_GROUP";
|
|
50
|
-
FEATURE_TYPE["DELETE_USER_GROUP"] = "DELETE_USER_GROUP";
|
|
51
|
-
FEATURE_TYPE["UPDATE_USER_GROUP"] = "UPDATE_USER_GROUP";
|
|
52
|
-
FEATURE_TYPE["LIST_USER_GROUP"] = "LIST_USER_GROUP";
|
|
53
|
-
FEATURE_TYPE["GET_USER_GROUP"] = "GET_USER_GROUP";
|
|
54
|
-
// MANAGE TEMPLATE
|
|
55
|
-
FEATURE_TYPE["PREVIEW_PRE_BUILT_TEMPLATE"] = "PREVIEW_PRE_BUILT_TEMPLATE";
|
|
56
|
-
FEATURE_TYPE["CLONE_TEMPLATE"] = "CLONE_TEMPLATE";
|
|
57
|
-
FEATURE_TYPE["CREATE_TEMPLATE"] = "CREATE_TEMPLATE";
|
|
58
|
-
FEATURE_TYPE["GET_TEMPLATE"] = "GET_TEMPLATE";
|
|
59
|
-
FEATURE_TYPE["DELETE_TEMPLATE"] = "DELETE_TEMPLATE";
|
|
60
|
-
FEATURE_TYPE["SHARE_TEMPLATE"] = "SHARE_TEMPLATE";
|
|
61
|
-
FEATURE_TYPE["UPDATE_TEAMPLATE"] = "UPDATE_TEAMPLATE";
|
|
62
|
-
FEATURE_TYPE["LIST_TEMPLATE"] = "LIST_TEMPLATE";
|
|
63
|
-
FEATURE_TYPE["SEND_EMAIL"] = "SEND_EMAIL";
|
|
64
|
-
})(FEATURE_TYPE || (exports.FEATURE_TYPE = FEATURE_TYPE = {}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "biz-email-builder-shared",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.5",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"start": "npm run build && node dist/index.js"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"email-builder-utils": "^1.0.
|
|
15
|
+
"email-builder-utils": "^1.0.16",
|
|
16
16
|
"express": "^4.18.2",
|
|
17
17
|
"joi": "^17.11.0",
|
|
18
18
|
"jsonwebtoken": "^9.0.2",
|