@servicelabsco/nestjs-utility-services 2.0.13 → 2.0.15
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/AGENTS.md +189 -0
- package/CODEBASE-LINEAR-VALIDATION-2026-06-03.md +104 -0
- package/CODEBASE-REVIEW-2026-06-03.md +102 -0
- package/dist/app.controller.d.ts +1 -0
- package/dist/app.controller.js +34 -0
- package/dist/app.controller.js.map +1 -1
- package/dist/auth/services/auth.service.js +1 -1
- package/dist/auth/services/auth.service.js.map +1 -1
- package/dist/auth/services/device.token.service.js +1 -1
- package/dist/auth/services/device.token.service.js.map +1 -1
- package/dist/auth/services/social.service.js +1 -1
- package/dist/auth/services/social.service.js.map +1 -1
- package/dist/common/dtos/capture.record.index.dto.d.ts +1 -1
- package/dist/common/dtos/capture.record.index.dto.js.map +1 -1
- package/dist/common/libraries/common.mapper.job.d.ts +1 -1
- package/dist/common/libraries/common.mapper.job.js.map +1 -1
- package/dist/common/libraries/common.subscriber.d.ts +1 -1
- package/dist/common/libraries/common.subscriber.js +2 -2
- package/dist/common/libraries/common.subscriber.js.map +1 -1
- package/dist/common/libraries/platform.utility.js +3 -3
- package/dist/common/libraries/platform.utility.js.map +1 -1
- package/dist/common/libraries/report.data.manager.d.ts +1 -1
- package/dist/common/libraries/report.data.manager.js +1 -1
- package/dist/common/libraries/report.data.manager.js.map +1 -1
- package/dist/common/libraries/seeder.utility.js +0 -1
- package/dist/common/libraries/seeder.utility.js.map +1 -1
- package/dist/platformUtility/consumers/job.consumer.d.ts +1 -1
- package/dist/platformUtility/consumers/job.consumer.js +2 -2
- package/dist/platformUtility/consumers/job.consumer.js.map +1 -1
- package/dist/platformUtility/dtos/mail.options.dto.d.ts +1 -0
- package/dist/platformUtility/dtos/mail.options.dto.js +5 -0
- package/dist/platformUtility/dtos/mail.options.dto.js.map +1 -1
- package/dist/platformUtility/es6.classes.d.ts +6 -3
- package/dist/platformUtility/es6.classes.js +8 -0
- package/dist/platformUtility/es6.classes.js.map +1 -1
- package/dist/platformUtility/interfaces/emithook.email.attachment.interface.d.ts +10 -0
- package/dist/platformUtility/interfaces/emithook.email.attachment.interface.js +3 -0
- package/dist/platformUtility/interfaces/emithook.email.attachment.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/emithook.email.list.options.interface.d.ts +7 -0
- package/dist/platformUtility/interfaces/emithook.email.list.options.interface.js +3 -0
- package/dist/platformUtility/interfaces/emithook.email.list.options.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/emithook.email.message.interface.d.ts +20 -0
- package/dist/platformUtility/interfaces/emithook.email.message.interface.js +3 -0
- package/dist/platformUtility/interfaces/emithook.email.message.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/emithook.email.send.options.interface.d.ts +12 -0
- package/dist/platformUtility/interfaces/emithook.email.send.options.interface.js +3 -0
- package/dist/platformUtility/interfaces/emithook.email.send.options.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/emithook.email.send.result.interface.d.ts +3 -0
- package/dist/platformUtility/interfaces/emithook.email.send.result.interface.js +3 -0
- package/dist/platformUtility/interfaces/emithook.email.send.result.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/emithook.suppression.interface.d.ts +6 -0
- package/dist/platformUtility/interfaces/emithook.suppression.interface.js +3 -0
- package/dist/platformUtility/interfaces/emithook.suppression.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/html.pdf.convert.pdf.interface.d.ts +7 -0
- package/dist/platformUtility/interfaces/html.pdf.convert.pdf.interface.js +3 -0
- package/dist/platformUtility/interfaces/html.pdf.convert.pdf.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/html.pdf.convert.request.interface.d.ts +9 -0
- package/dist/platformUtility/interfaces/html.pdf.convert.request.interface.js +3 -0
- package/dist/platformUtility/interfaces/html.pdf.convert.request.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/html.pdf.convert.source.interface.d.ts +6 -0
- package/dist/platformUtility/interfaces/html.pdf.convert.source.interface.js +3 -0
- package/dist/platformUtility/interfaces/html.pdf.convert.source.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/html.pdf.convert.success.interface.d.ts +8 -0
- package/dist/platformUtility/interfaces/html.pdf.convert.success.interface.js +3 -0
- package/dist/platformUtility/interfaces/html.pdf.convert.success.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/html.pdf.margin.interface.d.ts +6 -0
- package/dist/platformUtility/interfaces/html.pdf.margin.interface.js +3 -0
- package/dist/platformUtility/interfaces/html.pdf.margin.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/html.pdf.options.interface.d.ts +13 -0
- package/dist/platformUtility/interfaces/html.pdf.options.interface.js +3 -0
- package/dist/platformUtility/interfaces/html.pdf.options.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/html.pdf.paper.format.interface.d.ts +1 -0
- package/dist/platformUtility/interfaces/html.pdf.paper.format.interface.js +3 -0
- package/dist/platformUtility/interfaces/html.pdf.paper.format.interface.js.map +1 -0
- package/dist/platformUtility/interfaces/index.d.ts +13 -0
- package/dist/platformUtility/interfaces/index.js +13 -0
- package/dist/platformUtility/interfaces/index.js.map +1 -1
- package/dist/platformUtility/jobs/process.ses.delivery.webhook.job.js.map +1 -1
- package/dist/platformUtility/jobs/process.tracking.webhook.job.js.map +1 -1
- package/dist/platformUtility/jobs/test.job.d.ts +1 -1
- package/dist/platformUtility/jobs/test.job.js +1 -1
- package/dist/platformUtility/jobs/test.job.js.map +1 -1
- package/dist/platformUtility/libraries/index.d.ts +2 -0
- package/dist/platformUtility/libraries/index.js +2 -0
- package/dist/platformUtility/libraries/index.js.map +1 -1
- package/dist/platformUtility/libraries/process.common.emithook.mail.d.ts +13 -0
- package/dist/platformUtility/libraries/process.common.emithook.mail.js +42 -0
- package/dist/platformUtility/libraries/process.common.emithook.mail.js.map +1 -0
- package/dist/platformUtility/libraries/process.common.ses.mail.js.map +1 -1
- package/dist/platformUtility/libraries/process.emithook.mail.d.ts +26 -0
- package/dist/platformUtility/libraries/process.emithook.mail.js +104 -0
- package/dist/platformUtility/libraries/process.emithook.mail.js.map +1 -0
- package/dist/platformUtility/libraries/process.ses.mail.js.map +1 -1
- package/dist/platformUtility/services/cache.service.js +2 -2
- package/dist/platformUtility/services/cache.service.js.map +1 -1
- package/dist/platformUtility/services/emithook.mail.service.d.ts +27 -0
- package/dist/platformUtility/services/emithook.mail.service.js +137 -0
- package/dist/platformUtility/services/emithook.mail.service.js.map +1 -0
- package/dist/platformUtility/services/es6.service.d.ts +5 -1
- package/dist/platformUtility/services/es6.service.js +9 -1
- package/dist/platformUtility/services/es6.service.js.map +1 -1
- package/dist/platformUtility/services/index.d.ts +2 -0
- package/dist/platformUtility/services/index.js +2 -0
- package/dist/platformUtility/services/index.js.map +1 -1
- package/dist/platformUtility/services/mail.service.d.ts +3 -1
- package/dist/platformUtility/services/mail.service.js +8 -2
- package/dist/platformUtility/services/mail.service.js.map +1 -1
- package/dist/platformUtility/services/pdf.service.d.ts +28 -0
- package/dist/platformUtility/services/pdf.service.js +143 -0
- package/dist/platformUtility/services/pdf.service.js.map +1 -0
- package/dist/platformUtility/services/remote.request.service.js +1 -1
- package/dist/platformUtility/services/remote.request.service.js.map +1 -1
- package/dist/platformUtility/services/ses.mail.notification.service.js.map +1 -1
- package/dist/system/controllers/user.preference.controller.js +0 -1
- package/dist/system/controllers/user.preference.controller.js.map +1 -1
- package/dist/system/jobs/column.mapper.job.js.map +1 -1
- package/dist/system/jobs/mail.validation.job.d.ts +1 -1
- package/dist/system/jobs/mail.validation.job.js +1 -1
- package/dist/system/jobs/mail.validation.job.js.map +1 -1
- package/dist/system/jobs/mobile.validation.job.d.ts +1 -1
- package/dist/system/jobs/mobile.validation.job.js +1 -1
- package/dist/system/jobs/mobile.validation.job.js.map +1 -1
- package/dist/system/jobs/relationship.mapper.job.js.map +1 -1
- package/dist/system/jobs/sms.message.job.d.ts +1 -1
- package/dist/system/jobs/sms.message.job.js +1 -1
- package/dist/system/jobs/sms.message.job.js.map +1 -1
- package/dist/system/jobs/sync.all.code.job.js +2 -2
- package/dist/system/jobs/sync.all.code.job.js.map +1 -1
- package/dist/system/jobs/test.mongo.job.js.map +1 -1
- package/dist/system/jobs/user.group.member.job.js +0 -1
- package/dist/system/jobs/user.group.member.job.js.map +1 -1
- package/dist/system/libraries/code.evaluator.js.map +1 -1
- package/dist/system/libraries/execute.code.fix.js.map +1 -1
- package/dist/system/libraries/get.report.query.js +9 -0
- package/dist/system/libraries/get.report.query.js.map +1 -1
- package/dist/system/libraries/process.script.execution.js.map +1 -1
- package/dist/system/services/event.queue.service.js +2 -2
- package/dist/system/services/event.queue.service.js.map +1 -1
- package/dist/system/subscribers/code.fix.log.subscriber.js.map +1 -1
- package/dist/system/subscribers/mobile.validation.subscriber.js.map +1 -1
- package/package.json +4 -3
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { HtmlPdfMarginInterface } from './html.pdf.margin.interface';
|
|
2
|
+
import { HtmlPdfPaperFormatInterface } from './html.pdf.paper.format.interface';
|
|
3
|
+
export interface HtmlPdfOptionsInterface {
|
|
4
|
+
format?: HtmlPdfPaperFormatInterface;
|
|
5
|
+
width?: number | string;
|
|
6
|
+
height?: number | string;
|
|
7
|
+
orientation?: 'portrait' | 'landscape';
|
|
8
|
+
landscape?: boolean;
|
|
9
|
+
scale?: number;
|
|
10
|
+
preferCSSPageSize?: boolean;
|
|
11
|
+
printBackground?: boolean;
|
|
12
|
+
margin?: HtmlPdfMarginInterface;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html.pdf.options.interface.js","sourceRoot":"","sources":["../../../src/platformUtility/interfaces/html.pdf.options.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type HtmlPdfPaperFormatInterface = 'Letter' | 'Legal' | 'Tabloid' | 'Ledger' | 'A0' | 'A1' | 'A2' | 'A3' | 'A4' | 'A5' | 'A6';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html.pdf.paper.format.interface.js","sourceRoot":"","sources":["../../../src/platformUtility/interfaces/html.pdf.paper.format.interface.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1,14 @@
|
|
|
1
|
+
export * from './emithook.email.attachment.interface';
|
|
2
|
+
export * from './emithook.email.list.options.interface';
|
|
3
|
+
export * from './emithook.email.message.interface';
|
|
4
|
+
export * from './emithook.email.send.options.interface';
|
|
5
|
+
export * from './emithook.email.send.result.interface';
|
|
6
|
+
export * from './emithook.suppression.interface';
|
|
7
|
+
export * from './html.pdf.convert.pdf.interface';
|
|
8
|
+
export * from './html.pdf.convert.request.interface';
|
|
9
|
+
export * from './html.pdf.convert.source.interface';
|
|
10
|
+
export * from './html.pdf.convert.success.interface';
|
|
11
|
+
export * from './html.pdf.margin.interface';
|
|
12
|
+
export * from './html.pdf.options.interface';
|
|
13
|
+
export * from './html.pdf.paper.format.interface';
|
|
1
14
|
export * from './split.pdf.page.interface';
|
|
@@ -14,5 +14,18 @@ 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
|
+
__exportStar(require("./emithook.email.attachment.interface"), exports);
|
|
18
|
+
__exportStar(require("./emithook.email.list.options.interface"), exports);
|
|
19
|
+
__exportStar(require("./emithook.email.message.interface"), exports);
|
|
20
|
+
__exportStar(require("./emithook.email.send.options.interface"), exports);
|
|
21
|
+
__exportStar(require("./emithook.email.send.result.interface"), exports);
|
|
22
|
+
__exportStar(require("./emithook.suppression.interface"), exports);
|
|
23
|
+
__exportStar(require("./html.pdf.convert.pdf.interface"), exports);
|
|
24
|
+
__exportStar(require("./html.pdf.convert.request.interface"), exports);
|
|
25
|
+
__exportStar(require("./html.pdf.convert.source.interface"), exports);
|
|
26
|
+
__exportStar(require("./html.pdf.convert.success.interface"), exports);
|
|
27
|
+
__exportStar(require("./html.pdf.margin.interface"), exports);
|
|
28
|
+
__exportStar(require("./html.pdf.options.interface"), exports);
|
|
29
|
+
__exportStar(require("./html.pdf.paper.format.interface"), exports);
|
|
17
30
|
__exportStar(require("./split.pdf.page.interface"), exports);
|
|
18
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA0C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wEAAsD;AAAA,0EAAwD;AAAA,qEAAmD;AAAA,0EAAwD;AAAA,yEAAuD;AAAA,mEAAiD;AAAA,mEAAiD;AAAA,uEAAqD;AAAA,sEAAoD;AAAA,uEAAqD;AAAA,8DAA4C;AAAA,+DAA6C;AAAA,oEAAkD;AAAA,6DAA0C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process.ses.delivery.webhook.job.js","sourceRoot":"","sources":["../../../src/platformUtility/jobs/process.ses.delivery.webhook.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,kEAA8D;AAC9D,6DAAyD;
|
|
1
|
+
{"version":3,"file":"process.ses.delivery.webhook.job.js","sourceRoot":"","sources":["../../../src/platformUtility/jobs/process.ses.delivery.webhook.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,kEAA8D;AAC9D,6DAAyD;AACzD,6FAAuF;AAGhF,IAAM,4BAA4B,GAAlC,MAAM,4BAA6B,SAAQ,sBAAS;IACvD,YACuB,YAA0B,EAC1B,0BAAsD;QAEzE,KAAK,CAAC,kCAAkC,CAAC,CAAC;QAHvB,iBAAY,GAAZ,YAAY,CAAc;QAC1B,+BAA0B,GAA1B,0BAA0B,CAA4B;IAG7E,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,OAAY;QACrB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,0BAA0B,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;QACnF,IAAI,CAAC,IAAI;YAAE,OAAO;QAElB,MAAM,EAAE,mBAAmB,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC;QAEpD,MAAM,SAAS,GAAG,mBAAmB,CAAC,SAAS,CAAC;QAEhD,IAAI,CAAC,SAAS;YAAE,OAAO;QAEvB,IAAI,SAAS,KAAK,UAAU;YAAE,MAAM,IAAI,CAAC,0BAA0B,CAAC,sBAAsB,CAAC,mBAAmB,EAAE,aAAa,CAAC,CAAC;QAE/H,IAAI,SAAS,KAAK,QAAQ;YAAE,MAAM,IAAI,CAAC,0BAA0B,CAAC,oBAAoB,CAAC,mBAAmB,EAAE,aAAa,CAAC,CAAC;QAE3H,OAAO;IACX,CAAC;CACJ,CAAA;AAxBY,oEAA4B;uCAA5B,4BAA4B;IADxC,IAAA,mBAAU,GAAE;qCAG4B,4BAAY;QACE,0DAA0B;GAHpE,4BAA4B,CAwBxC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process.tracking.webhook.job.js","sourceRoot":"","sources":["../../../src/platformUtility/jobs/process.tracking.webhook.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,kEAA8D;AAC9D,6DAAyD;
|
|
1
|
+
{"version":3,"file":"process.tracking.webhook.job.js","sourceRoot":"","sources":["../../../src/platformUtility/jobs/process.tracking.webhook.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,kEAA8D;AAC9D,6DAAyD;AACzD,uFAAkF;AAG3E,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,sBAAS;IACpD,YAA+B,YAA0B;QACrD,KAAK,CAAC,kCAAkC,CAAC,CAAC;QADf,iBAAY,GAAZ,YAAY,CAAc;IAEzD,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,KAAU;QACnB,MAAM,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAEnC,OAAO;IACX,CAAC;IAEO,KAAK,CAAC,gBAAgB,CAAC,IAAS;QACpC,MAAM,aAAa,GAAG,MAAM,2CAAmB,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,mBAAmB,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,iBAAiB,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QAE5I,MAAM,KAAK,GAAU,aAAa,EAAE,mBAAmB,EAAE,KAAK,IAAI,EAAE,CAAC;QAErE,MAAM,cAAc,GAAG,IAAI,IAAI,EAAE,CAAC;QAElC,MAAM,QAAQ,GAAG,EAAE,SAAS,EAAE,cAAc,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC;QAE3G,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAErB,aAAa,CAAC,mBAAmB,GAAG,EAAE,GAAG,aAAa,CAAC,mBAAmB,EAAE,KAAK,EAAE,CAAC;QAEpF,MAAM,aAAa,CAAC,IAAI,EAAE,CAAC;IAC/B,CAAC;CACJ,CAAA;AA1BY,8DAAyB;oCAAzB,yBAAyB;IADrC,IAAA,mBAAU,GAAE;qCAEoC,4BAAY;GADhD,yBAAyB,CA0BrC"}
|
|
@@ -11,5 +11,5 @@ export declare class TestJob extends CommonJob {
|
|
|
11
11
|
protected readonly propertyService: PropertyService;
|
|
12
12
|
protected noDuplicate: boolean;
|
|
13
13
|
constructor(queueService: QueueService, uploadService: UploadService, sqlService: SqlService, propertyService: PropertyService);
|
|
14
|
-
handle(
|
|
14
|
+
handle(_data: any, _job: Job): Promise<void>;
|
|
15
15
|
}
|
|
@@ -26,7 +26,7 @@ let TestJob = class TestJob extends common_job_1.CommonJob {
|
|
|
26
26
|
this.propertyService = propertyService;
|
|
27
27
|
this.noDuplicate = true;
|
|
28
28
|
}
|
|
29
|
-
async handle(
|
|
29
|
+
async handle(_data, _job) {
|
|
30
30
|
this.info('TestJob started');
|
|
31
31
|
this.log(new Date());
|
|
32
32
|
this.logIdentifier = `testing-direct-injection`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test.job.js","sourceRoot":"","sources":["../../../src/platformUtility/jobs/test.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,6EAAyE;AACzE,yEAAqE;AACrE,yDAAqD;AACrD,oEAAgE;AAChE,+DAA2D;AAC3D,8EAA0E;AAGnE,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,sBAAS;IAGlC,YACuB,YAA0B,EAC1B,aAA4B,EAC5B,UAAsB,EACtB,eAAgC;QAEnD,KAAK,CAAC,kCAAkC,CAAC,CAAC;QALvB,iBAAY,GAAZ,YAAY,CAAc;QAC1B,kBAAa,GAAb,aAAa,CAAe;QAC5B,eAAU,GAAV,UAAU,CAAY;QACtB,oBAAe,GAAf,eAAe,CAAiB;QAN7C,gBAAW,GAAY,IAAI,CAAC;IAStC,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"test.job.js","sourceRoot":"","sources":["../../../src/platformUtility/jobs/test.job.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,6EAAyE;AACzE,yEAAqE;AACrE,yDAAqD;AACrD,oEAAgE;AAChE,+DAA2D;AAC3D,8EAA0E;AAGnE,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,sBAAS;IAGlC,YACuB,YAA0B,EAC1B,aAA4B,EAC5B,UAAsB,EACtB,eAAgC;QAEnD,KAAK,CAAC,kCAAkC,CAAC,CAAC;QALvB,iBAAY,GAAZ,YAAY,CAAc;QAC1B,kBAAa,GAAb,aAAa,CAAe;QAC5B,eAAU,GAAV,UAAU,CAAY;QACtB,oBAAe,GAAf,eAAe,CAAiB;QAN7C,gBAAW,GAAY,IAAI,CAAC;IAStC,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,KAAU,EAAE,IAAS;QAC9B,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAC7B,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;QACrB,IAAI,CAAC,aAAa,GAAG,0BAA0B,CAAC;QAEhD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC;YAC3B,IAAI,CAAC,GAAG,CAAC,2BAA2B,kCAAe,CAAC,mBAAmB,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QACnF,CAAC;IACL,CAAC;CACJ,CAAA;AApBY,0BAAO;kBAAP,OAAO;IADnB,IAAA,mBAAU,GAAE;qCAK4B,4BAAY;QACX,8BAAa;QAChB,wBAAU;QACL,kCAAe;GAP9C,OAAO,CAoBnB"}
|
|
@@ -6,9 +6,11 @@ export * from './create.es6.service.file';
|
|
|
6
6
|
export * from './create.index.file';
|
|
7
7
|
export * from './file.system.utility';
|
|
8
8
|
export * from './process.audit.log.data';
|
|
9
|
+
export * from './process.common.emithook.mail';
|
|
9
10
|
export * from './process.common.mail';
|
|
10
11
|
export * from './process.common.ses.mail';
|
|
11
12
|
export * from './process.common.smtp.mail';
|
|
13
|
+
export * from './process.emithook.mail';
|
|
12
14
|
export * from './process.kaleyra.callback.response';
|
|
13
15
|
export * from './process.kaleyra.sms';
|
|
14
16
|
export * from './process.ses.mail';
|
|
@@ -22,9 +22,11 @@ __exportStar(require("./create.es6.service.file"), exports);
|
|
|
22
22
|
__exportStar(require("./create.index.file"), exports);
|
|
23
23
|
__exportStar(require("./file.system.utility"), exports);
|
|
24
24
|
__exportStar(require("./process.audit.log.data"), exports);
|
|
25
|
+
__exportStar(require("./process.common.emithook.mail"), exports);
|
|
25
26
|
__exportStar(require("./process.common.mail"), exports);
|
|
26
27
|
__exportStar(require("./process.common.ses.mail"), exports);
|
|
27
28
|
__exportStar(require("./process.common.smtp.mail"), exports);
|
|
29
|
+
__exportStar(require("./process.emithook.mail"), exports);
|
|
28
30
|
__exportStar(require("./process.kaleyra.callback.response"), exports);
|
|
29
31
|
__exportStar(require("./process.kaleyra.sms"), exports);
|
|
30
32
|
__exportStar(require("./process.ses.mail"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/libraries/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AAAA,iEAA+C;AAAA,4DAA0C;AAAA,yDAAuC;AAAA,4DAA0C;AAAA,sDAAoC;AAAA,wDAAsC;AAAA,2DAAyC;AAAA,wDAAsC;AAAA,4DAA0C;AAAA,6DAA2C;AAAA,sEAAoD;AAAA,wDAAsC;AAAA,qDAAmC;AAAA,yDAAuC;AAAA,sDAAoC;AAAA,oDAAiC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platformUtility/libraries/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AAAA,iEAA+C;AAAA,4DAA0C;AAAA,yDAAuC;AAAA,4DAA0C;AAAA,sDAAoC;AAAA,wDAAsC;AAAA,2DAAyC;AAAA,iEAA+C;AAAA,wDAAsC;AAAA,4DAA0C;AAAA,6DAA2C;AAAA,0DAAwC;AAAA,sEAAoD;AAAA,wDAAsC;AAAA,qDAAmC;AAAA,yDAAuC;AAAA,sDAAoC;AAAA,oDAAiC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PropertyService } from '../../system/services/property.service';
|
|
2
|
+
import { MailOptionsDto } from '../dtos/mail.options.dto';
|
|
3
|
+
import { EmithookEmailAttachmentInterface } from '../interfaces/emithook.email.attachment.interface';
|
|
4
|
+
import { MailService } from '../services/mail.service';
|
|
5
|
+
import { ProcessCommonMail } from './process.common.mail';
|
|
6
|
+
export declare class ProcessCommonEmithookMail extends ProcessCommonMail {
|
|
7
|
+
protected readonly propertyService: PropertyService;
|
|
8
|
+
protected options: MailOptionsDto;
|
|
9
|
+
protected readonly mailService: MailService;
|
|
10
|
+
protected normalizeRecipients(value: string | string[]): string[];
|
|
11
|
+
protected getFromAddress(): Promise<string>;
|
|
12
|
+
protected buildAttachments(): Promise<EmithookEmailAttachmentInterface[]>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProcessCommonEmithookMail = void 0;
|
|
4
|
+
const class_validator_1 = require("class-validator");
|
|
5
|
+
const process_common_mail_1 = require("./process.common.mail");
|
|
6
|
+
class ProcessCommonEmithookMail extends process_common_mail_1.ProcessCommonMail {
|
|
7
|
+
normalizeRecipients(value) {
|
|
8
|
+
return Array.isArray(value) ? value : [value];
|
|
9
|
+
}
|
|
10
|
+
async getFromAddress() {
|
|
11
|
+
if (this.options.from)
|
|
12
|
+
return this.options.from;
|
|
13
|
+
const emithookFrom = await this.propertyService.get('emithook.mail.from', false);
|
|
14
|
+
if (emithookFrom)
|
|
15
|
+
return emithookFrom;
|
|
16
|
+
const smtpFrom = await this.propertyService.get('smtp.default.from', false);
|
|
17
|
+
if (smtpFrom)
|
|
18
|
+
return smtpFrom;
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
async buildAttachments() {
|
|
22
|
+
if (!this.options.files?.length)
|
|
23
|
+
return [];
|
|
24
|
+
const attachments = [];
|
|
25
|
+
for (const file of this.options.files) {
|
|
26
|
+
if ((0, class_validator_1.isURL)(file.file)) {
|
|
27
|
+
attachments.push({ url: file.file });
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
const prepared = await this.getAttachments([file]);
|
|
31
|
+
const item = prepared[0];
|
|
32
|
+
attachments.push({
|
|
33
|
+
filename: item.filename,
|
|
34
|
+
content_type: file.type || item.type || 'application/octet-stream',
|
|
35
|
+
content: item.content,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return attachments;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.ProcessCommonEmithookMail = ProcessCommonEmithookMail;
|
|
42
|
+
//# sourceMappingURL=process.common.emithook.mail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process.common.emithook.mail.js","sourceRoot":"","sources":["../../../src/platformUtility/libraries/process.common.emithook.mail.ts"],"names":[],"mappings":";;;AAAA,qDAAwC;AAKxC,+DAA0D;AAK1D,MAAa,yBAA0B,SAAQ,uCAAiB;IAKlD,mBAAmB,CAAC,KAAwB;QAClD,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAClD,CAAC;IAES,KAAK,CAAC,cAAc;QAC1B,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;QAEhD,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAAC;QACjF,IAAI,YAAY;YAAE,OAAO,YAAY,CAAC;QAEtC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC;QAC5E,IAAI,QAAQ;YAAE,OAAO,QAAQ,CAAC;QAE9B,OAAO,IAAI,CAAC;IAChB,CAAC;IAES,KAAK,CAAC,gBAAgB;QAC5B,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM;YAAE,OAAO,EAAE,CAAC;QAE3C,MAAM,WAAW,GAAuC,EAAE,CAAC;QAE3D,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;YACpC,IAAI,IAAA,uBAAK,EAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBACnB,WAAW,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;gBACrC,SAAS;YACb,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACnD,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;YAEzB,WAAW,CAAC,IAAI,CAAC;gBACb,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,YAAY,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI,0BAA0B;gBAClE,OAAO,EAAE,IAAI,CAAC,OAAO;aACxB,CAAC,CAAC;QACP,CAAC;QAED,OAAO,WAAW,CAAC;IACvB,CAAC;CACJ;AA5CD,8DA4CC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process.common.ses.mail.js","sourceRoot":"","sources":["../../../src/platformUtility/libraries/process.common.ses.mail.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"process.common.ses.mail.js","sourceRoot":"","sources":["../../../src/platformUtility/libraries/process.common.ses.mail.ts"],"names":[],"mappings":";;;AAEA,+DAA0D;AAC1D,oDAAgD;AAChD,qFAAiF;AAYjF,MAAa,oBAAqB,SAAQ,uCAAiB;IAA3D;;QACY,WAAM,GAAG,IAAI,CAAC;IAoD1B,CAAC;IAzCa,KAAK,CAAC,UAAU;QACtB,MAAM,MAAM,GAAiB,MAAM,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,CAAC;QAErE,IAAI,CAAC,MAAM,GAAG,IAAI,sBAAS,CAAC;YACxB,WAAW,EAAE,EAAE,WAAW,EAAE,MAAM,CAAC,GAAG,EAAE,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE;YACxE,MAAM,EAAE,MAAM,CAAC,MAAM;SACxB,CAAC,CAAC;IACP,CAAC;IAQS,KAAK,CAAC,SAAS;QACrB,IAAI,CAAC,IAAI,CAAC,MAAM;YAAE,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;QAC1C,IAAI,CAAC,IAAI,CAAC,MAAM;YAAE,MAAM,IAAI,wCAAkB,CAAC,4BAA4B,CAAC,CAAC;QAE7E,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAMM,KAAK,CAAC,cAAc;QACvB,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAC5D,MAAM,WAAW,GAAG,EAAE,CAAC;QAEvB,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACnB,WAAW,CAAC,IAAI,CAAC;gBACb,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,WAAW,EAAE,IAAI,CAAC,IAAI;gBACtB,OAAO,EAAE,IAAI,CAAC,OAAO;aACxB,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAEH,OAAO,WAAW,CAAC;IACvB,CAAC;CACJ;AArDD,oDAqDC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { PropertyService } from '../../system/services/property.service';
|
|
2
|
+
import { MailOptionsDto } from '../dtos/mail.options.dto';
|
|
3
|
+
import { EmithookMailService } from '../services/emithook.mail.service';
|
|
4
|
+
import { MailService } from '../services/mail.service';
|
|
5
|
+
import { ProcessCommonEmithookMail } from './process.common.emithook.mail';
|
|
6
|
+
export declare class ProcessEmithookMail extends ProcessCommonEmithookMail {
|
|
7
|
+
protected readonly propertyService: PropertyService;
|
|
8
|
+
protected options: MailOptionsDto;
|
|
9
|
+
protected readonly mailService: MailService;
|
|
10
|
+
protected readonly emithookMailService: EmithookMailService;
|
|
11
|
+
constructor(propertyService: PropertyService, options: MailOptionsDto, mailService: MailService, emithookMailService: EmithookMailService);
|
|
12
|
+
process(): Promise<{
|
|
13
|
+
identifier?: string;
|
|
14
|
+
trackingId?: string;
|
|
15
|
+
attributes: {
|
|
16
|
+
emithook: any;
|
|
17
|
+
};
|
|
18
|
+
track_pairs?: Record<string, any>;
|
|
19
|
+
}>;
|
|
20
|
+
private buildPayload;
|
|
21
|
+
private setTracking;
|
|
22
|
+
private setTrackingPixel;
|
|
23
|
+
private getTrackPairs;
|
|
24
|
+
private getAllEmails;
|
|
25
|
+
private appendEmails;
|
|
26
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProcessEmithookMail = void 0;
|
|
4
|
+
const operation_exception_1 = require("../../common/exceptions/operation.exception");
|
|
5
|
+
const platform_utility_1 = require("../../common/libraries/platform.utility");
|
|
6
|
+
const process_common_emithook_mail_1 = require("./process.common.emithook.mail");
|
|
7
|
+
class ProcessEmithookMail extends process_common_emithook_mail_1.ProcessCommonEmithookMail {
|
|
8
|
+
constructor(propertyService, options, mailService, emithookMailService) {
|
|
9
|
+
super();
|
|
10
|
+
this.propertyService = propertyService;
|
|
11
|
+
this.options = options;
|
|
12
|
+
this.mailService = mailService;
|
|
13
|
+
this.emithookMailService = emithookMailService;
|
|
14
|
+
}
|
|
15
|
+
async process() {
|
|
16
|
+
const { trackingId, trackingPixelId } = await this.setTracking();
|
|
17
|
+
const payload = await this.buildPayload();
|
|
18
|
+
const idempotencyKey = this.options.idempotency_key || trackingId;
|
|
19
|
+
const response = await this.emithookMailService.send(payload, idempotencyKey);
|
|
20
|
+
const result = {
|
|
21
|
+
identifier: response.id,
|
|
22
|
+
attributes: { emithook: response },
|
|
23
|
+
};
|
|
24
|
+
if (this.options.tracking_enabled) {
|
|
25
|
+
result.trackingId = trackingId;
|
|
26
|
+
result.track_pairs = this.getTrackPairs(trackingPixelId);
|
|
27
|
+
}
|
|
28
|
+
return result;
|
|
29
|
+
}
|
|
30
|
+
async buildPayload() {
|
|
31
|
+
const from = await this.getFromAddress();
|
|
32
|
+
if (!from)
|
|
33
|
+
throw new operation_exception_1.OperationException('from is required for emithook mail');
|
|
34
|
+
if (!this.options.to)
|
|
35
|
+
throw new operation_exception_1.OperationException('to is required for emithook mail');
|
|
36
|
+
if (!this.options.html && !this.options.text)
|
|
37
|
+
throw new operation_exception_1.OperationException('html or text is required for emithook mail');
|
|
38
|
+
const payload = {
|
|
39
|
+
from,
|
|
40
|
+
to: this.normalizeRecipients(this.options.to),
|
|
41
|
+
subject: this.options.subject,
|
|
42
|
+
};
|
|
43
|
+
if (this.options.html)
|
|
44
|
+
payload.html = this.options.html;
|
|
45
|
+
if (this.options.text)
|
|
46
|
+
payload.text = this.options.text;
|
|
47
|
+
if (this.options.cc)
|
|
48
|
+
payload.cc = this.normalizeRecipients(this.options.cc);
|
|
49
|
+
if (this.options.bcc)
|
|
50
|
+
payload.bcc = this.normalizeRecipients(this.options.bcc);
|
|
51
|
+
const attachments = await this.buildAttachments();
|
|
52
|
+
if (attachments.length)
|
|
53
|
+
payload.attachments = attachments;
|
|
54
|
+
return payload;
|
|
55
|
+
}
|
|
56
|
+
async setTracking() {
|
|
57
|
+
const now = new Date().getTime();
|
|
58
|
+
const random = platform_utility_1.PlatformUtility.generateRandomAlphaNumeric(32);
|
|
59
|
+
const trackingId = `${now}.${random}`;
|
|
60
|
+
const trackingPixelId = platform_utility_1.PlatformUtility.generateRandomAlphaNumeric(32);
|
|
61
|
+
if (!this.options.tracking_enabled)
|
|
62
|
+
return { trackingId, trackingPixelId };
|
|
63
|
+
await this.setTrackingPixel(trackingId, trackingPixelId);
|
|
64
|
+
return { trackingId, trackingPixelId };
|
|
65
|
+
}
|
|
66
|
+
async setTrackingPixel(trackingId, trackingPixelId) {
|
|
67
|
+
const trackingPixel = await this.mailService.getTrackingPixel(trackingId, trackingPixelId);
|
|
68
|
+
if (!trackingPixel)
|
|
69
|
+
return;
|
|
70
|
+
if (this.options.html) {
|
|
71
|
+
this.options.html = `${this.options.html}${trackingPixel}`;
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
this.options.html = trackingPixel;
|
|
75
|
+
}
|
|
76
|
+
getTrackPairs(trackingPixelId) {
|
|
77
|
+
const track_pairs = {};
|
|
78
|
+
for (const email of this.getAllEmails()) {
|
|
79
|
+
track_pairs[email] = trackingPixelId;
|
|
80
|
+
}
|
|
81
|
+
return track_pairs;
|
|
82
|
+
}
|
|
83
|
+
getAllEmails() {
|
|
84
|
+
let emails = [];
|
|
85
|
+
if (this.options.to)
|
|
86
|
+
emails = this.appendEmails(emails, this.options.to);
|
|
87
|
+
if (this.options.cc)
|
|
88
|
+
emails = this.appendEmails(emails, this.options.cc);
|
|
89
|
+
if (this.options.bcc)
|
|
90
|
+
emails = this.appendEmails(emails, this.options.bcc);
|
|
91
|
+
return emails;
|
|
92
|
+
}
|
|
93
|
+
appendEmails(emails, data) {
|
|
94
|
+
if (Array.isArray(data)) {
|
|
95
|
+
emails.push(...data);
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
emails.push(data);
|
|
99
|
+
}
|
|
100
|
+
return emails;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
exports.ProcessEmithookMail = ProcessEmithookMail;
|
|
104
|
+
//# sourceMappingURL=process.emithook.mail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process.emithook.mail.js","sourceRoot":"","sources":["../../../src/platformUtility/libraries/process.emithook.mail.ts"],"names":[],"mappings":";;;AAAA,qFAAiF;AACjF,8EAA0E;AAM1E,iFAA2E;AAK3E,MAAa,mBAAoB,SAAQ,wDAAyB;IAC9D,YACuB,eAAgC,EACzC,OAAuB,EACd,WAAwB,EACxB,mBAAwC;QAE3D,KAAK,EAAE,CAAC;QALW,oBAAe,GAAf,eAAe,CAAiB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,CAAC,CAAC;QAE3E,OAAO,MAAM,CAAC;IAClB,CAAC;IAEO,YAAY,CAAC,MAAgB,EAAE,IAAuB;QAC1D,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YACtB,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;QACzB,CAAC;aAAM,CAAC;YACJ,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtB,CAAC;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ;AAvHD,kDAuHC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process.ses.mail.js","sourceRoot":"","sources":["../../../src/platformUtility/libraries/process.ses.mail.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"process.ses.mail.js","sourceRoot":"","sources":["../../../src/platformUtility/libraries/process.ses.mail.ts"],"names":[],"mappings":";;;AAIA,oDAAuD;AACvD,8EAA0E;AAC1E,uEAAiE;AASjE,MAAa,cAAe,SAAQ,8CAAoB;IAOpD,YACuB,eAAgC,EACzC,OAAuB,EACd,gBAAkC,EAClC,WAAwB;QAE3C,KAAK,EAAE,CAAC;QALW,oBAAe,GAAf,eAAe,CAAiB;QACzC,YAAO,GAAP,OAAO,CAAgB;QACd,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,gBAAW,GAAX,WAAW,CAAa;IAG/C,CAAC;IAMD,KAAK,CAAC,OAAO;QACT,MAAM,QAAQ,GAAQ,MAAM,IAAI,CAAC,YAAY,EAAE,CAAC;QAEhD,MAAM,UAAU,GAAG,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAE/D,OAAO;YACH,UAAU;YACV,UAAU,EAAE,QAAQ,EAAE,UAAU;YAChC,UAAU,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE;YAC7B,WAAW,EAAE,QAAQ,EAAE,WAAW;SACrC,CAAC;IACN,CAAC;IAMD,KAAK,CAA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O,WAAW;QACf,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;QACjC,MAAM,MAAM,GAAG,kCAAe,CAAC,0BAA0B,CAAC,EAAE,CAAC,CAAC;QAC9D,MAAM,UAAU,GAAG,GAAG,GAAG,IAAI,MAAM,EAAE,CAAC;QAEtC,MAAM,eAAe,GAAG,kCAAe,CAAC,0BAA0B,CAAC,EAAE,CAAC,CAAC;QAEvE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,CAAC;IAC3C,CAAC;IASO,KAAK,CAAC,gBAAgB,CAAC,UAAkB,EAAE,eAAuB;QACtE,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;QAC3F,IAAI,CAAC,aAAa;YAAE,OAAO;QAE3B,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,aAAa,EAAE,CAAC;IAC/D,CAAC;CACJ;AApID,wCAoIC"}
|
|
@@ -45,7 +45,7 @@ let CacheService = class CacheService extends common_service_1.CommonService {
|
|
|
45
45
|
try {
|
|
46
46
|
data = JSON.parse(dataString);
|
|
47
47
|
}
|
|
48
|
-
catch
|
|
48
|
+
catch {
|
|
49
49
|
await this.delete(key);
|
|
50
50
|
return defaultValue;
|
|
51
51
|
}
|
|
@@ -59,7 +59,7 @@ let CacheService = class CacheService extends common_service_1.CommonService {
|
|
|
59
59
|
}
|
|
60
60
|
return data.value !== undefined ? data.value : data;
|
|
61
61
|
}
|
|
62
|
-
catch
|
|
62
|
+
catch {
|
|
63
63
|
return defaultValue;
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.service.js","sourceRoot":"","sources":["../../../src/platformUtility/services/cache.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,uCAA+D;AAC/D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CAAC,GAAG,CAAC,UAAU,IAAI,SAAS;gBAC/C,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,SAAS;aAChF,CAAC;YAEF,OAAO,SAAS,CAAC;QACrB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO;gBACH,KAAK,EAAE,KAAK,CAAC,OAAO;gBACpB,KAAK,EAAE,KAAK,CAAC,KAAK;aACrB,CAAC;QACN,CAAC;IACL,CAAC;CACJ,CAAA;AAzKY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;qCAQkC,4BAAY;GAP9C,YAAY,CAyKxB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CommonService } from '../../common/libraries/common.service';
|
|
2
|
+
import { PropertyService } from '../../system/services/property.service';
|
|
3
|
+
import { EmithookEmailListOptionsInterface } from '../interfaces/emithook.email.list.options.interface';
|
|
4
|
+
import { EmithookEmailMessageInterface } from '../interfaces/emithook.email.message.interface';
|
|
5
|
+
import { EmithookEmailSendOptionsInterface } from '../interfaces/emithook.email.send.options.interface';
|
|
6
|
+
import { EmithookEmailSendResultInterface } from '../interfaces/emithook.email.send.result.interface';
|
|
7
|
+
import { EmithookSuppressionInterface } from '../interfaces/emithook.suppression.interface';
|
|
8
|
+
import { RemoteRequestService } from './remote.request.service';
|
|
9
|
+
export declare class EmithookMailService extends CommonService {
|
|
10
|
+
protected readonly propertyService: PropertyService;
|
|
11
|
+
protected readonly remoteRequestService: RemoteRequestService;
|
|
12
|
+
private apiKey;
|
|
13
|
+
private apiUrl;
|
|
14
|
+
protected publicExposed: boolean;
|
|
15
|
+
constructor(propertyService: PropertyService, remoteRequestService: RemoteRequestService);
|
|
16
|
+
send(options: EmithookEmailSendOptionsInterface, idempotencyKey?: string): Promise<EmithookEmailSendResultInterface>;
|
|
17
|
+
sendBatch(emails: EmithookEmailSendOptionsInterface[]): Promise<EmithookEmailSendResultInterface[]>;
|
|
18
|
+
get(id: string): Promise<EmithookEmailMessageInterface>;
|
|
19
|
+
list(options?: EmithookEmailListOptionsInterface): Promise<EmithookEmailMessageInterface[]>;
|
|
20
|
+
listSuppressions(): Promise<EmithookSuppressionInterface[]>;
|
|
21
|
+
createSuppression(address: string): Promise<EmithookSuppressionInterface>;
|
|
22
|
+
deleteSuppression(id: string): Promise<void>;
|
|
23
|
+
private buildRequestOptions;
|
|
24
|
+
private getApiKey;
|
|
25
|
+
private getApiUrl;
|
|
26
|
+
private extractError;
|
|
27
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.EmithookMailService = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const operation_exception_1 = require("../../common/exceptions/operation.exception");
|
|
15
|
+
const common_service_1 = require("../../common/libraries/common.service");
|
|
16
|
+
const property_service_1 = require("../../system/services/property.service");
|
|
17
|
+
const remote_request_service_1 = require("./remote.request.service");
|
|
18
|
+
const DEFAULT_EMITHOOK_API_URL = 'https://api.emithook.com';
|
|
19
|
+
let EmithookMailService = class EmithookMailService extends common_service_1.CommonService {
|
|
20
|
+
constructor(propertyService, remoteRequestService) {
|
|
21
|
+
super();
|
|
22
|
+
this.propertyService = propertyService;
|
|
23
|
+
this.remoteRequestService = remoteRequestService;
|
|
24
|
+
this.publicExposed = true;
|
|
25
|
+
}
|
|
26
|
+
async send(options, idempotencyKey) {
|
|
27
|
+
const response = await this.remoteRequestService.getRawResponse(await this.buildRequestOptions('post', '/v1/emails', options, idempotencyKey));
|
|
28
|
+
if (!response.success || !response.data?.id) {
|
|
29
|
+
throw new operation_exception_1.OperationException(this.extractError(response));
|
|
30
|
+
}
|
|
31
|
+
return { id: response.data.id };
|
|
32
|
+
}
|
|
33
|
+
async sendBatch(emails) {
|
|
34
|
+
const response = await this.remoteRequestService.getRawResponse(await this.buildRequestOptions('post', '/v1/emails/batch', { emails }));
|
|
35
|
+
if (!response.success || !Array.isArray(response.data?.data)) {
|
|
36
|
+
throw new operation_exception_1.OperationException(this.extractError(response));
|
|
37
|
+
}
|
|
38
|
+
return response.data.data;
|
|
39
|
+
}
|
|
40
|
+
async get(id) {
|
|
41
|
+
const response = await this.remoteRequestService.getRawResponse(await this.buildRequestOptions('get', `/v1/emails/${id}`));
|
|
42
|
+
if (!response.success || !response.data?.id) {
|
|
43
|
+
throw new operation_exception_1.OperationException(this.extractError(response));
|
|
44
|
+
}
|
|
45
|
+
return response.data;
|
|
46
|
+
}
|
|
47
|
+
async list(options = {}) {
|
|
48
|
+
const params = new URLSearchParams();
|
|
49
|
+
if (options.status)
|
|
50
|
+
params.set('status', options.status);
|
|
51
|
+
if (options.since)
|
|
52
|
+
params.set('since', options.since);
|
|
53
|
+
if (options.until)
|
|
54
|
+
params.set('until', options.until);
|
|
55
|
+
if (options.cursor)
|
|
56
|
+
params.set('cursor', options.cursor);
|
|
57
|
+
if (options.limit)
|
|
58
|
+
params.set('limit', String(options.limit));
|
|
59
|
+
const query = params.toString();
|
|
60
|
+
const path = query ? `/v1/emails?${query}` : '/v1/emails';
|
|
61
|
+
const response = await this.remoteRequestService.getRawResponse(await this.buildRequestOptions('get', path));
|
|
62
|
+
if (!response.success) {
|
|
63
|
+
throw new operation_exception_1.OperationException(this.extractError(response));
|
|
64
|
+
}
|
|
65
|
+
return response.data?.data || [];
|
|
66
|
+
}
|
|
67
|
+
async listSuppressions() {
|
|
68
|
+
const response = await this.remoteRequestService.getRawResponse(await this.buildRequestOptions('get', '/v1/suppressions'));
|
|
69
|
+
if (!response.success) {
|
|
70
|
+
throw new operation_exception_1.OperationException(this.extractError(response));
|
|
71
|
+
}
|
|
72
|
+
return response.data?.data || [];
|
|
73
|
+
}
|
|
74
|
+
async createSuppression(address) {
|
|
75
|
+
const response = await this.remoteRequestService.getRawResponse(await this.buildRequestOptions('post', '/v1/suppressions', { address }));
|
|
76
|
+
if (!response.success || !response.data?.id) {
|
|
77
|
+
throw new operation_exception_1.OperationException(this.extractError(response));
|
|
78
|
+
}
|
|
79
|
+
return response.data;
|
|
80
|
+
}
|
|
81
|
+
async deleteSuppression(id) {
|
|
82
|
+
const response = await this.remoteRequestService.getRawResponse(await this.buildRequestOptions('delete', `/v1/suppressions/${id}`));
|
|
83
|
+
if (!response.success) {
|
|
84
|
+
throw new operation_exception_1.OperationException(this.extractError(response));
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
async buildRequestOptions(method, path, data, idempotencyKey) {
|
|
88
|
+
const apiKey = await this.getApiKey();
|
|
89
|
+
const baseUrl = await this.getApiUrl();
|
|
90
|
+
const headers = {
|
|
91
|
+
Authorization: `Bearer ${apiKey}`,
|
|
92
|
+
'Content-Type': 'application/json',
|
|
93
|
+
};
|
|
94
|
+
if (idempotencyKey)
|
|
95
|
+
headers['Idempotency-Key'] = idempotencyKey;
|
|
96
|
+
const options = {
|
|
97
|
+
method,
|
|
98
|
+
url: `${baseUrl}${path}`,
|
|
99
|
+
headers,
|
|
100
|
+
timeout: 120000,
|
|
101
|
+
};
|
|
102
|
+
if (data !== undefined)
|
|
103
|
+
options.data = data;
|
|
104
|
+
return options;
|
|
105
|
+
}
|
|
106
|
+
async getApiKey() {
|
|
107
|
+
if (this.apiKey)
|
|
108
|
+
return this.apiKey;
|
|
109
|
+
this.apiKey = await this.propertyService.get('emithook.api.key');
|
|
110
|
+
if (!this.apiKey)
|
|
111
|
+
throw new operation_exception_1.OperationException('Emithook API key not found, set property emithook.api.key');
|
|
112
|
+
return this.apiKey;
|
|
113
|
+
}
|
|
114
|
+
async getApiUrl() {
|
|
115
|
+
if (this.apiUrl)
|
|
116
|
+
return this.apiUrl;
|
|
117
|
+
this.apiUrl = (await this.propertyService.get('emithook.api.url', DEFAULT_EMITHOOK_API_URL)) || DEFAULT_EMITHOOK_API_URL;
|
|
118
|
+
return this.apiUrl;
|
|
119
|
+
}
|
|
120
|
+
extractError(response) {
|
|
121
|
+
const data = response?.data;
|
|
122
|
+
if (typeof data?.message === 'string')
|
|
123
|
+
return data.message;
|
|
124
|
+
if (typeof data?.error === 'string')
|
|
125
|
+
return data.error;
|
|
126
|
+
if (typeof data?.details?.message === 'string')
|
|
127
|
+
return data.details.message;
|
|
128
|
+
return `Emithook request failed (${response?.status || 'unknown'})`;
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
exports.EmithookMailService = EmithookMailService;
|
|
132
|
+
exports.EmithookMailService = EmithookMailService = __decorate([
|
|
133
|
+
(0, common_1.Injectable)(),
|
|
134
|
+
__metadata("design:paramtypes", [property_service_1.PropertyService,
|
|
135
|
+
remote_request_service_1.RemoteRequestService])
|
|
136
|
+
], EmithookMailService);
|
|
137
|
+
//# sourceMappingURL=emithook.mail.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emithook.mail.service.js","sourceRoot":"","sources":["../../../src/platformUtility/services/emithook.mail.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,qFAAiF;AACjF,0EAAsE;AACtE,6EAAyE;AAMzE,qEAAgE;AAEhE,MAAM,wBAAwB,GAAG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