@meaple-com/types 1.0.4 → 2.0.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/index.d.mts +287 -141
- package/dist/index.d.ts +287 -141
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -59,9 +59,9 @@ type TagProps = {
|
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
type EventContact = {
|
|
62
|
-
email?: string;
|
|
63
|
-
phoneNumber?: string;
|
|
64
|
-
instagramUsername?: string;
|
|
62
|
+
email?: string | null;
|
|
63
|
+
phoneNumber?: string | null;
|
|
64
|
+
instagramUsername?: string | null;
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
type ExternalAnalyticsProps = {
|
|
@@ -71,15 +71,28 @@ type ExternalAnalyticsProps = {
|
|
|
71
71
|
|
|
72
72
|
type EventType = 'DRAFT' | 'PUBLISHED' | 'PRIVATE';
|
|
73
73
|
|
|
74
|
+
type EventAgePolicyType =
|
|
75
|
+
| 'EIGHTEEN_AND_OVER'
|
|
76
|
+
| 'SIXTEEN_WITH_GUARDIAN'
|
|
77
|
+
| 'SIXTEEN_WITH_AUTHORIZATION'
|
|
78
|
+
| 'FOURTEEN_WITH_GUARDIAN'
|
|
79
|
+
| 'FOURTEEN_WITH_AUTHORIZATION'
|
|
80
|
+
| 'ALL_AGES';
|
|
81
|
+
|
|
82
|
+
type EventReviewStats = {
|
|
83
|
+
averageRating: number | null;
|
|
84
|
+
totalReviews: number;
|
|
85
|
+
};
|
|
86
|
+
|
|
74
87
|
type EventProps = {
|
|
75
88
|
id: string;
|
|
76
89
|
slug: string;
|
|
77
|
-
channelId
|
|
90
|
+
channelId?: string;
|
|
78
91
|
name: string;
|
|
79
92
|
isSeatAssigned: boolean;
|
|
80
93
|
description: Record<string, any>[];
|
|
81
94
|
status: EventType;
|
|
82
|
-
createdAt
|
|
95
|
+
createdAt?: string;
|
|
83
96
|
startsAt: string;
|
|
84
97
|
endsAt: string;
|
|
85
98
|
opensAt?: string | null;
|
|
@@ -87,12 +100,13 @@ type EventProps = {
|
|
|
87
100
|
timezone: string;
|
|
88
101
|
canceledAt: string | null;
|
|
89
102
|
address?: AddressProps | null;
|
|
90
|
-
image: FileProps;
|
|
91
|
-
|
|
103
|
+
image: FileProps | null;
|
|
104
|
+
agePolicyType: EventAgePolicyType | null;
|
|
105
|
+
minorsAuthFile: FileProps | null;
|
|
92
106
|
contact?: EventContact;
|
|
93
107
|
categories: CategoryProps[];
|
|
94
|
-
tags
|
|
95
|
-
hasTicketInsurance
|
|
108
|
+
tags?: TagProps[];
|
|
109
|
+
hasTicketInsurance?: boolean;
|
|
96
110
|
channel: Pick<
|
|
97
111
|
ChannelProps,
|
|
98
112
|
'id' | 'name' | 'avatar' | 'slug' | 'eventsCount'
|
|
@@ -102,6 +116,7 @@ type EventProps = {
|
|
|
102
116
|
EventProps,
|
|
103
117
|
'id' | 'startsAt' | 'timezone' | 'isSeatAssigned'
|
|
104
118
|
>[];
|
|
119
|
+
reviewStats?: EventReviewStats | null;
|
|
105
120
|
};
|
|
106
121
|
|
|
107
122
|
type GetChannelEventProps = {
|
|
@@ -112,34 +127,26 @@ type GetChannelEventsProps = {
|
|
|
112
127
|
events: EventProps[];
|
|
113
128
|
};
|
|
114
129
|
|
|
130
|
+
type CheckCouponProps = {
|
|
131
|
+
eventId: string;
|
|
132
|
+
couponCode: string;
|
|
133
|
+
};
|
|
134
|
+
|
|
115
135
|
type CouponProps = {
|
|
116
136
|
id: string;
|
|
117
137
|
type: 'FIXED' | 'PERCENTAGE';
|
|
118
138
|
code: string;
|
|
119
139
|
value: number;
|
|
120
|
-
expiresAt: string;
|
|
140
|
+
expiresAt: string | null;
|
|
121
141
|
amount: number | null;
|
|
122
142
|
availableAmount: number | null;
|
|
123
143
|
ticketIds: string[];
|
|
124
144
|
};
|
|
125
145
|
|
|
126
|
-
type CheckCouponProps = {
|
|
127
|
-
eventId: string;
|
|
128
|
-
couponCode: string;
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
type CouponsListProps = {
|
|
132
|
-
coupons: CouponProps[];
|
|
133
|
-
cursor?: string;
|
|
134
|
-
};
|
|
135
|
-
|
|
136
146
|
type CreateEventReminderProps = {
|
|
137
147
|
email: string;
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
type ChartCategoryProps = {
|
|
141
|
-
id: string;
|
|
142
148
|
name: string;
|
|
149
|
+
phoneNumber: string;
|
|
143
150
|
};
|
|
144
151
|
|
|
145
152
|
type GaugeProps = {
|
|
@@ -147,6 +154,11 @@ type GaugeProps = {
|
|
|
147
154
|
usedAmount: number;
|
|
148
155
|
};
|
|
149
156
|
|
|
157
|
+
type ChartCategoryProps = {
|
|
158
|
+
id: string;
|
|
159
|
+
name: string;
|
|
160
|
+
};
|
|
161
|
+
|
|
150
162
|
type GroupProps = {
|
|
151
163
|
id: string;
|
|
152
164
|
name: string;
|
|
@@ -192,7 +204,7 @@ type TicketProps = {
|
|
|
192
204
|
description?: string;
|
|
193
205
|
amount: number;
|
|
194
206
|
visibility: TicketVisibility;
|
|
195
|
-
privateToken?: string;
|
|
207
|
+
privateToken?: string | null;
|
|
196
208
|
image: (FileProps & { id: string }) | null;
|
|
197
209
|
amount: number;
|
|
198
210
|
availableAmount: number;
|
|
@@ -202,8 +214,8 @@ type TicketProps = {
|
|
|
202
214
|
isInvite: boolean;
|
|
203
215
|
startsAt?: string;
|
|
204
216
|
endsAt?: string;
|
|
205
|
-
minBuy?: number;
|
|
206
|
-
maxBuy?: number;
|
|
217
|
+
minBuy?: number | null;
|
|
218
|
+
maxBuy?: number | null;
|
|
207
219
|
beginsAt?: string;
|
|
208
220
|
predecessor?: Pick<TicketProps, 'id' | 'name' | 'group'>;
|
|
209
221
|
expireBehavior?: 'VISIBLE' | 'HIDDEN';
|
|
@@ -211,20 +223,61 @@ type TicketProps = {
|
|
|
211
223
|
customFields?: TicketCustomField[];
|
|
212
224
|
};
|
|
213
225
|
|
|
226
|
+
type FindEventProductEventProps = Pick<
|
|
227
|
+
EventProps,
|
|
228
|
+
'id' | 'endsAt' | 'presaleStartsAt'
|
|
229
|
+
> & {
|
|
230
|
+
gauge: GaugeProps | null;
|
|
231
|
+
maxBuyAmount: number | null;
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
type FindEventProductItemProps = Pick<
|
|
235
|
+
TicketProps,
|
|
236
|
+
| 'id'
|
|
237
|
+
| 'name'
|
|
238
|
+
| 'description'
|
|
239
|
+
| 'amount'
|
|
240
|
+
| 'availableAmount'
|
|
241
|
+
| 'endsAt'
|
|
242
|
+
| 'price'
|
|
243
|
+
| 'image'
|
|
244
|
+
| 'privateToken'
|
|
245
|
+
| 'minBuy'
|
|
246
|
+
| 'maxBuy'
|
|
247
|
+
>;
|
|
248
|
+
|
|
214
249
|
type FindEventProductsProps = {
|
|
215
|
-
event:
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
250
|
+
event: FindEventProductEventProps;
|
|
251
|
+
products: FindEventProductItemProps[];
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
type FindEventTagItemProps = Pick<
|
|
255
|
+
TagProps,
|
|
256
|
+
'id' | 'name' | 'description' | 'emoji' | 'parentId'
|
|
257
|
+
>;
|
|
258
|
+
|
|
259
|
+
type FindEventItemProps = Pick<
|
|
260
|
+
EventProps,
|
|
261
|
+
| 'id'
|
|
262
|
+
| 'name'
|
|
263
|
+
| 'slug'
|
|
264
|
+
| 'description'
|
|
265
|
+
| 'canceledAt'
|
|
266
|
+
| 'endsAt'
|
|
267
|
+
| 'startsAt'
|
|
268
|
+
| 'presaleStartsAt'
|
|
269
|
+
| 'timezone'
|
|
270
|
+
| 'status'
|
|
271
|
+
| 'categories'
|
|
272
|
+
| 'address'
|
|
273
|
+
| 'channel'
|
|
274
|
+
> & {
|
|
275
|
+
image: FileProps | null;
|
|
276
|
+
tags: FindEventTagItemProps[];
|
|
224
277
|
};
|
|
225
278
|
|
|
226
279
|
type FindEventsProps = {
|
|
227
|
-
events:
|
|
280
|
+
events: FindEventItemProps[];
|
|
228
281
|
cursor?: string;
|
|
229
282
|
};
|
|
230
283
|
|
|
@@ -239,17 +292,44 @@ type FindEventsParams = {
|
|
|
239
292
|
categoryIds?: string[];
|
|
240
293
|
};
|
|
241
294
|
|
|
295
|
+
type FindEventTicketsEventProps = Pick<
|
|
296
|
+
EventProps,
|
|
297
|
+
'id' | 'startsAt' | 'endsAt' | 'presaleStartsAt'
|
|
298
|
+
> & {
|
|
299
|
+
maxBuyAmount: number | null;
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
type FindEventTicketItemProps = Pick<
|
|
303
|
+
TicketProps,
|
|
304
|
+
| 'id'
|
|
305
|
+
| 'type'
|
|
306
|
+
| 'groupId'
|
|
307
|
+
| 'name'
|
|
308
|
+
| 'description'
|
|
309
|
+
| 'amount'
|
|
310
|
+
| 'availableAmount'
|
|
311
|
+
| 'endsAt'
|
|
312
|
+
| 'price'
|
|
313
|
+
| 'orderAt'
|
|
314
|
+
| 'expireBehavior'
|
|
315
|
+
| 'image'
|
|
316
|
+
| 'chartCategory'
|
|
317
|
+
| 'privateToken'
|
|
318
|
+
| 'minBuy'
|
|
319
|
+
| 'maxBuy'
|
|
320
|
+
>;
|
|
321
|
+
|
|
322
|
+
type FindEventTicketGroupProps = Pick<
|
|
323
|
+
GroupProps,
|
|
324
|
+
'id' | 'name' | 'description' | 'defaultOpen' | 'orderAt' | 'maxBuyAmount'
|
|
325
|
+
> & {
|
|
326
|
+
tickets: FindEventTicketItemProps[];
|
|
327
|
+
};
|
|
328
|
+
|
|
242
329
|
type FindEventTicketsProps = {
|
|
243
|
-
event:
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
'startsAt',
|
|
247
|
-
'endsAt',
|
|
248
|
-
'presaleStartsAt',
|
|
249
|
-
'maxBuyAmount'
|
|
250
|
-
>;
|
|
251
|
-
tickets: TicketProps[];
|
|
252
|
-
groups: GroupProps[];
|
|
330
|
+
event: FindEventTicketsEventProps;
|
|
331
|
+
tickets: FindEventTicketItemProps[];
|
|
332
|
+
groups: FindEventTicketGroupProps[];
|
|
253
333
|
};
|
|
254
334
|
|
|
255
335
|
type BuyerProps = {
|
|
@@ -261,6 +341,33 @@ type BuyerProps = {
|
|
|
261
341
|
birthdate?: string | null;
|
|
262
342
|
};
|
|
263
343
|
|
|
344
|
+
type NominationProps = {
|
|
345
|
+
name: string;
|
|
346
|
+
document: string | null;
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
type OrderItemTicketProps = Pick<
|
|
350
|
+
TicketProps,
|
|
351
|
+
| 'id'
|
|
352
|
+
| 'type'
|
|
353
|
+
| 'name'
|
|
354
|
+
| 'image'
|
|
355
|
+
| 'price'
|
|
356
|
+
| 'nominable'
|
|
357
|
+
| 'beginsAt'
|
|
358
|
+
| 'customFields'
|
|
359
|
+
> & {
|
|
360
|
+
group: Pick<GroupProps, 'id' | 'name'> | null;
|
|
361
|
+
};
|
|
362
|
+
|
|
363
|
+
type OrderItemProps = {
|
|
364
|
+
id: string;
|
|
365
|
+
amount: number;
|
|
366
|
+
seatIds: string[];
|
|
367
|
+
nominations: NominationProps[];
|
|
368
|
+
ticket: OrderItemTicketProps;
|
|
369
|
+
};
|
|
370
|
+
|
|
264
371
|
type OrderStatus =
|
|
265
372
|
| 'PENDING'
|
|
266
373
|
| 'PAID'
|
|
@@ -275,6 +382,24 @@ type PaymentProps = {
|
|
|
275
382
|
type: 'PIX' | 'CREDIT_CARD';
|
|
276
383
|
};
|
|
277
384
|
|
|
385
|
+
type OrderEventProps = Pick<
|
|
386
|
+
EventProps,
|
|
387
|
+
| 'id'
|
|
388
|
+
| 'name'
|
|
389
|
+
| 'slug'
|
|
390
|
+
| 'agePolicyType'
|
|
391
|
+
| 'minorsAuthFile'
|
|
392
|
+
| 'hasTicketInsurance'
|
|
393
|
+
| 'startsAt'
|
|
394
|
+
| 'opensAt'
|
|
395
|
+
| 'timezone'
|
|
396
|
+
| 'image'
|
|
397
|
+
| 'address'
|
|
398
|
+
| 'externalAnalytics'
|
|
399
|
+
> & {
|
|
400
|
+
channel: Pick<ChannelProps, 'id' | 'slug'>;
|
|
401
|
+
};
|
|
402
|
+
|
|
278
403
|
type OrderProps = {
|
|
279
404
|
id: string;
|
|
280
405
|
status: OrderStatus;
|
|
@@ -284,34 +409,55 @@ type OrderProps = {
|
|
|
284
409
|
totalDiscount: number;
|
|
285
410
|
totalRefund?: number;
|
|
286
411
|
totalCreditCardFee?: number;
|
|
412
|
+
totalInsurance?: number;
|
|
413
|
+
processingFee?: number;
|
|
287
414
|
eventId: string;
|
|
288
|
-
event:
|
|
289
|
-
EventProps,
|
|
290
|
-
| 'id'
|
|
291
|
-
| 'name'
|
|
292
|
-
| 'slug'
|
|
293
|
-
| 'channel'
|
|
294
|
-
| 'address'
|
|
295
|
-
| 'startsAt'
|
|
296
|
-
| 'image'
|
|
297
|
-
| 'legalAgeRequired'
|
|
298
|
-
| 'timezone'
|
|
299
|
-
| 'externalAnalytics'
|
|
300
|
-
>;
|
|
415
|
+
event: OrderEventProps;
|
|
301
416
|
payment?: PaymentProps;
|
|
302
417
|
buyer?: BuyerProps;
|
|
303
418
|
coupon?: { usedAmount: number; coupon: Pick<CouponProps, 'id' | 'code'> };
|
|
304
419
|
expiresAt: string;
|
|
305
420
|
createdAt?: string;
|
|
306
421
|
venue?: OrderVenue;
|
|
422
|
+
stoneTransactions?: unknown[];
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
type CreatedOrderEventProps = Pick<
|
|
426
|
+
EventProps,
|
|
427
|
+
'id' | 'name' | 'startsAt'
|
|
428
|
+
>;
|
|
429
|
+
|
|
430
|
+
type CreatedOrderGroupProps = Pick<GroupProps, 'id' | 'name'> & {
|
|
431
|
+
gauge?: Pick<GaugeProps, 'totalAmount' | 'usedAmount' | 'id'> | null;
|
|
432
|
+
};
|
|
433
|
+
|
|
434
|
+
type CreatedOrderItemTicketProps = Pick<
|
|
435
|
+
TicketProps,
|
|
436
|
+
'id' | 'name' | 'type' | 'price'
|
|
437
|
+
> & {
|
|
438
|
+
group: CreatedOrderGroupProps | null;
|
|
439
|
+
};
|
|
440
|
+
|
|
441
|
+
type CreatedOrderItemProps = Pick<OrderItemProps, 'id' | 'amount'> & {
|
|
442
|
+
ticket: CreatedOrderItemTicketProps;
|
|
443
|
+
};
|
|
444
|
+
|
|
445
|
+
type CreatedOrderOrderProps = Pick<
|
|
446
|
+
OrderProps,
|
|
447
|
+
'id' | 'rawPrice' | 'totalPrice' | 'totalFee' | 'totalDiscount'
|
|
448
|
+
> & {
|
|
449
|
+
utmSource: string | null;
|
|
450
|
+
utmCampaign: string | null;
|
|
451
|
+
buyer: BuyerProps | null;
|
|
452
|
+
event: CreatedOrderEventProps;
|
|
453
|
+
items: CreatedOrderItemProps[];
|
|
454
|
+
info: Record<string, unknown>;
|
|
307
455
|
};
|
|
308
456
|
|
|
309
457
|
type CreatedOrderProps = {
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
>;
|
|
314
|
-
clientSecret?: string;
|
|
458
|
+
type: 'success';
|
|
459
|
+
order: CreatedOrderOrderProps;
|
|
460
|
+
clientSecret: string;
|
|
315
461
|
};
|
|
316
462
|
|
|
317
463
|
type CreateOrderTicketProps = {
|
|
@@ -330,58 +476,43 @@ type CreateOrderProps = {
|
|
|
330
476
|
buyer?: BuyerProps;
|
|
331
477
|
};
|
|
332
478
|
|
|
333
|
-
type
|
|
334
|
-
name: string;
|
|
335
|
-
document: string | null;
|
|
336
|
-
};
|
|
337
|
-
|
|
338
|
-
type EventWithChannelProps = {
|
|
339
|
-
channel: Pick<ChannelProps, 'slug' | 'name'>;
|
|
340
|
-
} & Pick<
|
|
479
|
+
type UserTicketEventProps = Pick<
|
|
341
480
|
EventProps,
|
|
342
|
-
'id' | 'name' | 'slug' | 'startsAt' | 'timezone' | 'address' | 'image'
|
|
343
|
-
>;
|
|
344
|
-
|
|
345
|
-
type TicketWithEventPops = {
|
|
346
|
-
event: EventWithChannelProps;
|
|
347
|
-
} & TicketProps;
|
|
348
|
-
|
|
349
|
-
type UserTicketProps = {
|
|
350
|
-
id: string;
|
|
351
|
-
slug: string;
|
|
352
|
-
qrCodeDataUrl: string;
|
|
353
|
-
ticket: TicketWithEventPops;
|
|
354
|
-
nomination?: Pick<NominationProps, 'name' | 'document'>;
|
|
355
|
-
seatId?: string;
|
|
356
|
-
usedAt?: string | null;
|
|
357
|
-
isInvite: boolean;
|
|
358
|
-
ownerEmail: string;
|
|
359
|
-
};
|
|
360
|
-
|
|
361
|
-
type OrderItemTicketProps = Pick<
|
|
362
|
-
TicketProps,
|
|
363
481
|
| 'id'
|
|
364
|
-
| 'type'
|
|
365
482
|
| 'name'
|
|
483
|
+
| 'slug'
|
|
484
|
+
| 'startsAt'
|
|
485
|
+
| 'opensAt'
|
|
486
|
+
| 'timezone'
|
|
487
|
+
| 'address'
|
|
366
488
|
| 'image'
|
|
367
|
-
| 'price'
|
|
368
|
-
| 'nominable'
|
|
369
|
-
| 'beginsAt'
|
|
370
|
-
| 'event'
|
|
371
489
|
> & {
|
|
372
|
-
|
|
490
|
+
channel: Pick<ChannelProps, 'id' | 'name' | 'slug'>;
|
|
373
491
|
};
|
|
374
492
|
|
|
375
|
-
type
|
|
493
|
+
type UserTicketItemTicketProps = Pick<
|
|
494
|
+
TicketProps,
|
|
495
|
+
'type' | 'name' | 'transferable' | 'image' | 'group'
|
|
496
|
+
> & {
|
|
497
|
+
beginsAt?: string | null;
|
|
498
|
+
event: UserTicketEventProps;
|
|
499
|
+
};
|
|
500
|
+
|
|
501
|
+
type UserTicketProps = {
|
|
376
502
|
id: string;
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
503
|
+
slug: string;
|
|
504
|
+
qrCodeDataUrl: string;
|
|
505
|
+
ticket: UserTicketItemTicketProps;
|
|
506
|
+
nomination?: Pick<NominationProps, 'name' | 'document'> | null;
|
|
507
|
+
seatId?: string | null;
|
|
508
|
+
usedAt?: string | null;
|
|
509
|
+
isInvite?: boolean;
|
|
510
|
+
ownerEmail?: string;
|
|
381
511
|
};
|
|
382
512
|
|
|
383
513
|
type OrderWithCreditCardProps = {
|
|
384
514
|
paymentMethod: 'CREDIT_CARD';
|
|
515
|
+
creditCard?: { firstSixDigits: string };
|
|
385
516
|
};
|
|
386
517
|
|
|
387
518
|
type OrderWithPixProps = {
|
|
@@ -425,6 +556,7 @@ type ThreeDSProps = {
|
|
|
425
556
|
|
|
426
557
|
type PaymentIntentProps = {
|
|
427
558
|
id: string;
|
|
559
|
+
externalId?: string;
|
|
428
560
|
status: PaymentIntentStatus;
|
|
429
561
|
failureReason?: FailureReasonProps;
|
|
430
562
|
threeDS?: ThreeDSProps;
|
|
@@ -453,7 +585,7 @@ type BaseFeeProps = {
|
|
|
453
585
|
type ProcessingFeeProps = {
|
|
454
586
|
fixedFee: number;
|
|
455
587
|
percentageFee: number;
|
|
456
|
-
lessThan
|
|
588
|
+
lessThan?: number;
|
|
457
589
|
};
|
|
458
590
|
|
|
459
591
|
type PlatformFeeProps = BaseFeeProps & {
|
|
@@ -484,20 +616,50 @@ type UpdateUserTicketProps = {
|
|
|
484
616
|
nomination?: NominationProps;
|
|
485
617
|
};
|
|
486
618
|
|
|
487
|
-
type GetUserEventsProps =
|
|
488
|
-
|
|
619
|
+
type GetUserEventsProps = Pick<
|
|
620
|
+
EventProps,
|
|
621
|
+
| 'id'
|
|
622
|
+
| 'slug'
|
|
623
|
+
| 'name'
|
|
624
|
+
| 'description'
|
|
625
|
+
| 'status'
|
|
626
|
+
| 'startsAt'
|
|
627
|
+
| 'endsAt'
|
|
628
|
+
| 'opensAt'
|
|
629
|
+
| 'timezone'
|
|
630
|
+
| 'canceledAt'
|
|
631
|
+
| 'address'
|
|
632
|
+
| 'image'
|
|
633
|
+
> & {
|
|
634
|
+
channel: Pick<ChannelProps, 'id' | 'name' | 'slug' | 'avatar'>;
|
|
635
|
+
};
|
|
636
|
+
|
|
637
|
+
type UserOrderItemEventProps = Pick<
|
|
638
|
+
EventProps,
|
|
639
|
+
'name' | 'startsAt' | 'endsAt'
|
|
640
|
+
> & {
|
|
641
|
+
channel: Pick<ChannelProps, 'id' | 'name' | 'avatar'>;
|
|
642
|
+
};
|
|
643
|
+
|
|
644
|
+
type UserOrderItemGroupProps = Pick<GroupProps, 'name' | 'id'>;
|
|
645
|
+
|
|
646
|
+
type UserOrderItemTicketProps = Pick<TicketProps, 'name' | 'id'> & {
|
|
647
|
+
group: UserOrderItemGroupProps | null;
|
|
648
|
+
event: UserOrderItemEventProps;
|
|
489
649
|
};
|
|
490
650
|
|
|
491
651
|
type UserOrderItemProps = {
|
|
492
652
|
id: string;
|
|
493
653
|
amount: number;
|
|
494
|
-
ticket:
|
|
654
|
+
ticket: UserOrderItemTicketProps;
|
|
495
655
|
};
|
|
496
656
|
|
|
497
657
|
type UserOrderProps = Pick<
|
|
498
658
|
OrderProps,
|
|
499
|
-
'id' | 'status' | '
|
|
500
|
-
> & {
|
|
659
|
+
'id' | 'status' | 'totalPrice' | 'createdAt' | 'totalFee' | 'totalInsurance'
|
|
660
|
+
> & {
|
|
661
|
+
items: UserOrderItemProps[];
|
|
662
|
+
};
|
|
501
663
|
|
|
502
664
|
type GetUserOrdersProps = {
|
|
503
665
|
orders: UserOrderProps[];
|
|
@@ -510,39 +672,23 @@ type UserProps = {
|
|
|
510
672
|
phoneNumber?: string | null;
|
|
511
673
|
document?: string | null;
|
|
512
674
|
birthdate?: string | null;
|
|
675
|
+
role?: string;
|
|
676
|
+
avatar?: Pick<FileProps, 'url'> | null;
|
|
513
677
|
avatarId?: string | null;
|
|
514
678
|
createdAt?: string;
|
|
515
679
|
updatedAt?: string;
|
|
516
680
|
};
|
|
517
681
|
|
|
518
|
-
type
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
document
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
phoneNumber?: string;
|
|
530
|
-
document?: string;
|
|
531
|
-
birthdate?: string;
|
|
532
|
-
avatarId?: string;
|
|
533
|
-
};
|
|
534
|
-
|
|
535
|
-
type UpdateUserEmailProps = {
|
|
536
|
-
email: string;
|
|
537
|
-
};
|
|
538
|
-
|
|
539
|
-
type UpdateUserPasswordProps = {
|
|
540
|
-
currentPassword: string;
|
|
541
|
-
newPassword: string;
|
|
542
|
-
};
|
|
543
|
-
|
|
544
|
-
type FindUserEventTicketsProps = {
|
|
545
|
-
userTickets: UserTicketProps[];
|
|
546
|
-
};
|
|
682
|
+
type GetMeUserProps = Pick<
|
|
683
|
+
UserProps,
|
|
684
|
+
| 'id'
|
|
685
|
+
| 'name'
|
|
686
|
+
| 'email'
|
|
687
|
+
| 'document'
|
|
688
|
+
| 'phoneNumber'
|
|
689
|
+
| 'birthdate'
|
|
690
|
+
| 'role'
|
|
691
|
+
| 'avatar'
|
|
692
|
+
>;
|
|
547
693
|
|
|
548
|
-
export type { AddressProps, BuyerProps, CategoryProps, ChannelProps, ChartCategoryProps, CheckCouponProps, CouponProps,
|
|
694
|
+
export type { AddressProps, BuyerProps, CategoryProps, ChannelProps, ChartCategoryProps, CheckCouponProps, CouponProps, CreateEventReminderProps, CreateOrderProps, CreateOrderTicketProps, CreateTicketFileProps, CreatedOrderEventProps, CreatedOrderGroupProps, CreatedOrderItemProps, CreatedOrderItemTicketProps, CreatedOrderOrderProps, CreatedOrderProps, EventAgePolicyType, EventContact, EventProps, EventReviewStats, ExternalAnalyticsProps, FileProps, FindEventItemProps, FindEventProductEventProps, FindEventProductItemProps, FindEventProductsProps, FindEventTagItemProps, FindEventTicketGroupProps, FindEventTicketItemProps, FindEventTicketsEventProps, FindEventTicketsProps, FindEventsParams, FindEventsProps, GaugeProps, GetChannelEventProps, GetChannelEventsProps, GetMeUserProps, GetOrderProps, GetUserEventsProps, GetUserOrdersProps, GroupProps, NominationProps, OrderEventProps, OrderItemProps, OrderItemTicketProps, OrderProps, PaymentIntentProps, PlatformFeeProps, TagProps, TicketCustomField, TicketCustomFieldType, TicketFileOutput, TicketProps, TransferTicketProps, TransferTicketRecipientProps, UpdateUserTicketProps, UserOrderItemProps, UserOrderProps, UserProps, UserTicketEventProps, UserTicketItemTicketProps, UserTicketProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -59,9 +59,9 @@ type TagProps = {
|
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
type EventContact = {
|
|
62
|
-
email?: string;
|
|
63
|
-
phoneNumber?: string;
|
|
64
|
-
instagramUsername?: string;
|
|
62
|
+
email?: string | null;
|
|
63
|
+
phoneNumber?: string | null;
|
|
64
|
+
instagramUsername?: string | null;
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
type ExternalAnalyticsProps = {
|
|
@@ -71,15 +71,28 @@ type ExternalAnalyticsProps = {
|
|
|
71
71
|
|
|
72
72
|
type EventType = 'DRAFT' | 'PUBLISHED' | 'PRIVATE';
|
|
73
73
|
|
|
74
|
+
type EventAgePolicyType =
|
|
75
|
+
| 'EIGHTEEN_AND_OVER'
|
|
76
|
+
| 'SIXTEEN_WITH_GUARDIAN'
|
|
77
|
+
| 'SIXTEEN_WITH_AUTHORIZATION'
|
|
78
|
+
| 'FOURTEEN_WITH_GUARDIAN'
|
|
79
|
+
| 'FOURTEEN_WITH_AUTHORIZATION'
|
|
80
|
+
| 'ALL_AGES';
|
|
81
|
+
|
|
82
|
+
type EventReviewStats = {
|
|
83
|
+
averageRating: number | null;
|
|
84
|
+
totalReviews: number;
|
|
85
|
+
};
|
|
86
|
+
|
|
74
87
|
type EventProps = {
|
|
75
88
|
id: string;
|
|
76
89
|
slug: string;
|
|
77
|
-
channelId
|
|
90
|
+
channelId?: string;
|
|
78
91
|
name: string;
|
|
79
92
|
isSeatAssigned: boolean;
|
|
80
93
|
description: Record<string, any>[];
|
|
81
94
|
status: EventType;
|
|
82
|
-
createdAt
|
|
95
|
+
createdAt?: string;
|
|
83
96
|
startsAt: string;
|
|
84
97
|
endsAt: string;
|
|
85
98
|
opensAt?: string | null;
|
|
@@ -87,12 +100,13 @@ type EventProps = {
|
|
|
87
100
|
timezone: string;
|
|
88
101
|
canceledAt: string | null;
|
|
89
102
|
address?: AddressProps | null;
|
|
90
|
-
image: FileProps;
|
|
91
|
-
|
|
103
|
+
image: FileProps | null;
|
|
104
|
+
agePolicyType: EventAgePolicyType | null;
|
|
105
|
+
minorsAuthFile: FileProps | null;
|
|
92
106
|
contact?: EventContact;
|
|
93
107
|
categories: CategoryProps[];
|
|
94
|
-
tags
|
|
95
|
-
hasTicketInsurance
|
|
108
|
+
tags?: TagProps[];
|
|
109
|
+
hasTicketInsurance?: boolean;
|
|
96
110
|
channel: Pick<
|
|
97
111
|
ChannelProps,
|
|
98
112
|
'id' | 'name' | 'avatar' | 'slug' | 'eventsCount'
|
|
@@ -102,6 +116,7 @@ type EventProps = {
|
|
|
102
116
|
EventProps,
|
|
103
117
|
'id' | 'startsAt' | 'timezone' | 'isSeatAssigned'
|
|
104
118
|
>[];
|
|
119
|
+
reviewStats?: EventReviewStats | null;
|
|
105
120
|
};
|
|
106
121
|
|
|
107
122
|
type GetChannelEventProps = {
|
|
@@ -112,34 +127,26 @@ type GetChannelEventsProps = {
|
|
|
112
127
|
events: EventProps[];
|
|
113
128
|
};
|
|
114
129
|
|
|
130
|
+
type CheckCouponProps = {
|
|
131
|
+
eventId: string;
|
|
132
|
+
couponCode: string;
|
|
133
|
+
};
|
|
134
|
+
|
|
115
135
|
type CouponProps = {
|
|
116
136
|
id: string;
|
|
117
137
|
type: 'FIXED' | 'PERCENTAGE';
|
|
118
138
|
code: string;
|
|
119
139
|
value: number;
|
|
120
|
-
expiresAt: string;
|
|
140
|
+
expiresAt: string | null;
|
|
121
141
|
amount: number | null;
|
|
122
142
|
availableAmount: number | null;
|
|
123
143
|
ticketIds: string[];
|
|
124
144
|
};
|
|
125
145
|
|
|
126
|
-
type CheckCouponProps = {
|
|
127
|
-
eventId: string;
|
|
128
|
-
couponCode: string;
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
type CouponsListProps = {
|
|
132
|
-
coupons: CouponProps[];
|
|
133
|
-
cursor?: string;
|
|
134
|
-
};
|
|
135
|
-
|
|
136
146
|
type CreateEventReminderProps = {
|
|
137
147
|
email: string;
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
type ChartCategoryProps = {
|
|
141
|
-
id: string;
|
|
142
148
|
name: string;
|
|
149
|
+
phoneNumber: string;
|
|
143
150
|
};
|
|
144
151
|
|
|
145
152
|
type GaugeProps = {
|
|
@@ -147,6 +154,11 @@ type GaugeProps = {
|
|
|
147
154
|
usedAmount: number;
|
|
148
155
|
};
|
|
149
156
|
|
|
157
|
+
type ChartCategoryProps = {
|
|
158
|
+
id: string;
|
|
159
|
+
name: string;
|
|
160
|
+
};
|
|
161
|
+
|
|
150
162
|
type GroupProps = {
|
|
151
163
|
id: string;
|
|
152
164
|
name: string;
|
|
@@ -192,7 +204,7 @@ type TicketProps = {
|
|
|
192
204
|
description?: string;
|
|
193
205
|
amount: number;
|
|
194
206
|
visibility: TicketVisibility;
|
|
195
|
-
privateToken?: string;
|
|
207
|
+
privateToken?: string | null;
|
|
196
208
|
image: (FileProps & { id: string }) | null;
|
|
197
209
|
amount: number;
|
|
198
210
|
availableAmount: number;
|
|
@@ -202,8 +214,8 @@ type TicketProps = {
|
|
|
202
214
|
isInvite: boolean;
|
|
203
215
|
startsAt?: string;
|
|
204
216
|
endsAt?: string;
|
|
205
|
-
minBuy?: number;
|
|
206
|
-
maxBuy?: number;
|
|
217
|
+
minBuy?: number | null;
|
|
218
|
+
maxBuy?: number | null;
|
|
207
219
|
beginsAt?: string;
|
|
208
220
|
predecessor?: Pick<TicketProps, 'id' | 'name' | 'group'>;
|
|
209
221
|
expireBehavior?: 'VISIBLE' | 'HIDDEN';
|
|
@@ -211,20 +223,61 @@ type TicketProps = {
|
|
|
211
223
|
customFields?: TicketCustomField[];
|
|
212
224
|
};
|
|
213
225
|
|
|
226
|
+
type FindEventProductEventProps = Pick<
|
|
227
|
+
EventProps,
|
|
228
|
+
'id' | 'endsAt' | 'presaleStartsAt'
|
|
229
|
+
> & {
|
|
230
|
+
gauge: GaugeProps | null;
|
|
231
|
+
maxBuyAmount: number | null;
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
type FindEventProductItemProps = Pick<
|
|
235
|
+
TicketProps,
|
|
236
|
+
| 'id'
|
|
237
|
+
| 'name'
|
|
238
|
+
| 'description'
|
|
239
|
+
| 'amount'
|
|
240
|
+
| 'availableAmount'
|
|
241
|
+
| 'endsAt'
|
|
242
|
+
| 'price'
|
|
243
|
+
| 'image'
|
|
244
|
+
| 'privateToken'
|
|
245
|
+
| 'minBuy'
|
|
246
|
+
| 'maxBuy'
|
|
247
|
+
>;
|
|
248
|
+
|
|
214
249
|
type FindEventProductsProps = {
|
|
215
|
-
event:
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
250
|
+
event: FindEventProductEventProps;
|
|
251
|
+
products: FindEventProductItemProps[];
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
type FindEventTagItemProps = Pick<
|
|
255
|
+
TagProps,
|
|
256
|
+
'id' | 'name' | 'description' | 'emoji' | 'parentId'
|
|
257
|
+
>;
|
|
258
|
+
|
|
259
|
+
type FindEventItemProps = Pick<
|
|
260
|
+
EventProps,
|
|
261
|
+
| 'id'
|
|
262
|
+
| 'name'
|
|
263
|
+
| 'slug'
|
|
264
|
+
| 'description'
|
|
265
|
+
| 'canceledAt'
|
|
266
|
+
| 'endsAt'
|
|
267
|
+
| 'startsAt'
|
|
268
|
+
| 'presaleStartsAt'
|
|
269
|
+
| 'timezone'
|
|
270
|
+
| 'status'
|
|
271
|
+
| 'categories'
|
|
272
|
+
| 'address'
|
|
273
|
+
| 'channel'
|
|
274
|
+
> & {
|
|
275
|
+
image: FileProps | null;
|
|
276
|
+
tags: FindEventTagItemProps[];
|
|
224
277
|
};
|
|
225
278
|
|
|
226
279
|
type FindEventsProps = {
|
|
227
|
-
events:
|
|
280
|
+
events: FindEventItemProps[];
|
|
228
281
|
cursor?: string;
|
|
229
282
|
};
|
|
230
283
|
|
|
@@ -239,17 +292,44 @@ type FindEventsParams = {
|
|
|
239
292
|
categoryIds?: string[];
|
|
240
293
|
};
|
|
241
294
|
|
|
295
|
+
type FindEventTicketsEventProps = Pick<
|
|
296
|
+
EventProps,
|
|
297
|
+
'id' | 'startsAt' | 'endsAt' | 'presaleStartsAt'
|
|
298
|
+
> & {
|
|
299
|
+
maxBuyAmount: number | null;
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
type FindEventTicketItemProps = Pick<
|
|
303
|
+
TicketProps,
|
|
304
|
+
| 'id'
|
|
305
|
+
| 'type'
|
|
306
|
+
| 'groupId'
|
|
307
|
+
| 'name'
|
|
308
|
+
| 'description'
|
|
309
|
+
| 'amount'
|
|
310
|
+
| 'availableAmount'
|
|
311
|
+
| 'endsAt'
|
|
312
|
+
| 'price'
|
|
313
|
+
| 'orderAt'
|
|
314
|
+
| 'expireBehavior'
|
|
315
|
+
| 'image'
|
|
316
|
+
| 'chartCategory'
|
|
317
|
+
| 'privateToken'
|
|
318
|
+
| 'minBuy'
|
|
319
|
+
| 'maxBuy'
|
|
320
|
+
>;
|
|
321
|
+
|
|
322
|
+
type FindEventTicketGroupProps = Pick<
|
|
323
|
+
GroupProps,
|
|
324
|
+
'id' | 'name' | 'description' | 'defaultOpen' | 'orderAt' | 'maxBuyAmount'
|
|
325
|
+
> & {
|
|
326
|
+
tickets: FindEventTicketItemProps[];
|
|
327
|
+
};
|
|
328
|
+
|
|
242
329
|
type FindEventTicketsProps = {
|
|
243
|
-
event:
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
'startsAt',
|
|
247
|
-
'endsAt',
|
|
248
|
-
'presaleStartsAt',
|
|
249
|
-
'maxBuyAmount'
|
|
250
|
-
>;
|
|
251
|
-
tickets: TicketProps[];
|
|
252
|
-
groups: GroupProps[];
|
|
330
|
+
event: FindEventTicketsEventProps;
|
|
331
|
+
tickets: FindEventTicketItemProps[];
|
|
332
|
+
groups: FindEventTicketGroupProps[];
|
|
253
333
|
};
|
|
254
334
|
|
|
255
335
|
type BuyerProps = {
|
|
@@ -261,6 +341,33 @@ type BuyerProps = {
|
|
|
261
341
|
birthdate?: string | null;
|
|
262
342
|
};
|
|
263
343
|
|
|
344
|
+
type NominationProps = {
|
|
345
|
+
name: string;
|
|
346
|
+
document: string | null;
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
type OrderItemTicketProps = Pick<
|
|
350
|
+
TicketProps,
|
|
351
|
+
| 'id'
|
|
352
|
+
| 'type'
|
|
353
|
+
| 'name'
|
|
354
|
+
| 'image'
|
|
355
|
+
| 'price'
|
|
356
|
+
| 'nominable'
|
|
357
|
+
| 'beginsAt'
|
|
358
|
+
| 'customFields'
|
|
359
|
+
> & {
|
|
360
|
+
group: Pick<GroupProps, 'id' | 'name'> | null;
|
|
361
|
+
};
|
|
362
|
+
|
|
363
|
+
type OrderItemProps = {
|
|
364
|
+
id: string;
|
|
365
|
+
amount: number;
|
|
366
|
+
seatIds: string[];
|
|
367
|
+
nominations: NominationProps[];
|
|
368
|
+
ticket: OrderItemTicketProps;
|
|
369
|
+
};
|
|
370
|
+
|
|
264
371
|
type OrderStatus =
|
|
265
372
|
| 'PENDING'
|
|
266
373
|
| 'PAID'
|
|
@@ -275,6 +382,24 @@ type PaymentProps = {
|
|
|
275
382
|
type: 'PIX' | 'CREDIT_CARD';
|
|
276
383
|
};
|
|
277
384
|
|
|
385
|
+
type OrderEventProps = Pick<
|
|
386
|
+
EventProps,
|
|
387
|
+
| 'id'
|
|
388
|
+
| 'name'
|
|
389
|
+
| 'slug'
|
|
390
|
+
| 'agePolicyType'
|
|
391
|
+
| 'minorsAuthFile'
|
|
392
|
+
| 'hasTicketInsurance'
|
|
393
|
+
| 'startsAt'
|
|
394
|
+
| 'opensAt'
|
|
395
|
+
| 'timezone'
|
|
396
|
+
| 'image'
|
|
397
|
+
| 'address'
|
|
398
|
+
| 'externalAnalytics'
|
|
399
|
+
> & {
|
|
400
|
+
channel: Pick<ChannelProps, 'id' | 'slug'>;
|
|
401
|
+
};
|
|
402
|
+
|
|
278
403
|
type OrderProps = {
|
|
279
404
|
id: string;
|
|
280
405
|
status: OrderStatus;
|
|
@@ -284,34 +409,55 @@ type OrderProps = {
|
|
|
284
409
|
totalDiscount: number;
|
|
285
410
|
totalRefund?: number;
|
|
286
411
|
totalCreditCardFee?: number;
|
|
412
|
+
totalInsurance?: number;
|
|
413
|
+
processingFee?: number;
|
|
287
414
|
eventId: string;
|
|
288
|
-
event:
|
|
289
|
-
EventProps,
|
|
290
|
-
| 'id'
|
|
291
|
-
| 'name'
|
|
292
|
-
| 'slug'
|
|
293
|
-
| 'channel'
|
|
294
|
-
| 'address'
|
|
295
|
-
| 'startsAt'
|
|
296
|
-
| 'image'
|
|
297
|
-
| 'legalAgeRequired'
|
|
298
|
-
| 'timezone'
|
|
299
|
-
| 'externalAnalytics'
|
|
300
|
-
>;
|
|
415
|
+
event: OrderEventProps;
|
|
301
416
|
payment?: PaymentProps;
|
|
302
417
|
buyer?: BuyerProps;
|
|
303
418
|
coupon?: { usedAmount: number; coupon: Pick<CouponProps, 'id' | 'code'> };
|
|
304
419
|
expiresAt: string;
|
|
305
420
|
createdAt?: string;
|
|
306
421
|
venue?: OrderVenue;
|
|
422
|
+
stoneTransactions?: unknown[];
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
type CreatedOrderEventProps = Pick<
|
|
426
|
+
EventProps,
|
|
427
|
+
'id' | 'name' | 'startsAt'
|
|
428
|
+
>;
|
|
429
|
+
|
|
430
|
+
type CreatedOrderGroupProps = Pick<GroupProps, 'id' | 'name'> & {
|
|
431
|
+
gauge?: Pick<GaugeProps, 'totalAmount' | 'usedAmount' | 'id'> | null;
|
|
432
|
+
};
|
|
433
|
+
|
|
434
|
+
type CreatedOrderItemTicketProps = Pick<
|
|
435
|
+
TicketProps,
|
|
436
|
+
'id' | 'name' | 'type' | 'price'
|
|
437
|
+
> & {
|
|
438
|
+
group: CreatedOrderGroupProps | null;
|
|
439
|
+
};
|
|
440
|
+
|
|
441
|
+
type CreatedOrderItemProps = Pick<OrderItemProps, 'id' | 'amount'> & {
|
|
442
|
+
ticket: CreatedOrderItemTicketProps;
|
|
443
|
+
};
|
|
444
|
+
|
|
445
|
+
type CreatedOrderOrderProps = Pick<
|
|
446
|
+
OrderProps,
|
|
447
|
+
'id' | 'rawPrice' | 'totalPrice' | 'totalFee' | 'totalDiscount'
|
|
448
|
+
> & {
|
|
449
|
+
utmSource: string | null;
|
|
450
|
+
utmCampaign: string | null;
|
|
451
|
+
buyer: BuyerProps | null;
|
|
452
|
+
event: CreatedOrderEventProps;
|
|
453
|
+
items: CreatedOrderItemProps[];
|
|
454
|
+
info: Record<string, unknown>;
|
|
307
455
|
};
|
|
308
456
|
|
|
309
457
|
type CreatedOrderProps = {
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
>;
|
|
314
|
-
clientSecret?: string;
|
|
458
|
+
type: 'success';
|
|
459
|
+
order: CreatedOrderOrderProps;
|
|
460
|
+
clientSecret: string;
|
|
315
461
|
};
|
|
316
462
|
|
|
317
463
|
type CreateOrderTicketProps = {
|
|
@@ -330,58 +476,43 @@ type CreateOrderProps = {
|
|
|
330
476
|
buyer?: BuyerProps;
|
|
331
477
|
};
|
|
332
478
|
|
|
333
|
-
type
|
|
334
|
-
name: string;
|
|
335
|
-
document: string | null;
|
|
336
|
-
};
|
|
337
|
-
|
|
338
|
-
type EventWithChannelProps = {
|
|
339
|
-
channel: Pick<ChannelProps, 'slug' | 'name'>;
|
|
340
|
-
} & Pick<
|
|
479
|
+
type UserTicketEventProps = Pick<
|
|
341
480
|
EventProps,
|
|
342
|
-
'id' | 'name' | 'slug' | 'startsAt' | 'timezone' | 'address' | 'image'
|
|
343
|
-
>;
|
|
344
|
-
|
|
345
|
-
type TicketWithEventPops = {
|
|
346
|
-
event: EventWithChannelProps;
|
|
347
|
-
} & TicketProps;
|
|
348
|
-
|
|
349
|
-
type UserTicketProps = {
|
|
350
|
-
id: string;
|
|
351
|
-
slug: string;
|
|
352
|
-
qrCodeDataUrl: string;
|
|
353
|
-
ticket: TicketWithEventPops;
|
|
354
|
-
nomination?: Pick<NominationProps, 'name' | 'document'>;
|
|
355
|
-
seatId?: string;
|
|
356
|
-
usedAt?: string | null;
|
|
357
|
-
isInvite: boolean;
|
|
358
|
-
ownerEmail: string;
|
|
359
|
-
};
|
|
360
|
-
|
|
361
|
-
type OrderItemTicketProps = Pick<
|
|
362
|
-
TicketProps,
|
|
363
481
|
| 'id'
|
|
364
|
-
| 'type'
|
|
365
482
|
| 'name'
|
|
483
|
+
| 'slug'
|
|
484
|
+
| 'startsAt'
|
|
485
|
+
| 'opensAt'
|
|
486
|
+
| 'timezone'
|
|
487
|
+
| 'address'
|
|
366
488
|
| 'image'
|
|
367
|
-
| 'price'
|
|
368
|
-
| 'nominable'
|
|
369
|
-
| 'beginsAt'
|
|
370
|
-
| 'event'
|
|
371
489
|
> & {
|
|
372
|
-
|
|
490
|
+
channel: Pick<ChannelProps, 'id' | 'name' | 'slug'>;
|
|
373
491
|
};
|
|
374
492
|
|
|
375
|
-
type
|
|
493
|
+
type UserTicketItemTicketProps = Pick<
|
|
494
|
+
TicketProps,
|
|
495
|
+
'type' | 'name' | 'transferable' | 'image' | 'group'
|
|
496
|
+
> & {
|
|
497
|
+
beginsAt?: string | null;
|
|
498
|
+
event: UserTicketEventProps;
|
|
499
|
+
};
|
|
500
|
+
|
|
501
|
+
type UserTicketProps = {
|
|
376
502
|
id: string;
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
503
|
+
slug: string;
|
|
504
|
+
qrCodeDataUrl: string;
|
|
505
|
+
ticket: UserTicketItemTicketProps;
|
|
506
|
+
nomination?: Pick<NominationProps, 'name' | 'document'> | null;
|
|
507
|
+
seatId?: string | null;
|
|
508
|
+
usedAt?: string | null;
|
|
509
|
+
isInvite?: boolean;
|
|
510
|
+
ownerEmail?: string;
|
|
381
511
|
};
|
|
382
512
|
|
|
383
513
|
type OrderWithCreditCardProps = {
|
|
384
514
|
paymentMethod: 'CREDIT_CARD';
|
|
515
|
+
creditCard?: { firstSixDigits: string };
|
|
385
516
|
};
|
|
386
517
|
|
|
387
518
|
type OrderWithPixProps = {
|
|
@@ -425,6 +556,7 @@ type ThreeDSProps = {
|
|
|
425
556
|
|
|
426
557
|
type PaymentIntentProps = {
|
|
427
558
|
id: string;
|
|
559
|
+
externalId?: string;
|
|
428
560
|
status: PaymentIntentStatus;
|
|
429
561
|
failureReason?: FailureReasonProps;
|
|
430
562
|
threeDS?: ThreeDSProps;
|
|
@@ -453,7 +585,7 @@ type BaseFeeProps = {
|
|
|
453
585
|
type ProcessingFeeProps = {
|
|
454
586
|
fixedFee: number;
|
|
455
587
|
percentageFee: number;
|
|
456
|
-
lessThan
|
|
588
|
+
lessThan?: number;
|
|
457
589
|
};
|
|
458
590
|
|
|
459
591
|
type PlatformFeeProps = BaseFeeProps & {
|
|
@@ -484,20 +616,50 @@ type UpdateUserTicketProps = {
|
|
|
484
616
|
nomination?: NominationProps;
|
|
485
617
|
};
|
|
486
618
|
|
|
487
|
-
type GetUserEventsProps =
|
|
488
|
-
|
|
619
|
+
type GetUserEventsProps = Pick<
|
|
620
|
+
EventProps,
|
|
621
|
+
| 'id'
|
|
622
|
+
| 'slug'
|
|
623
|
+
| 'name'
|
|
624
|
+
| 'description'
|
|
625
|
+
| 'status'
|
|
626
|
+
| 'startsAt'
|
|
627
|
+
| 'endsAt'
|
|
628
|
+
| 'opensAt'
|
|
629
|
+
| 'timezone'
|
|
630
|
+
| 'canceledAt'
|
|
631
|
+
| 'address'
|
|
632
|
+
| 'image'
|
|
633
|
+
> & {
|
|
634
|
+
channel: Pick<ChannelProps, 'id' | 'name' | 'slug' | 'avatar'>;
|
|
635
|
+
};
|
|
636
|
+
|
|
637
|
+
type UserOrderItemEventProps = Pick<
|
|
638
|
+
EventProps,
|
|
639
|
+
'name' | 'startsAt' | 'endsAt'
|
|
640
|
+
> & {
|
|
641
|
+
channel: Pick<ChannelProps, 'id' | 'name' | 'avatar'>;
|
|
642
|
+
};
|
|
643
|
+
|
|
644
|
+
type UserOrderItemGroupProps = Pick<GroupProps, 'name' | 'id'>;
|
|
645
|
+
|
|
646
|
+
type UserOrderItemTicketProps = Pick<TicketProps, 'name' | 'id'> & {
|
|
647
|
+
group: UserOrderItemGroupProps | null;
|
|
648
|
+
event: UserOrderItemEventProps;
|
|
489
649
|
};
|
|
490
650
|
|
|
491
651
|
type UserOrderItemProps = {
|
|
492
652
|
id: string;
|
|
493
653
|
amount: number;
|
|
494
|
-
ticket:
|
|
654
|
+
ticket: UserOrderItemTicketProps;
|
|
495
655
|
};
|
|
496
656
|
|
|
497
657
|
type UserOrderProps = Pick<
|
|
498
658
|
OrderProps,
|
|
499
|
-
'id' | 'status' | '
|
|
500
|
-
> & {
|
|
659
|
+
'id' | 'status' | 'totalPrice' | 'createdAt' | 'totalFee' | 'totalInsurance'
|
|
660
|
+
> & {
|
|
661
|
+
items: UserOrderItemProps[];
|
|
662
|
+
};
|
|
501
663
|
|
|
502
664
|
type GetUserOrdersProps = {
|
|
503
665
|
orders: UserOrderProps[];
|
|
@@ -510,39 +672,23 @@ type UserProps = {
|
|
|
510
672
|
phoneNumber?: string | null;
|
|
511
673
|
document?: string | null;
|
|
512
674
|
birthdate?: string | null;
|
|
675
|
+
role?: string;
|
|
676
|
+
avatar?: Pick<FileProps, 'url'> | null;
|
|
513
677
|
avatarId?: string | null;
|
|
514
678
|
createdAt?: string;
|
|
515
679
|
updatedAt?: string;
|
|
516
680
|
};
|
|
517
681
|
|
|
518
|
-
type
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
document
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
phoneNumber?: string;
|
|
530
|
-
document?: string;
|
|
531
|
-
birthdate?: string;
|
|
532
|
-
avatarId?: string;
|
|
533
|
-
};
|
|
534
|
-
|
|
535
|
-
type UpdateUserEmailProps = {
|
|
536
|
-
email: string;
|
|
537
|
-
};
|
|
538
|
-
|
|
539
|
-
type UpdateUserPasswordProps = {
|
|
540
|
-
currentPassword: string;
|
|
541
|
-
newPassword: string;
|
|
542
|
-
};
|
|
543
|
-
|
|
544
|
-
type FindUserEventTicketsProps = {
|
|
545
|
-
userTickets: UserTicketProps[];
|
|
546
|
-
};
|
|
682
|
+
type GetMeUserProps = Pick<
|
|
683
|
+
UserProps,
|
|
684
|
+
| 'id'
|
|
685
|
+
| 'name'
|
|
686
|
+
| 'email'
|
|
687
|
+
| 'document'
|
|
688
|
+
| 'phoneNumber'
|
|
689
|
+
| 'birthdate'
|
|
690
|
+
| 'role'
|
|
691
|
+
| 'avatar'
|
|
692
|
+
>;
|
|
547
693
|
|
|
548
|
-
export type { AddressProps, BuyerProps, CategoryProps, ChannelProps, ChartCategoryProps, CheckCouponProps, CouponProps,
|
|
694
|
+
export type { AddressProps, BuyerProps, CategoryProps, ChannelProps, ChartCategoryProps, CheckCouponProps, CouponProps, CreateEventReminderProps, CreateOrderProps, CreateOrderTicketProps, CreateTicketFileProps, CreatedOrderEventProps, CreatedOrderGroupProps, CreatedOrderItemProps, CreatedOrderItemTicketProps, CreatedOrderOrderProps, CreatedOrderProps, EventAgePolicyType, EventContact, EventProps, EventReviewStats, ExternalAnalyticsProps, FileProps, FindEventItemProps, FindEventProductEventProps, FindEventProductItemProps, FindEventProductsProps, FindEventTagItemProps, FindEventTicketGroupProps, FindEventTicketItemProps, FindEventTicketsEventProps, FindEventTicketsProps, FindEventsParams, FindEventsProps, GaugeProps, GetChannelEventProps, GetChannelEventsProps, GetMeUserProps, GetOrderProps, GetUserEventsProps, GetUserOrdersProps, GroupProps, NominationProps, OrderEventProps, OrderItemProps, OrderItemTicketProps, OrderProps, PaymentIntentProps, PlatformFeeProps, TagProps, TicketCustomField, TicketCustomFieldType, TicketFileOutput, TicketProps, TransferTicketProps, TransferTicketRecipientProps, UpdateUserTicketProps, UserOrderItemProps, UserOrderProps, UserProps, UserTicketEventProps, UserTicketItemTicketProps, UserTicketProps };
|