@eventista/ticketing-common 1.3.45-dev.0 → 1.3.45-dev.1
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/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 -10
- package/dist/schemas/event/event.schema.js +185 -16
- 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/order/order.schema.js +1 -1
- package/dist/schemas/order/order.schema.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
|
@@ -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,EAAE,aAAa,IAAI,EAAE,CAAC;IACtD,MAAM,MAAM,GAA2B,EAAE,CAAC;IAC1C,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,KAAK,MAAM,SAAS,IAAI,SAAS,CAAC,UAAU,IAAI,EAAE;YAAE,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACvG,CAAC;IACD,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAC,EAAE,EAAE;QAC1D,MAAM,QAAQ,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC;QAClE,IAAI,CAAC,QAAQ;YAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,SAAS,EAAE,CAAC,CAAC;QACxE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,CAAC,YAAY,EAAE,aAAa,EAAE,QAAQ,CAAC,aAAa,EAAE,CAAC;IACjH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,YAAY,CAAC,SAAiC;IACrD,OAAO,CAAC,CAAC,SA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AC;IAClE,CAAC;IAED,OAAO;QACL,cAAc;QACd,mBAAmB;QACnB,MAAM;QACN,WAAW;QACX,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;QACpC,kBAAkB,EAAE,MAAM,CAAC,UAAU,CAAC;QACtC,cAAc;QACd,mBAAmB;KACpB,CAAC;AACJ,CAAC"}
|
|
@@ -1,14 +1,88 @@
|
|
|
1
1
|
import { ICurrencyCode } from '../order/order.interfaces';
|
|
2
2
|
export declare enum IStatusEvent {
|
|
3
|
+
DRAFT = "DRAFT",
|
|
3
4
|
OPEN = "OPEN",
|
|
4
5
|
CLOSE = "CLOSE"
|
|
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,EAH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Document, 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;
|
|
@@ -43,9 +63,6 @@ export declare class SchemaHolderEdit {
|
|
|
43
63
|
keys: string[];
|
|
44
64
|
until?: Date;
|
|
45
65
|
}
|
|
46
|
-
export declare class SchemaCaptchaQuiz {
|
|
47
|
-
enabled: boolean;
|
|
48
|
-
}
|
|
49
66
|
export declare class SchemaParticipantSale {
|
|
50
67
|
enabled: boolean;
|
|
51
68
|
version: number;
|
|
@@ -77,15 +94,12 @@ export declare class Event extends BaseSchema {
|
|
|
77
94
|
};
|
|
78
95
|
hostedBy: String;
|
|
79
96
|
tickets: Record<string, any>[];
|
|
80
|
-
eventDescriptions:
|
|
81
|
-
title: string;
|
|
82
|
-
description: string;
|
|
83
|
-
}[];
|
|
97
|
+
eventDescriptions: IEventDescription[];
|
|
84
98
|
maxTicketPerUser: number;
|
|
85
99
|
note: string;
|
|
86
100
|
general: SchemaGeneral;
|
|
87
101
|
domain: string;
|
|
88
|
-
categories:
|
|
102
|
+
categories: Category[];
|
|
89
103
|
featuredFlg: boolean;
|
|
90
104
|
hideInMarketPlace: boolean;
|
|
91
105
|
tenantId: string;
|
|
@@ -106,9 +120,33 @@ export declare class Event extends BaseSchema {
|
|
|
106
120
|
enableMultiStepCheckin: boolean;
|
|
107
121
|
resaleEnabled: boolean;
|
|
108
122
|
sendTicketPdfEnabled: boolean;
|
|
123
|
+
displayMode: IDisplayMode;
|
|
124
|
+
guestCheckoutEnabled: boolean;
|
|
125
|
+
giftEnabled: boolean;
|
|
126
|
+
collectInfoMode: ICollectInfoMode;
|
|
127
|
+
maxTicketPerOrder: number;
|
|
128
|
+
organizer: IEventOrganizer;
|
|
129
|
+
policies: IEventPolicy[];
|
|
130
|
+
faqs: IEventFaq[];
|
|
131
|
+
saleOpenMode: IEventSaleOpenMode;
|
|
132
|
+
saleStartAt: Date | null;
|
|
133
|
+
saleCloseMode: IEventSaleCloseMode;
|
|
134
|
+
saleEndAt: Date | null;
|
|
135
|
+
saleEndAtEffective: Date | null;
|
|
136
|
+
publishedAt: Date | null;
|
|
137
|
+
saleOpenedAt: Date | null;
|
|
138
|
+
saleClosedAt: Date | null;
|
|
139
|
+
saleConfig: Record<string, any>[];
|
|
140
|
+
systemVersion: string;
|
|
141
|
+
salesMode: IEventSalesMode;
|
|
142
|
+
saleState: IEventSaleState | null;
|
|
143
|
+
saleOpenHeld?: boolean;
|
|
144
|
+
whitelistEnabled: boolean;
|
|
145
|
+
whitelistFiles: IEventWhitelistFile[];
|
|
146
|
+
whitelistInputMode?: IEventWhitelistInputMode | null;
|
|
147
|
+
whitelistInputModeChangedAt?: Date | null;
|
|
109
148
|
benefitDiscount: IBenefitDiscount;
|
|
110
149
|
participantSale?: IParticipantSaleConfig;
|
|
111
|
-
captchaQuiz: SchemaCaptchaQuiz;
|
|
112
150
|
}
|
|
113
151
|
export declare const EventSchema: import("mongoose").Schema<Event, import("mongoose").Model<Event, any, any, any, import("mongoose").Document<unknown, any, Event, any> & Event & {
|
|
114
152
|
_id: import("mongoose").Types.ObjectId;
|
|
@@ -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.
|
|
12
|
+
exports.EventSchema = exports.Event = exports.SchemaVisitor = exports.SchemaParticipantSale = 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;
|
|
@@ -162,16 +236,6 @@ __decorate([
|
|
|
162
236
|
exports.SchemaHolderEdit = SchemaHolderEdit = __decorate([
|
|
163
237
|
(0, mongoose_1.Schema)({ _id: false })
|
|
164
238
|
], SchemaHolderEdit);
|
|
165
|
-
let SchemaCaptchaQuiz = class SchemaCaptchaQuiz {
|
|
166
|
-
};
|
|
167
|
-
exports.SchemaCaptchaQuiz = SchemaCaptchaQuiz;
|
|
168
|
-
__decorate([
|
|
169
|
-
(0, mongoose_1.Prop)({ type: Boolean, default: false }),
|
|
170
|
-
__metadata("design:type", Boolean)
|
|
171
|
-
], SchemaCaptchaQuiz.prototype, "enabled", void 0);
|
|
172
|
-
exports.SchemaCaptchaQuiz = SchemaCaptchaQuiz = __decorate([
|
|
173
|
-
(0, mongoose_1.Schema)({ _id: false })
|
|
174
|
-
], SchemaCaptchaQuiz);
|
|
175
239
|
let SchemaParticipantSale = class SchemaParticipantSale {
|
|
176
240
|
};
|
|
177
241
|
exports.SchemaParticipantSale = SchemaParticipantSale;
|
|
@@ -275,6 +339,11 @@ __decorate([
|
|
|
275
339
|
startDate: { type: Date, required: true },
|
|
276
340
|
endDate: { type: Date, required: true },
|
|
277
341
|
maxTicketPerUser: { type: Number, default: -1 },
|
|
342
|
+
location: { type: String, required: false },
|
|
343
|
+
seatmapImage: { type: String, required: false },
|
|
344
|
+
ticketSelectionMode: { type: String, enum: Object.values(event_interfaces_1.IEventTicketSelectionMode), required: false },
|
|
345
|
+
venueId: { type: String, required: false },
|
|
346
|
+
sourceVenueSeatmapId: { type: String, required: false },
|
|
278
347
|
},
|
|
279
348
|
],
|
|
280
349
|
required: true,
|
|
@@ -309,6 +378,7 @@ __decorate([
|
|
|
309
378
|
{
|
|
310
379
|
title: { type: String },
|
|
311
380
|
description: { type: String },
|
|
381
|
+
order: { type: Number, default: 0 },
|
|
312
382
|
},
|
|
313
383
|
],
|
|
314
384
|
required: false,
|
|
@@ -340,7 +410,7 @@ __decorate([
|
|
|
340
410
|
__decorate([
|
|
341
411
|
(0, mongoose_1.Prop)({
|
|
342
412
|
type: [String],
|
|
343
|
-
enum:
|
|
413
|
+
enum: event_interfaces_1.EVENT_CATEGORY_VALUES,
|
|
344
414
|
default: [],
|
|
345
415
|
_id: false,
|
|
346
416
|
}),
|
|
@@ -429,6 +499,106 @@ __decorate([
|
|
|
429
499
|
(0, mongoose_1.Prop)({ type: Boolean, default: false }),
|
|
430
500
|
__metadata("design:type", Boolean)
|
|
431
501
|
], Event.prototype, "sendTicketPdfEnabled", void 0);
|
|
502
|
+
__decorate([
|
|
503
|
+
(0, mongoose_1.Prop)({ type: String, enum: Object.values(event_interfaces_1.IDisplayMode), default: event_interfaces_1.IDisplayMode.LIGHT }),
|
|
504
|
+
__metadata("design:type", String)
|
|
505
|
+
], Event.prototype, "displayMode", void 0);
|
|
506
|
+
__decorate([
|
|
507
|
+
(0, mongoose_1.Prop)({ type: Boolean, default: false }),
|
|
508
|
+
__metadata("design:type", Boolean)
|
|
509
|
+
], Event.prototype, "guestCheckoutEnabled", void 0);
|
|
510
|
+
__decorate([
|
|
511
|
+
(0, mongoose_1.Prop)({ type: Boolean, default: true }),
|
|
512
|
+
__metadata("design:type", Boolean)
|
|
513
|
+
], Event.prototype, "giftEnabled", void 0);
|
|
514
|
+
__decorate([
|
|
515
|
+
(0, mongoose_1.Prop)({ type: String, enum: Object.values(event_interfaces_1.ICollectInfoMode), default: event_interfaces_1.ICollectInfoMode.PER_ORDER }),
|
|
516
|
+
__metadata("design:type", String)
|
|
517
|
+
], Event.prototype, "collectInfoMode", void 0);
|
|
518
|
+
__decorate([
|
|
519
|
+
(0, mongoose_1.Prop)({ type: Number, default: -1 }),
|
|
520
|
+
__metadata("design:type", Number)
|
|
521
|
+
], Event.prototype, "maxTicketPerOrder", void 0);
|
|
522
|
+
__decorate([
|
|
523
|
+
(0, mongoose_1.Prop)({ type: SchemaEventOrganizer, default: {} }),
|
|
524
|
+
__metadata("design:type", Object)
|
|
525
|
+
], Event.prototype, "organizer", void 0);
|
|
526
|
+
__decorate([
|
|
527
|
+
(0, mongoose_1.Prop)({ type: [SchemaEventPolicy], default: [] }),
|
|
528
|
+
__metadata("design:type", Array)
|
|
529
|
+
], Event.prototype, "policies", void 0);
|
|
530
|
+
__decorate([
|
|
531
|
+
(0, mongoose_1.Prop)({ type: [SchemaEventFaq], default: [] }),
|
|
532
|
+
__metadata("design:type", Array)
|
|
533
|
+
], Event.prototype, "faqs", void 0);
|
|
534
|
+
__decorate([
|
|
535
|
+
(0, mongoose_1.Prop)({ type: String, enum: Object.values(event_interfaces_1.IEventSaleOpenMode), default: event_interfaces_1.IEventSaleOpenMode.IMMEDIATELY_ON_PUBLISH }),
|
|
536
|
+
__metadata("design:type", String)
|
|
537
|
+
], Event.prototype, "saleOpenMode", void 0);
|
|
538
|
+
__decorate([
|
|
539
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
540
|
+
__metadata("design:type", Date)
|
|
541
|
+
], Event.prototype, "saleStartAt", void 0);
|
|
542
|
+
__decorate([
|
|
543
|
+
(0, mongoose_1.Prop)({ type: String, enum: Object.values(event_interfaces_1.IEventSaleCloseMode), default: event_interfaces_1.IEventSaleCloseMode.AT_EVENT_START }),
|
|
544
|
+
__metadata("design:type", String)
|
|
545
|
+
], Event.prototype, "saleCloseMode", void 0);
|
|
546
|
+
__decorate([
|
|
547
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
548
|
+
__metadata("design:type", Date)
|
|
549
|
+
], Event.prototype, "saleEndAt", void 0);
|
|
550
|
+
__decorate([
|
|
551
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
552
|
+
__metadata("design:type", Date)
|
|
553
|
+
], Event.prototype, "saleEndAtEffective", void 0);
|
|
554
|
+
__decorate([
|
|
555
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
556
|
+
__metadata("design:type", Date)
|
|
557
|
+
], Event.prototype, "publishedAt", void 0);
|
|
558
|
+
__decorate([
|
|
559
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
560
|
+
__metadata("design:type", Date)
|
|
561
|
+
], Event.prototype, "saleOpenedAt", void 0);
|
|
562
|
+
__decorate([
|
|
563
|
+
(0, mongoose_1.Prop)({ type: Date, default: null }),
|
|
564
|
+
__metadata("design:type", Date)
|
|
565
|
+
], Event.prototype, "saleClosedAt", void 0);
|
|
566
|
+
__decorate([
|
|
567
|
+
(0, mongoose_1.Prop)({ type: [Object], default: [], _id: false }),
|
|
568
|
+
__metadata("design:type", Array)
|
|
569
|
+
], Event.prototype, "saleConfig", void 0);
|
|
570
|
+
__decorate([
|
|
571
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
572
|
+
__metadata("design:type", String)
|
|
573
|
+
], Event.prototype, "systemVersion", void 0);
|
|
574
|
+
__decorate([
|
|
575
|
+
(0, mongoose_1.Prop)({ enum: Object.values(event_interfaces_1.IEventSalesMode), default: event_interfaces_1.IEventSalesMode.BY_TICKET_CLASS }),
|
|
576
|
+
__metadata("design:type", String)
|
|
577
|
+
], Event.prototype, "salesMode", void 0);
|
|
578
|
+
__decorate([
|
|
579
|
+
(0, mongoose_1.Prop)({ type: String, enum: [...Object.values(event_interfaces_1.IEventSaleState), null], default: null }),
|
|
580
|
+
__metadata("design:type", String)
|
|
581
|
+
], Event.prototype, "saleState", void 0);
|
|
582
|
+
__decorate([
|
|
583
|
+
(0, mongoose_1.Prop)({ type: Boolean, required: false }),
|
|
584
|
+
__metadata("design:type", Boolean)
|
|
585
|
+
], Event.prototype, "saleOpenHeld", void 0);
|
|
586
|
+
__decorate([
|
|
587
|
+
(0, mongoose_1.Prop)({ type: Boolean, default: false }),
|
|
588
|
+
__metadata("design:type", Boolean)
|
|
589
|
+
], Event.prototype, "whitelistEnabled", void 0);
|
|
590
|
+
__decorate([
|
|
591
|
+
(0, mongoose_1.Prop)({ type: [Object], default: [], _id: false }),
|
|
592
|
+
__metadata("design:type", Array)
|
|
593
|
+
], Event.prototype, "whitelistFiles", void 0);
|
|
594
|
+
__decorate([
|
|
595
|
+
(0, mongoose_1.Prop)({ type: String, enum: [...event_interfaces_1.EVENT_WHITELIST_INPUT_MODES, null], required: false }),
|
|
596
|
+
__metadata("design:type", String)
|
|
597
|
+
], Event.prototype, "whitelistInputMode", void 0);
|
|
598
|
+
__decorate([
|
|
599
|
+
(0, mongoose_1.Prop)({ type: Date, required: false }),
|
|
600
|
+
__metadata("design:type", Date)
|
|
601
|
+
], Event.prototype, "whitelistInputModeChangedAt", void 0);
|
|
432
602
|
__decorate([
|
|
433
603
|
(0, mongoose_1.Prop)({
|
|
434
604
|
type: { bundlePercent: { type: Number, default: 0 }, topupPercent: { type: Number, default: 0 } },
|
|
@@ -441,10 +611,6 @@ __decorate([
|
|
|
441
611
|
(0, mongoose_1.Prop)({ type: SchemaParticipantSale, required: false }),
|
|
442
612
|
__metadata("design:type", Object)
|
|
443
613
|
], Event.prototype, "participantSale", void 0);
|
|
444
|
-
__decorate([
|
|
445
|
-
(0, mongoose_1.Prop)({ type: SchemaCaptchaQuiz, default: () => ({ enabled: false }) }),
|
|
446
|
-
__metadata("design:type", SchemaCaptchaQuiz)
|
|
447
|
-
], Event.prototype, "captchaQuiz", void 0);
|
|
448
614
|
exports.Event = Event = __decorate([
|
|
449
615
|
(0, mongoose_1.Schema)({
|
|
450
616
|
collection: 'events',
|
|
@@ -459,4 +625,7 @@ exports.EventSchema.index({ eventName: 1 });
|
|
|
459
625
|
exports.EventSchema.index({ pathName: 1 });
|
|
460
626
|
exports.EventSchema.index({ status: 1 });
|
|
461
627
|
exports.EventSchema.index({ tenantId: 1 });
|
|
628
|
+
exports.EventSchema.index({ tenantId: 1, status: 1, createdAt: -1 });
|
|
629
|
+
exports.EventSchema.index({ status: 1, saleStartAt: 1 });
|
|
630
|
+
exports.EventSchema.index({ status: 1, saleEndAtEffective: 1 });
|
|
462
631
|
//# sourceMappingURL=event.schema.js.map
|