@eventista/ticketing-common 1.3.44-dev.0 → 1.3.45-dev.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/constants/order-amount.js +3 -12
- package/dist/constants/order-amount.js.map +1 -1
- package/dist/schemas/event/event.interfaces.d.ts +5 -107
- package/dist/schemas/event/event.interfaces.js +1 -43
- package/dist/schemas/event/event.interfaces.js.map +1 -1
- package/dist/schemas/event/event.schema.d.ts +10 -48
- package/dist/schemas/event/event.schema.js +16 -185
- package/dist/schemas/event/event.schema.js.map +1 -1
- package/dist/schemas/index.d.ts +0 -3
- package/dist/schemas/index.js +0 -3
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/order/order.interfaces.d.ts +4 -10
- package/dist/schemas/order/order.interfaces.js.map +1 -1
- package/dist/schemas/promotions/promotions.interfaces.d.ts +0 -24
- package/dist/schemas/promotions/promotions.interfaces.js +1 -6
- package/dist/schemas/promotions/promotions.interfaces.js.map +1 -1
- package/dist/schemas/promotions/promotions.schema.d.ts +1 -14
- package/dist/schemas/promotions/promotions.schema.js +1 -58
- package/dist/schemas/promotions/promotions.schema.js.map +1 -1
- package/dist/schemas/rows/rows.interfaces.d.ts +0 -1
- package/dist/schemas/rows/rows.schema.d.ts +0 -1
- package/dist/schemas/rows/rows.schema.js +0 -4
- package/dist/schemas/rows/rows.schema.js.map +1 -1
- package/dist/schemas/schema.module.d.ts +0 -24
- package/dist/schemas/schema.module.js +0 -4
- package/dist/schemas/schema.module.js.map +1 -1
- package/dist/schemas/ticket-classes/ticket-classes.interfaces.d.ts +0 -20
- package/dist/schemas/ticket-classes/ticket-classes.interfaces.js +1 -18
- package/dist/schemas/ticket-classes/ticket-classes.interfaces.js.map +1 -1
- package/dist/schemas/ticket-classes/ticket-classes.schemas.d.ts +1 -7
- package/dist/schemas/ticket-classes/ticket-classes.schemas.js +0 -34
- package/dist/schemas/ticket-classes/ticket-classes.schemas.js.map +1 -1
- package/dist/schemas/tickets/tickets.interfaces.d.ts +0 -1
- package/dist/schemas/tickets/tickets.interfaces.js.map +1 -1
- package/dist/schemas/tickets/tickets.schema.d.ts +0 -1
- package/dist/schemas/tickets/tickets.schema.js +0 -4
- package/dist/schemas/tickets/tickets.schema.js.map +1 -1
- package/dist/schemas/zones/zone.interfaces.d.ts +0 -39
- package/dist/schemas/zones/zone.interfaces.js +0 -30
- package/dist/schemas/zones/zone.interfaces.js.map +1 -1
- package/dist/schemas/zones/zone.schema.d.ts +0 -6
- package/dist/schemas/zones/zone.schema.js +0 -34
- package/dist/schemas/zones/zone.schema.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/schemas/venue/venue-seatmap.schema.d.ts +0 -23
- package/dist/schemas/venue/venue-seatmap.schema.js +0 -62
- package/dist/schemas/venue/venue-seatmap.schema.js.map +0 -1
- package/dist/schemas/venue/venue.interfaces.d.ts +0 -32
- package/dist/schemas/venue/venue.interfaces.js +0 -6
- package/dist/schemas/venue/venue.interfaces.js.map +0 -1
- package/dist/schemas/venue/venue.schema.d.ts +0 -23
- package/dist/schemas/venue/venue.schema.js +0 -62
- package/dist/schemas/venue/venue.schema.js.map +0 -1
|
@@ -2,7 +2,6 @@
|
|
|
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");
|
|
6
5
|
const round2 = (n) => Math.round(n * 100) / 100;
|
|
7
6
|
function buildBenefitLines(tickets, selections, snapshots) {
|
|
8
7
|
const ticketClassId = tickets[0]?.ticketClassId ?? '';
|
|
@@ -26,20 +25,12 @@ function promotionApplies(promotion, ticketClassId) {
|
|
|
26
25
|
return true;
|
|
27
26
|
return (promotion.tickets ?? []).some((id) => String(id) === ticketClassId);
|
|
28
27
|
}
|
|
29
|
-
function
|
|
28
|
+
function unitDiscount(price, percent, maxValue) {
|
|
30
29
|
let discount = price * ((percent || 0) / 100);
|
|
31
30
|
if (maxValue && discount > maxValue)
|
|
32
31
|
discount = maxValue;
|
|
33
32
|
return discount;
|
|
34
33
|
}
|
|
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
|
-
}
|
|
43
34
|
function computeOrderAmount(tickets, selections, snapshots, promotion) {
|
|
44
35
|
const lines = [
|
|
45
36
|
...tickets.map((t) => ({ ...t, isBenefit: false })),
|
|
@@ -52,8 +43,8 @@ function computeOrderAmount(tickets, selections, snapshots, promotion) {
|
|
|
52
43
|
originalVn += round2(line.finalPriceVn * line.quantity);
|
|
53
44
|
originalUsd += line.finalPriceUsd * line.quantity;
|
|
54
45
|
const applies = !!promo && !line.isBenefit && promotionApplies(promo, line.ticketClassId);
|
|
55
|
-
const unitVn = applies ? unitDiscount(line.finalPriceVn, promo,
|
|
56
|
-
const unitUsd = applies ? unitDiscount(line.finalPriceUsd, promo,
|
|
46
|
+
const unitVn = applies ? unitDiscount(line.finalPriceVn, promo.discountPercent, promo.maxValue) : 0;
|
|
47
|
+
const unitUsd = applies ? unitDiscount(line.finalPriceUsd, promo.discountPercentInUSD, promo.maxValueInUSD) : 0;
|
|
57
48
|
const lineVn = round2((line.finalPriceVn - unitVn) * line.quantity);
|
|
58
49
|
const lineUsd = (line.finalPriceUsd - unitUsd) * line.quantity;
|
|
59
50
|
amountVn += lineVn;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-amount.js","sourceRoot":"","sources":["../../src/constants/order-amount.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,CAAC;QACxB,CAAC;IACH,CAAC;IAED,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAC9C,MAAM,mBAAmB,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;IAChD,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAC9C,MAAM,mBAAmB,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;IAChD,IAAI,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAClC,IAAI,WAAW,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;IACpC,IAAI,KAAK,IAAI,KAAK,CAAC,gBAAgB,IAAI,cAAc,GAAG,KAAK,CAAC,gBAAgB,EAAE,CAAC;QAC/E,MAAM,GAAG,cAAc,GAAG,KAAK,CAAC,gBAAgB,CAAC;IACnD,CAAC;IACD,IAAI,KAAK,IAAI,KAAK,CAAC,qBAAqB,IAAI,mBAAmB,GAAG,KAAK,CAAC,qBAAqB,EAAE,CAAC;QAC9F,WAAW,GAAG,mBAAmB,GAAG,KAAK,CAAC,qBAAqB,CAAC;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,88 +1,14 @@
|
|
|
1
1
|
import { ICurrencyCode } from '../order/order.interfaces';
|
|
2
2
|
export declare enum IStatusEvent {
|
|
3
|
-
DRAFT = "DRAFT",
|
|
4
3
|
OPEN = "OPEN",
|
|
5
4
|
CLOSE = "CLOSE"
|
|
6
5
|
}
|
|
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
|
-
}
|
|
76
6
|
export interface IPaymentInfoField {
|
|
77
7
|
key: string;
|
|
78
8
|
text: string;
|
|
79
9
|
type?: string;
|
|
80
10
|
isDefault?: boolean;
|
|
81
11
|
isRequired?: boolean;
|
|
82
|
-
options?: string[];
|
|
83
|
-
order?: number;
|
|
84
|
-
isShown?: boolean;
|
|
85
|
-
placeholder?: string;
|
|
86
12
|
}
|
|
87
13
|
export interface IGeneral {
|
|
88
14
|
collaboration?: 'eventista' | 'agency' | 'seatmap' | 'seatmap_zone' | 'mixed';
|
|
@@ -94,8 +20,7 @@ export interface IVisitor {
|
|
|
94
20
|
picture?: string;
|
|
95
21
|
id?: string;
|
|
96
22
|
}
|
|
97
|
-
export type Category = 'concert' | 'live_show' | 'workshop' | 'fan_meeting'
|
|
98
|
-
export declare const EVENT_CATEGORY_VALUES: Category[];
|
|
23
|
+
export type Category = 'concert' | 'live_show' | 'workshop' | 'fan_meeting';
|
|
99
24
|
export interface IBenefitDiscount {
|
|
100
25
|
bundlePercent: number;
|
|
101
26
|
topupPercent: number;
|
|
@@ -144,11 +69,6 @@ export interface IEventCalendar {
|
|
|
144
69
|
startDate: Date;
|
|
145
70
|
endDate: Date;
|
|
146
71
|
maxTicketPerUser?: number;
|
|
147
|
-
location?: string;
|
|
148
|
-
seatmapImage?: string | null;
|
|
149
|
-
ticketSelectionMode?: IEventTicketSelectionMode;
|
|
150
|
-
venueId?: string;
|
|
151
|
-
sourceVenueSeatmapId?: string;
|
|
152
72
|
}
|
|
153
73
|
export interface ITicketCalendar {
|
|
154
74
|
thumbnail?: string;
|
|
@@ -170,7 +90,10 @@ export interface IEvent {
|
|
|
170
90
|
ticketCalendar?: ITicketCalendar;
|
|
171
91
|
hostedBy?: string;
|
|
172
92
|
tickets: Record<string, any>[];
|
|
173
|
-
eventDescriptions?:
|
|
93
|
+
eventDescriptions?: {
|
|
94
|
+
title: string;
|
|
95
|
+
description: string;
|
|
96
|
+
}[];
|
|
174
97
|
maxTicketPerUser: number;
|
|
175
98
|
note: string;
|
|
176
99
|
general?: IGeneral;
|
|
@@ -198,31 +121,6 @@ export interface IEvent {
|
|
|
198
121
|
saleMode?: string;
|
|
199
122
|
resaleEnabled?: boolean;
|
|
200
123
|
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;
|
|
226
124
|
benefitDiscount?: IBenefitDiscount;
|
|
227
125
|
participantSale?: IParticipantSaleConfig;
|
|
228
126
|
}
|
|
@@ -1,52 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TICKET_FIELD_TYPES = exports.
|
|
3
|
+
exports.TICKET_FIELD_TYPES = exports.IStatusEvent = void 0;
|
|
4
4
|
var IStatusEvent;
|
|
5
5
|
(function (IStatusEvent) {
|
|
6
|
-
IStatusEvent["DRAFT"] = "DRAFT";
|
|
7
6
|
IStatusEvent["OPEN"] = "OPEN";
|
|
8
7
|
IStatusEvent["CLOSE"] = "CLOSE";
|
|
9
8
|
})(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'];
|
|
51
9
|
exports.TICKET_FIELD_TYPES = ['text', 'select', 'date', 'number', 'phone'];
|
|
52
10
|
//# 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,YAGX;AAHD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,+BAAe,CAAA;AACjB,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB;AA+BY,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 {
|
|
4
|
+
import { IBenefitDiscount, IEventCalendar, IParticipantSaleConfig, ITicketFieldType } from './event.interfaces';
|
|
5
5
|
export type EventDocument = HydratedDocument<Event> & BaseDocument;
|
|
6
6
|
export declare class SchemaPaymentInfoField {
|
|
7
7
|
key: string;
|
|
@@ -9,26 +9,6 @@ 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;
|
|
32
12
|
}
|
|
33
13
|
export declare class SchemaGeneral {
|
|
34
14
|
collaboration: string;
|
|
@@ -63,6 +43,9 @@ export declare class SchemaHolderEdit {
|
|
|
63
43
|
keys: string[];
|
|
64
44
|
until?: Date;
|
|
65
45
|
}
|
|
46
|
+
export declare class SchemaCaptchaQuiz {
|
|
47
|
+
enabled: boolean;
|
|
48
|
+
}
|
|
66
49
|
export declare class SchemaParticipantSale {
|
|
67
50
|
enabled: boolean;
|
|
68
51
|
version: number;
|
|
@@ -94,12 +77,15 @@ export declare class Event extends BaseSchema {
|
|
|
94
77
|
};
|
|
95
78
|
hostedBy: String;
|
|
96
79
|
tickets: Record<string, any>[];
|
|
97
|
-
eventDescriptions:
|
|
80
|
+
eventDescriptions: {
|
|
81
|
+
title: string;
|
|
82
|
+
description: string;
|
|
83
|
+
}[];
|
|
98
84
|
maxTicketPerUser: number;
|
|
99
85
|
note: string;
|
|
100
86
|
general: SchemaGeneral;
|
|
101
87
|
domain: string;
|
|
102
|
-
categories:
|
|
88
|
+
categories: ('concert' | 'live_show' | 'workshop' | 'fan_meeting')[];
|
|
103
89
|
featuredFlg: boolean;
|
|
104
90
|
hideInMarketPlace: boolean;
|
|
105
91
|
tenantId: string;
|
|
@@ -120,33 +106,9 @@ export declare class Event extends BaseSchema {
|
|
|
120
106
|
enableMultiStepCheckin: boolean;
|
|
121
107
|
resaleEnabled: boolean;
|
|
122
108
|
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;
|
|
148
109
|
benefitDiscount: IBenefitDiscount;
|
|
149
110
|
participantSale?: IParticipantSaleConfig;
|
|
111
|
+
captchaQuiz: SchemaCaptchaQuiz;
|
|
150
112
|
}
|
|
151
113
|
export declare const EventSchema: import("mongoose").Schema<Event, import("mongoose").Model<Event, any, any, any, import("mongoose").Document<unknown, any, Event, any> & Event & {
|
|
152
114
|
_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.SchemaHolderEdit = exports.SchemaParticipantSaleMode = exports.SchemaTicketField = exports.SchemaSalePhase = exports.SchemaGeneral = exports.
|
|
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;
|
|
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,83 +37,9 @@ __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);
|
|
56
40
|
exports.SchemaPaymentInfoField = SchemaPaymentInfoField = __decorate([
|
|
57
41
|
(0, mongoose_1.Schema)({ _id: false })
|
|
58
42
|
], 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);
|
|
117
43
|
let SchemaGeneral = class SchemaGeneral {
|
|
118
44
|
};
|
|
119
45
|
exports.SchemaGeneral = SchemaGeneral;
|
|
@@ -236,6 +162,16 @@ __decorate([
|
|
|
236
162
|
exports.SchemaHolderEdit = SchemaHolderEdit = __decorate([
|
|
237
163
|
(0, mongoose_1.Schema)({ _id: false })
|
|
238
164
|
], 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);
|
|
239
175
|
let SchemaParticipantSale = class SchemaParticipantSale {
|
|
240
176
|
};
|
|
241
177
|
exports.SchemaParticipantSale = SchemaParticipantSale;
|
|
@@ -339,11 +275,6 @@ __decorate([
|
|
|
339
275
|
startDate: { type: Date, required: true },
|
|
340
276
|
endDate: { type: Date, required: true },
|
|
341
277
|
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 },
|
|
347
278
|
},
|
|
348
279
|
],
|
|
349
280
|
required: true,
|
|
@@ -378,7 +309,6 @@ __decorate([
|
|
|
378
309
|
{
|
|
379
310
|
title: { type: String },
|
|
380
311
|
description: { type: String },
|
|
381
|
-
order: { type: Number, default: 0 },
|
|
382
312
|
},
|
|
383
313
|
],
|
|
384
314
|
required: false,
|
|
@@ -410,7 +340,7 @@ __decorate([
|
|
|
410
340
|
__decorate([
|
|
411
341
|
(0, mongoose_1.Prop)({
|
|
412
342
|
type: [String],
|
|
413
|
-
enum:
|
|
343
|
+
enum: ['concert', 'live_show', 'workshop', 'fan_meeting'],
|
|
414
344
|
default: [],
|
|
415
345
|
_id: false,
|
|
416
346
|
}),
|
|
@@ -499,106 +429,6 @@ __decorate([
|
|
|
499
429
|
(0, mongoose_1.Prop)({ type: Boolean, default: false }),
|
|
500
430
|
__metadata("design:type", Boolean)
|
|
501
431
|
], 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);
|
|
602
432
|
__decorate([
|
|
603
433
|
(0, mongoose_1.Prop)({
|
|
604
434
|
type: { bundlePercent: { type: Number, default: 0 }, topupPercent: { type: Number, default: 0 } },
|
|
@@ -611,6 +441,10 @@ __decorate([
|
|
|
611
441
|
(0, mongoose_1.Prop)({ type: SchemaParticipantSale, required: false }),
|
|
612
442
|
__metadata("design:type", Object)
|
|
613
443
|
], 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);
|
|
614
448
|
exports.Event = Event = __decorate([
|
|
615
449
|
(0, mongoose_1.Schema)({
|
|
616
450
|
collection: 'events',
|
|
@@ -625,7 +459,4 @@ exports.EventSchema.index({ eventName: 1 });
|
|
|
625
459
|
exports.EventSchema.index({ pathName: 1 });
|
|
626
460
|
exports.EventSchema.index({ status: 1 });
|
|
627
461
|
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 });
|
|
631
462
|
//# sourceMappingURL=event.schema.js.map
|