@ibiliaze/global-vars 1.178.0 → 1.179.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/checkout.d.ts +1 -1
- package/dist/flows.d.ts +16 -16
- package/dist/flows.js +16 -16
- package/dist/globals.d.ts +2 -2
- package/dist/globals.js +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/ticketops/inputsDefault.d.ts +43 -75
- package/dist/ticketops/pages.d.ts +10 -23
- package/dist/ticketops/pages.js +9 -18
- package/dist/ticketops/roles/customer.d.ts +185 -0
- package/dist/ticketops/roles/customer.js +117 -0
- package/dist/ticketops/roles/event.d.ts +3 -52
- package/dist/ticketops/roles/event.js +3 -30
- package/dist/ticketops/roles/job.d.ts +1 -1
- package/dist/ticketops/roles/sale.d.ts +3 -3
- package/dist/ticketops/roles/sale.js +3 -3
- package/dist/ticketops/roles/seat.d.ts +3 -3
- package/dist/ticketops/roles/seat.js +3 -3
- package/dist/ticketops/roles/user.d.ts +17 -21
- package/dist/ticketops/roles/user.js +7 -11
- package/dist/ticketops/roles.d.ts +498 -762
- package/dist/ticketops/roles.js +6 -9
- package/package.json +2 -2
package/dist/checkout.d.ts
CHANGED
package/dist/flows.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EventCategoryBase, EventCategoryFlowBase, FlowBase, OccupanceBase, UserBase } from './ticketops/inputsDefault';
|
|
2
2
|
export declare const flows: readonly ["Online", "Offline", "Special link"];
|
|
3
3
|
export declare const idsEqual: <Id>(a: Id | null | undefined, b: Id | null | undefined) => boolean;
|
|
4
4
|
export declare const arrayHasId: <Id>(list: readonly (Id | null | undefined)[] | null | undefined, target: Id | null | undefined) => boolean;
|
|
@@ -15,24 +15,24 @@ export type SeatsByCat<Id> = {
|
|
|
15
15
|
}[];
|
|
16
16
|
export type WhereOf<Id, TDate> = FlowOf<Id, TDate>['type'];
|
|
17
17
|
type FlowOf<Id, TDate> = FlowBase<Id, TDate>;
|
|
18
|
-
type
|
|
18
|
+
type EventCategoryOf<Id> = EventCategoryBase<Id>;
|
|
19
19
|
type OccupanceCategoryOf<Id, TDate> = OccupanceBase<Id, TDate>['category'];
|
|
20
|
-
type
|
|
21
|
-
type EffectiveFlowsOf<Id> =
|
|
20
|
+
type UserFlowIdsOf<Id, TDate> = UserBase<Id, TDate>['flowIds'];
|
|
21
|
+
type EffectiveFlowsOf<Id> = EventCategoryFlowBase<Id>[];
|
|
22
22
|
export interface CanISeeSectionArgs<Id, TDate> {
|
|
23
23
|
who: Who;
|
|
24
24
|
where: WhereOf<Id, TDate>;
|
|
25
|
-
|
|
25
|
+
eventCategories: EventCategoryOf<Id>[];
|
|
26
26
|
sectionId: Id;
|
|
27
|
-
|
|
27
|
+
userFlowIds: UserFlowIdsOf<Id, TDate>;
|
|
28
28
|
signedFlowId?: Id | null;
|
|
29
29
|
}
|
|
30
30
|
export interface CanISeeSeatArgs<Id, TDate> {
|
|
31
31
|
who: Who;
|
|
32
32
|
where: WhereOf<Id, TDate>;
|
|
33
|
-
|
|
33
|
+
userFlowIds: UserFlowIdsOf<Id, TDate>;
|
|
34
34
|
occupanceCategory?: OccupanceCategoryOf<Id, TDate>;
|
|
35
|
-
|
|
35
|
+
eventCategories: EventCategoryOf<Id>[];
|
|
36
36
|
signedFlowId?: Id | null;
|
|
37
37
|
}
|
|
38
38
|
export interface AuthoriserArgs<Id, TDate> {
|
|
@@ -40,26 +40,26 @@ export interface AuthoriserArgs<Id, TDate> {
|
|
|
40
40
|
where: WhereOf<Id, TDate>;
|
|
41
41
|
signedFlowId?: Id | null;
|
|
42
42
|
effectiveFlows: EffectiveFlowsOf<Id>;
|
|
43
|
-
|
|
43
|
+
userFlowIds: UserFlowIdsOf<Id, TDate>;
|
|
44
44
|
}
|
|
45
45
|
export interface GetSectorCategoryArgs<Id> {
|
|
46
46
|
sectionId: Id;
|
|
47
|
-
|
|
47
|
+
eventCategories: EventCategoryOf<Id>[];
|
|
48
48
|
}
|
|
49
49
|
export interface GetOccupanceCategoryArgs<Id, TDate> {
|
|
50
50
|
occupanceCategory: OccupanceCategoryOf<Id, TDate>;
|
|
51
|
-
|
|
51
|
+
eventCategories: EventCategoryOf<Id>[];
|
|
52
52
|
}
|
|
53
53
|
export interface GetCategoryArgs<Id> {
|
|
54
|
-
occupanceCategory:
|
|
55
|
-
sectionCategory:
|
|
54
|
+
occupanceCategory: EventCategoryOf<Id> | undefined;
|
|
55
|
+
sectionCategory: EventCategoryOf<Id> | undefined;
|
|
56
56
|
}
|
|
57
57
|
export interface SaleLogic<Id, TDate> {
|
|
58
58
|
whereAmI(channel: Channel): WhereOf<Id, TDate>;
|
|
59
59
|
canISeeSection(args: CanISeeSectionArgs<Id, TDate>): boolean;
|
|
60
60
|
canISeeSeat(args: CanISeeSeatArgs<Id, TDate>): boolean;
|
|
61
|
-
getSectorCategory(args: GetSectorCategoryArgs<Id>):
|
|
62
|
-
getOccupanceCategory(args: GetOccupanceCategoryArgs<Id, TDate>):
|
|
63
|
-
getCategory(args: GetCategoryArgs<Id>):
|
|
61
|
+
getSectorCategory(args: GetSectorCategoryArgs<Id>): EventCategoryOf<Id> | undefined;
|
|
62
|
+
getOccupanceCategory(args: GetOccupanceCategoryArgs<Id, TDate>): EventCategoryOf<Id> | undefined;
|
|
63
|
+
getCategory(args: GetCategoryArgs<Id>): EventCategoryOf<Id> | undefined;
|
|
64
64
|
}
|
|
65
65
|
export {};
|
package/dist/flows.js
CHANGED
|
@@ -34,9 +34,9 @@ function makeSaleLogic() {
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
const guestSeesOnline = (flow) => flow.type === 'Online';
|
|
37
|
-
const cashierSeesOffline = (flow,
|
|
37
|
+
const cashierSeesOffline = (flow, userFlowIds) => flow.type === 'Offline' && (0, exports.arrayHasId)(userFlowIds, flow.flowId);
|
|
38
38
|
const comesFromSpecialLink = (flow, signedFlowId) => flow.type === 'Special link' && (0, exports.idsEqual)(flow.flowId, signedFlowId);
|
|
39
|
-
const authoriser = ({ who, where, effectiveFlows, signedFlowId,
|
|
39
|
+
const authoriser = ({ who, where, effectiveFlows, signedFlowId, userFlowIds, }) => {
|
|
40
40
|
// Guest
|
|
41
41
|
if (who === 'guest') {
|
|
42
42
|
if (where === 'Offline')
|
|
@@ -48,54 +48,54 @@ function makeSaleLogic() {
|
|
|
48
48
|
}
|
|
49
49
|
// Cashier
|
|
50
50
|
if (who === 'cashier') {
|
|
51
|
-
if (!
|
|
51
|
+
if (!userFlowIds || !userFlowIds.length)
|
|
52
52
|
return false;
|
|
53
53
|
if (where === 'Online')
|
|
54
54
|
return false;
|
|
55
55
|
if (where === 'Special link')
|
|
56
56
|
return false;
|
|
57
57
|
if (where === 'Offline')
|
|
58
|
-
return effectiveFlows.some(f => cashierSeesOffline(f,
|
|
58
|
+
return effectiveFlows.some(f => cashierSeesOffline(f, userFlowIds));
|
|
59
59
|
}
|
|
60
60
|
return false;
|
|
61
61
|
};
|
|
62
|
-
function canISeeSection({ who, where, sectionId,
|
|
62
|
+
function canISeeSection({ who, where, sectionId, userFlowIds, signedFlowId, eventCategories, }) {
|
|
63
63
|
try {
|
|
64
64
|
if (who === 'root')
|
|
65
65
|
return true;
|
|
66
|
-
if (!
|
|
66
|
+
if (!eventCategories || !eventCategories.length)
|
|
67
67
|
return false;
|
|
68
68
|
const sectionFlows = [
|
|
69
|
-
...
|
|
69
|
+
...eventCategories.flatMap(link => link.sections?.flatMap(section => ((0, exports.idsEqual)(section.sectionId, sectionId) ? section.flows : []))),
|
|
70
70
|
];
|
|
71
71
|
const categoryFlows = [
|
|
72
|
-
...
|
|
72
|
+
...eventCategories.flatMap(link => link.sections?.some(section => (0, exports.idsEqual)(section.sectionId, sectionId)) ? link.flows : []),
|
|
73
73
|
];
|
|
74
74
|
const effectiveFlows = sectionFlows.length ? sectionFlows : categoryFlows;
|
|
75
|
-
return authoriser({ who, where, effectiveFlows, signedFlowId,
|
|
75
|
+
return authoriser({ who, where, effectiveFlows, signedFlowId, userFlowIds });
|
|
76
76
|
}
|
|
77
77
|
catch {
|
|
78
78
|
return false;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
function canISeeSeat({ who, where, signedFlowId,
|
|
81
|
+
function canISeeSeat({ who, where, signedFlowId, userFlowIds, occupanceCategory, eventCategories, }) {
|
|
82
82
|
try {
|
|
83
83
|
if (who === 'root')
|
|
84
84
|
return true;
|
|
85
85
|
if (!occupanceCategory || !occupanceCategory.categoryId)
|
|
86
86
|
return true;
|
|
87
|
-
const effectiveFlows = (
|
|
87
|
+
const effectiveFlows = (eventCategories || [])
|
|
88
88
|
.filter(link => (0, exports.idsEqual)(link.categoryId, occupanceCategory.categoryId))
|
|
89
89
|
.flatMap(link => link.flows);
|
|
90
|
-
return authoriser({ who, where, effectiveFlows, signedFlowId,
|
|
90
|
+
return authoriser({ who, where, effectiveFlows, signedFlowId, userFlowIds });
|
|
91
91
|
}
|
|
92
92
|
catch {
|
|
93
93
|
return false;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
function getSectorCategory({ sectionId,
|
|
96
|
+
function getSectorCategory({ sectionId, eventCategories }) {
|
|
97
97
|
try {
|
|
98
|
-
const sectionCat =
|
|
98
|
+
const sectionCat = eventCategories?.find(link => link.sections?.some(section => (0, exports.idsEqual)(section.sectionId, sectionId)));
|
|
99
99
|
return {
|
|
100
100
|
categoryId: sectionCat?.categoryId,
|
|
101
101
|
name: sectionCat?.name ?? '',
|
|
@@ -110,9 +110,9 @@ function makeSaleLogic() {
|
|
|
110
110
|
return undefined;
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
function getOccupanceCategory({ occupanceCategory,
|
|
113
|
+
function getOccupanceCategory({ occupanceCategory, eventCategories, }) {
|
|
114
114
|
try {
|
|
115
|
-
const occupanceCat =
|
|
115
|
+
const occupanceCat = eventCategories?.find(link => (0, exports.idsEqual)(link.categoryId, occupanceCategory?.categoryId));
|
|
116
116
|
return {
|
|
117
117
|
categoryId: occupanceCat?.categoryId,
|
|
118
118
|
name: occupanceCat?.name ?? '',
|
package/dist/globals.d.ts
CHANGED
|
@@ -3,13 +3,13 @@ export interface Cart {
|
|
|
3
3
|
timer: number;
|
|
4
4
|
limit: number;
|
|
5
5
|
}
|
|
6
|
-
export interface
|
|
6
|
+
export interface Customer {
|
|
7
7
|
auth: boolean;
|
|
8
8
|
}
|
|
9
9
|
type App = 'TradeOps_a' | 'SabahFK_A' | 'SabahFK_B' | 'Sumgayit';
|
|
10
10
|
export interface Globals {
|
|
11
11
|
cart?: Cart;
|
|
12
|
-
|
|
12
|
+
customer?: Customer;
|
|
13
13
|
checkout: {
|
|
14
14
|
epoint: boolean;
|
|
15
15
|
lockTimerMs: number;
|
package/dist/globals.js
CHANGED
|
@@ -7,19 +7,19 @@ exports.globals = {
|
|
|
7
7
|
TradeOps_a: {},
|
|
8
8
|
SabahFK_A: {
|
|
9
9
|
cart: { timer: TIMER, limit: 100 },
|
|
10
|
-
|
|
10
|
+
customer: { auth: true },
|
|
11
11
|
checkout: { epoint: true, lockTimerMs: TIMER },
|
|
12
12
|
tickets: { accessControl: 'epra', pages: pages_1.pages },
|
|
13
13
|
},
|
|
14
14
|
SabahFK_B: {
|
|
15
15
|
cart: { timer: TIMER, limit: 100 },
|
|
16
|
-
|
|
16
|
+
customer: { auth: true },
|
|
17
17
|
checkout: { epoint: false, lockTimerMs: TIMER },
|
|
18
18
|
tickets: { accessControl: 'epra', pages: pages_1.pages },
|
|
19
19
|
},
|
|
20
20
|
Sumgayit: {
|
|
21
21
|
cart: { timer: TIMER, limit: 100 },
|
|
22
|
-
|
|
22
|
+
customer: { auth: true },
|
|
23
23
|
checkout: { epoint: false, lockTimerMs: TIMER },
|
|
24
24
|
tickets: { accessControl: 'tacs', pages: pages_1.pages },
|
|
25
25
|
},
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { countries } from './countries';
|
|
|
2
2
|
export { genders } from './genders';
|
|
3
3
|
export * from './flows';
|
|
4
4
|
export * from './ticketops/roles';
|
|
5
|
-
export type { Cart,
|
|
5
|
+
export type { Cart, Customer, Globals, GlobalVars } from './globals';
|
|
6
6
|
export type { Checkout, Epoint, EpointLang, Local } from './checkout';
|
|
7
7
|
export type * from './ticketops/inputsDefault';
|
|
8
8
|
export type * from './ticketops/pages';
|
|
@@ -163,16 +163,16 @@ export interface StageBase {
|
|
|
163
163
|
description?: string;
|
|
164
164
|
}
|
|
165
165
|
export interface TaskReportedByBase<Id> {
|
|
166
|
-
|
|
166
|
+
customerId?: Id;
|
|
167
167
|
signedOff?: boolean;
|
|
168
168
|
}
|
|
169
169
|
export interface TaskReviewedByBase<Id> {
|
|
170
|
-
|
|
170
|
+
customerId?: Id;
|
|
171
171
|
reviewed?: boolean;
|
|
172
172
|
}
|
|
173
173
|
export interface TaskCommentBase<Id, TDate> {
|
|
174
174
|
id: string;
|
|
175
|
-
|
|
175
|
+
customerId?: Id;
|
|
176
176
|
comment?: string;
|
|
177
177
|
date?: TDate;
|
|
178
178
|
}
|
|
@@ -181,7 +181,7 @@ export interface TaskBase<Id, TDate> {
|
|
|
181
181
|
name: string;
|
|
182
182
|
startDate?: string;
|
|
183
183
|
endDate?: string;
|
|
184
|
-
|
|
184
|
+
customerIds?: Id[];
|
|
185
185
|
type?: '' | 'discovery';
|
|
186
186
|
reportedBy?: TaskReportedByBase<Id>[];
|
|
187
187
|
reviewedBy?: TaskReviewedByBase<Id>[];
|
|
@@ -189,7 +189,7 @@ export interface TaskBase<Id, TDate> {
|
|
|
189
189
|
description?: string;
|
|
190
190
|
comments?: TaskCommentBase<Id, TDate>[];
|
|
191
191
|
}
|
|
192
|
-
export interface
|
|
192
|
+
export interface ProjectCustomerBase {
|
|
193
193
|
id: string;
|
|
194
194
|
name: string;
|
|
195
195
|
days?: number;
|
|
@@ -236,7 +236,7 @@ export interface AdminTokenBase<Id> {
|
|
|
236
236
|
_id?: Id;
|
|
237
237
|
token: string;
|
|
238
238
|
ip?: string;
|
|
239
|
-
|
|
239
|
+
customerAgent?: string;
|
|
240
240
|
city?: string;
|
|
241
241
|
region?: string;
|
|
242
242
|
country?: string;
|
|
@@ -331,35 +331,6 @@ export interface EmailBase<Id, TDate> {
|
|
|
331
331
|
createdAt?: TDate;
|
|
332
332
|
updatedAt?: TDate;
|
|
333
333
|
}
|
|
334
|
-
export interface EventBase<Id, TDate> {
|
|
335
|
-
_id?: Id;
|
|
336
|
-
email: string;
|
|
337
|
-
startTime: number;
|
|
338
|
-
endTime: number;
|
|
339
|
-
title: string;
|
|
340
|
-
eventType?: '' | 'project' | 'booking' | 'holiday' | 'meeting';
|
|
341
|
-
color?: string;
|
|
342
|
-
meetingLink?: string;
|
|
343
|
-
description?: string;
|
|
344
|
-
reminders?: number[];
|
|
345
|
-
name?: string;
|
|
346
|
-
address?: string;
|
|
347
|
-
tel?: string;
|
|
348
|
-
dob?: string;
|
|
349
|
-
paid?: boolean;
|
|
350
|
-
userId?: Id;
|
|
351
|
-
userIds?: Id[];
|
|
352
|
-
productId?: Id;
|
|
353
|
-
accountIds?: Id[];
|
|
354
|
-
price?: number;
|
|
355
|
-
attended?: boolean;
|
|
356
|
-
global?: boolean;
|
|
357
|
-
notes?: string;
|
|
358
|
-
courses?: number;
|
|
359
|
-
completedCourses?: number;
|
|
360
|
-
createdAt?: TDate;
|
|
361
|
-
updatedAt?: TDate;
|
|
362
|
-
}
|
|
363
334
|
export interface FailBase<Id, TDate> {
|
|
364
335
|
_id?: Id;
|
|
365
336
|
method?: string;
|
|
@@ -375,24 +346,24 @@ export interface FileBase<Id, TDate> {
|
|
|
375
346
|
createdAt?: TDate;
|
|
376
347
|
updatedAt?: TDate;
|
|
377
348
|
}
|
|
378
|
-
export interface
|
|
349
|
+
export interface EventCategoryFlowBase<Id> {
|
|
379
350
|
flowId: Id;
|
|
380
351
|
name: string;
|
|
381
352
|
type: FlowBase<Id, Date>['type'];
|
|
382
353
|
}
|
|
383
|
-
export interface
|
|
354
|
+
export interface EventCategoryBase<Id> {
|
|
384
355
|
categoryId: Id;
|
|
385
356
|
name: string;
|
|
386
357
|
color: string;
|
|
387
358
|
price: number;
|
|
388
|
-
flows:
|
|
359
|
+
flows: EventCategoryFlowBase<Id>[];
|
|
389
360
|
sections: {
|
|
390
361
|
sectionId: Id;
|
|
391
|
-
flows:
|
|
362
|
+
flows: EventCategoryFlowBase<Id>[];
|
|
392
363
|
}[];
|
|
393
364
|
disabled?: boolean;
|
|
394
365
|
}
|
|
395
|
-
export interface
|
|
366
|
+
export interface EventBase<Id, TDate> {
|
|
396
367
|
_id?: Id;
|
|
397
368
|
name: string;
|
|
398
369
|
date: TDate;
|
|
@@ -402,7 +373,7 @@ export interface FixtureBase<Id, TDate> {
|
|
|
402
373
|
description?: string;
|
|
403
374
|
minimumReaders?: number;
|
|
404
375
|
active?: boolean;
|
|
405
|
-
categories?:
|
|
376
|
+
categories?: EventCategoryBase<Id>[];
|
|
406
377
|
createdAt?: TDate;
|
|
407
378
|
updatedAt?: TDate;
|
|
408
379
|
}
|
|
@@ -413,7 +384,7 @@ export interface SeasonBase<Id, TDate> {
|
|
|
413
384
|
description?: string;
|
|
414
385
|
startDate: TDate;
|
|
415
386
|
endDate: TDate;
|
|
416
|
-
categories?:
|
|
387
|
+
categories?: EventCategoryBase<Id>[];
|
|
417
388
|
createdAt?: TDate;
|
|
418
389
|
updatedAt?: TDate;
|
|
419
390
|
}
|
|
@@ -430,14 +401,14 @@ export interface GroupBase<Id, TDate> {
|
|
|
430
401
|
name: string;
|
|
431
402
|
data?: string;
|
|
432
403
|
description?: string;
|
|
433
|
-
type: '
|
|
404
|
+
type: 'event' | 'product' | 'blog' | 'prospect' | 'niche' | 'template' | 'emailAttachment';
|
|
434
405
|
createdAt?: TDate;
|
|
435
406
|
updatedAt?: TDate;
|
|
436
407
|
}
|
|
437
408
|
export interface JobBase<Id, TDate> {
|
|
438
409
|
_id?: Id;
|
|
439
410
|
name: string;
|
|
440
|
-
data?: AgendaJobData<Id
|
|
411
|
+
data?: AgendaJobData<Id>;
|
|
441
412
|
type?: string;
|
|
442
413
|
priority?: number;
|
|
443
414
|
nextRunAt?: TDate;
|
|
@@ -451,15 +422,15 @@ export interface JobBase<Id, TDate> {
|
|
|
451
422
|
createdAt?: TDate;
|
|
452
423
|
updatedAt?: TDate;
|
|
453
424
|
}
|
|
454
|
-
export interface AgendaJob<Id
|
|
425
|
+
export interface AgendaJob<Id> {
|
|
455
426
|
attrs: {
|
|
456
427
|
_id: Id;
|
|
457
|
-
data: AgendaJobData<Id
|
|
428
|
+
data: AgendaJobData<Id>;
|
|
458
429
|
};
|
|
459
430
|
}
|
|
460
|
-
export interface AgendaJobData<Id
|
|
431
|
+
export interface AgendaJobData<Id> {
|
|
461
432
|
id?: string | undefined;
|
|
462
|
-
type: 'emailCampaign' | 'paymentReminder'
|
|
433
|
+
type: 'emailCampaign' | 'paymentReminder';
|
|
463
434
|
paymentReminder?: {
|
|
464
435
|
quoteId: Id;
|
|
465
436
|
quoteRef: string;
|
|
@@ -471,9 +442,6 @@ export interface AgendaJobData<Id, TDate> {
|
|
|
471
442
|
campaignId: Id;
|
|
472
443
|
groupId: Id;
|
|
473
444
|
} & CampaignStageBase<Id>;
|
|
474
|
-
eventReminder?: {
|
|
475
|
-
reminder: number;
|
|
476
|
-
} & EventBase<Id, TDate>;
|
|
477
445
|
}
|
|
478
446
|
export interface LogBase<Id, TDate> {
|
|
479
447
|
_id?: Id;
|
|
@@ -495,7 +463,7 @@ export interface NotificationBase<Id, TDate> {
|
|
|
495
463
|
}
|
|
496
464
|
export interface OccupanceSaleBase<Id> {
|
|
497
465
|
name: string;
|
|
498
|
-
|
|
466
|
+
customerId: Id;
|
|
499
467
|
email: string;
|
|
500
468
|
tel: string;
|
|
501
469
|
orderId: string;
|
|
@@ -504,7 +472,7 @@ export interface OccupanceBase<Id, TDate> {
|
|
|
504
472
|
_id?: Id;
|
|
505
473
|
seatId: Id;
|
|
506
474
|
sectionId: Id;
|
|
507
|
-
|
|
475
|
+
eventId: Id;
|
|
508
476
|
seasonId?: Id;
|
|
509
477
|
category?: {
|
|
510
478
|
categoryId: Id;
|
|
@@ -524,8 +492,8 @@ export type FlatOccupanceWithSeat<Id, TDate> = SeatBase<Id, TDate> & OccupanceBa
|
|
|
524
492
|
export type FlatOccupanceWithSeatAndPrice<Id, TDate> = FlatOccupanceWithSeat<Id, TDate> & {
|
|
525
493
|
price?: number;
|
|
526
494
|
};
|
|
527
|
-
export type
|
|
528
|
-
|
|
495
|
+
export type OccupanceWithEvent<Id, TDate> = Omit<OccupanceBase<Id, TDate>, 'eventId'> & {
|
|
496
|
+
eventId: EventBase<Id, TDate>;
|
|
529
497
|
};
|
|
530
498
|
export type OccupanceWithSeat<Id, TDate> = Omit<OccupanceBase<Id, TDate>, 'seatId'> & {
|
|
531
499
|
seatId: SeatBase<Id, TDate>;
|
|
@@ -534,8 +502,8 @@ export type OccupanceWithSeatAndSection<Id, TDate> = Omit<OccupanceBase<Id, TDat
|
|
|
534
502
|
sectionId: SectionBase<Id, TDate>;
|
|
535
503
|
seatId: SeatBase<Id, TDate>;
|
|
536
504
|
};
|
|
537
|
-
export type PopulatedOccupance<Id, TDate> = Omit<OccupanceBase<Id, TDate>, '
|
|
538
|
-
|
|
505
|
+
export type PopulatedOccupance<Id, TDate> = Omit<OccupanceBase<Id, TDate>, 'eventId' | 'sectionId' | 'seatId'> & {
|
|
506
|
+
eventId: EventBase<Id, TDate>;
|
|
539
507
|
sectionId: SectionBase<Id, TDate>;
|
|
540
508
|
seatId: SeatBase<Id, TDate>;
|
|
541
509
|
};
|
|
@@ -545,13 +513,13 @@ export type FlatOccupance<Id, TDate> = {
|
|
|
545
513
|
seatId: Id;
|
|
546
514
|
sectionName: string;
|
|
547
515
|
ticketCode: string;
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
516
|
+
eventName: string;
|
|
517
|
+
eventDate: TDate;
|
|
518
|
+
eventId: Id;
|
|
551
519
|
sectionId: Id;
|
|
552
520
|
stadiumId: string;
|
|
553
521
|
orderId: string;
|
|
554
|
-
|
|
522
|
+
customerId: Id;
|
|
555
523
|
name: string;
|
|
556
524
|
email: string;
|
|
557
525
|
tel: string;
|
|
@@ -760,7 +728,7 @@ export type ItemWithTimeLeftBase<TId, TDate> = ItemBase<TId, TDate> & {
|
|
|
760
728
|
};
|
|
761
729
|
export interface SaleBase<Id, TDate> {
|
|
762
730
|
_id?: Id;
|
|
763
|
-
|
|
731
|
+
customerId: Id;
|
|
764
732
|
email: string;
|
|
765
733
|
saleName?: string;
|
|
766
734
|
customerName?: string;
|
|
@@ -811,17 +779,17 @@ export interface SectionBase<Id, TDate> {
|
|
|
811
779
|
createdAt?: TDate;
|
|
812
780
|
updatedAt?: TDate;
|
|
813
781
|
}
|
|
814
|
-
export interface
|
|
782
|
+
export interface UserTokenBase<Id> {
|
|
815
783
|
_id?: Id;
|
|
816
784
|
token: string;
|
|
817
785
|
ip?: string;
|
|
818
|
-
|
|
786
|
+
userAgent?: string;
|
|
819
787
|
city?: string;
|
|
820
788
|
region?: string;
|
|
821
789
|
country?: string;
|
|
822
790
|
loc?: string;
|
|
823
791
|
}
|
|
824
|
-
export interface
|
|
792
|
+
export interface UserBase<Id, TDate> {
|
|
825
793
|
_id?: Id;
|
|
826
794
|
email: string;
|
|
827
795
|
password: string;
|
|
@@ -830,27 +798,27 @@ export interface StaffBase<Id, TDate> {
|
|
|
830
798
|
avatar?: string;
|
|
831
799
|
roles?: Id[];
|
|
832
800
|
flowIds?: Id[];
|
|
833
|
-
tokens?:
|
|
801
|
+
tokens?: UserTokenBase<Id>[];
|
|
834
802
|
createdAt?: TDate;
|
|
835
803
|
updatedAt?: TDate;
|
|
836
804
|
}
|
|
837
|
-
export type
|
|
805
|
+
export type UserTypeWithPopulatedRolesBase<Id, TDate> = UserBase<Id, TDate> & {
|
|
838
806
|
populatedRoles: RoleBase<Id, TDate>[];
|
|
839
807
|
};
|
|
840
|
-
export interface
|
|
808
|
+
export interface CustomerTokenBase<Id> {
|
|
841
809
|
_id?: Id;
|
|
842
810
|
token: string;
|
|
843
811
|
ip?: string;
|
|
844
|
-
|
|
812
|
+
customerAgent?: string;
|
|
845
813
|
city?: string;
|
|
846
814
|
region?: string;
|
|
847
815
|
country?: string;
|
|
848
816
|
loc?: string;
|
|
849
817
|
}
|
|
850
|
-
export interface
|
|
818
|
+
export interface CustomerBase<Id, TDate> {
|
|
851
819
|
_id?: Id;
|
|
852
820
|
email: string;
|
|
853
|
-
|
|
821
|
+
customername: string;
|
|
854
822
|
password: string;
|
|
855
823
|
tel: string;
|
|
856
824
|
name: string;
|
|
@@ -860,7 +828,7 @@ export interface UserBase<Id, TDate> {
|
|
|
860
828
|
country?: (typeof countries)[number];
|
|
861
829
|
language?: string;
|
|
862
830
|
gender?: (typeof genders)[number];
|
|
863
|
-
tokens?:
|
|
831
|
+
tokens?: CustomerTokenBase<Id>[];
|
|
864
832
|
createdAt?: TDate;
|
|
865
833
|
updatedAt?: TDate;
|
|
866
834
|
}
|
|
@@ -898,9 +866,9 @@ export interface FlagBase<TDate> {
|
|
|
898
866
|
export interface TicketBase<Id, TDate> {
|
|
899
867
|
_id?: Id;
|
|
900
868
|
ticketCode: string;
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
869
|
+
eventId: Id;
|
|
870
|
+
eventName: string;
|
|
871
|
+
eventDate: TDate;
|
|
904
872
|
orderId: string;
|
|
905
873
|
sectionId: Id;
|
|
906
874
|
row: number;
|
|
@@ -26,9 +26,9 @@ export declare const pages: {
|
|
|
26
26
|
readonly path: "/sections";
|
|
27
27
|
}];
|
|
28
28
|
};
|
|
29
|
-
|
|
30
|
-
readonly parentId: "
|
|
31
|
-
readonly path: "/admin/
|
|
29
|
+
events: {
|
|
30
|
+
readonly parentId: "events-section";
|
|
31
|
+
readonly path: "/admin/events";
|
|
32
32
|
readonly name: "Matches";
|
|
33
33
|
readonly subPages: readonly [{
|
|
34
34
|
readonly name: "Matches";
|
|
@@ -61,15 +61,15 @@ export declare const pages: {
|
|
|
61
61
|
readonly path: "/admin/flows";
|
|
62
62
|
readonly name: "Sale Channels";
|
|
63
63
|
};
|
|
64
|
+
customers: {
|
|
65
|
+
readonly parentId: "customers-section";
|
|
66
|
+
readonly path: "/admin/customers";
|
|
67
|
+
readonly name: "Customers";
|
|
68
|
+
};
|
|
64
69
|
users: {
|
|
65
70
|
readonly parentId: "users-section";
|
|
66
71
|
readonly path: "/admin/users";
|
|
67
|
-
readonly name: "
|
|
68
|
-
};
|
|
69
|
-
staffs: {
|
|
70
|
-
readonly parentId: "staffs-section";
|
|
71
|
-
readonly path: "/admin/staffs";
|
|
72
|
-
readonly name: "Staff";
|
|
72
|
+
readonly name: "User";
|
|
73
73
|
};
|
|
74
74
|
roles: {
|
|
75
75
|
readonly parentId: "roles-section";
|
|
@@ -100,18 +100,6 @@ export declare const pages: {
|
|
|
100
100
|
readonly path: "/groups";
|
|
101
101
|
}];
|
|
102
102
|
};
|
|
103
|
-
events: {
|
|
104
|
-
readonly parentId: "events-section";
|
|
105
|
-
readonly path: "/admin/events";
|
|
106
|
-
readonly name: "Calendar";
|
|
107
|
-
readonly subPages: readonly [{
|
|
108
|
-
readonly name: "Table";
|
|
109
|
-
readonly path: "/table";
|
|
110
|
-
}, {
|
|
111
|
-
readonly name: "Events";
|
|
112
|
-
readonly path: "/events";
|
|
113
|
-
}];
|
|
114
|
-
};
|
|
115
103
|
prospects: {
|
|
116
104
|
readonly parentId: "prospects-section";
|
|
117
105
|
readonly path: "/admin/prospects";
|
|
@@ -229,8 +217,7 @@ export type SettingsTabId = (typeof pages.settings.subPages)[number]['path'];
|
|
|
229
217
|
export type PublicTabId = (typeof pages.public.subPages)[number]['path'];
|
|
230
218
|
export type ProductsTabId = (typeof pages.products.subPages)[number]['path'];
|
|
231
219
|
export type BlogsTabId = (typeof pages.blogs.subPages)[number]['path'];
|
|
232
|
-
export type EventsTabId = (typeof pages.events.subPages)[number]['path'];
|
|
233
220
|
export type ProspectsTabId = (typeof pages.prospects.subPages)[number]['path'];
|
|
234
221
|
export type CampaignsTabId = (typeof pages.campaigns.subPages)[number]['path'];
|
|
235
222
|
export type SalesTabId = (typeof pages.sales.subPages)[number]['path'];
|
|
236
|
-
export type
|
|
223
|
+
export type EventsTabId = (typeof pages.events.subPages)[number]['path'];
|
package/dist/ticketops/pages.js
CHANGED
|
@@ -11,9 +11,9 @@ exports.pages = {
|
|
|
11
11
|
{ name: 'Sectors', path: '/sections' },
|
|
12
12
|
],
|
|
13
13
|
},
|
|
14
|
-
|
|
15
|
-
parentId: '
|
|
16
|
-
path: '/admin/
|
|
14
|
+
events: {
|
|
15
|
+
parentId: 'events-section',
|
|
16
|
+
path: '/admin/events',
|
|
17
17
|
name: 'Matches',
|
|
18
18
|
subPages: [
|
|
19
19
|
{ name: 'Matches', path: '/matches' },
|
|
@@ -41,15 +41,15 @@ exports.pages = {
|
|
|
41
41
|
path: '/admin/flows',
|
|
42
42
|
name: 'Sale Channels',
|
|
43
43
|
},
|
|
44
|
+
customers: {
|
|
45
|
+
parentId: 'customers-section',
|
|
46
|
+
path: '/admin/customers',
|
|
47
|
+
name: 'Customers',
|
|
48
|
+
},
|
|
44
49
|
users: {
|
|
45
50
|
parentId: 'users-section',
|
|
46
51
|
path: '/admin/users',
|
|
47
|
-
name: '
|
|
48
|
-
},
|
|
49
|
-
staffs: {
|
|
50
|
-
parentId: 'staffs-section',
|
|
51
|
-
path: '/admin/staffs',
|
|
52
|
-
name: 'Staff',
|
|
52
|
+
name: 'User',
|
|
53
53
|
},
|
|
54
54
|
roles: {
|
|
55
55
|
parentId: 'roles-section',
|
|
@@ -74,15 +74,6 @@ exports.pages = {
|
|
|
74
74
|
{ name: 'Groups', path: '/groups' },
|
|
75
75
|
],
|
|
76
76
|
},
|
|
77
|
-
events: {
|
|
78
|
-
parentId: 'events-section',
|
|
79
|
-
path: '/admin/events',
|
|
80
|
-
name: 'Calendar',
|
|
81
|
-
subPages: [
|
|
82
|
-
{ name: 'Table', path: '/table' },
|
|
83
|
-
{ name: 'Events', path: '/events' },
|
|
84
|
-
],
|
|
85
|
-
},
|
|
86
77
|
prospects: {
|
|
87
78
|
parentId: 'prospects-section',
|
|
88
79
|
path: '/admin/prospects',
|