@antelopejs/dms-mailing 0.2.2 → 0.3.0
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/README.md +4 -7
- package/dist/antelope-modules.d.ts +5 -5
- package/dist/antelope-modules.js +5 -5
- package/dist/antelope-modules.js.map +1 -1
- package/dist/constants.d.ts +0 -3
- package/dist/constants.js +1 -4
- package/dist/constants.js.map +1 -1
- package/dist/data-types/categories-type.d.ts +5 -5
- package/dist/pages/editor.js +0 -1
- package/dist/pages/editor.js.map +1 -1
- package/dist/pages/module.d.ts +1 -1
- package/dist/pages/overview.d.ts +5 -5
- package/dist/pages/overview.js +0 -1
- package/dist/pages/overview.js.map +1 -1
- package/dist/pages/sends.d.ts +3 -3
- package/dist/pages/sends.js +0 -1
- package/dist/pages/sends.js.map +1 -1
- package/dist/pages/settings/form.d.ts +1 -1
- package/dist/pages/settings/page.d.ts +2 -2
- package/dist/pages/settings/page.js +0 -2
- package/dist/pages/settings/page.js.map +1 -1
- package/dist/pages/templates.d.ts +1 -1
- package/dist/pages/templates.js +0 -1
- package/dist/pages/templates.js.map +1 -1
- package/dist/permissions.js +10 -32
- package/dist/permissions.js.map +1 -1
- package/dist/quick-actions.d.ts +2 -2
- package/dist/routes/templates.d.ts +2 -2
- package/dist/services/categories.d.ts +5 -5
- package/dist/test/antelope.test.js +1 -0
- package/dist/test/antelope.test.js.map +1 -1
- package/dist/test/unit/permissions.test.d.ts +1 -0
- package/dist/test/unit/permissions.test.js +27 -0
- package/dist/test/unit/permissions.test.js.map +1 -0
- package/dist/validation/settings.schema.d.ts +6 -6
- package/dist/validation/templates.schema.d.ts +14 -14
- package/frontend-vue/app/components/editor/EditorDataPanel.vue +3 -1
- package/package.json +10 -12
- package/src/antelope-modules.ts +5 -5
- package/src/constants.ts +0 -3
- package/src/pages/editor.ts +1 -2
- package/src/pages/overview.ts +0 -2
- package/src/pages/sends.ts +1 -7
- package/src/pages/settings/page.ts +1 -3
- package/src/pages/templates.ts +1 -7
- package/src/permissions.ts +14 -42
- package/src/routes/templates.ts +1 -1
- package/src/test/antelope.test.ts +2 -0
- package/src/test/unit/permissions.test.ts +30 -0
- package/frontend-vue/tests/email-render-cases.json +0 -77
package/README.md
CHANGED
|
@@ -130,7 +130,8 @@ pnpm frontend:dev # the DMS front-end, in another terminal
|
|
|
130
130
|
```
|
|
131
131
|
|
|
132
132
|
The backend listens on `http://localhost:5010` and needs a MongoDB on
|
|
133
|
-
`mongodb://localhost:27017` (database `playground_dms_mailing`)
|
|
133
|
+
`mongodb://localhost:27017` (database `playground_dms_mailing`); set
|
|
134
|
+
`MONGO_URL` to point the playground at another instance.
|
|
134
135
|
|
|
135
136
|
Both packages are public on npm, published under the `@antelopejs` scope with
|
|
136
137
|
npm trusted publishing and provenance. The interface package must be released
|
|
@@ -151,12 +152,8 @@ Every backend-declared text uses the `$key` convention: a string starting with
|
|
|
151
152
|
|
|
152
153
|
```sh
|
|
153
154
|
pnpm lint # oxlint + oxfmt + the layer's eslint
|
|
154
|
-
pnpm typecheck # tsconfig.json
|
|
155
|
+
pnpm typecheck # tsc --noEmit on tsconfig.json
|
|
155
156
|
pnpm knip # unused dependencies
|
|
156
|
-
pnpm build # tsconfig.
|
|
157
|
+
pnpm build # tsconfig.json -> dist/
|
|
157
158
|
pnpm test # backend (mocha through `ajs module test`) + layer (vitest)
|
|
158
|
-
pnpm test:frontend # generated client/SSR/email builds and Vue typecheck
|
|
159
159
|
```
|
|
160
|
-
|
|
161
|
-
The frontend check uses the published DMS and frontend adapter packages. It
|
|
162
|
-
renders English/French email fixtures locally and does not send email.
|
|
@@ -2,12 +2,12 @@ export declare const SHARED_MODULE_SOURCES: {
|
|
|
2
2
|
readonly dms: {
|
|
3
3
|
readonly type: "package";
|
|
4
4
|
readonly package: "@antelopejs/dms";
|
|
5
|
-
readonly version: ">=0.0
|
|
5
|
+
readonly version: ">=0.4.0 <1.0.0";
|
|
6
6
|
};
|
|
7
7
|
readonly mongodb: {
|
|
8
8
|
readonly type: "package";
|
|
9
9
|
readonly package: "@antelopejs/mongodb";
|
|
10
|
-
readonly version: "^1.3.
|
|
10
|
+
readonly version: "^1.3.1";
|
|
11
11
|
};
|
|
12
12
|
readonly "auth-jwt": {
|
|
13
13
|
readonly type: "package";
|
|
@@ -17,16 +17,16 @@ export declare const SHARED_MODULE_SOURCES: {
|
|
|
17
17
|
readonly api: {
|
|
18
18
|
readonly type: "package";
|
|
19
19
|
readonly package: "@antelopejs/api";
|
|
20
|
-
readonly version: "1.
|
|
20
|
+
readonly version: "^1.3.0";
|
|
21
21
|
};
|
|
22
22
|
readonly "file-storage-local": {
|
|
23
23
|
readonly type: "package";
|
|
24
24
|
readonly package: "@antelopejs/file-storage-local";
|
|
25
|
-
readonly version: "^0.1.
|
|
25
|
+
readonly version: "^0.1.5";
|
|
26
26
|
};
|
|
27
27
|
readonly nodemailer: {
|
|
28
28
|
readonly type: "package";
|
|
29
29
|
readonly package: "@antelopejs/nodemailer";
|
|
30
|
-
readonly version: "^0.0.
|
|
30
|
+
readonly version: "^0.0.5";
|
|
31
31
|
};
|
|
32
32
|
};
|
package/dist/antelope-modules.js
CHANGED
|
@@ -5,12 +5,12 @@ exports.SHARED_MODULE_SOURCES = {
|
|
|
5
5
|
dms: {
|
|
6
6
|
type: "package",
|
|
7
7
|
package: "@antelopejs/dms",
|
|
8
|
-
version: ">=0.0
|
|
8
|
+
version: ">=0.4.0 <1.0.0",
|
|
9
9
|
},
|
|
10
10
|
mongodb: {
|
|
11
11
|
type: "package",
|
|
12
12
|
package: "@antelopejs/mongodb",
|
|
13
|
-
version: "^1.3.
|
|
13
|
+
version: "^1.3.1",
|
|
14
14
|
},
|
|
15
15
|
"auth-jwt": {
|
|
16
16
|
type: "package",
|
|
@@ -20,17 +20,17 @@ exports.SHARED_MODULE_SOURCES = {
|
|
|
20
20
|
api: {
|
|
21
21
|
type: "package",
|
|
22
22
|
package: "@antelopejs/api",
|
|
23
|
-
version: "1.
|
|
23
|
+
version: "^1.3.0",
|
|
24
24
|
},
|
|
25
25
|
"file-storage-local": {
|
|
26
26
|
type: "package",
|
|
27
27
|
package: "@antelopejs/file-storage-local",
|
|
28
|
-
version: "^0.1.
|
|
28
|
+
version: "^0.1.5",
|
|
29
29
|
},
|
|
30
30
|
nodemailer: {
|
|
31
31
|
type: "package",
|
|
32
32
|
package: "@antelopejs/nodemailer",
|
|
33
|
-
version: "^0.0.
|
|
33
|
+
version: "^0.0.5",
|
|
34
34
|
},
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=antelope-modules.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"antelope-modules.js","sourceRoot":"","sources":["../src/antelope-modules.ts"],"names":[],"mappings":";;;AAgBa,QAAA,qBAAqB,GAAG;IACnC,GAAG,EAAE;QACH,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,iBAAiB;QAC1B,OAAO,EAAE,gBAAgB;KAC1B;IACD,OAAO,EAAE;QACP,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,qBAAqB;QAC9B,OAAO,EAAE,QAAQ;KAClB;IACD,UAAU,EAAE;QACV,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,sBAAsB;QAC/B,OAAO,EAAE,QAAQ;KAClB;IACD,GAAG,EAAE;QACH,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,iBAAiB;QAC1B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"antelope-modules.js","sourceRoot":"","sources":["../src/antelope-modules.ts"],"names":[],"mappings":";;;AAgBa,QAAA,qBAAqB,GAAG;IACnC,GAAG,EAAE;QACH,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,iBAAiB;QAC1B,OAAO,EAAE,gBAAgB;KAC1B;IACD,OAAO,EAAE;QACP,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,qBAAqB;QAC9B,OAAO,EAAE,QAAQ;KAClB;IACD,UAAU,EAAE;QACV,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,sBAAsB;QAC/B,OAAO,EAAE,QAAQ;KAClB;IACD,GAAG,EAAE;QACH,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,iBAAiB;QAC1B,OAAO,EAAE,QAAQ;KAClB;IACD,oBAAoB,EAAE;QACpB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,gCAAgC;QACzC,OAAO,EAAE,QAAQ;KAClB;IACD,UAAU,EAAE;QACV,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,wBAAwB;QACjC,OAAO,EAAE,QAAQ;KAClB;CACO,CAAC"}
|
package/dist/constants.d.ts
CHANGED
|
@@ -3,10 +3,7 @@ export declare const API_BASE_PATH = "/api/mailing";
|
|
|
3
3
|
export declare const TABLES_BASE_PATH = "/api/mailing/tables";
|
|
4
4
|
export declare const FRONTEND_MODULE_NAME = "@antelopejs/dms-mailing-frontend-vue";
|
|
5
5
|
export declare const EMAIL_TEMPLATE_NAME = "EmailMailingTemplate";
|
|
6
|
-
export declare const MAILING_ACCESS_PERMISSION = "mailing.access";
|
|
7
|
-
export declare const MAILING_TEMPLATES_MANAGE_PERMISSION = "mailing.templates.manage";
|
|
8
6
|
export declare const MAILING_SEND_PERMISSION = "mailing.send";
|
|
9
|
-
export declare const MAILING_SETTINGS_MANAGE_PERMISSION = "mailing.settings.manage";
|
|
10
7
|
export declare const OVERVIEW_PERIOD_SCOPE = "mailing-overview";
|
|
11
8
|
export declare const SENDS_PERIOD_SCOPE = "mailing-sends";
|
|
12
9
|
export declare const MAILING_SENDS_TOPIC = "mailing:sends";
|
package/dist/constants.js
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MAX_WINDOW_DAYS = exports.SYSTEM_VARIABLE_PATHS = exports.LOCALE_LIST_SEPARATOR = exports.HTTP_UNPROCESSABLE = exports.HTTP_CONFLICT = exports.HTTP_NOT_FOUND = exports.HTTP_FORBIDDEN = exports.HTTP_BAD_REQUEST = exports.SLUG_PATTERN = exports.MAX_NAME_LENGTH = exports.MAX_SLUG_LENGTH = exports.DEFAULT_LOG_RETENTION_DAYS = exports.DEFAULT_FALLBACK_LOCALE = exports.TEMPLATE_CATEGORY_TYPE_ID = exports.TEMPLATE_CATEGORIES_TYPE_ID = exports.GALLERY_DISPLAY_ID = exports.MAILING_SENDS_TOPIC = exports.SENDS_PERIOD_SCOPE = exports.OVERVIEW_PERIOD_SCOPE = exports.
|
|
3
|
+
exports.MAX_WINDOW_DAYS = exports.SYSTEM_VARIABLE_PATHS = exports.LOCALE_LIST_SEPARATOR = exports.HTTP_UNPROCESSABLE = exports.HTTP_CONFLICT = exports.HTTP_NOT_FOUND = exports.HTTP_FORBIDDEN = exports.HTTP_BAD_REQUEST = exports.SLUG_PATTERN = exports.MAX_NAME_LENGTH = exports.MAX_SLUG_LENGTH = exports.DEFAULT_LOG_RETENTION_DAYS = exports.DEFAULT_FALLBACK_LOCALE = exports.TEMPLATE_CATEGORY_TYPE_ID = exports.TEMPLATE_CATEGORIES_TYPE_ID = exports.GALLERY_DISPLAY_ID = exports.MAILING_SENDS_TOPIC = exports.SENDS_PERIOD_SCOPE = exports.OVERVIEW_PERIOD_SCOPE = exports.MAILING_SEND_PERMISSION = exports.EMAIL_TEMPLATE_NAME = exports.FRONTEND_MODULE_NAME = exports.TABLES_BASE_PATH = exports.API_BASE_PATH = exports.MODULE_ID = void 0;
|
|
4
4
|
exports.MODULE_ID = "mailing";
|
|
5
5
|
exports.API_BASE_PATH = "/api/mailing";
|
|
6
6
|
exports.TABLES_BASE_PATH = `${exports.API_BASE_PATH}/tables`;
|
|
7
7
|
exports.FRONTEND_MODULE_NAME = "@antelopejs/dms-mailing-frontend-vue";
|
|
8
8
|
exports.EMAIL_TEMPLATE_NAME = "EmailMailingTemplate";
|
|
9
|
-
exports.MAILING_ACCESS_PERMISSION = "mailing.access";
|
|
10
|
-
exports.MAILING_TEMPLATES_MANAGE_PERMISSION = "mailing.templates.manage";
|
|
11
9
|
exports.MAILING_SEND_PERMISSION = "mailing.send";
|
|
12
|
-
exports.MAILING_SETTINGS_MANAGE_PERMISSION = "mailing.settings.manage";
|
|
13
10
|
exports.OVERVIEW_PERIOD_SCOPE = "mailing-overview";
|
|
14
11
|
exports.SENDS_PERIOD_SCOPE = "mailing-sends";
|
|
15
12
|
exports.MAILING_SENDS_TOPIC = "mailing:sends";
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG,SAAS,CAAC;AACtB,QAAA,aAAa,GAAG,cAAc,CAAC;AAC/B,QAAA,gBAAgB,GAAG,GAAG,qBAAa,SAAS,CAAC;AAC7C,QAAA,oBAAoB,GAAG,sCAAsC,CAAC;AAC9D,QAAA,mBAAmB,GAAG,sBAAsB,CAAC;AAE7C,QAAA,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG,SAAS,CAAC;AACtB,QAAA,aAAa,GAAG,cAAc,CAAC;AAC/B,QAAA,gBAAgB,GAAG,GAAG,qBAAa,SAAS,CAAC;AAC7C,QAAA,oBAAoB,GAAG,sCAAsC,CAAC;AAC9D,QAAA,mBAAmB,GAAG,sBAAsB,CAAC;AAE7C,QAAA,uBAAuB,GAAG,cAAc,CAAC;AAEzC,QAAA,qBAAqB,GAAG,kBAAkB,CAAC;AAC3C,QAAA,kBAAkB,GAAG,eAAe,CAAC;AAErC,QAAA,mBAAmB,GAAG,eAAe,CAAC;AAEtC,QAAA,kBAAkB,GAAG,SAAS,CAAC;AAC/B,QAAA,2BAA2B,GAAG,6BAA6B,CAAC;AAC5D,QAAA,yBAAyB,GAAG,2BAA2B,CAAC;AAExD,QAAA,uBAAuB,GAAG,IAAI,CAAC;AAC/B,QAAA,0BAA0B,GAAG,EAAE,CAAC;AAChC,QAAA,eAAe,GAAG,EAAE,CAAC;AACrB,QAAA,eAAe,GAAG,GAAG,CAAC;AACtB,QAAA,YAAY,GAAG,sBAAsB,CAAC;AAEtC,QAAA,gBAAgB,GAAG,GAAG,CAAC;AACvB,QAAA,cAAc,GAAG,GAAG,CAAC;AACrB,QAAA,cAAc,GAAG,GAAG,CAAC;AACrB,QAAA,aAAa,GAAG,GAAG,CAAC;AACpB,QAAA,kBAAkB,GAAG,GAAG,CAAC;AAEzB,QAAA,qBAAqB,GAAG,GAAG,CAAC;AAE5B,QAAA,qBAAqB,GAAG,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,CAAC;AAO7D,QAAA,eAAe,GAAG,GAAG,CAAC"}
|
|
@@ -8,28 +8,28 @@ export declare class TemplateCategoriesType extends DataType {
|
|
|
8
8
|
label: import("zod").ZodString;
|
|
9
9
|
icon: import("zod").ZodString;
|
|
10
10
|
}, "strip", import("zod").ZodTypeAny, {
|
|
11
|
-
id: string;
|
|
12
11
|
label: string;
|
|
13
12
|
icon: string;
|
|
14
|
-
}, {
|
|
15
13
|
id: string;
|
|
14
|
+
}, {
|
|
16
15
|
label: string;
|
|
17
16
|
icon: string;
|
|
18
|
-
}>, "many">]>, unknown, string | {
|
|
19
17
|
id: string;
|
|
18
|
+
}>, "many">]>, unknown, string | {
|
|
20
19
|
label: string;
|
|
21
20
|
icon: string;
|
|
21
|
+
id: string;
|
|
22
22
|
}[]>, import("zod").ZodArray<import("zod").ZodObject<{
|
|
23
23
|
id: import("zod").ZodString;
|
|
24
24
|
label: import("zod").ZodString;
|
|
25
25
|
icon: import("zod").ZodString;
|
|
26
26
|
}, "strip", import("zod").ZodTypeAny, {
|
|
27
|
-
id: string;
|
|
28
27
|
label: string;
|
|
29
28
|
icon: string;
|
|
30
|
-
}, {
|
|
31
29
|
id: string;
|
|
30
|
+
}, {
|
|
32
31
|
label: string;
|
|
33
32
|
icon: string;
|
|
33
|
+
id: string;
|
|
34
34
|
}>, "many">>;
|
|
35
35
|
}
|
package/dist/pages/editor.js
CHANGED
|
@@ -19,7 +19,6 @@ let MailingEditorController = class MailingEditorController extends (0, page_1.P
|
|
|
19
19
|
module: constants_1.MODULE_ID,
|
|
20
20
|
order: EDITOR_PAGE_ORDER,
|
|
21
21
|
hidden: true,
|
|
22
|
-
permission: { id: constants_1.MAILING_TEMPLATES_MANAGE_PERMISSION },
|
|
23
22
|
}, (0, layouts_1.DefaultLayout)({ fullWidth: true })) {
|
|
24
23
|
static editor = (0, custom_1.CustomComponent)("DmsMailingEditor");
|
|
25
24
|
};
|
package/dist/pages/editor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.js","sourceRoot":"","sources":["../../src/pages/editor.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yDAA8E;AAC9E,kEAAwE;AACxE,oEAAuE;AACvE,
|
|
1
|
+
{"version":3,"file":"editor.js","sourceRoot":"","sources":["../../src/pages/editor.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yDAA8E;AAC9E,kEAAwE;AACxE,oEAAuE;AACvE,4CAAyC;AAEzC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAGrB,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,IAAA,qBAAc,EACzD,QAAQ,EACR;IACE,WAAW,EAAE,2BAA2B;IACxC,WAAW,EAAE,iCAAiC;IAC9C,IAAI,EAAE,oBAAoB;IAC1B,MAAM,EAAE,qBAAS;IACjB,KAAK,EAAE,iBAAiB;IACxB,MAAM,EAAE,IAAI;CACb,EACD,IAAA,uBAAa,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CACnC;IACC,MAAM,CAAC,MAAM,GAAG,IAAA,wBAAe,EAAC,kBAAkB,CAAC,CAAC;;AAZzC,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,mBAAY,GAAE;GACF,uBAAuB,CAanC"}
|
package/dist/pages/module.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const mailingModule: import("@antelopejs/interface-dms
|
|
1
|
+
export declare const mailingModule: import("@antelopejs/interface-dms").CategoryInfo;
|
package/dist/pages/overview.d.ts
CHANGED
|
@@ -5,10 +5,10 @@ declare const OverviewPageController_base: {
|
|
|
5
5
|
location: string;
|
|
6
6
|
};
|
|
7
7
|
export declare class OverviewPageController extends OverviewPageController_base {
|
|
8
|
-
static period: import("@antelopejs/interface-dms").ComponentBuilder<import("@antelopejs/interface-dms/
|
|
9
|
-
static kpis: import("@antelopejs/interface-dms").ComponentBuilder<import("@antelopejs/interface-dms/
|
|
10
|
-
static row2: import("@antelopejs/interface-dms").ComponentBuilder<import("@antelopejs/interface-dms/
|
|
11
|
-
static row3: import("@antelopejs/interface-dms").ComponentBuilder<import("@antelopejs/interface-dms/
|
|
12
|
-
static row4: import("@antelopejs/interface-dms").ComponentBuilder<import("@antelopejs/interface-dms/
|
|
8
|
+
static period: import("@antelopejs/interface-dms").ComponentBuilder<import("@antelopejs/interface-dms/base").PeriodSelectorProps>;
|
|
9
|
+
static kpis: import("@antelopejs/interface-dms").ComponentBuilder<import("@antelopejs/interface-dms/base").GridOptions>;
|
|
10
|
+
static row2: import("@antelopejs/interface-dms").ComponentBuilder<import("@antelopejs/interface-dms/base").GridOptions>;
|
|
11
|
+
static row3: import("@antelopejs/interface-dms").ComponentBuilder<import("@antelopejs/interface-dms/base").GridOptions>;
|
|
12
|
+
static row4: import("@antelopejs/interface-dms").ComponentBuilder<import("@antelopejs/interface-dms/base").GridOptions>;
|
|
13
13
|
}
|
|
14
14
|
export {};
|
package/dist/pages/overview.js
CHANGED
|
@@ -32,7 +32,6 @@ let OverviewPageController = class OverviewPageController extends (0, page_1.Pag
|
|
|
32
32
|
icon: "i-ph-chart-pie-slice",
|
|
33
33
|
module: constants_1.MODULE_ID,
|
|
34
34
|
order: OVERVIEW_ORDER,
|
|
35
|
-
permission: { id: constants_1.MAILING_ACCESS_PERMISSION },
|
|
36
35
|
}, (0, layouts_1.DefaultLayout)({ fullWidth: true })) {
|
|
37
36
|
static period = (0, base_1.PeriodSelector)({
|
|
38
37
|
id: constants_1.OVERVIEW_PERIOD_SCOPE,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overview.js","sourceRoot":"","sources":["../../src/pages/overview.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yDAA8E;AAC9E,yDASwC;AACxC,kEAAwE;AACxE,oEAAuE;AACvE,
|
|
1
|
+
{"version":3,"file":"overview.js","sourceRoot":"","sources":["../../src/pages/overview.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yDAA8E;AAC9E,yDASwC;AACxC,kEAAwE;AACxE,oEAAuE;AACvE,4CAKsB;AACtB,oCAAsE;AACtE,oBAAkB;AAElB,MAAM,cAAc,GAAG,CAAC,CAAC;AACzB,MAAM,QAAQ,GAAG,MAAM,CAAC;AACxB,MAAM,YAAY,GAAG,OAAO,CAAC;AAE7B,MAAM,GAAG,GAAG,CACV,EAAU,EACV,KAAa,EACb,IAAY,EACZ,QAA+B,EAAE,EACjC,EAAE,CACF,IAAA,cAAO,EAAC;IACN,KAAK;IACL,IAAI;IACJ,QAAQ,EAAE,GAAG,yBAAa,gBAAgB,EAAE,IAAI,+BAAuB,IAAI,yBAAiB,EAAE;IAC9F,WAAW,EAAE,iCAAqB;IAClC,WAAW,EAAE,SAAS;IACtB,aAAa,EAAE,IAAI;IACnB,GAAG,KAAK;CACT,CAAC,CAAC;AAGE,IAAM,sBAAsB,GAA5B,MAAM,sBAAuB,SAAQ,IAAA,qBAAc,EACxD,UAAU,EACV;IACE,WAAW,EAAE,6BAA6B;IAC1C,WAAW,EAAE,mCAAmC;IAChD,IAAI,EAAE,sBAAsB;IAC5B,MAAM,EAAE,qBAAS;IACjB,KAAK,EAAE,cAAc;CACtB,EACD,IAAA,uBAAa,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CACnC;IACC,MAAM,CAAC,MAAM,G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C;;AAhIS,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAY,GAAE;GACF,sBAAsB,CAiIlC"}
|
package/dist/pages/sends.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ declare const SendsPageController_base: {
|
|
|
6
6
|
};
|
|
7
7
|
export declare class SendsPageController extends SendsPageController_base {
|
|
8
8
|
static provider: import("@antelopejs/interface-dms").ComponentBuilder<unknown>;
|
|
9
|
-
static period: import("@antelopejs/interface-dms").ComponentBuilder<import("@antelopejs/interface-dms/
|
|
10
|
-
static kpis: import("@antelopejs/interface-dms").ComponentBuilder<import("@antelopejs/interface-dms/
|
|
11
|
-
static table: import("@antelopejs/interface-dms").ComponentBuilder<import("@antelopejs/interface-dms/
|
|
9
|
+
static period: import("@antelopejs/interface-dms").ComponentBuilder<import("@antelopejs/interface-dms/base").PeriodSelectorProps>;
|
|
10
|
+
static kpis: import("@antelopejs/interface-dms").ComponentBuilder<import("@antelopejs/interface-dms/base").GridOptions>;
|
|
11
|
+
static table: import("@antelopejs/interface-dms").ComponentBuilder<import("@antelopejs/interface-dms/base").TableViewOptionsSerialized>;
|
|
12
12
|
}
|
|
13
13
|
export {};
|
package/dist/pages/sends.js
CHANGED
|
@@ -37,7 +37,6 @@ let SendsPageController = class SendsPageController extends (0, page_1.PageContr
|
|
|
37
37
|
icon: "i-ph-paper-plane-tilt",
|
|
38
38
|
module: constants_1.MODULE_ID,
|
|
39
39
|
order: SENDS_ORDER,
|
|
40
|
-
permission: { id: constants_1.MAILING_ACCESS_PERMISSION },
|
|
41
40
|
}, (0, layouts_1.DefaultLayout)({ fullWidth: true })) {
|
|
42
41
|
static provider = (0, custom_1.CustomComponent)("DmsMailingProviderChip");
|
|
43
42
|
static period = (0, base_1.PeriodSelector)({
|
package/dist/pages/sends.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sends.js","sourceRoot":"","sources":["../../src/pages/sends.ts"],"names":[],"mappings":";;;;;;;;;AAAA,y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AI,EAAE;YACJ;gBACE,EAAE,EAAE,UAAU;gBACd,KAAK,EAAE,kCAAkC;gBACzC,IAAI,EAAE,cAAc;gBACpB,OAAO,EAAE;oBACP;wBACE,WAAW,EAAE,QAAQ;wBACrB,KAAK,EAAE,wBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC;wBACjC,IAAI,EAAE,IAAI;qBACX;iBACF;aACF;YACD,GAAG,qBAAa,CAAC,GAAG,CAAC,SAAS,CAAC;SAChC;QACD,UAAU,EAAE;YACV,GAAG,EAAE,KAAK;YACV,IAAI,EAAE,KAAK;YACX,SAAS,EAAE,KAAK;YAChB,MAAM,EAAE,KAAK;YACb,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,KAAK;YACd,YAAY,EAAE,KAAK;YACnB,MAAM,EAAE;gBACN;oBACE,KAAK,EAAE,wCAAwC;oBAC/C,IAAI,EAAE,WAAW;oBAMjB,SAAS,EAAE,IAAI;oBACf,MAAM,EAAE;wBACN,IAAI,EAAE,QAAQ;wBACd,SAAS,EAAE,IAAA,wBAAe,EAAC,sBAAsB,CAAC;wBAClD,KAAK,EAAE,wCAAwC;qBAChD;iBACF;gBACD;oBACE,KAAK,EAAE,kCAAkC;oBACzC,IAAI,EAAE,sBAAsB;oBAC5B,MAAM,EAAE;wBACN,IAAI,EAAE,KAAK;wBACX,GAAG,EAAE,GAAG,yBAAa,qBAAqB;wBAC1C,MAAM,EAAE,MAAM;wBACd,cAAc,EAAE,oCAAoC;wBACpD,OAAO,EAAE;4BACP,KAAK,EAAE,yCAAyC;4BAChD,WAAW,EAAE,+CAA+C;4BAC5D,YAAY,EAAE,SAAS;yBACxB;qBACF;iBACF;aACF;SACF;KACF,CAAC,CAAC;;AAvHQ,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAY,GAAE;GACF,mBAAmB,CAwH/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const mailingSettingsForm: import("@antelopejs/interface-dms/
|
|
1
|
+
export declare const mailingSettingsForm: import("@antelopejs/interface-dms/base").FormBuilder;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export declare const mailingSettingsCategory: import("@antelopejs/interface-dms
|
|
1
|
+
export declare const mailingSettingsCategory: import("@antelopejs/interface-dms").CategoryInfo;
|
|
2
2
|
declare const MailingSettingsPage_base: {
|
|
3
3
|
new (...args: any[]): {};
|
|
4
4
|
extend: <T extends import("@antelopejs/interface-api").ControllerClass>(this: T, location: string) => T;
|
|
5
5
|
location: string;
|
|
6
6
|
};
|
|
7
7
|
export declare class MailingSettingsPage extends MailingSettingsPage_base {
|
|
8
|
-
static content: import("@antelopejs/interface-dms/
|
|
8
|
+
static content: import("@antelopejs/interface-dms/base").FormBuilder;
|
|
9
9
|
}
|
|
10
10
|
export {};
|
|
@@ -17,14 +17,12 @@ exports.mailingSettingsCategory = (0, page_1.Category)(constants_1.MODULE_ID, {
|
|
|
17
17
|
displayName: "$dms_mailing.title",
|
|
18
18
|
icon: "i-ph-envelope-simple",
|
|
19
19
|
order: SETTINGS_ORDER,
|
|
20
|
-
authOnly: true,
|
|
21
20
|
});
|
|
22
21
|
let MailingSettingsPage = class MailingSettingsPage extends (0, page_1.PageController)("settings", {
|
|
23
22
|
displayName: "$dms_mailing.settings.title",
|
|
24
23
|
description: "$dms_mailing.settings.description",
|
|
25
24
|
icon: "i-ph-gear",
|
|
26
25
|
category: exports.mailingSettingsCategory,
|
|
27
|
-
permission: { id: constants_1.MAILING_SETTINGS_MANAGE_PERMISSION },
|
|
28
26
|
}, (0, layouts_1.DefaultLayout)()) {
|
|
29
27
|
static content = form_1.mailingSettingsForm;
|
|
30
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../src/pages/settings/page.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yDAKwC;AACxC,oEAAuE;AACvE,+
|
|
1
|
+
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../src/pages/settings/page.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yDAKwC;AACxC,oEAAuE;AACvE,+CAA4C;AAC5C,iCAA6C;AAE7C,MAAM,cAAc,GAAG,CAAC,CAAC;AAEZ,QAAA,uBAAuB,GAAG,IAAA,eAAQ,EAAC,qBAAS,EAAE;IACzD,QAAQ,EAAE,uBAAgB;IAC1B,WAAW,EAAE,oBAAoB;IACjC,IAAI,EAAE,sBAAsB;IAC5B,KAAK,EAAE,cAAc;CACtB,CAAC,CAAC;AAGI,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,IAAA,qBAAc,EACrD,UAAU,EACV;IACE,WAAW,EAAE,6BAA6B;IAC1C,WAAW,EAAE,mCAAmC;IAChD,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE,+BAAuB;CAClC,EACD,IAAA,uBAAa,GAAE,CAChB;IACC,MAAM,CAAC,OAAO,GAAG,0BAAmB,CAAC;;AAV1B,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAY,GAAE;GACF,mBAAmB,CAW/B"}
|
|
@@ -5,6 +5,6 @@ declare const TemplatesPageController_base: {
|
|
|
5
5
|
location: string;
|
|
6
6
|
};
|
|
7
7
|
export declare class TemplatesPageController extends TemplatesPageController_base {
|
|
8
|
-
static table: import("@antelopejs/interface-dms").ComponentBuilder<import("@antelopejs/interface-dms/
|
|
8
|
+
static table: import("@antelopejs/interface-dms").ComponentBuilder<import("@antelopejs/interface-dms/base").TableViewOptionsSerialized>;
|
|
9
9
|
}
|
|
10
10
|
export {};
|
package/dist/pages/templates.js
CHANGED
|
@@ -39,7 +39,6 @@ let TemplatesPageController = class TemplatesPageController extends (0, page_1.P
|
|
|
39
39
|
icon: "i-ph-envelope-simple",
|
|
40
40
|
module: constants_1.MODULE_ID,
|
|
41
41
|
order: TEMPLATES_ORDER,
|
|
42
|
-
permission: { id: constants_1.MAILING_ACCESS_PERMISSION },
|
|
43
42
|
}, (0, layouts_1.DefaultLayout)({ fullWidth: true })) {
|
|
44
43
|
static table = (0, table_view_1.TableView)(templates_table_1.TemplatesTableAPI, {
|
|
45
44
|
caption: "$dms_mailing.templates.title",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/pages/templates.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yDAA8E;AAC9E,oEAAuE;AAEvE,kEAAwE;AACxE,0EAAsE;AACtE,
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/pages/templates.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yDAA8E;AAC9E,oEAAuE;AAEvE,kEAAwE;AACxE,0EAAsE;AACtE,4CAA4E;AAC5E,6DAA4D;AAC5D,oBAAkB;AAElB,MAAM,eAAe,GAAG,CAAC,CAAC;AAC1B,MAAM,gBAAgB,GAAG,OAAO,CAAC;AACjC,MAAM,UAAU,GAAG,kCAAkC,CAAC;AAEtD,MAAM,SAAS,GAAG,CAAC,EAAU,EAAE,IAAY,EAAgB,EAAE,CAAC,CAAC;IAC7D,EAAE;IACF,KAAK,EAAE,iCAAiC,EAAE,EAAE;IAC5C,IAAI;IACJ,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;CAC5D,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG,CAAC,MAAc,EAAE,OAAe,EAAE,IAAY,EAAE,EAAE,CAAC,CAAC;IACvE,KAAK,EAAE,kCAAkC,MAAM,EAAE;IACjD,IAAI;IACJ,MAAM,EAAE;QACN,IAAI,EAAE,KAAc;QACpB,GAAG,EAAE,GAAG,yBAAa,oBAAoB,MAAM,EAAE;QACjD,MAAM,EAAE,MAAe;QACvB,cAAc,EAAE,kCAAkC,OAAO,EAAE;KAC5D;CACF,CAAC,CAAC;AAGI,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,IAAA,qBAAc,EACzD,WAAW,EACX;IACE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Ac,EAAE,8BAAkB;KACnC,CAAC,CAAC;;AArGQ,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,mBAAY,GAAE;GACF,uBAAuB,CAsGnC"}
|
package/dist/permissions.js
CHANGED
|
@@ -1,37 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const page_1 = require("@antelopejs/interface-dms/page");
|
|
3
4
|
const permissions_1 = require("@antelopejs/interface-dms/permissions");
|
|
4
5
|
const constants_1 = require("./constants");
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
title: "Manage e-mail templates",
|
|
15
|
-
icon: "i-ph-note-pencil",
|
|
16
|
-
description: "Create, edit, publish, duplicate and archive templates",
|
|
17
|
-
dependencies: [constants_1.MAILING_ACCESS_PERMISSION],
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
id: constants_1.MAILING_SEND_PERMISSION,
|
|
21
|
-
title: "Send e-mails and tests",
|
|
22
|
-
icon: "i-ph-paper-plane-tilt",
|
|
23
|
-
description: "Trigger test sends and replay a previous send",
|
|
24
|
-
dependencies: [constants_1.MAILING_ACCESS_PERMISSION],
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
id: constants_1.MAILING_SETTINGS_MANAGE_PERMISSION,
|
|
28
|
-
title: "Manage mailing settings",
|
|
29
|
-
icon: "i-ph-sliders",
|
|
30
|
-
description: "Edit sender identity, retention and template categories",
|
|
31
|
-
dependencies: [constants_1.MAILING_ACCESS_PERMISSION],
|
|
32
|
-
},
|
|
33
|
-
];
|
|
34
|
-
for (const permission of MAILING_PERMISSIONS) {
|
|
35
|
-
(0, permissions_1.RegisterPermission)(permission.id, permission);
|
|
36
|
-
}
|
|
6
|
+
const sends_1 = require("./pages/sends");
|
|
7
|
+
const sendsPagePermissionId = (0, page_1.GetPermissionId)(sends_1.SendsPageController);
|
|
8
|
+
(0, permissions_1.RegisterPermission)(constants_1.MAILING_SEND_PERMISSION, {
|
|
9
|
+
id: constants_1.MAILING_SEND_PERMISSION,
|
|
10
|
+
title: "Send e-mails and tests",
|
|
11
|
+
icon: "i-ph-paper-plane-tilt",
|
|
12
|
+
description: "Trigger test sends and replay a previous send",
|
|
13
|
+
dependencies: sendsPagePermissionId ? [sendsPagePermissionId] : [],
|
|
14
|
+
});
|
|
37
15
|
//# sourceMappingURL=permissions.js.map
|
package/dist/permissions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permissions.js","sourceRoot":"","sources":["../src/permissions.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"permissions.js","sourceRoot":"","sources":["../src/permissions.ts"],"names":[],"mappings":";;AAAA,yDAAiE;AACjE,uEAA2E;AAC3E,2CAAsD;AACtD,yCAAoD;AAIpD,MAAM,qBAAqB,GAAG,IAAA,sBAAe,EAAC,2BAAmB,CAAC,CAAC;AAEnE,IAAA,gCAAkB,EAAC,mCAAuB,EAAE;IAC1C,EAAE,EAAE,mCAAuB;IAC3B,KAAK,EAAE,wBAAwB;IAC/B,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,+CAA+C;IAC5D,YAAY,EAAE,qBAAqB,CAAC,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,EAAE;CACnE,CAAC,CAAC"}
|
package/dist/quick-actions.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const mailingQuickActionCategory: import("@antelopejs/interface-dms
|
|
2
|
-
export declare const newTemplateQuickAction: import("@antelopejs/interface-dms
|
|
1
|
+
export declare const mailingQuickActionCategory: import("@antelopejs/interface-dms").QuickActionCategoryInfo;
|
|
2
|
+
export declare const newTemplateQuickAction: import("@antelopejs/interface-dms").QuickActionInfo;
|
|
@@ -39,9 +39,9 @@ export declare class TemplatesController extends TemplatesController_base {
|
|
|
39
39
|
private transition;
|
|
40
40
|
variables(id: string, body: unknown): Promise<{
|
|
41
41
|
variables: {
|
|
42
|
-
required: boolean;
|
|
43
|
-
type: "string" | "number" | "boolean" | "url" | "text" | "date" | "array" | "money";
|
|
44
42
|
path: string;
|
|
43
|
+
type: "string" | "number" | "boolean" | "date" | "array" | "url" | "text" | "money";
|
|
44
|
+
required: boolean;
|
|
45
45
|
}[];
|
|
46
46
|
}>;
|
|
47
47
|
testData(id: string, body: unknown): Promise<{
|
|
@@ -6,29 +6,29 @@ export declare const CATEGORIES_SCHEMA: z.ZodPipeline<z.ZodEffects<z.ZodUnion<[z
|
|
|
6
6
|
label: z.ZodString;
|
|
7
7
|
icon: z.ZodString;
|
|
8
8
|
}, "strip", z.ZodTypeAny, {
|
|
9
|
-
id: string;
|
|
10
9
|
label: string;
|
|
11
10
|
icon: string;
|
|
12
|
-
}, {
|
|
13
11
|
id: string;
|
|
12
|
+
}, {
|
|
14
13
|
label: string;
|
|
15
14
|
icon: string;
|
|
16
|
-
}>, "many">]>, unknown, string | {
|
|
17
15
|
id: string;
|
|
16
|
+
}>, "many">]>, unknown, string | {
|
|
18
17
|
label: string;
|
|
19
18
|
icon: string;
|
|
19
|
+
id: string;
|
|
20
20
|
}[]>, z.ZodArray<z.ZodObject<{
|
|
21
21
|
id: z.ZodString;
|
|
22
22
|
label: z.ZodString;
|
|
23
23
|
icon: z.ZodString;
|
|
24
24
|
}, "strip", z.ZodTypeAny, {
|
|
25
|
-
id: string;
|
|
26
25
|
label: string;
|
|
27
26
|
icon: string;
|
|
28
|
-
}, {
|
|
29
27
|
id: string;
|
|
28
|
+
}, {
|
|
30
29
|
label: string;
|
|
31
30
|
icon: string;
|
|
31
|
+
id: string;
|
|
32
32
|
}>, "many">>;
|
|
33
33
|
export declare function parseCategories(raw: unknown): TemplateCategory[];
|
|
34
34
|
export declare function reassignRemovedCategories(templates: MailingTemplate[], categories: TemplateCategory[]): string[];
|
|
@@ -116,6 +116,7 @@ exports.default = (0, config_1.defineConfig)({
|
|
|
116
116
|
source: antelope_modules_1.SHARED_MODULE_SOURCES.api,
|
|
117
117
|
config: {
|
|
118
118
|
servers: [{ protocol: "http", host: "127.0.0.1", port: API_PORT }],
|
|
119
|
+
publicBaseUrl: `http://127.0.0.1:${API_PORT}`,
|
|
119
120
|
},
|
|
120
121
|
},
|
|
121
122
|
"file-storage-local": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"antelope.test.js","sourceRoot":"","sources":["../../src/test/antelope.test.ts"],"names":[],"mappings":";;AAAA,+CAA+C;AAC/C,uCAAkE;AAClE,qCAAiC;AACjC,yCAAiC;AACjC,8DAAiE;AACjE,2EAAgE;AAChE,0DAA4D;AAE5D,MAAM,QAAQ,GAAG,IAAI,CAAC;AACtB,MAAM,UAAU,GAAG,iBAAiB,CAAC;AACrC,MAAM,oBAAoB,GAAG,OAAO,CAAC;AACrC,MAAM,SAAS,GAAG,WAAW,CAAC;AAC9B,MAAM,cAAc,GAAG,CAAC,CAAC;AACzB,MAAM,WAAW,GAAG,wBAAwB,CAAC;AAC7C,MAAM,cAAc,GAA2B;IAC7C,IAAI,EAAE,4CAA4C;IAClD,IAAI,EAAE,0BAA0B;IAChC,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,yCAAyC;IAC/C,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,aAAa;CACpB,CAAC;AAOF,IAAI,MAA0B,CAAC;AAC/B,IAAI,UAAkB,CAAC;AACvB,IAAI,UAAkB,CAAC;AAEvB,SAAS,eAAe,CACtB,MAAc,EACd,KAA0B,EAC1B,IAAY;IAEZ,IAAI,KAAK,CAAC,aAAa,EAAE,CAAC;QACxB,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;YACjB,KAAK,CAAC,aAAa,GAAG,KAAK,CAAC;YAC5B,MAAM,CAAC,KAAK,CAAC,gBA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EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YACzE,CAAC;QACH,CAAC;KACF;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const chai_1 = require("chai");
|
|
4
|
+
const permissions_1 = require("@antelopejs/interface-dms/permissions");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
const SENDS_PAGE_PERMISSION = "modules.mailing.sends";
|
|
7
|
+
const SETTINGS_PAGE_PERMISSION = "settings.mailing.settings";
|
|
8
|
+
const REMOVED_PERMISSIONS = [
|
|
9
|
+
"mailing.access",
|
|
10
|
+
"mailing.templates.manage",
|
|
11
|
+
"mailing.settings.manage",
|
|
12
|
+
];
|
|
13
|
+
describe("[unit] permissions", () => {
|
|
14
|
+
it("makes the send permission depend on the sends page permission", async () => {
|
|
15
|
+
const permission = await (0, permissions_1.GetPermission)(constants_1.MAILING_SEND_PERMISSION);
|
|
16
|
+
(0, chai_1.expect)(permission?.dependencies).to.deep.equal([SENDS_PAGE_PERMISSION]);
|
|
17
|
+
});
|
|
18
|
+
it("registers the settings page default permission", async () => {
|
|
19
|
+
(0, chai_1.expect)(await (0, permissions_1.GetPermission)(SETTINGS_PAGE_PERMISSION)).to.not.equal(undefined);
|
|
20
|
+
});
|
|
21
|
+
it("no longer registers the page-access permissions", async () => {
|
|
22
|
+
for (const id of REMOVED_PERMISSIONS) {
|
|
23
|
+
(0, chai_1.expect)(await (0, permissions_1.GetPermission)(id), id).to.equal(undefined);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=permissions.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissions.test.js","sourceRoot":"","sources":["../../../src/test/unit/permissions.test.ts"],"names":[],"mappings":";;AAAA,+BAA8B;AAC9B,uEAAsE;AACtE,+CAA0D;AAE1D,MAAM,qBAAqB,GAAG,uBAAuB,CAAC;AACtD,MAAM,wBAAwB,GAAG,2BAA2B,CAAC;AAC7D,MAAM,mBAAmB,GAAG;IAC1B,gBAAgB;IAChB,0BAA0B;IAC1B,yBAAyB;CAC1B,CAAC;AAEF,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,EAAE,CAAC,+DAA+D,EAAE,KAAK,IAAI,EAAE;QAC7E,MAAM,UAAU,GAAG,MAAM,IAAA,2BAAa,EAAC,mCAAuB,CAAC,CAAC;QAChE,IAAA,aAAM,EAAC,UAAU,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC;IAC1E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gDAAgD,EAAE,KAAK,IAAI,EAAE;QAC9D,IAAA,aAAM,EAAC,MAAM,IAAA,2BAAa,EAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,CAChE,SAAS,CACV,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iDAAiD,EAAE,KAAK,IAAI,EAAE;QAC/D,KAAK,MAAM,EAAE,IAAI,mBAAmB,EAAE,CAAC;YACrC,IAAA,aAAM,EAAC,MAAM,IAAA,2BAAa,EAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAC1D,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -4,13 +4,13 @@ export declare const categorySchema: z.ZodObject<{
|
|
|
4
4
|
label: z.ZodString;
|
|
5
5
|
icon: z.ZodString;
|
|
6
6
|
}, "strip", z.ZodTypeAny, {
|
|
7
|
-
id: string;
|
|
8
7
|
label: string;
|
|
9
8
|
icon: string;
|
|
10
|
-
}, {
|
|
11
9
|
id: string;
|
|
10
|
+
}, {
|
|
12
11
|
label: string;
|
|
13
12
|
icon: string;
|
|
13
|
+
id: string;
|
|
14
14
|
}>;
|
|
15
15
|
export declare const settingsSchema: z.ZodObject<{
|
|
16
16
|
fallbackLocale: z.ZodString;
|
|
@@ -25,13 +25,13 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
25
25
|
label: z.ZodString;
|
|
26
26
|
icon: z.ZodString;
|
|
27
27
|
}, "strip", z.ZodTypeAny, {
|
|
28
|
-
id: string;
|
|
29
28
|
label: string;
|
|
30
29
|
icon: string;
|
|
31
|
-
}, {
|
|
32
30
|
id: string;
|
|
31
|
+
}, {
|
|
33
32
|
label: string;
|
|
34
33
|
icon: string;
|
|
34
|
+
id: string;
|
|
35
35
|
}>, "many">>;
|
|
36
36
|
}, "strip", z.ZodTypeAny, {
|
|
37
37
|
fallbackLocale: string;
|
|
@@ -42,9 +42,9 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
42
42
|
replyTo: string;
|
|
43
43
|
webhookSecret: string;
|
|
44
44
|
categories: {
|
|
45
|
-
id: string;
|
|
46
45
|
label: string;
|
|
47
46
|
icon: string;
|
|
47
|
+
id: string;
|
|
48
48
|
}[];
|
|
49
49
|
}, {
|
|
50
50
|
fallbackLocale: string;
|
|
@@ -55,9 +55,9 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
55
55
|
senderEmail?: string | undefined;
|
|
56
56
|
replyTo?: string | undefined;
|
|
57
57
|
categories?: {
|
|
58
|
-
id: string;
|
|
59
58
|
label: string;
|
|
60
59
|
icon: string;
|
|
60
|
+
id: string;
|
|
61
61
|
}[] | undefined;
|
|
62
62
|
}>;
|
|
63
63
|
export type SettingsInput = z.input<typeof settingsSchema>;
|
|
@@ -21,12 +21,12 @@ export declare const conditionSchema: z.ZodObject<{
|
|
|
21
21
|
operator: z.ZodEnum<["truthy", "falsy", "eq", "ne", "gt", "lt"]>;
|
|
22
22
|
value: z.ZodString;
|
|
23
23
|
}, "strip", z.ZodTypeAny, {
|
|
24
|
-
value: string;
|
|
25
24
|
path: string;
|
|
25
|
+
value: string;
|
|
26
26
|
operator: "eq" | "ne" | "gt" | "lt" | "truthy" | "falsy";
|
|
27
27
|
}, {
|
|
28
|
-
value: string;
|
|
29
28
|
path: string;
|
|
29
|
+
value: string;
|
|
30
30
|
operator: "eq" | "ne" | "gt" | "lt" | "truthy" | "falsy";
|
|
31
31
|
}>;
|
|
32
32
|
export declare const blockSchema: z.ZodType<unknown>;
|
|
@@ -75,13 +75,13 @@ export declare const variableSchema: z.ZodObject<{
|
|
|
75
75
|
type: z.ZodEnum<["string", "text", "number", "money", "date", "url", "boolean", "array"]>;
|
|
76
76
|
required: z.ZodBoolean;
|
|
77
77
|
}, "strip", z.ZodTypeAny, {
|
|
78
|
-
required: boolean;
|
|
79
|
-
type: "string" | "number" | "boolean" | "url" | "text" | "date" | "array" | "money";
|
|
80
78
|
path: string;
|
|
81
|
-
|
|
79
|
+
type: "string" | "number" | "boolean" | "date" | "array" | "url" | "text" | "money";
|
|
82
80
|
required: boolean;
|
|
83
|
-
|
|
81
|
+
}, {
|
|
84
82
|
path: string;
|
|
83
|
+
type: "string" | "number" | "boolean" | "date" | "array" | "url" | "text" | "money";
|
|
84
|
+
required: boolean;
|
|
85
85
|
}>;
|
|
86
86
|
export declare const variablesSchema: z.ZodObject<{
|
|
87
87
|
variables: z.ZodArray<z.ZodObject<{
|
|
@@ -89,25 +89,25 @@ export declare const variablesSchema: z.ZodObject<{
|
|
|
89
89
|
type: z.ZodEnum<["string", "text", "number", "money", "date", "url", "boolean", "array"]>;
|
|
90
90
|
required: z.ZodBoolean;
|
|
91
91
|
}, "strip", z.ZodTypeAny, {
|
|
92
|
-
required: boolean;
|
|
93
|
-
type: "string" | "number" | "boolean" | "url" | "text" | "date" | "array" | "money";
|
|
94
92
|
path: string;
|
|
95
|
-
|
|
93
|
+
type: "string" | "number" | "boolean" | "date" | "array" | "url" | "text" | "money";
|
|
96
94
|
required: boolean;
|
|
97
|
-
|
|
95
|
+
}, {
|
|
98
96
|
path: string;
|
|
97
|
+
type: "string" | "number" | "boolean" | "date" | "array" | "url" | "text" | "money";
|
|
98
|
+
required: boolean;
|
|
99
99
|
}>, "many">;
|
|
100
100
|
}, "strip", z.ZodTypeAny, {
|
|
101
101
|
variables: {
|
|
102
|
-
required: boolean;
|
|
103
|
-
type: "string" | "number" | "boolean" | "url" | "text" | "date" | "array" | "money";
|
|
104
102
|
path: string;
|
|
103
|
+
type: "string" | "number" | "boolean" | "date" | "array" | "url" | "text" | "money";
|
|
104
|
+
required: boolean;
|
|
105
105
|
}[];
|
|
106
106
|
}, {
|
|
107
107
|
variables: {
|
|
108
|
-
required: boolean;
|
|
109
|
-
type: "string" | "number" | "boolean" | "url" | "text" | "date" | "array" | "money";
|
|
110
108
|
path: string;
|
|
109
|
+
type: "string" | "number" | "boolean" | "date" | "array" | "url" | "text" | "money";
|
|
110
|
+
required: boolean;
|
|
111
111
|
}[];
|
|
112
112
|
}>;
|
|
113
113
|
export declare const testDataSchema: z.ZodObject<{
|
|
@@ -3,7 +3,9 @@ import { computed, onMounted, ref } from 'vue'
|
|
|
3
3
|
import { useEditorContext } from '../../composables/useEditorContext'
|
|
4
4
|
import { parseTestData } from '../../utils/testData'
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// Default permission of the mailing settings page (its fullId). The Vue layer
|
|
7
|
+
// has no access to the server-side page registry, so it is spelled out here.
|
|
8
|
+
const SETTINGS_PERMISSION = 'settings.mailing.settings'
|
|
7
9
|
const TEXTAREA_ROWS = 12
|
|
8
10
|
|
|
9
11
|
const { t } = useI18n()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antelopejs/dms-mailing",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"LICENSE",
|
|
12
12
|
"README.md",
|
|
13
13
|
"dist",
|
|
14
|
+
"!dist/.tsbuildinfo",
|
|
14
15
|
"frontend-vue",
|
|
15
16
|
"src"
|
|
16
17
|
],
|
|
@@ -31,20 +32,18 @@
|
|
|
31
32
|
"dependencies": {
|
|
32
33
|
"@antelopejs/interface-api": ">=0.0.13 <1.0.0",
|
|
33
34
|
"@antelopejs/interface-api-util": ">=0.1.2 <1.0.0",
|
|
34
|
-
"@antelopejs/interface-core": ">=0.
|
|
35
|
+
"@antelopejs/interface-core": ">=0.1.1 <1.0.0",
|
|
35
36
|
"@antelopejs/interface-data-api": ">=0.1.9 <1.0.0",
|
|
36
37
|
"@antelopejs/interface-database": "0.1.7",
|
|
37
38
|
"@antelopejs/interface-database-decorators": ">=0.1.6 <1.0.0",
|
|
38
|
-
"@antelopejs/interface-dms": ">=0.1
|
|
39
|
-
"@antelopejs/interface-dms-mailing": ">=0.
|
|
39
|
+
"@antelopejs/interface-dms": ">=0.2.1 <1.0.0",
|
|
40
|
+
"@antelopejs/interface-dms-mailing": ">=0.4.0 <1.0.0",
|
|
40
41
|
"@antelopejs/interface-email": ">=0.0.5 <1.0.0",
|
|
41
42
|
"node-cron": "^4.2.1",
|
|
42
43
|
"zod": "~3.24.2"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
|
-
"@antelopejs/core": ">=1.
|
|
46
|
-
"@antelopejs/dms": ">=0.3.5 <1.0.0",
|
|
47
|
-
"@antelopejs/dms-frontend": ">=0.2.0 <1.0.0",
|
|
46
|
+
"@antelopejs/core": ">=1.9.1 <2",
|
|
48
47
|
"@antelopejs/tooling-configs": ">=0.0.6 <1.0.0",
|
|
49
48
|
"@types/chai": "^4.3.20",
|
|
50
49
|
"@types/mocha": "^10",
|
|
@@ -60,10 +59,10 @@
|
|
|
60
59
|
"release-it": "^19.2.4",
|
|
61
60
|
"release-it-changelogen": "^0.1.0",
|
|
62
61
|
"rimraf": "^6.1.3",
|
|
63
|
-
"typescript": "^
|
|
62
|
+
"typescript": "^6.0.3"
|
|
64
63
|
},
|
|
65
64
|
"optionalDependencies": {
|
|
66
|
-
"@antelopejs/interface-dms-automation": ">=0.0
|
|
65
|
+
"@antelopejs/interface-dms-automation": ">=0.1.0 <1.0.0"
|
|
67
66
|
},
|
|
68
67
|
"antelopeJs": {
|
|
69
68
|
"baseUrl": "dist",
|
|
@@ -73,19 +72,18 @@
|
|
|
73
72
|
"test": "src/test/antelope.test.ts"
|
|
74
73
|
},
|
|
75
74
|
"scripts": {
|
|
76
|
-
"build": "rimraf dist && tsc
|
|
75
|
+
"build": "rimraf dist && tsc",
|
|
77
76
|
"dev": "ajs project run -w -p playground",
|
|
78
77
|
"dev:frontend": "cd playground && pnpm frontend:dev",
|
|
79
78
|
"frontend:dev": "cd playground && pnpm frontend:dev",
|
|
80
79
|
"lint": "oxlint && oxfmt --check . && cd frontend-vue && pnpm lint",
|
|
81
80
|
"lint:fix": "oxlint --fix --max-warnings=1000000 && oxfmt . && cd frontend-vue && pnpm lint:fix",
|
|
82
81
|
"format": "oxfmt . && cd frontend-vue && pnpm format",
|
|
83
|
-
"typecheck": "tsc
|
|
82
|
+
"typecheck": "tsc --noEmit",
|
|
84
83
|
"knip": "knip --dependencies",
|
|
85
84
|
"knip:all": "knip",
|
|
86
85
|
"release": "pnpm --filter @antelopejs/interface-dms-mailing build && pnpm --dir frontend-vue install --frozen-lockfile && release-it",
|
|
87
86
|
"test": "pnpm run test:backend && pnpm run test:layer",
|
|
88
|
-
"test:frontend": "node scripts/check-frontend.mjs",
|
|
89
87
|
"test:backend": "pnpm run build && ajs module test .",
|
|
90
88
|
"test:layer": "cd frontend-vue && pnpm test",
|
|
91
89
|
"test:unit": "pnpm run build && DMS_MAILING_TEST_DIR=dist/test/unit ajs module test .",
|
package/src/antelope-modules.ts
CHANGED
|
@@ -18,12 +18,12 @@ export const SHARED_MODULE_SOURCES = {
|
|
|
18
18
|
dms: {
|
|
19
19
|
type: "package",
|
|
20
20
|
package: "@antelopejs/dms",
|
|
21
|
-
version: ">=0.0
|
|
21
|
+
version: ">=0.4.0 <1.0.0",
|
|
22
22
|
},
|
|
23
23
|
mongodb: {
|
|
24
24
|
type: "package",
|
|
25
25
|
package: "@antelopejs/mongodb",
|
|
26
|
-
version: "^1.3.
|
|
26
|
+
version: "^1.3.1",
|
|
27
27
|
},
|
|
28
28
|
"auth-jwt": {
|
|
29
29
|
type: "package",
|
|
@@ -33,16 +33,16 @@ export const SHARED_MODULE_SOURCES = {
|
|
|
33
33
|
api: {
|
|
34
34
|
type: "package",
|
|
35
35
|
package: "@antelopejs/api",
|
|
36
|
-
version: "1.
|
|
36
|
+
version: "^1.3.0",
|
|
37
37
|
},
|
|
38
38
|
"file-storage-local": {
|
|
39
39
|
type: "package",
|
|
40
40
|
package: "@antelopejs/file-storage-local",
|
|
41
|
-
version: "^0.1.
|
|
41
|
+
version: "^0.1.5",
|
|
42
42
|
},
|
|
43
43
|
nodemailer: {
|
|
44
44
|
type: "package",
|
|
45
45
|
package: "@antelopejs/nodemailer",
|
|
46
|
-
version: "^0.0.
|
|
46
|
+
version: "^0.0.5",
|
|
47
47
|
},
|
|
48
48
|
} as const;
|
package/src/constants.ts
CHANGED
|
@@ -4,10 +4,7 @@ export const TABLES_BASE_PATH = `${API_BASE_PATH}/tables`;
|
|
|
4
4
|
export const FRONTEND_MODULE_NAME = "@antelopejs/dms-mailing-frontend-vue";
|
|
5
5
|
export const EMAIL_TEMPLATE_NAME = "EmailMailingTemplate";
|
|
6
6
|
|
|
7
|
-
export const MAILING_ACCESS_PERMISSION = "mailing.access";
|
|
8
|
-
export const MAILING_TEMPLATES_MANAGE_PERMISSION = "mailing.templates.manage";
|
|
9
7
|
export const MAILING_SEND_PERMISSION = "mailing.send";
|
|
10
|
-
export const MAILING_SETTINGS_MANAGE_PERMISSION = "mailing.settings.manage";
|
|
11
8
|
|
|
12
9
|
export const OVERVIEW_PERIOD_SCOPE = "mailing-overview";
|
|
13
10
|
export const SENDS_PERIOD_SCOPE = "mailing-sends";
|
package/src/pages/editor.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PageController, RegisterPage } from "@antelopejs/interface-dms/page";
|
|
2
2
|
import { CustomComponent } from "@antelopejs/interface-dms/base/custom";
|
|
3
3
|
import { DefaultLayout } from "@antelopejs/interface-dms/base/layouts";
|
|
4
|
-
import {
|
|
4
|
+
import { MODULE_ID } from "../constants";
|
|
5
5
|
|
|
6
6
|
const EDITOR_PAGE_ORDER = 2;
|
|
7
7
|
|
|
@@ -15,7 +15,6 @@ export class MailingEditorController extends PageController(
|
|
|
15
15
|
module: MODULE_ID,
|
|
16
16
|
order: EDITOR_PAGE_ORDER,
|
|
17
17
|
hidden: true,
|
|
18
|
-
permission: { id: MAILING_TEMPLATES_MANAGE_PERMISSION },
|
|
19
18
|
},
|
|
20
19
|
DefaultLayout({ fullWidth: true }),
|
|
21
20
|
) {
|
package/src/pages/overview.ts
CHANGED
|
@@ -13,7 +13,6 @@ import { CustomComponent } from "@antelopejs/interface-dms/base/custom";
|
|
|
13
13
|
import { DefaultLayout } from "@antelopejs/interface-dms/base/layouts";
|
|
14
14
|
import {
|
|
15
15
|
API_BASE_PATH,
|
|
16
|
-
MAILING_ACCESS_PERMISSION,
|
|
17
16
|
MAILING_SENDS_TOPIC,
|
|
18
17
|
MODULE_ID,
|
|
19
18
|
OVERVIEW_PERIOD_SCOPE,
|
|
@@ -50,7 +49,6 @@ export class OverviewPageController extends PageController(
|
|
|
50
49
|
icon: "i-ph-chart-pie-slice",
|
|
51
50
|
module: MODULE_ID,
|
|
52
51
|
order: OVERVIEW_ORDER,
|
|
53
|
-
permission: { id: MAILING_ACCESS_PERMISSION },
|
|
54
52
|
},
|
|
55
53
|
DefaultLayout({ fullWidth: true }),
|
|
56
54
|
) {
|
package/src/pages/sends.ts
CHANGED
|
@@ -10,12 +10,7 @@ import {
|
|
|
10
10
|
import { CustomComponent } from "@antelopejs/interface-dms/base/custom";
|
|
11
11
|
import { DefaultLayout } from "@antelopejs/interface-dms/base/layouts";
|
|
12
12
|
import { TableView } from "@antelopejs/interface-dms/base/table-view";
|
|
13
|
-
import {
|
|
14
|
-
API_BASE_PATH,
|
|
15
|
-
MAILING_ACCESS_PERMISSION,
|
|
16
|
-
MODULE_ID,
|
|
17
|
-
SENDS_PERIOD_SCOPE,
|
|
18
|
-
} from "../constants";
|
|
13
|
+
import { API_BASE_PATH, MODULE_ID, SENDS_PERIOD_SCOPE } from "../constants";
|
|
19
14
|
import { SendsTableAPI } from "../data/sends-table";
|
|
20
15
|
import {
|
|
21
16
|
OPERATIONAL_AUDIENCE,
|
|
@@ -58,7 +53,6 @@ export class SendsPageController extends PageController(
|
|
|
58
53
|
icon: "i-ph-paper-plane-tilt",
|
|
59
54
|
module: MODULE_ID,
|
|
60
55
|
order: SENDS_ORDER,
|
|
61
|
-
permission: { id: MAILING_ACCESS_PERMISSION },
|
|
62
56
|
},
|
|
63
57
|
DefaultLayout({ fullWidth: true }),
|
|
64
58
|
) {
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
settingsCategory,
|
|
6
6
|
} from "@antelopejs/interface-dms/page";
|
|
7
7
|
import { DefaultLayout } from "@antelopejs/interface-dms/base/layouts";
|
|
8
|
-
import {
|
|
8
|
+
import { MODULE_ID } from "../../constants";
|
|
9
9
|
import { mailingSettingsForm } from "./form";
|
|
10
10
|
|
|
11
11
|
const SETTINGS_ORDER = 3;
|
|
@@ -15,7 +15,6 @@ export const mailingSettingsCategory = Category(MODULE_ID, {
|
|
|
15
15
|
displayName: "$dms_mailing.title",
|
|
16
16
|
icon: "i-ph-envelope-simple",
|
|
17
17
|
order: SETTINGS_ORDER,
|
|
18
|
-
authOnly: true,
|
|
19
18
|
});
|
|
20
19
|
|
|
21
20
|
@RegisterPage()
|
|
@@ -26,7 +25,6 @@ export class MailingSettingsPage extends PageController(
|
|
|
26
25
|
description: "$dms_mailing.settings.description",
|
|
27
26
|
icon: "i-ph-gear",
|
|
28
27
|
category: mailingSettingsCategory,
|
|
29
|
-
permission: { id: MAILING_SETTINGS_MANAGE_PERMISSION },
|
|
30
28
|
},
|
|
31
29
|
DefaultLayout(),
|
|
32
30
|
) {
|
package/src/pages/templates.ts
CHANGED
|
@@ -3,12 +3,7 @@ import { DefaultLayout } from "@antelopejs/interface-dms/base/layouts";
|
|
|
3
3
|
import type { TableViewTab } from "@antelopejs/interface-dms/base";
|
|
4
4
|
import { CustomComponent } from "@antelopejs/interface-dms/base/custom";
|
|
5
5
|
import { TableView } from "@antelopejs/interface-dms/base/table-view";
|
|
6
|
-
import {
|
|
7
|
-
API_BASE_PATH,
|
|
8
|
-
GALLERY_DISPLAY_ID,
|
|
9
|
-
MAILING_ACCESS_PERMISSION,
|
|
10
|
-
MODULE_ID,
|
|
11
|
-
} from "../constants";
|
|
6
|
+
import { API_BASE_PATH, GALLERY_DISPLAY_ID, MODULE_ID } from "../constants";
|
|
12
7
|
import { TemplatesTableAPI } from "../data/templates-table";
|
|
13
8
|
import "./module";
|
|
14
9
|
|
|
@@ -43,7 +38,6 @@ export class TemplatesPageController extends PageController(
|
|
|
43
38
|
icon: "i-ph-envelope-simple",
|
|
44
39
|
module: MODULE_ID,
|
|
45
40
|
order: TEMPLATES_ORDER,
|
|
46
|
-
permission: { id: MAILING_ACCESS_PERMISSION },
|
|
47
41
|
},
|
|
48
42
|
DefaultLayout({ fullWidth: true }),
|
|
49
43
|
) {
|
package/src/permissions.ts
CHANGED
|
@@ -1,44 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from "
|
|
5
|
-
import {
|
|
6
|
-
MAILING_ACCESS_PERMISSION,
|
|
7
|
-
MAILING_SEND_PERMISSION,
|
|
8
|
-
MAILING_SETTINGS_MANAGE_PERMISSION,
|
|
9
|
-
MAILING_TEMPLATES_MANAGE_PERMISSION,
|
|
10
|
-
} from "./constants";
|
|
1
|
+
import { GetPermissionId } from "@antelopejs/interface-dms/page";
|
|
2
|
+
import { RegisterPermission } from "@antelopejs/interface-dms/permissions";
|
|
3
|
+
import { MAILING_SEND_PERMISSION } from "./constants";
|
|
4
|
+
import { SendsPageController } from "./pages/sends";
|
|
11
5
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
title: "Access mailing",
|
|
16
|
-
icon: "i-ph-envelope-simple",
|
|
17
|
-
description: "See templates, sends and mailing metrics",
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
id: MAILING_TEMPLATES_MANAGE_PERMISSION,
|
|
21
|
-
title: "Manage e-mail templates",
|
|
22
|
-
icon: "i-ph-note-pencil",
|
|
23
|
-
description: "Create, edit, publish, duplicate and archive templates",
|
|
24
|
-
dependencies: [MAILING_ACCESS_PERMISSION],
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
id: MAILING_SEND_PERMISSION,
|
|
28
|
-
title: "Send e-mails and tests",
|
|
29
|
-
icon: "i-ph-paper-plane-tilt",
|
|
30
|
-
description: "Trigger test sends and replay a previous send",
|
|
31
|
-
dependencies: [MAILING_ACCESS_PERMISSION],
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
id: MAILING_SETTINGS_MANAGE_PERMISSION,
|
|
35
|
-
title: "Manage mailing settings",
|
|
36
|
-
icon: "i-ph-sliders",
|
|
37
|
-
description: "Edit sender identity, retention and template categories",
|
|
38
|
-
dependencies: [MAILING_ACCESS_PERMISSION],
|
|
39
|
-
},
|
|
40
|
-
];
|
|
6
|
+
// `@RegisterPage` publishes the page synchronously when the class is defined,
|
|
7
|
+
// so the sends page's default permission id is known once it is imported.
|
|
8
|
+
const sendsPagePermissionId = GetPermissionId(SendsPageController);
|
|
41
9
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
10
|
+
RegisterPermission(MAILING_SEND_PERMISSION, {
|
|
11
|
+
id: MAILING_SEND_PERMISSION,
|
|
12
|
+
title: "Send e-mails and tests",
|
|
13
|
+
icon: "i-ph-paper-plane-tilt",
|
|
14
|
+
description: "Trigger test sends and replay a previous send",
|
|
15
|
+
dependencies: sendsPagePermissionId ? [sendsPagePermissionId] : [],
|
|
16
|
+
});
|
package/src/routes/templates.ts
CHANGED
|
@@ -96,7 +96,7 @@ export class TemplatesController extends Controller(
|
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
98
|
* The tenant's categories for a category picker. Separate from `/settings`,
|
|
99
|
-
* which is guarded by the settings
|
|
99
|
+
* which is guarded by the settings page permission a template editor need
|
|
100
100
|
* not hold.
|
|
101
101
|
*/
|
|
102
102
|
@Get("/categories")
|
|
@@ -126,6 +126,8 @@ export default defineConfig({
|
|
|
126
126
|
source: SHARED_MODULE_SOURCES.api,
|
|
127
127
|
config: {
|
|
128
128
|
servers: [{ protocol: "http", host: "127.0.0.1", port: API_PORT }],
|
|
129
|
+
// Required outside development, which the test run is not.
|
|
130
|
+
publicBaseUrl: `http://127.0.0.1:${API_PORT}`,
|
|
129
131
|
},
|
|
130
132
|
},
|
|
131
133
|
"file-storage-local": {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { expect } from "chai";
|
|
2
|
+
import { GetPermission } from "@antelopejs/interface-dms/permissions";
|
|
3
|
+
import { MAILING_SEND_PERMISSION } from "../../constants";
|
|
4
|
+
|
|
5
|
+
const SENDS_PAGE_PERMISSION = "modules.mailing.sends";
|
|
6
|
+
const SETTINGS_PAGE_PERMISSION = "settings.mailing.settings";
|
|
7
|
+
const REMOVED_PERMISSIONS = [
|
|
8
|
+
"mailing.access",
|
|
9
|
+
"mailing.templates.manage",
|
|
10
|
+
"mailing.settings.manage",
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
describe("[unit] permissions", () => {
|
|
14
|
+
it("makes the send permission depend on the sends page permission", async () => {
|
|
15
|
+
const permission = await GetPermission(MAILING_SEND_PERMISSION);
|
|
16
|
+
expect(permission?.dependencies).to.deep.equal([SENDS_PAGE_PERMISSION]);
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
it("registers the settings page default permission", async () => {
|
|
20
|
+
expect(await GetPermission(SETTINGS_PAGE_PERMISSION)).to.not.equal(
|
|
21
|
+
undefined,
|
|
22
|
+
);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it("no longer registers the page-access permissions", async () => {
|
|
26
|
+
for (const id of REMOVED_PERMISSIONS) {
|
|
27
|
+
expect(await GetPermission(id), id).to.equal(undefined);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
});
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"locale": "en",
|
|
4
|
-
"email": {
|
|
5
|
-
"subject": "Your receipt",
|
|
6
|
-
"preheader": "Thanks for your order",
|
|
7
|
-
"missing": [],
|
|
8
|
-
"hiddenBlockIds": [],
|
|
9
|
-
"blocks": [
|
|
10
|
-
{
|
|
11
|
-
"id": "intro",
|
|
12
|
-
"type": "paragraph",
|
|
13
|
-
"text": "Hello Alice & Bob",
|
|
14
|
-
"align": "left"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"id": "items",
|
|
18
|
-
"type": "list",
|
|
19
|
-
"rows": [
|
|
20
|
-
{ "label": "Plan", "value": "Pro" },
|
|
21
|
-
{ "label": "Seats", "value": "3" }
|
|
22
|
-
]
|
|
23
|
-
},
|
|
24
|
-
{ "id": "total", "type": "total", "label": "Total", "value": "€29.00" },
|
|
25
|
-
{
|
|
26
|
-
"id": "footer",
|
|
27
|
-
"type": "footer",
|
|
28
|
-
"text": "Sent by Antelope",
|
|
29
|
-
"unsubscribeLabel": "Unsubscribe",
|
|
30
|
-
"preferencesLabel": "Preferences",
|
|
31
|
-
"unsubscribeUrl": "https://example.test/unsubscribe/en",
|
|
32
|
-
"preferencesUrl": "https://example.test/preferences/en"
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"locale": "fr",
|
|
39
|
-
"email": {
|
|
40
|
-
"subject": "Votre reçu",
|
|
41
|
-
"preheader": "Merci pour votre commande",
|
|
42
|
-
"missing": [],
|
|
43
|
-
"hiddenBlockIds": [],
|
|
44
|
-
"blocks": [
|
|
45
|
-
{
|
|
46
|
-
"id": "intro",
|
|
47
|
-
"type": "paragraph",
|
|
48
|
-
"text": "Bonjour Alice & Bob",
|
|
49
|
-
"align": "left"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"id": "items",
|
|
53
|
-
"type": "list",
|
|
54
|
-
"rows": [
|
|
55
|
-
{ "label": "Offre", "value": "Pro" },
|
|
56
|
-
{ "label": "Places", "value": "3" }
|
|
57
|
-
]
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"id": "total",
|
|
61
|
-
"type": "total",
|
|
62
|
-
"label": "Total",
|
|
63
|
-
"value": "29,00 €"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"id": "footer",
|
|
67
|
-
"type": "footer",
|
|
68
|
-
"text": "Envoyé par Antelope",
|
|
69
|
-
"unsubscribeLabel": "Se désabonner",
|
|
70
|
-
"preferencesLabel": "Préférences",
|
|
71
|
-
"unsubscribeUrl": "https://example.test/unsubscribe/fr",
|
|
72
|
-
"preferencesUrl": "https://example.test/preferences/fr"
|
|
73
|
-
}
|
|
74
|
-
]
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
]
|