@ibiliaze/global-vars 1.178.0 → 1.180.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.
@@ -15,7 +15,7 @@ export interface Epoint {
15
15
  errorUrl?: string;
16
16
  }
17
17
  export interface Local<Id, TDate> {
18
- user: {
18
+ customer: {
19
19
  _id: string;
20
20
  name: string;
21
21
  surname?: string;
package/dist/flows.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { FixtureCategoryBase, FixtureCategoryFlowBase, FlowBase, OccupanceBase, StaffBase } from './ticketops/inputsDefault';
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 FixtureCategoryOf<Id> = FixtureCategoryBase<Id>;
18
+ type EventCategoryOf<Id> = EventCategoryBase<Id>;
19
19
  type OccupanceCategoryOf<Id, TDate> = OccupanceBase<Id, TDate>['category'];
20
- type StaffFlowIdsOf<Id, TDate> = StaffBase<Id, TDate>['flowIds'];
21
- type EffectiveFlowsOf<Id> = FixtureCategoryFlowBase<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
- fixtureCategories: FixtureCategoryOf<Id>[];
25
+ eventCategories: EventCategoryOf<Id>[];
26
26
  sectionId: Id;
27
- staffFlowIds: StaffFlowIdsOf<Id, TDate>;
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
- staffFlowIds: StaffFlowIdsOf<Id, TDate>;
33
+ userFlowIds: UserFlowIdsOf<Id, TDate>;
34
34
  occupanceCategory?: OccupanceCategoryOf<Id, TDate>;
35
- fixtureCategories: FixtureCategoryOf<Id>[];
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
- staffFlowIds: StaffFlowIdsOf<Id, TDate>;
43
+ userFlowIds: UserFlowIdsOf<Id, TDate>;
44
44
  }
45
45
  export interface GetSectorCategoryArgs<Id> {
46
46
  sectionId: Id;
47
- fixtureCategories: FixtureCategoryOf<Id>[];
47
+ eventCategories: EventCategoryOf<Id>[];
48
48
  }
49
49
  export interface GetOccupanceCategoryArgs<Id, TDate> {
50
50
  occupanceCategory: OccupanceCategoryOf<Id, TDate>;
51
- fixtureCategories: FixtureCategoryOf<Id>[];
51
+ eventCategories: EventCategoryOf<Id>[];
52
52
  }
53
53
  export interface GetCategoryArgs<Id> {
54
- occupanceCategory: FixtureCategoryOf<Id> | undefined;
55
- sectionCategory: FixtureCategoryOf<Id> | undefined;
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>): FixtureCategoryOf<Id> | undefined;
62
- getOccupanceCategory(args: GetOccupanceCategoryArgs<Id, TDate>): FixtureCategoryOf<Id> | undefined;
63
- getCategory(args: GetCategoryArgs<Id>): FixtureCategoryOf<Id> | undefined;
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, staffFlowIds) => flow.type === 'Offline' && (0, exports.arrayHasId)(staffFlowIds, flow.flowId);
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, staffFlowIds, }) => {
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 (!staffFlowIds || !staffFlowIds.length)
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, staffFlowIds));
58
+ return effectiveFlows.some(f => cashierSeesOffline(f, userFlowIds));
59
59
  }
60
60
  return false;
61
61
  };
