@servicelabsco/slabs-access-manager 0.1.31 → 0.1.33
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.preference.controller.d.ts +11 -0
- package/dist/access/controllers/business.preference.controller.js +66 -0
- package/dist/access/controllers/business.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/controllers/user.preference.controller.d.ts +11 -0
- package/dist/access/controllers/user.preference.controller.js +77 -0
- package/dist/access/controllers/user.preference.controller.js.map +1 -0
- package/dist/access/dtos/add.business.preference.dto.d.ts +3 -0
- package/dist/access/dtos/add.business.preference.dto.js +24 -0
- package/dist/access/dtos/add.business.preference.dto.js.map +1 -0
- package/dist/access/dtos/add.user.preference.dto.d.ts +3 -0
- package/dist/access/dtos/add.user.preference.dto.js +24 -0
- package/dist/access/dtos/add.user.preference.dto.js.map +1 -0
- package/dist/access/dtos/business.preference.attributes.dto.d.ts +3 -0
- package/dist/access/dtos/business.preference.attributes.dto.js +8 -0
- package/dist/access/dtos/business.preference.attributes.dto.js.map +1 -0
- package/dist/access/dtos/index.d.ts +4 -0
- package/dist/access/dtos/index.js +4 -0
- package/dist/access/dtos/index.js.map +1 -1
- package/dist/access/dtos/user.preference.attributes.dto.d.ts +3 -0
- package/dist/access/dtos/user.preference.attributes.dto.js +8 -0
- package/dist/access/dtos/user.preference.attributes.dto.js.map +1 -0
- package/dist/access/entities/business.group.role.entity.d.ts +10 -0
- package/dist/access/entities/business.group.role.entity.js +45 -0
- package/dist/access/entities/business.group.role.entity.js.map +1 -0
- package/dist/access/entities/business.preference.entity.d.ts +10 -0
- package/dist/access/entities/business.preference.entity.js +44 -0
- package/dist/access/entities/business.preference.entity.js.map +1 -0
- package/dist/access/entities/group.member.entity.d.ts +10 -0
- package/dist/access/entities/group.member.entity.js +45 -0
- package/dist/access/entities/group.member.entity.js.map +1 -0
- package/dist/access/entities/index.d.ts +4 -0
- package/dist/access/entities/index.js +4 -0
- package/dist/access/entities/index.js.map +1 -1
- package/dist/access/entities/listing.page.entity.d.ts +1 -0
- package/dist/access/entities/listing.page.entity.js +4 -0
- package/dist/access/entities/listing.page.entity.js.map +1 -1
- package/dist/access/entities/user.preference.entity.d.ts +16 -0
- package/dist/access/entities/user.preference.entity.js +64 -0
- package/dist/access/entities/user.preference.entity.js.map +1 -0
- package/dist/access/es6.classes.d.ts +27 -8
- package/dist/access/es6.classes.js +62 -2
- package/dist/access/es6.classes.js.map +1 -1
- package/dist/access/jobs/business.group.role.job.d.ts +10 -0
- package/dist/access/jobs/business.group.role.job.js +46 -0
- package/dist/access/jobs/business.group.role.job.js.map +1 -0
- package/dist/access/jobs/business.preference.job.d.ts +7 -0
- package/dist/access/jobs/business.preference.job.js +29 -0
- package/dist/access/jobs/business.preference.job.js.map +1 -0
- package/dist/access/jobs/business.user.group.job.d.ts +8 -0
- package/dist/access/jobs/business.user.group.job.js +35 -0
- package/dist/access/jobs/business.user.group.job.js.map +1 -0
- package/dist/access/jobs/group.member.job.d.ts +10 -0
- package/dist/access/jobs/group.member.job.js +46 -0
- package/dist/access/jobs/group.member.job.js.map +1 -0
- package/dist/access/jobs/index.d.ts +5 -0
- package/dist/access/jobs/index.js +5 -0
- package/dist/access/jobs/index.js.map +1 -1
- package/dist/access/jobs/user.preference.job.d.ts +7 -0
- package/dist/access/jobs/user.preference.job.js +29 -0
- package/dist/access/jobs/user.preference.job.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.business.group.role.updation.d.ts +9 -0
- package/dist/access/libraries/process.business.group.role.updation.js +32 -0
- package/dist/access/libraries/process.business.group.role.updation.js.map +1 -0
- package/dist/access/libraries/process.group.member.updation.d.ts +9 -0
- package/dist/access/libraries/process.group.member.updation.js +36 -0
- package/dist/access/libraries/process.group.member.updation.js.map +1 -0
- package/dist/access/libraries/process.preference.data.d.ts +1 -0
- package/dist/access/libraries/process.preference.data.js +15 -0
- package/dist/access/libraries/process.preference.data.js.map +1 -1
- package/dist/access/services/business.preference.service.d.ts +8 -0
- package/dist/access/services/business.preference.service.js +50 -0
- package/dist/access/services/business.preference.service.js.map +1 -0
- package/dist/access/services/es6.jobs.service.d.ts +11 -1
- package/dist/access/services/es6.jobs.service.js +22 -2
- package/dist/access/services/es6.jobs.service.js.map +1 -1
- package/dist/access/services/index.d.ts +2 -0
- package/dist/access/services/index.js +2 -0
- package/dist/access/services/index.js.map +1 -1
- package/dist/access/services/user.preference.service.d.ts +3 -0
- package/dist/access/services/user.preference.service.js +24 -0
- package/dist/access/services/user.preference.service.js.map +1 -0
- package/dist/access/subscribers/business.group.role.subscriber.d.ts +12 -0
- package/dist/access/subscribers/business.group.role.subscriber.js +40 -0
- package/dist/access/subscribers/business.group.role.subscriber.js.map +1 -0
- package/dist/access/subscribers/business.preference.subscriber.d.ts +12 -0
- package/dist/access/subscribers/business.preference.subscriber.js +40 -0
- package/dist/access/subscribers/business.preference.subscriber.js.map +1 -0
- package/dist/access/subscribers/business.user.group.subscriber.d.ts +12 -0
- package/dist/access/subscribers/business.user.group.subscriber.js +40 -0
- package/dist/access/subscribers/business.user.group.subscriber.js.map +1 -0
- package/dist/access/subscribers/group.member.subscriber.d.ts +12 -0
- package/dist/access/subscribers/group.member.subscriber.js +40 -0
- package/dist/access/subscribers/group.member.subscriber.js.map +1 -0
- package/dist/access/subscribers/index.d.ts +5 -0
- package/dist/access/subscribers/index.js +5 -0
- package/dist/access/subscribers/index.js.map +1 -1
- package/dist/access/subscribers/user.preference.subscriber.d.ts +12 -0
- package/dist/access/subscribers/user.preference.subscriber.js +40 -0
- package/dist/access/subscribers/user.preference.subscriber.js.map +1 -0
- package/dist/config/entity.constants.d.ts +8 -0
- package/dist/config/entity.constants.js +8 -0
- package/dist/config/entity.constants.js.map +1 -1
- package/dist/config/source.hash.d.ts +1 -0
- package/dist/config/source.hash.js +1 -0
- package/dist/config/source.hash.js.map +1 -1
- package/dist/migrations/1681409239688-CreateBusinessPreferenceTable.d.ts +5 -0
- package/dist/migrations/1681409239688-CreateBusinessPreferenceTable.js +20 -0
- package/dist/migrations/1681409239688-CreateBusinessPreferenceTable.js.map +1 -0
- package/dist/migrations/1681711912972-CreateBusinessUserGroupTable.d.ts +5 -0
- package/dist/migrations/1681711912972-CreateBusinessUserGroupTable.js +22 -0
- package/dist/migrations/1681711912972-CreateBusinessUserGroupTable.js.map +1 -0
- package/dist/migrations/1681715459620-CreateGroupMemberTable.d.ts +5 -0
- package/dist/migrations/1681715459620-CreateGroupMemberTable.js +19 -0
- package/dist/migrations/1681715459620-CreateGroupMemberTable.js.map +1 -0
- package/dist/migrations/1684947793186-CreateGroupRoleTable.d.ts +5 -0
- package/dist/migrations/1684947793186-CreateGroupRoleTable.js +19 -0
- package/dist/migrations/1684947793186-CreateGroupRoleTable.js.map +1 -0
- package/dist/migrations/1700822457894-CreateUserPreferenceTable.d.ts +5 -0
- package/dist/migrations/1700822457894-CreateUserPreferenceTable.js +23 -0
- package/dist/migrations/1700822457894-CreateUserPreferenceTable.js.map +1 -0
- package/dist/migrations/1703908200320-AddOrderDefinitionUtlListingPagesTable.d.ts +5 -0
- package/dist/migrations/1703908200320-AddOrderDefinitionUtlListingPagesTable.js +15 -0
- package/dist/migrations/1703908200320-AddOrderDefinitionUtlListingPagesTable.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AccessBusinessParamDto } from '../dtos/access.business.param.dto';
|
|
2
|
+
import { AddBusinessPreferenceDto } from '../dtos/add.business.preference.dto';
|
|
3
|
+
import { BusinessPreferenceEntity } from '../entities/business.preference.entity';
|
|
4
|
+
import { AccessBusinessService } from '../services/access.business.service';
|
|
5
|
+
export declare class BusinessPreferenceController {
|
|
6
|
+
private readonly accessBusinessService;
|
|
7
|
+
constructor(accessBusinessService: AccessBusinessService);
|
|
8
|
+
get(): Promise<BusinessPreferenceEntity[]>;
|
|
9
|
+
show(params: AccessBusinessParamDto): Promise<BusinessPreferenceEntity>;
|
|
10
|
+
create(params: AccessBusinessParamDto, body: AddBusinessPreferenceDto): Promise<BusinessPreferenceEntity>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
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.BusinessPreferenceController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const access_business_param_dto_1 = require("../dtos/access.business.param.dto");
|
|
18
|
+
const add_business_preference_dto_1 = require("../dtos/add.business.preference.dto");
|
|
19
|
+
const business_preference_entity_1 = require("../entities/business.preference.entity");
|
|
20
|
+
const access_business_service_1 = require("../services/access.business.service");
|
|
21
|
+
let BusinessPreferenceController = class BusinessPreferenceController {
|
|
22
|
+
constructor(accessBusinessService) {
|
|
23
|
+
this.accessBusinessService = accessBusinessService;
|
|
24
|
+
}
|
|
25
|
+
async get() {
|
|
26
|
+
const business = await this.accessBusinessService.validateAccess();
|
|
27
|
+
return business_preference_entity_1.BusinessPreferenceEntity.find({ where: { business_id: business.id } });
|
|
28
|
+
}
|
|
29
|
+
async show(params) {
|
|
30
|
+
const business = await this.accessBusinessService.validateAccess();
|
|
31
|
+
return business_preference_entity_1.BusinessPreferenceEntity.findOne({ where: { name: params.slug, business_id: business.id } });
|
|
32
|
+
}
|
|
33
|
+
async create(params, body) {
|
|
34
|
+
const business = await this.accessBusinessService.validateAccess();
|
|
35
|
+
const r = await business_preference_entity_1.BusinessPreferenceEntity.firstOrNew({ business_id: business.id, name: params.slug.toLowerCase() });
|
|
36
|
+
r.preference = body.preference;
|
|
37
|
+
return r.save();
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
exports.BusinessPreferenceController = BusinessPreferenceController;
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, common_1.Get)(),
|
|
43
|
+
__metadata("design:type", Function),
|
|
44
|
+
__metadata("design:paramtypes", []),
|
|
45
|
+
__metadata("design:returntype", Promise)
|
|
46
|
+
], BusinessPreferenceController.prototype, "get", null);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, common_1.Get)(':slug'),
|
|
49
|
+
__param(0, (0, common_1.Param)()),
|
|
50
|
+
__metadata("design:type", Function),
|
|
51
|
+
__metadata("design:paramtypes", [access_business_param_dto_1.AccessBusinessParamDto]),
|
|
52
|
+
__metadata("design:returntype", Promise)
|
|
53
|
+
], BusinessPreferenceController.prototype, "show", null);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, common_1.Post)(':slug'),
|
|
56
|
+
__param(0, (0, common_1.Param)()),
|
|
57
|
+
__param(1, (0, common_1.Body)()),
|
|
58
|
+
__metadata("design:type", Function),
|
|
59
|
+
__metadata("design:paramtypes", [access_business_param_dto_1.AccessBusinessParamDto, add_business_preference_dto_1.AddBusinessPreferenceDto]),
|
|
60
|
+
__metadata("design:returntype", Promise)
|
|
61
|
+
], BusinessPreferenceController.prototype, "create", null);
|
|
62
|
+
exports.BusinessPreferenceController = BusinessPreferenceController = __decorate([
|
|
63
|
+
(0, common_1.Controller)('api/b/business-preference'),
|
|
64
|
+
__metadata("design:paramtypes", [access_business_service_1.AccessBusinessService])
|
|
65
|
+
], BusinessPreferenceController);
|
|
66
|
+
//# sourceMappingURL=business.preference.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"business.preference.controller.js","sourceRoot":"","sources":["../../../src/access/controllers/business.preference.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoE;AACpE,iFAA2E;AAC3E,qFAA+E;AAC/E,uFAAkF;AAClF,iFAA4E;AAGrE,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IACrC,YAA6B,qBAA4C;QAA5C,0BAAqB,GAArB,qBAAqB,CAAuB;IAAG,CAAC;IAGvE,AAAN,KAAK,CAAC,GAAG;QACL,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC;QAEnE,OAAO,qDAAwB,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IAClF,CAAC;IAGK,AAAN,KAAK,CAAC,IAAI,CAAU,MAA8B;QAC9C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC;QAEnE,OAAO,qDAAwB,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IACxG,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAU,MAA8B,EAAU,IAA8B;QACxF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC;QAEnE,MAAM,CAAC,GAAG,MAAM,qDAAwB,CAAC,UAAU,CAAC,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QAEnH,CAAC,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QAE/B,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;IACpB,CAAC;CACJ,CAAA;AA3BY,oEAA4B;AAI/B;IADL,IAAA,YAAG,GAAE;;;;uDAKL;AAGK;IADL,IAAA,YAAG,EAAC,OAAO,CAAC;IACD,WAAA,IAAA,cAAK,GAAE,CAAA;;qCAAS,kDAAsB;;wDAIjD;AAGK;IADL,IAAA,aAAI,EAAC,OAAO,CAAC;IACA,WAAA,IAAA,cAAK,GAAE,CAAA;IAAkC,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAA/B,kDAAsB,EAAgB,sDAAwB;;0DAQ3F;uCA1BQ,4BAA4B;IADxC,IAAA,mBAAU,EAAC,2BAA2B,CAAC;qCAEgB,+CAAqB;GADhE,4BAA4B,CA2BxC"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export * from './access.menu.controller';
|
|
2
|
+
export * from './business.preference.controller';
|
|
2
3
|
export * from './dashboard.controller';
|
|
3
4
|
export * from './listing.controller';
|
|
4
5
|
export * from './listing.preference.controller';
|
|
6
|
+
export * from './user.preference.controller';
|
|
@@ -15,7 +15,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./access.menu.controller"), exports);
|
|
18
|
+
__exportStar(require("./business.preference.controller"), exports);
|
|
18
19
|
__exportStar(require("./dashboard.controller"), exports);
|
|
19
20
|
__exportStar(require("./listing.controller"), exports);
|
|
20
21
|
__exportStar(require("./listing.preference.controller"), exports);
|
|
22
|
+
__exportStar(require("./user.preference.controller"), exports);
|
|
21
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/access/controllers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AAAA,yDAAuC;AAAA,uDAAqC;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/access/controllers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AAAA,mEAAiD;AAAA,yDAAuC;AAAA,uDAAqC;AAAA,kEAAgD;AAAA,+DAA4C"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AccessBusinessParamDto } from '../dtos/access.business.param.dto';
|
|
2
|
+
import { AccessBusinessService } from '../services/access.business.service';
|
|
3
|
+
import { UserPreferenceEntity } from '../entities/user.preference.entity';
|
|
4
|
+
import { AddUserPreferenceDto } from '../dtos/add.user.preference.dto';
|
|
5
|
+
export declare class UserPreferenceController {
|
|
6
|
+
private readonly accessBusinessService;
|
|
7
|
+
constructor(accessBusinessService: AccessBusinessService);
|
|
8
|
+
get(): Promise<UserPreferenceEntity[]>;
|
|
9
|
+
show(params: AccessBusinessParamDto): Promise<UserPreferenceEntity>;
|
|
10
|
+
create(params: AccessBusinessParamDto, body: AddUserPreferenceDto): Promise<UserPreferenceEntity>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
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.UserPreferenceController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const access_business_param_dto_1 = require("../dtos/access.business.param.dto");
|
|
18
|
+
const access_business_service_1 = require("../services/access.business.service");
|
|
19
|
+
const user_preference_entity_1 = require("../entities/user.preference.entity");
|
|
20
|
+
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
21
|
+
const add_user_preference_dto_1 = require("../dtos/add.user.preference.dto");
|
|
22
|
+
let UserPreferenceController = class UserPreferenceController {
|
|
23
|
+
constructor(accessBusinessService) {
|
|
24
|
+
this.accessBusinessService = accessBusinessService;
|
|
25
|
+
}
|
|
26
|
+
async get() {
|
|
27
|
+
const business = await this.accessBusinessService.validateAccess();
|
|
28
|
+
const user = nestjs_utility_services_1.Auth.user();
|
|
29
|
+
return user_preference_entity_1.UserPreferenceEntity.find({ where: { user_id: user.id, business_id: business.id, product_id: user.auth_attributes.product_id } });
|
|
30
|
+
}
|
|
31
|
+
async show(params) {
|
|
32
|
+
const business = await this.accessBusinessService.validateAccess();
|
|
33
|
+
const user = nestjs_utility_services_1.Auth.user();
|
|
34
|
+
return user_preference_entity_1.UserPreferenceEntity.findOne({
|
|
35
|
+
where: { name: params.slug, business_id: business.id, user_id: user.id, product_id: user.auth_attributes.product_id },
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
async create(params, body) {
|
|
39
|
+
const business = await this.accessBusinessService.validateAccess();
|
|
40
|
+
const user = nestjs_utility_services_1.Auth.user();
|
|
41
|
+
const r = await user_preference_entity_1.UserPreferenceEntity.firstOrNew({
|
|
42
|
+
business_id: business.id,
|
|
43
|
+
user_id: user.id,
|
|
44
|
+
product_id: user.auth_attributes.product_id,
|
|
45
|
+
name: params.slug.toLocaleLowerCase(),
|
|
46
|
+
});
|
|
47
|
+
r.preference = body.preference;
|
|
48
|
+
return r.save();
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
exports.UserPreferenceController = UserPreferenceController;
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, common_1.Get)(),
|
|
54
|
+
__metadata("design:type", Function),
|
|
55
|
+
__metadata("design:paramtypes", []),
|
|
56
|
+
__metadata("design:returntype", Promise)
|
|
57
|
+
], UserPreferenceController.prototype, "get", null);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, common_1.Get)(':slug'),
|
|
60
|
+
__param(0, (0, common_1.Param)()),
|
|
61
|
+
__metadata("design:type", Function),
|
|
62
|
+
__metadata("design:paramtypes", [access_business_param_dto_1.AccessBusinessParamDto]),
|
|
63
|
+
__metadata("design:returntype", Promise)
|
|
64
|
+
], UserPreferenceController.prototype, "show", null);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, common_1.Post)(':slug'),
|
|
67
|
+
__param(0, (0, common_1.Param)()),
|
|
68
|
+
__param(1, (0, common_1.Body)()),
|
|
69
|
+
__metadata("design:type", Function),
|
|
70
|
+
__metadata("design:paramtypes", [access_business_param_dto_1.AccessBusinessParamDto, add_user_preference_dto_1.AddUserPreferenceDto]),
|
|
71
|
+
__metadata("design:returntype", Promise)
|
|
72
|
+
], UserPreferenceController.prototype, "create", null);
|
|
73
|
+
exports.UserPreferenceController = UserPreferenceController = __decorate([
|
|
74
|
+
(0, common_1.Controller)('api/b/user-preference'),
|
|
75
|
+
__metadata("design:paramtypes", [access_business_service_1.AccessBusinessService])
|
|
76
|
+
], UserPreferenceController);
|
|
77
|
+
//# sourceMappingURL=user.preference.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.preference.controller.js","sourceRoot":"","sources":["../../../src/access/controllers/user.preference.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAoE;AACpE,iFAA2E;AAC3E,iFAA4E;AAC5E,+EAA0E;AAC1E,oFAA8D;AAC9D,6EAAuE;AAQhE,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACjC,YAA6B,qBAA4C;QAA5C,0BAAqB,GAArB,qBAAqB,CAAuB;IAAG,CAAC;IAGvE,AAAN,KAAK,CAAC,GAAG;QACL,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC;QACnE,MAAM,IAAI,GAAG,8BAAI,CAAC,IAAI,EAAE,CAAC;QAEzB,OAAO,6CAAoB,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IAC7I,CAAC;IAGK,AAAN,KAAK,CAAC,IAAI,CAAU,MAA8B;QAC9C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC;QACnE,MAAM,IAAI,GAAG,8BAAI,CAAC,IAAI,EAAE,CAAC;QAEzB,OAAO,6CAAoB,CAAC,OAAO,CAAC;YAChC,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,EAAE,UAAU,EAAE,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE;SACxH,CAAC,CAAC;IACP,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAU,MAA8B,EAAU,IAA0B;QACpF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,cAAc,EAAE,CAAC;QACnE,MAAM,IAAI,GAAG,8BAAI,CAAC,IAAI,EAAE,CAAC;QAEzB,MAAM,CAAC,GAAG,MAAM,6CAAoB,CAAC,UAAU,CAAC;YAC5C,WAAW,EAAE,QAAQ,CAAC,EAAE;YACxB,OAAO,EAAE,IAAI,CAAC,EAAE;YAChB,UAAU,EAAE,IAAI,CAAC,eAAe,CAAC,UAAU;YAC3C,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,iBAAiB,EAAE;SACxC,CAAC,CAAC;QAEH,CAAC,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QAE/B,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;IACpB,CAAC;CACJ,CAAA;AArCY,4DAAwB;AAI3B;IADL,IAAA,YAAG,GAAE;;;;mDAML;AAGK;IADL,IAAA,YAAG,EAAC,OAAO,CAAC;IACD,WAAA,IAAA,cAAK,GAAE,CAAA;;qCAAS,kDAAsB;;oDAOjD;AAGK;IADL,IAAA,aAAI,EAAC,OAAO,CAAC;IACA,WAAA,IAAA,cAAK,GAAE,CAAA;IAAkC,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAA/B,kDAAsB,EAAgB,8CAAoB;;sDAcvF;mCApCQ,wBAAwB;IADpC,IAAA,mBAAU,EAAC,uBAAuB,CAAC;qCAEoB,+CAAqB;GADhE,wBAAwB,CAqCpC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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.AddBusinessPreferenceDto = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
class AddBusinessPreferenceDto {
|
|
16
|
+
}
|
|
17
|
+
exports.AddBusinessPreferenceDto = AddBusinessPreferenceDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_transformer_1.Expose)(),
|
|
20
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
21
|
+
(0, class_validator_1.IsJSON)(),
|
|
22
|
+
__metadata("design:type", Object)
|
|
23
|
+
], AddBusinessPreferenceDto.prototype, "preference", void 0);
|
|
24
|
+
//# sourceMappingURL=add.business.preference.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.business.preference.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/add.business.preference.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA2C;AAC3C,qDAAqD;AAErD,MAAa,wBAAwB;CAKpC;AALD,4DAKC;AADG;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;4DACO"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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.AddUserPreferenceDto = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
class AddUserPreferenceDto {
|
|
16
|
+
}
|
|
17
|
+
exports.AddUserPreferenceDto = AddUserPreferenceDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_transformer_1.Expose)(),
|
|
20
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
21
|
+
(0, class_validator_1.IsJSON)(),
|
|
22
|
+
__metadata("design:type", Object)
|
|
23
|
+
], AddUserPreferenceDto.prototype, "preference", void 0);
|
|
24
|
+
//# sourceMappingURL=add.user.preference.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add.user.preference.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/add.user.preference.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA2C;AAC3C,qDAAqD;AAErD,MAAa,oBAAoB;CAKhC;AALD,oDAKC;AADG;IAHC,IAAA,0BAAM,GAAE;IACR,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;wDACO"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BusinessPreferenceAttributesDto = void 0;
|
|
4
|
+
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
5
|
+
class BusinessPreferenceAttributesDto extends nestjs_utility_services_1.CommonAttributesDto {
|
|
6
|
+
}
|
|
7
|
+
exports.BusinessPreferenceAttributesDto = BusinessPreferenceAttributesDto;
|
|
8
|
+
//# sourceMappingURL=business.preference.attributes.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"business.preference.attributes.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/business.preference.attributes.dto.ts"],"names":[],"mappings":";;;AAAA,oFAA6E;AAC7E,MAAa,+BAAgC,SAAQ,6CAAmB;CAAG;AAA3E,0EAA2E"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export * from './access.business.param.dto';
|
|
2
|
+
export * from './add.business.preference.dto';
|
|
2
3
|
export * from './add.listing.preference.dto';
|
|
4
|
+
export * from './add.user.preference.dto';
|
|
5
|
+
export * from './business.preference.attributes.dto';
|
|
3
6
|
export * from './business.user.attributes.dto';
|
|
4
7
|
export * from './business.user.group.attributes.dto';
|
|
5
8
|
export * from './business.user.role.attributes.dto';
|
|
@@ -31,4 +34,5 @@ export * from './role.group.attributes.dto';
|
|
|
31
34
|
export * from './string.search.dto';
|
|
32
35
|
export * from './ui.action.attributes.dto';
|
|
33
36
|
export * from './ui.action.role.attributes.dto';
|
|
37
|
+
export * from './user.preference.attributes.dto';
|
|
34
38
|
export * from './user.role.attributes.dto';
|
|
@@ -15,7 +15,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./access.business.param.dto"), exports);
|
|
18
|
+
__exportStar(require("./add.business.preference.dto"), exports);
|
|
18
19
|
__exportStar(require("./add.listing.preference.dto"), exports);
|
|
20
|
+
__exportStar(require("./add.user.preference.dto"), exports);
|
|
21
|
+
__exportStar(require("./business.preference.attributes.dto"), exports);
|
|
19
22
|
__exportStar(require("./business.user.attributes.dto"), exports);
|
|
20
23
|
__exportStar(require("./business.user.group.attributes.dto"), exports);
|
|
21
24
|
__exportStar(require("./business.user.role.attributes.dto"), exports);
|
|
@@ -47,5 +50,6 @@ __exportStar(require("./role.group.attributes.dto"), exports);
|
|
|
47
50
|
__exportStar(require("./string.search.dto"), exports);
|
|
48
51
|
__exportStar(require("./ui.action.attributes.dto"), exports);
|
|
49
52
|
__exportStar(require("./ui.action.role.attributes.dto"), exports);
|
|
53
|
+
__exportStar(require("./user.preference.attributes.dto"), exports);
|
|
50
54
|
__exportStar(require("./user.role.attributes.dto"), exports);
|
|
51
55
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/access/dtos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAAA,+DAA6C;AAAA,iEAA+C;AAAA,uEAAqD;AAAA,sEAAoD;AAAA,8DAA4C;AAAA,2DAAyC;AAAA,iEAA+C;AAAA,6DAA2C;AAAA,uEAAqD;AAAA,oDAAkC;AAAA,0DAAwC;AAAA,gEAA8C;AAAA,8DAA4C;AAAA,mEAAiD;AAAA,sDAAoC;AAAA,6DAA2C;AAAA,kEAAgD;AAAA,gEAA8C;AAAA,sEAAoD;AAAA,+DAA6C;AAAA,wDAAsC;AAAA,6DAA2C;AAAA,0DAAwC;AAAA,+DAA6C;AAAA,4DAA0C;AAAA,yEAAuD;AAAA,oEAAkD;AAAA,2DAAyC;AAAA,8DAA4C;AAAA,sDAAoC;AAAA,6DAA2C;AAAA,kEAAgD;AAAA,6DAA0C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/access/dtos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAAA,gEAA8C;AAAA,+DAA6C;AAAA,4DAA0C;AAAA,uEAAqD;AAAA,iEAA+C;AAAA,uEAAqD;AAAA,sEAAoD;AAAA,8DAA4C;AAAA,2DAAyC;AAAA,iEAA+C;AAAA,6DAA2C;AAAA,uEAAqD;AAAA,oDAAkC;AAAA,0DAAwC;AAAA,gEAA8C;AAAA,8DAA4C;AAAA,mEAAiD;AAAA,sDAAoC;AAAA,6DAA2C;AAAA,kEAAgD;AAAA,gEAA8C;AAAA,sEAAoD;AAAA,+DAA6C;AAAA,wDAAsC;AAAA,6DAA2C;AAAA,0DAAwC;AAAA,+DAA6C;AAAA,4DAA0C;AAAA,yEAAuD;AAAA,oEAAkD;AAAA,2DAAyC;AAAA,8DAA4C;AAAA,sDAAoC;AAAA,6DAA2C;AAAA,kEAAgD;AAAA,mEAAiD;AAAA,6DAA0C"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserPreferenceAttributesDto = void 0;
|
|
4
|
+
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
5
|
+
class UserPreferenceAttributesDto extends nestjs_utility_services_1.CommonAttributesDto {
|
|
6
|
+
}
|
|
7
|
+
exports.UserPreferenceAttributesDto = UserPreferenceAttributesDto;
|
|
8
|
+
//# sourceMappingURL=user.preference.attributes.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.preference.attributes.dto.js","sourceRoot":"","sources":["../../../src/access/dtos/user.preference.attributes.dto.ts"],"names":[],"mappings":";;;AAAA,oFAA6E;AAC7E,MAAa,2BAA4B,SAAQ,6CAAmB;CAAG;AAAvE,kEAAuE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CommonEntity, RoleEntity } from '@servicelabsco/nestjs-utility-services';
|
|
2
|
+
import { GroupRoleAttributesDto } from '../dtos/group.role.attributes.dto';
|
|
3
|
+
import { BusinessUserGroupEntity } from './business.user.group.entity';
|
|
4
|
+
export declare class BusinessGroupRoleEntity extends CommonEntity {
|
|
5
|
+
group_id: number;
|
|
6
|
+
role_id: number;
|
|
7
|
+
attributes: GroupRoleAttributesDto;
|
|
8
|
+
user_group: BusinessUserGroupEntity;
|
|
9
|
+
role: RoleEntity;
|
|
10
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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.BusinessGroupRoleEntity = void 0;
|
|
13
|
+
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const group_role_attributes_dto_1 = require("../dtos/group.role.attributes.dto");
|
|
16
|
+
const business_user_group_entity_1 = require("./business.user.group.entity");
|
|
17
|
+
let BusinessGroupRoleEntity = class BusinessGroupRoleEntity extends nestjs_utility_services_1.CommonEntity {
|
|
18
|
+
};
|
|
19
|
+
exports.BusinessGroupRoleEntity = BusinessGroupRoleEntity;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typeorm_1.Column)(),
|
|
22
|
+
__metadata("design:type", Number)
|
|
23
|
+
], BusinessGroupRoleEntity.prototype, "group_id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)(),
|
|
26
|
+
__metadata("design:type", Number)
|
|
27
|
+
], BusinessGroupRoleEntity.prototype, "role_id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)('json'),
|
|
30
|
+
__metadata("design:type", group_role_attributes_dto_1.GroupRoleAttributesDto)
|
|
31
|
+
], BusinessGroupRoleEntity.prototype, "attributes", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.ManyToOne)(() => business_user_group_entity_1.BusinessUserGroupEntity),
|
|
34
|
+
(0, typeorm_1.JoinColumn)({ name: 'group_id' }),
|
|
35
|
+
__metadata("design:type", business_user_group_entity_1.BusinessUserGroupEntity)
|
|
36
|
+
], BusinessGroupRoleEntity.prototype, "user_group", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.ManyToOne)(() => nestjs_utility_services_1.RoleEntity),
|
|
39
|
+
(0, typeorm_1.JoinColumn)({ name: 'role_id' }),
|
|
40
|
+
__metadata("design:type", nestjs_utility_services_1.RoleEntity)
|
|
41
|
+
], BusinessGroupRoleEntity.prototype, "role", void 0);
|
|
42
|
+
exports.BusinessGroupRoleEntity = BusinessGroupRoleEntity = __decorate([
|
|
43
|
+
(0, typeorm_1.Entity)('bz_group_roles')
|
|
44
|
+
], BusinessGroupRoleEntity);
|
|
45
|
+
//# sourceMappingURL=business.group.role.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"business.group.role.entity.js","sourceRoot":"","sources":["../../../src/access/entities/business.group.role.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oFAAkF;AAClF,qCAAgE;AAChE,iFAA2E;AAC3E,6EAAuE;AAShE,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,sCAAY;CAcxD,CAAA;AAdY,0DAAuB;AAEhC;IADC,IAAA,gBAAM,GAAE;;yDACQ;AAGjB;IADC,IAAA,gBAAM,GAAE;;wDACO;AAGhB;IADC,IAAA,gBAAM,EAAC,MAAM,CAAC;8BACH,kDAAsB;2DAAC;AAGyC;IAA3E,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,oDAAuB,CAAC;IAAE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;8BAAa,oDAAuB;2DAAC;AAElD;IAA7D,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,oCAAU,CAAC;IAAE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;8BAAO,oCAAU;qDAAC;kCAbtE,uBAAuB;IADnC,IAAA,gBAAM,EAAC,gBAAgB,CAAC;GACZ,uBAAuB,CAcnC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CommonEntity } from '@servicelabsco/nestjs-utility-services';
|
|
2
|
+
import { BusinessPreferenceAttributesDto } from '../dtos/business.preference.attributes.dto';
|
|
3
|
+
import { AccessBusinessEntity } from './access.business.entity';
|
|
4
|
+
export declare class BusinessPreferenceEntity extends CommonEntity {
|
|
5
|
+
business_id: number;
|
|
6
|
+
name: string;
|
|
7
|
+
preference: any;
|
|
8
|
+
attributes: BusinessPreferenceAttributesDto;
|
|
9
|
+
business: AccessBusinessEntity;
|
|
10
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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.BusinessPreferenceEntity = void 0;
|
|
13
|
+
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const business_preference_attributes_dto_1 = require("../dtos/business.preference.attributes.dto");
|
|
16
|
+
const access_business_entity_1 = require("./access.business.entity");
|
|
17
|
+
let BusinessPreferenceEntity = class BusinessPreferenceEntity extends nestjs_utility_services_1.CommonEntity {
|
|
18
|
+
};
|
|
19
|
+
exports.BusinessPreferenceEntity = BusinessPreferenceEntity;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typeorm_1.Column)(),
|
|
22
|
+
__metadata("design:type", Number)
|
|
23
|
+
], BusinessPreferenceEntity.prototype, "business_id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], BusinessPreferenceEntity.prototype, "name", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)('json'),
|
|
30
|
+
__metadata("design:type", Object)
|
|
31
|
+
], BusinessPreferenceEntity.prototype, "preference", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)('json'),
|
|
34
|
+
__metadata("design:type", business_preference_attributes_dto_1.BusinessPreferenceAttributesDto)
|
|
35
|
+
], BusinessPreferenceEntity.prototype, "attributes", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.ManyToOne)(() => access_business_entity_1.AccessBusinessEntity),
|
|
38
|
+
(0, typeorm_1.JoinColumn)({ name: 'business_id' }),
|
|
39
|
+
__metadata("design:type", access_business_entity_1.AccessBusinessEntity)
|
|
40
|
+
], BusinessPreferenceEntity.prototype, "business", void 0);
|
|
41
|
+
exports.BusinessPreferenceEntity = BusinessPreferenceEntity = __decorate([
|
|
42
|
+
(0, typeorm_1.Entity)('bz_business_preferences')
|
|
43
|
+
], BusinessPreferenceEntity);
|
|
44
|
+
//# sourceMappingURL=business.preference.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"business.preference.entity.js","sourceRoot":"","sources":["../../../src/access/entities/business.preference.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oFAAsE;AACtE,qCAAgE;AAChE,mGAA6F;AAC7F,qEAAgE;AASzD,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,sCAAY;CAezD,CAAA;AAfY,4DAAwB;AAEjC;IADC,IAAA,gBAAM,GAAE;;6DACW;AAGpB;IADC,IAAA,gBAAM,GAAE;;sDACI;AAGb;IADC,IAAA,gBAAM,EAAC,MAAM,CAAC;;4DACC;AAGhB;IADC,IAAA,gBAAM,EAAC,MAAM,CAAC;8BACH,oEAA+B;4DAAC;AAGgC;IAA3E,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,6CAAoB,CAAC;IAAE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;8BAAW,6CAAoB;0DAAC;mCAdlG,wBAAwB;IADpC,IAAA,gBAAM,EAAC,yBAAyB,CAAC;GACrB,wBAAwB,CAepC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CommonEntity, UserEntity } from '@servicelabsco/nestjs-utility-services';
|
|
2
|
+
import { GroupMemberAttributesDto } from '../dtos/group.member.attributes.dto';
|
|
3
|
+
import { BusinessUserGroupEntity } from './business.user.group.entity';
|
|
4
|
+
export declare class GroupMemberEntity extends CommonEntity {
|
|
5
|
+
group_id: number;
|
|
6
|
+
user_id: number;
|
|
7
|
+
attributes: GroupMemberAttributesDto;
|
|
8
|
+
group: BusinessUserGroupEntity;
|
|
9
|
+
user: UserEntity;
|
|
10
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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.GroupMemberEntity = void 0;
|
|
13
|
+
const nestjs_utility_services_1 = require("@servicelabsco/nestjs-utility-services");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const group_member_attributes_dto_1 = require("../dtos/group.member.attributes.dto");
|
|
16
|
+
const business_user_group_entity_1 = require("./business.user.group.entity");
|
|
17
|
+
let GroupMemberEntity = class GroupMemberEntity extends nestjs_utility_services_1.CommonEntity {
|
|
18
|
+
};
|
|
19
|
+
exports.GroupMemberEntity = GroupMemberEntity;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typeorm_1.Column)(),
|
|
22
|
+
__metadata("design:type", Number)
|
|
23
|
+
], GroupMemberEntity.prototype, "group_id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)(),
|
|
26
|
+
__metadata("design:type", Number)
|
|
27
|
+
], GroupMemberEntity.prototype, "user_id", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)('json'),
|
|
30
|
+
__metadata("design:type", group_member_attributes_dto_1.GroupMemberAttributesDto)
|
|
31
|
+
], GroupMemberEntity.prototype, "attributes", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.ManyToOne)(() => business_user_group_entity_1.BusinessUserGroupEntity),
|
|
34
|
+
(0, typeorm_1.JoinColumn)({ name: 'group_id' }),
|
|
35
|
+
__metadata("design:type", business_user_group_entity_1.BusinessUserGroupEntity)
|
|
36
|
+
], GroupMemberEntity.prototype, "group", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.ManyToOne)(() => nestjs_utility_services_1.UserEntity),
|
|
39
|
+
(0, typeorm_1.JoinColumn)({ name: 'user_id' }),
|
|
40
|
+
__metadata("design:type", nestjs_utility_services_1.UserEntity)
|
|
41
|
+
], GroupMemberEntity.prototype, "user", void 0);
|
|
42
|
+
exports.GroupMemberEntity = GroupMemberEntity = __decorate([
|
|
43
|
+
(0, typeorm_1.Entity)('bz_group_members')
|
|
44
|
+
], GroupMemberEntity);
|
|
45
|
+
//# sourceMappingURL=group.member.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group.member.entity.js","sourceRoot":"","sources":["../../../src/access/entities/group.member.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oFAAkF;AAClF,qCAAgE;AAChE,qFAA+E;AAC/E,6EAAuE;AAShE,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,sCAAY;CAclD,CAAA;AAdY,8CAAiB;AAE1B;IADC,IAAA,gBAAM,GAAE;;mDACQ;AAGjB;IADC,IAAA,gBAAM,GAAE;;kDACO;AAGhB;IADC,IAAA,gBAAM,EAAC,MAAM,CAAC;8BACH,sDAAwB;qDAAC;AAGuC;IAA3E,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,oDAAuB,CAAC;IAAE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;8BAAQ,oDAAuB;gDAAC;AAE7C;IAA7D,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,oCAAU,CAAC;IAAE,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;8BAAO,oCAAU;+CAAC;4BAbtE,iBAAiB;IAD7B,IAAA,gBAAM,EAAC,kBAAkB,CAAC;GACd,iBAAiB,CAc7B"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export * from './access.business.entity';
|
|
2
|
+
export * from './business.group.role.entity';
|
|
3
|
+
export * from './business.preference.entity';
|
|
2
4
|
export * from './business.user.entity';
|
|
3
5
|
export * from './business.user.group.entity';
|
|
4
6
|
export * from './business.user.role.entity';
|
|
@@ -6,6 +8,7 @@ export * from './child.menu.entity';
|
|
|
6
8
|
export * from './custom.report.entity';
|
|
7
9
|
export * from './dashboard.component.entity';
|
|
8
10
|
export * from './dashboard.entity';
|
|
11
|
+
export * from './group.member.entity';
|
|
9
12
|
export * from './group.role.entity';
|
|
10
13
|
export * from './list.preference.entity';
|
|
11
14
|
export * from './listing.column.entity';
|
|
@@ -22,4 +25,5 @@ export * from './product.entity';
|
|
|
22
25
|
export * from './role.group.entity';
|
|
23
26
|
export * from './ui.action.entity';
|
|
24
27
|
export * from './ui.action.role.entity';
|
|
28
|
+
export * from './user.preference.entity';
|
|
25
29
|
export * from './user.role.entity';
|
|
@@ -15,6 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./access.business.entity"), exports);
|
|
18
|
+
__exportStar(require("./business.group.role.entity"), exports);
|
|
19
|
+
__exportStar(require("./business.preference.entity"), exports);
|
|
18
20
|
__exportStar(require("./business.user.entity"), exports);
|
|
19
21
|
__exportStar(require("./business.user.group.entity"), exports);
|
|
20
22
|
__exportStar(require("./business.user.role.entity"), exports);
|
|
@@ -22,6 +24,7 @@ __exportStar(require("./child.menu.entity"), exports);
|
|
|
22
24
|
__exportStar(require("./custom.report.entity"), exports);
|
|
23
25
|
__exportStar(require("./dashboard.component.entity"), exports);
|
|
24
26
|
__exportStar(require("./dashboard.entity"), exports);
|
|
27
|
+
__exportStar(require("./group.member.entity"), exports);
|
|
25
28
|
__exportStar(require("./group.role.entity"), exports);
|
|
26
29
|
__exportStar(require("./list.preference.entity"), exports);
|
|
27
30
|
__exportStar(require("./listing.column.entity"), exports);
|
|
@@ -38,5 +41,6 @@ __exportStar(require("./product.entity"), exports);
|
|
|
38
41
|
__exportStar(require("./role.group.entity"), exports);
|
|
39
42
|
__exportStar(require("./ui.action.entity"), exports);
|
|
40
43
|
__exportStar(require("./ui.action.role.entity"), exports);
|
|
44
|
+
__exportStar(require("./user.preference.entity"), exports);
|
|
41
45
|
__exportStar(require("./user.role.entity"), exports);
|
|
42
46
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/access/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AAAA,yDAAuC;AAAA,+DAA6C;AAAA,8DAA4C;AAAA,sDAAoC;AAAA,yDAAuC;AAAA,+DAA6C;AAAA,qDAAmC;AAAA,sDAAoC;AAAA,2DAAyC;AAAA,0DAAwC;AAAA,wDAAsC;AAAA,8DAA4C;AAAA,uDAAqC;AAAA,gDAA8B;AAAA,qDAAmC;AAAA,kDAAgC;AAAA,uDAAqC;AAAA,2DAAyC;AAAA,iEAA+C;AAAA,mDAAiC;AAAA,sDAAoC;AAAA,qDAAmC;AAAA,0DAAwC;AAAA,qDAAkC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/access/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AAAA,+DAA6C;AAAA,+DAA6C;AAAA,yDAAuC;AAAA,+DAA6C;AAAA,8DAA4C;AAAA,sDAAoC;AAAA,yDAAuC;AAAA,+DAA6C;AAAA,qDAAmC;AAAA,wDAAsC;AAAA,sDAAoC;AAAA,2DAAyC;AAAA,0DAAwC;AAAA,wDAAsC;AAAA,8DAA4C;AAAA,uDAAqC;AAAA,gDAA8B;AAAA,qDAAmC;AAAA,kDAAgC;AAAA,uDAAqC;AAAA,2DAAyC;AAAA,iEAA+C;AAAA,mDAAiC;AAAA,sDAAoC;AAAA,qDAAmC;AAAA,0DAAwC;AAAA,2DAAyC;AAAA,qDAAkC"}
|
|
@@ -37,6 +37,10 @@ __decorate([
|
|
|
37
37
|
(0, typeorm_1.Column)('json'),
|
|
38
38
|
__metadata("design:type", listing_page_attributes_dto_1.ListingPageAttributesDto)
|
|
39
39
|
], ListingPageEntity.prototype, "attributes", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)(),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], ListingPageEntity.prototype, "order_definition", void 0);
|
|
40
44
|
__decorate([
|
|
41
45
|
(0, typeorm_1.OneToMany)(() => listing_column_entity_1.ListingColumnEntity, (column) => column.listing),
|
|
42
46
|
__metadata("design:type", Array)
|