biz-email-builder-shared 1.6.2 → 1.6.3
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":"template.entity.d.ts","sourceRoot":"","sources":["../../src/entity/template.entity.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
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;;eAAqD,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TemplateModel = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
|
-
const
|
|
5
|
+
const email_builder_utils_1 = require("email-builder-utils");
|
|
6
6
|
const BlockDataPropsSchema = new mongoose_1.Schema({
|
|
7
7
|
imageUrl: { type: String, default: "" },
|
|
8
8
|
text: { type: String, default: "" },
|
|
@@ -21,7 +21,7 @@ const BlockSchema = new mongoose_1.Schema({
|
|
|
21
21
|
type: {
|
|
22
22
|
type: String,
|
|
23
23
|
required: true,
|
|
24
|
-
enum: Object.values(
|
|
24
|
+
enum: Object.values(email_builder_utils_1.BlockType),
|
|
25
25
|
},
|
|
26
26
|
data: BlockDataSchema,
|
|
27
27
|
}, { _id: false });
|
|
@@ -42,8 +42,8 @@ const TemplateSchema = new mongoose_1.Schema({
|
|
|
42
42
|
visibility: {
|
|
43
43
|
type: String,
|
|
44
44
|
required: true,
|
|
45
|
-
enum: Object.values(
|
|
46
|
-
default:
|
|
45
|
+
enum: Object.values(email_builder_utils_1.visibility),
|
|
46
|
+
default: email_builder_utils_1.visibility.PRIVATE
|
|
47
47
|
},
|
|
48
48
|
user: { type: mongoose_1.Schema.Types.ObjectId, ref: 'user' },
|
|
49
49
|
updateBy: { type: mongoose_1.Schema.Types.ObjectId, ref: 'user' },
|
|
@@ -1,20 +1,5 @@
|
|
|
1
|
+
import { BlockType, visibility } from "email-builder-utils";
|
|
1
2
|
import { Types } from "mongoose";
|
|
2
|
-
export declare enum BlockType {
|
|
3
|
-
TEXT = "Text",
|
|
4
|
-
IMAGE = "Image",
|
|
5
|
-
BUTTON = "Button",
|
|
6
|
-
GRID = "Grid",
|
|
7
|
-
EMPTY = "EMPTY",
|
|
8
|
-
GRIDCELL = "GridCell",
|
|
9
|
-
SPACER = "Spacer",
|
|
10
|
-
DIVIDER = "Divider",
|
|
11
|
-
EMAILLAYOUT = "EmailLayout"
|
|
12
|
-
}
|
|
13
|
-
export declare enum visibility {
|
|
14
|
-
PUBLIC = "PUBLIC",
|
|
15
|
-
PRIVATE = "PRIVATE",
|
|
16
|
-
PRE_DEFINED = "PRE_DEFINED"
|
|
17
|
-
}
|
|
18
3
|
interface IProps {
|
|
19
4
|
imageUrl: string;
|
|
20
5
|
text: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ITemplate.d.ts","sourceRoot":"","sources":["../../src/types/ITemplate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ITemplate.d.ts","sourceRoot":"","sources":["../../src/types/ITemplate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,UAAU,MAAM;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,UAAU,MAAM;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IAC1B,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,EAAE,CAAC;KACtB,CAAC;CACF;AAED,MAAM,WAAW,eAAe;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC;IACrB,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAChC,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,CAAC;IACzB,UAAU,EAAE,UAAU,CAAC;CACvB"}
|
package/dist/types/ITemplate.js
CHANGED
|
@@ -1,21 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.visibility = exports.BlockType = void 0;
|
|
4
|
-
var BlockType;
|
|
5
|
-
(function (BlockType) {
|
|
6
|
-
BlockType["TEXT"] = "Text";
|
|
7
|
-
BlockType["IMAGE"] = "Image";
|
|
8
|
-
BlockType["BUTTON"] = "Button";
|
|
9
|
-
BlockType["GRID"] = "Grid";
|
|
10
|
-
BlockType["EMPTY"] = "EMPTY";
|
|
11
|
-
BlockType["GRIDCELL"] = "GridCell";
|
|
12
|
-
BlockType["SPACER"] = "Spacer";
|
|
13
|
-
BlockType["DIVIDER"] = "Divider";
|
|
14
|
-
BlockType["EMAILLAYOUT"] = "EmailLayout";
|
|
15
|
-
})(BlockType || (exports.BlockType = BlockType = {}));
|
|
16
|
-
var visibility;
|
|
17
|
-
(function (visibility) {
|
|
18
|
-
visibility["PUBLIC"] = "PUBLIC";
|
|
19
|
-
visibility["PRIVATE"] = "PRIVATE";
|
|
20
|
-
visibility["PRE_DEFINED"] = "PRE_DEFINED";
|
|
21
|
-
})(visibility || (exports.visibility = visibility = {}));
|
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.3",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"start": "npm run build && node dist/index.js"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
+
"email-builder-utils": "^1.0.2",
|
|
15
16
|
"express": "^4.18.2",
|
|
16
17
|
"joi": "^17.11.0",
|
|
17
18
|
"jsonwebtoken": "^9.0.2",
|