@aldb2b/common 1.0.977 → 1.0.979
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/build/entities/models/common/controllers/preference-customization.controller.d.ts +2 -2
- package/build/entities/models/common/controllers/preference-customization.controller.js +7 -5
- package/build/entities/models/common/controllers/preference-customization.controller.js.map +1 -1
- package/build/entities/models/common/entities/preference-customization.entity.d.ts +1 -4
- package/build/entities/models/common/entities/preference-customization.entity.js +1 -49
- package/build/entities/models/common/entities/preference-customization.entity.js.map +1 -1
- package/build/entities/models/common/services/preference-customization.service.d.ts +1 -1
- package/build/entities/models/common/services/preference-customization.service.js +3 -1
- package/build/entities/models/common/services/preference-customization.service.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -8,8 +8,8 @@ import { HeaderUser } from '../../../../types/header-user.interface';
|
|
|
8
8
|
export declare class PreferenceCustomizationController {
|
|
9
9
|
private readonly preferenceCustomizationService;
|
|
10
10
|
constructor(preferenceCustomizationService: PreferenceCustomizationService);
|
|
11
|
-
getPreferenceCustomizations(findPreferenceCustomizationDto: FindPreferenceCustomizationDto, eventId: string): Promise<ReadResult<PreferenceCustomization>>;
|
|
11
|
+
getPreferenceCustomizations(findPreferenceCustomizationDto: FindPreferenceCustomizationDto, eventId: string, user: HeaderUser): Promise<ReadResult<PreferenceCustomization>>;
|
|
12
12
|
getPreferenceCustomizationById(id: string, eventId: string): Promise<PreferenceCustomization>;
|
|
13
|
-
createPreferenceCustomization(createPreferenceCustomizationDto: CreatePreferenceCustomizationDto, user: HeaderUser): Promise<PreferenceCustomization>;
|
|
13
|
+
createPreferenceCustomization(createPreferenceCustomizationDto: CreatePreferenceCustomizationDto, user: HeaderUser, header: any): Promise<PreferenceCustomization>;
|
|
14
14
|
updatePreferenceCustomizationById(updatePreferenceCustomizationDto: UpdatePreferenceCustomizationDto, id: string, eventId: string): Promise<PreferenceCustomization>;
|
|
15
15
|
}
|
|
@@ -25,13 +25,13 @@ let PreferenceCustomizationController = class PreferenceCustomizationController
|
|
|
25
25
|
constructor(preferenceCustomizationService) {
|
|
26
26
|
this.preferenceCustomizationService = preferenceCustomizationService;
|
|
27
27
|
}
|
|
28
|
-
async getPreferenceCustomizations(findPreferenceCustomizationDto, eventId) {
|
|
29
|
-
return await this.preferenceCustomizationService.getPreferenceCustomizations(findPreferenceCustomizationDto, eventId);
|
|
28
|
+
async getPreferenceCustomizations(findPreferenceCustomizationDto, eventId, user) {
|
|
29
|
+
return await this.preferenceCustomizationService.getPreferenceCustomizations(findPreferenceCustomizationDto, eventId, user);
|
|
30
30
|
}
|
|
31
31
|
async getPreferenceCustomizationById(id, eventId) {
|
|
32
32
|
return await this.preferenceCustomizationService.getPreferenceCustomizationById(id, eventId);
|
|
33
33
|
}
|
|
34
|
-
async createPreferenceCustomization(createPreferenceCustomizationDto, user) {
|
|
34
|
+
async createPreferenceCustomization(createPreferenceCustomizationDto, user, header) {
|
|
35
35
|
return await this.preferenceCustomizationService.createPreferenceCustomization(createPreferenceCustomizationDto, user);
|
|
36
36
|
}
|
|
37
37
|
async updatePreferenceCustomizationById(updatePreferenceCustomizationDto, id, eventId) {
|
|
@@ -44,8 +44,9 @@ __decorate([
|
|
|
44
44
|
(0, common_1.UsePipes)(new common_1.ValidationPipe({ whitelist: true, transform: true })),
|
|
45
45
|
__param(0, (0, common_1.Query)()),
|
|
46
46
|
__param(1, (0, get_event_id_decorator_1.GetEventId)()),
|
|
47
|
+
__param(2, (0, get_user_decorator_1.GetUser)()),
|
|
47
48
|
__metadata("design:type", Function),
|
|
48
|
-
__metadata("design:paramtypes", [find_preference_customization_dto_1.FindPreferenceCustomizationDto, String]),
|
|
49
|
+
__metadata("design:paramtypes", [find_preference_customization_dto_1.FindPreferenceCustomizationDto, String, Object]),
|
|
49
50
|
__metadata("design:returntype", Promise)
|
|
50
51
|
], PreferenceCustomizationController.prototype, "getPreferenceCustomizations", null);
|
|
51
52
|
__decorate([
|
|
@@ -62,8 +63,9 @@ __decorate([
|
|
|
62
63
|
(0, common_1.UsePipes)(new common_1.ValidationPipe({ whitelist: true, transform: true })),
|
|
63
64
|
__param(0, (0, common_1.Body)()),
|
|
64
65
|
__param(1, (0, get_user_decorator_1.GetUser)()),
|
|
66
|
+
__param(2, (0, common_1.Headers)()),
|
|
65
67
|
__metadata("design:type", Function),
|
|
66
|
-
__metadata("design:paramtypes", [create_preference_customization_dto_1.CreatePreferenceCustomizationDto, Object]),
|
|
68
|
+
__metadata("design:paramtypes", [create_preference_customization_dto_1.CreatePreferenceCustomizationDto, Object, Object]),
|
|
67
69
|
__metadata("design:returntype", Promise)
|
|
68
70
|
], PreferenceCustomizationController.prototype, "createPreferenceCustomization", null);
|
|
69
71
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preference-customization.controller.js","sourceRoot":"","sources":["../../../../../src/entities/models/common/controllers/preference-customization.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"preference-customization.controller.js","sourceRoot":"","sources":["../../../../../src/entities/models/common/controllers/preference-customization.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAYuB;AACvB,mGAA6F;AAC7F,wFAAiF;AAEjF,gGAAyF;AAEzF,oGAA6F;AAC7F,oGAA6F;AAE7F,kFAAmE;AACnE,0FAA0E;AAInE,IAAM,iCAAiC,GAAvC,MAAM,iCAAiC;IAC5C,YACmB,8BAA8D;QAA9D,mCAA8B,GAA9B,8BAA8B,CAAgC;IAC9E,CAAC;IAIE,AAAN,KAAK,CAAC,2BAA2B,CACtB,8BAA8D,EACzD,OAAe,EAClB,IAAgB;QAE3B,OAAO,MAAM,IAAI,CAAC,8BAA8B,CAAC,2BAA2B,CAC1E,8BAA8B,EAC9B,OAAO,EACP,IAAI,CACL,CAAA;IACH,CAAC;IAIK,AAAN,KAAK,CAAC,8BAA8B,CACrB,EAAU,EACT,OAAe;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ACT,WAAA,IAAA,gBAAO,GAAE,CAAA;;qCAFgC,sEAAgC;;sFAQ3E;AAIK;IAFL,IAAA,YAAG,EAAC,MAAM,CAAC;IACX,IAAA,iBAAQ,EAAC,IAAI,uBAAc,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAEhE,WAAA,IAAA,aAAI,GAAE,CAAA;IACN,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;IACX,WAAA,IAAA,mCAAU,GAAE,CAAA;;qCAF6B,sEAAgC;;0FAS3E;4CAxDU,iCAAiC;IAF7C,IAAA,wCAAiB,GAAE;IACnB,IAAA,mBAAU,EAAC,0BAA0B,CAAC;qCAGc,iEAA8B;GAFtE,iCAAiC,CAyD7C"}
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
/// <reference types="mongoose/types/inferschematype" />
|
|
49
49
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
50
50
|
/// <reference types="@aldb2b/common/node_modules/mongoose/types/inferschematype" />
|
|
51
|
-
import { Connection
|
|
51
|
+
import { Connection } from 'mongoose';
|
|
52
52
|
import { Event } from '../../events';
|
|
53
53
|
import { CustomModel } from '../../../../db/CustomModel';
|
|
54
54
|
import { Company, Contact } from '../../companies';
|
|
@@ -72,9 +72,6 @@ export declare class PreferenceCustomization {
|
|
|
72
72
|
createdAt: Date;
|
|
73
73
|
updatedAt: Date;
|
|
74
74
|
}
|
|
75
|
-
export declare const preferenceCustomizationSchema: Schema<PreferenceCustomization, PreferenceCustomizationModel, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, PreferenceCustomization, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<PreferenceCustomization>> & import("mongoose").FlatRecord<PreferenceCustomization> & Required<{
|
|
76
|
-
_id: string;
|
|
77
|
-
}>>;
|
|
78
75
|
export declare const preferenceCustomizationFactory: (connection: Connection, eventConnection: Connection, companyConnection: Connection) => import("mongoose").Model<PreferenceCustomization, {}, {}, {}, import("mongoose").Document<unknown, {}, PreferenceCustomization> & PreferenceCustomization & Required<{
|
|
79
76
|
_id: string;
|
|
80
77
|
}>, any>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.preferenceCustomizationFactory = exports.
|
|
3
|
+
exports.preferenceCustomizationFactory = exports.PreferenceCustomization = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
5
|
const validateNewItem_1 = require("../../../../validators/validateNewItem");
|
|
6
6
|
const validateProjection_1 = require("../../../../validators/validateProjection");
|
|
@@ -15,54 +15,6 @@ const Mixed = mongoose_1.Schema.Types.Mixed;
|
|
|
15
15
|
class PreferenceCustomization {
|
|
16
16
|
}
|
|
17
17
|
exports.PreferenceCustomization = PreferenceCustomization;
|
|
18
|
-
exports.preferenceCustomizationSchema = new mongoose_1.Schema({
|
|
19
|
-
title: {
|
|
20
|
-
type: String,
|
|
21
|
-
trim: true,
|
|
22
|
-
required: true,
|
|
23
|
-
},
|
|
24
|
-
module: {
|
|
25
|
-
type: String,
|
|
26
|
-
trim: true,
|
|
27
|
-
required: true,
|
|
28
|
-
},
|
|
29
|
-
method: {
|
|
30
|
-
type: String,
|
|
31
|
-
enum: Object.values(request_method_enum_1.RequestMethod),
|
|
32
|
-
required: true,
|
|
33
|
-
default: request_method_enum_1.RequestMethod.GET,
|
|
34
|
-
},
|
|
35
|
-
payload: {
|
|
36
|
-
type: Mixed,
|
|
37
|
-
trim: true,
|
|
38
|
-
required: true,
|
|
39
|
-
},
|
|
40
|
-
isDefault: {
|
|
41
|
-
type: Boolean,
|
|
42
|
-
required: true,
|
|
43
|
-
default: false,
|
|
44
|
-
},
|
|
45
|
-
type: {
|
|
46
|
-
type: String,
|
|
47
|
-
enum: Object.values(preference_customization_type_enum_1.PreferenceCustomizationType),
|
|
48
|
-
required: true,
|
|
49
|
-
default: preference_customization_type_enum_1.PreferenceCustomizationType.WEB,
|
|
50
|
-
},
|
|
51
|
-
eventId: {
|
|
52
|
-
type: ObjectId,
|
|
53
|
-
required: true,
|
|
54
|
-
},
|
|
55
|
-
contactId: {
|
|
56
|
-
type: ObjectId,
|
|
57
|
-
required: true,
|
|
58
|
-
},
|
|
59
|
-
companyId: {
|
|
60
|
-
type: ObjectId,
|
|
61
|
-
required: true,
|
|
62
|
-
},
|
|
63
|
-
createdAt: { type: Date, required: true, default: Date.now },
|
|
64
|
-
updatedAt: { type: Date, required: true, default: Date.now },
|
|
65
|
-
});
|
|
66
18
|
const preferenceCustomizationFactory = (connection, eventConnection, companyConnection) => {
|
|
67
19
|
const preferenceCustomizationSchema = new mongoose_1.Schema({
|
|
68
20
|
title: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preference-customization.entity.js","sourceRoot":"","sources":["../../../../../src/entities/models/common/entities/preference-customization.entity.ts"],"names":[],"mappings":";;;AAAA,uCAA6C;AAE7C,4EAAwE;AACxE,kFAA8E;AAC9E,8FAA0F;AAC1F,kFAA8E;AAC9E,mEAA6D;AAC7D,qEAAgE;AAGhE,6GAAkG;AAClG,+EAAqE;AAErE,MAAM,QAAQ,GAAG,iBAAM,CAAC,KAAK,CAAC,QAAQ,CAAA;AACtC,MAAM,KAAK,GAAG,iBAAM,CAAC,KAAK,CAAC,KAAK,CAAA;AAKhC,MAAa,uBAAuB;CAanC;AAbD,0DAaC;
|
|
1
|
+
{"version":3,"file":"preference-customization.entity.js","sourceRoot":"","sources":["../../../../../src/entities/models/common/entities/preference-customization.entity.ts"],"names":[],"mappings":";;;AAAA,uCAA6C;AAE7C,4EAAwE;AACxE,kFAA8E;AAC9E,8FAA0F;AAC1F,kFAA8E;AAC9E,mEAA6D;AAC7D,qEAAgE;AAGhE,6GAAkG;AAClG,+EAAqE;AAErE,MAAM,QAAQ,GAAG,iBAAM,CAAC,KAAK,CAAC,QAAQ,CAAA;AACtC,MAAM,KAAK,GAAG,iBA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,CACrE,IAAA,iCAAe,EAAC,4BAA4B,EAAE,UAAU,CAAC,CAAA;IAE3D,6BAA6B,CAAC,OAAO,CAAC,kBAAkB,GAAG,CAAC,aAAa,EAAE,EAAE,CAC3E,IAAA,uCAAkB,EAAC,+BAA+B,EAAE,aAAa,CAAC,CAAA;IAEpE,6BAA6B,CAAC,OAAO,CAAC,qBAAqB,GAAG,GAAG,EAAE,CACjE,kBAAkB,CAAA;IAEpB,6BAA6B,CAAC,GAAG,CAC/B,kBAAkB,EAClB,KAAK,WAAsB,IAAI;QAC7B,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,IAAI,IAAI,EAAE,CAAA;QACnC,IAAI,EAAE,CAAA;IACR,CAAC,CACF,CAAA;IAED,OAAO,IAAA,8BAAa,EAClB,yBAAyB,EACzB,UAAU,EACV,6BAA6B,CAC9B,CAAA;AACH,CAAC,CAAA;AA3IY,QAAA,8BAA8B,kCA2I1C"}
|
|
@@ -11,7 +11,7 @@ export declare class PreferenceCustomizationService {
|
|
|
11
11
|
private readonly preferenceCustomizationRepository;
|
|
12
12
|
userData?: User;
|
|
13
13
|
constructor(preferenceCustomizationRepository: PreferenceCustomizationRepository);
|
|
14
|
-
getPreferenceCustomizations(findPreferenceCustomizationDto: FindPreferenceCustomizationDto, eventId: string): Promise<ReadResult<PreferenceCustomization>>;
|
|
14
|
+
getPreferenceCustomizations(findPreferenceCustomizationDto: FindPreferenceCustomizationDto, eventId: string, user: HeaderUser): Promise<ReadResult<PreferenceCustomization>>;
|
|
15
15
|
getPreferenceCustomizationById(id: string, eventId: string): Promise<PreferenceCustomization>;
|
|
16
16
|
createPreferenceCustomization(createPreferenceCustomizationDto: CreatePreferenceCustomizationDto, user: HeaderUser): Promise<PreferenceCustomization>;
|
|
17
17
|
updatePreferenceCustomizationById(id: string, updatePreferenceCustomizationDto: UpdatePreferenceCustomizationDto, eventId: string): Promise<PreferenceCustomization>;
|
|
@@ -18,9 +18,10 @@ let PreferenceCustomizationService = class PreferenceCustomizationService {
|
|
|
18
18
|
constructor(preferenceCustomizationRepository) {
|
|
19
19
|
this.preferenceCustomizationRepository = preferenceCustomizationRepository;
|
|
20
20
|
}
|
|
21
|
-
async getPreferenceCustomizations(findPreferenceCustomizationDto, eventId) {
|
|
21
|
+
async getPreferenceCustomizations(findPreferenceCustomizationDto, eventId, user) {
|
|
22
22
|
findPreferenceCustomizationDto.query = (0, get_parsed_query_1.getParsedQuery)(findPreferenceCustomizationDto);
|
|
23
23
|
findPreferenceCustomizationDto.query.eventId = eventId;
|
|
24
|
+
findPreferenceCustomizationDto.query.contactId = user.contactId;
|
|
24
25
|
return await this.preferenceCustomizationRepository.read(findPreferenceCustomizationDto);
|
|
25
26
|
}
|
|
26
27
|
async getPreferenceCustomizationById(id, eventId) {
|
|
@@ -36,6 +37,7 @@ let PreferenceCustomizationService = class PreferenceCustomizationService {
|
|
|
36
37
|
...createPreferenceCustomizationDto,
|
|
37
38
|
contactId: user.contactId,
|
|
38
39
|
eventId: user.eventId,
|
|
40
|
+
companyId: user.company,
|
|
39
41
|
};
|
|
40
42
|
const createdPreferenceCustomization = await this.preferenceCustomizationRepository.create(toCreate);
|
|
41
43
|
await this.setIsDefaultToFalseForOthers(createdPreferenceCustomization);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preference-customization.service.js","sourceRoot":"","sources":["../../../../../src/entities/models/common/services/preference-customization.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,6GAAuG;AAGvG,yEAAmE;AAInE,+EAAqE;AACrE,2CAA8D;AAGvD,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IAEzC,YACmB,iCAAoE;QAApE,sCAAiC,GAAjC,iCAAiC,CAAmC;IACpF,CAAC;IAEJ,KAAK,CAAC,2BAA2B,CAC/B,8BAA8D,EAC9D,OAAe;
|
|
1
|
+
{"version":3,"file":"preference-customization.service.js","sourceRoot":"","sources":["../../../../../src/entities/models/common/services/preference-customization.service.ts"],"names":[],"mappings":";;;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