62
- function canISeeSection({ who, where, sectionId, staffFlowIds, signedFlowId, fixtureCategories, }) {
62
+ function canISeeSection({ who, where, sectionId, userFlowIds, signedFlowId, eventCategories, }) {
63
63
  try {
64
64
  if (who === 'root')
65
65
  return true;
66
- if (!fixtureCategories || !fixtureCategories.length)
66
+ if (!eventCategories || !eventCategories.length)
67
67
  return false;
68
68
  const sectionFlows = [
69
- ...fixtureCategories.flatMap(link => link.sections?.flatMap(section => ((0, exports.idsEqual)(section.sectionId, sectionId) ? section.flows : []))),
69
+ ...eventCategories.flatMap(link => link.sections?.flatMap(section => ((0, exports.idsEqual)(section.sectionId, sectionId) ? section.flows : []))),
70
70
  ];
71
71
  const categoryFlows = [
72
- ...fixtureCategories.flatMap(link => link.sections?.some(section => (0, exports.idsEqual)(section.sectionId, sectionId)) ? link.flows : []),
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, staffFlowIds });
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, staffFlowIds, occupanceCategory, fixtureCategories, }) {
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 = (fixtureCategories || [])
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, staffFlowIds });
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, fixtureCategories }) {
96
+ function getSectorCategory({ sectionId, eventCategories }) {
97
97
  try {
98
- const sectionCat = fixtureCategories?.find(link => link.sections?.some(section => (0, exports.idsEqual)(section.sectionId, sectionId)));
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, fixtureCategories, }) {
113
+ function getOccupanceCategory({ occupanceCategory, eventCategories, }) {
114
114
  try {
115
- const occupanceCat = fixtureCategories?.find(link => (0, exports.idsEqual)(link.categoryId, occupanceCategory?.categoryId));
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 User {
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
- user?: User;
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
- user: { auth: true },
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
- user: { auth: true },
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
- user: { auth: true },
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, User, Globals, GlobalVars } from './globals';
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
- userId?: Id;
166
+ customerId?: Id;
167
167
  signedOff?: boolean;
168
168
  }
169
169
  export interface TaskReviewedByBase<Id> {
170
- userId?: Id;
170
+ customerId?: Id;
171
171
  reviewed?: boolean;
172
172
  }
173
173
  export interface TaskCommentBase<Id, TDate> {
174
174
  id: string;
175
- userId?: Id;
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
- userIds?: Id[];
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 ProjectUserBase {
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
- userAgent?: string;
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 FixtureCategoryFlowBase<Id> {
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 FixtureCategoryBase<Id> {
354
+ export interface EventCategoryBase<Id> {
384
355
  categoryId: Id;
385
356
  name: string;
386
357
  color: string;
387
358
  price: number;
388
- flows: FixtureCategoryFlowBase<Id>[];
359
+ flows: EventCategoryFlowBase<Id>[];
389
360
  sections: {
390
361
  sectionId: Id;
391
- flows: FixtureCategoryFlowBase<Id>[];
362
+ flows: EventCategoryFlowBase<Id>[];
392
363
  }[];
393
364
  disabled?: boolean;
394
365
  }
395
- export interface FixtureBase<Id, TDate> {
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?: FixtureCategoryBase<Id>[];
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?: FixtureCategoryBase<Id>[];
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: 'fixture' | 'product' | 'blog' | 'prospect' | 'niche' | 'template' | 'emailAttachment';
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, TDate>;
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, TDate> {
425
+ export interface AgendaJob<Id> {
455
426
  attrs: {
456
427
  _id: Id;
457
- data: AgendaJobData<Id, TDate>;
428
+ data: AgendaJobData<Id>;
458
429
  };
459
430
  }
460
- export interface AgendaJobData<Id, TDate> {
431
+ export interface AgendaJobData<Id> {
461
432
  id?: string | undefined;
462
- type: 'emailCampaign' | 'paymentReminder' | 'eventReminder';
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
- userId: Id;
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
- fixtureId: Id;
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 OccupanceWithFixture<Id, TDate> = Omit<OccupanceBase<Id, TDate>, 'fixtureId'> & {
528
- fixtureId: FixtureBase<Id, TDate>;
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>, 'fixtureId' | 'sectionId' | 'seatId'> & {
538
- fixtureId: FixtureBase<Id, TDate>;
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
- fixtureName: string;
549
- fixtureDate: TDate;
550
- fixtureId: Id;
516
+ eventName: string;
517
+ eventDate: TDate;
518
+ eventId: Id;
551
519
  sectionId: Id;
552
520
  stadiumId: string;
553
521
  orderId: string;
554
- userId: Id;
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
- userId: Id;
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 StaffTokenBase<Id> {
782
+ export interface UserTokenBase<Id> {
815
783
  _id?: Id;
816
784
  token: string;
817
785
  ip?: string;
818
- staffAgent?: string;
786
+ userAgent?: string;
819
787
  city?: string;
820
788
  region?: string;
821
789
  country?: string;
822
790
  loc?: string;
823
791
  }
824
- export interface StaffBase<Id, TDate> {
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?: StaffTokenBase<Id>[];
801
+ tokens?: UserTokenBase<Id>[];
834
802
  createdAt?: TDate;
835
803
  updatedAt?: TDate;
836
804
  }
837
- export type StaffTypeWithPopulatedRolesBase<Id, TDate> = StaffBase<Id, TDate> & {
805
+ export type UserTypeWithPopulatedRolesBase<Id, TDate> = UserBase<Id, TDate> & {
838
806
  populatedRoles: RoleBase<Id, TDate>[];
839
807
  };
840
- export interface UserTokenBase<Id> {
808
+ export interface CustomerTokenBase<Id> {
841
809
  _id?: Id;
842
810
  token: string;
843
811
  ip?: string;
844
- userAgent?: string;
812
+ customerAgent?: string;
845
813
  city?: string;
846
814
  region?: string;
847
815
  country?: string;
848
816
  loc?: string;
849
817
  }
850
- export interface UserBase<Id, TDate> {
818
+ export interface CustomerBase<Id, TDate> {
851
819
  _id?: Id;
852
820
  email: string;
853
- username: string;
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?: UserTokenBase<Id>[];
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
- fixtureId: Id;
902
- fixtureName: string;
903
- fixtureDate: TDate;
869
+ eventId: Id;
870
+ eventName: string;
871
+ eventDate: TDate;
904
872
  orderId: string;
905
873
  sectionId: Id;
906
874
  row: number;
@@ -26,13 +26,13 @@ export declare const pages: {
26
26
  readonly path: "/sections";
27
27
  }];
28
28
  };
29
- fixtures: {
30
- readonly parentId: "fixtures-section";
31
- readonly path: "/admin/fixtures";
32
- readonly name: "Matches";
29
+ events: {
30
+ readonly parentId: "events-section";
31
+ readonly path: "/admin/events";
32
+ readonly name: "Events";
33
33
  readonly subPages: readonly [{
34
- readonly name: "Matches";
35
- readonly path: "/matches";
34
+ readonly name: "Events";
35
+ readonly path: "/events";
36
36
  }, {
37
37
  readonly name: "Match Types";
38
38
  readonly path: "/types";
@@ -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: "Customers";
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 FixturesTabId = (typeof pages.fixtures.subPages)[number]['path'];
223
+ export type EventsTabId = (typeof pages.events.subPages)[number]['path'];
@@ -11,12 +11,12 @@ exports.pages = {
11
11
  { name: 'Sectors', path: '/sections' },
12
12
  ],
13
13
  },
14
- fixtures: {
15
- parentId: 'fixtures-section',
16
- path: '/admin/fixtures',
17
- name: 'Matches',
14
+ events: {
15
+ parentId: 'events-section',
16
+ path: '/admin/events',
17
+ name: 'Events',
18
18
  subPages: [
19
- { name: 'Matches', path: '/matches' },
19
+ { name: 'Events', path: '/events' },
20
20
  { name: 'Match Types', path: '/types' },
21
21
  { name: 'Seats', path: '/seats' },
22
22
  ],
@@ -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: 'Customers',
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',