@servicelabsco/slabs-access-manager 0.1.168 → 0.1.170
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/dist/access/controllers/business.notification.channel.preference.controller.d.ts +17 -0
- package/dist/access/controllers/business.notification.channel.preference.controller.js +112 -0
- package/dist/access/controllers/business.notification.channel.preference.controller.js.map +1 -0
- package/dist/access/controllers/business.user.notification.preference.controller.d.ts +21 -0
- package/dist/access/controllers/business.user.notification.preference.controller.js +138 -0
- package/dist/access/controllers/business.user.notification.preference.controller.js.map +1 -0
- package/dist/access/controllers/index.d.ts +2 -0
- package/dist/access/controllers/index.js +2 -0
- package/dist/access/controllers/index.js.map +1 -1
- package/dist/access/dtos/add.business.user.notification.preference.dto.d.ts +6 -0
- package/dist/access/dtos/add.business.user.notification.preference.dto.js +43 -0
- package/dist/access/dtos/add.business.user.notification.preference.dto.js.map +1 -0
- package/dist/access/dtos/add.notification.channel.preference.dto.d.ts +6 -0
- package/dist/access/dtos/add.notification.channel.preference.dto.js +43 -0
- package/dist/access/dtos/add.notification.channel.preference.dto.js.map +1 -0
- package/dist/access/dtos/business.notification.channel.preference.list.filter.dto.d.ts +4 -0
- package/dist/access/dtos/business.notification.channel.preference.list.filter.dto.js +25 -0
- package/dist/access/dtos/business.notification.channel.preference.list.filter.dto.js.map +1 -0
- package/dist/access/dtos/business.user.notification.preference.attributes.dto.d.ts +3 -0
- package/dist/access/dtos/business.user.notification.preference.attributes.dto.js +8 -0
- package/dist/access/dtos/business.user.notification.preference.attributes.dto.js.map +1 -0
- package/dist/access/dtos/business.user.notification.preference.list.filter.dto.d.ts +5 -0
- package/dist/access/dtos/business.user.notification.preference.list.filter.dto.js +31 -0
- package/dist/access/dtos/business.user.notification.preference.list.filter.dto.js.map +1 -0
- package/dist/access/dtos/bz.notification.channel.preference.attributes.dto.d.ts +3 -0
- package/dist/access/dtos/bz.notification.channel.preference.attributes.dto.js +8 -0
- package/dist/access/dtos/bz.notification.channel.preference.attributes.dto.js.map +1 -0
- package/dist/access/dtos/index.d.ts +6 -0
- package/dist/access/dtos/index.js +6 -0
- package/dist/access/dtos/index.js.map +1 -1
- package/dist/access/entities/app.integration.entity.d.ts +1 -0
- package/dist/access/entities/app.integration.entity.js +4 -0
- package/dist/access/entities/app.integration.entity.js.map +1 -1
- package/dist/access/entities/business.user.notification.preference.entity.d.ts +15 -0
- package/dist/access/entities/business.user.notification.preference.entity.js +68 -0
- package/dist/access/entities/business.user.notification.preference.entity.js.map +1 -0
- package/dist/access/entities/bz.notification.channel.preference.entity.d.ts +13 -0
- package/dist/access/entities/bz.notification.channel.preference.entity.js +59 -0
- package/dist/access/entities/bz.notification.channel.preference.entity.js.map +1 -0
- package/dist/access/entities/index.d.ts +2 -0
- package/dist/access/entities/index.js +2 -0
- package/dist/access/entities/index.js.map +1 -1
- package/dist/access/enums/index.d.ts +1 -0
- package/dist/access/enums/index.js +1 -0
- package/dist/access/enums/index.js.map +1 -1
- package/dist/access/enums/notification.channel.type.enum.d.ts +7 -0
- package/dist/access/enums/notification.channel.type.enum.js +12 -0
- package/dist/access/enums/notification.channel.type.enum.js.map +1 -0
- package/dist/access/es6.classes.d.ts +17 -7
- package/dist/access/es6.classes.js +35 -2
- package/dist/access/es6.classes.js.map +1 -1
- package/dist/access/jobs/business.user.notification.preference.job.d.ts +7 -0
- package/dist/access/jobs/business.user.notification.preference.job.js +29 -0
- package/dist/access/jobs/business.user.notification.preference.job.js.map +1 -0
- package/dist/access/jobs/bz.notification.channel.preference.job.d.ts +7 -0
- package/dist/access/jobs/bz.notification.channel.preference.job.js +29 -0
- package/dist/access/jobs/bz.notification.channel.preference.job.js.map +1 -0
- package/dist/access/jobs/index.d.ts +2 -0
- package/dist/access/jobs/index.js +2 -0
- package/dist/access/jobs/index.js.map +1 -1
- package/dist/access/libraries/business.notification.channel.preference.list.d.ts +21 -0
- package/dist/access/libraries/business.notification.channel.preference.list.js +41 -0
- package/dist/access/libraries/business.notification.channel.preference.list.js.map +1 -0
- package/dist/access/libraries/business.user.notification.preference.list.d.ts +22 -0
- package/dist/access/libraries/business.user.notification.preference.list.js +47 -0
- package/dist/access/libraries/business.user.notification.preference.list.js.map +1 -0
- package/dist/access/libraries/index.d.ts +2 -0
- package/dist/access/libraries/index.js +2 -0
- package/dist/access/libraries/index.js.map +1 -1
- package/dist/access/libraries/process.email.notification.js +1 -1
- package/dist/access/libraries/process.email.notification.js.map +1 -1
- package/dist/access/libraries/process.menu.details.js +1 -1
- package/dist/access/libraries/process.menu.details.js.map +1 -1
- package/dist/access/services/es6.jobs.service.d.ts +5 -1
- package/dist/access/services/es6.jobs.service.js +9 -1
- package/dist/access/services/es6.jobs.service.js.map +1 -1
- package/dist/access/subscribers/business.user.notification.preference.subscriber.d.ts +10 -0
- package/dist/access/subscribers/business.user.notification.preference.subscriber.js +34 -0
- package/dist/access/subscribers/business.user.notification.preference.subscriber.js.map +1 -0
- package/dist/access/subscribers/bz.notification.channel.preference.subscriber.d.ts +10 -0
- package/dist/access/subscribers/bz.notification.channel.preference.subscriber.js +34 -0
- package/dist/access/subscribers/bz.notification.channel.preference.subscriber.js.map +1 -0
- package/dist/access/subscribers/index.d.ts +2 -0
- package/dist/access/subscribers/index.js +2 -0
- package/dist/access/subscribers/index.js.map +1 -1
- package/dist/config/entity.constants.d.ts +4 -0
- package/dist/config/entity.constants.js +4 -0
- package/dist/config/entity.constants.js.map +1 -1
- package/dist/migrations/1725343070093-AddEnabledGloballyBzAppIntegrationsTable.d.ts +5 -0
- package/dist/migrations/1725343070093-AddEnabledGloballyBzAppIntegrationsTable.js +15 -0
- package/dist/migrations/1725343070093-AddEnabledGloballyBzAppIntegrationsTable.js.map +1 -0
- package/dist/migrations/1725343451546-AddNotificationChannelDataSeederTable.d.ts +7 -0
- package/dist/migrations/1725343451546-AddNotificationChannelDataSeederTable.js +65 -0
- package/dist/migrations/1725343451546-AddNotificationChannelDataSeederTable.js.map +1 -0
- package/dist/migrations/1725343967311-CreateBzUserNotificationPreferencesTable.d.ts +5 -0
- package/dist/migrations/1725343967311-CreateBzUserNotificationPreferencesTable.js +22 -0
- package/dist/migrations/1725343967311-CreateBzUserNotificationPreferencesTable.js.map +1 -0
- package/dist/migrations/1725354088464-CreateBzNotificationChannelPreferenceTable.d.ts +5 -0
- package/dist/migrations/1725354088464-CreateBzNotificationChannelPreferenceTable.js +21 -0
- package/dist/migrations/1725354088464-CreateBzNotificationChannelPreferenceTable.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AddNotificationChannelPreferenceDto } from '../dtos/add.notification.channel.preference.dto';
|
|
2
|
+
import { BusinessParamDto } from '../dtos/business.param.dto';
|
|
3
|
+
import { BusinessUserNotificationPreferenceListFilterDto } from '../dtos/business.user.notification.preference.list.filter.dto';
|
|
4
|
+
import { BzNotificationChannelPreferenceEntity } from '../entities/bz.notification.channel.preference.entity';
|
|
5
|
+
import { AccessBusinessService } from '../services/access.business.service';
|
|
6
|
+
import { ListingService } from '../services/listing.service';
|
|
7
|
+
export declare class BusinessNotificationChannelPreferenceController {
|
|
8
|
+
private readonly accessBusinessService;
|
|
9
|
+
private readonly listingService;
|
|
10
|
+
constructor(accessBusinessService: AccessBusinessService, listingService: ListingService);
|
|
11
|
+
search(body: BusinessUserNotificationPreferenceListFilterDto): Promise<import("..").ListResponseDto>;
|
|
12
|
+
create(body: AddNotificationChannelPreferenceDto): Promise<BzNotificationChannelPreferenceEntity>;
|
|
13
|
+
show(params: BusinessParamDto): Promise<BzNotificationChannelPreferenceEntity>;
|
|
14
|
+
activate(params: BusinessParamDto): Promise<BzNotificationChannelPreferenceEntity>;
|
|
15
|
+
deactivate(params: BusinessParamDto): Promise<BzNotificationChannelPreferenceEntity>;
|
|
16
|
+
handleStatus(status: boolean, id: number): Promise<BzNotificationChannelPreferenceEntity>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.BusinessNotificationChannelPreferenceController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
18
|
+
const add_notification_channel_preference_dto_1 = require("../dtos/add.notification.channel.preference.dto");
|
|
19
|
+
const business_param_dto_1 = require("../dtos/business.param.dto");
|
|
20
|
+
const business_user_notification_preference_list_filter_dto_1 = require("../dtos/business.user.notification.preference.list.filter.dto");
|
|
21
|
+
const bz_notification_channel_preference_entity_1 = require("../entities/bz.notification.channel.preference.entity");
|
|
22
|
+
const business_notification_channel_preference_list_1 = require("../libraries/business.notification.channel.preference.list");
|
|
23
|
+
const access_business_service_1 = require("../services/access.business.service");
|
|
24
|
+
const listing_service_1 = require("../services/listing.service");
|
|
25
|
+
let BusinessNotificationChannelPreferenceController = class BusinessNotificationChannelPreferenceController {
|
|
26
|
+
constructor(accessBusinessService, listingService) {
|
|
27
|
+
this.accessBusinessService = accessBusinessService;
|
|
28
|
+
this.listingService = listingService;
|
|
29
|
+
}
|
|
30
|
+
async search(body) {
|
|
31
|
+
const business = await this.accessBusinessService.validateAccess();
|
|
32
|
+
return new business_notification_channel_preference_list_1.ProcessBusinessNotificationChannelPreferenceList(business, this.listingService).process(body);
|
|
33
|
+
}
|
|
34
|
+
async create(body) {
|
|
35
|
+
const business = await this.accessBusinessService.validateAccess();
|
|
36
|
+
let r = bz_notification_channel_preference_entity_1.BzNotificationChannelPreferenceEntity.create({ business_id: business.id });
|
|
37
|
+
if (body?.id)
|
|
38
|
+
r = await bz_notification_channel_preference_entity_1.BzNotificationChannelPreferenceEntity.first(body?.id);
|
|
39
|
+
r.user_id = body.user_id;
|
|
40
|
+
r.channel_id = body.channel_id;
|
|
41
|
+
r.active = true;
|
|
42
|
+
return r.save();
|
|
43
|
+
}
|
|
44
|
+
async show(params) {
|
|
45
|
+
const business = await this.accessBusinessService.validateAccess();
|
|
46
|
+
const data = await bz_notification_channel_preference_entity_1.BzNotificationChannelPreferenceEntity.findOne({
|
|
47
|
+
where: { business_id: business.id, id: params.id },
|
|
48
|
+
relations: ['user', 'channel'],
|
|
49
|
+
});
|
|
50
|
+
if (!data)
|
|
51
|
+
throw new nestjs_utility_services_1.OperationException('Invalid ID');
|
|
52
|
+
return data;
|
|
53
|
+
}
|
|
54
|
+
async activate(params) {
|
|
55
|
+
return this.handleStatus(true, params.id);
|
|
56
|
+
}
|
|
57
|
+
async deactivate(params) {
|
|
58
|
+
return this.handleStatus(false, params.id);
|
|
59
|
+
}
|
|
60
|
+
async handleStatus(status, id) {
|
|
61
|
+
const business = await this.accessBusinessService.validateAccess();
|
|
62
|
+
const r = await bz_notification_channel_preference_entity_1.BzNotificationChannelPreferenceEntity.first(id);
|
|
63
|
+
if (r?.business_id !== business.id)
|
|
64
|
+
throw new nestjs_utility_services_1.AccessException();
|
|
65
|
+
if (status === r.active)
|
|
66
|
+
throw new nestjs_utility_services_1.OperationException(`Invalid Operation`);
|
|
67
|
+
r.active = status;
|
|
68
|
+
return r.save();
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
exports.BusinessNotificationChannelPreferenceController = BusinessNotificationChannelPreferenceController;
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, common_1.Post)('search'),
|
|
74
|
+
__param(0, (0, common_1.Body)()),
|
|
75
|
+
__metadata("design:type", Function),
|
|
76
|
+
__metadata("design:paramtypes", [business_user_notification_preference_list_filter_dto_1.BusinessUserNotificationPreferenceListFilterDto]),
|
|
77
|
+
__metadata("design:returntype", Promise)
|
|
78
|
+
], BusinessNotificationChannelPreferenceController.prototype, "search", null);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, common_1.Post)(),
|
|
81
|
+
__param(0, (0, common_1.Body)()),
|
|
82
|
+
__metadata("design:type", Function),
|
|
83
|
+
__metadata("design:paramtypes", [add_notification_channel_preference_dto_1.AddNotificationChannelPreferenceDto]),
|
|
84
|
+
__metadata("design:returntype", Promise)
|
|
85
|
+
], BusinessNotificationChannelPreferenceController.prototype, "create", null);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, common_1.Get)(':id'),
|
|
88
|
+
__param(0, (0, common_1.Param)()),
|
|
89
|
+
__metadata("design:type", Function),
|
|
90
|
+
__metadata("design:paramtypes", [business_param_dto_1.BusinessParamDto]),
|
|
91
|
+
__metadata("design:returntype", Promise)
|
|
92
|
+
], BusinessNotificationChannelPreferenceController.prototype, "show", null);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, common_1.Post)(':id/activate'),
|
|
95
|
+
__param(0, (0, common_1.Param)()),
|
|
96
|
+
__metadata("design:type", Function),
|
|
97
|
+
__metadata("design:paramtypes", [business_param_dto_1.BusinessParamDto]),
|
|
98
|
+
__metadata("design:returntype", Promise)
|
|
99
|
+
], BusinessNotificationChannelPreferenceController.prototype, "activate", null);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, common_1.Post)(':id/deactivate'),
|
|
102
|
+
__param(0, (0, common_1.Param)()),
|
|
103
|
+
__metadata("design:type", Function),
|
|
104
|
+
__metadata("design:paramtypes", [business_param_dto_1.BusinessParamDto]),
|
|
105
|
+
__metadata("design:returntype", Promise)
|
|
106
|
+
], BusinessNotificationChannelPreferenceController.prototype, "deactivate", null);
|
|
107
|
+
exports.BusinessNotificationChannelPreferenceController = BusinessNotificationChannelPreferenceController = __decorate([
|
|
108
|
+
(0, common_1.Controller)('api/b/notification-channel'),
|
|
109
|
+
__metadata("design:paramtypes", [access_business_service_1.AccessBusinessService,
|
|
110
|
+
listing_service_1.ListingService])
|
|
111
|
+
], BusinessNotificationChannelPreferenceController);
|
|
112
|
+
//# sourceMappingURL=business.notification.channel.preference.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"business.notification.channel.preference.controller.js","sourceRoot":"","sources":["../../../src/access/controllers/business.notification.channel.preference.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoE;AACpE,oFAA6F;AAC7F,6GAAsG;AACtG,mEAA8D;AAC9D,yIAAgI;AAChI,qHAA8G;AAC9G,8HAA8H;AAC9H,iFAA4E;AAC5E,iEAA6D;AAQtD,IAAM,+CAA+C,GAArD,MAAM,+CAA+C;IACxD,YACqB,qBAA4C,EAC5C,cAA8B;QAD9B,0BAAqB,GAArB,qBAAqB,CAAuB;QAC5C,mBAAc,GAAd,cAAc,CAAgB;IAChD,CAAC;IAGE,AAAN,KAAK,CAAC,MAAM,CAAS,IAAqD;QACtE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC;QACnE,OAAO,IAAI,gGAAgD,CAAC,QAAQ,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7G,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAS,IAAyC;QAC1D,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAA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M,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC;QACnE,MAAM,CAAC,GAAG,MAAM,iFAAqC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAEhE,IAAI,CAAC,EAAE,WAAW,KAAK,QAAQ,CAAC,EAAE;YAAE,MAAM,IAAI,yCAAe,EAAE,CAAC;QAChE,IAAI,MAAM,KAAK,CAAC,CAAC,MAAM;YAAE,MAAM,IAAI,4CAAkB,CAAC,mBAAmB,CAAC,CAAC;QAE3E,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC;QAClB,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;IACpB,CAAC;CACJ,CAAA;AA5DY,0GAA+C;AAOlD;IADL,IAAA,aAAI,EAAC,QAAQ,CAAC;IACD,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,uGAA+C;;6EAGzE;AAGK;IADL,IAAA,aAAI,GAAE;IACO,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,6EAAmC;;6EAW7D;AAGK;IADL,IAAA,YAAG,EAAC,KAAK,CAAC;IACC,WAAA,IAAA,cAAK,GAAE,CAAA;;qCAAS,qCAAgB;;2EAW3C;AAGK;IADL,IAAA,aAAI,EAAC,cAAc,CAAC;IACL,WAAA,IAAA,cAAK,GAAE,CAAA;;qCAAS,qCAAgB;;+EAE/C;AAGK;IADL,IAAA,aAAI,EAAC,gBAAgB,CAAC;IACL,WAAA,IAAA,cAAK,GAAE,CAAA;;qCAAS,qCAAgB;;iFAEjD;0DAhDQ,+CAA+C;IAD3D,IAAA,mBAAU,EAAC,4BAA4B,CAAC;qCAGO,+CAAqB;QAC5B,gCAAc;GAH1C,+CAA+C,CA4D3D"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SqlService } from '@servicelabsco/nestjs-utility-services';
|
|
2
|
+
import { AddBusinessUserNotificationPreferenceDto } from '../dtos/add.business.user.notification.preference.dto';
|
|
3
|
+
import { BusinessParamDto } from '../dtos/business.param.dto';
|
|
4
|
+
import { BusinessUserNotificationPreferenceListFilterDto } from '../dtos/business.user.notification.preference.list.filter.dto';
|
|
5
|
+
import { DbFindDto } from '../dtos/db.find.dto';
|
|
6
|
+
import { BusinessUserNotificationPreferenceEntity } from '../entities/business.user.notification.preference.entity';
|
|
7
|
+
import { AccessBusinessService } from '../services/access.business.service';
|
|
8
|
+
import { ListingService } from '../services/listing.service';
|
|
9
|
+
export declare class BusinessUserNotificationPreferenceController {
|
|
10
|
+
private readonly accessBusinessService;
|
|
11
|
+
private readonly listingService;
|
|
12
|
+
private readonly sqlService;
|
|
13
|
+
constructor(accessBusinessService: AccessBusinessService, listingService: ListingService, sqlService: SqlService);
|
|
14
|
+
search(body: BusinessUserNotificationPreferenceListFilterDto): Promise<import("..").ListResponseDto>;
|
|
15
|
+
create(body: AddBusinessUserNotificationPreferenceDto): Promise<BusinessUserNotificationPreferenceEntity>;
|
|
16
|
+
findNotifications(body: DbFindDto): Promise<any>;
|
|
17
|
+
show(params: BusinessParamDto): Promise<BusinessUserNotificationPreferenceEntity>;
|
|
18
|
+
activate(params: BusinessParamDto): Promise<BusinessUserNotificationPreferenceEntity>;
|
|
19
|
+
deactivate(params: BusinessParamDto): Promise<BusinessUserNotificationPreferenceEntity>;
|
|
20
|
+
handleStatus(status: boolean, id: number): Promise<BusinessUserNotificationPreferenceEntity>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.BusinessUserNotificationPreferenceController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
18
|
+
const add_business_user_notification_preference_dto_1 = require("../dtos/add.business.user.notification.preference.dto");
|
|
19
|
+
const business_param_dto_1 = require("../dtos/business.param.dto");
|
|
20
|
+
const business_user_notification_preference_list_filter_dto_1 = require("../dtos/business.user.notification.preference.list.filter.dto");
|
|
21
|
+
const db_find_dto_1 = require("../dtos/db.find.dto");
|
|
22
|
+
const business_user_notification_preference_entity_1 = require("../entities/business.user.notification.preference.entity");
|
|
23
|
+
const business_user_notification_preference_list_1 = require("../libraries/business.user.notification.preference.list");
|
|
24
|
+
const process_db_find_1 = require("../libraries/process.db.find");
|
|
25
|
+
const access_business_service_1 = require("../services/access.business.service");
|
|
26
|
+
const listing_service_1 = require("../services/listing.service");
|
|
27
|
+
let BusinessUserNotificationPreferenceController = class BusinessUserNotificationPreferenceController {
|
|
28
|
+
constructor(accessBusinessService, listingService, sqlService) {
|
|
29
|
+
this.accessBusinessService = accessBusinessService;
|
|
30
|
+
this.listingService = listingService;
|
|
31
|
+
this.sqlService = sqlService;
|
|
32
|
+
}
|
|
33
|
+
async search(body) {
|
|
34
|
+
const business = await this.accessBusinessService.validateAccess();
|
|
35
|
+
return new business_user_notification_preference_list_1.ProcessBusinessUserNotificationPreferenceList(business, this.listingService).process(body);
|
|
36
|
+
}
|
|
37
|
+
async create(body) {
|
|
38
|
+
const business = await this.accessBusinessService.validateAccess();
|
|
39
|
+
let r = business_user_notification_preference_entity_1.BusinessUserNotificationPreferenceEntity.create({ business_id: business.id });
|
|
40
|
+
if (body?.id)
|
|
41
|
+
r = await business_user_notification_preference_entity_1.BusinessUserNotificationPreferenceEntity.first(body?.id);
|
|
42
|
+
r.user_id = body.user_id;
|
|
43
|
+
r.channel_id = body.channel_id;
|
|
44
|
+
r.notification_id = body?.notification_id;
|
|
45
|
+
r.active = true;
|
|
46
|
+
return r.save();
|
|
47
|
+
}
|
|
48
|
+
async findNotifications(body) {
|
|
49
|
+
const business = await this.accessBusinessService.validateAccess();
|
|
50
|
+
const config = {
|
|
51
|
+
primaryCondition: `a.deleted_at is null`,
|
|
52
|
+
tableName: 'utl_notification_details a',
|
|
53
|
+
columns: ['a.id', 'b.name', 'a.identifier', 'b.active'],
|
|
54
|
+
idsCompareKey: 'a.id',
|
|
55
|
+
searchCompareKeys: ['b.name'],
|
|
56
|
+
statusCompareKeys: ['a.active', 'b.active'],
|
|
57
|
+
order: 'a.id desc',
|
|
58
|
+
...body,
|
|
59
|
+
};
|
|
60
|
+
return new process_db_find_1.ProcessDbFind(this.sqlService).process(config);
|
|
61
|
+
}
|
|
62
|
+
async show(params) {
|
|
63
|
+
const business = await this.accessBusinessService.validateAccess();
|
|
64
|
+
const data = await business_user_notification_preference_entity_1.BusinessUserNotificationPreferenceEntity.findOne({
|
|
65
|
+
where: { business_id: business.id, id: params.id },
|
|
66
|
+
relations: ['user', 'channel'],
|
|
67
|
+
});
|
|
68
|
+
if (!data)
|
|
69
|
+
throw new nestjs_utility_services_1.OperationException('Invalid ID');
|
|
70
|
+
return data;
|
|
71
|
+
}
|
|
72
|
+
async activate(params) {
|
|
73
|
+
return this.handleStatus(true, params.id);
|
|
74
|
+
}
|
|
75
|
+
async deactivate(params) {
|
|
76
|
+
return this.handleStatus(false, params.id);
|
|
77
|
+
}
|
|
78
|
+
async handleStatus(status, id) {
|
|
79
|
+
const business = await this.accessBusinessService.validateAccess();
|
|
80
|
+
const r = await business_user_notification_preference_entity_1.BusinessUserNotificationPreferenceEntity.first(id);
|
|
81
|
+
if (r?.business_id !== business.id)
|
|
82
|
+
throw new nestjs_utility_services_1.AccessException();
|
|
83
|
+
if (status === r.active)
|
|
84
|
+
throw new nestjs_utility_services_1.OperationException(`Invalid Operation`);
|
|
85
|
+
r.active = status;
|
|
86
|
+
return r.save();
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
exports.BusinessUserNotificationPreferenceController = BusinessUserNotificationPreferenceController;
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, common_1.Post)('search'),
|
|
92
|
+
__param(0, (0, common_1.Body)()),
|
|
93
|
+
__metadata("design:type", Function),
|
|
94
|
+
__metadata("design:paramtypes", [business_user_notification_preference_list_filter_dto_1.BusinessUserNotificationPreferenceListFilterDto]),
|
|
95
|
+
__metadata("design:returntype", Promise)
|
|
96
|
+
], BusinessUserNotificationPreferenceController.prototype, "search", null);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, common_1.Post)(),
|
|
99
|
+
__param(0, (0, common_1.Body)()),
|
|
100
|
+
__metadata("design:type", Function),
|
|
101
|
+
__metadata("design:paramtypes", [add_business_user_notification_preference_dto_1.AddBusinessUserNotificationPreferenceDto]),
|
|
102
|
+
__metadata("design:returntype", Promise)
|
|
103
|
+
], BusinessUserNotificationPreferenceController.prototype, "create", null);
|
|
104
|
+
__decorate([
|
|
105
|
+
(0, common_1.Post)('find-notifications'),
|
|
106
|
+
__param(0, (0, common_1.Body)()),
|
|
107
|
+
__metadata("design:type", Function),
|
|
108
|
+
__metadata("design:paramtypes", [db_find_dto_1.DbFindDto]),
|
|
109
|
+
__metadata("design:returntype", Promise)
|
|
110
|
+
], BusinessUserNotificationPreferenceController.prototype, "findNotifications", null);
|
|
111
|
+
__decorate([
|
|
112
|
+
(0, common_1.Get)(':id'),
|
|
113
|
+
__param(0, (0, common_1.Param)()),
|
|
114
|
+
__metadata("design:type", Function),
|
|
115
|
+
__metadata("design:paramtypes", [business_param_dto_1.BusinessParamDto]),
|
|
116
|
+
__metadata("design:returntype", Promise)
|
|
117
|
+
], BusinessUserNotificationPreferenceController.prototype, "show", null);
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, common_1.Post)(':id/activate'),
|
|
120
|
+
__param(0, (0, common_1.Param)()),
|
|
121
|
+
__metadata("design:type", Function),
|
|
122
|
+
__metadata("design:paramtypes", [business_param_dto_1.BusinessParamDto]),
|
|
123
|
+
__metadata("design:returntype", Promise)
|
|
124
|
+
], BusinessUserNotificationPreferenceController.prototype, "activate", null);
|
|
125
|
+
__decorate([
|
|
126
|
+
(0, common_1.Post)(':id/deactivate'),
|
|
127
|
+
__param(0, (0, common_1.Param)()),
|
|
128
|
+
__metadata("design:type", Function),
|
|
129
|
+
__metadata("design:paramtypes", [business_param_dto_1.BusinessParamDto]),
|
|
130
|
+
__metadata("design:returntype", Promise)
|
|
131
|
+
], BusinessUserNotificationPreferenceController.prototype, "deactivate", null);
|
|
132
|
+
exports.BusinessUserNotificationPreferenceController = BusinessUserNotificationPreferenceController = __decorate([
|
|
133
|
+
(0, common_1.Controller)('api/b/user-notification'),
|
|
134
|
+
__metadata("design:paramtypes", [access_business_service_1.AccessBusinessService,
|
|
135
|
+
listing_service_1.ListingService,
|
|
136
|
+
nestjs_utility_services_1.SqlService])
|
|
137
|
+
], BusinessUserNotificationPreferenceController);
|
|
138
|
+
//# sourceMappingURL=business.user.notification.preference.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"business.user.notification.preference.controller.js","sourceRoot":"","sources":["../../../src/access/controllers/business.user.notification.preference.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoE;AACpE,oFAAyG;AACzG,yHAAiH;AACjH,mEAA8D;AAC9D,yIAAgI;AAChI,qDAAgD;AAEhD,2HAAoH;AACpH,wHAAwH;AACxH,kEAA6D;AAC7D,iF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CAAC;QACnE,MAAM,CAAC,GAAG,MAAM,uFAAwC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAEnE,IAAI,CAAC,EAAE,WAAW,KAAK,QAAQ,CAAC,EAAE;YAAE,MAAM,IAAI,yCAAe,EAAE,CAAC;QAChE,IAAI,MAAM,KAAK,CAAC,CAAC,MAAM;YAAE,MAAM,IAAI,4CAAkB,CAAC,mBAAmB,CAAC,CAAC;QAE3E,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC;QAClB,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;IACpB,CAAC;CACJ,CAAA;AAhFY,oGAA4C;AAQ/C;IADL,IAAA,aAAI,EAAC,QAAQ,CAAC;IACD,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,uGAA+C;;0EAGzE;AAGK;IADL,IAAA,aAAI,GAAE;IACO,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,wFAAwC;;0EAYlE;AAGK;IADL,IAAA,aAAI,EAAC,oBAAoB,CAAC;IACF,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,uBAAS;;qFAe9C;AAGK;IADL,IAAA,YAAG,EAAC,KAAK,CAAC;IACC,WAAA,IAAA,cAAK,GAAE,CAAA;;qCAAS,qCAAgB;;wEAW3C;AAGK;IADL,IAAA,aAAI,EAAC,cAAc,CAAC;IACL,WAAA,IAAA,cAAK,GAAE,CAAA;;qCAAS,qCAAgB;;4EAE/C;AAGK;IADL,IAAA,aAAI,EAAC,gBAAgB,CAAC;IACL,WAAA,IAAA,cAAK,GAAE,CAAA;;qCAAS,qCAAgB;;8EAEjD;uDApEQ,4CAA4C;IADxD,IAAA,mBAAU,EAAC,yBAAyB,CAAC;qCAGU,+CAAqB;QAC5B,gCAAc;QAClB,oCAAU;GAJlC,4CAA4C,CAgFxD"}
|
|
@@ -3,8 +3,10 @@ export * from './api.account.controller';
|
|
|
3
3
|
export * from './bulk.upload.controller';
|
|
4
4
|
export * from './bulk.upload.item.controller';
|
|
5
5
|
export * from './business.app.integration.controller';
|
|
6
|
+
export * from './business.notification.channel.preference.controller';
|
|
6
7
|
export * from './business.preference.controller';
|
|
7
8
|
export * from './business.user.group.controller';
|
|
9
|
+
export * from './business.user.notification.preference.controller';
|
|
8
10
|
export * from './choice.list.controller';
|
|
9
11
|
export * from './choice.type.controller';
|
|
10
12
|
export * from './common.webhook.controller';
|
|
@@ -19,8 +19,10 @@ __exportStar(require("./api.account.controller"), exports);
|
|
|
19
19
|
__exportStar(require("./bulk.upload.controller"), exports);
|
|
20
20
|
__exportStar(require("./bulk.upload.item.controller"), exports);
|
|
21
21
|
__exportStar(require("./business.app.integration.controller"), exports);
|
|
22
|
+
__exportStar(require("./business.notification.channel.preference.controller"), exports);
|
|
22
23
|
__exportStar(require("./business.preference.controller"), exports);
|
|
23
24
|
__exportStar(require("./business.user.group.controller"), exports);
|
|
25
|
+
__exportStar(require("./business.user.notification.preference.controller"), exports);
|
|
24
26
|
__exportStar(require("./choice.list.controller"), exports);
|
|
25
27
|
__exportStar(require("./choice.type.controller"), exports);
|
|
26
28
|
__exportStar(require("./common.webhook.controller"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/access/controllers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AAAA,2DAAyC;AAAA,2DAAyC;AAAA,gEAA8C;AAAA,wEAAsD;AAAA,mEAAiD;AAAA,mEAAiD;AAAA,2DAAyC;AAAA,2DAAyC;AAAA,8DAA4C;AAAA,4DAA0C;AAAA,iEAA+C;AAAA,mEAAiD;AAAA,yDAAuC;AAAA,gEAA8C;AAAA,8DAA4C;AAAA,4DAA0C;AAAA,yDAAuC;AAAA,4DAA0C;AAAA,0DAAwC;AAAA,uDAAqC;AAAA,kEAAgD;AAAA,gEAA8C;AAAA,qEAAmD;AAAA,mDAAiC;AAAA,iEAA+C;AAAA,+DAA4C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/access/controllers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AAAA,2DAAyC;AAAA,2DAAyC;AAAA,gEAA8C;AAAA,wEAAsD;AAAA,wFAAsE;AAAA,mEAAiD;AAAA,mEAAiD;AAAA,qFAAmE;AAAA,2DAAyC;AAAA,2DAAyC;AAAA,8DAA4C;AAAA,4DAA0C;AAAA,iEAA+C;AAAA,mEAAiD;AAAA,yDAAuC;AAAA,gEAA8C;AAAA,8DAA4C;AAAA,4DAA0C;AAAA,yDAAuC;AAAA,4DAA0C;AAAA,0DAAwC;AAAA,uDAAqC;AAAA,kEAAgD;AAAA,gEAA8C;AAAA,qEAAmD;AAAA,mDAAiC;AAAA,iEAA+C;AAAA,+DAA4C"}
|
|
@@ -0,0 +1,43 @@
|
|
|
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.AddBusinessUserNotificationPreferenceDto = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const notification_channel_type_enum_1 = require("../enums/notification.channel.type.enum");
|
|
16
|
+
class AddBusinessUserNotificationPreferenceDto {
|
|
17
|
+
}
|
|
18
|
+
exports.AddBusinessUserNotificationPreferenceDto = AddBusinessUserNotificationPreferenceDto;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_transformer_1.Expose)(),
|
|
21
|
+
(0, class_validator_1.IsOptional)(),
|
|
22
|
+
(0, class_validator_1.IsNumber)(),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], AddBusinessUserNotificationPreferenceDto.prototype, "id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_transformer_1.Expose)(),
|
|
27
|
+
(0, class_validator_1.IsNumber)(),
|
|
28
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], AddBusinessUserNotificationPreferenceDto.prototype, "user_id", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_transformer_1.Expose)(),
|
|
33
|
+
(0, class_validator_1.IsEnum)(notification_channel_type_enum_1.NotificationChannelTypeEnum),
|
|
34
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], AddBusinessUserNotificationPreferenceDto.prototype, "channel_id", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_transformer_1.Expose)(),
|
|
39
|
+
(0, class_validator_1.IsNumber)(),
|
|
40
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
41
|
+
__metadata("design:type", Number)
|
|
42
|
+
], AddBusinessUserNotificationPreferenceDto.prototype, "notification_id", void 0);
|
|
43
|
+
//# sourceMappingURL=add.business.user.notification.preference.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.business.user.notification.preference.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/add.business.user.notification.preference.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA2C;AAC3C,qDAA2E;AAC3E,4FAAsF;AAEtF,MAAa,wCAAwC;CAoBpD;AApBD,4FAoBC;AAhBG;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;oEACC;AAKZ;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;yEACG;AAKhB;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAM,EAAC,4DAA2B,CAAC;IACnC,IAAA,4BAAU,GAAE;;4EACM;AAKnB;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;iFACY"}
|
|
@@ -0,0 +1,43 @@
|
|
|
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.AddNotificationChannelPreferenceDto = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const notification_channel_type_enum_1 = require("../enums/notification.channel.type.enum");
|
|
16
|
+
class AddNotificationChannelPreferenceDto {
|
|
17
|
+
}
|
|
18
|
+
exports.AddNotificationChannelPreferenceDto = AddNotificationChannelPreferenceDto;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_transformer_1.Expose)(),
|
|
21
|
+
(0, class_validator_1.IsNumber)(),
|
|
22
|
+
(0, class_validator_1.IsOptional)(),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], AddNotificationChannelPreferenceDto.prototype, "id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_transformer_1.Expose)(),
|
|
27
|
+
(0, class_validator_1.IsNumber)(),
|
|
28
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], AddNotificationChannelPreferenceDto.prototype, "user_id", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_transformer_1.Expose)(),
|
|
33
|
+
(0, class_validator_1.IsEnum)(notification_channel_type_enum_1.NotificationChannelTypeEnum),
|
|
34
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], AddNotificationChannelPreferenceDto.prototype, "channel_id", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_transformer_1.Expose)(),
|
|
39
|
+
(0, class_validator_1.IsNumber)(),
|
|
40
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
41
|
+
__metadata("design:type", Number)
|
|
42
|
+
], AddNotificationChannelPreferenceDto.prototype, "notification_id", void 0);
|
|
43
|
+
//# sourceMappingURL=add.notification.channel.preference.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.notification.channel.preference.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/add.notification.channel.preference.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA2C;AAC3C,qDAA2E;AAC3E,4FAAsF;AAEtF,MAAa,mCAAmC;CAoB/C;AApBD,kFAoBC;AAhBG;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+DACD;AAKZ;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;oEACG;AAKhB;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,wBAAM,EAAC,4DAA2B,CAAC;IACnC,IAAA,4BAAU,GAAE;;uEACM;AAKnB;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;4EACW"}
|
|
@@ -0,0 +1,25 @@
|
|
|
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.BusinessNotificationChannelPreferenceListFilterDto = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const common_list_filter_dto_1 = require("./common.list.filter.dto");
|
|
16
|
+
class BusinessNotificationChannelPreferenceListFilterDto extends common_list_filter_dto_1.CommonListFilterDto {
|
|
17
|
+
}
|
|
18
|
+
exports.BusinessNotificationChannelPreferenceListFilterDto = BusinessNotificationChannelPreferenceListFilterDto;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_transformer_1.Expose)(),
|
|
21
|
+
(0, class_validator_1.IsNumber)(),
|
|
22
|
+
(0, class_validator_1.IsOptional)(),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], BusinessNotificationChannelPreferenceListFilterDto.prototype, "channel_id", void 0);
|
|
25
|
+
//# sourceMappingURL=business.notification.channel.preference.list.filter.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"business.notification.channel.preference.list.filter.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/business.notification.channel.preference.list.filter.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA2C;AAC3C,qDAAuD;AACvD,qEAA+D;AAE/D,MAAa,kDAAmD,SAAQ,4CAAmB;CAK1F;AALD,gHAKC;AADG;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;sFACO"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BusinessUserNotificationPreferenceAttributesDto = void 0;
|
|
4
|
+
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
5
|
+
class BusinessUserNotificationPreferenceAttributesDto extends nestjs_utility_services_1.CommonAttributesDto {
|
|
6
|
+
}
|
|
7
|
+
exports.BusinessUserNotificationPreferenceAttributesDto = BusinessUserNotificationPreferenceAttributesDto;
|
|
8
|
+
//# sourceMappingURL=business.user.notification.preference.attributes.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"business.user.notification.preference.attributes.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/business.user.notification.preference.attributes.dto.ts"],"names":[],"mappings":";;;AAAA,oFAA6E;AAC7E,MAAa,+CAAgD,SAAQ,6CAAmB;CAAG;AAA3F,0GAA2F"}
|
|
@@ -0,0 +1,31 @@
|
|
|
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.BusinessUserNotificationPreferenceListFilterDto = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const common_list_filter_dto_1 = require("./common.list.filter.dto");
|
|
16
|
+
class BusinessUserNotificationPreferenceListFilterDto extends common_list_filter_dto_1.CommonListFilterDto {
|
|
17
|
+
}
|
|
18
|
+
exports.BusinessUserNotificationPreferenceListFilterDto = BusinessUserNotificationPreferenceListFilterDto;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_transformer_1.Expose)(),
|
|
21
|
+
(0, class_validator_1.IsNumber)(),
|
|
22
|
+
(0, class_validator_1.IsOptional)(),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], BusinessUserNotificationPreferenceListFilterDto.prototype, "channel_id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_transformer_1.Expose)(),
|
|
27
|
+
(0, class_validator_1.IsNumber)(),
|
|
28
|
+
(0, class_validator_1.IsOptional)(),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], BusinessUserNotificationPreferenceListFilterDto.prototype, "notification_id", void 0);
|
|
31
|
+
//# sourceMappingURL=business.user.notification.preference.list.filter.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"business.user.notification.preference.list.filter.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/business.user.notification.preference.list.filter.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA2C;AAC3C,qDAAuD;AACvD,qEAA+D;AAE/D,MAAa,+CAAgD,SAAQ,4CAAmB;CAUvF;AAVD,0GAUC;AANG;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;mFACO;AAKpB;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;wFACY"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BzNotificationChannelPreferenceAttributesDto = void 0;
|
|
4
|
+
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
5
|
+
class BzNotificationChannelPreferenceAttributesDto extends nestjs_utility_services_1.CommonAttributesDto {
|
|
6
|
+
}
|
|
7
|
+
exports.BzNotificationChannelPreferenceAttributesDto = BzNotificationChannelPreferenceAttributesDto;
|
|
8
|
+
//# sourceMappingURL=bz.notification.channel.preference.attributes.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bz.notification.channel.preference.attributes.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/bz.notification.channel.preference.attributes.dto.ts"],"names":[],"mappings":";;;AAAA,oFAA6E;AAC7E,MAAa,4CAA6C,SAAQ,6CAAmB;CAAG;AAAxF,oGAAwF"}
|
|
@@ -3,6 +3,7 @@ export * from './add.api.account.dto';
|
|
|
3
3
|
export * from './add.business.app.integration.dto';
|
|
4
4
|
export * from './add.business.preference.dto';
|
|
5
5
|
export * from './add.business.user.group.dto';
|
|
6
|
+
export * from './add.business.user.notification.preference.dto';
|
|
6
7
|
export * from './add.choice.list.dto';
|
|
7
8
|
export * from './add.choice.type.dto';
|
|
8
9
|
export * from './add.conversation.dto';
|
|
@@ -11,6 +12,7 @@ export * from './add.dashboard.component.dto';
|
|
|
11
12
|
export * from './add.dashboard.component.properties.dto';
|
|
12
13
|
export * from './add.group.member.dto';
|
|
13
14
|
export * from './add.listing.preference.dto';
|
|
15
|
+
export * from './add.notification.channel.preference.dto';
|
|
14
16
|
export * from './add.role.dto';
|
|
15
17
|
export * from './add.scheduled.report.dto';
|
|
16
18
|
export * from './add.short.url.dto';
|
|
@@ -28,12 +30,16 @@ export * from './business.app.integration.message.payload.dto';
|
|
|
28
30
|
export * from './business.app.integration.messages.attributes.dto';
|
|
29
31
|
export * from './business.email.attributes.dto';
|
|
30
32
|
export * from './business.menu.attributes.dto';
|
|
33
|
+
export * from './business.notification.channel.preference.list.filter.dto';
|
|
31
34
|
export * from './business.param.dto';
|
|
32
35
|
export * from './business.preference.attributes.dto';
|
|
33
36
|
export * from './business.user.attributes.dto';
|
|
34
37
|
export * from './business.user.group.attributes.dto';
|
|
35
38
|
export * from './business.user.group.list.filter.dto';
|
|
39
|
+
export * from './business.user.notification.preference.attributes.dto';
|
|
40
|
+
export * from './business.user.notification.preference.list.filter.dto';
|
|
36
41
|
export * from './business.user.role.attributes.dto';
|
|
42
|
+
export * from './bz.notification.channel.preference.attributes.dto';
|
|
37
43
|
export * from './child.menu.attributes.dto';
|
|
38
44
|
export * from './choice.list.attributes.dto';
|
|
39
45
|
export * from './choice.type.attributes.dto';
|