@neohm/nestend 3.0.3 → 3.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +114 -71
- package/dist/admin/admin.module.d.ts.map +1 -1
- package/dist/admin/admin.module.js +9 -2
- package/dist/admin/admin.module.js.map +1 -1
- package/dist/admin/controllers/admin.scheduled.task.controller.js +1 -1
- package/dist/admin/controllers/admin.scheduled.task.controller.js.map +1 -1
- package/dist/admin/controllers/admin.tenant.controller.d.ts +5 -1
- package/dist/admin/controllers/admin.tenant.controller.d.ts.map +1 -1
- package/dist/admin/controllers/admin.tenant.controller.js +10 -4
- package/dist/admin/controllers/admin.tenant.controller.js.map +1 -1
- package/dist/admin/controllers/admin.user.controller.d.ts +5 -1
- package/dist/admin/controllers/admin.user.controller.d.ts.map +1 -1
- package/dist/admin/controllers/admin.user.controller.js +10 -4
- package/dist/admin/controllers/admin.user.controller.js.map +1 -1
- package/dist/admin/dtos/add.tenant.dto.js +2 -2
- package/dist/admin/dtos/add.tenant.dto.js.map +1 -1
- package/dist/admin/dtos/base.user.dto.js +3 -3
- package/dist/admin/dtos/base.user.dto.js.map +1 -1
- package/dist/admin/libraries/admin.user.data.processor.d.ts.map +1 -1
- package/dist/admin/libraries/admin.user.data.processor.js +2 -1
- package/dist/admin/libraries/admin.user.data.processor.js.map +1 -1
- package/dist/admin/libraries/bulk.user.data.processor.d.ts.map +1 -1
- package/dist/admin/libraries/bulk.user.data.processor.js +4 -3
- package/dist/admin/libraries/bulk.user.data.processor.js.map +1 -1
- package/dist/admin/libraries/client.user.data.processor.d.ts +9 -1
- package/dist/admin/libraries/client.user.data.processor.d.ts.map +1 -1
- package/dist/admin/libraries/client.user.data.processor.js +42 -2
- package/dist/admin/libraries/client.user.data.processor.js.map +1 -1
- package/dist/admin/libraries/tenant.data.processor.d.ts +8 -1
- package/dist/admin/libraries/tenant.data.processor.d.ts.map +1 -1
- package/dist/admin/libraries/tenant.data.processor.js +40 -2
- package/dist/admin/libraries/tenant.data.processor.js.map +1 -1
- package/dist/auth/controllers/admin.auth.controller.js +1 -1
- package/dist/auth/controllers/admin.auth.controller.js.map +1 -1
- package/dist/auth/controllers/auth.controller.js +1 -1
- package/dist/auth/controllers/auth.controller.js.map +1 -1
- package/dist/auth/dtos/register.dto.js +3 -3
- package/dist/auth/dtos/register.dto.js.map +1 -1
- package/dist/auth/entities/admin.user.entity.js +2 -2
- package/dist/auth/entities/admin.user.entity.js.map +1 -1
- package/dist/auth/entities/user.entity.js +1 -1
- package/dist/auth/entities/user.entity.js.map +1 -1
- package/dist/auth/processors/change.password.data.processor.d.ts.map +1 -1
- package/dist/auth/processors/change.password.data.processor.js.map +1 -1
- package/dist/auth/processors/register.user.data.processor.d.ts.map +1 -1
- package/dist/auth/processors/register.user.data.processor.js +2 -1
- package/dist/auth/processors/register.user.data.processor.js.map +1 -1
- package/dist/auth/services/admin.auth.service.d.ts.map +1 -1
- package/dist/auth/services/admin.auth.service.js +1 -0
- package/dist/auth/services/admin.auth.service.js.map +1 -1
- package/dist/auth/services/auth.service.d.ts.map +1 -1
- package/dist/auth/services/auth.service.js +1 -0
- package/dist/auth/services/auth.service.js.map +1 -1
- package/dist/auth/utilities/auth.utilities.d.ts +2 -0
- package/dist/auth/utilities/auth.utilities.d.ts.map +1 -1
- package/dist/auth/utilities/auth.utilities.js +7 -0
- package/dist/auth/utilities/auth.utilities.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -1
- package/dist/migrations/1749600000001.CreateSysAdminUsersTable.js +4 -4
- package/dist/migrations/1749600000001.CreateSysAdminUsersTable.js.map +1 -1
- package/dist/migrations/1749600000002.CreateSysTenantsTable.d.ts.map +1 -1
- package/dist/migrations/1749600000002.CreateSysTenantsTable.js +4 -2
- package/dist/migrations/1749600000002.CreateSysTenantsTable.js.map +1 -1
- package/dist/migrations/1749600000003.CreateSysUsersTable.js +5 -5
- package/dist/migrations/1749600000003.CreateSysUsersTable.js.map +1 -1
- package/dist/migrations/1749600000005.CreateSysUserDetailsTable.d.ts.map +1 -1
- package/dist/migrations/1749600000005.CreateSysUserDetailsTable.js +1 -0
- package/dist/migrations/1749600000005.CreateSysUserDetailsTable.js.map +1 -1
- package/dist/migrations/1749600000006.CreateSysUserRolesJoinTable.d.ts.map +1 -1
- package/dist/migrations/1749600000006.CreateSysUserRolesJoinTable.js +2 -0
- package/dist/migrations/1749600000006.CreateSysUserRolesJoinTable.js.map +1 -1
- package/dist/migrations/1749600000007.CreateSysConstantTypesTable.d.ts.map +1 -1
- package/dist/migrations/1749600000007.CreateSysConstantTypesTable.js +1 -0
- package/dist/migrations/1749600000007.CreateSysConstantTypesTable.js.map +1 -1
- package/dist/migrations/1749600000008.CreateSysConstantsTable.d.ts.map +1 -1
- package/dist/migrations/1749600000008.CreateSysConstantsTable.js +2 -0
- package/dist/migrations/1749600000008.CreateSysConstantsTable.js.map +1 -1
- package/dist/migrations/1749600000009.CreateSysFailedJobsTable.d.ts.map +1 -1
- package/dist/migrations/1749600000009.CreateSysFailedJobsTable.js +1 -0
- package/dist/migrations/1749600000009.CreateSysFailedJobsTable.js.map +1 -1
- package/dist/migrations/1749600000010.CreateSysPropertiesTable.d.ts.map +1 -1
- package/dist/migrations/1749600000010.CreateSysPropertiesTable.js +1 -0
- package/dist/migrations/1749600000010.CreateSysPropertiesTable.js.map +1 -1
- package/dist/migrations/1749600000011.CreateSysNotificationsTable.d.ts.map +1 -1
- package/dist/migrations/1749600000011.CreateSysNotificationsTable.js +1 -0
- package/dist/migrations/1749600000011.CreateSysNotificationsTable.js.map +1 -1
- package/dist/migrations/1749600000013.CreateSysDocumentDetailsTable.d.ts.map +1 -1
- package/dist/migrations/1749600000013.CreateSysDocumentDetailsTable.js +1 -0
- package/dist/migrations/1749600000013.CreateSysDocumentDetailsTable.js.map +1 -1
- package/dist/migrations/1749600000014.CreateSysRefreshTokensTable.d.ts.map +1 -1
- package/dist/migrations/1749600000014.CreateSysRefreshTokensTable.js +1 -0
- package/dist/migrations/1749600000014.CreateSysRefreshTokensTable.js.map +1 -1
- package/dist/migrations/1749600000016.CreateSysUserDeviceTokensTable.d.ts.map +1 -1
- package/dist/migrations/1749600000016.CreateSysUserDeviceTokensTable.js +1 -0
- package/dist/migrations/1749600000016.CreateSysUserDeviceTokensTable.js.map +1 -1
- package/dist/migrations/1749600000017.CreateSysApiKeysTable.d.ts.map +1 -1
- package/dist/migrations/1749600000017.CreateSysApiKeysTable.js +1 -0
- package/dist/migrations/1749600000017.CreateSysApiKeysTable.js.map +1 -1
- package/dist/migrations/1749600000018.CreateSysScheduledTasksTable.d.ts.map +1 -1
- package/dist/migrations/1749600000018.CreateSysScheduledTasksTable.js +2 -0
- package/dist/migrations/1749600000018.CreateSysScheduledTasksTable.js.map +1 -1
- package/dist/migrations/1749600000020.CreateSysEmailTemplatesTable.d.ts.map +1 -1
- package/dist/migrations/1749600000020.CreateSysEmailTemplatesTable.js +1 -0
- package/dist/migrations/1749600000020.CreateSysEmailTemplatesTable.js.map +1 -1
- package/dist/migrations/1749600000021.CreateSysEmailNotificationLogsTable.d.ts.map +1 -1
- package/dist/migrations/1749600000021.CreateSysEmailNotificationLogsTable.js +3 -2
- package/dist/migrations/1749600000021.CreateSysEmailNotificationLogsTable.js.map +1 -1
- package/dist/migrations/1749600000023.CreateSysAdminUserRolesJoinTable.d.ts.map +1 -1
- package/dist/migrations/1749600000023.CreateSysAdminUserRolesJoinTable.js +2 -0
- package/dist/migrations/1749600000023.CreateSysAdminUserRolesJoinTable.js.map +1 -1
- package/dist/migrations/1749600000025.CreateSysScopesTable.d.ts.map +1 -1
- package/dist/migrations/1749600000025.CreateSysScopesTable.js +1 -0
- package/dist/migrations/1749600000025.CreateSysScopesTable.js.map +1 -1
- package/dist/migrations/1749600000026.CreateSysApiScopesTable.d.ts.map +1 -1
- package/dist/migrations/1749600000026.CreateSysApiScopesTable.js +3 -0
- package/dist/migrations/1749600000026.CreateSysApiScopesTable.js.map +1 -1
- package/dist/notification/dtos/email.notification.options.dto.d.ts +3 -3
- package/dist/notification/dtos/email.notification.options.dto.js +3 -3
- package/dist/notification/entities/email.notification.log.entity.d.ts +1 -1
- package/dist/notification/entities/email.notification.log.entity.js +1 -1
- package/dist/notification/enums/email.notification.default.enum.d.ts +5 -1
- package/dist/notification/enums/email.notification.default.enum.d.ts.map +1 -1
- package/dist/notification/enums/email.notification.default.enum.js +4 -0
- package/dist/notification/enums/email.notification.default.enum.js.map +1 -1
- package/dist/notification/enums/email.template.identifier.enum.d.ts +5 -0
- package/dist/notification/enums/email.template.identifier.enum.d.ts.map +1 -0
- package/dist/notification/enums/email.template.identifier.enum.js +9 -0
- package/dist/notification/enums/email.template.identifier.enum.js.map +1 -0
- package/dist/notification/es6.classes.d.ts.map +1 -1
- package/dist/notification/es6.classes.js +10 -2
- package/dist/notification/es6.classes.js.map +1 -1
- package/dist/notification/libraries/process.email.notification.js +6 -6
- package/dist/notification/services/email.notification.service.js +9 -9
- package/dist/notification/types/email.notification.types.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1749600000020.CreateSysEmailTemplatesTable.d.ts","sourceRoot":"","sources":["../../src/migrations/1749600000020.CreateSysEmailTemplatesTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAEzE,qBAAa,yCAA0C,SAAQ,gBAAgB;;IAM7E,OAAO;
|
|
1
|
+
{"version":3,"file":"1749600000020.CreateSysEmailTemplatesTable.d.ts","sourceRoot":"","sources":["../../src/migrations/1749600000020.CreateSysEmailTemplatesTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAEzE,qBAAa,yCAA0C,SAAQ,gBAAgB;;IAM7E,OAAO;CAeR"}
|
|
@@ -16,6 +16,7 @@ class CreateSysEmailTemplatesTable1749600000020 extends migration_utility_1.Migr
|
|
|
16
16
|
this.json('attributes');
|
|
17
17
|
this.whoColumns();
|
|
18
18
|
this.unique('identifier');
|
|
19
|
+
this.index('created_by');
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
22
|
exports.CreateSysEmailTemplatesTable1749600000020 = CreateSysEmailTemplatesTable1749600000020;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1749600000020.CreateSysEmailTemplatesTable.js","sourceRoot":"","sources":["../../src/migrations/1749600000020.CreateSysEmailTemplatesTable.ts"],"names":[],"mappings":";;;AAAA,6EAAyE;AAEzE,MAAa,yCAA0C,SAAQ,oCAAgB;IAC7E;QACE,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAC7B,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED,OAAO;QACL,IAAI,CAAC,WAAW,EAAE,CAAC;QAEnB,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;QAC3C,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;QAC5C,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;QACrC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;QAExC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAExB,IAAI,CAAC,UAAU,EAAE,CAAC;QAElB,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"1749600000020.CreateSysEmailTemplatesTable.js","sourceRoot":"","sources":["../../src/migrations/1749600000020.CreateSysEmailTemplatesTable.ts"],"names":[],"mappings":";;;AAAA,6EAAyE;AAEzE,MAAa,yCAA0C,SAAQ,oCAAgB;IAC7E;QACE,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAC7B,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED,OAAO;QACL,IAAI,CAAC,WAAW,EAAE,CAAC;QAEnB,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;QAC3C,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;QAC5C,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;QACrC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;QAExC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAExB,IAAI,CAAC,UAAU,EAAE,CAAC;QAElB,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QAC1B,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAC3B,CAAC;CACF;AArBD,8FAqBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1749600000021.CreateSysEmailNotificationLogsTable.d.ts","sourceRoot":"","sources":["../../src/migrations/1749600000021.CreateSysEmailNotificationLogsTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAEzE,qBAAa,gDAAiD,SAAQ,gBAAgB;;IAMpF,OAAO;
|
|
1
|
+
{"version":3,"file":"1749600000021.CreateSysEmailNotificationLogsTable.d.ts","sourceRoot":"","sources":["../../src/migrations/1749600000021.CreateSysEmailNotificationLogsTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAEzE,qBAAa,gDAAiD,SAAQ,gBAAgB;;IAMpF,OAAO;CAeR"}
|
|
@@ -10,12 +10,13 @@ class CreateSysEmailNotificationLogsTable1749600000021 extends migration_utility
|
|
|
10
10
|
process() {
|
|
11
11
|
this.rootPrimary();
|
|
12
12
|
this.string('template_identifier', { length: 255 });
|
|
13
|
-
this.string('
|
|
13
|
+
this.string('recipient', { length: 255 });
|
|
14
14
|
this.text('email_body');
|
|
15
15
|
this.json('attributes');
|
|
16
16
|
this.whoColumns();
|
|
17
17
|
this.index('template_identifier');
|
|
18
|
-
this.index('
|
|
18
|
+
this.index('recipient');
|
|
19
|
+
this.index('created_by');
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
22
|
exports.CreateSysEmailNotificationLogsTable1749600000021 = CreateSysEmailNotificationLogsTable1749600000021;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1749600000021.CreateSysEmailNotificationLogsTable.js","sourceRoot":"","sources":["../../src/migrations/1749600000021.CreateSysEmailNotificationLogsTable.ts"],"names":[],"mappings":";;;AAAA,6EAAyE;AAEzE,MAAa,gDAAiD,SAAQ,oCAAgB;IACpF;QACE,KAAK,CAAC,6BAA6B,CAAC,CAAC;QACrC,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED,OAAO;QACL,IAAI,CAAC,WAAW,EAAE,CAAC;QAEnB,IAAI,CAAC,MAAM,CAAC,qBAAqB,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;QACpD,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;QAC1C,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAExB,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAExB,IAAI,CAAC,UAAU,EAAE,CAAC;QAElB,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAClC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"1749600000021.CreateSysEmailNotificationLogsTable.js","sourceRoot":"","sources":["../../src/migrations/1749600000021.CreateSysEmailNotificationLogsTable.ts"],"names":[],"mappings":";;;AAAA,6EAAyE;AAEzE,MAAa,gDAAiD,SAAQ,oCAAgB;IACpF;QACE,KAAK,CAAC,6BAA6B,CAAC,CAAC;QACrC,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED,OAAO;QACL,IAAI,CAAC,WAAW,EAAE,CAAC;QAEnB,IAAI,CAAC,MAAM,CAAC,qBAAqB,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;QACpD,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;QAC1C,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAExB,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAExB,IAAI,CAAC,UAAU,EAAE,CAAC;QAElB,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAClC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QACxB,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAC3B,CAAC;CACF;AArBD,4GAqBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1749600000023.CreateSysAdminUserRolesJoinTable.d.ts","sourceRoot":"","sources":["../../src/migrations/1749600000023.CreateSysAdminUserRolesJoinTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAEzE,qBAAa,6CAA8C,SAAQ,gBAAgB;;IAMjF,OAAO;
|
|
1
|
+
{"version":3,"file":"1749600000023.CreateSysAdminUserRolesJoinTable.d.ts","sourceRoot":"","sources":["../../src/migrations/1749600000023.CreateSysAdminUserRolesJoinTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAEzE,qBAAa,6CAA8C,SAAQ,gBAAgB;;IAMjF,OAAO;CAwBR"}
|
|
@@ -28,6 +28,8 @@ class CreateSysAdminUserRolesJoinTable1749600000023 extends migration_utility_1.
|
|
|
28
28
|
nullable: true,
|
|
29
29
|
});
|
|
30
30
|
this.unique(['admin_user_id', 'role_id']);
|
|
31
|
+
this.index('role_id');
|
|
32
|
+
this.index('created_by');
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
35
|
exports.CreateSysAdminUserRolesJoinTable1749600000023 = CreateSysAdminUserRolesJoinTable1749600000023;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1749600000023.CreateSysAdminUserRolesJoinTable.js","sourceRoot":"","sources":["../../src/migrations/1749600000023.CreateSysAdminUserRolesJoinTable.ts"],"names":[],"mappings":";;;AAAA,6EAAyE;AAEzE,MAAa,6CAA8C,SAAQ,oCAAgB;IACjF;QACE,KAAK,CAAC,iBAAiB,CAAC,CAAC;QACzB,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED,OAAO;QACL,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,IAAI,CAAC,OAAO,CAAC;YACX,IAAI,EAAE,eAAe;YACrB,YAAY,EAAE,iBAAiB;YAC/B,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE,KAAK;SAChB,CAAC,CAAC;QACH,IAAI,CAAC,OAAO,CAAC;YACX,IAAI,EAAE,SAAS;YACf,YAAY,EAAE,iBAAiB;YAC/B,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE,KAAK;SAChB,CAAC,CAAC;QACH,IAAI,CAAC,UAAU,EAAE,CAAC;QAClB,IAAI,CAAC,OAAO,CAAC;YACX,IAAI,EAAE,YAAY;YAClB,YAAY,EAAE,iBAAiB;YAC/B,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;QACH,IAAI,CAAC,MAAM,CAAC,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"1749600000023.CreateSysAdminUserRolesJoinTable.js","sourceRoot":"","sources":["../../src/migrations/1749600000023.CreateSysAdminUserRolesJoinTable.ts"],"names":[],"mappings":";;;AAAA,6EAAyE;AAEzE,MAAa,6CAA8C,SAAQ,oCAAgB;IACjF;QACE,KAAK,CAAC,iBAAiB,CAAC,CAAC;QACzB,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED,OAAO;QACL,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,IAAI,CAAC,OAAO,CAAC;YACX,IAAI,EAAE,eAAe;YACrB,YAAY,EAAE,iBAAiB;YAC/B,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE,KAAK;SAChB,CAAC,CAAC;QACH,IAAI,CAAC,OAAO,CAAC;YACX,IAAI,EAAE,SAAS;YACf,YAAY,EAAE,iBAAiB;YAC/B,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE,KAAK;SAChB,CAAC,CAAC;QACH,IAAI,CAAC,UAAU,EAAE,CAAC;QAClB,IAAI,CAAC,OAAO,CAAC;YACX,IAAI,EAAE,YAAY;YAClB,YAAY,EAAE,iBAAiB;YAC/B,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;QACH,IAAI,CAAC,MAAM,CAAC,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC,CAAC;QAC1C,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACtB,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAC3B,CAAC;CACF;AA9BD,sGA8BC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1749600000025.CreateSysScopesTable.d.ts","sourceRoot":"","sources":["../../src/migrations/1749600000025.CreateSysScopesTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAEzE,qBAAa,iCAAkC,SAAQ,gBAAgB;;IAMrE,OAAO;
|
|
1
|
+
{"version":3,"file":"1749600000025.CreateSysScopesTable.d.ts","sourceRoot":"","sources":["../../src/migrations/1749600000025.CreateSysScopesTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAEzE,qBAAa,iCAAkC,SAAQ,gBAAgB;;IAMrE,OAAO;CAeR"}
|
|
@@ -19,6 +19,7 @@ class CreateSysScopesTable1749600000025 extends migration_utility_1.MigrationUti
|
|
|
19
19
|
nullable: true,
|
|
20
20
|
});
|
|
21
21
|
this.index('identifier', { unique: true });
|
|
22
|
+
this.index('created_by');
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
25
|
exports.CreateSysScopesTable1749600000025 = CreateSysScopesTable1749600000025;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1749600000025.CreateSysScopesTable.js","sourceRoot":"","sources":["../../src/migrations/1749600000025.CreateSysScopesTable.ts"],"names":[],"mappings":";;;AAAA,6EAAyE;AAEzE,MAAa,iCAAkC,SAAQ,oCAAgB;IACrE;QACE,KAAK,CAAC,YAAY,CAAC,CAAC;QACpB,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED,OAAO;QACL,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;QACzD,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;QACrC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACzB,IAAI,CAAC,UAAU,EAAE,CAAC;QAClB,IAAI,CAAC,OAAO,CAAC;YACX,IAAI,EAAE,YAAY;YAClB,YAAY,EAAE,iBAAiB;YAC/B,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;QAEH,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"1749600000025.CreateSysScopesTable.js","sourceRoot":"","sources":["../../src/migrations/1749600000025.CreateSysScopesTable.ts"],"names":[],"mappings":";;;AAAA,6EAAyE;AAEzE,MAAa,iCAAkC,SAAQ,oCAAgB;IACrE;QACE,KAAK,CAAC,YAAY,CAAC,CAAC;QACpB,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED,OAAO;QACL,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;QACzD,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;QACrC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACzB,IAAI,CAAC,UAAU,EAAE,CAAC;QAClB,IAAI,CAAC,OAAO,CAAC;YACX,IAAI,EAAE,YAAY;YAClB,YAAY,EAAE,iBAAiB;YAC/B,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;QAEH,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;QAC3C,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAC3B,CAAC;CACF;AArBD,8EAqBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1749600000026.CreateSysApiScopesTable.d.ts","sourceRoot":"","sources":["../../src/migrations/1749600000026.CreateSysApiScopesTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAEzE,qBAAa,oCAAqC,SAAQ,gBAAgB;;IAMxE,OAAO;
|
|
1
|
+
{"version":3,"file":"1749600000026.CreateSysApiScopesTable.d.ts","sourceRoot":"","sources":["../../src/migrations/1749600000026.CreateSysApiScopesTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAEzE,qBAAa,oCAAqC,SAAQ,gBAAgB;;IAMxE,OAAO;CA+BR"}
|
|
@@ -33,6 +33,9 @@ class CreateSysApiScopesTable1749600000026 extends migration_utility_1.Migration
|
|
|
33
33
|
nullable: true,
|
|
34
34
|
});
|
|
35
35
|
this.unique(['api_key_id', 'scope_id']);
|
|
36
|
+
this.index('scope_id');
|
|
37
|
+
this.index('revoked_by');
|
|
38
|
+
this.index('created_by');
|
|
36
39
|
}
|
|
37
40
|
}
|
|
38
41
|
exports.CreateSysApiScopesTable1749600000026 = CreateSysApiScopesTable1749600000026;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1749600000026.CreateSysApiScopesTable.js","sourceRoot":"","sources":["../../src/migrations/1749600000026.CreateSysApiScopesTable.ts"],"names":[],"mappings":";;;AAAA,6EAAyE;AAEzE,MAAa,oCAAqC,SAAQ,oCAAgB;IACxE;QACE,KAAK,CAAC,gBAAgB,CAAC,CAAC;QACxB,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED,OAAO;QACL,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,IAAI,CAAC,OAAO,CAAC;YACX,IAAI,EAAE,YAAY;YAClB,YAAY,EAAE,cAAc;YAC5B,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE,KAAK;SAChB,CAAC,CAAC;QACH,IAAI,CAAC,OAAO,CAAC;YACX,IAAI,EAAE,UAAU;YAChB,YAAY,EAAE,YAAY;YAC1B,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE,KAAK;SAChB,CAAC,CAAC;QACH,IAAI,CAAC,OAAO,CAAC;YACX,IAAI,EAAE,YAAY;YAClB,YAAY,EAAE,iBAAiB;YAC/B,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;QACH,IAAI,CAAC,UAAU,EAAE,CAAC;QAClB,IAAI,CAAC,OAAO,CAAC;YACX,IAAI,EAAE,YAAY;YAClB,YAAY,EAAE,iBAAiB;YAC/B,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"1749600000026.CreateSysApiScopesTable.js","sourceRoot":"","sources":["../../src/migrations/1749600000026.CreateSysApiScopesTable.ts"],"names":[],"mappings":";;;AAAA,6EAAyE;AAEzE,MAAa,oCAAqC,SAAQ,oCAAgB;IACxE;QACE,KAAK,CAAC,gBAAgB,CAAC,CAAC;QACxB,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED,OAAO;QACL,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,IAAI,CAAC,OAAO,CAAC;YACX,IAAI,EAAE,YAAY;YAClB,YAAY,EAAE,cAAc;YAC5B,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE,KAAK;SAChB,CAAC,CAAC;QACH,IAAI,CAAC,OAAO,CAAC;YACX,IAAI,EAAE,UAAU;YAChB,YAAY,EAAE,YAAY;YAC1B,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE,KAAK;SAChB,CAAC,CAAC;QACH,IAAI,CAAC,OAAO,CAAC;YACX,IAAI,EAAE,YAAY;YAClB,YAAY,EAAE,iBAAiB;YAC/B,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;QACH,IAAI,CAAC,UAAU,EAAE,CAAC;QAClB,IAAI,CAAC,OAAO,CAAC;YACX,IAAI,EAAE,YAAY;YAClB,YAAY,EAAE,iBAAiB;YAC/B,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC;QACxC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QACvB,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QACzB,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAC3B,CAAC;CACF;AArCD,oFAqCC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export declare class
|
|
2
|
-
|
|
1
|
+
export declare class EmailRecipientDto {
|
|
2
|
+
recipient: string;
|
|
3
3
|
cc?: string[];
|
|
4
4
|
bcc?: string[];
|
|
5
5
|
}
|
|
6
6
|
export declare class EmailNotificationOptionsDto {
|
|
7
7
|
identifier: string;
|
|
8
8
|
data: Record<string, unknown>;
|
|
9
|
-
|
|
9
|
+
emailRecipients: EmailRecipientDto[];
|
|
10
10
|
}
|
|
11
11
|
//# sourceMappingURL=email.notification.options.dto.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EmailNotificationOptionsDto = exports.
|
|
4
|
-
class
|
|
3
|
+
exports.EmailNotificationOptionsDto = exports.EmailRecipientDto = void 0;
|
|
4
|
+
class EmailRecipientDto {
|
|
5
5
|
}
|
|
6
|
-
exports.
|
|
6
|
+
exports.EmailRecipientDto = EmailRecipientDto;
|
|
7
7
|
class EmailNotificationOptionsDto {
|
|
8
8
|
}
|
|
9
9
|
exports.EmailNotificationOptionsDto = EmailNotificationOptionsDto;
|
|
@@ -2,7 +2,7 @@ import { CommonEntity } from '../../common/entities/common.entity';
|
|
|
2
2
|
import { EmailNotificationLogAttributesDto } from '../dtos/email.notification.log.attributes.dto';
|
|
3
3
|
export declare class EmailNotificationLogEntity extends CommonEntity {
|
|
4
4
|
template_identifier: string;
|
|
5
|
-
|
|
5
|
+
recipient: string;
|
|
6
6
|
email_body: string;
|
|
7
7
|
attributes: EmailNotificationLogAttributesDto;
|
|
8
8
|
}
|
|
@@ -23,7 +23,7 @@ __decorate([
|
|
|
23
23
|
__decorate([
|
|
24
24
|
(0, typeorm_1.Column)(),
|
|
25
25
|
__metadata("design:type", String)
|
|
26
|
-
], EmailNotificationLogEntity.prototype, "
|
|
26
|
+
], EmailNotificationLogEntity.prototype, "recipient", void 0);
|
|
27
27
|
__decorate([
|
|
28
28
|
(0, typeorm_1.Column)({ type: 'text' }),
|
|
29
29
|
__metadata("design:type", String)
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export declare enum EmailNotificationDefault {
|
|
2
2
|
TEMPLATE_BASE_URL_PROPERTY = "email.template.base.url",
|
|
3
|
-
CHARSET = "UTF-8"
|
|
3
|
+
CHARSET = "UTF-8",
|
|
4
|
+
SUPPORT_EMAIL_PROPERTY = "support_email",
|
|
5
|
+
SUPPORT_LINK_PROPERTY = "support_link",
|
|
6
|
+
SUPPORT_EMAIL_FALLBACK = "example@support.com",
|
|
7
|
+
SUPPORT_LINK_FALLBACK = "https://www.example-support.com/"
|
|
4
8
|
}
|
|
5
9
|
//# sourceMappingURL=email.notification.default.enum.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.notification.default.enum.d.ts","sourceRoot":"","sources":["../../../src/notification/enums/email.notification.default.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,wBAAwB;IAElC,0BAA0B,4BAA4B;IACtD,OAAO,UAAU;
|
|
1
|
+
{"version":3,"file":"email.notification.default.enum.d.ts","sourceRoot":"","sources":["../../../src/notification/enums/email.notification.default.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,wBAAwB;IAElC,0BAA0B,4BAA4B;IACtD,OAAO,UAAU;IAEjB,sBAAsB,kBAAkB;IACxC,qBAAqB,iBAAiB;IAEtC,sBAAsB,wBAAwB;IAC9C,qBAAqB,qCAAqC;CAC3D"}
|
|
@@ -5,5 +5,9 @@ var EmailNotificationDefault;
|
|
|
5
5
|
(function (EmailNotificationDefault) {
|
|
6
6
|
EmailNotificationDefault["TEMPLATE_BASE_URL_PROPERTY"] = "email.template.base.url";
|
|
7
7
|
EmailNotificationDefault["CHARSET"] = "UTF-8";
|
|
8
|
+
EmailNotificationDefault["SUPPORT_EMAIL_PROPERTY"] = "support_email";
|
|
9
|
+
EmailNotificationDefault["SUPPORT_LINK_PROPERTY"] = "support_link";
|
|
10
|
+
EmailNotificationDefault["SUPPORT_EMAIL_FALLBACK"] = "example@support.com";
|
|
11
|
+
EmailNotificationDefault["SUPPORT_LINK_FALLBACK"] = "https://www.example-support.com/";
|
|
8
12
|
})(EmailNotificationDefault || (exports.EmailNotificationDefault = EmailNotificationDefault = {}));
|
|
9
13
|
//# sourceMappingURL=email.notification.default.enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.notification.default.enum.js","sourceRoot":"","sources":["../../../src/notification/enums/email.notification.default.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"email.notification.default.enum.js","sourceRoot":"","sources":["../../../src/notification/enums/email.notification.default.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,wBAUX;AAVD,WAAY,wBAAwB;IAElC,kFAAsD,CAAA;IACtD,6CAAiB,CAAA;IAEjB,oEAAwC,CAAA;IACxC,kEAAsC,CAAA;IAEtC,0EAA8C,CAAA;IAC9C,sFAA0D,CAAA;AAC5D,CAAC,EAVW,wBAAwB,wCAAxB,wBAAwB,QAUnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email.template.identifier.enum.d.ts","sourceRoot":"","sources":["../../../src/notification/enums/email.template.identifier.enum.ts"],"names":[],"mappings":"AAMA,oBAAY,uBAAuB;IACjC,gBAAgB,qBAAqB;IACrC,qBAAqB,0BAA0B;CAChD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmailTemplateIdentifier = void 0;
|
|
4
|
+
var EmailTemplateIdentifier;
|
|
5
|
+
(function (EmailTemplateIdentifier) {
|
|
6
|
+
EmailTemplateIdentifier["TENANT_ONBOARDED"] = "tenant-onboarded";
|
|
7
|
+
EmailTemplateIdentifier["TENANT_USER_ONBOARDED"] = "tenant-user-onboarded";
|
|
8
|
+
})(EmailTemplateIdentifier || (exports.EmailTemplateIdentifier = EmailTemplateIdentifier = {}));
|
|
9
|
+
//# sourceMappingURL=email.template.identifier.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email.template.identifier.enum.js","sourceRoot":"","sources":["../../../src/notification/enums/email.template.identifier.enum.ts"],"names":[],"mappings":";;;AAMA,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,gEAAqC,CAAA;IACrC,0EAA+C,CAAA;AACjD,CAAC,EAHW,uBAAuB,uCAAvB,uBAAuB,QAGlC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"es6.classes.d.ts","sourceRoot":"","sources":["../../src/notification/es6.classes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAGlF,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,eAAO,MAAM,UAAU;;;;;;;
|
|
1
|
+
{"version":3,"file":"es6.classes.d.ts","sourceRoot":"","sources":["../../src/notification/es6.classes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAGlF,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,eAAO,MAAM,UAAU;;;;;;;CAetB,CAAC"}
|
|
@@ -10,9 +10,17 @@ const email_notification_options_dto_1 = require("./dtos/email.notification.opti
|
|
|
10
10
|
const email_template_attributes_dto_1 = require("./dtos/email.template.attributes.dto");
|
|
11
11
|
exports.es6Classes = {
|
|
12
12
|
controllers: [],
|
|
13
|
-
services: [
|
|
13
|
+
services: [
|
|
14
|
+
email_notification_service_1.EmailNotificationService,
|
|
15
|
+
fcm_push_notification_service_1.FcmPushNotificationService,
|
|
16
|
+
notification_service_1.NotificationService,
|
|
17
|
+
],
|
|
14
18
|
libraries: [process_email_notification_1.ProcessEmailNotification],
|
|
15
|
-
dtos: [
|
|
19
|
+
dtos: [
|
|
20
|
+
email_notification_log_attributes_dto_1.EmailNotificationLogAttributesDto,
|
|
21
|
+
email_notification_options_dto_1.EmailRecipientDto,
|
|
22
|
+
email_template_attributes_dto_1.EmailTemplateAttributesDto,
|
|
23
|
+
],
|
|
16
24
|
jobs: [],
|
|
17
25
|
subscribers: [],
|
|
18
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"es6.classes.js","sourceRoot":"","sources":["../../src/notification/es6.classes.ts"],"names":[],"mappings":";;;AAAA,sFAAiF;AACjF,4FAAsF;AACtF,0EAAsE;AACtE,uFAAkF;AAClF,wGAAiG;AACjG,0FAA0E;AAC1E,wFAAkF;AAErE,QAAA,UAAU,GAAG;IACxB,WAAW,EAAE,EAAE;IACf,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"es6.classes.js","sourceRoot":"","sources":["../../src/notification/es6.classes.ts"],"names":[],"mappings":";;;AAAA,sFAAiF;AACjF,4FAAsF;AACtF,0EAAsE;AACtE,uFAAkF;AAClF,wGAAiG;AACjG,0FAA0E;AAC1E,wFAAkF;AAErE,QAAA,UAAU,GAAG;IACxB,WAAW,EAAE,EAAE;IACf,QAAQ,EAAE;QACR,qDAAwB;QACxB,0DAA0B;QAC1B,0CAAmB;KACX;IACV,SAAS,EAAE,CAAC,qDAAwB,CAAC;IACrC,IAAI,EAAE;QACJ,yEAAiC;QACjC,kDAAiB;QACjB,0DAA0B;KAC3B;IACD,IAAI,EAAE,EAAE;IACR,WAAW,EAAE,EAAE;CAChB,CAAC"}
|
|
@@ -14,18 +14,18 @@ class ProcessEmailNotification {
|
|
|
14
14
|
validate() {
|
|
15
15
|
if (!this.payload.identifier)
|
|
16
16
|
throw new operation_exception_1.OperationException('Email template identifier is required');
|
|
17
|
-
if (!this.payload.
|
|
18
|
-
throw new operation_exception_1.OperationException('At least one email
|
|
19
|
-
for (const
|
|
20
|
-
if (!
|
|
21
|
-
throw new operation_exception_1.OperationException('Every email
|
|
17
|
+
if (!this.payload.emailRecipients?.length)
|
|
18
|
+
throw new operation_exception_1.OperationException('At least one email recipient is required');
|
|
19
|
+
for (const emailRecipient of this.payload.emailRecipients) {
|
|
20
|
+
if (!emailRecipient.recipient)
|
|
21
|
+
throw new operation_exception_1.OperationException('Every email recipient must have a recipient address');
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
async send() {
|
|
25
25
|
const renderedTemplate = await this.emailNotificationService.getEmailBody(this.payload);
|
|
26
26
|
await this.emailNotificationService.sendMail({
|
|
27
27
|
...renderedTemplate,
|
|
28
|
-
|
|
28
|
+
emailRecipients: this.payload.emailRecipients,
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -54,13 +54,13 @@ let EmailNotificationService = EmailNotificationService_1 = class EmailNotificat
|
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
56
|
const sesClient = this.getSesClient();
|
|
57
|
-
for (const
|
|
57
|
+
for (const emailRecipient of options.emailRecipients) {
|
|
58
58
|
await sesClient.send(new client_ses_1.SendEmailCommand({
|
|
59
59
|
Source: fromAddress,
|
|
60
60
|
Destination: {
|
|
61
|
-
ToAddresses: [
|
|
62
|
-
CcAddresses:
|
|
63
|
-
BccAddresses:
|
|
61
|
+
ToAddresses: [emailRecipient.recipient],
|
|
62
|
+
CcAddresses: emailRecipient.cc ?? [],
|
|
63
|
+
BccAddresses: emailRecipient.bcc ?? [],
|
|
64
64
|
},
|
|
65
65
|
Message: {
|
|
66
66
|
Subject: {
|
|
@@ -78,14 +78,14 @@ let EmailNotificationService = EmailNotificationService_1 = class EmailNotificat
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
async logEmailNotification(options) {
|
|
81
|
-
const {
|
|
82
|
-
for (const
|
|
81
|
+
const { emailRecipients, template_identifier, email_body } = options;
|
|
82
|
+
for (const emailRecipient of emailRecipients) {
|
|
83
83
|
const emailNotificationLog = email_notification_log_entity_1.EmailNotificationLogEntity.create();
|
|
84
84
|
emailNotificationLog.template_identifier = template_identifier;
|
|
85
|
-
emailNotificationLog.
|
|
85
|
+
emailNotificationLog.recipient = emailRecipient.recipient;
|
|
86
86
|
emailNotificationLog.attributes = {
|
|
87
|
-
cc:
|
|
88
|
-
bcc:
|
|
87
|
+
cc: emailRecipient?.cc || [],
|
|
88
|
+
bcc: emailRecipient?.bcc || [],
|
|
89
89
|
};
|
|
90
90
|
emailNotificationLog.email_body = email_body;
|
|
91
91
|
await emailNotificationLog.save();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EmailRecipientDto } from '../dtos/email.notification.options.dto';
|
|
2
2
|
export interface RenderedEmailTemplate {
|
|
3
3
|
template_identifier: string;
|
|
4
4
|
subject: string;
|
|
5
5
|
email_body: string;
|
|
6
6
|
}
|
|
7
7
|
export interface SendEmailOptions extends RenderedEmailTemplate {
|
|
8
|
-
|
|
8
|
+
emailRecipients: EmailRecipientDto[];
|
|
9
9
|
}
|
|
10
10
|
//# sourceMappingURL=email.notification.types.d.ts.map
|