@xoxno/types 1.0.1 → 1.0.2
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/package.json +2 -2
- package/dist/cosmos-db/documents/activity/chain-activity.enum.d.ts +0 -4
- package/dist/cosmos-db/documents/activity/chain-activity.enum.js +0 -5
- package/dist/cosmos-db/documents/ticketing/entities/discount-code-validation-response.d.ts +0 -6
- package/dist/cosmos-db/documents/ticketing/entities/discount-code-validation-response.js +0 -38
- package/dist/cosmos-db/documents/ticketing/entities/event-category.enum.d.ts +0 -90
- package/dist/cosmos-db/documents/ticketing/entities/event-category.enum.js +0 -99
- package/dist/cosmos-db/documents/ticketing/entities/event-guest-approve.dto.d.ts +0 -4
- package/dist/cosmos-db/documents/ticketing/entities/event-guest-approve.dto.js +0 -32
- package/dist/cosmos-db/documents/ticketing/entities/event-guest-doc.filter.d.ts +0 -25
- package/dist/cosmos-db/documents/ticketing/entities/event-guest-doc.filter.js +0 -91
- package/dist/cosmos-db/documents/ticketing/entities/event-guest-registration.dto.d.ts +0 -23
- package/dist/cosmos-db/documents/ticketing/entities/event-guest-registration.dto.js +0 -196
- package/dist/cosmos-db/documents/ticketing/entities/event-guest-status.enum.d.ts +0 -10
- package/dist/cosmos-db/documents/ticketing/entities/event-guest-status.enum.js +0 -14
- package/dist/cosmos-db/documents/ticketing/entities/event-guest.doc.d.ts +0 -64
- package/dist/cosmos-db/documents/ticketing/entities/event-guest.doc.js +0 -387
- package/dist/cosmos-db/documents/ticketing/entities/event-invitation-create.dto.d.ts +0 -12
- package/dist/cosmos-db/documents/ticketing/entities/event-invitation-create.dto.js +0 -74
- package/dist/cosmos-db/documents/ticketing/entities/event-invitation-doc.filter.d.ts +0 -31
- package/dist/cosmos-db/documents/ticketing/entities/event-invitation-doc.filter.js +0 -99
- package/dist/cosmos-db/documents/ticketing/entities/event-invitation-status.enum.d.ts +0 -6
- package/dist/cosmos-db/documents/ticketing/entities/event-invitation-status.enum.js +0 -10
- package/dist/cosmos-db/documents/ticketing/entities/event-invitation.doc.d.ts +0 -32
- package/dist/cosmos-db/documents/ticketing/entities/event-invitation.doc.js +0 -206
- package/dist/cosmos-db/documents/ticketing/entities/event-location.d.ts +0 -14
- package/dist/cosmos-db/documents/ticketing/entities/event-location.js +0 -68
- package/dist/cosmos-db/documents/ticketing/entities/event-profile-create.dto.d.ts +0 -47
- package/dist/cosmos-db/documents/ticketing/entities/event-profile-create.dto.js +0 -269
- package/dist/cosmos-db/documents/ticketing/entities/event-profile-doc.filter.d.ts +0 -41
- package/dist/cosmos-db/documents/ticketing/entities/event-profile-doc.filter.js +0 -129
- package/dist/cosmos-db/documents/ticketing/entities/event-profile-edit.dto.d.ts +0 -14
- package/dist/cosmos-db/documents/ticketing/entities/event-profile-edit.dto.js +0 -108
- package/dist/cosmos-db/documents/ticketing/entities/event-profile.doc.d.ts +0 -93
- package/dist/cosmos-db/documents/ticketing/entities/event-profile.doc.js +0 -544
- package/dist/cosmos-db/documents/ticketing/entities/event-question-answer-type.enum.d.ts +0 -9
- package/dist/cosmos-db/documents/ticketing/entities/event-question-answer-type.enum.js +0 -13
- package/dist/cosmos-db/documents/ticketing/entities/event-question-answer.doc.d.ts +0 -23
- package/dist/cosmos-db/documents/ticketing/entities/event-question-answer.doc.js +0 -127
- package/dist/cosmos-db/documents/ticketing/entities/event-question-create.dto.d.ts +0 -8
- package/dist/cosmos-db/documents/ticketing/entities/event-question-create.dto.js +0 -61
- package/dist/cosmos-db/documents/ticketing/entities/event-question-edit.dto.d.ts +0 -8
- package/dist/cosmos-db/documents/ticketing/entities/event-question-edit.dto.js +0 -65
- package/dist/cosmos-db/documents/ticketing/entities/event-question-validator.d.ts +0 -4
- package/dist/cosmos-db/documents/ticketing/entities/event-question-validator.js +0 -32
- package/dist/cosmos-db/documents/ticketing/entities/event-question.doc.d.ts +0 -15
- package/dist/cosmos-db/documents/ticketing/entities/event-question.doc.js +0 -87
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-config-create.dto.d.ts +0 -8
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-config-create.dto.js +0 -58
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-config-edit.dto.d.ts +0 -5
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-config-edit.dto.js +0 -8
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-config-filter.doc.d.ts +0 -23
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-config-filter.doc.js +0 -116
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-config-query.doc.d.ts +0 -6
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-config-query.doc.js +0 -38
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-config.doc.d.ts +0 -27
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-config.doc.js +0 -148
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-create.dto.d.ts +0 -4
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-create.dto.js +0 -31
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-edit.dto.d.ts +0 -4
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-edit.dto.js +0 -36
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-filter.doc.d.ts +0 -31
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-filter.doc.js +0 -161
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-query.doc.d.ts +0 -6
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-query.doc.js +0 -38
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-usage.doc.d.ts +0 -16
- package/dist/cosmos-db/documents/ticketing/entities/event-referral-usage.doc.js +0 -100
- package/dist/cosmos-db/documents/ticketing/entities/event-referral.doc.d.ts +0 -14
- package/dist/cosmos-db/documents/ticketing/entities/event-referral.doc.js +0 -92
- package/dist/cosmos-db/documents/ticketing/entities/event-scan-status.enum.d.ts +0 -24
- package/dist/cosmos-db/documents/ticketing/entities/event-scan-status.enum.js +0 -46
- package/dist/cosmos-db/documents/ticketing/entities/event-stage-profile-create.dto.d.ts +0 -13
- package/dist/cosmos-db/documents/ticketing/entities/event-stage-profile-create.dto.js +0 -109
- package/dist/cosmos-db/documents/ticketing/entities/event-stage-profile-edit.dto.d.ts +0 -8
- package/dist/cosmos-db/documents/ticketing/entities/event-stage-profile-edit.dto.js +0 -48
- package/dist/cosmos-db/documents/ticketing/entities/event-stage-profile.doc.d.ts +0 -21
- package/dist/cosmos-db/documents/ticketing/entities/event-stage-profile.doc.js +0 -168
- package/dist/cosmos-db/documents/ticketing/entities/event-ticket-profile-create.dto.d.ts +0 -8
- package/dist/cosmos-db/documents/ticketing/entities/event-ticket-profile-create.dto.js +0 -74
- package/dist/cosmos-db/documents/ticketing/entities/event-ticket-profile-edit.dto.d.ts +0 -7
- package/dist/cosmos-db/documents/ticketing/entities/event-ticket-profile-edit.dto.js +0 -31
- package/dist/cosmos-db/documents/ticketing/entities/event-ticket-profile.doc.d.ts +0 -25
- package/dist/cosmos-db/documents/ticketing/entities/event-ticket-profile.doc.js +0 -166
- package/dist/cosmos-db/documents/ticketing/entities/event-ticket-qr-type.enum.d.ts +0 -43
- package/dist/cosmos-db/documents/ticketing/entities/event-ticket-qr-type.enum.js +0 -201
- package/dist/cosmos-db/documents/ticketing/entities/event-user-role-create.dto.d.ts +0 -9
- package/dist/cosmos-db/documents/ticketing/entities/event-user-role-create.dto.js +0 -69
- package/dist/cosmos-db/documents/ticketing/entities/event-user-role.doc.d.ts +0 -25
- package/dist/cosmos-db/documents/ticketing/entities/event-user-role.doc.js +0 -130
- package/dist/cosmos-db/documents/ticketing/entities/event-user-roles.enum.d.ts +0 -15
- package/dist/cosmos-db/documents/ticketing/entities/event-user-roles.enum.js +0 -20
- package/dist/cosmos-db/documents/ticketing/entities/event-voucher-create.dto.d.ts +0 -15
- package/dist/cosmos-db/documents/ticketing/entities/event-voucher-create.dto.js +0 -116
- package/dist/cosmos-db/documents/ticketing/entities/event-voucher-edit.dto.d.ts +0 -8
- package/dist/cosmos-db/documents/ticketing/entities/event-voucher-edit.dto.js +0 -48
- package/dist/cosmos-db/documents/ticketing/entities/event-voucher-filter.doc.d.ts +0 -33
- package/dist/cosmos-db/documents/ticketing/entities/event-voucher-filter.doc.js +0 -173
- package/dist/cosmos-db/documents/ticketing/entities/event-voucher.doc.d.ts +0 -33
- package/dist/cosmos-db/documents/ticketing/entities/event-voucher.doc.js +0 -189
- package/dist/cosmos-db/documents/ticketing/entities/manual-check-in.dto.d.ts +0 -5
- package/dist/cosmos-db/documents/ticketing/entities/manual-check-in.dto.js +0 -38
- package/dist/cosmos-db/documents/ticketing/entities/ticket-calculation-request.dto.d.ts +0 -6
- package/dist/cosmos-db/documents/ticketing/entities/ticket-calculation-request.dto.js +0 -38
- package/dist/cosmos-db/documents/ticketing/entities/ticket-prices-response.d.ts +0 -14
- package/dist/cosmos-db/documents/ticketing/entities/ticket-prices-response.js +0 -74
- package/dist/cosmos-db/documents/ticketing/entities/ticketing-data-type.enum.d.ts +0 -14
- package/dist/cosmos-db/documents/ticketing/entities/ticketing-data-type.enum.js +0 -18
- package/dist/cosmos-db/documents/token-data/nft-details.doc.d.ts +0 -56
- package/dist/cosmos-db/documents/token-data/nft-details.doc.js +0 -31
- package/dist/redis/keys.d.ts +0 -11
- package/dist/redis/keys.js +0 -12
- package/dist/redis/ttl.d.ts +0 -10
- package/dist/redis/ttl.js +0 -11
- package/dist/requests/collection/collection-mint-stage.doc.d.ts +0 -19
- package/dist/requests/collection/collection-mint-stage.doc.js +0 -12
- package/dist/types/common.d.ts +0 -12
- package/dist/types/common.js +0 -12
|
@@ -1,127 +0,0 @@
|
|
|
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.AnsweredQuestionWithDetails = exports.EventQuestionAnswerDto = exports.EventGuestAnswerDoc = void 0;
|
|
13
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
-
const class_validator_1 = require("class-validator");
|
|
15
|
-
const uuid_1 = require("uuid");
|
|
16
|
-
const event_question_doc_1 = require("./event-question.doc");
|
|
17
|
-
const ticketing_data_type_enum_1 = require("./ticketing-data-type.enum");
|
|
18
|
-
class EventGuestAnswerDoc {
|
|
19
|
-
constructor(partial) {
|
|
20
|
-
this.dataType = ticketing_data_type_enum_1.TicketingDataType.EVENT_QUESTION_ANSWER;
|
|
21
|
-
this.id = (0, uuid_1.v4)();
|
|
22
|
-
this.createdAt = Math.floor(Date.now() / 1000);
|
|
23
|
-
Object.assign(this, partial);
|
|
24
|
-
this.id = `${this.eventId}-${this.questionId}-${this.wallet}`;
|
|
25
|
-
this.pk = this.eventId;
|
|
26
|
-
}
|
|
27
|
-
static create(data) {
|
|
28
|
-
return new EventGuestAnswerDoc({
|
|
29
|
-
...data,
|
|
30
|
-
id: (0, uuid_1.v4)(),
|
|
31
|
-
dataType: ticketing_data_type_enum_1.TicketingDataType.EVENT_QUESTION_ANSWER,
|
|
32
|
-
createdAt: Math.floor(Date.now() / 1000),
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
exports.EventGuestAnswerDoc = EventGuestAnswerDoc;
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, swagger_1.ApiProperty)({
|
|
39
|
-
description: 'The type of event data.',
|
|
40
|
-
enum: ticketing_data_type_enum_1.TicketingDataType,
|
|
41
|
-
enumName: 'TicketingDataType',
|
|
42
|
-
default: ticketing_data_type_enum_1.TicketingDataType.EVENT_QUESTION_ANSWER,
|
|
43
|
-
}),
|
|
44
|
-
(0, class_validator_1.IsEnum)(ticketing_data_type_enum_1.TicketingDataType),
|
|
45
|
-
__metadata("design:type", String)
|
|
46
|
-
], EventGuestAnswerDoc.prototype, "dataType", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, swagger_1.ApiProperty)({
|
|
49
|
-
description: 'Unique identifier for this guest answer.',
|
|
50
|
-
example: (0, uuid_1.v4)(),
|
|
51
|
-
}),
|
|
52
|
-
(0, class_validator_1.IsUUID)(),
|
|
53
|
-
__metadata("design:type", String)
|
|
54
|
-
], EventGuestAnswerDoc.prototype, "id", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
(0, swagger_1.ApiProperty)({
|
|
57
|
-
description: 'The address of the guest who provided the answer.',
|
|
58
|
-
}),
|
|
59
|
-
(0, class_validator_1.IsString)(),
|
|
60
|
-
__metadata("design:type", String)
|
|
61
|
-
], EventGuestAnswerDoc.prototype, "wallet", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
(0, swagger_1.ApiProperty)({
|
|
64
|
-
description: 'The ID of the question that was answered.',
|
|
65
|
-
}),
|
|
66
|
-
(0, class_validator_1.IsUUID)(),
|
|
67
|
-
__metadata("design:type", String)
|
|
68
|
-
], EventGuestAnswerDoc.prototype, "questionId", void 0);
|
|
69
|
-
__decorate([
|
|
70
|
-
(0, swagger_1.ApiProperty)({
|
|
71
|
-
description: 'The event ID this answer is linked to.',
|
|
72
|
-
}),
|
|
73
|
-
(0, class_validator_1.IsUUID)(),
|
|
74
|
-
__metadata("design:type", String)
|
|
75
|
-
], EventGuestAnswerDoc.prototype, "eventId", void 0);
|
|
76
|
-
__decorate([
|
|
77
|
-
(0, swagger_1.ApiProperty)({
|
|
78
|
-
description: 'The actual answer provided by the guest.',
|
|
79
|
-
}),
|
|
80
|
-
(0, class_validator_1.IsOptional)(),
|
|
81
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
82
|
-
__metadata("design:type", Object)
|
|
83
|
-
], EventGuestAnswerDoc.prototype, "answer", void 0);
|
|
84
|
-
__decorate([
|
|
85
|
-
(0, swagger_1.ApiProperty)({
|
|
86
|
-
description: 'Timestamp when the answer was provided.',
|
|
87
|
-
example: Math.floor(Date.now() / 1000),
|
|
88
|
-
type: 'integer',
|
|
89
|
-
}),
|
|
90
|
-
(0, class_validator_1.IsInt)(),
|
|
91
|
-
__metadata("design:type", Number)
|
|
92
|
-
], EventGuestAnswerDoc.prototype, "createdAt", void 0);
|
|
93
|
-
__decorate([
|
|
94
|
-
(0, swagger_1.ApiProperty)({
|
|
95
|
-
description: 'Time to live in seconds. Only set when status is pending.',
|
|
96
|
-
required: false,
|
|
97
|
-
type: 'integer',
|
|
98
|
-
}),
|
|
99
|
-
(0, class_validator_1.IsOptional)(),
|
|
100
|
-
(0, class_validator_1.IsInt)(),
|
|
101
|
-
__metadata("design:type", Number)
|
|
102
|
-
], EventGuestAnswerDoc.prototype, "ttl", void 0);
|
|
103
|
-
class EventQuestionAnswerDto extends (0, swagger_1.PickType)(EventGuestAnswerDoc, [
|
|
104
|
-
'questionId',
|
|
105
|
-
'answer',
|
|
106
|
-
]) {
|
|
107
|
-
}
|
|
108
|
-
exports.EventQuestionAnswerDto = EventQuestionAnswerDto;
|
|
109
|
-
class AnsweredQuestionWithDetails {
|
|
110
|
-
}
|
|
111
|
-
exports.AnsweredQuestionWithDetails = AnsweredQuestionWithDetails;
|
|
112
|
-
__decorate([
|
|
113
|
-
(0, swagger_1.ApiProperty)({
|
|
114
|
-
required: false,
|
|
115
|
-
description: 'The answer provided by the guest',
|
|
116
|
-
type: () => EventGuestAnswerDoc,
|
|
117
|
-
}),
|
|
118
|
-
__metadata("design:type", EventGuestAnswerDoc)
|
|
119
|
-
], AnsweredQuestionWithDetails.prototype, "answer", void 0);
|
|
120
|
-
__decorate([
|
|
121
|
-
(0, swagger_1.ApiProperty)({
|
|
122
|
-
description: 'The question details',
|
|
123
|
-
type: () => event_question_doc_1.EventQuestionDoc,
|
|
124
|
-
required: false,
|
|
125
|
-
}),
|
|
126
|
-
__metadata("design:type", event_question_doc_1.EventQuestionDoc)
|
|
127
|
-
], AnsweredQuestionWithDetails.prototype, "question", void 0);
|
|
@@ -1,61 +0,0 @@
|
|
|
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.EventQuestionCreateDto = void 0;
|
|
13
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
-
const class_validator_1 = require("class-validator");
|
|
15
|
-
const event_question_answer_type_enum_1 = require("./event-question-answer-type.enum");
|
|
16
|
-
class EventQuestionCreateDto {
|
|
17
|
-
}
|
|
18
|
-
exports.EventQuestionCreateDto = EventQuestionCreateDto;
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, swagger_1.ApiProperty)({ description: 'The actual question text.' }),
|
|
21
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
22
|
-
(0, class_validator_1.IsString)(),
|
|
23
|
-
__metadata("design:type", String)
|
|
24
|
-
], EventQuestionCreateDto.prototype, "title", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, swagger_1.ApiProperty)({
|
|
27
|
-
description: 'Indicates whether the question is mandatory.',
|
|
28
|
-
type: 'boolean',
|
|
29
|
-
}),
|
|
30
|
-
(0, class_validator_1.IsBoolean)(),
|
|
31
|
-
__metadata("design:type", Boolean)
|
|
32
|
-
], EventQuestionCreateDto.prototype, "required", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, swagger_1.ApiProperty)({
|
|
35
|
-
description: 'Type of answer expected.',
|
|
36
|
-
enum: event_question_answer_type_enum_1.EventQuestionAnswerType,
|
|
37
|
-
enumName: 'EventQuestionAnswerType',
|
|
38
|
-
}),
|
|
39
|
-
(0, class_validator_1.IsEnum)(event_question_answer_type_enum_1.EventQuestionAnswerType),
|
|
40
|
-
__metadata("design:type", String)
|
|
41
|
-
], EventQuestionCreateDto.prototype, "answerType", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, class_validator_1.IsOptional)(),
|
|
44
|
-
(0, class_validator_1.IsBoolean)(),
|
|
45
|
-
(0, swagger_1.ApiProperty)({
|
|
46
|
-
description: 'Indicates whether the question has a time component when the answer type is date.',
|
|
47
|
-
type: 'boolean',
|
|
48
|
-
}),
|
|
49
|
-
__metadata("design:type", Boolean)
|
|
50
|
-
], EventQuestionCreateDto.prototype, "requireTime", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, swagger_1.ApiProperty)({
|
|
53
|
-
description: 'Optional array of possible answers for select-type questions.',
|
|
54
|
-
required: false,
|
|
55
|
-
}),
|
|
56
|
-
(0, class_validator_1.IsOptional)(),
|
|
57
|
-
(0, class_validator_1.IsArray)(),
|
|
58
|
-
(0, class_validator_1.ArrayUnique)(),
|
|
59
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
60
|
-
__metadata("design:type", Array)
|
|
61
|
-
], EventQuestionCreateDto.prototype, "answers", void 0);
|
|
@@ -1,65 +0,0 @@
|
|
|
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.EventQuestionEditDto = void 0;
|
|
13
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
-
const class_validator_1 = require("class-validator");
|
|
15
|
-
const event_question_answer_type_enum_1 = require("./event-question-answer-type.enum");
|
|
16
|
-
class EventQuestionEditDto {
|
|
17
|
-
}
|
|
18
|
-
exports.EventQuestionEditDto = EventQuestionEditDto;
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, swagger_1.ApiProperty)({ description: 'The actual question text.', required: false }),
|
|
21
|
-
(0, class_validator_1.IsOptional)(),
|
|
22
|
-
(0, class_validator_1.IsString)(),
|
|
23
|
-
__metadata("design:type", String)
|
|
24
|
-
], EventQuestionEditDto.prototype, "title", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, swagger_1.ApiProperty)({
|
|
27
|
-
description: 'Indicates whether the question is mandatory.',
|
|
28
|
-
required: false,
|
|
29
|
-
type: 'boolean',
|
|
30
|
-
}),
|
|
31
|
-
(0, class_validator_1.IsOptional)(),
|
|
32
|
-
(0, class_validator_1.IsBoolean)(),
|
|
33
|
-
__metadata("design:type", Boolean)
|
|
34
|
-
], EventQuestionEditDto.prototype, "required", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, swagger_1.ApiProperty)({
|
|
37
|
-
description: 'Type of answer expected.',
|
|
38
|
-
enum: event_question_answer_type_enum_1.EventQuestionAnswerType,
|
|
39
|
-
enumName: 'EventQuestionAnswerType',
|
|
40
|
-
required: false,
|
|
41
|
-
}),
|
|
42
|
-
(0, class_validator_1.IsOptional)(),
|
|
43
|
-
(0, class_validator_1.IsEnum)(event_question_answer_type_enum_1.EventQuestionAnswerType),
|
|
44
|
-
__metadata("design:type", String)
|
|
45
|
-
], EventQuestionEditDto.prototype, "answerType", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, class_validator_1.IsOptional)(),
|
|
48
|
-
(0, class_validator_1.IsBoolean)(),
|
|
49
|
-
(0, swagger_1.ApiProperty)({
|
|
50
|
-
description: 'Indicates whether the question has a time component when the answer type is date.',
|
|
51
|
-
type: 'boolean',
|
|
52
|
-
}),
|
|
53
|
-
__metadata("design:type", Boolean)
|
|
54
|
-
], EventQuestionEditDto.prototype, "requireTime", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
(0, swagger_1.ApiProperty)({
|
|
57
|
-
description: 'Optional array of possible answers for select-type questions.',
|
|
58
|
-
required: false,
|
|
59
|
-
}),
|
|
60
|
-
(0, class_validator_1.IsOptional)(),
|
|
61
|
-
(0, class_validator_1.IsArray)(),
|
|
62
|
-
(0, class_validator_1.ArrayUnique)(),
|
|
63
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
64
|
-
__metadata("design:type", Array)
|
|
65
|
-
], EventQuestionEditDto.prototype, "answers", void 0);
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EventQuestionValidator = void 0;
|
|
4
|
-
const common_1 = require("@nestjs/common");
|
|
5
|
-
const event_question_answer_type_enum_1 = require("./event-question-answer-type.enum");
|
|
6
|
-
class EventQuestionValidator {
|
|
7
|
-
static validate(question) {
|
|
8
|
-
const multipleChoiceTypes = [
|
|
9
|
-
event_question_answer_type_enum_1.EventQuestionAnswerType.RADIO,
|
|
10
|
-
event_question_answer_type_enum_1.EventQuestionAnswerType.DROPDOWN,
|
|
11
|
-
event_question_answer_type_enum_1.EventQuestionAnswerType.CHECKBOX,
|
|
12
|
-
];
|
|
13
|
-
// Check for minimum answers for certain types
|
|
14
|
-
if (multipleChoiceTypes.includes(question.answerType)) {
|
|
15
|
-
if (!question.answers || question.answers.length < 2) {
|
|
16
|
-
throw new common_1.BadRequestException(`[${question.answerType}] questions require at least 2 answer options`);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
// Ensure answers array is empty for non-multiple choice questions
|
|
20
|
-
else if (question.answers && question.answers.length > 0) {
|
|
21
|
-
throw new common_1.BadRequestException(`[${question.answerType}] questions should not have predefined answers`);
|
|
22
|
-
}
|
|
23
|
-
// Check for duplicate answers
|
|
24
|
-
if (question.answers) {
|
|
25
|
-
const uniqueAnswers = new Set(question.answers);
|
|
26
|
-
if (uniqueAnswers.size !== question.answers.length) {
|
|
27
|
-
throw new common_1.BadRequestException('Duplicate answers are not allowed');
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.EventQuestionValidator = EventQuestionValidator;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { EventQuestionAnswerType } from './event-question-answer-type.enum';
|
|
2
|
-
import { TicketingDataType } from './ticketing-data-type.enum';
|
|
3
|
-
export declare class EventQuestionDoc {
|
|
4
|
-
dataType: TicketingDataType;
|
|
5
|
-
id: string;
|
|
6
|
-
eventId: string;
|
|
7
|
-
title: string;
|
|
8
|
-
required: boolean;
|
|
9
|
-
answerType: EventQuestionAnswerType;
|
|
10
|
-
requireTime: boolean;
|
|
11
|
-
answers?: string[];
|
|
12
|
-
createdAt: number;
|
|
13
|
-
pk: string;
|
|
14
|
-
constructor(props?: Partial<EventQuestionDoc>);
|
|
15
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
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.EventQuestionDoc = void 0;
|
|
13
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
-
const class_validator_1 = require("class-validator");
|
|
15
|
-
const event_question_answer_type_enum_1 = require("./event-question-answer-type.enum");
|
|
16
|
-
const ticketing_data_type_enum_1 = require("./ticketing-data-type.enum");
|
|
17
|
-
class EventQuestionDoc {
|
|
18
|
-
constructor(props) {
|
|
19
|
-
this.dataType = ticketing_data_type_enum_1.TicketingDataType.EVENT_QUESTION;
|
|
20
|
-
this.createdAt = Math.floor(Date.now() / 1000);
|
|
21
|
-
Object.assign(this, props);
|
|
22
|
-
this.pk = this.eventId;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.EventQuestionDoc = EventQuestionDoc;
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, swagger_1.ApiProperty)({
|
|
28
|
-
description: 'The type of user data.',
|
|
29
|
-
enum: ticketing_data_type_enum_1.TicketingDataType,
|
|
30
|
-
enumName: 'TicketingDataType',
|
|
31
|
-
default: ticketing_data_type_enum_1.TicketingDataType.EVENT_QUESTION,
|
|
32
|
-
}),
|
|
33
|
-
__metadata("design:type", String)
|
|
34
|
-
], EventQuestionDoc.prototype, "dataType", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, swagger_1.ApiProperty)({
|
|
37
|
-
description: 'Automatically generated unique identifier for the question.',
|
|
38
|
-
}),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], EventQuestionDoc.prototype, "id", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, swagger_1.ApiProperty)({ description: 'Reference to the EventDoc.' }),
|
|
43
|
-
__metadata("design:type", String)
|
|
44
|
-
], EventQuestionDoc.prototype, "eventId", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, swagger_1.ApiProperty)({ description: 'The actual question text.' }),
|
|
47
|
-
__metadata("design:type", String)
|
|
48
|
-
], EventQuestionDoc.prototype, "title", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
(0, swagger_1.ApiProperty)({
|
|
51
|
-
description: 'Indicates whether the question is mandatory.',
|
|
52
|
-
type: 'boolean',
|
|
53
|
-
}),
|
|
54
|
-
(0, class_validator_1.IsBoolean)(),
|
|
55
|
-
__metadata("design:type", Boolean)
|
|
56
|
-
], EventQuestionDoc.prototype, "required", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, swagger_1.ApiProperty)({
|
|
59
|
-
description: 'Type of answer expected (e.g., text, textarea, radio, checkbox, etc.).',
|
|
60
|
-
enum: event_question_answer_type_enum_1.EventQuestionAnswerType,
|
|
61
|
-
enumName: 'EventQuestionAnswerType',
|
|
62
|
-
}),
|
|
63
|
-
__metadata("design:type", String)
|
|
64
|
-
], EventQuestionDoc.prototype, "answerType", void 0);
|
|
65
|
-
__decorate([
|
|
66
|
-
(0, swagger_1.ApiProperty)({
|
|
67
|
-
description: 'Indicates whether the question has a time component when the answer type is date.',
|
|
68
|
-
type: 'boolean',
|
|
69
|
-
}),
|
|
70
|
-
(0, class_validator_1.IsBoolean)(),
|
|
71
|
-
__metadata("design:type", Boolean)
|
|
72
|
-
], EventQuestionDoc.prototype, "requireTime", void 0);
|
|
73
|
-
__decorate([
|
|
74
|
-
(0, swagger_1.ApiProperty)({
|
|
75
|
-
description: 'Optional array of possible answers for select-type questions.',
|
|
76
|
-
}),
|
|
77
|
-
__metadata("design:type", Array)
|
|
78
|
-
], EventQuestionDoc.prototype, "answers", void 0);
|
|
79
|
-
__decorate([
|
|
80
|
-
(0, swagger_1.ApiProperty)({
|
|
81
|
-
description: 'Timestamp of question creation.',
|
|
82
|
-
example: Math.floor(Date.now() / 1000),
|
|
83
|
-
type: 'integer',
|
|
84
|
-
}),
|
|
85
|
-
(0, class_validator_1.IsInt)(),
|
|
86
|
-
__metadata("design:type", Number)
|
|
87
|
-
], EventQuestionDoc.prototype, "createdAt", void 0);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { RewardDetails } from './event-referral-config.doc';
|
|
2
|
-
import { EventVoucherDoc } from './event-voucher.doc';
|
|
3
|
-
export declare class EventReferralConfigCreateDto {
|
|
4
|
-
appliedVoucher?: Partial<EventVoucherDoc>;
|
|
5
|
-
rewardDetails?: RewardDetails;
|
|
6
|
-
isSelfService: boolean;
|
|
7
|
-
isActive: boolean;
|
|
8
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
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.EventReferralConfigCreateDto = void 0;
|
|
13
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
-
const class_transformer_1 = require("class-transformer");
|
|
15
|
-
const class_validator_1 = require("class-validator");
|
|
16
|
-
const event_referral_config_doc_1 = require("./event-referral-config.doc");
|
|
17
|
-
const event_voucher_doc_1 = require("./event-voucher.doc");
|
|
18
|
-
class EventReferralConfigCreateDto {
|
|
19
|
-
}
|
|
20
|
-
exports.EventReferralConfigCreateDto = EventReferralConfigCreateDto;
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, swagger_1.ApiProperty)({
|
|
23
|
-
description: 'Voucher automatically applied as a discount when this referral code is used.',
|
|
24
|
-
type: event_voucher_doc_1.EventVoucherDoc,
|
|
25
|
-
required: false,
|
|
26
|
-
}),
|
|
27
|
-
(0, class_validator_1.IsOptional)(),
|
|
28
|
-
(0, class_validator_1.ValidateNested)(),
|
|
29
|
-
(0, class_transformer_1.Type)(() => event_voucher_doc_1.EventVoucherDoc),
|
|
30
|
-
__metadata("design:type", Object)
|
|
31
|
-
], EventReferralConfigCreateDto.prototype, "appliedVoucher", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, swagger_1.ApiProperty)({
|
|
34
|
-
description: 'Details about the reward issued to the referral owner after certain conditions are met.',
|
|
35
|
-
type: event_referral_config_doc_1.RewardDetails,
|
|
36
|
-
required: false,
|
|
37
|
-
}),
|
|
38
|
-
(0, class_validator_1.IsOptional)(),
|
|
39
|
-
(0, class_validator_1.ValidateNested)(),
|
|
40
|
-
(0, class_transformer_1.Type)(() => event_referral_config_doc_1.RewardDetails),
|
|
41
|
-
__metadata("design:type", event_referral_config_doc_1.RewardDetails)
|
|
42
|
-
], EventReferralConfigCreateDto.prototype, "rewardDetails", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
(0, swagger_1.ApiProperty)({
|
|
45
|
-
description: 'Indicates whether normal guests can generate and share their unique referral codes for this event.',
|
|
46
|
-
type: 'boolean',
|
|
47
|
-
}),
|
|
48
|
-
(0, class_validator_1.IsBoolean)(),
|
|
49
|
-
__metadata("design:type", Boolean)
|
|
50
|
-
], EventReferralConfigCreateDto.prototype, "isSelfService", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, swagger_1.ApiProperty)({
|
|
53
|
-
description: 'Indicates whether the referral program is currently active.',
|
|
54
|
-
type: 'boolean',
|
|
55
|
-
}),
|
|
56
|
-
(0, class_validator_1.IsBoolean)(),
|
|
57
|
-
__metadata("design:type", Boolean)
|
|
58
|
-
], EventReferralConfigCreateDto.prototype, "isActive", void 0);
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { EventReferralConfigCreateDto } from './event-referral-config-create.dto';
|
|
2
|
-
declare const EventReferralConfigEditDto_base: import("@nestjs/common").Type<Partial<EventReferralConfigCreateDto>>;
|
|
3
|
-
export declare class EventReferralConfigEditDto extends EventReferralConfigEditDto_base {
|
|
4
|
-
}
|
|
5
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EventReferralConfigEditDto = void 0;
|
|
4
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
5
|
-
const event_referral_config_create_dto_1 = require("./event-referral-config-create.dto");
|
|
6
|
-
class EventReferralConfigEditDto extends (0, swagger_1.PartialType)(event_referral_config_create_dto_1.EventReferralConfigCreateDto) {
|
|
7
|
-
}
|
|
8
|
-
exports.EventReferralConfigEditDto = EventReferralConfigEditDto;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { CosmosDbGenericFilter, RangeFilter } from 'src/common/cosmos-db/entities/cosmos-db-generic-filter';
|
|
2
|
-
export declare class EventReferralConfigFilterCriteriaDto {
|
|
3
|
-
searchText?: string;
|
|
4
|
-
ownerId?: string;
|
|
5
|
-
isActive?: boolean;
|
|
6
|
-
isSelfService?: boolean;
|
|
7
|
-
createdAt?: RangeFilter[];
|
|
8
|
-
}
|
|
9
|
-
export declare class EventReferralConfigFilter extends CosmosDbGenericFilter {
|
|
10
|
-
filters: {
|
|
11
|
-
searchText?: string;
|
|
12
|
-
ownerId?: string;
|
|
13
|
-
createdBy?: string[];
|
|
14
|
-
isActive?: boolean;
|
|
15
|
-
isSelfService?: boolean;
|
|
16
|
-
createdAt?: RangeFilter[];
|
|
17
|
-
dataType?: string[];
|
|
18
|
-
eventId?: string[];
|
|
19
|
-
};
|
|
20
|
-
includeCount?: boolean;
|
|
21
|
-
constructor(props: Partial<EventReferralConfigFilter>);
|
|
22
|
-
private setPk;
|
|
23
|
-
}
|
|
@@ -1,116 +0,0 @@
|
|
|
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.EventReferralConfigFilter = exports.EventReferralConfigFilterCriteriaDto = void 0;
|
|
13
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
-
const class_transformer_1 = require("class-transformer");
|
|
15
|
-
const class_validator_1 = require("class-validator");
|
|
16
|
-
const cosmos_db_generic_filter_1 = require("src/common/cosmos-db/entities/cosmos-db-generic-filter");
|
|
17
|
-
const ticketing_data_type_enum_1 = require("./ticketing-data-type.enum");
|
|
18
|
-
class EventReferralConfigFilterCriteriaDto {
|
|
19
|
-
}
|
|
20
|
-
exports.EventReferralConfigFilterCriteriaDto = EventReferralConfigFilterCriteriaDto;
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, swagger_1.ApiProperty)({
|
|
23
|
-
required: false,
|
|
24
|
-
type: String,
|
|
25
|
-
description: 'Search text for config or other attributes.',
|
|
26
|
-
}),
|
|
27
|
-
(0, class_validator_1.IsOptional)(),
|
|
28
|
-
(0, class_validator_1.IsString)(),
|
|
29
|
-
__metadata("design:type", String)
|
|
30
|
-
], EventReferralConfigFilterCriteriaDto.prototype, "searchText", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
(0, swagger_1.ApiProperty)({
|
|
33
|
-
required: false,
|
|
34
|
-
type: String,
|
|
35
|
-
description: 'Filter by owner ID of the config.',
|
|
36
|
-
}),
|
|
37
|
-
(0, class_validator_1.IsOptional)(),
|
|
38
|
-
(0, class_validator_1.IsString)(),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], EventReferralConfigFilterCriteriaDto.prototype, "ownerId", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, swagger_1.ApiProperty)({
|
|
43
|
-
required: false,
|
|
44
|
-
type: Boolean,
|
|
45
|
-
description: 'Filter by active status of the config.',
|
|
46
|
-
}),
|
|
47
|
-
(0, class_validator_1.IsOptional)(),
|
|
48
|
-
(0, class_validator_1.IsBoolean)(),
|
|
49
|
-
__metadata("design:type", Boolean)
|
|
50
|
-
], EventReferralConfigFilterCriteriaDto.prototype, "isActive", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, swagger_1.ApiProperty)({
|
|
53
|
-
required: false,
|
|
54
|
-
type: Boolean,
|
|
55
|
-
description: 'Filter by self service status of the config.',
|
|
56
|
-
}),
|
|
57
|
-
(0, class_validator_1.IsOptional)(),
|
|
58
|
-
(0, class_validator_1.IsBoolean)(),
|
|
59
|
-
__metadata("design:type", Boolean)
|
|
60
|
-
], EventReferralConfigFilterCriteriaDto.prototype, "isSelfService", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
(0, swagger_1.ApiProperty)({
|
|
63
|
-
required: false,
|
|
64
|
-
type: cosmos_db_generic_filter_1.RangeFilter,
|
|
65
|
-
isArray: true,
|
|
66
|
-
description: 'Filter referrals within a range of dates.',
|
|
67
|
-
}),
|
|
68
|
-
(0, class_validator_1.IsOptional)(),
|
|
69
|
-
(0, class_validator_1.IsArray)(),
|
|
70
|
-
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
71
|
-
(0, class_transformer_1.Type)(() => cosmos_db_generic_filter_1.RangeFilter),
|
|
72
|
-
__metadata("design:type", Array)
|
|
73
|
-
], EventReferralConfigFilterCriteriaDto.prototype, "createdAt", void 0);
|
|
74
|
-
class EventReferralConfigFilter extends cosmos_db_generic_filter_1.CosmosDbGenericFilter {
|
|
75
|
-
constructor(props) {
|
|
76
|
-
super(props);
|
|
77
|
-
this.filters = {
|
|
78
|
-
dataType: [ticketing_data_type_enum_1.TicketingDataType.REFERRAL_CONFIG],
|
|
79
|
-
};
|
|
80
|
-
this.includeCount = false;
|
|
81
|
-
this.filters = {
|
|
82
|
-
...this.filters,
|
|
83
|
-
...props?.filters,
|
|
84
|
-
};
|
|
85
|
-
// Assign other properties if any
|
|
86
|
-
const { filters, ...otherProps } = props;
|
|
87
|
-
Object.assign(this, otherProps);
|
|
88
|
-
this.setPk();
|
|
89
|
-
}
|
|
90
|
-
setPk() {
|
|
91
|
-
const uniqueEvents = new Set();
|
|
92
|
-
if (this.filters?.eventId?.length > 0) {
|
|
93
|
-
this.filters.eventId.forEach((event) => {
|
|
94
|
-
uniqueEvents.add(event);
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
this.filters.eventId = Array.from(uniqueEvents);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
exports.EventReferralConfigFilter = EventReferralConfigFilter;
|
|
101
|
-
__decorate([
|
|
102
|
-
(0, swagger_1.ApiProperty)({
|
|
103
|
-
type: EventReferralConfigFilterCriteriaDto,
|
|
104
|
-
description: 'Criteria to filter event referral configs.',
|
|
105
|
-
}),
|
|
106
|
-
__metadata("design:type", Object)
|
|
107
|
-
], EventReferralConfigFilter.prototype, "filters", void 0);
|
|
108
|
-
__decorate([
|
|
109
|
-
(0, swagger_1.ApiProperty)({
|
|
110
|
-
required: false,
|
|
111
|
-
type: Boolean,
|
|
112
|
-
default: false,
|
|
113
|
-
description: 'Include total count of results.',
|
|
114
|
-
}),
|
|
115
|
-
__metadata("design:type", Boolean)
|
|
116
|
-
], EventReferralConfigFilter.prototype, "includeCount", void 0);
|