@eventista/ticketing-common 1.3.47-dev.0 → 1.3.47-rc.0
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/cache/ticket-all-cache.js.map +1 -1
- package/dist/constants/order-amount.js +12 -3
- package/dist/constants/order-amount.js.map +1 -1
- package/dist/schemas/event/event.interfaces.d.ts +107 -5
- package/dist/schemas/event/event.interfaces.js +43 -1
- package/dist/schemas/event/event.interfaces.js.map +1 -1
- package/dist/schemas/event/event.schema.d.ts +48 -6
- package/dist/schemas/event/event.schema.js +185 -2
- package/dist/schemas/event/event.schema.js.map +1 -1
- package/dist/schemas/index.d.ts +3 -0
- package/dist/schemas/index.js +3 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/order/order.interfaces.d.ts +10 -4
- package/dist/schemas/order/order.interfaces.js.map +1 -1
- package/dist/schemas/promotions/promotions.interfaces.d.ts +24 -0
- package/dist/schemas/promotions/promotions.interfaces.js +6 -1
- package/dist/schemas/promotions/promotions.interfaces.js.map +1 -1
- package/dist/schemas/promotions/promotions.schema.d.ts +14 -1
- package/dist/schemas/promotions/promotions.schema.js +58 -1
- package/dist/schemas/promotions/promotions.schema.js.map +1 -1
- package/dist/schemas/rows/rows.interfaces.d.ts +1 -0
- package/dist/schemas/rows/rows.schema.d.ts +1 -0
- package/dist/schemas/rows/rows.schema.js +4 -0
- package/dist/schemas/rows/rows.schema.js.map +1 -1
- package/dist/schemas/schema.module.d.ts +24 -0
- package/dist/schemas/schema.module.js +4 -0
- package/dist/schemas/schema.module.js.map +1 -1
- package/dist/schemas/ticket-classes/ticket-classes.interfaces.d.ts +20 -0
- package/dist/schemas/ticket-classes/ticket-classes.interfaces.js +18 -1
- package/dist/schemas/ticket-classes/ticket-classes.interfaces.js.map +1 -1
- package/dist/schemas/ticket-classes/ticket-classes.schemas.d.ts +7 -1
- package/dist/schemas/ticket-classes/ticket-classes.schemas.js +34 -0
- package/dist/schemas/ticket-classes/ticket-classes.schemas.js.map +1 -1
- package/dist/schemas/tickets/tickets.interfaces.d.ts +1 -0
- package/dist/schemas/tickets/tickets.interfaces.js.map +1 -1
- package/dist/schemas/tickets/tickets.schema.d.ts +1 -0
- package/dist/schemas/tickets/tickets.schema.js +4 -0
- package/dist/schemas/tickets/tickets.schema.js.map +1 -1
- package/dist/schemas/venue/venue-seatmap.schema.d.ts +23 -0
- package/dist/schemas/venue/venue-seatmap.schema.js +62 -0
- package/dist/schemas/venue/venue-seatmap.schema.js.map +1 -0
- package/dist/schemas/venue/venue.interfaces.d.ts +32 -0
- package/dist/schemas/venue/venue.interfaces.js +6 -0
- package/dist/schemas/venue/venue.interfaces.js.map +1 -0
- package/dist/schemas/venue/venue.schema.d.ts +23 -0
- package/dist/schemas/venue/venue.schema.js +62 -0
- package/dist/schemas/venue/venue.schema.js.map +1 -0
- package/dist/schemas/zones/zone.interfaces.d.ts +39 -0
- package/dist/schemas/zones/zone.interfaces.js +30 -0
- package/dist/schemas/zones/zone.interfaces.js.map +1 -1
- package/dist/schemas/zones/zone.schema.d.ts +6 -0
- package/dist/schemas/zones/zone.schema.js +34 -0
- package/dist/schemas/zones/zone.schema.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ticket-all-cache.js","sourceRoot":"","sources":["../../src/cache/ticket-all-cache.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ticket-all-cache.js","sourceRoot":"","sources":["../../src/cache/ticket-all-cache.ts"],"names":[],"mappings":";;;AA6DA,8CAGC;AAOD,gDAGC;AAOD,4CAMC;AAWD,sDAQC;AA8DD,0DAGC;AA3KD,mCAAoC;AAEpC,+BAAiC;AACjC,+BAA4B;AAWf,QAAA,qBAAqB,GAAG,eAAe,CAAC;AAExC,QAAA,wBAAwB,GAAG,aAAa,CAAC;AAEzC,QAAA,iBAAiB,GAAG,CAAC,MAAM,EAAE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CAAC;AACd,CAAC;AASY,QAAA,mBAAmB,GAAG;;;;;;;CAOlC,CAAC;AAWW,QAAA,oBAAoB,GAAG;;;;;;;;;;CAUnC,CAAC;AAWF,SAAgB,uBAAuB,CAAC,MAAuB;IAC7D,MAAM,CAAC,aAAa,CAAC,eAAe,EAAE,EAAE,GAAG,EAAE,2BAAmB,EAAE,YAAY,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IACrG,MAAM,CAAC,aAAa,CAAC,gBAAgB,EAAE,EAAE,GAAG,EAAE,4BAAoB,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC,CAAC;AACzF,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildBenefitLines = buildBenefitLines;
|
|
4
4
|
exports.computeOrderAmount = computeOrderAmount;
|
|
5
|
+
const promotions_interfaces_1 = require("../schemas/promotions/promotions.interfaces");
|
|
5
6
|
const round2 = (n) => Math.round(n * 100) / 100;
|
|
6
7
|
function buildBenefitLines(tickets, selections, snapshots) {
|
|
7
8
|
const ticketClassId = tickets[0]?.ticketClassId ?? '';
|
|
@@ -25,12 +26,20 @@ function promotionApplies(promotion, ticketClassId) {
|
|
|
25
26
|
return true;
|
|
26
27
|
return (promotion.tickets ?? []).some((id) => String(id) === ticketClassId);
|
|
27
28
|
}
|
|
28
|
-
function
|
|
29
|
+
function percentDiscount(price, percent, maxValue) {
|
|
29
30
|
let discount = price * ((percent || 0) / 100);
|
|
30
31
|
if (maxValue && discount > maxValue)
|
|
31
32
|
discount = maxValue;
|
|
32
33
|
return discount;
|
|
33
34
|
}
|
|
35
|
+
function unitDiscount(price, promo, inUSD) {
|
|
36
|
+
if (promo.discountType === promotions_interfaces_1.IPromotionDiscountType.FIXED) {
|
|
37
|
+
return Math.min((inUSD ? promo.amountInUSD : promo.amount) || 0, price || 0);
|
|
38
|
+
}
|
|
39
|
+
return inUSD
|
|
40
|
+
? percentDiscount(price, promo.discountPercentInUSD, promo.maxValueInUSD)
|
|
41
|
+
: percentDiscount(price, promo.discountPercent, promo.maxValue);
|
|
42
|
+
}
|
|
34
43
|
function computeOrderAmount(tickets, selections, snapshots, promotion) {
|
|
35
44
|
const lines = [
|
|
36
45
|
...tickets.map((t) => ({ ...t, isBenefit: false })),
|
|
@@ -43,8 +52,8 @@ function computeOrderAmount(tickets, selections, snapshots, promotion) {
|
|
|
43
52
|
originalVn += round2(line.finalPriceVn * line.quantity);
|
|
44
53
|
originalUsd += line.finalPriceUsd * line.quantity;
|
|
45
54
|
const applies = !!promo && !line.isBenefit && promotionApplies(promo, line.ticketClassId);
|
|
46
|
-
const unitVn = applies ? unitDiscount(line.finalPriceVn, promo
|
|
47
|
-
const unitUsd = applies ? unitDiscount(line.finalPriceUsd, promo
|
|
55
|
+
const unitVn = applies ? unitDiscount(line.finalPriceVn, promo, false) : 0;
|
|
56
|
+
const unitUsd = applies ? unitDiscount(line.finalPriceUsd, promo, true) : 0;
|
|
48
57
|
const lineVn = round2((line.finalPriceVn - unitVn) * line.quantity);
|
|
49
58
|
const lineUsd = (line.finalPriceUsd - unitUsd) * line.quantity;
|
|
50
59
|
amountVn += lineVn;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-amount.js","sourceRoot":"","sources":["../../src/constants/order-amount.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"order-amount.js","sourceRoot":"","sources":["../../src/constants/order-amount.ts"],"names":[],"mappings":";;AA4BA,8CAWC;AA4BD,gDA0DC;AA5HD,uFAAqF;AAyBrF,MAAM,MAAM,GAAG,CAAC,CAAS,EAAU,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;AAEhE,SAAgB,iBAAiB,CAAC,OAAoB,EAAE,UAA+B,EAAE,SAA6B;IACpH,MAAM,aAAa,GAAG,OAAO,CAAC,CAAC,CAAC,EA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|
|
5
6
|
}
|
|
7
|
+
export declare enum IEventSaleOpenMode {
|
|
8
|
+
IMMEDIATELY_ON_PUBLISH = "immediately_on_publish",
|
|
9
|
+
SCHEDULED = "scheduled"
|
|
10
|
+
}
|
|
11
|
+
export declare enum IEventSaleCloseMode {
|
|
12
|
+
AT_EVENT_START = "at_event_start",
|
|
13
|
+
SCHEDULED = "scheduled",
|
|
14
|
+
WHEN_SOLD_OUT = "when_sold_out"
|
|
15
|
+
}
|
|
16
|
+
export declare enum IEventSaleState {
|
|
17
|
+
NOT_OPEN = "not_open",
|
|
18
|
+
ON_SALE = "on_sale",
|
|
19
|
+
STOPPED = "stopped",
|
|
20
|
+
SOLD_OUT = "sold_out"
|
|
21
|
+
}
|
|
22
|
+
export interface IEventWhitelistFile {
|
|
23
|
+
fileId: string;
|
|
24
|
+
fileName: string;
|
|
25
|
+
status: string;
|
|
26
|
+
total: number;
|
|
27
|
+
valid: number;
|
|
28
|
+
duplicate: number;
|
|
29
|
+
invalid: number;
|
|
30
|
+
existing: number;
|
|
31
|
+
inserted?: number;
|
|
32
|
+
uploadedAt: Date;
|
|
33
|
+
uploadedBy?: string;
|
|
34
|
+
error?: string;
|
|
35
|
+
}
|
|
36
|
+
export declare const EVENT_WHITELIST_INPUT_MODES: readonly ["file", "manual"];
|
|
37
|
+
export type IEventWhitelistInputMode = (typeof EVENT_WHITELIST_INPUT_MODES)[number];
|
|
38
|
+
export declare enum ICollectInfoMode {
|
|
39
|
+
PER_ORDER = "per_order",
|
|
40
|
+
PER_TICKET = "per_ticket"
|
|
41
|
+
}
|
|
42
|
+
export declare enum IEventSalesMode {
|
|
43
|
+
BY_TICKET_CLASS = "by_ticket_class",
|
|
44
|
+
BY_SEATMAP = "by_seatmap"
|
|
45
|
+
}
|
|
46
|
+
export declare enum IEventTicketSelectionMode {
|
|
47
|
+
BY_TICKET_CLASS = "by_ticket_class",
|
|
48
|
+
BY_ZONE = "by_zone",
|
|
49
|
+
BY_SEAT = "by_seat"
|
|
50
|
+
}
|
|
51
|
+
export declare enum IDisplayMode {
|
|
52
|
+
LIGHT = "light",
|
|
53
|
+
DARK = "dark"
|
|
54
|
+
}
|
|
55
|
+
export interface IEventDescription {
|
|
56
|
+
title: string;
|
|
57
|
+
description: string;
|
|
58
|
+
order?: number;
|
|
59
|
+
}
|
|
60
|
+
export interface IEventOrganizer {
|
|
61
|
+
name?: string;
|
|
62
|
+
logo?: string;
|
|
63
|
+
description?: string;
|
|
64
|
+
}
|
|
65
|
+
export interface IEventPolicy {
|
|
66
|
+
key: string;
|
|
67
|
+
title: string;
|
|
68
|
+
content: string;
|
|
69
|
+
order?: number;
|
|
70
|
+
}
|
|
71
|
+
export interface IEventFaq {
|
|
72
|
+
question: string;
|
|
73
|
+
answer: string;
|
|
74
|
+
order?: number;
|
|
75
|
+
}
|
|
6
76
|
export interface IPaymentInfoField {
|
|
7
77
|
key: string;
|
|
8
78
|
text: string;
|
|
9
79
|
type?: string;
|
|
10
80
|
isDefault?: boolean;
|
|
11
81
|
isRequired?: boolean;
|
|
82
|
+
options?: string[];
|
|
83
|
+
order?: number;
|
|
84
|
+
isShown?: boolean;
|
|
85
|
+
placeholder?: string;
|
|
12
86
|
}
|
|
13
87
|
export interface IGeneral {
|
|
14
88
|
collaboration?: 'eventista' | 'agency' | 'seatmap' | 'seatmap_zone' | 'mixed';
|
|
@@ -20,7 +94,8 @@ export interface IVisitor {
|
|
|
20
94
|
picture?: string;
|
|
21
95
|
id?: string;
|
|
22
96
|
}
|
|
23
|
-
export type Category = 'concert' | 'live_show' | 'workshop' | 'fan_meeting';
|
|
97
|
+
export type Category = 'concert' | 'live_show' | 'workshop' | 'fan_meeting' | 'theater' | 'sports_other';
|
|
98
|
+
export declare const EVENT_CATEGORY_VALUES: Category[];
|
|
24
99
|
export interface IBenefitDiscount {
|
|
25
100
|
bundlePercent: number;
|
|
26
101
|
topupPercent: number;
|
|
@@ -69,6 +144,11 @@ export interface IEventCalendar {
|
|
|
69
144
|
startDate: Date;
|
|
70
145
|
endDate: Date;
|
|
71
146
|
maxTicketPerUser?: number;
|
|
147
|
+
location?: string;
|
|
148
|
+
seatmapImage?: string | null;
|
|
149
|
+
ticketSelectionMode?: IEventTicketSelectionMode;
|
|
150
|
+
venueId?: string;
|
|
151
|
+
sourceVenueSeatmapId?: string;
|
|
72
152
|
}
|
|
73
153
|
export interface ITicketCalendar {
|
|
74
154
|
thumbnail?: string;
|
|
@@ -90,10 +170,7 @@ export interface IEvent {
|
|
|
90
170
|
ticketCalendar?: ITicketCalendar;
|
|
91
171
|
hostedBy?: string;
|
|
92
172
|
tickets: Record<string, any>[];
|
|
93
|
-
eventDescriptions?:
|
|
94
|
-
title: string;
|
|
95
|
-
description: string;
|
|
96
|
-
}[];
|
|
173
|
+
eventDescriptions?: IEventDescription[];
|
|
97
174
|
maxTicketPerUser: number;
|
|
98
175
|
note: string;
|
|
99
176
|
general?: IGeneral;
|
|
@@ -121,6 +198,31 @@ export interface IEvent {
|
|
|
121
198
|
saleMode?: string;
|
|
122
199
|
resaleEnabled?: boolean;
|
|
123
200
|
sendTicketPdfEnabled?: boolean;
|
|
201
|
+
displayMode?: IDisplayMode;
|
|
202
|
+
guestCheckoutEnabled?: boolean;
|
|
203
|
+
giftEnabled?: boolean;
|
|
204
|
+
collectInfoMode?: ICollectInfoMode;
|
|
205
|
+
maxTicketPerOrder?: number;
|
|
206
|
+
organizer?: IEventOrganizer;
|
|
207
|
+
policies?: IEventPolicy[];
|
|
208
|
+
faqs?: IEventFaq[];
|
|
209
|
+
saleOpenMode?: IEventSaleOpenMode;
|
|
210
|
+
saleStartAt?: Date | null;
|
|
211
|
+
saleCloseMode?: IEventSaleCloseMode;
|
|
212
|
+
saleEndAt?: Date | null;
|
|
213
|
+
saleEndAtEffective?: Date | null;
|
|
214
|
+
publishedAt?: Date | null;
|
|
215
|
+
saleOpenedAt?: Date | null;
|
|
216
|
+
saleClosedAt?: Date | null;
|
|
217
|
+
saleConfig?: Record<string, any>[];
|
|
218
|
+
systemVersion?: string;
|
|
219
|
+
salesMode?: IEventSalesMode;
|
|
220
|
+
saleState?: IEventSaleState | null;
|
|
221
|
+
saleOpenHeld?: boolean;
|
|
222
|
+
whitelistEnabled?: boolean;
|
|
223
|
+
whitelistFiles?: IEventWhitelistFile[];
|
|
224
|
+
whitelistInputMode?: IEventWhitelistInputMode | null;
|
|
225
|
+
whitelistInputModeChangedAt?: Date | null;
|
|
124
226
|
benefitDiscount?: IBenefitDiscount;
|
|
125
227
|
participantSale?: IParticipantSaleConfig;
|
|
126
228
|
}
|
|
@@ -1,10 +1,52 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TICKET_FIELD_TYPES = exports.IStatusEvent = void 0;
|
|
3
|
+
exports.TICKET_FIELD_TYPES = exports.EVENT_CATEGORY_VALUES = exports.IDisplayMode = exports.IEventTicketSelectionMode = exports.IEventSalesMode = exports.ICollectInfoMode = exports.EVENT_WHITELIST_INPUT_MODES = exports.IEventSaleState = exports.IEventSaleCloseMode = exports.IEventSaleOpenMode = exports.IStatusEvent = void 0;
|
|
4
4
|
var IStatusEvent;
|
|
5
5
|
(function (IStatusEvent) {
|
|
6
|
+
IStatusEvent["DRAFT"] = "DRAFT";
|
|
6
7
|
IStatusEvent["OPEN"] = "OPEN";
|
|
7
8
|
IStatusEvent["CLOSE"] = "CLOSE";
|
|
8
9
|
})(IStatusEvent || (exports.IStatusEvent = IStatusEvent = {}));
|
|
10
|
+
var IEventSaleOpenMode;
|
|
11
|
+
(function (IEventSaleOpenMode) {
|
|
12
|
+
IEventSaleOpenMode["IMMEDIATELY_ON_PUBLISH"] = "immediately_on_publish";
|
|
13
|
+
IEventSaleOpenMode["SCHEDULED"] = "scheduled";
|
|
14
|
+
})(IEventSaleOpenMode || (exports.IEventSaleOpenMode = IEventSaleOpenMode = {}));
|
|
15
|
+
var IEventSaleCloseMode;
|
|
16
|
+
(function (IEventSaleCloseMode) {
|
|
17
|
+
IEventSaleCloseMode["AT_EVENT_START"] = "at_event_start";
|
|
18
|
+
IEventSaleCloseMode["SCHEDULED"] = "scheduled";
|
|
19
|
+
IEventSaleCloseMode["WHEN_SOLD_OUT"] = "when_sold_out";
|
|
20
|
+
})(IEventSaleCloseMode || (exports.IEventSaleCloseMode = IEventSaleCloseMode = {}));
|
|
21
|
+
var IEventSaleState;
|
|
22
|
+
(function (IEventSaleState) {
|
|
23
|
+
IEventSaleState["NOT_OPEN"] = "not_open";
|
|
24
|
+
IEventSaleState["ON_SALE"] = "on_sale";
|
|
25
|
+
IEventSaleState["STOPPED"] = "stopped";
|
|
26
|
+
IEventSaleState["SOLD_OUT"] = "sold_out";
|
|
27
|
+
})(IEventSaleState || (exports.IEventSaleState = IEventSaleState = {}));
|
|
28
|
+
exports.EVENT_WHITELIST_INPUT_MODES = ['file', 'manual'];
|
|
29
|
+
var ICollectInfoMode;
|
|
30
|
+
(function (ICollectInfoMode) {
|
|
31
|
+
ICollectInfoMode["PER_ORDER"] = "per_order";
|
|
32
|
+
ICollectInfoMode["PER_TICKET"] = "per_ticket";
|
|
33
|
+
})(ICollectInfoMode || (exports.ICollectInfoMode = ICollectInfoMode = {}));
|
|
34
|
+
var IEventSalesMode;
|
|
35
|
+
(function (IEventSalesMode) {
|
|
36
|
+
IEventSalesMode["BY_TICKET_CLASS"] = "by_ticket_class";
|
|
37
|
+
IEventSalesMode["BY_SEATMAP"] = "by_seatmap";
|
|
38
|
+
})(IEventSalesMode || (exports.IEventSalesMode = IEventSalesMode = {}));
|
|
39
|
+
var IEventTicketSelectionMode;
|
|
40
|
+
(function (IEventTicketSelectionMode) {
|
|
41
|
+
IEventTicketSelectionMode["BY_TICKET_CLASS"] = "by_ticket_class";
|
|
42
|
+
IEventTicketSelectionMode["BY_ZONE"] = "by_zone";
|
|
43
|
+
IEventTicketSelectionMode["BY_SEAT"] = "by_seat";
|
|
44
|
+
})(IEventTicketSelectionMode || (exports.IEventTicketSelectionMode = IEventTicketSelectionMode = {}));
|
|
45
|
+
var IDisplayMode;
|
|
46
|
+
(function (IDisplayMode) {
|
|
47
|
+
IDisplayMode["LIGHT"] = "light";
|
|
48
|
+
IDisplayMode["DARK"] = "dark";
|
|
49
|
+
})(IDisplayMode || (exports.IDisplayMode = IDisplayMode = {}));
|
|
50
|
+
exports.EVENT_CATEGORY_VALUES = ['concert', 'live_show', 'workshop', 'fan_meeting', 'theater', 'sports_other'];
|
|
9
51
|
exports.TICKET_FIELD_TYPES = ['text', 'select', 'date', 'number', 'phone'];
|
|
10
52
|
//# sourceMappingURL=event.interfaces.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.interfaces.js","sourceRoot":"","sources":["../../../src/schemas/event/event.interfaces.ts"],"names":[],"mappings":";;;AACA,IAAY,
|
|
1
|
+
{"version":3,"file":"event.interfaces.js","sourceRoot":"","sources":["../../../src/schemas/event/event.interfaces.ts"],"names":[],"mappings":";;;AACA,IAAY,YAKX;AALD,WAAY,YAAY;IAEtB,+BAAe,CAAA;IACf,6BAAa,CAAA;IACb,+BAAe,CAAA;AACjB,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB;AAGD,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,uEAAiD,CAAA;IACjD,6CAAuB,CAAA;AACzB,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B;AAMD,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,wDAAiC,CAAA;IACjC,8CAAuB,CAAA;IACvB,sDAA+B,CAAA;AACjC,CAAC,EAJW,mBAAmB,mCAAnB,mBAAmB,QAI9B;AAMD,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,wCAAqB,CAAA;IACrB,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;IACnB,wCAAqB,CAAA;AACvB,CAAC,EALW,eAAe,+BAAf,eAAe,QAK1B;AAyBY,QAAA,2BAA2B,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAU,CAAC;AAIvE,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,2CAAuB,CAAA;IACvB,6CAAyB,CAAA;AAC3B,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AAID,IAAY,eAKX;AALD,WAAY,eAAe;IAEvB,sDAAmC,CAAA;IAEnC,4CAAyB,CAAA;AAC7B,CAAC,EALW,eAAe,+BAAf,eAAe,QAK1B;AAMD,IAAY,yBAIX;AAJD,WAAY,yBAAyB;IACjC,gEAAmC,CAAA;IACnC,gDAAmB,CAAA;IACnB,gDAAmB,CAAA;AACvB,CAAC,EAJW,yBAAyB,yCAAzB,yBAAyB,QAIpC;AAED,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,+BAAe,CAAA;IACf,6BAAa,CAAA;AACf,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB;AA0DY,QAAA,qBAAqB,GAAe,CAAC,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC;AASnH,QAAA,kBAAkB,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAU,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HydratedDocument } from 'mongoose';
|
|
2
2
|
import { BaseDocument, BaseSchema } from '../index';
|
|
3
3
|
import { ICurrencyCode } from '../order/order.interfaces';
|
|
4
|
-
import { IBenefitDiscount, IEventCalendar, IParticipantSaleConfig, ITicketFieldType } from './event.interfaces';
|
|
4
|
+
import { ICollectInfoMode, IDisplayMode, IBenefitDiscount, IEventCalendar, IEventSalesMode, IEventDescription, IEventFaq, IEventOrganizer, IEventPolicy, IEventSaleCloseMode, IEventSaleOpenMode, IEventSaleState, IEventWhitelistFile, IEventWhitelistInputMode, Category, IParticipantSaleConfig, ITicketFieldType } from './event.interfaces';
|
|
5
5
|
export type EventDocument = HydratedDocument<Event> & BaseDocument;
|
|
6
6
|
export declare class SchemaPaymentInfoField {
|
|
7
7
|
key: string;
|
|
@@ -9,6 +9,26 @@ export declare class SchemaPaymentInfoField {
|
|
|
9
9
|
type: string;
|
|
10
10
|
isDefault: boolean;
|
|
11
11
|
isRequired: boolean;
|
|
12
|
+
options: string[];
|
|
13
|
+
order: number;
|
|
14
|
+
isShown: boolean;
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare class SchemaEventOrganizer {
|
|
18
|
+
name: string;
|
|
19
|
+
logo: string;
|
|
20
|
+
description: string;
|
|
21
|
+
}
|
|
22
|
+
export declare class SchemaEventPolicy {
|
|
23
|
+
key: string;
|
|
24
|
+
title: string;
|
|
25
|
+
content: string;
|
|
26
|
+
order: number;
|
|
27
|
+
}
|
|
28
|
+
export declare class SchemaEventFaq {
|
|
29
|
+
question: string;
|
|
30
|
+
answer: string;
|
|
31
|
+
order: number;
|
|
12
32
|
}
|
|
13
33
|
export declare class SchemaGeneral {
|
|
14
34
|
collaboration: string;
|
|
@@ -77,15 +97,12 @@ export declare class Event extends BaseSchema {
|
|
|
77
97
|
};
|
|
78
98
|
hostedBy: String;
|
|
79
99
|
tickets: Record<string, any>[];
|
|
80
|
-
eventDescriptions:
|
|
81
|
-
title: string;
|
|
82
|
-
description: string;
|
|
83
|
-
}[];
|
|
100
|
+
eventDescriptions: IEventDescription[];
|
|
84
101
|
maxTicketPerUser: number;
|
|
85
102
|
note: string;
|
|
86
103
|
general: SchemaGeneral;
|
|
87
104
|
domain: string;
|
|
88
|
-
categories:
|
|
105
|
+
categories: Category[];
|
|
89
106
|
featuredFlg: boolean;
|
|
90
107
|
hideInMarketPlace: boolean;
|
|
91
108
|
tenantId: string;
|
|
@@ -106,6 +123,31 @@ export declare class Event extends BaseSchema {
|
|
|
106
123
|
enableMultiStepCheckin: boolean;
|
|
107
124
|
resaleEnabled: boolean;
|
|
108
125
|
sendTicketPdfEnabled: boolean;
|
|
126
|
+
displayMode: IDisplayMode;
|
|
127
|
+
guestCheckoutEnabled: boolean;
|
|
128
|
+
giftEnabled: boolean;
|
|
129
|
+
collectInfoMode: ICollectInfoMode;
|
|
130
|
+
maxTicketPerOrder: number;
|
|
131
|
+
organizer: IEventOrganizer;
|
|
132
|
+
policies: IEventPolicy[];
|
|
133
|
+
faqs: IEventFaq[];
|
|
134
|
+
saleOpenMode: IEventSaleOpenMode;
|
|
135
|
+
saleStartAt: Date | null;
|
|
136
|
+
saleCloseMode: IEventSaleCloseMode;
|
|
137
|
+
saleEndAt: Date | null;
|
|
138
|
+
saleEndAtEffective: Date | null;
|
|
139
|
+
publishedAt: Date | null;
|
|
140
|
+
saleOpenedAt: Date | null;
|
|
141
|
+
saleClosedAt: Date | null;
|
|
142
|
+
saleConfig: Record<string, any>[];
|
|
143
|
+
systemVersion: string;
|
|
144
|
+
salesMode: IEventSalesMode;
|
|
145
|
+
saleState: IEventSaleState | null;
|
|
146
|
+
saleOpenHeld?: boolean;
|
|
147
|
+
whitelistEnabled: boolean;
|
|
148
|
+
whitelistFiles: IEventWhitelistFile[];
|
|
149
|
+
whitelistInputMode?: IEventWhitelistInputMode | null;
|
|
150
|
+
whitelistInputModeChangedAt?: Date | null;
|
|
109
151
|
benefitDiscount: IBenefitDiscount;
|
|
110
152
|
participantSale?: IParticipantSaleConfig;
|
|
111
153
|
captchaQuiz: SchemaCaptchaQuiz;
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.EventSchema = exports.Event = exports.SchemaVisitor = exports.SchemaParticipantSale = exports.SchemaCaptchaQuiz = exports.SchemaHolderEdit = exports.SchemaParticipantSaleMode = exports.SchemaTicketField = exports.SchemaSalePhase = exports.SchemaGeneral = exports.SchemaPaymentInfoField = void 0;
|
|
12
|
+
exports.EventSchema = exports.Event = exports.SchemaVisitor = exports.SchemaParticipantSale = exports.SchemaCaptchaQuiz = exports.SchemaHolderEdit = exports.SchemaParticipantSaleMode = exports.SchemaTicketField = exports.SchemaSalePhase = exports.SchemaGeneral = exports.SchemaEventFaq = exports.SchemaEventPolicy = exports.SchemaEventOrganizer = exports.SchemaPaymentInfoField = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const index_1 = require("../index");
|
|
15
15
|
const order_interfaces_1 = require("../order/order.interfaces");
|
|
@@ -37,9 +37,83 @@ __decorate([
|
|
|
37
37
|
(0, mongoose_1.Prop)({ default: false }),
|
|
38
38
|
__metadata("design:type", Boolean)
|
|
39
39
|
], SchemaPaymentInfoField.prototype, "isRequired", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, mongoose_1.Prop)({ type: [String], default: [] }),
|
|
42
|
+
__metadata("design:type", Array)
|
|
43
|
+
], SchemaPaymentInfoField.prototype, "options", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, mongoose_1.Prop)({ type: Number, default: 0 }),
|
|
46
|
+
__metadata("design:type", Number)
|
|
47
|
+
], SchemaPaymentInfoField.prototype, "order", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, mongoose_1.Prop)({ type: Boolean, default: true }),
|
|
50
|
+
__metadata("design:type", Boolean)
|
|
51
|
+
], SchemaPaymentInfoField.prototype, "isShown", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], SchemaPaymentInfoField.prototype, "placeholder", void 0);
|
|
40
56
|
exports.SchemaPaymentInfoField = SchemaPaymentInfoField = __decorate([
|
|
41
57
|
(0, mongoose_1.Schema)({ _id: false })
|
|
42
58
|
], SchemaPaymentInfoField);
|
|
59
|
+
let SchemaEventOrganizer = class SchemaEventOrganizer {
|
|
60
|
+
};
|
|
61
|
+
exports.SchemaEventOrganizer = SchemaEventOrganizer;
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], SchemaEventOrganizer.prototype, "name", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
68
|
+
__metadata("design:type", String)
|
|
69
|
+
], SchemaEventOrganizer.prototype, "logo", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
72
|
+
__metadata("design:type", String)
|
|
73
|
+
], SchemaEventOrganizer.prototype, "description", void 0);
|
|
74
|
+
exports.SchemaEventOrganizer = SchemaEventOrganizer = __decorate([
|
|
75
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
76
|
+
], SchemaEventOrganizer);
|
|
77
|
+
let SchemaEventPolicy = class SchemaEventPolicy {
|
|
78
|
+
};
|
|
79
|
+
exports.SchemaEventPolicy = SchemaEventPolicy;
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
82
|
+
__metadata("design:type", String)
|
|
83
|
+
], SchemaEventPolicy.prototype, "key", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
86
|
+
__metadata("design:type", String)
|
|
87
|
+
], SchemaEventPolicy.prototype, "title", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, mongoose_1.Prop)({ type: String, default: '' }),
|
|
90
|
+
__metadata("design:type", String)
|
|
91
|
+
], SchemaEventPolicy.prototype, "content", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, mongoose_1.Prop)({ type: Number, default: 0 }),
|
|
94
|
+
__metadata("design:type", Number)
|
|
95
|
+
], SchemaEventPolicy.prototype, "order", void 0);
|
|
96
|
+
exports.SchemaEventPolicy = SchemaEventPolicy = __decorate([
|
|
97
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
98
|
+
], SchemaEventPolicy);
|
|
99
|
+
let SchemaEventFaq = class SchemaEventFaq {
|
|
100
|
+
};
|
|
101
|
+
exports.SchemaEventFaq = SchemaEventFaq;
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
104
|
+
__metadata("design:type", String)
|
|
105
|
+
], SchemaEventFaq.prototype, "question", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, mongoose_1.Prop)({ type: String, default: '' }),
|
|
108
|
+
__metadata("design:type", String)
|
|
109
|
+
], SchemaEventFaq.prototype, "answer", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, mongoose_1.Prop)({ type: Number, default: 0 }),
|
|
112
|
+
__metadata("design:type", Number)
|
|
113
|
+
], SchemaEventFaq.prototype, "order", void 0);
|
|
114
|
+
exports.SchemaEventFaq = SchemaEventFaq = __decorate([
|
|
115
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
116
|
+
], SchemaEventFaq);
|
|
43
117
|
let SchemaGeneral = class SchemaGeneral {
|
|
44
118
|
};
|
|
45
119
|
exports.SchemaGeneral = SchemaGeneral;
|
|
@@ -275,6 +349,11 @@ __decorate([
|
|
|
275
349
|
startDate: { type: Date, required: true },
|
|
276
350
|
endDate: { type: Date, required: true },
|
|
277
351
|
maxTicketPerUser: { type: Number, default: -1 },
|
|
352
|
+
location: { type: String, required: false },
|
|
353
|
+
seatmapImage: { type: String, required: false },
|
|
354
|
+
ticketSelectionMode: { type: String, enum: Object.values(event_interfaces_1.IEventTicketSelectionMode), required: false },
|
|
355
|
+
venueId: { type: String, required: false },
|
|
356
|
+
sourceVenueSeatmapId: { type: String, required: false },
|
|
278
357
|
},
|
|
279
358
|
],
|
|
280
359
|
required: true,
|
|
@@ -309,6 +388,7 @@ __decorate([
|
|
|
309
388
|
{
|
|
310
389
|
title: { type: String },
|
|
311
390
|
description: { type: String },
|
|
391
|
+
order: { type: Number, default: 0 },
|
|
312
392
|
},
|
|
313
393
|
],
|
|
314
394
|
required: false,
|
|
@@ -340,7 +420,7 @@ __decorate([
|
|
|
340
420
|
__decorate([
|
|
341
421
|
(0, mongoose_1.Prop)({
|
|
342
422
|
type: [String],
|
|
343
|
-
enum:
|
|
423
|
+
enum: event_interfaces_1.EVENT_CATEGORY_VALUES,
|
|
344
424
|
default: [],
|
|
345
425
|
_id: false,
|
|
346
426
|
}),
|
|
@@ -429,6 +509,106 @@ __decorate([
|
|
|
429
509
|
(0, mongoose_1.Prop)({ type: Boolean, default: false }),
|
|
430
510
|
__metadata("design:type", Boolean)
|
|
431
511
|
], Event.prototype, "sendTicketPdfEnabled", void 0);
|
|
512
|
+
__decorate([
|
|
513
|
+
(0, mongoose_1.Prop)({ type: String, enum: Object.values(event_interfaces_1.IDisplayMode), default: event_interfaces_1.IDisplayMode.LIGHT }),
|
|
514
|
+
__metadata("design:type", String)
|
|
515
|
+
], Event.prototype, "displayMode", void 0);
|
|
516
|
+
__decorate([
|
|
517
|
+
(0, mongoose_1.Prop)({ type: Boolean, default: false }),
|
|
518
|
+
__metadata("design:type", Boolean)
|
|
519
|
+
], Event.prototype, "guestCheckoutEnabled", void 0);
|
|
520
|
+
__decorate([
|
|
521
|
+
(0, mongoose_1.Prop)({ type: Boolean, default: true }),
|
|
522
|
+
__metadata("design:type", Boolean)
|
|
523
|
+
], Event.prototype, "giftEnabled", void 0);
|
|
524
|
+
__decorate([
|
|
525
|
+
(0, mongoose_1.Prop)({ type: String, enum: Object.values(event_interfaces_1.ICollectInfoMode), default: event_interfaces_1.ICollectInfoMode.PER_ORDER }),
|
|
526
|
+
__metadata("design:type", String)
|
|
527
|
+
], Event.prototype, "collectInfoMode", void 0);
|
|
528
|
+
__decorate([
|
|
529
|
+
(0, mongoose_1.Prop)({ type: Number, default: -1 }),
|
|
530
|
+
__metadata("design:type", Number)
|
|
531
|
+
], Event.prototype, "maxTicketPerOrder", void 0);
|
|
532
|
+
__decorate([
|
|
533
|
+
(0, mongoose_1.Prop)({ type: SchemaEventOrganizer, default: {} }),
|
|
534
|
+
__metadata("design:type", Object)
|
|
535
|
+
], Event.prototype, "organizer", void 0);
|
|
536
|
+
__decorate([
|
|
537
|
+
(0, mongoose_1.Prop)({ type: [SchemaEventPolicy], default: [] }),
|
|
538
|
+
__metadata("design:type", Array)
|
|
539
|
+
], Event.prototype, "policies", void 0);
|
|
540
|
+
__decorate([
|
|
541
|
+
(0, mongoose_1.Prop)({ type: [SchemaEventFaq], default: [] }),
|
|
542
|
+
__metadata("design:type", Array)
|
|
543
|
+
], Event.prototype, "faqs", void 0);
|
|
544
|
+
__decorate([
|
|
545
|
+
(0, mongoose_1.Prop)({ type: String, enum: Object.values(event_interfaces_1.IEventSaleOpenMode), default: event_interfaces_1.IEventSaleOpenMode.IMMEDIATELY_ON_PUBLISH }),
|
|
546
|
+
__metadata("design:type", String)
|
|
547
|
+
], Event.prototype, "saleOpenMode", void 0);
|
|
548
|
+
__decorate([
|
|
549
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
550
|
+
__metadata("design:type", Date)
|
|
551
|
+
], Event.prototype, "saleStartAt", void 0);
|
|
552
|
+
__decorate([
|
|
553
|
+
(0, mongoose_1.Prop)({ type: String, enum: Object.values(event_interfaces_1.IEventSaleCloseMode), default: event_interfaces_1.IEventSaleCloseMode.AT_EVENT_START }),
|
|
554
|
+
__metadata("design:type", String)
|
|
555
|
+
], Event.prototype, "saleCloseMode", void 0);
|
|
556
|
+
__decorate([
|
|
557
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
558
|
+
__metadata("design:type", Date)
|
|
559
|
+
], Event.prototype, "saleEndAt", void 0);
|
|
560
|
+
__decorate([
|
|
561
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
562
|
+
__metadata("design:type", Date)
|
|
563
|
+
], Event.prototype, "saleEndAtEffective", void 0);
|
|
564
|
+
__decorate([
|
|
565
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
566
|
+
__metadata("design:type", Date)
|
|
567
|
+
], Event.prototype, "publishedAt", void 0);
|
|
568
|
+
__decorate([
|
|
569
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
570
|
+
__metadata("design:type", Date)
|
|
571
|
+
], Event.prototype, "saleOpenedAt", void 0);
|
|
572
|
+
__decorate([
|
|
573
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
574
|
+
__metadata("design:type", Date)
|
|
575
|
+
], Event.prototype, "saleClosedAt", void 0);
|
|
576
|
+
__decorate([
|
|
577
|
+
(0, mongoose_1.Prop)({ type: [Object], default: [], _id: false }),
|
|
578
|
+
__metadata("design:type", Array)
|
|
579
|
+
], Event.prototype, "saleConfig", void 0);
|
|
580
|
+
__decorate([
|
|
581
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
582
|
+
__metadata("design:type", String)
|
|
583
|
+
], Event.prototype, "systemVersion", void 0);
|
|
584
|
+
__decorate([
|
|
585
|
+
(0, mongoose_1.Prop)({ enum: Object.values(event_interfaces_1.IEventSalesMode), default: event_interfaces_1.IEventSalesMode.BY_TICKET_CLASS }),
|
|
586
|
+
__metadata("design:type", String)
|
|
587
|
+
], Event.prototype, "salesMode", void 0);
|
|
588
|
+
__decorate([
|
|
589
|
+
(0, mongoose_1.Prop)({ type: String, enum: [...Object.values(event_interfaces_1.IEventSaleState), null], default: null }),
|
|
590
|
+
__metadata("design:type", String)
|
|
591
|
+
], Event.prototype, "saleState", void 0);
|
|
592
|
+
__decorate([
|
|
593
|
+
(0, mongoose_1.Prop)({ type: Boolean, required: false }),
|
|
594
|
+
__metadata("design:type", Boolean)
|
|
595
|
+
], Event.prototype, "saleOpenHeld", void 0);
|
|
596
|
+
__decorate([
|
|
597
|
+
(0, mongoose_1.Prop)({ type: Boolean, default: false }),
|
|
598
|
+
__metadata("design:type", Boolean)
|
|
599
|
+
], Event.prototype, "whitelistEnabled", void 0);
|
|
600
|
+
__decorate([
|
|
601
|
+
(0, mongoose_1.Prop)({ type: [Object], default: [], _id: false }),
|
|
602
|
+
__metadata("design:type", Array)
|
|
603
|
+
], Event.prototype, "whitelistFiles", void 0);
|
|
604
|
+
__decorate([
|
|
605
|
+
(0, mongoose_1.Prop)({ type: String, enum: [...event_interfaces_1.EVENT_WHITELIST_INPUT_MODES, null], required: false }),
|
|
606
|
+
__metadata("design:type", String)
|
|
607
|
+
], Event.prototype, "whitelistInputMode", void 0);
|
|
608
|
+
__decorate([
|
|
609
|
+
(0, mongoose_1.Prop)({ type: Date, required: false }),
|
|
610
|
+
__metadata("design:type", Date)
|
|
611
|
+
], Event.prototype, "whitelistInputModeChangedAt", void 0);
|
|
432
612
|
__decorate([
|
|
433
613
|
(0, mongoose_1.Prop)({
|
|
434
614
|
type: { bundlePercent: { type: Number, default: 0 }, topupPercent: { type: Number, default: 0 } },
|
|
@@ -459,4 +639,7 @@ exports.EventSchema.index({ eventName: 1 });
|
|
|
459
639
|
exports.EventSchema.index({ pathName: 1 });
|
|
460
640
|
exports.EventSchema.index({ status: 1 });
|
|
461
641
|
exports.EventSchema.index({ tenantId: 1 });
|
|
642
|
+
exports.EventSchema.index({ tenantId: 1, status: 1, createdAt: -1 });
|
|
643
|
+
exports.EventSchema.index({ status: 1, saleStartAt: 1 });
|
|
644
|
+
exports.EventSchema.index({ status: 1, saleEndAtEffective: 1 });
|
|
462
645
|
//# sourceMappingURL=event.schema.js.map
|