@thescaffold/ntx-apps-notification 0.0.10
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 +1 -0
- package/api/log/dto/create-log.dto.d.ts +20 -0
- package/api/log/dto/create-log.dto.js +123 -0
- package/api/log/dto/create-log.dto.js.map +1 -0
- package/api/log/dto/update-log.dto.d.ts +20 -0
- package/api/log/dto/update-log.dto.js +126 -0
- package/api/log/dto/update-log.dto.js.map +1 -0
- package/api/log/entities/log.entity.d.ts +30 -0
- package/api/log/entities/log.entity.js +163 -0
- package/api/log/entities/log.entity.js.map +1 -0
- package/api/log/index.d.ts +6 -0
- package/api/log/index.js +23 -0
- package/api/log/index.js.map +1 -0
- package/api/log/log.controller.d.ts +34 -0
- package/api/log/log.controller.js +105 -0
- package/api/log/log.controller.js.map +1 -0
- package/api/log/log.module.d.ts +2 -0
- package/api/log/log.module.js +34 -0
- package/api/log/log.module.js.map +1 -0
- package/api/log/log.service.d.ts +22 -0
- package/api/log/log.service.js +65 -0
- package/api/log/log.service.js.map +1 -0
- package/api/message/dto/create-message.dto.d.ts +17 -0
- package/api/message/dto/create-message.dto.js +105 -0
- package/api/message/dto/create-message.dto.js.map +1 -0
- package/api/message/dto/update-message.dto.d.ts +17 -0
- package/api/message/dto/update-message.dto.js +108 -0
- package/api/message/dto/update-message.dto.js.map +1 -0
- package/api/message/entities/message.entity.d.ts +22 -0
- package/api/message/entities/message.entity.js +135 -0
- package/api/message/entities/message.entity.js.map +1 -0
- package/api/message/index.d.ts +6 -0
- package/api/message/index.js +23 -0
- package/api/message/index.js.map +1 -0
- package/api/message/message.controller.d.ts +24 -0
- package/api/message/message.controller.js +50 -0
- package/api/message/message.controller.js.map +1 -0
- package/api/message/message.module.d.ts +2 -0
- package/api/message/message.module.js +27 -0
- package/api/message/message.module.js.map +1 -0
- package/api/message/message.service.d.ts +22 -0
- package/api/message/message.service.js +65 -0
- package/api/message/message.service.js.map +1 -0
- package/api/rule/dto/create-rule.dto.d.ts +6 -0
- package/api/rule/dto/create-rule.dto.js +39 -0
- package/api/rule/dto/create-rule.dto.js.map +1 -0
- package/api/rule/dto/update-rule.dto.d.ts +6 -0
- package/api/rule/dto/update-rule.dto.js +42 -0
- package/api/rule/dto/update-rule.dto.js.map +1 -0
- package/api/rule/entities/rule.entity.d.ts +9 -0
- package/api/rule/entities/rule.entity.js +47 -0
- package/api/rule/entities/rule.entity.js.map +1 -0
- package/api/rule/index.d.ts +6 -0
- package/api/rule/index.js +23 -0
- package/api/rule/index.js.map +1 -0
- package/api/rule/rule.controller.d.ts +21 -0
- package/api/rule/rule.controller.js +40 -0
- package/api/rule/rule.controller.js.map +1 -0
- package/api/rule/rule.module.d.ts +2 -0
- package/api/rule/rule.module.js +27 -0
- package/api/rule/rule.module.js.map +1 -0
- package/api/rule/rule.service.d.ts +13 -0
- package/api/rule/rule.service.js +46 -0
- package/api/rule/rule.service.js.map +1 -0
- package/api/template/dto/create-template.dto.d.ts +7 -0
- package/api/template/dto/create-template.dto.js +46 -0
- package/api/template/dto/create-template.dto.js.map +1 -0
- package/api/template/dto/update-template.dto.d.ts +7 -0
- package/api/template/dto/update-template.dto.js +48 -0
- package/api/template/dto/update-template.dto.js.map +1 -0
- package/api/template/entities/template.entity.d.ts +12 -0
- package/api/template/entities/template.entity.js +59 -0
- package/api/template/entities/template.entity.js.map +1 -0
- package/api/template/index.d.ts +6 -0
- package/api/template/index.js +23 -0
- package/api/template/index.js.map +1 -0
- package/api/template/template.controller.d.ts +21 -0
- package/api/template/template.controller.js +40 -0
- package/api/template/template.controller.js.map +1 -0
- package/api/template/template.module.d.ts +2 -0
- package/api/template/template.module.js +27 -0
- package/api/template/template.module.js.map +1 -0
- package/api/template/template.service.d.ts +13 -0
- package/api/template/template.service.js +46 -0
- package/api/template/template.service.js.map +1 -0
- package/app.config.d.ts +2 -0
- package/app.config.js +16 -0
- package/app.config.js.map +1 -0
- package/app.controller.d.ts +54 -0
- package/app.controller.js +259 -0
- package/app.controller.js.map +1 -0
- package/app.dto.d.ts +46 -0
- package/app.dto.js +58 -0
- package/app.dto.js.map +1 -0
- package/app.module.d.ts +2 -0
- package/app.module.js +58 -0
- package/app.module.js.map +1 -0
- package/app.service.d.ts +3 -0
- package/app.service.js +20 -0
- package/app.service.js.map +1 -0
- package/index.d.ts +30 -0
- package/index.js +69 -0
- package/index.js.map +1 -0
- package/migrations/1749979429709-NotificationLogs.d.ts +5 -0
- package/migrations/1749979429709-NotificationLogs.js +61 -0
- package/migrations/1749979429709-NotificationLogs.js.map +1 -0
- package/migrations/1749979429775-NotificationRules.d.ts +5 -0
- package/migrations/1749979429775-NotificationRules.js +32 -0
- package/migrations/1749979429775-NotificationRules.js.map +1 -0
- package/migrations/1749979429841-NotificationTemplates.d.ts +5 -0
- package/migrations/1749979429841-NotificationTemplates.js +36 -0
- package/migrations/1749979429841-NotificationTemplates.js.map +1 -0
- package/migrations/1749979429845-NotificationMessages.d.ts +5 -0
- package/migrations/1749979429845-NotificationMessages.js +58 -0
- package/migrations/1749979429845-NotificationMessages.js.map +1 -0
- package/migrations/index.d.ts +2 -0
- package/migrations/index.js +14 -0
- package/migrations/index.js.map +1 -0
- package/package.json +18 -0
- package/pkg/provider/mailgun/mailgun.service.d.ts +19 -0
- package/pkg/provider/mailgun/mailgun.service.js +84 -0
- package/pkg/provider/mailgun/mailgun.service.js.map +1 -0
- package/pkg/provider/provider.interface.d.ts +25 -0
- package/pkg/provider/provider.interface.js +3 -0
- package/pkg/provider/provider.interface.js.map +1 -0
- package/pkg/provider/provider.module.d.ts +2 -0
- package/pkg/provider/provider.module.js +26 -0
- package/pkg/provider/provider.module.js.map +1 -0
- package/pkg/provider/provider.service.d.ts +29 -0
- package/pkg/provider/provider.service.js +204 -0
- package/pkg/provider/provider.service.js.map +1 -0
- package/pkg/provider/zoho/zoho.service.d.ts +20 -0
- package/pkg/provider/zoho/zoho.service.js +94 -0
- package/pkg/provider/zoho/zoho.service.js.map +1 -0
- package/tsconfig.lib.tsbuildinfo +1 -0
|
@@ -0,0 +1,40 @@
|
|
|
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.RuleController = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const ntx_core_1 = require("@thescaffold/ntx-core");
|
|
15
|
+
const create_rule_dto_1 = require("./dto/create-rule.dto");
|
|
16
|
+
const update_rule_dto_1 = require("./dto/update-rule.dto");
|
|
17
|
+
const rule_entity_1 = require("./entities/rule.entity");
|
|
18
|
+
const rule_service_1 = require("./rule.service");
|
|
19
|
+
let RuleController = class RuleController extends (0, ntx_core_1.CrudControllerFactory)(create_rule_dto_1.CreateRuleDto, update_rule_dto_1.UpdateRuleDto, rule_entity_1.Rule) {
|
|
20
|
+
constructor(ruleService, languageService, mediaService) {
|
|
21
|
+
super();
|
|
22
|
+
this.ruleService = ruleService;
|
|
23
|
+
this.languageService = languageService;
|
|
24
|
+
this.mediaService = mediaService;
|
|
25
|
+
this.name = 'rule';
|
|
26
|
+
this.searchable = ['group', 'name'];
|
|
27
|
+
this.service = this.ruleService;
|
|
28
|
+
this.unique = ({ key }) => [{ key }];
|
|
29
|
+
this.morphRequest = (entity) => entity;
|
|
30
|
+
this.hooks = {};
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.RuleController = RuleController;
|
|
34
|
+
exports.RuleController = RuleController = __decorate([
|
|
35
|
+
(0, common_1.Controller)('rule'),
|
|
36
|
+
__metadata("design:paramtypes", [rule_service_1.RuleService,
|
|
37
|
+
ntx_core_1.LanguageService,
|
|
38
|
+
ntx_core_1.MediaService])
|
|
39
|
+
], RuleController);
|
|
40
|
+
//# sourceMappingURL=rule.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule.controller.js","sourceRoot":"","sources":["../../../../../libs/notification/src/api/rule/rule.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oDAI+B;AAC/B,2DAAsD;AACtD,2DAAsD;AACtD,wDAA8C;AAC9C,iDAA6C;AAGtC,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,IAAA,gCAAqB,EAIvD,+BAAa,EAAE,+BAAa,EAAE,kBAAI,CAAC;IAQnC,YACmB,WAAwB,EACtB,eAAgC,EAChC,YAA0B;QAE7C,KAAK,EAAE,CAAC;QAJS,gBAAW,GAAX,WAAW,CAAa;QACtB,oBAAe,GAAf,eAAe,CAAiB;QAChC,iBAAY,GAAZ,YAAY,CAAc;QAVrC,SAAI,GAAG,MAAM,CAAC;QACd,eAAU,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC/B,YAAO,GAAG,IAAI,CAAC,WAAW,CAAC;QAC3B,WAAM,GAAG,CAAC,EAAE,GAAG,EAAQ,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;QACtC,iBAAY,GAAG,CAAC,MAAY,EAAE,EAAE,CAAC,MAAM,CAAC;QACxC,UAAK,GAAG,EAAE,CAAC;IAQrB,CAAC;CACF,CAAA;AAnBY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,EAAC,MAAM,CAAC;qCAce,0BAAW;QACL,0BAAe;QAClB,uBAAY;GAfpC,cAAc,CAmB1B"}
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.RuleModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
12
|
+
const ntx_core_1 = require("@thescaffold/ntx-core");
|
|
13
|
+
const rule_entity_1 = require("./entities/rule.entity");
|
|
14
|
+
const rule_controller_1 = require("./rule.controller");
|
|
15
|
+
const rule_service_1 = require("./rule.service");
|
|
16
|
+
let RuleModule = class RuleModule {
|
|
17
|
+
};
|
|
18
|
+
exports.RuleModule = RuleModule;
|
|
19
|
+
exports.RuleModule = RuleModule = __decorate([
|
|
20
|
+
(0, common_1.Module)({
|
|
21
|
+
imports: [typeorm_1.TypeOrmModule.forFeature([rule_entity_1.Rule]), ntx_core_1.ServicesModule],
|
|
22
|
+
controllers: [rule_controller_1.RuleController],
|
|
23
|
+
providers: [rule_service_1.RuleService],
|
|
24
|
+
exports: [rule_service_1.RuleService],
|
|
25
|
+
})
|
|
26
|
+
], RuleModule);
|
|
27
|
+
//# sourceMappingURL=rule.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule.module.js","sourceRoot":"","sources":["../../../../../libs/notification/src/api/rule/rule.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,oDAAuD;AACvD,wDAA8C;AAC9C,uDAAmD;AACnD,iDAA6C;AAQtC,IAAM,UAAU,GAAhB,MAAM,UAAU;CAAG,CAAA;AAAb,gCAAU;qBAAV,UAAU;IANtB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,uBAAa,CAAC,UAAU,CAAC,CAAC,kBAAI,CAAC,CAAC,EAAE,yBAAc,CAAC;QAC3D,WAAW,EAAE,CAAC,gCAAc,CAAC;QAC7B,SAAS,EAAE,CAAC,0BAAW,CAAC;QACxB,OAAO,EAAE,CAAC,0BAAW,CAAC;KACvB,CAAC;GACW,UAAU,CAAG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ConfigService } from '@nestjs/config';
|
|
2
|
+
import { BaseRepository, LanguageService, MediaService, PermissionScopeType, TrackerService } from '@thescaffold/ntx-core';
|
|
3
|
+
import { Rule } from './entities/rule.entity';
|
|
4
|
+
export declare class RuleService extends BaseRepository<Rule> {
|
|
5
|
+
protected readonly trackerService: TrackerService;
|
|
6
|
+
protected readonly configService: ConfigService;
|
|
7
|
+
protected readonly languageService: LanguageService;
|
|
8
|
+
protected readonly mediaService: MediaService;
|
|
9
|
+
protected [PermissionScopeType.Self]: any[];
|
|
10
|
+
protected [PermissionScopeType.Workspace]: any[];
|
|
11
|
+
protected [PermissionScopeType.Global]: any[];
|
|
12
|
+
constructor(request: any, trackerService: TrackerService, configService: ConfigService, languageService: LanguageService, mediaService: MediaService);
|
|
13
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var _a, _b, _c;
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.RuleService = void 0;
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
const config_1 = require("@nestjs/config");
|
|
19
|
+
const core_1 = require("@nestjs/core");
|
|
20
|
+
const ntx_core_1 = require("@thescaffold/ntx-core");
|
|
21
|
+
const rule_entity_1 = require("./entities/rule.entity");
|
|
22
|
+
let RuleService = class RuleService extends ntx_core_1.BaseRepository {
|
|
23
|
+
constructor(request, trackerService, configService, languageService, mediaService) {
|
|
24
|
+
super(request, rule_entity_1.Rule);
|
|
25
|
+
this.trackerService = trackerService;
|
|
26
|
+
this.configService = configService;
|
|
27
|
+
this.languageService = languageService;
|
|
28
|
+
this.mediaService = mediaService;
|
|
29
|
+
this[_a] = [];
|
|
30
|
+
this[_b] = [];
|
|
31
|
+
this[_c] = [];
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
exports.RuleService = RuleService;
|
|
35
|
+
_a = ntx_core_1.PermissionScopeType.Self;
|
|
36
|
+
_b = ntx_core_1.PermissionScopeType.Workspace;
|
|
37
|
+
_c = ntx_core_1.PermissionScopeType.Global;
|
|
38
|
+
exports.RuleService = RuleService = __decorate([
|
|
39
|
+
(0, common_1.Injectable)({ scope: common_1.Scope.REQUEST }),
|
|
40
|
+
__param(0, (0, common_1.Inject)(core_1.REQUEST)),
|
|
41
|
+
__metadata("design:paramtypes", [Object, ntx_core_1.TrackerService,
|
|
42
|
+
config_1.ConfigService,
|
|
43
|
+
ntx_core_1.LanguageService,
|
|
44
|
+
ntx_core_1.MediaService])
|
|
45
|
+
], RuleService);
|
|
46
|
+
//# sourceMappingURL=rule.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rule.service.js","sourceRoot":"","sources":["../../../../../libs/notification/src/api/rule/rule.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA2D;AAC3D,2CAA+C;AAC/C,uCAAuC;AACvC,oDAM+B;AAC/B,wDAA8C;AAGvC,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,yBAAoB;IAOnD,YACmB,OAAY,EACV,cAA8B,EAC9B,aAA4B,EAC5B,eAAgC,EAChC,YAA0B;QAE7C,KAAK,CAAC,OAAO,EAAE,kBAAI,CAAC,CAAC;QALF,mBAAc,GAAd,cAAc,CAAgB;QAC9B,kBAAa,GAAb,aAAa,CAAe;QAC5B,oBAAe,GAAf,eAAe,CAAiB;QAChC,iBAAY,GAAZ,YAAY,CAAc;QAXrC,QAA0B,GAAG,EAAE,CAAC;QAEhC,QAA+B,GAAG,EAAE,CAAC;QAErC,QAA4B,GAAG,EAAE,CAAC;IAU5C,CAAC;CACF,CAAA;AAhBY,kCAAW;KACX,8BAAmB,CAAC,IAAI;KAExB,8BAAmB,CAAC,SAAS;KAE7B,8BAAmB,CAAC,MAAM;sBAL1B,WAAW;IADvB,IAAA,mBAAU,EAAC,EAAE,KAAK,EAAE,cAAK,CAAC,OAAO,EAAE,CAAC;IAShC,WAAA,IAAA,eAAM,EAAC,cAAO,CAAC,CAAA;6CACmB,yBAAc;QACf,sBAAa;QACX,0BAAe;QAClB,uBAAY;GAZpC,WAAW,CAgBvB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
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.CreateTemplateDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
class CreateTemplateDto {
|
|
16
|
+
}
|
|
17
|
+
exports.CreateTemplateDto = CreateTemplateDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsOptional)(),
|
|
20
|
+
(0, swagger_1.ApiProperty)(),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], CreateTemplateDto.prototype, "group", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsOptional)(),
|
|
25
|
+
(0, swagger_1.ApiProperty)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], CreateTemplateDto.prototype, "key", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsString)(),
|
|
30
|
+
(0, class_validator_1.IsOptional)(),
|
|
31
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], CreateTemplateDto.prototype, "email", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, class_validator_1.IsString)(),
|
|
36
|
+
(0, class_validator_1.IsOptional)(),
|
|
37
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], CreateTemplateDto.prototype, "sms", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_validator_1.IsString)(),
|
|
42
|
+
(0, class_validator_1.IsOptional)(),
|
|
43
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], CreateTemplateDto.prototype, "status", void 0);
|
|
46
|
+
//# sourceMappingURL=create-template.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-template.dto.js","sourceRoot":"","sources":["../../../../../../libs/notification/src/api/template/dto/create-template.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmE;AACnE,qDAAuD;AAEvD,MAAa,iBAAiB;CAuB7B;AAvBD,8CAuBC;AApBC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,GAAE;;gDACA;AAId;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,qBAAW,GAAE;;8CACF;AAKZ;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;gDACP;AAKf;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;8CACT;AAKb;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;iDACN"}
|
|
@@ -0,0 +1,48 @@
|
|
|
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.UpdateTemplateDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
class UpdateTemplateDto {
|
|
16
|
+
}
|
|
17
|
+
exports.UpdateTemplateDto = UpdateTemplateDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsOptional)(),
|
|
20
|
+
(0, class_validator_1.IsString)(),
|
|
21
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], UpdateTemplateDto.prototype, "group", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsOptional)(),
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], UpdateTemplateDto.prototype, "key", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsString)(),
|
|
32
|
+
(0, class_validator_1.IsOptional)(),
|
|
33
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], UpdateTemplateDto.prototype, "email", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.IsString)(),
|
|
38
|
+
(0, class_validator_1.IsOptional)(),
|
|
39
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], UpdateTemplateDto.prototype, "sms", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_validator_1.IsString)(),
|
|
44
|
+
(0, class_validator_1.IsOptional)(),
|
|
45
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], UpdateTemplateDto.prototype, "status", void 0);
|
|
48
|
+
//# sourceMappingURL=update-template.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-template.dto.js","sourceRoot":"","sources":["../../../../../../libs/notification/src/api/template/dto/update-template.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAsD;AACtD,qDAAuD;AAEvD,MAAa,iBAAiB;CAyB7B;AAzBD,8CAyBC;AArBC;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,6BAAmB,GAAE;;gDACP;AAKf;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;IACV,IAAA,6BAAmB,GAAE;;8CACT;AAKb;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;gDACP;AAKf;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;8CACT;AAKb;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAmB,GAAE;;iDACN"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseEntity } from '@thescaffold/ntx-core';
|
|
2
|
+
import { Log } from '../../log/entities/log.entity';
|
|
3
|
+
export declare class Template extends BaseEntity {
|
|
4
|
+
group: string;
|
|
5
|
+
key: string;
|
|
6
|
+
email: string;
|
|
7
|
+
sms: string;
|
|
8
|
+
web: string;
|
|
9
|
+
mobile: string;
|
|
10
|
+
status?: string;
|
|
11
|
+
logs?: Log[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
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.Template = void 0;
|
|
13
|
+
const ntx_core_1 = require("@thescaffold/ntx-core");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const log_entity_1 = require("../../log/entities/log.entity");
|
|
16
|
+
let Template = class Template extends ntx_core_1.BaseEntity {
|
|
17
|
+
};
|
|
18
|
+
exports.Template = Template;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.Column)('char', { name: 'group', length: 36 }),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], Template.prototype, "group", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)('char', { name: 'key', length: 36 }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], Template.prototype, "key", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)('longtext', { name: 'email', nullable: true }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], Template.prototype, "email", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)('text', { name: 'sms', nullable: true }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], Template.prototype, "sms", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)('text', { name: 'web', nullable: true }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], Template.prototype, "web", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)('text', { name: 'mobile', nullable: true }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], Template.prototype, "mobile", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)('varchar', { name: 'status', nullable: true, length: 52 }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], Template.prototype, "status", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.OneToMany)((type) => log_entity_1.Log, (log) => log.rule),
|
|
49
|
+
__metadata("design:type", Array)
|
|
50
|
+
], Template.prototype, "logs", void 0);
|
|
51
|
+
exports.Template = Template = __decorate([
|
|
52
|
+
(0, typeorm_1.Entity)({
|
|
53
|
+
name: 'NotificationTemplates',
|
|
54
|
+
orderBy: {
|
|
55
|
+
createdAt: 'DESC',
|
|
56
|
+
},
|
|
57
|
+
})
|
|
58
|
+
], Template);
|
|
59
|
+
//# sourceMappingURL=template.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.entity.js","sourceRoot":"","sources":["../../../../../../libs/notification/src/api/template/entities/template.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAmD;AACnD,qCAAoD;AACpD,8DAAoD;AAQ7C,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,qBAAU;CAwBvC,CAAA;AAxBY,4BAAQ;AAEnB;IADC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;uCAChC;AAGd;IADC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;qCAChC;AAGZ;IADC,IAAA,gBAAM,EAAC,UAAU,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACxC;AAGd;IADC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qCACpC;AAGZ;IADC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qCACpC;AAGZ;IADC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACpC;AAGf;IADC,IAAA,gBAAM,EAAC,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;wCAClD;AAGhB;IADC,IAAA,mBAAS,EAAC,CAAC,IAAI,EAAE,EAAE,CAAC,gBAAG,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC;;sCAC/B;mBAvBF,QAAQ;IANpB,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,uBAAuB;QAC7B,OAAO,EAAE;YACP,SAAS,EAAE,MAAM;SAClB;KACF,CAAC;GACW,QAAQ,CAwBpB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./dto/create-template.dto"), exports);
|
|
18
|
+
__exportStar(require("./dto/update-template.dto"), exports);
|
|
19
|
+
__exportStar(require("./entities/template.entity"), exports);
|
|
20
|
+
__exportStar(require("./template.controller"), exports);
|
|
21
|
+
__exportStar(require("./template.service"), exports);
|
|
22
|
+
__exportStar(require("./template.module"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/notification/src/api/template/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,4DAA0C;AAC1C,6DAA2C;AAC3C,wDAAsC;AACtC,qDAAmC;AACnC,oDAAkC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LanguageService, MediaService } from '@thescaffold/ntx-core';
|
|
2
|
+
import { CreateTemplateDto } from './dto/create-template.dto';
|
|
3
|
+
import { UpdateTemplateDto } from './dto/update-template.dto';
|
|
4
|
+
import { Template } from './entities/template.entity';
|
|
5
|
+
import { TemplateService } from './template.service';
|
|
6
|
+
declare const TemplateController_base: import("@nestjs/common").Type<import("@thescaffold/ntx-core").CrudControllerContract<Template, CreateTemplateDto, UpdateTemplateDto>>;
|
|
7
|
+
export declare class TemplateController extends TemplateController_base {
|
|
8
|
+
private readonly templateService;
|
|
9
|
+
protected readonly languageService: LanguageService;
|
|
10
|
+
protected readonly mediaService: MediaService;
|
|
11
|
+
protected name: string;
|
|
12
|
+
protected searchable: string[];
|
|
13
|
+
protected service: TemplateService;
|
|
14
|
+
protected unique: ({ key }: Template) => {
|
|
15
|
+
key: string;
|
|
16
|
+
}[];
|
|
17
|
+
protected morphRequest: (entity: Template) => Template;
|
|
18
|
+
protected hooks: {};
|
|
19
|
+
constructor(templateService: TemplateService, languageService: LanguageService, mediaService: MediaService);
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
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.TemplateController = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const ntx_core_1 = require("@thescaffold/ntx-core");
|
|
15
|
+
const create_template_dto_1 = require("./dto/create-template.dto");
|
|
16
|
+
const update_template_dto_1 = require("./dto/update-template.dto");
|
|
17
|
+
const template_entity_1 = require("./entities/template.entity");
|
|
18
|
+
const template_service_1 = require("./template.service");
|
|
19
|
+
let TemplateController = class TemplateController extends (0, ntx_core_1.CrudControllerFactory)(create_template_dto_1.CreateTemplateDto, update_template_dto_1.UpdateTemplateDto, template_entity_1.Template) {
|
|
20
|
+
constructor(templateService, languageService, mediaService) {
|
|
21
|
+
super();
|
|
22
|
+
this.templateService = templateService;
|
|
23
|
+
this.languageService = languageService;
|
|
24
|
+
this.mediaService = mediaService;
|
|
25
|
+
this.name = 'template';
|
|
26
|
+
this.searchable = ['group', 'name'];
|
|
27
|
+
this.service = this.templateService;
|
|
28
|
+
this.unique = ({ key }) => [{ key }];
|
|
29
|
+
this.morphRequest = (entity) => entity;
|
|
30
|
+
this.hooks = {};
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.TemplateController = TemplateController;
|
|
34
|
+
exports.TemplateController = TemplateController = __decorate([
|
|
35
|
+
(0, common_1.Controller)('template'),
|
|
36
|
+
__metadata("design:paramtypes", [template_service_1.TemplateService,
|
|
37
|
+
ntx_core_1.LanguageService,
|
|
38
|
+
ntx_core_1.MediaService])
|
|
39
|
+
], TemplateController);
|
|
40
|
+
//# sourceMappingURL=template.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.controller.js","sourceRoot":"","sources":["../../../../../libs/notification/src/api/template/template.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,oDAI+B;AAC/B,mEAA8D;AAC9D,mEAA8D;AAC9D,gEAAsD;AACtD,yDAAqD;AAG9C,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,IAAA,gCAAqB,EAI3D,uCAAiB,EAAE,uCAAiB,EAAE,0BAAQ,CAAC;IAQ/C,YACmB,eAAgC,EAC9B,eAAgC,EAChC,YAA0B;QAE7C,KAAK,EAAE,CAAC;QAJS,oBAAe,GAAf,eAAe,CAAiB;QAC9B,oBAAe,GAAf,eAAe,CAAiB;QAChC,iBAAY,GAAZ,YAAY,CAAc;QAVrC,SAAI,GAAG,UAAU,CAAC;QAClB,eAAU,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC/B,YAAO,GAAG,IAAI,CAAC,eAAe,CAAC;QAC/B,WAAM,GAAG,CAAC,EAAE,GAAG,EAAY,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;QAC1C,iBAAY,GAAG,CAAC,MAAgB,EAAE,EAAE,CAAC,MAAM,CAAC;QAC5C,UAAK,GAAG,EAAE,CAAC;IAQrB,CAAC;CACF,CAAA;AAnBY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,EAAC,UAAU,CAAC;qCAce,kCAAe;QACb,0BAAe;QAClB,uBAAY;GAfpC,kBAAkB,CAmB9B"}
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.TemplateModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
12
|
+
const ntx_core_1 = require("@thescaffold/ntx-core");
|
|
13
|
+
const template_entity_1 = require("./entities/template.entity");
|
|
14
|
+
const template_controller_1 = require("./template.controller");
|
|
15
|
+
const template_service_1 = require("./template.service");
|
|
16
|
+
let TemplateModule = class TemplateModule {
|
|
17
|
+
};
|
|
18
|
+
exports.TemplateModule = TemplateModule;
|
|
19
|
+
exports.TemplateModule = TemplateModule = __decorate([
|
|
20
|
+
(0, common_1.Module)({
|
|
21
|
+
imports: [typeorm_1.TypeOrmModule.forFeature([template_entity_1.Template]), ntx_core_1.ServicesModule],
|
|
22
|
+
controllers: [template_controller_1.TemplateController],
|
|
23
|
+
providers: [template_service_1.TemplateService],
|
|
24
|
+
exports: [template_service_1.TemplateService],
|
|
25
|
+
})
|
|
26
|
+
], TemplateModule);
|
|
27
|
+
//# sourceMappingURL=template.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.module.js","sourceRoot":"","sources":["../../../../../libs/notification/src/api/template/template.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,oDAAuD;AACvD,gEAAsD;AACtD,+DAA2D;AAC3D,yDAAqD;AAQ9C,IAAM,cAAc,GAApB,MAAM,cAAc;CAAG,CAAA;AAAjB,wCAAc;yBAAd,cAAc;IAN1B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,uBAAa,CAAC,UAAU,CAAC,CAAC,0BAAQ,CAAC,CAAC,EAAE,yBAAc,CAAC;QAC/D,WAAW,EAAE,CAAC,wCAAkB,CAAC;QACjC,SAAS,EAAE,CAAC,kCAAe,CAAC;QAC5B,OAAO,EAAE,CAAC,kCAAe,CAAC;KAC3B,CAAC;GACW,cAAc,CAAG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ConfigService } from '@nestjs/config';
|
|
2
|
+
import { BaseRepository, LanguageService, MediaService, PermissionScopeType, TrackerService } from '@thescaffold/ntx-core';
|
|
3
|
+
import { Template } from './entities/template.entity';
|
|
4
|
+
export declare class TemplateService extends BaseRepository<Template> {
|
|
5
|
+
protected readonly trackerService: TrackerService;
|
|
6
|
+
protected readonly configService: ConfigService;
|
|
7
|
+
protected readonly languageService: LanguageService;
|
|
8
|
+
protected readonly mediaService: MediaService;
|
|
9
|
+
protected [PermissionScopeType.Self]: any[];
|
|
10
|
+
protected [PermissionScopeType.Workspace]: any[];
|
|
11
|
+
protected [PermissionScopeType.Global]: any[];
|
|
12
|
+
constructor(request: any, trackerService: TrackerService, configService: ConfigService, languageService: LanguageService, mediaService: MediaService);
|
|
13
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var _a, _b, _c;
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.TemplateService = void 0;
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
const config_1 = require("@nestjs/config");
|
|
19
|
+
const core_1 = require("@nestjs/core");
|
|
20
|
+
const ntx_core_1 = require("@thescaffold/ntx-core");
|
|
21
|
+
const template_entity_1 = require("./entities/template.entity");
|
|
22
|
+
let TemplateService = class TemplateService extends ntx_core_1.BaseRepository {
|
|
23
|
+
constructor(request, trackerService, configService, languageService, mediaService) {
|
|
24
|
+
super(request, template_entity_1.Template);
|
|
25
|
+
this.trackerService = trackerService;
|
|
26
|
+
this.configService = configService;
|
|
27
|
+
this.languageService = languageService;
|
|
28
|
+
this.mediaService = mediaService;
|
|
29
|
+
this[_a] = [];
|
|
30
|
+
this[_b] = [];
|
|
31
|
+
this[_c] = [];
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
exports.TemplateService = TemplateService;
|
|
35
|
+
_a = ntx_core_1.PermissionScopeType.Self;
|
|
36
|
+
_b = ntx_core_1.PermissionScopeType.Workspace;
|
|
37
|
+
_c = ntx_core_1.PermissionScopeType.Global;
|
|
38
|
+
exports.TemplateService = TemplateService = __decorate([
|
|
39
|
+
(0, common_1.Injectable)({ scope: common_1.Scope.REQUEST }),
|
|
40
|
+
__param(0, (0, common_1.Inject)(core_1.REQUEST)),
|
|
41
|
+
__metadata("design:paramtypes", [Object, ntx_core_1.TrackerService,
|
|
42
|
+
config_1.ConfigService,
|
|
43
|
+
ntx_core_1.LanguageService,
|
|
44
|
+
ntx_core_1.MediaService])
|
|
45
|
+
], TemplateService);
|
|
46
|
+
//# sourceMappingURL=template.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.service.js","sourceRoot":"","sources":["../../../../../libs/notification/src/api/template/template.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA2D;AAC3D,2CAA+C;AAC/C,uCAAuC;AACvC,oDAM+B;AAC/B,gEAAsD;AAG/C,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,yBAAwB;IAO3D,YACmB,OAAY,EACV,cAA8B,EAC9B,aAA4B,EAC5B,eAAgC,EAChC,YAA0B;QAE7C,KAAK,CAAC,OAAO,EAAE,0BAAQ,CAAC,CAAC;QALN,mBAAc,GAAd,cAAc,CAAgB;QAC9B,kBAAa,GAAb,aAAa,CAAe;QAC5B,oBAAe,GAAf,eAAe,CAAiB;QAChC,iBAAY,GAAZ,YAAY,CAAc;QAXrC,QAA0B,GAAG,EAAE,CAAC;QAEhC,QAA+B,GAAG,EAAE,CAAC;QAErC,QAA4B,GAAG,EAAE,CAAC;IAU5C,CAAC;CACF,CAAA;AAhBY,0CAAe;KACf,8BAAmB,CAAC,IAAI;KAExB,8BAAmB,CAAC,SAAS;KAE7B,8BAAmB,CAAC,MAAM;0BAL1B,eAAe;IAD3B,IAAA,mBAAU,EAAC,EAAE,KAAK,EAAE,cAAK,CAAC,OAAO,EAAE,CAAC;IAShC,WAAA,IAAA,eAAM,EAAC,cAAO,CAAC,CAAA;6CACmB,yBAAc;QACf,sBAAa;QACX,0BAAe;QAClB,uBAAY;GAZpC,eAAe,CAgB3B"}
|
package/app.config.d.ts
ADDED
package/app.config.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultMessageTypeChannels = void 0;
|
|
4
|
+
const app_dto_1 = require("./app.dto");
|
|
5
|
+
const defaultMessageTypeChannels = (type) => {
|
|
6
|
+
return {
|
|
7
|
+
[app_dto_1.MessageTypeType.Default]: 'web,email',
|
|
8
|
+
[app_dto_1.MessageTypeType.System]: 'web,email',
|
|
9
|
+
[app_dto_1.MessageTypeType.Security]: 'web,email',
|
|
10
|
+
[app_dto_1.MessageTypeType.Global]: 'web,email',
|
|
11
|
+
[app_dto_1.MessageTypeType.User]: 'web,email',
|
|
12
|
+
[app_dto_1.MessageTypeType.Activity]: 'web,email',
|
|
13
|
+
}[type];
|
|
14
|
+
};
|
|
15
|
+
exports.defaultMessageTypeChannels = defaultMessageTypeChannels;
|
|
16
|
+
//# sourceMappingURL=app.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.config.js","sourceRoot":"","sources":["../../../libs/notification/src/app.config.ts"],"names":[],"mappings":";;;AAAA,uCAA4C;AAErC,MAAM,0BAA0B,GAAG,CAAC,IAAqB,EAAE,EAAE;IAClE,OAAO;QACL,CAAC,yBAAe,CAAC,OAAO,CAAC,EAAE,WAAW;QACtC,CAAC,yBAAe,CAAC,MAAM,CAAC,EAAE,WAAW;QACrC,CAAC,yBAAe,CAAC,QAAQ,CAAC,EAAE,WAAW;QACvC,CAAC,yBAAe,CAAC,MAAM,CAAC,EAAE,WAAW;QACrC,CAAC,yBAAe,CAAC,IAAI,CAAC,EAAE,WAAW;QACnC,CAAC,yBAAe,CAAC,QAAQ,CAAC,EAAE,WAAW;KACxC,CAAC,IAAI,CAAC,CAAC;AACV,CAAC,CAAC;AATW,QAAA,0BAA0B,8BASrC"}
|