@ibiliaze/global-vars 1.143.0 → 1.144.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.
@@ -430,7 +430,7 @@ export interface GroupBase<Id, TDate> {
430
430
  name: string;
431
431
  data?: string;
432
432
  description?: string;
433
- type: 'fixture' | 'product' | 'blog' | 'pipeline' | 'prospect' | 'niche' | 'template' | 'emailAttachment';
433
+ type: 'fixture' | 'product' | 'blog' | 'prospect' | 'niche' | 'template' | 'emailAttachment';
434
434
  createdAt?: TDate;
435
435
  updatedAt?: TDate;
436
436
  }
@@ -520,6 +520,47 @@ export interface OccupanceBase<Id, TDate> {
520
520
  createdAt?: TDate;
521
521
  updatedAt?: TDate;
522
522
  }
523
+ export type FlatOccupanceWithSeat<Id, TDate> = SeatBase<Id, TDate> & Partial<OccupanceBase<Id, TDate>>;
524
+ export type OccupanceWithFixture<Id, TDate> = Omit<OccupanceBase<Id, TDate>, 'fixtureId'> & {
525
+ fixtureId: FixtureBase<Id, TDate>;
526
+ };
527
+ export type OccupanceWithSeat<Id, TDate> = Omit<OccupanceBase<Id, TDate>, 'seatId'> & {
528
+ seatId: SeatBase<Id, TDate>;
529
+ };
530
+ export type OccupanceWithSeatAndSection<Id, TDate> = Omit<OccupanceBase<Id, TDate>, 'seatId' | 'sectionId'> & {
531
+ sectionId: SectionBase<Id, TDate>;
532
+ seatId: SeatBase<Id, TDate>;
533
+ };
534
+ export type PopulatedOccupance<Id, TDate> = Omit<OccupanceBase<Id, TDate>, 'fixtureId' | 'sectionId' | 'seatId'> & {
535
+ fixtureId: FixtureBase<Id, TDate>;
536
+ sectionId: SectionBase<Id, TDate>;
537
+ seatId: SeatBase<Id, TDate>;
538
+ };
539
+ export type FlatOccupance<Id, TDate> = {
540
+ _id: Id;
541
+ seatName: string;
542
+ seatId: Id;
543
+ sectionName: string;
544
+ ticketCode: string;
545
+ fixtureName: string;
546
+ fixtureDate: TDate;
547
+ fixtureId: Id;
548
+ sectionId: Id;
549
+ stadiumId: string;
550
+ orderId: string;
551
+ userId: Id;
552
+ name: string;
553
+ email: string;
554
+ tel: string;
555
+ seat: number;
556
+ row: number;
557
+ categoryName: string;
558
+ reservedAt?: TDate;
559
+ categoryId: Id;
560
+ gate: string;
561
+ area: string;
562
+ block: string;
563
+ };
523
564
  export interface ReviewItemBase {
524
565
  id?: string;
525
566
  imgSrc?: string;
@@ -599,15 +640,6 @@ export interface PageBase<Id, TDate> {
599
640
  createdAt?: TDate;
600
641
  updatedAt?: TDate;
601
642
  }
602
- export interface PipelineBase<Id, TDate> {
603
- _id?: Id;
604
- name: string;
605
- groupId: Id;
606
- description?: string;
607
- stages?: StageBase[];
608
- createdAt?: TDate;
609
- updatedAt?: TDate;
610
- }
611
643
  export interface ProductBase<Id, TDate> {
612
644
  _id?: Id;
613
645
  productName: string;
@@ -673,17 +705,6 @@ export interface ProspectBase<Id, TDate> {
673
705
  createdAt?: TDate;
674
706
  updatedAt?: TDate;
675
707
  }
676
- export interface ReportBase<Id, TDate> {
677
- _id?: Id;
678
- name: string;
679
- date: string;
680
- endDate: string;
681
- receipts?: ReceiptBase[];
682
- users?: UserBase<Id, TDate>[];
683
- incomes?: IncomeBase[];
684
- createdAt?: TDate;
685
- updatedAt?: TDate;
686
- }
687
708
  export interface ReviewBase<Id, TDate> {
688
709
  _id?: Id;
689
710
  title: string;
@@ -729,8 +750,6 @@ export interface SaleBase<Id, TDate> {
729
750
  newClient?: boolean;
730
751
  expense?: boolean;
731
752
  items?: SaleItemBase<Id>[];
732
- pipelineId?: Id;
733
- pipelineName?: string;
734
753
  stageId?: string;
735
754
  createdAt?: TDate;
736
755
  updatedAt?: TDate;
@@ -156,18 +156,6 @@ export declare const pages: {
156
156
  readonly path: "/transactions";
157
157
  }];
158
158
  };
159
- pipelines: {
160
- readonly parentId: "pipelines-section";
161
- readonly path: "/admin/pipelines";
162
- readonly name: "Pipelines";
163
- readonly subPages: readonly [{
164
- readonly name: "Pipelines";
165
- readonly path: "/pipelines";
166
- }, {
167
- readonly name: "Groups";
168
- readonly path: "/groups";
169
- }];
170
- };
171
159
  pages: {
172
160
  readonly parentId: "landing-pages-section";
173
161
  readonly path: "/admin/landing-pages";
@@ -244,6 +232,5 @@ export type BlogsTabId = (typeof pages.blogs.subPages)[number]['path'];
244
232
  export type EventsTabId = (typeof pages.events.subPages)[number]['path'];
245
233
  export type ProspectsTabId = (typeof pages.prospects.subPages)[number]['path'];
246
234
  export type CampaignsTabId = (typeof pages.campaigns.subPages)[number]['path'];
247
- export type PipelinesTabId = (typeof pages.pipelines.subPages)[number]['path'];
248
235
  export type SalesTabId = (typeof pages.sales.subPages)[number]['path'];
249
236
  export type FixturesTabId = (typeof pages.fixtures.subPages)[number]['path'];
@@ -116,15 +116,6 @@ exports.pages = {
116
116
  { name: 'Transactions', path: '/transactions' },
117
117
  ],
118
118
  },
119
- pipelines: {
120
- parentId: 'pipelines-section',
121
- path: '/admin/pipelines',
122
- name: 'Pipelines',
123
- subPages: [
124
- { name: 'Pipelines', path: '/pipelines' },
125
- { name: 'Groups', path: '/groups' },
126
- ],
127
- },
128
119
  pages: {
129
120
  parentId: 'landing-pages-section',
130
121
  path: '/admin/landing-pages',
@@ -4,6 +4,7 @@ export declare const checkoutRoleDefs: readonly [{
4
4
  readonly role: "postUtilCreateCheckoutSession";
5
5
  readonly name: "Create checkout session";
6
6
  readonly response_200: {
7
+ message: string;
7
8
  checkoutUrl: string;
8
9
  data: string;
9
10
  signature: string;
@@ -5,6 +5,7 @@ export declare const eventRoleDefs: <TId, TDate>() => readonly [{
5
5
  readonly role: "postEventBook";
6
6
  readonly name: "Book event";
7
7
  readonly response_201: {
8
+ event: EventBase<TId, TDate>;
8
9
  url: string;
9
10
  message: string;
10
11
  };
@@ -20,7 +20,7 @@ export declare const fileRoleDefs: readonly [{
20
20
  readonly role: "postUtilFileDelete";
21
21
  readonly name: "Delete files";
22
22
  readonly response_200: {
23
- message?: string;
23
+ message: string;
24
24
  };
25
25
  readonly response_400: {
26
26
  message: string;
@@ -25,18 +25,6 @@ export declare const flowFlowDefs: <TId, TDate>() => readonly [{
25
25
  message: string;
26
26
  error: string;
27
27
  };
28
- }, {
29
- readonly method: "get";
30
- readonly path: "/flow/api";
31
- readonly role: "getFlowApis";
32
- readonly name: "Get APIs";
33
- readonly response_200: {
34
- apis: unknown;
35
- };
36
- readonly response_500: {
37
- message: string;
38
- error: string;
39
- };
40
28
  }, {
41
29
  readonly method: "get";
42
30
  readonly path: "/flow/:id";
@@ -19,14 +19,6 @@ const flowFlowDefs = () => {
19
19
  response_200: {},
20
20
  response_500: {},
21
21
  },
22
- {
23
- method: 'get',
24
- path: '/flow/api',
25
- role: 'getFlowApis',
26
- name: 'Get APIs',
27
- response_200: {},
28
- response_500: {},
29
- },
30
22
  {
31
23
  method: 'get',
32
24
  path: '/flow/:id',
@@ -1,5 +1,5 @@
1
1
  import type { CampaignBase, GroupBase, JobBase } from '../inputsDefault';
2
- import type { JobAttributes } from 'agenda';
2
+ import type { JobAttributes, JobAttributesData } from 'agenda';
3
3
  export declare const jobRoleDefs: <TId, TDate>() => readonly [{
4
4
  readonly method: "post";
5
5
  readonly path: "/job";
@@ -32,7 +32,7 @@ export declare const jobRoleDefs: <TId, TDate>() => readonly [{
32
32
  readonly role: "postJobStartById";
33
33
  readonly name: "Run job by ID";
34
34
  readonly response_201: {
35
- job: JobAttributes;
35
+ job: JobAttributes<JobAttributesData>;
36
36
  message: string;
37
37
  };
38
38
  readonly response_404: {
@@ -61,7 +61,7 @@ export declare const jobRoleDefs: <TId, TDate>() => readonly [{
61
61
  readonly role: "getJobById";
62
62
  readonly name: "Get job";
63
63
  readonly response_200: {
64
- job: JobBase<TId, TDate> | null;
64
+ job: JobBase<TId, TDate>;
65
65
  message: string;
66
66
  };
67
67
  readonly response_404: {
@@ -74,13 +74,12 @@ export declare const jobRoleDefs: <TId, TDate>() => readonly [{
74
74
  readonly name: "Get job details";
75
75
  readonly response_200: {
76
76
  job: JobBase<TId, TDate>;
77
- campaign: CampaignBase<TId, TDate> | null;
78
- group: GroupBase<TId, TDate> | null;
79
- template: GroupBase<TId, TDate> | null;
77
+ campaign: CampaignBase<TId, TDate>;
78
+ group: GroupBase<TId, TDate>;
79
+ template: GroupBase<TId, TDate>;
80
80
  message: string;
81
81
  };
82
82
  readonly response_400: {
83
- job?: JobBase<TId, TDate> | null;
84
83
  message: string;
85
84
  };
86
85
  readonly response_404: {
@@ -1,16 +1,12 @@
1
+ import type { LocalItem } from '../../checkout';
2
+ import type { SeatBase, OccupanceBase, FlatOccupanceWithSeat, PopulatedOccupance } from '../inputsDefault';
1
3
  export declare const occupanceRoleDefs: <TId, TDate>() => readonly [{
2
4
  readonly method: "get";
3
5
  readonly path: "/seat";
4
6
  readonly role: "getSeats";
5
7
  readonly name: "Get seats";
6
8
  readonly response_200: {
7
- seats: {
8
- [key: string]: any;
9
- _id?: TId;
10
- name?: string;
11
- row?: number;
12
- col?: number;
13
- }[];
9
+ seats: SeatBase<TId, TDate>[];
14
10
  count: number;
15
11
  };
16
12
  readonly response_500: {
@@ -23,16 +19,7 @@ export declare const occupanceRoleDefs: <TId, TDate>() => readonly [{
23
19
  readonly role: "getOccupanciesSeasonalById";
24
20
  readonly name: "Get seasonal occupancies by season ID";
25
21
  readonly response_200: {
26
- occupancies: {
27
- [key: string]: any;
28
- _id?: TId;
29
- seatId?: TId;
30
- fixtureId?: TId;
31
- sectionId?: TId;
32
- reserved?: boolean;
33
- occupied?: boolean;
34
- reservedAt?: TDate;
35
- }[];
22
+ occupancies: OccupanceBase<TId, TDate>[];
36
23
  message: string;
37
24
  };
38
25
  readonly response_404: {
@@ -48,24 +35,7 @@ export declare const occupanceRoleDefs: <TId, TDate>() => readonly [{
48
35
  readonly role: "getOccupanciesUser";
49
36
  readonly name: "Get occupancies for user";
50
37
  readonly response_200: {
51
- occupancies: ({
52
- [key: string]: any;
53
- _id?: TId;
54
- seatId?: TId;
55
- fixtureId?: TId;
56
- sectionId?: TId;
57
- reserved?: boolean;
58
- occupied?: boolean;
59
- reservedAt?: TDate;
60
- } & {
61
- [key: string]: any;
62
- _id?: TId;
63
- name?: string;
64
- row?: number;
65
- col?: number;
66
- } & {
67
- seatId?: TId;
68
- })[];
38
+ occupancies: FlatOccupanceWithSeat<TId, TDate>[];
69
39
  count: number;
70
40
  };
71
41
  readonly response_500: {
@@ -78,24 +48,7 @@ export declare const occupanceRoleDefs: <TId, TDate>() => readonly [{
78
48
  readonly role: "getOccupancies";
79
49
  readonly name: "Get occupancies";
80
50
  readonly response_200: {
81
- occupancies: ({
82
- [key: string]: any;
83
- _id?: TId;
84
- seatId?: TId;
85
- fixtureId?: TId;
86
- sectionId?: TId;
87
- reserved?: boolean;
88
- occupied?: boolean;
89
- reservedAt?: TDate;
90
- } & {
91
- [key: string]: any;
92
- _id?: TId;
93
- name?: string;
94
- row?: number;
95
- col?: number;
96
- } & {
97
- seatId?: TId;
98
- })[];
51
+ occupancies: FlatOccupanceWithSeat<TId, TDate>[];
99
52
  count: number;
100
53
  };
101
54
  readonly response_500: {
@@ -108,20 +61,7 @@ export declare const occupanceRoleDefs: <TId, TDate>() => readonly [{
108
61
  readonly role: "getOccupanceInfoByOrderId";
109
62
  readonly name: "Get occupance info by order id";
110
63
  readonly response_200: {
111
- occupancies: ({
112
- [key: string]: any;
113
- _id?: TId;
114
- seatId?: TId;
115
- fixtureId?: TId;
116
- sectionId?: TId;
117
- reserved?: boolean;
118
- occupied?: boolean;
119
- reservedAt?: TDate;
120
- } & {
121
- fixtureId?: any;
122
- sectionId?: any;
123
- seatId?: any;
124
- })[] | null;
64
+ occupancies: PopulatedOccupance<TId, TDate>[];
125
65
  message: string;
126
66
  };
127
67
  readonly response_400: {
@@ -137,29 +77,8 @@ export declare const occupanceRoleDefs: <TId, TDate>() => readonly [{
137
77
  readonly role: "getOccupanceReserved";
138
78
  readonly name: "Get reserved occupancies";
139
79
  readonly response_200: {
140
- items: {
141
- _id: string;
142
- name: string;
143
- quantity: number;
144
- subscriptionPeriod: string;
145
- type: string;
146
- price: number;
147
- reservedAt?: string;
148
- }[];
149
- occupancies: ({
150
- [key: string]: any;
151
- _id?: TId;
152
- seatId?: TId;
153
- fixtureId?: TId;
154
- sectionId?: TId;
155
- reserved?: boolean;
156
- occupied?: boolean;
157
- reservedAt?: TDate;
158
- } & {
159
- fixtureId?: any;
160
- sectionId?: any;
161
- seatId?: any;
162
- })[];
80
+ items: LocalItem[];
81
+ occupancies: PopulatedOccupance<TId, TDate>[];
163
82
  message: string;
164
83
  };
165
84
  readonly response_400: {
@@ -175,7 +94,7 @@ export declare const occupanceRoleDefs: <TId, TDate>() => readonly [{
175
94
  readonly role: "getOccupancePdfById";
176
95
  readonly name: "Get occupance PDF by ID";
177
96
  readonly response_200: {
178
- url?: string;
97
+ url: string;
179
98
  message: string;
180
99
  };
181
100
  readonly response_500: {
@@ -188,25 +107,8 @@ export declare const occupanceRoleDefs: <TId, TDate>() => readonly [{
188
107
  readonly role: "postOccupanceReserveById";
189
108
  readonly name: "Reserve occupance by ID";
190
109
  readonly response_200: {
191
- item: {
192
- _id: string;
193
- name: string;
194
- quantity: number;
195
- subscriptionPeriod: string;
196
- type: string;
197
- price: number;
198
- reservedAt?: string;
199
- };
200
- occupance: {
201
- [key: string]: any;
202
- _id?: TId;
203
- seatId?: TId;
204
- fixtureId?: TId;
205
- sectionId?: TId;
206
- reserved?: boolean;
207
- occupied?: boolean;
208
- reservedAt?: TDate;
209
- };
110
+ item: LocalItem;
111
+ occupance: OccupanceBase<TId, TDate>;
210
112
  reservedAt: number;
211
113
  message: string;
212
114
  };
@@ -231,25 +133,8 @@ export declare const occupanceRoleDefs: <TId, TDate>() => readonly [{
231
133
  readonly role: "postSeasonalOccupanceReserveById";
232
134
  readonly name: "Reserve seasonal occupance by ID";
233
135
  readonly response_200: {
234
- item: {
235
- _id: string;
236
- name: string;
237
- quantity: number;
238
- subscriptionPeriod: string;
239
- type: string;
240
- price: number;
241
- reservedAt?: string;
242
- };
243
- occupance: {
244
- [key: string]: any;
245
- _id?: TId;
246
- seatId?: TId;
247
- fixtureId?: TId;
248
- sectionId?: TId;
249
- reserved?: boolean;
250
- occupied?: boolean;
251
- reservedAt?: TDate;
252
- };
136
+ item: LocalItem;
137
+ occupance: OccupanceBase<TId, TDate>;
253
138
  reservedAt: number;
254
139
  message: string;
255
140
  };
@@ -271,16 +156,7 @@ export declare const occupanceRoleDefs: <TId, TDate>() => readonly [{
271
156
  readonly role: "postOccupanceFreeById";
272
157
  readonly name: "Free occupance by ID";
273
158
  readonly response_200: {
274
- occupance?: {
275
- [key: string]: any;
276
- _id?: TId;
277
- seatId?: TId;
278
- fixtureId?: TId;
279
- sectionId?: TId;
280
- reserved?: boolean;
281
- occupied?: boolean;
282
- reservedAt?: TDate;
283
- };
159
+ occupance: OccupanceBase<TId, TDate>;
284
160
  message: string;
285
161
  };
286
162
  readonly response_400: {
@@ -301,16 +177,7 @@ export declare const occupanceRoleDefs: <TId, TDate>() => readonly [{
301
177
  readonly role: "postSeasonalOccupanceFreeById";
302
178
  readonly name: "Free seasonal occupance by ID";
303
179
  readonly response_200: {
304
- occupance?: {
305
- [key: string]: any;
306
- _id?: TId;
307
- seatId?: TId;
308
- fixtureId?: TId;
309
- sectionId?: TId;
310
- reserved?: boolean;
311
- occupied?: boolean;
312
- reservedAt?: TDate;
313
- };
180
+ occupance: OccupanceBase<TId, TDate>;
314
181
  message: string;
315
182
  };
316
183
  readonly response_403: {
@@ -331,16 +198,7 @@ export declare const occupanceRoleDefs: <TId, TDate>() => readonly [{
331
198
  readonly role: "putOccupanceById";
332
199
  readonly name: "Update occupance by ID";
333
200
  readonly response_200: {
334
- occupance: {
335
- [key: string]: any;
336
- _id?: TId;
337
- seatId?: TId;
338
- fixtureId?: TId;
339
- sectionId?: TId;
340
- reserved?: boolean;
341
- occupied?: boolean;
342
- reservedAt?: TDate;
343
- };
201
+ occupance: OccupanceBase<TId, TDate>;
344
202
  message: string;
345
203
  };
346
204
  readonly response_404: {