@ticketlayer/backstage 0.2.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.
@@ -0,0 +1,4945 @@
1
+ import type { components } from './generated/types';
2
+ type AssignRoleRequest = components['schemas']['AssignRoleRequest'];
3
+ type CreateAiTopupRequest = components['schemas']['CreateAiTopupRequest'];
4
+ type CreatePurchaseRequest = components['schemas']['CreatePurchaseRequest'];
5
+ type CreateRoleRequest = components['schemas']['CreateRoleRequest'];
6
+ type CreateSubscriptionRequest = components['schemas']['CreateSubscriptionRequest'];
7
+ type CreateUserInvitationRequest = components['schemas']['CreateUserInvitationRequest'];
8
+ type CreateWebhookEndpoint = components['schemas']['CreateWebhookEndpoint'];
9
+ type FederateRequest = components['schemas']['FederateRequest'];
10
+ type LoginRequest = components['schemas']['LoginRequest'];
11
+ type RedeemInvitationRequest = components['schemas']['RedeemInvitationRequest'];
12
+ type RefreshTokenRequest = components['schemas']['RefreshTokenRequest'];
13
+ type SavePaymentMethodRequest = components['schemas']['SavePaymentMethodRequest'];
14
+ type UpdateAutoTopupRequest = components['schemas']['UpdateAutoTopupRequest'];
15
+ type UpdateIdentityProviderRequest = components['schemas']['UpdateIdentityProviderRequest'];
16
+ type UpdateOrganisationRequest = components['schemas']['UpdateOrganisationRequest'];
17
+ type UpdateRoleRequest = components['schemas']['UpdateRoleRequest'];
18
+ type UpdateUserAccountRolesRequest = components['schemas']['UpdateUserAccountRolesRequest'];
19
+ type UpdateWebhookEndpoint = components['schemas']['UpdateWebhookEndpoint'];
20
+ export declare class BackstageAPIError extends Error {
21
+ readonly code: string;
22
+ readonly statusCode: number;
23
+ constructor(message: string, code: string, statusCode: number);
24
+ isPermissionDenied(): boolean;
25
+ isAuthenticationError(): boolean;
26
+ isSessionExpired(): boolean;
27
+ isNotFound(): boolean;
28
+ isValidationError(): boolean;
29
+ }
30
+ export type AuthMode = 'bearer' | 'cookie';
31
+ export interface DebugConfig {
32
+ logRequests?: boolean;
33
+ logResponses?: boolean;
34
+ logErrors?: boolean;
35
+ logger?: {
36
+ log: (...args: unknown[]) => void;
37
+ error: (...args: unknown[]) => void;
38
+ };
39
+ }
40
+ export interface BackstageClientConfig {
41
+ baseUrl: string;
42
+ authMode?: AuthMode;
43
+ debug?: boolean | DebugConfig;
44
+ accessToken?: string | (() => string | undefined);
45
+ refreshToken?: string;
46
+ onTokenRefresh?: (accessToken: string, refreshToken: string) => void | Promise<void>;
47
+ onAuthFailure?: () => Promise<boolean>;
48
+ refreshEndpoint?: string;
49
+ organisationSlug?: string | (() => string | undefined);
50
+ headers?: Record<string, string>;
51
+ }
52
+ export declare const API_DATED_VERSION = "2026-06-13";
53
+ export declare const SDK_CLIENT_HEADER: string;
54
+ export declare class BackstageClient {
55
+ private baseUrl;
56
+ private authMode;
57
+ private accessToken?;
58
+ private refreshToken?;
59
+ private headers;
60
+ private onTokenRefresh?;
61
+ private onAuthFailure?;
62
+ private refreshEndpoint;
63
+ private organisationSlug?;
64
+ private debugConfig;
65
+ private logger;
66
+ constructor(config: BackstageClientConfig);
67
+ private debugLog;
68
+ setAccessToken(token: string): void;
69
+ clearAccessToken(): void;
70
+ getAccessToken(): string | undefined;
71
+ setRefreshToken(token: string): void;
72
+ getRefreshToken(): string | undefined;
73
+ private getCookie;
74
+ private resolveOrgSlug;
75
+ private getOrgFromSubdomain;
76
+ private attemptTokenRefresh;
77
+ private request;
78
+ meta: {
79
+ versions: () => Promise<{
80
+ current: string;
81
+ resolved: string;
82
+ versions: components["schemas"]["ApiVersion"][];
83
+ }>;
84
+ };
85
+ authentication: {
86
+ login: (request: LoginRequest) => Promise<{
87
+ accessToken: string;
88
+ refreshToken: string;
89
+ user: {
90
+ id: string;
91
+ email: string;
92
+ firstName?: string;
93
+ lastName?: string;
94
+ };
95
+ }>;
96
+ refresh: (request: RefreshTokenRequest) => Promise<{
97
+ accessToken: string;
98
+ refreshToken: string;
99
+ }>;
100
+ redeem: (request: RedeemInvitationRequest) => Promise<{
101
+ accessToken: string;
102
+ refreshToken: string;
103
+ user: {
104
+ id: string;
105
+ email: string;
106
+ firstName?: string;
107
+ lastName?: string;
108
+ };
109
+ }>;
110
+ federate: (request: FederateRequest) => Promise<{
111
+ accessToken: string;
112
+ refreshToken: string;
113
+ user: {
114
+ id: string;
115
+ email: string;
116
+ firstName?: string;
117
+ lastName?: string;
118
+ };
119
+ }>;
120
+ };
121
+ me: {
122
+ current: () => Promise<{
123
+ id: string;
124
+ email: string;
125
+ firstName?: string;
126
+ lastName?: string;
127
+ identityProvider?: string;
128
+ externalUserId?: string;
129
+ }>;
130
+ organisations: () => Promise<{
131
+ id: string;
132
+ slug: string;
133
+ name: string;
134
+ primaryColor?: string;
135
+ secondaryColor?: string;
136
+ logoUrl?: string;
137
+ userId: string;
138
+ }[]>;
139
+ roles: () => Promise<{
140
+ roles: components["schemas"]["MeRoleAssignment"][];
141
+ isOrgAdmin: boolean;
142
+ }>;
143
+ permissions: (options?: {
144
+ resource?: string;
145
+ action?: string;
146
+ }) => Promise<{
147
+ permissions: components["schemas"]["MePermissionEntry"][];
148
+ isOrgAdmin: boolean;
149
+ filters: {
150
+ resource: string | null;
151
+ action: string | null;
152
+ };
153
+ }>;
154
+ };
155
+ organisations: {
156
+ get: (id: string) => Promise<{
157
+ id: string;
158
+ name: string;
159
+ primaryColor?: string;
160
+ secondaryColor?: string;
161
+ logoUrl?: string;
162
+ metadata?: {
163
+ [key: string]: unknown;
164
+ };
165
+ apiVersion: string;
166
+ createdAt: string;
167
+ updatedAt: string;
168
+ }>;
169
+ update: (id: string, request: UpdateOrganisationRequest) => Promise<{
170
+ id: string;
171
+ name: string;
172
+ primaryColor?: string;
173
+ secondaryColor?: string;
174
+ logoUrl?: string;
175
+ metadata?: {
176
+ [key: string]: unknown;
177
+ };
178
+ apiVersion: string;
179
+ createdAt: string;
180
+ updatedAt: string;
181
+ }>;
182
+ };
183
+ accounts: {
184
+ list: (options?: {
185
+ search?: string;
186
+ status?: "active" | "inactive";
187
+ }) => Promise<{
188
+ id: string;
189
+ organisationId: string;
190
+ name: string;
191
+ status: "active" | "inactive";
192
+ isDeleted: boolean;
193
+ createdAt: string;
194
+ updatedAt: string;
195
+ }[]>;
196
+ create: (request: {
197
+ name: string;
198
+ status?: "active" | "inactive";
199
+ }) => Promise<{
200
+ id: string;
201
+ organisationId: string;
202
+ name: string;
203
+ status: "active" | "inactive";
204
+ isDeleted: boolean;
205
+ createdAt: string;
206
+ updatedAt: string;
207
+ }>;
208
+ get: (id: string) => Promise<{
209
+ id: string;
210
+ organisationId: string;
211
+ name: string;
212
+ status: "active" | "inactive";
213
+ isDeleted: boolean;
214
+ createdAt: string;
215
+ updatedAt: string;
216
+ }>;
217
+ update: (id: string, request: {
218
+ name?: string;
219
+ status?: "active" | "inactive";
220
+ }) => Promise<{
221
+ id: string;
222
+ organisationId: string;
223
+ name: string;
224
+ status: "active" | "inactive";
225
+ isDeleted: boolean;
226
+ createdAt: string;
227
+ updatedAt: string;
228
+ }>;
229
+ delete: (id: string) => Promise<{
230
+ success: boolean;
231
+ id: string;
232
+ }>;
233
+ };
234
+ identityProviders: {
235
+ list: (options?: {
236
+ organisationId?: string;
237
+ }) => Promise<{
238
+ id: string;
239
+ organisationId: string | null;
240
+ providerType: string;
241
+ isDefault: boolean;
242
+ isEnabled: boolean;
243
+ issuer: string;
244
+ authorizationEndpoint: string | null;
245
+ tokenEndpoint: string | null;
246
+ tokenEndpointInternal: string | null;
247
+ userinfoEndpoint: string | null;
248
+ userinfoEndpointInternal: string | null;
249
+ jwksUri: string;
250
+ jwksUriInternal: string | null;
251
+ clientId: string | null;
252
+ scopes: string[];
253
+ allowedClientIds: string[];
254
+ emailDomain: string | null;
255
+ supportsPkce: boolean;
256
+ cacheTtl: number;
257
+ configuration: {
258
+ [key: string]: unknown;
259
+ } | null;
260
+ createdAt: string;
261
+ updatedAt: string;
262
+ }[]>;
263
+ get: (id: string) => Promise<{
264
+ id: string;
265
+ organisationId: string | null;
266
+ providerType: string;
267
+ isDefault: boolean;
268
+ isEnabled: boolean;
269
+ issuer: string;
270
+ authorizationEndpoint: string | null;
271
+ tokenEndpoint: string | null;
272
+ tokenEndpointInternal: string | null;
273
+ userinfoEndpoint: string | null;
274
+ userinfoEndpointInternal: string | null;
275
+ jwksUri: string;
276
+ jwksUriInternal: string | null;
277
+ clientId: string | null;
278
+ scopes: string[];
279
+ allowedClientIds: string[];
280
+ emailDomain: string | null;
281
+ supportsPkce: boolean;
282
+ cacheTtl: number;
283
+ configuration: {
284
+ [key: string]: unknown;
285
+ } | null;
286
+ createdAt: string;
287
+ updatedAt: string;
288
+ }>;
289
+ update: (id: string, request: UpdateIdentityProviderRequest) => Promise<{
290
+ id: string;
291
+ organisationId: string | null;
292
+ providerType: string;
293
+ isDefault: boolean;
294
+ isEnabled: boolean;
295
+ issuer: string;
296
+ authorizationEndpoint: string | null;
297
+ tokenEndpoint: string | null;
298
+ tokenEndpointInternal: string | null;
299
+ userinfoEndpoint: string | null;
300
+ userinfoEndpointInternal: string | null;
301
+ jwksUri: string;
302
+ jwksUriInternal: string | null;
303
+ clientId: string | null;
304
+ scopes: string[];
305
+ allowedClientIds: string[];
306
+ emailDomain: string | null;
307
+ supportsPkce: boolean;
308
+ cacheTtl: number;
309
+ configuration: {
310
+ [key: string]: unknown;
311
+ } | null;
312
+ createdAt: string;
313
+ updatedAt: string;
314
+ }>;
315
+ };
316
+ userInvitations: {
317
+ create: (request: CreateUserInvitationRequest) => Promise<{
318
+ id: string;
319
+ organisationId: string;
320
+ userId: string;
321
+ code: string;
322
+ email: string;
323
+ expiresAt: string;
324
+ redeemedAt: string | null;
325
+ createdAt: string;
326
+ }>;
327
+ list: (options?: {
328
+ organisationId?: string;
329
+ status?: "pending" | "redeemed" | "expired" | "all";
330
+ }) => Promise<{
331
+ id: string;
332
+ organisationId: string;
333
+ userId: string;
334
+ code: string;
335
+ email: string;
336
+ expiresAt: string;
337
+ redeemedAt: string | null;
338
+ createdAt: string;
339
+ }[]>;
340
+ get: (id: string) => Promise<{
341
+ id: string;
342
+ organisationId: string;
343
+ userId: string;
344
+ code: string;
345
+ email: string;
346
+ expiresAt: string;
347
+ redeemedAt: string | null;
348
+ createdAt: string;
349
+ }>;
350
+ cancel: (id: string) => Promise<{
351
+ success: boolean;
352
+ id: string;
353
+ }>;
354
+ resend: (id: string) => Promise<{
355
+ id: string;
356
+ organisationId: string;
357
+ userId: string;
358
+ code: string;
359
+ email: string;
360
+ expiresAt: string;
361
+ redeemedAt: string | null;
362
+ createdAt: string;
363
+ }>;
364
+ };
365
+ roles: {
366
+ list: () => Promise<{
367
+ id: string;
368
+ organisationId: string;
369
+ name: string;
370
+ description: string | null;
371
+ isDeleted: boolean;
372
+ createdAt: string;
373
+ updatedAt: string;
374
+ permissions: string[];
375
+ isSystemRole: boolean;
376
+ }[]>;
377
+ create: (request: CreateRoleRequest) => Promise<{
378
+ id: string;
379
+ organisationId: string;
380
+ name: string;
381
+ description: string | null;
382
+ isDeleted: boolean;
383
+ createdAt: string;
384
+ updatedAt: string;
385
+ permissions: string[];
386
+ isSystemRole: boolean;
387
+ }>;
388
+ get: (id: string) => Promise<{
389
+ id: string;
390
+ organisationId: string;
391
+ name: string;
392
+ description: string | null;
393
+ isDeleted: boolean;
394
+ createdAt: string;
395
+ updatedAt: string;
396
+ permissions: string[];
397
+ isSystemRole: boolean;
398
+ }>;
399
+ update: (id: string, request: UpdateRoleRequest) => Promise<{
400
+ id: string;
401
+ organisationId: string;
402
+ name: string;
403
+ description: string | null;
404
+ isDeleted: boolean;
405
+ createdAt: string;
406
+ updatedAt: string;
407
+ permissions: string[];
408
+ isSystemRole: boolean;
409
+ }>;
410
+ delete: (id: string) => Promise<{
411
+ success: boolean;
412
+ id: string;
413
+ }>;
414
+ };
415
+ userAccountRoles: {
416
+ list: () => Promise<{
417
+ id: string;
418
+ organisationId: string;
419
+ userId: string;
420
+ accountId: string;
421
+ roleId: string;
422
+ createdAt: string;
423
+ user?: {
424
+ id: string;
425
+ email: string;
426
+ firstName: string | null;
427
+ lastName: string | null;
428
+ };
429
+ account?: {
430
+ id: string;
431
+ name: string;
432
+ };
433
+ role?: {
434
+ id: string;
435
+ name: string;
436
+ isSystemRole: boolean;
437
+ };
438
+ }[]>;
439
+ assign: (request: AssignRoleRequest) => Promise<{
440
+ id: string;
441
+ organisationId: string;
442
+ userId: string;
443
+ accountId: string;
444
+ roleId: string;
445
+ createdAt: string;
446
+ user?: {
447
+ id: string;
448
+ email: string;
449
+ firstName: string | null;
450
+ lastName: string | null;
451
+ };
452
+ account?: {
453
+ id: string;
454
+ name: string;
455
+ };
456
+ role?: {
457
+ id: string;
458
+ name: string;
459
+ isSystemRole: boolean;
460
+ };
461
+ }>;
462
+ update: (request: UpdateUserAccountRolesRequest) => Promise<{
463
+ id: string;
464
+ organisationId: string;
465
+ userId: string;
466
+ accountId: string;
467
+ roleId: string;
468
+ createdAt: string;
469
+ user?: {
470
+ id: string;
471
+ email: string;
472
+ firstName: string | null;
473
+ lastName: string | null;
474
+ };
475
+ account?: {
476
+ id: string;
477
+ name: string;
478
+ };
479
+ role?: {
480
+ id: string;
481
+ name: string;
482
+ isSystemRole: boolean;
483
+ };
484
+ }[]>;
485
+ remove: (id: string) => Promise<boolean>;
486
+ listByUser: (userId: string) => Promise<{
487
+ id: string;
488
+ organisationId: string;
489
+ userId: string;
490
+ accountId: string;
491
+ roleId: string;
492
+ createdAt: string;
493
+ user?: {
494
+ id: string;
495
+ email: string;
496
+ firstName: string | null;
497
+ lastName: string | null;
498
+ };
499
+ account?: {
500
+ id: string;
501
+ name: string;
502
+ };
503
+ role?: {
504
+ id: string;
505
+ name: string;
506
+ isSystemRole: boolean;
507
+ };
508
+ }[]>;
509
+ listByAccount: (accountId: string) => Promise<{
510
+ id: string;
511
+ organisationId: string;
512
+ userId: string;
513
+ accountId: string;
514
+ roleId: string;
515
+ createdAt: string;
516
+ user?: {
517
+ id: string;
518
+ email: string;
519
+ firstName: string | null;
520
+ lastName: string | null;
521
+ };
522
+ account?: {
523
+ id: string;
524
+ name: string;
525
+ };
526
+ role?: {
527
+ id: string;
528
+ name: string;
529
+ isSystemRole: boolean;
530
+ };
531
+ }[]>;
532
+ };
533
+ partners: {
534
+ createAccount: (request: {
535
+ name: string;
536
+ status?: "active" | "inactive";
537
+ channelName?: string;
538
+ channelSlug?: string;
539
+ }) => Promise<{
540
+ account: {
541
+ id: string;
542
+ organisationId: string;
543
+ name: string;
544
+ status: "active" | "inactive";
545
+ isDeleted: boolean;
546
+ createdAt: string;
547
+ updatedAt: string;
548
+ };
549
+ salesChannel: {
550
+ id: string;
551
+ slug: string;
552
+ channelType: string;
553
+ };
554
+ publishableKey: {
555
+ id: string;
556
+ key: string;
557
+ };
558
+ }>;
559
+ };
560
+ apiKeys: {
561
+ create: (request: {
562
+ name: string;
563
+ scopes: string[];
564
+ accountId?: string;
565
+ expiresAt?: any;
566
+ }) => Promise<{
567
+ apiKey: components["schemas"]["OrgApiKey"];
568
+ key: string;
569
+ }>;
570
+ list: () => Promise<{
571
+ id: string;
572
+ organisationId: string;
573
+ accountId: string | null;
574
+ name: string;
575
+ keyPrefix: string;
576
+ scopes: string[];
577
+ createdBy: string | null;
578
+ createdAt: string;
579
+ lastUsedAt: string | null;
580
+ expiresAt: string | null;
581
+ revokedAt: string | null;
582
+ }[]>;
583
+ revoke: (id: string) => Promise<{
584
+ id: string;
585
+ organisationId: string;
586
+ accountId: string | null;
587
+ name: string;
588
+ keyPrefix: string;
589
+ scopes: string[];
590
+ createdBy: string | null;
591
+ createdAt: string;
592
+ lastUsedAt: string | null;
593
+ expiresAt: string | null;
594
+ revokedAt: string | null;
595
+ }>;
596
+ };
597
+ embedSessions: {
598
+ create: (request: {
599
+ accountId: string;
600
+ scopes?: string[];
601
+ ttlSeconds?: number;
602
+ }) => Promise<{
603
+ token: string;
604
+ expiresAt: string;
605
+ accountId: string;
606
+ organisation: {
607
+ id: string;
608
+ slug: string;
609
+ };
610
+ }>;
611
+ current: () => Promise<{
612
+ organisation: {
613
+ id: string;
614
+ slug: string;
615
+ };
616
+ accountId: string;
617
+ scopes: string[];
618
+ expiresAt: string;
619
+ }>;
620
+ };
621
+ events: ((eventId: string) => {
622
+ occurrences: {
623
+ list: (options?: {
624
+ status?: "draft" | "on_sale" | "sold_out" | "completed" | "cancelled";
625
+ venueId?: string;
626
+ startDateFrom?: string;
627
+ startDateTo?: string;
628
+ page?: string;
629
+ limit?: string;
630
+ }) => Promise<{
631
+ eventOccurrences: components["schemas"]["EventOccurrence"][];
632
+ pagination: components["schemas"]["Pagination"];
633
+ }>;
634
+ create: (request: {
635
+ startDate: string;
636
+ startTime: string;
637
+ endDate: string;
638
+ endTime: string;
639
+ timezone?: string;
640
+ venueId?: string;
641
+ venueLayoutId?: string;
642
+ ticketSchemeId?: string;
643
+ priceSchemeId?: string;
644
+ categoryMapping?: {
645
+ ticketCategoryId: string;
646
+ venueLayoutCategoryId: string;
647
+ enabled?: boolean;
648
+ }[];
649
+ status: "draft" | "on_sale" | "sold_out" | "completed" | "cancelled";
650
+ }) => Promise<{
651
+ id: string;
652
+ organisationId: string;
653
+ accountId: string;
654
+ eventId: string;
655
+ startDate: string;
656
+ startTime: string;
657
+ endDate: string;
658
+ endTime: string;
659
+ timezone: string;
660
+ venueId?: string;
661
+ status: "draft" | "on_sale" | "sold_out" | "completed" | "cancelled";
662
+ isDeleted: boolean;
663
+ createdAt: string;
664
+ updatedAt: string;
665
+ }>;
666
+ get: (occurrenceId: string) => Promise<{
667
+ id: string;
668
+ organisationId: string;
669
+ accountId: string;
670
+ eventId: string;
671
+ startDate: string;
672
+ startTime: string;
673
+ endDate: string;
674
+ endTime: string;
675
+ timezone: string;
676
+ venueId?: string;
677
+ status: "draft" | "on_sale" | "sold_out" | "completed" | "cancelled";
678
+ isDeleted: boolean;
679
+ createdAt: string;
680
+ updatedAt: string;
681
+ }>;
682
+ update: (occurrenceId: string, request: {
683
+ startDate?: string;
684
+ startTime?: string;
685
+ endDate?: string;
686
+ endTime?: string;
687
+ timezone?: string;
688
+ venueId?: any;
689
+ venueLayoutId?: any;
690
+ ticketSchemeId?: any;
691
+ priceSchemeId?: any;
692
+ categoryMapping?: any;
693
+ status?: "draft" | "on_sale" | "sold_out" | "completed" | "cancelled";
694
+ }) => Promise<{
695
+ id: string;
696
+ organisationId: string;
697
+ accountId: string;
698
+ eventId: string;
699
+ startDate: string;
700
+ startTime: string;
701
+ endDate: string;
702
+ endTime: string;
703
+ timezone: string;
704
+ venueId?: string;
705
+ status: "draft" | "on_sale" | "sold_out" | "completed" | "cancelled";
706
+ isDeleted: boolean;
707
+ createdAt: string;
708
+ updatedAt: string;
709
+ }>;
710
+ delete: (occurrenceId: string) => Promise<{
711
+ success: boolean;
712
+ id: string;
713
+ }>;
714
+ };
715
+ priceschemes: {
716
+ list: () => Promise<{
717
+ id: string;
718
+ organisationId: string;
719
+ accountId: string;
720
+ eventId: string;
721
+ name: string;
722
+ description?: string;
723
+ status: "draft" | "active" | "archived";
724
+ parentPriceSchemeId?: string;
725
+ ticketPrices: components["schemas"]["TicketPrice"][];
726
+ isDeleted: boolean;
727
+ createdAt: string;
728
+ updatedAt: string;
729
+ }[]>;
730
+ create: (request: {
731
+ name: string;
732
+ description?: string;
733
+ status?: "draft" | "active" | "archived";
734
+ parentPriceSchemeId?: string;
735
+ ticketPrices?: ({
736
+ categoryId: string;
737
+ typeId: string;
738
+ price: number;
739
+ currency?: "GBP" | "USD" | "EUR" | "AUD" | "CAD";
740
+ })[];
741
+ }) => Promise<{
742
+ id: string;
743
+ organisationId: string;
744
+ accountId: string;
745
+ eventId: string;
746
+ name: string;
747
+ description?: string;
748
+ status: "draft" | "active" | "archived";
749
+ parentPriceSchemeId?: string;
750
+ ticketPrices: components["schemas"]["TicketPrice"][];
751
+ isDeleted: boolean;
752
+ createdAt: string;
753
+ updatedAt: string;
754
+ }>;
755
+ get: (priceSchemeId: string) => Promise<{
756
+ id: string;
757
+ organisationId: string;
758
+ accountId: string;
759
+ eventId: string;
760
+ name: string;
761
+ description?: string;
762
+ status: "draft" | "active" | "archived";
763
+ parentPriceSchemeId?: string;
764
+ ticketPrices: components["schemas"]["TicketPrice"][];
765
+ isDeleted: boolean;
766
+ createdAt: string;
767
+ updatedAt: string;
768
+ }>;
769
+ update: (priceSchemeId: string, request: {
770
+ name?: string;
771
+ description?: any;
772
+ status?: "draft" | "active" | "archived";
773
+ ticketPrices?: ({
774
+ categoryId: string;
775
+ typeId: string;
776
+ price: number;
777
+ currency?: "GBP" | "USD" | "EUR" | "AUD" | "CAD";
778
+ })[];
779
+ }) => Promise<{
780
+ id: string;
781
+ organisationId: string;
782
+ accountId: string;
783
+ eventId: string;
784
+ name: string;
785
+ description?: string;
786
+ status: "draft" | "active" | "archived";
787
+ parentPriceSchemeId?: string;
788
+ ticketPrices: components["schemas"]["TicketPrice"][];
789
+ isDeleted: boolean;
790
+ createdAt: string;
791
+ updatedAt: string;
792
+ }>;
793
+ delete: (priceSchemeId: string) => Promise<{
794
+ success: boolean;
795
+ id: string;
796
+ }>;
797
+ };
798
+ }) & {
799
+ list: (options?: {
800
+ search?: string;
801
+ status?: "draft" | "published" | "on_sale" | "sold_out" | "completed" | "cancelled";
802
+ venueId?: string;
803
+ accountId?: string;
804
+ expand?: string;
805
+ page?: string;
806
+ limit?: string;
807
+ }) => Promise<{
808
+ events: components["schemas"]["Event"][];
809
+ pagination: components["schemas"]["Pagination"];
810
+ }>;
811
+ create: (request: {
812
+ accountId: string;
813
+ name: string;
814
+ subtitle?: any;
815
+ description?: string;
816
+ shortDescription?: any;
817
+ imageUrl?: any;
818
+ heroImageUrl?: any;
819
+ presentation?: any;
820
+ status?: "draft" | "published" | "on_sale" | "sold_out" | "completed" | "cancelled";
821
+ venueId?: any;
822
+ venueName?: any;
823
+ timezone?: string;
824
+ onSaleDate?: string;
825
+ offSaleDate?: string;
826
+ tags?: string[];
827
+ ticketTypes?: {
828
+ id?: string;
829
+ name: string;
830
+ description?: string;
831
+ displayOrder: number;
832
+ }[];
833
+ layout?: {
834
+ categories?: {
835
+ id?: string;
836
+ name: string;
837
+ description?: string;
838
+ displayOrder?: number;
839
+ color?: string;
840
+ }[];
841
+ areas?: ({
842
+ id?: string;
843
+ name: string;
844
+ description?: string;
845
+ type: "unallocated" | "allocated";
846
+ capacity: number;
847
+ categoryId?: string;
848
+ displayOrder?: number;
849
+ })[];
850
+ venueLayoutTemplateId?: string;
851
+ };
852
+ }) => Promise<{
853
+ id: string;
854
+ organisationId: string;
855
+ accountId: string;
856
+ name: string;
857
+ description?: string;
858
+ status: "draft" | "published" | "on_sale" | "sold_out" | "completed" | "cancelled";
859
+ venueId?: string;
860
+ timezone: string;
861
+ onSaleDate?: string;
862
+ offSaleDate?: string;
863
+ occurrenceCount: number;
864
+ ticketCount: number;
865
+ productCount: number;
866
+ tags: string[];
867
+ isDeleted: boolean;
868
+ createdAt: string;
869
+ updatedAt: string;
870
+ createdBy?: string;
871
+ }>;
872
+ get: (id: string, options?: {
873
+ expand?: string;
874
+ }) => Promise<{
875
+ id: string;
876
+ organisationId: string;
877
+ accountId: string;
878
+ name: string;
879
+ description?: string;
880
+ status: "draft" | "published" | "on_sale" | "sold_out" | "completed" | "cancelled";
881
+ venueId?: string;
882
+ timezone: string;
883
+ onSaleDate?: string;
884
+ offSaleDate?: string;
885
+ occurrenceCount: number;
886
+ ticketCount: number;
887
+ productCount: number;
888
+ tags: string[];
889
+ isDeleted: boolean;
890
+ createdAt: string;
891
+ updatedAt: string;
892
+ createdBy?: string;
893
+ }>;
894
+ update: (id: string, request: {
895
+ name?: string;
896
+ subtitle?: any;
897
+ description?: any;
898
+ shortDescription?: any;
899
+ imageUrl?: any;
900
+ heroImageUrl?: any;
901
+ presentation?: any;
902
+ status?: "draft" | "published" | "on_sale" | "sold_out" | "completed" | "cancelled";
903
+ venueId?: any;
904
+ venueName?: any;
905
+ timezone?: string;
906
+ onSaleDate?: any;
907
+ offSaleDate?: any;
908
+ tags?: string[];
909
+ ticketTypes?: {
910
+ id?: string;
911
+ name: string;
912
+ description?: string;
913
+ displayOrder: number;
914
+ }[];
915
+ layout?: {
916
+ categories?: {
917
+ id?: string;
918
+ name: string;
919
+ description?: string;
920
+ displayOrder?: number;
921
+ color?: string;
922
+ }[];
923
+ areas?: ({
924
+ id?: string;
925
+ name: string;
926
+ description?: string;
927
+ type: "unallocated" | "allocated";
928
+ capacity: number;
929
+ categoryId?: string;
930
+ displayOrder?: number;
931
+ })[];
932
+ venueLayoutTemplateId?: string;
933
+ };
934
+ }) => Promise<{
935
+ id: string;
936
+ organisationId: string;
937
+ accountId: string;
938
+ name: string;
939
+ description?: string;
940
+ status: "draft" | "published" | "on_sale" | "sold_out" | "completed" | "cancelled";
941
+ venueId?: string;
942
+ timezone: string;
943
+ onSaleDate?: string;
944
+ offSaleDate?: string;
945
+ occurrenceCount: number;
946
+ ticketCount: number;
947
+ productCount: number;
948
+ tags: string[];
949
+ isDeleted: boolean;
950
+ createdAt: string;
951
+ updatedAt: string;
952
+ createdBy?: string;
953
+ }>;
954
+ delete: (id: string) => Promise<{
955
+ success: boolean;
956
+ id: string;
957
+ }>;
958
+ };
959
+ venues: ((id: string) => {
960
+ venuelayouts: {
961
+ list: (options?: {
962
+ search?: string;
963
+ status?: "active" | "archived";
964
+ accountId?: string;
965
+ page?: string;
966
+ limit?: string;
967
+ }) => Promise<{
968
+ venueLayouts: components["schemas"]["VenueLayout"][];
969
+ pagination: components["schemas"]["Pagination"];
970
+ }>;
971
+ create: (request: {
972
+ name: string;
973
+ description?: string;
974
+ status?: "active" | "archived";
975
+ totalCapacity?: number;
976
+ floors?: {
977
+ id?: string;
978
+ name: string;
979
+ displayOrder: number;
980
+ description?: string;
981
+ }[];
982
+ categories?: {
983
+ id?: string;
984
+ name: string;
985
+ description?: string;
986
+ displayOrder: number;
987
+ color?: string;
988
+ }[];
989
+ areas?: ({
990
+ id?: string;
991
+ name: string;
992
+ description?: string;
993
+ type: "unallocated" | "allocated";
994
+ status?: "active" | "inactive";
995
+ floorId?: string;
996
+ capacity: number;
997
+ displayOrder: number;
998
+ color?: string;
999
+ sections?: {
1000
+ id?: string;
1001
+ name: string;
1002
+ displayOrder: number;
1003
+ description?: string;
1004
+ }[];
1005
+ position?: {
1006
+ x: number;
1007
+ y: number;
1008
+ width: number;
1009
+ height: number;
1010
+ };
1011
+ seats?: ({
1012
+ id?: string;
1013
+ sectionId?: string;
1014
+ section?: string;
1015
+ row: string;
1016
+ number: string;
1017
+ label: string;
1018
+ categoryId?: string;
1019
+ status?: "available" | "blocked" | "accessible" | "held" | "removed";
1020
+ holdType?: string;
1021
+ attributes?: ("aisle_left" | "aisle_right" | "accessible" | "wheelchair_space" | "companion_seat" | "easy_access" | "obstructed_view" | "restricted_view" | "excellent_view" | "stage_view" | "extra_legroom" | "premium_comfort" | "front_row" | "back_row" | "center")[];
1022
+ companionSeats?: string[];
1023
+ companionTo?: string;
1024
+ position?: {
1025
+ x: number;
1026
+ y: number;
1027
+ rotation?: number;
1028
+ };
1029
+ internalNotes?: string;
1030
+ publicNotes?: string;
1031
+ })[];
1032
+ })[];
1033
+ decorations?: ({
1034
+ id?: string;
1035
+ type: "stage" | "pillar" | "barrier" | "aisle" | "wall" | "exit" | "entrance" | "bar" | "restroom" | "label" | "custom";
1036
+ name?: string;
1037
+ position: {
1038
+ x: number;
1039
+ y: number;
1040
+ width: number;
1041
+ height: number;
1042
+ rotation?: number;
1043
+ };
1044
+ label?: string;
1045
+ style?: {
1046
+ fill?: string;
1047
+ stroke?: string;
1048
+ fontSize?: number;
1049
+ fontWeight?: string;
1050
+ };
1051
+ })[];
1052
+ tags?: string[];
1053
+ }) => Promise<{
1054
+ id: string;
1055
+ venueId: string;
1056
+ organisationId: string;
1057
+ accountId: string;
1058
+ name: string;
1059
+ description?: string;
1060
+ status: "active" | "archived";
1061
+ totalCapacity: number;
1062
+ categories: unknown[];
1063
+ areas: unknown[];
1064
+ decorations?: components["schemas"]["Decoration"][];
1065
+ tags: string[];
1066
+ isDeleted: boolean;
1067
+ createdAt: string;
1068
+ updatedAt: string;
1069
+ createdBy?: string;
1070
+ }>;
1071
+ get: (layoutId: string) => Promise<{
1072
+ id: string;
1073
+ venueId: string;
1074
+ organisationId: string;
1075
+ accountId: string;
1076
+ name: string;
1077
+ description?: string;
1078
+ status: "active" | "archived";
1079
+ totalCapacity: number;
1080
+ categories: unknown[];
1081
+ areas: unknown[];
1082
+ decorations?: components["schemas"]["Decoration"][];
1083
+ tags: string[];
1084
+ isDeleted: boolean;
1085
+ createdAt: string;
1086
+ updatedAt: string;
1087
+ createdBy?: string;
1088
+ }>;
1089
+ update: (layoutId: string, request: {
1090
+ name?: string;
1091
+ description?: string;
1092
+ status?: "active" | "archived";
1093
+ totalCapacity?: number;
1094
+ floors?: {
1095
+ id?: string;
1096
+ name: string;
1097
+ displayOrder: number;
1098
+ description?: string;
1099
+ }[];
1100
+ categories?: {
1101
+ id?: string;
1102
+ name: string;
1103
+ description?: string;
1104
+ displayOrder: number;
1105
+ color?: string;
1106
+ }[];
1107
+ areas?: ({
1108
+ id?: string;
1109
+ name: string;
1110
+ description?: string;
1111
+ type: "unallocated" | "allocated";
1112
+ status?: "active" | "inactive";
1113
+ floorId?: string;
1114
+ capacity: number;
1115
+ displayOrder: number;
1116
+ color?: string;
1117
+ sections?: {
1118
+ id?: string;
1119
+ name: string;
1120
+ displayOrder: number;
1121
+ description?: string;
1122
+ }[];
1123
+ position?: {
1124
+ x: number;
1125
+ y: number;
1126
+ width: number;
1127
+ height: number;
1128
+ };
1129
+ seats?: ({
1130
+ id?: string;
1131
+ sectionId?: string;
1132
+ section?: string;
1133
+ row: string;
1134
+ number: string;
1135
+ label: string;
1136
+ categoryId?: string;
1137
+ status?: "available" | "blocked" | "accessible" | "held" | "removed";
1138
+ holdType?: string;
1139
+ attributes?: ("aisle_left" | "aisle_right" | "accessible" | "wheelchair_space" | "companion_seat" | "easy_access" | "obstructed_view" | "restricted_view" | "excellent_view" | "stage_view" | "extra_legroom" | "premium_comfort" | "front_row" | "back_row" | "center")[];
1140
+ companionSeats?: string[];
1141
+ companionTo?: string;
1142
+ position?: {
1143
+ x: number;
1144
+ y: number;
1145
+ rotation?: number;
1146
+ };
1147
+ internalNotes?: string;
1148
+ publicNotes?: string;
1149
+ })[];
1150
+ })[];
1151
+ decorations?: ({
1152
+ id?: string;
1153
+ type: "stage" | "pillar" | "barrier" | "aisle" | "wall" | "exit" | "entrance" | "bar" | "restroom" | "label" | "custom";
1154
+ name?: string;
1155
+ position: {
1156
+ x: number;
1157
+ y: number;
1158
+ width: number;
1159
+ height: number;
1160
+ rotation?: number;
1161
+ };
1162
+ label?: string;
1163
+ style?: {
1164
+ fill?: string;
1165
+ stroke?: string;
1166
+ fontSize?: number;
1167
+ fontWeight?: string;
1168
+ };
1169
+ })[];
1170
+ tags?: string[];
1171
+ }) => Promise<{
1172
+ id: string;
1173
+ venueId: string;
1174
+ organisationId: string;
1175
+ accountId: string;
1176
+ name: string;
1177
+ description?: string;
1178
+ status: "active" | "archived";
1179
+ totalCapacity: number;
1180
+ categories: unknown[];
1181
+ areas: unknown[];
1182
+ decorations?: components["schemas"]["Decoration"][];
1183
+ tags: string[];
1184
+ isDeleted: boolean;
1185
+ createdAt: string;
1186
+ updatedAt: string;
1187
+ createdBy?: string;
1188
+ }>;
1189
+ delete: (layoutId: string) => Promise<{
1190
+ success: boolean;
1191
+ id: string;
1192
+ }>;
1193
+ };
1194
+ venuelayoutareas: {
1195
+ addArea: (layoutId: string, request: {
1196
+ name: string;
1197
+ description?: string;
1198
+ type: "unallocated" | "allocated";
1199
+ status?: "active" | "inactive";
1200
+ capacity: number;
1201
+ displayOrder?: number;
1202
+ color?: string;
1203
+ seats?: any[];
1204
+ position?: {
1205
+ x: number;
1206
+ y: number;
1207
+ width: number;
1208
+ height: number;
1209
+ };
1210
+ categoryId?: string;
1211
+ }) => Promise<{
1212
+ venueLayout?: unknown;
1213
+ area: components["schemas"]["VenueLayoutArea"];
1214
+ }>;
1215
+ updateArea: (layoutId: string, areaId: string, request: {
1216
+ name?: string;
1217
+ description?: string;
1218
+ type?: "unallocated" | "allocated";
1219
+ status?: "active" | "inactive";
1220
+ capacity?: number;
1221
+ displayOrder?: number;
1222
+ color?: string;
1223
+ seats?: any[];
1224
+ position?: {
1225
+ x: number;
1226
+ y: number;
1227
+ width: number;
1228
+ height: number;
1229
+ };
1230
+ categoryId?: string;
1231
+ }) => Promise<{
1232
+ venueLayout?: unknown;
1233
+ area: components["schemas"]["VenueLayoutArea"];
1234
+ }>;
1235
+ deleteArea: (layoutId: string, areaId: string) => Promise<{
1236
+ venueLayout?: unknown;
1237
+ success: boolean;
1238
+ }>;
1239
+ };
1240
+ venuelayoutcategories: {
1241
+ addCategory: (layoutId: string, request: {
1242
+ name: string;
1243
+ description?: string;
1244
+ displayOrder?: number;
1245
+ color?: string;
1246
+ }) => Promise<{
1247
+ venueLayout?: unknown;
1248
+ category: components["schemas"]["VenueLayoutCategory"];
1249
+ }>;
1250
+ updateCategory: (layoutId: string, categoryId: string, request: {
1251
+ name?: string;
1252
+ description?: string;
1253
+ displayOrder?: number;
1254
+ color?: string;
1255
+ }) => Promise<{
1256
+ venueLayout?: unknown;
1257
+ category: components["schemas"]["VenueLayoutCategory"];
1258
+ }>;
1259
+ deleteCategory: (layoutId: string, categoryId: string) => Promise<{
1260
+ venueLayout?: unknown;
1261
+ success: boolean;
1262
+ }>;
1263
+ };
1264
+ venuelayoutseats: {
1265
+ addSeat: (layoutId: string, areaId: string, request: {
1266
+ section?: string;
1267
+ row: string;
1268
+ number: string;
1269
+ label?: string;
1270
+ categoryId?: string;
1271
+ status?: "available" | "blocked" | "accessible" | "held" | "removed";
1272
+ holdType?: string;
1273
+ attributes?: ("aisle_left" | "aisle_right" | "accessible" | "wheelchair_space" | "companion_seat" | "easy_access" | "obstructed_view" | "restricted_view" | "excellent_view" | "stage_view" | "extra_legroom" | "premium_comfort" | "front_row" | "back_row" | "center")[];
1274
+ companionSeats?: string[];
1275
+ companionTo?: string;
1276
+ position?: {
1277
+ x: number;
1278
+ y: number;
1279
+ rotation?: number;
1280
+ };
1281
+ internalNotes?: string;
1282
+ publicNotes?: string;
1283
+ }) => Promise<{
1284
+ venueLayout?: unknown;
1285
+ seat: components["schemas"]["VenueLayoutSeat"];
1286
+ }>;
1287
+ bulkAddSeats: (layoutId: string, areaId: string, request: {
1288
+ seats: ({
1289
+ section?: string;
1290
+ row: string;
1291
+ number: string;
1292
+ label?: string;
1293
+ categoryId?: string;
1294
+ status?: "available" | "blocked" | "accessible" | "held" | "removed";
1295
+ holdType?: string;
1296
+ attributes?: ("aisle_left" | "aisle_right" | "accessible" | "wheelchair_space" | "companion_seat" | "easy_access" | "obstructed_view" | "restricted_view" | "excellent_view" | "stage_view" | "extra_legroom" | "premium_comfort" | "front_row" | "back_row" | "center")[];
1297
+ companionSeats?: string[];
1298
+ companionTo?: string;
1299
+ position?: {
1300
+ x: number;
1301
+ y: number;
1302
+ rotation?: number;
1303
+ };
1304
+ internalNotes?: string;
1305
+ publicNotes?: string;
1306
+ })[];
1307
+ }) => Promise<{
1308
+ venueLayout?: unknown;
1309
+ seatsAdded: number;
1310
+ }>;
1311
+ generateSeats: (layoutId: string, areaId: string, request: {
1312
+ section?: string;
1313
+ startRow: string;
1314
+ endRow: string;
1315
+ seatsPerRow: number;
1316
+ rowPrefix?: string;
1317
+ seatPrefix?: string;
1318
+ categoryId?: string;
1319
+ skipRows?: string[];
1320
+ skipSeats?: string[];
1321
+ }) => Promise<{
1322
+ venueLayout?: unknown;
1323
+ seatsGenerated: number;
1324
+ seats: components["schemas"]["VenueLayoutSeat"][];
1325
+ }>;
1326
+ syncSeats: (layoutId: string, areaId: string, request: {
1327
+ seats: ({
1328
+ id?: string;
1329
+ section?: string;
1330
+ row: string;
1331
+ number: string;
1332
+ label?: string;
1333
+ categoryId?: string;
1334
+ status?: "available" | "blocked" | "accessible" | "held" | "removed";
1335
+ holdType?: string;
1336
+ attributes?: ("aisle_left" | "aisle_right" | "accessible" | "wheelchair_space" | "companion_seat" | "easy_access" | "obstructed_view" | "restricted_view" | "excellent_view" | "stage_view" | "extra_legroom" | "premium_comfort" | "front_row" | "back_row" | "center")[];
1337
+ companionSeats?: string[];
1338
+ companionTo?: string;
1339
+ position?: {
1340
+ x: number;
1341
+ y: number;
1342
+ rotation?: number;
1343
+ };
1344
+ internalNotes?: string;
1345
+ publicNotes?: string;
1346
+ })[];
1347
+ clearExisting?: boolean;
1348
+ }) => Promise<{
1349
+ venueLayout?: unknown;
1350
+ seatsSynced: number;
1351
+ seats: components["schemas"]["VenueLayoutSeat"][];
1352
+ }>;
1353
+ updateSeat: (layoutId: string, areaId: string, seatId: string, request: {
1354
+ section?: string;
1355
+ row?: string;
1356
+ number?: string;
1357
+ label?: string;
1358
+ categoryId?: string;
1359
+ status?: "available" | "blocked" | "accessible" | "held" | "removed";
1360
+ holdType?: string;
1361
+ attributes?: ("aisle_left" | "aisle_right" | "accessible" | "wheelchair_space" | "companion_seat" | "easy_access" | "obstructed_view" | "restricted_view" | "excellent_view" | "stage_view" | "extra_legroom" | "premium_comfort" | "front_row" | "back_row" | "center")[];
1362
+ companionSeats?: string[];
1363
+ companionTo?: string;
1364
+ position?: {
1365
+ x: number;
1366
+ y: number;
1367
+ rotation?: number;
1368
+ };
1369
+ internalNotes?: string;
1370
+ publicNotes?: string;
1371
+ }) => Promise<{
1372
+ venueLayout?: unknown;
1373
+ seat: components["schemas"]["VenueLayoutSeat"];
1374
+ }>;
1375
+ deleteSeat: (layoutId: string, areaId: string, seatId: string) => Promise<{
1376
+ venueLayout?: unknown;
1377
+ success: boolean;
1378
+ }>;
1379
+ };
1380
+ }) & {
1381
+ list: (options?: {
1382
+ search?: string;
1383
+ status?: "active" | "archived";
1384
+ accountId?: string;
1385
+ page?: string;
1386
+ limit?: string;
1387
+ }) => Promise<{
1388
+ venues: components["schemas"]["Venue"][];
1389
+ pagination: components["schemas"]["Pagination"];
1390
+ }>;
1391
+ create: (request: {
1392
+ accountId: string;
1393
+ name: string;
1394
+ description?: string;
1395
+ status?: "active" | "archived";
1396
+ streetAddress?: string;
1397
+ city?: string;
1398
+ country?: string;
1399
+ coordinates?: {
1400
+ longitude: number;
1401
+ latitude: number;
1402
+ };
1403
+ timezone?: string;
1404
+ phone?: string;
1405
+ email?: string;
1406
+ website?: string;
1407
+ features?: string[];
1408
+ tags?: string[];
1409
+ }) => Promise<{
1410
+ id: string;
1411
+ organisationId: string;
1412
+ accountId: string;
1413
+ name: string;
1414
+ description?: string;
1415
+ status: "active" | "archived";
1416
+ streetAddress?: string;
1417
+ country?: string;
1418
+ coordinates?: components["schemas"]["GeoJSONPoint"];
1419
+ timezone: string;
1420
+ phone?: string;
1421
+ email?: string;
1422
+ website?: string;
1423
+ features: string[];
1424
+ tags: string[];
1425
+ isDeleted: boolean;
1426
+ createdAt: string;
1427
+ updatedAt: string;
1428
+ createdBy?: string;
1429
+ }>;
1430
+ get: (id: string) => Promise<{
1431
+ id: string;
1432
+ organisationId: string;
1433
+ accountId: string;
1434
+ name: string;
1435
+ description?: string;
1436
+ status: "active" | "archived";
1437
+ streetAddress?: string;
1438
+ country?: string;
1439
+ coordinates?: components["schemas"]["GeoJSONPoint"];
1440
+ timezone: string;
1441
+ phone?: string;
1442
+ email?: string;
1443
+ website?: string;
1444
+ features: string[];
1445
+ tags: string[];
1446
+ isDeleted: boolean;
1447
+ createdAt: string;
1448
+ updatedAt: string;
1449
+ createdBy?: string;
1450
+ }>;
1451
+ update: (id: string, request: {
1452
+ name?: string;
1453
+ description?: string;
1454
+ status?: "active" | "archived";
1455
+ streetAddress?: string;
1456
+ city?: string;
1457
+ country?: string;
1458
+ coordinates?: any;
1459
+ timezone?: string;
1460
+ phone?: any;
1461
+ email?: any;
1462
+ website?: any;
1463
+ features?: string[];
1464
+ tags?: string[];
1465
+ }) => Promise<{
1466
+ id: string;
1467
+ organisationId: string;
1468
+ accountId: string;
1469
+ name: string;
1470
+ description?: string;
1471
+ status: "active" | "archived";
1472
+ streetAddress?: string;
1473
+ country?: string;
1474
+ coordinates?: components["schemas"]["GeoJSONPoint"];
1475
+ timezone: string;
1476
+ phone?: string;
1477
+ email?: string;
1478
+ website?: string;
1479
+ features: string[];
1480
+ tags: string[];
1481
+ isDeleted: boolean;
1482
+ createdAt: string;
1483
+ updatedAt: string;
1484
+ createdBy?: string;
1485
+ }>;
1486
+ delete: (id: string) => Promise<{
1487
+ success: boolean;
1488
+ id: string;
1489
+ }>;
1490
+ };
1491
+ billing: {
1492
+ listPackages: () => Promise<{
1493
+ id: string;
1494
+ name: string;
1495
+ credits: number;
1496
+ basePrice: number;
1497
+ baseCurrency: string;
1498
+ discountPercent: string;
1499
+ finalPrice: number;
1500
+ isActive: boolean;
1501
+ displayOrder: number;
1502
+ }[]>;
1503
+ canSell: (organisationId: string) => Promise<{
1504
+ canSell: boolean;
1505
+ reason: string | null;
1506
+ currentBalance: number;
1507
+ }>;
1508
+ getBalance: () => Promise<{
1509
+ id: string;
1510
+ organisationId: string;
1511
+ balance: number;
1512
+ lifetimeCredits: number;
1513
+ lifetimeUsed: number;
1514
+ isSuspended: boolean;
1515
+ suspendedAt: string | null;
1516
+ suspendedReason: string | null;
1517
+ status: "healthy" | "low" | "depleted" | "negative" | "suspended";
1518
+ createdAt: string;
1519
+ updatedAt: string;
1520
+ }>;
1521
+ listTransactions: (options?: {
1522
+ page?: string;
1523
+ limit?: string;
1524
+ type?: string;
1525
+ }) => Promise<{
1526
+ id: string;
1527
+ organisationId: string;
1528
+ type: "initial" | "purchase" | "subscription" | "ticket_sale" | "adjustment" | "refund";
1529
+ amount: number;
1530
+ balanceBefore: number;
1531
+ balanceAfter: number;
1532
+ orderId: string | null;
1533
+ invoiceId: string | null;
1534
+ subscriptionId: string | null;
1535
+ description: string | null;
1536
+ createdAt: string;
1537
+ }[]>;
1538
+ createPurchase: (request: CreatePurchaseRequest) => Promise<{
1539
+ success: boolean;
1540
+ invoice: components["schemas"]["Invoice"];
1541
+ payment: components["schemas"]["Payment"];
1542
+ transaction: components["schemas"]["CreditTransaction"];
1543
+ newBalance: number;
1544
+ }>;
1545
+ listInvoices: (options?: {
1546
+ page?: string;
1547
+ limit?: string;
1548
+ status?: string;
1549
+ }) => Promise<{
1550
+ id: string;
1551
+ organisationId: string;
1552
+ invoiceNumber: string;
1553
+ type: "purchase" | "subscription" | "payg";
1554
+ status: "draft" | "open" | "paid" | "void" | "uncollectible";
1555
+ subtotal: number;
1556
+ tax: number;
1557
+ total: number;
1558
+ amountPaid: number;
1559
+ amountDue: number;
1560
+ currency: string;
1561
+ issueDate: string;
1562
+ dueDate: string | null;
1563
+ paidAt: string | null;
1564
+ pdfUrl: string | null;
1565
+ createdAt: string;
1566
+ updatedAt: string;
1567
+ }[]>;
1568
+ getInvoice: (invoiceId: string) => Promise<{
1569
+ id: string;
1570
+ organisationId: string;
1571
+ invoiceNumber: string;
1572
+ type: "purchase" | "subscription" | "payg";
1573
+ status: "draft" | "open" | "paid" | "void" | "uncollectible";
1574
+ subtotal: number;
1575
+ tax: number;
1576
+ total: number;
1577
+ amountPaid: number;
1578
+ amountDue: number;
1579
+ currency: string;
1580
+ issueDate: string;
1581
+ dueDate: string | null;
1582
+ paidAt: string | null;
1583
+ pdfUrl: string | null;
1584
+ createdAt: string;
1585
+ updatedAt: string;
1586
+ }>;
1587
+ listPayments: (options?: {
1588
+ page?: string;
1589
+ limit?: string;
1590
+ status?: string;
1591
+ }) => Promise<{
1592
+ id: string;
1593
+ organisationId: string;
1594
+ invoiceId: string | null;
1595
+ amount: number;
1596
+ currency: string;
1597
+ status: "pending" | "succeeded" | "failed" | "cancelled" | "refunded";
1598
+ method: string | null;
1599
+ paidAt: string | null;
1600
+ failedAt: string | null;
1601
+ failureCode: string | null;
1602
+ failureMessage: string | null;
1603
+ createdAt: string;
1604
+ updatedAt: string;
1605
+ }[]>;
1606
+ createSubscription: (request: CreateSubscriptionRequest) => Promise<{
1607
+ id: string;
1608
+ organisationId: string;
1609
+ packageId: string;
1610
+ status: "active" | "cancelled" | "paused" | "past_due" | "ended";
1611
+ credits: number;
1612
+ price: number;
1613
+ currency: string;
1614
+ interval: "month" | "year";
1615
+ currentPeriodStart: string | null;
1616
+ currentPeriodEnd: string | null;
1617
+ cancelledAt: string | null;
1618
+ endedAt: string | null;
1619
+ createdAt: string;
1620
+ updatedAt: string;
1621
+ }>;
1622
+ listSubscriptions: () => Promise<{
1623
+ id: string;
1624
+ organisationId: string;
1625
+ packageId: string;
1626
+ status: "active" | "cancelled" | "paused" | "past_due" | "ended";
1627
+ credits: number;
1628
+ price: number;
1629
+ currency: string;
1630
+ interval: "month" | "year";
1631
+ currentPeriodStart: string | null;
1632
+ currentPeriodEnd: string | null;
1633
+ cancelledAt: string | null;
1634
+ endedAt: string | null;
1635
+ createdAt: string;
1636
+ updatedAt: string;
1637
+ }[]>;
1638
+ cancelSubscription: (subscriptionId: string) => Promise<{
1639
+ id: string;
1640
+ organisationId: string;
1641
+ packageId: string;
1642
+ status: "active" | "cancelled" | "paused" | "past_due" | "ended";
1643
+ credits: number;
1644
+ price: number;
1645
+ currency: string;
1646
+ interval: "month" | "year";
1647
+ currentPeriodStart: string | null;
1648
+ currentPeriodEnd: string | null;
1649
+ cancelledAt: string | null;
1650
+ endedAt: string | null;
1651
+ createdAt: string;
1652
+ updatedAt: string;
1653
+ }>;
1654
+ getAutoTopup: () => Promise<{
1655
+ id: string;
1656
+ organisationId: string;
1657
+ enabled: boolean;
1658
+ thresholdCredits: number;
1659
+ topupPackageId: string;
1660
+ maxAttemptsPerDay: number;
1661
+ lastAttemptAt: string | null;
1662
+ attemptsToday: number;
1663
+ createdAt: string;
1664
+ updatedAt: string;
1665
+ } | null>;
1666
+ updateAutoTopup: (request: UpdateAutoTopupRequest) => Promise<{
1667
+ id: string;
1668
+ organisationId: string;
1669
+ enabled: boolean;
1670
+ thresholdCredits: number;
1671
+ topupPackageId: string;
1672
+ maxAttemptsPerDay: number;
1673
+ lastAttemptAt: string | null;
1674
+ attemptsToday: number;
1675
+ createdAt: string;
1676
+ updatedAt: string;
1677
+ } | null>;
1678
+ listPaymentMethods: () => Promise<{
1679
+ id: string;
1680
+ type: "card";
1681
+ card: components["schemas"]["PaymentMethodCard"];
1682
+ isDefault: boolean;
1683
+ createdAt: string;
1684
+ }[]>;
1685
+ savePaymentMethod: (request: SavePaymentMethodRequest) => Promise<{
1686
+ id: string;
1687
+ type: "card";
1688
+ card: components["schemas"]["PaymentMethodCard"];
1689
+ isDefault: boolean;
1690
+ createdAt: string;
1691
+ }>;
1692
+ createSetupIntent: () => Promise<string>;
1693
+ deletePaymentMethod: (paymentMethodId: string) => Promise<boolean>;
1694
+ setDefaultPaymentMethod: (paymentMethodId: string) => Promise<{
1695
+ id: string;
1696
+ type: "card";
1697
+ card: components["schemas"]["PaymentMethodCard"];
1698
+ isDefault: boolean;
1699
+ createdAt: string;
1700
+ }>;
1701
+ listAiPackages: () => Promise<{
1702
+ id: string;
1703
+ name: string;
1704
+ credits: number;
1705
+ basePrice: number;
1706
+ baseCurrency: string;
1707
+ discountPercent: number;
1708
+ finalPrice: number;
1709
+ isActive: boolean;
1710
+ displayOrder: number;
1711
+ }[]>;
1712
+ getAiBalance: () => Promise<{
1713
+ balance: number;
1714
+ lifetimeCredits: number;
1715
+ lifetimeUsed: number;
1716
+ isLow: boolean;
1717
+ isDepleted: boolean;
1718
+ }>;
1719
+ listAiTransactions: (options?: {
1720
+ page?: string;
1721
+ limit?: string;
1722
+ }) => Promise<{
1723
+ id: string;
1724
+ organisationId: string;
1725
+ type: "initial" | "purchase" | "subscription" | "ticket_sale" | "adjustment" | "refund";
1726
+ amount: number;
1727
+ balanceBefore: number;
1728
+ balanceAfter: number;
1729
+ orderId: string | null;
1730
+ invoiceId: string | null;
1731
+ subscriptionId: string | null;
1732
+ description: string | null;
1733
+ createdAt: string;
1734
+ }[]>;
1735
+ createAiTopup: (request: CreateAiTopupRequest) => Promise<{
1736
+ invoice: components["schemas"]["Invoice"];
1737
+ payment: components["schemas"]["Payment"];
1738
+ creditsAdded: number;
1739
+ newBalance: number;
1740
+ }>;
1741
+ };
1742
+ inventory: {
1743
+ create: (request: {
1744
+ sourceType: "event_occurrence_area" | "product";
1745
+ eventId?: string;
1746
+ eventOccurrenceId?: string;
1747
+ eventLayoutAreaId?: string;
1748
+ productId?: string;
1749
+ totalCapacity: number;
1750
+ isAllocated?: boolean;
1751
+ metadata?: Record<string, any>;
1752
+ accountId: string;
1753
+ }) => Promise<{
1754
+ id: string;
1755
+ organisationId: string;
1756
+ accountId: string;
1757
+ sourceType: "event_occurrence_area" | "product";
1758
+ eventId: string | null;
1759
+ eventOccurrenceId: string | null;
1760
+ eventLayoutAreaId: string | null;
1761
+ productId: string | null;
1762
+ totalCapacity: number;
1763
+ available: number;
1764
+ reserved: number;
1765
+ confirmed: number;
1766
+ held: number;
1767
+ isAllocated: boolean;
1768
+ version: number;
1769
+ metadata: {
1770
+ [key: string]: unknown;
1771
+ } | null;
1772
+ createdAt: string;
1773
+ updatedAt: string;
1774
+ }>;
1775
+ list: (options?: {
1776
+ sourceType?: "event_occurrence_area" | "product";
1777
+ eventOccurrenceId?: string;
1778
+ eventId?: string;
1779
+ productId?: string;
1780
+ isAllocated?: "true" | "false";
1781
+ }) => Promise<{
1782
+ id: string;
1783
+ organisationId: string;
1784
+ accountId: string;
1785
+ sourceType: "event_occurrence_area" | "product";
1786
+ eventId: string | null;
1787
+ eventOccurrenceId: string | null;
1788
+ eventLayoutAreaId: string | null;
1789
+ productId: string | null;
1790
+ totalCapacity: number;
1791
+ available: number;
1792
+ reserved: number;
1793
+ confirmed: number;
1794
+ held: number;
1795
+ isAllocated: boolean;
1796
+ version: number;
1797
+ metadata: {
1798
+ [key: string]: unknown;
1799
+ } | null;
1800
+ createdAt: string;
1801
+ updatedAt: string;
1802
+ }[]>;
1803
+ get: (id: string, options?: {
1804
+ accountId: string;
1805
+ }) => Promise<{
1806
+ id: string;
1807
+ organisationId: string;
1808
+ accountId: string;
1809
+ sourceType: "event_occurrence_area" | "product";
1810
+ eventId: string | null;
1811
+ eventOccurrenceId: string | null;
1812
+ eventLayoutAreaId: string | null;
1813
+ productId: string | null;
1814
+ totalCapacity: number;
1815
+ available: number;
1816
+ reserved: number;
1817
+ confirmed: number;
1818
+ held: number;
1819
+ isAllocated: boolean;
1820
+ version: number;
1821
+ metadata: {
1822
+ [key: string]: unknown;
1823
+ } | null;
1824
+ createdAt: string;
1825
+ updatedAt: string;
1826
+ }>;
1827
+ delete: (id: string, options?: {
1828
+ accountId: string;
1829
+ }) => Promise<string>;
1830
+ updateCapacity: (id: string, request: {
1831
+ totalCapacity: number;
1832
+ accountId: string;
1833
+ }) => Promise<{
1834
+ id: string;
1835
+ organisationId: string;
1836
+ accountId: string;
1837
+ sourceType: "event_occurrence_area" | "product";
1838
+ eventId: string | null;
1839
+ eventOccurrenceId: string | null;
1840
+ eventLayoutAreaId: string | null;
1841
+ productId: string | null;
1842
+ totalCapacity: number;
1843
+ available: number;
1844
+ reserved: number;
1845
+ confirmed: number;
1846
+ held: number;
1847
+ isAllocated: boolean;
1848
+ version: number;
1849
+ metadata: {
1850
+ [key: string]: unknown;
1851
+ } | null;
1852
+ createdAt: string;
1853
+ updatedAt: string;
1854
+ }>;
1855
+ getAuditLog: (id: string, options?: {
1856
+ accountId: string;
1857
+ }) => Promise<{
1858
+ id: number;
1859
+ inventoryId: string;
1860
+ action: string;
1861
+ changes: {
1862
+ [key: string]: unknown;
1863
+ };
1864
+ actorType: string | null;
1865
+ actorId: string | null;
1866
+ referenceType: string | null;
1867
+ referenceId: string | null;
1868
+ createdAt: string;
1869
+ }[]>;
1870
+ };
1871
+ inventorySeats: {
1872
+ importSeats: (id: string, request: {
1873
+ seats: {
1874
+ eventLayoutSeatId?: string;
1875
+ rowName: string;
1876
+ seatNumber: string;
1877
+ priceCategory?: string;
1878
+ isAccessible?: boolean;
1879
+ isCompanion?: boolean;
1880
+ attributes?: Record<string, any>;
1881
+ }[];
1882
+ }) => Promise<{
1883
+ seats: components["schemas"]["InventorySeat"][];
1884
+ count: number;
1885
+ }>;
1886
+ listSeats: (id: string, options?: {
1887
+ status?: "available" | "reserved" | "confirmed" | "held" | "maintenance";
1888
+ priceCategory?: string;
1889
+ isAccessible?: "true" | "false";
1890
+ rowName?: string;
1891
+ }) => Promise<{
1892
+ id: string;
1893
+ inventoryId: string;
1894
+ organisationId: string;
1895
+ accountId: string;
1896
+ eventLayoutSeatId: string | null;
1897
+ rowName: string;
1898
+ seatNumber: string;
1899
+ status: "available" | "reserved" | "confirmed" | "held" | "maintenance";
1900
+ reservationId: string | null;
1901
+ priceCategory: string | null;
1902
+ isAccessible: boolean;
1903
+ isCompanion: boolean;
1904
+ version: number;
1905
+ attributes: {
1906
+ [key: string]: unknown;
1907
+ } | null;
1908
+ createdAt: string;
1909
+ updatedAt: string;
1910
+ }[]>;
1911
+ };
1912
+ inventoryReservations: {
1913
+ reserve: (request: {
1914
+ inventoryId: string;
1915
+ accountId: string;
1916
+ referenceType: "order" | "hold" | "subscription";
1917
+ referenceId: string;
1918
+ quantity?: number;
1919
+ seatIds?: string[];
1920
+ ttlSeconds?: number;
1921
+ }) => Promise<{
1922
+ id: string;
1923
+ organisationId: string;
1924
+ accountId: string;
1925
+ inventoryId: string;
1926
+ referenceType: "order" | "hold" | "subscription" | null;
1927
+ referenceId: string | null;
1928
+ type: "temporary" | "confirmed" | "hold" | "maintenance";
1929
+ quantity: number;
1930
+ seatIds: string[] | null;
1931
+ expiresAt: string | null;
1932
+ reason: string | null;
1933
+ heldBy: string | null;
1934
+ metadata: {
1935
+ [key: string]: unknown;
1936
+ } | null;
1937
+ createdAt: string;
1938
+ updatedAt: string;
1939
+ }>;
1940
+ checkAvailability: (request: {
1941
+ requests: {
1942
+ inventoryId: string;
1943
+ quantity?: number;
1944
+ seatIds?: string[];
1945
+ }[];
1946
+ }) => Promise<{
1947
+ available: boolean;
1948
+ availableQuantity: number;
1949
+ requestedQuantity: number;
1950
+ }>;
1951
+ listReservations: (options?: {
1952
+ inventoryId?: string;
1953
+ accountId?: string;
1954
+ type?: "temporary" | "confirmed" | "hold" | "maintenance";
1955
+ referenceType?: "order" | "hold" | "subscription";
1956
+ referenceId?: string;
1957
+ }) => Promise<{
1958
+ id: string;
1959
+ organisationId: string;
1960
+ accountId: string;
1961
+ inventoryId: string;
1962
+ referenceType: "order" | "hold" | "subscription" | null;
1963
+ referenceId: string | null;
1964
+ type: "temporary" | "confirmed" | "hold" | "maintenance";
1965
+ quantity: number;
1966
+ seatIds: string[] | null;
1967
+ expiresAt: string | null;
1968
+ reason: string | null;
1969
+ heldBy: string | null;
1970
+ metadata: {
1971
+ [key: string]: unknown;
1972
+ } | null;
1973
+ createdAt: string;
1974
+ updatedAt: string;
1975
+ }[]>;
1976
+ getReservation: (id: string, options?: {
1977
+ accountId: string;
1978
+ }) => Promise<{
1979
+ id: string;
1980
+ organisationId: string;
1981
+ accountId: string;
1982
+ inventoryId: string;
1983
+ referenceType: "order" | "hold" | "subscription" | null;
1984
+ referenceId: string | null;
1985
+ type: "temporary" | "confirmed" | "hold" | "maintenance";
1986
+ quantity: number;
1987
+ seatIds: string[] | null;
1988
+ expiresAt: string | null;
1989
+ reason: string | null;
1990
+ heldBy: string | null;
1991
+ metadata: {
1992
+ [key: string]: unknown;
1993
+ } | null;
1994
+ createdAt: string;
1995
+ updatedAt: string;
1996
+ }>;
1997
+ confirmReservation: (id: string, request: {
1998
+ accountId: string;
1999
+ referenceType?: "order" | "hold" | "subscription";
2000
+ referenceId?: string;
2001
+ }) => Promise<{
2002
+ id: string;
2003
+ organisationId: string;
2004
+ accountId: string;
2005
+ inventoryId: string;
2006
+ referenceType: "order" | "hold" | "subscription" | null;
2007
+ referenceId: string | null;
2008
+ type: "temporary" | "confirmed" | "hold" | "maintenance";
2009
+ quantity: number;
2010
+ seatIds: string[] | null;
2011
+ expiresAt: string | null;
2012
+ reason: string | null;
2013
+ heldBy: string | null;
2014
+ metadata: {
2015
+ [key: string]: unknown;
2016
+ } | null;
2017
+ createdAt: string;
2018
+ updatedAt: string;
2019
+ }>;
2020
+ releaseReservation: (id: string, request: {
2021
+ accountId: string;
2022
+ }) => Promise<string>;
2023
+ extendReservation: (id: string, request: {
2024
+ expiresAt: string;
2025
+ }) => Promise<{
2026
+ id: string;
2027
+ organisationId: string;
2028
+ accountId: string;
2029
+ inventoryId: string;
2030
+ referenceType: "order" | "hold" | "subscription" | null;
2031
+ referenceId: string | null;
2032
+ type: "temporary" | "confirmed" | "hold" | "maintenance";
2033
+ quantity: number;
2034
+ seatIds: string[] | null;
2035
+ expiresAt: string | null;
2036
+ reason: string | null;
2037
+ heldBy: string | null;
2038
+ metadata: {
2039
+ [key: string]: unknown;
2040
+ } | null;
2041
+ createdAt: string;
2042
+ updatedAt: string;
2043
+ }>;
2044
+ };
2045
+ inventoryHolds: {
2046
+ createHold: (request: {
2047
+ inventoryId: string;
2048
+ accountId: string;
2049
+ quantity?: number;
2050
+ seatIds?: string[];
2051
+ reason: string;
2052
+ heldBy: string;
2053
+ expiresAt?: string;
2054
+ }) => Promise<{
2055
+ id: string;
2056
+ organisationId: string;
2057
+ accountId: string;
2058
+ inventoryId: string;
2059
+ referenceType: "order" | "hold" | "subscription" | null;
2060
+ referenceId: string | null;
2061
+ type: "temporary" | "confirmed" | "hold" | "maintenance";
2062
+ quantity: number;
2063
+ seatIds: string[] | null;
2064
+ expiresAt: string | null;
2065
+ reason: string | null;
2066
+ heldBy: string | null;
2067
+ metadata: {
2068
+ [key: string]: unknown;
2069
+ } | null;
2070
+ createdAt: string;
2071
+ updatedAt: string;
2072
+ }>;
2073
+ releaseHold: (id: string, request: {
2074
+ accountId: string;
2075
+ }) => Promise<string>;
2076
+ };
2077
+ customers: {
2078
+ create: (request: {
2079
+ accountId?: string;
2080
+ email: string;
2081
+ firstName?: string;
2082
+ lastName?: string;
2083
+ phone?: string;
2084
+ externalId?: string;
2085
+ metadata?: Record<string, any>;
2086
+ }) => Promise<{
2087
+ id: string;
2088
+ organisationId: string;
2089
+ accountId: string | null;
2090
+ email: string;
2091
+ firstName: string | null;
2092
+ lastName: string | null;
2093
+ phone: string | null;
2094
+ externalId: string | null;
2095
+ isBlocked: boolean;
2096
+ blockedAt: string | null;
2097
+ blockedReason: string | null;
2098
+ metadata: {
2099
+ [key: string]: unknown;
2100
+ } | null;
2101
+ createdAt: string;
2102
+ updatedAt: string;
2103
+ }>;
2104
+ list: (options?: {
2105
+ search?: string;
2106
+ email?: string;
2107
+ accountId?: string;
2108
+ isBlocked?: string;
2109
+ updatedSince?: string;
2110
+ cursor?: string;
2111
+ page?: string;
2112
+ limit?: string;
2113
+ }) => Promise<{
2114
+ customers: components["schemas"]["Customer"][];
2115
+ pagination: {
2116
+ page: number;
2117
+ limit: number;
2118
+ total: number;
2119
+ totalPages: number;
2120
+ };
2121
+ }>;
2122
+ get: (customerId: string) => Promise<{
2123
+ id: string;
2124
+ organisationId: string;
2125
+ accountId: string | null;
2126
+ email: string;
2127
+ firstName: string | null;
2128
+ lastName: string | null;
2129
+ phone: string | null;
2130
+ externalId: string | null;
2131
+ isBlocked: boolean;
2132
+ blockedAt: string | null;
2133
+ blockedReason: string | null;
2134
+ metadata: {
2135
+ [key: string]: unknown;
2136
+ } | null;
2137
+ createdAt: string;
2138
+ updatedAt: string;
2139
+ }>;
2140
+ update: (customerId: string, request: {
2141
+ email?: string;
2142
+ firstName?: any;
2143
+ lastName?: any;
2144
+ phone?: any;
2145
+ externalId?: any;
2146
+ metadata?: any;
2147
+ }) => Promise<{
2148
+ id: string;
2149
+ organisationId: string;
2150
+ accountId: string | null;
2151
+ email: string;
2152
+ firstName: string | null;
2153
+ lastName: string | null;
2154
+ phone: string | null;
2155
+ externalId: string | null;
2156
+ isBlocked: boolean;
2157
+ blockedAt: string | null;
2158
+ blockedReason: string | null;
2159
+ metadata: {
2160
+ [key: string]: unknown;
2161
+ } | null;
2162
+ createdAt: string;
2163
+ updatedAt: string;
2164
+ }>;
2165
+ block: (customerId: string, request: {
2166
+ reason?: string;
2167
+ }) => Promise<{
2168
+ id: string;
2169
+ organisationId: string;
2170
+ accountId: string | null;
2171
+ email: string;
2172
+ firstName: string | null;
2173
+ lastName: string | null;
2174
+ phone: string | null;
2175
+ externalId: string | null;
2176
+ isBlocked: boolean;
2177
+ blockedAt: string | null;
2178
+ blockedReason: string | null;
2179
+ metadata: {
2180
+ [key: string]: unknown;
2181
+ } | null;
2182
+ createdAt: string;
2183
+ updatedAt: string;
2184
+ }>;
2185
+ unblock: (customerId: string) => Promise<{
2186
+ id: string;
2187
+ organisationId: string;
2188
+ accountId: string | null;
2189
+ email: string;
2190
+ firstName: string | null;
2191
+ lastName: string | null;
2192
+ phone: string | null;
2193
+ externalId: string | null;
2194
+ isBlocked: boolean;
2195
+ blockedAt: string | null;
2196
+ blockedReason: string | null;
2197
+ metadata: {
2198
+ [key: string]: unknown;
2199
+ } | null;
2200
+ createdAt: string;
2201
+ updatedAt: string;
2202
+ }>;
2203
+ };
2204
+ orders: {
2205
+ create: (request: {
2206
+ accountId: string;
2207
+ customerId?: string;
2208
+ currency?: string;
2209
+ channel?: string;
2210
+ isGuestCheckout?: boolean;
2211
+ customerNotes?: string;
2212
+ internalNotes?: string;
2213
+ metadata?: Record<string, any>;
2214
+ expiresInMinutes?: number;
2215
+ items?: ({
2216
+ type: "ticket" | "product" | "addon" | "fee" | "tax" | "discount";
2217
+ name: string;
2218
+ description?: string;
2219
+ unitPrice: number;
2220
+ quantity?: number;
2221
+ ticketDetails?: Record<string, any>;
2222
+ productDetails?: Record<string, any>;
2223
+ feeDetails?: Record<string, any>;
2224
+ metadata?: Record<string, any>;
2225
+ })[];
2226
+ }) => Promise<{
2227
+ id: string;
2228
+ organisationId: string;
2229
+ accountId: string;
2230
+ orderNumber: string;
2231
+ customerId: string | null;
2232
+ status: "pending" | "confirmed" | "processing" | "completed" | "cancelled" | "refunded" | "expired" | "failed";
2233
+ currency: string;
2234
+ subtotal: number;
2235
+ totalFees: number;
2236
+ totalTax: number;
2237
+ totalDiscounts: number;
2238
+ total: number;
2239
+ totalPaid: number;
2240
+ totalRefunded: number;
2241
+ channel: string | null;
2242
+ isGuestCheckout: boolean;
2243
+ customerNotes: string | null;
2244
+ internalNotes: string | null;
2245
+ metadata: {
2246
+ [key: string]: unknown;
2247
+ } | null;
2248
+ expiresAt: string | null;
2249
+ confirmedAt: string | null;
2250
+ completedAt: string | null;
2251
+ cancelledAt: string | null;
2252
+ cancellationReason: string | null;
2253
+ items?: components["schemas"]["OrderLineItem"][];
2254
+ createdAt: string;
2255
+ updatedAt: string;
2256
+ }>;
2257
+ list: (options?: {
2258
+ status?: "pending" | "confirmed" | "processing" | "completed" | "cancelled" | "refunded" | "expired" | "failed";
2259
+ customerId?: string;
2260
+ channel?: string;
2261
+ fromDate?: string;
2262
+ toDate?: string;
2263
+ updatedSince?: string;
2264
+ cursor?: string;
2265
+ search?: string;
2266
+ page?: string;
2267
+ limit?: string;
2268
+ }) => Promise<{
2269
+ orders: components["schemas"]["Order"][];
2270
+ pagination: {
2271
+ page: number;
2272
+ limit: number;
2273
+ total: number;
2274
+ totalPages: number;
2275
+ };
2276
+ }>;
2277
+ get: (orderId: string) => Promise<{
2278
+ id: string;
2279
+ organisationId: string;
2280
+ accountId: string;
2281
+ orderNumber: string;
2282
+ customerId: string | null;
2283
+ status: "pending" | "confirmed" | "processing" | "completed" | "cancelled" | "refunded" | "expired" | "failed";
2284
+ currency: string;
2285
+ subtotal: number;
2286
+ totalFees: number;
2287
+ totalTax: number;
2288
+ totalDiscounts: number;
2289
+ total: number;
2290
+ totalPaid: number;
2291
+ totalRefunded: number;
2292
+ channel: string | null;
2293
+ isGuestCheckout: boolean;
2294
+ customerNotes: string | null;
2295
+ internalNotes: string | null;
2296
+ metadata: {
2297
+ [key: string]: unknown;
2298
+ } | null;
2299
+ expiresAt: string | null;
2300
+ confirmedAt: string | null;
2301
+ completedAt: string | null;
2302
+ cancelledAt: string | null;
2303
+ cancellationReason: string | null;
2304
+ items?: components["schemas"]["OrderLineItem"][];
2305
+ createdAt: string;
2306
+ updatedAt: string;
2307
+ }>;
2308
+ update: (orderId: string, request: {
2309
+ customerId?: string;
2310
+ customerNotes?: string;
2311
+ internalNotes?: string;
2312
+ metadata?: Record<string, any>;
2313
+ extendExpiry?: boolean;
2314
+ addItems?: ({
2315
+ type: "ticket" | "product" | "addon" | "fee" | "tax" | "discount";
2316
+ name: string;
2317
+ description?: string;
2318
+ unitPrice: number;
2319
+ quantity?: number;
2320
+ ticketDetails?: Record<string, any>;
2321
+ productDetails?: Record<string, any>;
2322
+ feeDetails?: Record<string, any>;
2323
+ metadata?: Record<string, any>;
2324
+ })[];
2325
+ updateItems?: {
2326
+ itemId: string;
2327
+ updates: {
2328
+ quantity?: number;
2329
+ unitPrice?: number;
2330
+ metadata?: Record<string, any>;
2331
+ };
2332
+ }[];
2333
+ removeItems?: string[];
2334
+ }) => Promise<{
2335
+ id: string;
2336
+ organisationId: string;
2337
+ accountId: string;
2338
+ orderNumber: string;
2339
+ customerId: string | null;
2340
+ status: "pending" | "confirmed" | "processing" | "completed" | "cancelled" | "refunded" | "expired" | "failed";
2341
+ currency: string;
2342
+ subtotal: number;
2343
+ totalFees: number;
2344
+ totalTax: number;
2345
+ totalDiscounts: number;
2346
+ total: number;
2347
+ totalPaid: number;
2348
+ totalRefunded: number;
2349
+ channel: string | null;
2350
+ isGuestCheckout: boolean;
2351
+ customerNotes: string | null;
2352
+ internalNotes: string | null;
2353
+ metadata: {
2354
+ [key: string]: unknown;
2355
+ } | null;
2356
+ expiresAt: string | null;
2357
+ confirmedAt: string | null;
2358
+ completedAt: string | null;
2359
+ cancelledAt: string | null;
2360
+ cancellationReason: string | null;
2361
+ items?: components["schemas"]["OrderLineItem"][];
2362
+ createdAt: string;
2363
+ updatedAt: string;
2364
+ }>;
2365
+ getByNumber: (orderNumber: string) => Promise<{
2366
+ id: string;
2367
+ organisationId: string;
2368
+ accountId: string;
2369
+ orderNumber: string;
2370
+ customerId: string | null;
2371
+ status: "pending" | "confirmed" | "processing" | "completed" | "cancelled" | "refunded" | "expired" | "failed";
2372
+ currency: string;
2373
+ subtotal: number;
2374
+ totalFees: number;
2375
+ totalTax: number;
2376
+ totalDiscounts: number;
2377
+ total: number;
2378
+ totalPaid: number;
2379
+ totalRefunded: number;
2380
+ channel: string | null;
2381
+ isGuestCheckout: boolean;
2382
+ customerNotes: string | null;
2383
+ internalNotes: string | null;
2384
+ metadata: {
2385
+ [key: string]: unknown;
2386
+ } | null;
2387
+ expiresAt: string | null;
2388
+ confirmedAt: string | null;
2389
+ completedAt: string | null;
2390
+ cancelledAt: string | null;
2391
+ cancellationReason: string | null;
2392
+ items?: components["schemas"]["OrderLineItem"][];
2393
+ createdAt: string;
2394
+ updatedAt: string;
2395
+ }>;
2396
+ cancel: (orderId: string, request: {
2397
+ reason: string;
2398
+ }) => Promise<{
2399
+ id: string;
2400
+ organisationId: string;
2401
+ accountId: string;
2402
+ orderNumber: string;
2403
+ customerId: string | null;
2404
+ status: "pending" | "confirmed" | "processing" | "completed" | "cancelled" | "refunded" | "expired" | "failed";
2405
+ currency: string;
2406
+ subtotal: number;
2407
+ totalFees: number;
2408
+ totalTax: number;
2409
+ totalDiscounts: number;
2410
+ total: number;
2411
+ totalPaid: number;
2412
+ totalRefunded: number;
2413
+ channel: string | null;
2414
+ isGuestCheckout: boolean;
2415
+ customerNotes: string | null;
2416
+ internalNotes: string | null;
2417
+ metadata: {
2418
+ [key: string]: unknown;
2419
+ } | null;
2420
+ expiresAt: string | null;
2421
+ confirmedAt: string | null;
2422
+ completedAt: string | null;
2423
+ cancelledAt: string | null;
2424
+ cancellationReason: string | null;
2425
+ items?: components["schemas"]["OrderLineItem"][];
2426
+ createdAt: string;
2427
+ updatedAt: string;
2428
+ }>;
2429
+ transitionStatus: (orderId: string, request: {
2430
+ status: "confirmed" | "processing" | "completed" | "cancelled" | "refunded" | "expired" | "failed";
2431
+ }) => Promise<{
2432
+ id: string;
2433
+ organisationId: string;
2434
+ accountId: string;
2435
+ orderNumber: string;
2436
+ customerId: string | null;
2437
+ status: "pending" | "confirmed" | "processing" | "completed" | "cancelled" | "refunded" | "expired" | "failed";
2438
+ currency: string;
2439
+ subtotal: number;
2440
+ totalFees: number;
2441
+ totalTax: number;
2442
+ totalDiscounts: number;
2443
+ total: number;
2444
+ totalPaid: number;
2445
+ totalRefunded: number;
2446
+ channel: string | null;
2447
+ isGuestCheckout: boolean;
2448
+ customerNotes: string | null;
2449
+ internalNotes: string | null;
2450
+ metadata: {
2451
+ [key: string]: unknown;
2452
+ } | null;
2453
+ expiresAt: string | null;
2454
+ confirmedAt: string | null;
2455
+ completedAt: string | null;
2456
+ cancelledAt: string | null;
2457
+ cancellationReason: string | null;
2458
+ items?: components["schemas"]["OrderLineItem"][];
2459
+ createdAt: string;
2460
+ updatedAt: string;
2461
+ }>;
2462
+ validate: (orderId: string, request: {}) => Promise<{
2463
+ valid: boolean;
2464
+ errors: {
2465
+ code: string;
2466
+ message: string;
2467
+ itemId?: string;
2468
+ }[];
2469
+ }>;
2470
+ addItem: (orderId: string, request: {
2471
+ type: "ticket" | "product" | "addon" | "fee" | "tax" | "discount";
2472
+ name: string;
2473
+ description?: string;
2474
+ unitPrice: number;
2475
+ quantity?: number;
2476
+ ticketDetails?: Record<string, any>;
2477
+ productDetails?: Record<string, any>;
2478
+ feeDetails?: Record<string, any>;
2479
+ metadata?: Record<string, any>;
2480
+ }) => Promise<{
2481
+ order: components["schemas"]["Order"];
2482
+ item: components["schemas"]["OrderLineItem"];
2483
+ }>;
2484
+ updateItem: (orderId: string, itemId: string, request: {
2485
+ quantity?: number;
2486
+ unitPrice?: number;
2487
+ metadata?: Record<string, any>;
2488
+ }) => Promise<{
2489
+ order: components["schemas"]["Order"];
2490
+ item: components["schemas"]["OrderLineItem"];
2491
+ }>;
2492
+ removeItem: (orderId: string, itemId: string) => Promise<{
2493
+ id: string;
2494
+ organisationId: string;
2495
+ accountId: string;
2496
+ orderNumber: string;
2497
+ customerId: string | null;
2498
+ status: "pending" | "confirmed" | "processing" | "completed" | "cancelled" | "refunded" | "expired" | "failed";
2499
+ currency: string;
2500
+ subtotal: number;
2501
+ totalFees: number;
2502
+ totalTax: number;
2503
+ totalDiscounts: number;
2504
+ total: number;
2505
+ totalPaid: number;
2506
+ totalRefunded: number;
2507
+ channel: string | null;
2508
+ isGuestCheckout: boolean;
2509
+ customerNotes: string | null;
2510
+ internalNotes: string | null;
2511
+ metadata: {
2512
+ [key: string]: unknown;
2513
+ } | null;
2514
+ expiresAt: string | null;
2515
+ confirmedAt: string | null;
2516
+ completedAt: string | null;
2517
+ cancelledAt: string | null;
2518
+ cancellationReason: string | null;
2519
+ items?: components["schemas"]["OrderLineItem"][];
2520
+ createdAt: string;
2521
+ updatedAt: string;
2522
+ }>;
2523
+ initiatePayment: (orderId: string, request: {
2524
+ paymentMethod: "online_card" | "online_bank_transfer" | "online_wallet" | "in_person_card" | "in_person_cash" | "bank_transfer" | "cheque";
2525
+ returnUrl?: string;
2526
+ metadata?: Record<string, any>;
2527
+ }) => Promise<{
2528
+ paymentId: string;
2529
+ status: "pending" | "requires_action" | "processing" | "succeeded" | "failed";
2530
+ clientSecret: string | null;
2531
+ redirectUrl: string | null;
2532
+ expiresAt: string | null;
2533
+ }>;
2534
+ getPaymentStatus: (orderId: string) => Promise<{
2535
+ paymentId: string | null;
2536
+ status: "none" | "pending" | "requires_action" | "processing" | "succeeded" | "failed" | "cancelled";
2537
+ amount: number | null;
2538
+ currency: string | null;
2539
+ paidAt: string | null;
2540
+ failedAt: string | null;
2541
+ failureReason: string | null;
2542
+ }>;
2543
+ getPassPdf: (orderId: string, passId: string) => Promise<any>;
2544
+ resendConfirmation: (orderId: string) => Promise<{
2545
+ sent: boolean;
2546
+ recipient: string | null;
2547
+ messageId?: string;
2548
+ skippedReason?: "already_sent" | "no_recipient" | "not_configured" | "order_not_confirmed";
2549
+ attachments: number;
2550
+ }>;
2551
+ getPasses: (orderId: string) => Promise<{
2552
+ passes: components["schemas"]["OrderPass"][];
2553
+ entitlements: components["schemas"]["OrderEntitlement"][];
2554
+ redemptions: components["schemas"]["OrderRedemption"][];
2555
+ }>;
2556
+ printPass: (orderId: string, passId: string, request: {
2557
+ printerId: string;
2558
+ type?: "print.ticket" | "print.label" | "print.receipt";
2559
+ }) => Promise<any>;
2560
+ };
2561
+ payments: {
2562
+ create: (request: {
2563
+ accountId: string;
2564
+ orderId: string;
2565
+ orderNumber: string;
2566
+ amount: number;
2567
+ currency: string;
2568
+ paymentType: "online_card" | "online_bank_transfer" | "online_wallet" | "in_person_card" | "in_person_cash" | "bank_transfer" | "cheque";
2569
+ paymentProviderId?: string;
2570
+ returnUrl?: string;
2571
+ isPartialPayment?: boolean;
2572
+ remainingBalance?: number;
2573
+ metadata?: Record<string, any>;
2574
+ }) => Promise<{
2575
+ id: string;
2576
+ organisationId: string;
2577
+ invoiceId: string | null;
2578
+ amount: number;
2579
+ currency: string;
2580
+ status: "pending" | "succeeded" | "failed" | "cancelled" | "refunded";
2581
+ method: string | null;
2582
+ paidAt: string | null;
2583
+ failedAt: string | null;
2584
+ failureCode: string | null;
2585
+ failureMessage: string | null;
2586
+ createdAt: string;
2587
+ updatedAt: string;
2588
+ }>;
2589
+ list: (options?: {
2590
+ orderId?: string;
2591
+ status?: "created" | "pending" | "requires_action" | "processing" | "succeeded" | "failed" | "cancelled" | "expired";
2592
+ paymentType?: "online_card" | "online_bank_transfer" | "online_wallet" | "in_person_card" | "in_person_cash" | "bank_transfer" | "cheque";
2593
+ paymentProviderId?: string;
2594
+ fromDate?: string;
2595
+ toDate?: string;
2596
+ page?: string;
2597
+ limit?: string;
2598
+ }) => Promise<{
2599
+ id: string;
2600
+ organisationId: string;
2601
+ invoiceId: string | null;
2602
+ amount: number;
2603
+ currency: string;
2604
+ status: "pending" | "succeeded" | "failed" | "cancelled" | "refunded";
2605
+ method: string | null;
2606
+ paidAt: string | null;
2607
+ failedAt: string | null;
2608
+ failureCode: string | null;
2609
+ failureMessage: string | null;
2610
+ createdAt: string;
2611
+ updatedAt: string;
2612
+ }[]>;
2613
+ get: (paymentId: string) => Promise<{
2614
+ id: string;
2615
+ organisationId: string;
2616
+ invoiceId: string | null;
2617
+ amount: number;
2618
+ currency: string;
2619
+ status: "pending" | "succeeded" | "failed" | "cancelled" | "refunded";
2620
+ method: string | null;
2621
+ paidAt: string | null;
2622
+ failedAt: string | null;
2623
+ failureCode: string | null;
2624
+ failureMessage: string | null;
2625
+ createdAt: string;
2626
+ updatedAt: string;
2627
+ }>;
2628
+ cancel: (paymentId: string, request: {
2629
+ reason?: string;
2630
+ }) => Promise<{
2631
+ id: string;
2632
+ organisationId: string;
2633
+ invoiceId: string | null;
2634
+ amount: number;
2635
+ currency: string;
2636
+ status: "pending" | "succeeded" | "failed" | "cancelled" | "refunded";
2637
+ method: string | null;
2638
+ paidAt: string | null;
2639
+ failedAt: string | null;
2640
+ failureCode: string | null;
2641
+ failureMessage: string | null;
2642
+ createdAt: string;
2643
+ updatedAt: string;
2644
+ }>;
2645
+ createRefund: (paymentId: string, request: {
2646
+ amount: number;
2647
+ reason: string;
2648
+ notes?: string;
2649
+ metadata?: Record<string, any>;
2650
+ }) => Promise<{
2651
+ id: string;
2652
+ paymentId: string;
2653
+ externalRefundId: string | null;
2654
+ amount: number;
2655
+ status: "pending" | "processing" | "succeeded" | "failed" | "cancelled";
2656
+ reason: string;
2657
+ notes: string | null;
2658
+ failureCode: string | null;
2659
+ failureMessage: string | null;
2660
+ completedAt: string | null;
2661
+ failedAt: string | null;
2662
+ metadata: {
2663
+ [key: string]: unknown;
2664
+ } | null;
2665
+ createdAt: string;
2666
+ updatedAt: string;
2667
+ }>;
2668
+ listRefunds: (paymentId: string) => Promise<{
2669
+ id: string;
2670
+ paymentId: string;
2671
+ externalRefundId: string | null;
2672
+ amount: number;
2673
+ status: "pending" | "processing" | "succeeded" | "failed" | "cancelled";
2674
+ reason: string;
2675
+ notes: string | null;
2676
+ failureCode: string | null;
2677
+ failureMessage: string | null;
2678
+ completedAt: string | null;
2679
+ failedAt: string | null;
2680
+ metadata: {
2681
+ [key: string]: unknown;
2682
+ } | null;
2683
+ createdAt: string;
2684
+ updatedAt: string;
2685
+ }[]>;
2686
+ };
2687
+ paymentProviders: {
2688
+ create: (request: {
2689
+ accountId?: string;
2690
+ type: "stripe_connect" | "stripe_direct" | "adyen" | "square" | "paypal" | "cash" | "bank_transfer";
2691
+ name: string;
2692
+ description?: string;
2693
+ integrationType?: "ticketlayer_pay" | "self_service";
2694
+ integrationServiceUrl?: string;
2695
+ integrationServiceVersion?: string;
2696
+ configuration: Record<string, any>;
2697
+ supportedPaymentTypes: ("online_card" | "online_bank_transfer" | "online_wallet" | "in_person_card" | "in_person_cash" | "bank_transfer" | "cheque")[];
2698
+ capabilities?: {
2699
+ supportsInstantCapture?: boolean;
2700
+ supportsDelayedCapture?: boolean;
2701
+ supportsRefunds?: boolean;
2702
+ supportsPartialRefunds?: boolean;
2703
+ requiresCustomerAction?: boolean;
2704
+ supportedCurrencies?: string[];
2705
+ maxAmount?: number;
2706
+ minAmount?: number;
2707
+ };
2708
+ isDefault?: boolean;
2709
+ priority?: number;
2710
+ feeStructure?: {
2711
+ type: "percentage" | "fixed" | "percentage_plus_fixed";
2712
+ percentage?: number;
2713
+ fixed?: number;
2714
+ currency?: string;
2715
+ };
2716
+ applicationFee?: any;
2717
+ metadata?: Record<string, any>;
2718
+ }) => Promise<{
2719
+ id: string;
2720
+ organisationId: string;
2721
+ accountId: string | null;
2722
+ type: "stripe_connect" | "stripe_direct" | "adyen" | "square" | "paypal" | "cash" | "bank_transfer";
2723
+ name: string;
2724
+ description: string | null;
2725
+ status: "active" | "inactive" | "pending_setup";
2726
+ integrationServiceUrl: string | null;
2727
+ integrationServiceVersion: string;
2728
+ configuration: {
2729
+ [key: string]: unknown;
2730
+ };
2731
+ supportedPaymentTypes: ("online_card" | "online_bank_transfer" | "online_wallet" | "in_person_card" | "in_person_cash" | "bank_transfer" | "cheque")[];
2732
+ capabilities: components["schemas"]["PaymentProviderCapabilities"];
2733
+ isDefault: boolean;
2734
+ priority: number;
2735
+ feeStructure: components["schemas"]["FeeStructure"];
2736
+ applicationFee: components["schemas"]["ApplicationFee"];
2737
+ metadata: {
2738
+ [key: string]: unknown;
2739
+ } | null;
2740
+ createdAt: string;
2741
+ updatedAt: string;
2742
+ }>;
2743
+ list: (options?: {
2744
+ accountId?: string;
2745
+ type?: "stripe_connect" | "stripe_direct" | "adyen" | "square" | "paypal" | "cash" | "bank_transfer";
2746
+ status?: "active" | "inactive" | "pending_setup";
2747
+ paymentType?: "online_card" | "online_bank_transfer" | "online_wallet" | "in_person_card" | "in_person_cash" | "bank_transfer" | "cheque";
2748
+ isDefault?: string;
2749
+ integrationType?: "ticketlayer_pay" | "self_service";
2750
+ page?: string;
2751
+ limit?: string;
2752
+ }) => Promise<{
2753
+ providers: components["schemas"]["PaymentProvider"][];
2754
+ pagination: {
2755
+ page: number;
2756
+ limit: number;
2757
+ total: number;
2758
+ totalPages: number;
2759
+ };
2760
+ }>;
2761
+ getDefault: () => Promise<{
2762
+ id: string;
2763
+ organisationId: string;
2764
+ accountId: string | null;
2765
+ type: "stripe_connect" | "stripe_direct" | "adyen" | "square" | "paypal" | "cash" | "bank_transfer";
2766
+ name: string;
2767
+ description: string | null;
2768
+ status: "active" | "inactive" | "pending_setup";
2769
+ integrationServiceUrl: string | null;
2770
+ integrationServiceVersion: string;
2771
+ configuration: {
2772
+ [key: string]: unknown;
2773
+ };
2774
+ supportedPaymentTypes: ("online_card" | "online_bank_transfer" | "online_wallet" | "in_person_card" | "in_person_cash" | "bank_transfer" | "cheque")[];
2775
+ capabilities: components["schemas"]["PaymentProviderCapabilities"];
2776
+ isDefault: boolean;
2777
+ priority: number;
2778
+ feeStructure: components["schemas"]["FeeStructure"];
2779
+ applicationFee: components["schemas"]["ApplicationFee"];
2780
+ metadata: {
2781
+ [key: string]: unknown;
2782
+ } | null;
2783
+ createdAt: string;
2784
+ updatedAt: string;
2785
+ }>;
2786
+ get: (providerId: string) => Promise<{
2787
+ id: string;
2788
+ organisationId: string;
2789
+ accountId: string | null;
2790
+ type: "stripe_connect" | "stripe_direct" | "adyen" | "square" | "paypal" | "cash" | "bank_transfer";
2791
+ name: string;
2792
+ description: string | null;
2793
+ status: "active" | "inactive" | "pending_setup";
2794
+ integrationServiceUrl: string | null;
2795
+ integrationServiceVersion: string;
2796
+ configuration: {
2797
+ [key: string]: unknown;
2798
+ };
2799
+ supportedPaymentTypes: ("online_card" | "online_bank_transfer" | "online_wallet" | "in_person_card" | "in_person_cash" | "bank_transfer" | "cheque")[];
2800
+ capabilities: components["schemas"]["PaymentProviderCapabilities"];
2801
+ isDefault: boolean;
2802
+ priority: number;
2803
+ feeStructure: components["schemas"]["FeeStructure"];
2804
+ applicationFee: components["schemas"]["ApplicationFee"];
2805
+ metadata: {
2806
+ [key: string]: unknown;
2807
+ } | null;
2808
+ createdAt: string;
2809
+ updatedAt: string;
2810
+ }>;
2811
+ update: (providerId: string, request: {
2812
+ name?: string;
2813
+ description?: string;
2814
+ status?: "active" | "inactive" | "pending_setup";
2815
+ integrationServiceUrl?: string;
2816
+ integrationServiceVersion?: string;
2817
+ configuration?: Record<string, any>;
2818
+ supportedPaymentTypes?: ("online_card" | "online_bank_transfer" | "online_wallet" | "in_person_card" | "in_person_cash" | "bank_transfer" | "cheque")[];
2819
+ capabilities?: {
2820
+ supportsInstantCapture?: boolean;
2821
+ supportsDelayedCapture?: boolean;
2822
+ supportsRefunds?: boolean;
2823
+ supportsPartialRefunds?: boolean;
2824
+ requiresCustomerAction?: boolean;
2825
+ supportedCurrencies?: string[];
2826
+ maxAmount?: number;
2827
+ minAmount?: number;
2828
+ };
2829
+ isDefault?: boolean;
2830
+ priority?: number;
2831
+ feeStructure?: {
2832
+ type: "percentage" | "fixed" | "percentage_plus_fixed";
2833
+ percentage?: number;
2834
+ fixed?: number;
2835
+ currency?: string;
2836
+ };
2837
+ applicationFee?: components["schemas"]["ApplicationFee"];
2838
+ metadata?: Record<string, any>;
2839
+ }) => Promise<{
2840
+ id: string;
2841
+ organisationId: string;
2842
+ accountId: string | null;
2843
+ type: "stripe_connect" | "stripe_direct" | "adyen" | "square" | "paypal" | "cash" | "bank_transfer";
2844
+ name: string;
2845
+ description: string | null;
2846
+ status: "active" | "inactive" | "pending_setup";
2847
+ integrationServiceUrl: string | null;
2848
+ integrationServiceVersion: string;
2849
+ configuration: {
2850
+ [key: string]: unknown;
2851
+ };
2852
+ supportedPaymentTypes: ("online_card" | "online_bank_transfer" | "online_wallet" | "in_person_card" | "in_person_cash" | "bank_transfer" | "cheque")[];
2853
+ capabilities: components["schemas"]["PaymentProviderCapabilities"];
2854
+ isDefault: boolean;
2855
+ priority: number;
2856
+ feeStructure: components["schemas"]["FeeStructure"];
2857
+ applicationFee: components["schemas"]["ApplicationFee"];
2858
+ metadata: {
2859
+ [key: string]: unknown;
2860
+ } | null;
2861
+ createdAt: string;
2862
+ updatedAt: string;
2863
+ }>;
2864
+ delete: (providerId: string) => Promise<{
2865
+ success: boolean;
2866
+ id: string;
2867
+ }>;
2868
+ enableTicketlayerPay: (request: {
2869
+ displayName?: string;
2870
+ contactEmail?: string;
2871
+ country?: string;
2872
+ currency?: string;
2873
+ metadata?: Record<string, any>;
2874
+ }) => Promise<{
2875
+ status: components["schemas"]["TicketlayerPayStatus"];
2876
+ created: boolean;
2877
+ }>;
2878
+ getTicketlayerPay: (options?: {
2879
+ refresh?: "0" | "1" | "true" | "false";
2880
+ }) => Promise<any>;
2881
+ createTicketlayerPayOnboardingSession: () => Promise<any>;
2882
+ createTicketlayerPayOnboardingLink: (request: {
2883
+ returnUrl: string;
2884
+ refreshUrl: string;
2885
+ }) => Promise<{
2886
+ url: string;
2887
+ expiresAt: string;
2888
+ connectedAccountId: string;
2889
+ }>;
2890
+ linkStripeConnect: (request: {
2891
+ secretKey: string;
2892
+ publishableKey: string;
2893
+ defaultMode: "direct" | "connected";
2894
+ name?: string;
2895
+ applicationFee?: any;
2896
+ refundApplicationFee?: boolean;
2897
+ }) => Promise<{
2898
+ provider: components["schemas"]["StripeConnectProvider"];
2899
+ created: boolean;
2900
+ }>;
2901
+ getStripeConnect: () => Promise<any>;
2902
+ listAccounts: (providerId: string) => Promise<any>;
2903
+ getAccount: (providerId: string, accountId: string, options?: {
2904
+ refresh?: "0" | "1" | "true" | "false";
2905
+ }) => Promise<any>;
2906
+ setAccountMode: (providerId: string, accountId: string, request: {
2907
+ mode: "direct" | "connected";
2908
+ connectedAccountId?: string;
2909
+ displayName?: string;
2910
+ contactEmail?: string;
2911
+ country?: string;
2912
+ currency?: string;
2913
+ }) => Promise<any>;
2914
+ createAccountOnboardingSession: (providerId: string, accountId: string) => Promise<any>;
2915
+ createAccountOnboardingLink: (providerId: string, accountId: string, request: {
2916
+ returnUrl: string;
2917
+ refreshUrl: string;
2918
+ }) => Promise<{
2919
+ url: string;
2920
+ expiresAt: string;
2921
+ connectedAccountId: string;
2922
+ }>;
2923
+ };
2924
+ salesChannels: ((channelId: string) => {
2925
+ keys: {
2926
+ issue: (request: {
2927
+ keyType: "publishable" | "secret";
2928
+ name: string;
2929
+ }) => Promise<{
2930
+ key: components["schemas"]["IssuedSalesChannelKey"];
2931
+ keyMaterial: string;
2932
+ warning?: string;
2933
+ }>;
2934
+ list: () => Promise<{
2935
+ id: string;
2936
+ channelId: string;
2937
+ keyType: "publishable" | "secret";
2938
+ name: string;
2939
+ publishableKey: string | null;
2940
+ last4: string;
2941
+ status: "active" | "revoked" | "compromised";
2942
+ lastUsedAt: string | null;
2943
+ revokedAt: string | null;
2944
+ createdAt: string;
2945
+ }[]>;
2946
+ revoke: (keyId: string, request: {
2947
+ reason?: string;
2948
+ }) => Promise<{
2949
+ id: string;
2950
+ status: "active" | "revoked" | "compromised";
2951
+ revokedAt: string | null;
2952
+ }>;
2953
+ };
2954
+ listings: {
2955
+ create: (request: {
2956
+ eventId: string;
2957
+ saleStartsAt?: string;
2958
+ saleEndsAt?: string;
2959
+ }) => Promise<{
2960
+ id: string;
2961
+ organisationId: string;
2962
+ channelId: string;
2963
+ eventId: string;
2964
+ saleStartsAt: string | null;
2965
+ saleEndsAt: string | null;
2966
+ isActive: boolean;
2967
+ createdBy: string | null;
2968
+ createdAt: string;
2969
+ updatedAt: string;
2970
+ }>;
2971
+ list: () => Promise<{
2972
+ id: string;
2973
+ organisationId: string;
2974
+ channelId: string;
2975
+ eventId: string;
2976
+ saleStartsAt: string | null;
2977
+ saleEndsAt: string | null;
2978
+ isActive: boolean;
2979
+ createdBy: string | null;
2980
+ createdAt: string;
2981
+ updatedAt: string;
2982
+ }[]>;
2983
+ delete: (listingId: string) => Promise<boolean>;
2984
+ };
2985
+ carts: {
2986
+ create: (request: {
2987
+ customerId?: string;
2988
+ metadata?: Record<string, any>;
2989
+ }) => Promise<{
2990
+ cart: components["schemas"]["StaffCart"];
2991
+ items: components["schemas"]["StaffCartItem"][];
2992
+ }>;
2993
+ get: (cartId: string) => Promise<{
2994
+ cart: components["schemas"]["StaffCart"];
2995
+ items: components["schemas"]["StaffCartItem"][];
2996
+ }>;
2997
+ addItem: (cartId: string, request: {
2998
+ eventOccurrenceId: string;
2999
+ categoryId: string;
3000
+ ticketTypeId: string;
3001
+ quantity?: number;
3002
+ eventLayoutAreaId?: string;
3003
+ eventLayoutSeatIds?: string[];
3004
+ }) => Promise<{
3005
+ cart: components["schemas"]["StaffCart"];
3006
+ items: components["schemas"]["StaffCartItem"][];
3007
+ }>;
3008
+ removeItem: (cartId: string, itemId: string) => Promise<{
3009
+ cart: components["schemas"]["StaffCart"];
3010
+ items: components["schemas"]["StaffCartItem"][];
3011
+ }>;
3012
+ checkout: (cartId: string, request: {
3013
+ customerId?: string;
3014
+ customerNotes?: string;
3015
+ metadata?: Record<string, any>;
3016
+ discount?: {
3017
+ amount?: number;
3018
+ percent?: number;
3019
+ label?: string;
3020
+ reason: string;
3021
+ };
3022
+ }) => Promise<{
3023
+ cart: components["schemas"]["StaffCart"];
3024
+ order: components["schemas"]["StaffSalesOrder"];
3025
+ }>;
3026
+ };
3027
+ }) & {
3028
+ create: (request: {
3029
+ accountId: string;
3030
+ name: string;
3031
+ slug: string;
3032
+ description?: string;
3033
+ channelType: "website" | "embed" | "box_office" | "kiosk" | "reseller_api" | "internal";
3034
+ channelTags?: string[];
3035
+ eventFilter?: {
3036
+ mode: "all" | "tagged";
3037
+ channelTags?: string[];
3038
+ };
3039
+ pricingConfig?: {
3040
+ showMemberPricing?: boolean;
3041
+ showOriginalPrice?: boolean;
3042
+ includeFeesInPrice?: boolean;
3043
+ };
3044
+ customerConfig?: {
3045
+ requireLogin?: boolean;
3046
+ allowGuestCheckout?: boolean;
3047
+ collectPhone?: boolean;
3048
+ collectAddress?: boolean;
3049
+ };
3050
+ customerFacing?: {
3051
+ enabled?: boolean;
3052
+ subdomain?: string;
3053
+ customDomain?: string;
3054
+ allowedOrigins?: any[];
3055
+ magicLinkBaseUrl?: string;
3056
+ partnerIdentity?: {
3057
+ issuer: string;
3058
+ publicKeyPem: string;
3059
+ algorithm: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512";
3060
+ };
3061
+ };
3062
+ reservationTtlSeconds?: number;
3063
+ checkoutTtlSeconds?: number;
3064
+ receivingAccountId?: string;
3065
+ feeProfileId?: string;
3066
+ }) => Promise<{
3067
+ id: string;
3068
+ organisationId: string;
3069
+ accountId: string;
3070
+ name: string;
3071
+ slug: string;
3072
+ description: string | null;
3073
+ channelType: "website" | "embed" | "box_office" | "kiosk" | "reseller_api" | "internal";
3074
+ channelTags: string[];
3075
+ eventFilter: {
3076
+ mode: "all" | "tagged";
3077
+ channelTags?: string[];
3078
+ };
3079
+ pricingConfig: {
3080
+ showMemberPricing: boolean;
3081
+ showOriginalPrice: boolean;
3082
+ includeFeesInPrice: boolean;
3083
+ };
3084
+ customerConfig: {
3085
+ requireLogin: boolean;
3086
+ allowGuestCheckout: boolean;
3087
+ collectPhone: boolean;
3088
+ collectAddress: boolean;
3089
+ };
3090
+ reservationTtlSeconds: number;
3091
+ checkoutTtlSeconds: number;
3092
+ customerFacing: {
3093
+ enabled: boolean;
3094
+ subdomain?: string;
3095
+ customDomain?: string;
3096
+ allowedOrigins: string[];
3097
+ magicLinkBaseUrl?: string;
3098
+ partnerIdentity?: {
3099
+ issuer: string;
3100
+ publicKeyPem: string;
3101
+ algorithm: string;
3102
+ };
3103
+ };
3104
+ receivingAccountId: string;
3105
+ feeProfileId: string | null;
3106
+ themeId: string | null;
3107
+ isActive: boolean;
3108
+ isDeleted: boolean;
3109
+ deletedAt: string | null;
3110
+ createdAt: string;
3111
+ updatedAt: string;
3112
+ }>;
3113
+ list: () => Promise<{
3114
+ id: string;
3115
+ organisationId: string;
3116
+ accountId: string;
3117
+ name: string;
3118
+ slug: string;
3119
+ description: string | null;
3120
+ channelType: "website" | "embed" | "box_office" | "kiosk" | "reseller_api" | "internal";
3121
+ channelTags: string[];
3122
+ eventFilter: {
3123
+ mode: "all" | "tagged";
3124
+ channelTags?: string[];
3125
+ };
3126
+ pricingConfig: {
3127
+ showMemberPricing: boolean;
3128
+ showOriginalPrice: boolean;
3129
+ includeFeesInPrice: boolean;
3130
+ };
3131
+ customerConfig: {
3132
+ requireLogin: boolean;
3133
+ allowGuestCheckout: boolean;
3134
+ collectPhone: boolean;
3135
+ collectAddress: boolean;
3136
+ };
3137
+ reservationTtlSeconds: number;
3138
+ checkoutTtlSeconds: number;
3139
+ customerFacing: {
3140
+ enabled: boolean;
3141
+ subdomain?: string;
3142
+ customDomain?: string;
3143
+ allowedOrigins: string[];
3144
+ magicLinkBaseUrl?: string;
3145
+ partnerIdentity?: {
3146
+ issuer: string;
3147
+ publicKeyPem: string;
3148
+ algorithm: string;
3149
+ };
3150
+ };
3151
+ receivingAccountId: string;
3152
+ feeProfileId: string | null;
3153
+ themeId: string | null;
3154
+ isActive: boolean;
3155
+ isDeleted: boolean;
3156
+ deletedAt: string | null;
3157
+ createdAt: string;
3158
+ updatedAt: string;
3159
+ }[]>;
3160
+ get: (channelId: string) => Promise<{
3161
+ id: string;
3162
+ organisationId: string;
3163
+ accountId: string;
3164
+ name: string;
3165
+ slug: string;
3166
+ description: string | null;
3167
+ channelType: "website" | "embed" | "box_office" | "kiosk" | "reseller_api" | "internal";
3168
+ channelTags: string[];
3169
+ eventFilter: {
3170
+ mode: "all" | "tagged";
3171
+ channelTags?: string[];
3172
+ };
3173
+ pricingConfig: {
3174
+ showMemberPricing: boolean;
3175
+ showOriginalPrice: boolean;
3176
+ includeFeesInPrice: boolean;
3177
+ };
3178
+ customerConfig: {
3179
+ requireLogin: boolean;
3180
+ allowGuestCheckout: boolean;
3181
+ collectPhone: boolean;
3182
+ collectAddress: boolean;
3183
+ };
3184
+ reservationTtlSeconds: number;
3185
+ checkoutTtlSeconds: number;
3186
+ customerFacing: {
3187
+ enabled: boolean;
3188
+ subdomain?: string;
3189
+ customDomain?: string;
3190
+ allowedOrigins: string[];
3191
+ magicLinkBaseUrl?: string;
3192
+ partnerIdentity?: {
3193
+ issuer: string;
3194
+ publicKeyPem: string;
3195
+ algorithm: string;
3196
+ };
3197
+ };
3198
+ receivingAccountId: string;
3199
+ feeProfileId: string | null;
3200
+ themeId: string | null;
3201
+ isActive: boolean;
3202
+ isDeleted: boolean;
3203
+ deletedAt: string | null;
3204
+ createdAt: string;
3205
+ updatedAt: string;
3206
+ }>;
3207
+ update: (channelId: string, request: {
3208
+ name?: string;
3209
+ description?: string;
3210
+ channelTags?: string[];
3211
+ eventFilter?: {
3212
+ mode: "all" | "tagged";
3213
+ channelTags?: string[];
3214
+ };
3215
+ pricingConfig?: {
3216
+ showMemberPricing?: boolean;
3217
+ showOriginalPrice?: boolean;
3218
+ includeFeesInPrice?: boolean;
3219
+ };
3220
+ customerConfig?: {
3221
+ requireLogin?: boolean;
3222
+ allowGuestCheckout?: boolean;
3223
+ collectPhone?: boolean;
3224
+ collectAddress?: boolean;
3225
+ };
3226
+ customerFacing?: {
3227
+ enabled?: boolean;
3228
+ subdomain?: string;
3229
+ customDomain?: string;
3230
+ allowedOrigins?: any[];
3231
+ magicLinkBaseUrl?: string;
3232
+ partnerIdentity?: {
3233
+ issuer: string;
3234
+ publicKeyPem: string;
3235
+ algorithm: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512";
3236
+ };
3237
+ };
3238
+ reservationTtlSeconds?: number;
3239
+ checkoutTtlSeconds?: number;
3240
+ receivingAccountId?: string;
3241
+ feeProfileId?: any;
3242
+ paymentProviderId?: any;
3243
+ themeId?: any;
3244
+ isActive?: boolean;
3245
+ }) => Promise<{
3246
+ id: string;
3247
+ organisationId: string;
3248
+ accountId: string;
3249
+ name: string;
3250
+ slug: string;
3251
+ description: string | null;
3252
+ channelType: "website" | "embed" | "box_office" | "kiosk" | "reseller_api" | "internal";
3253
+ channelTags: string[];
3254
+ eventFilter: {
3255
+ mode: "all" | "tagged";
3256
+ channelTags?: string[];
3257
+ };
3258
+ pricingConfig: {
3259
+ showMemberPricing: boolean;
3260
+ showOriginalPrice: boolean;
3261
+ includeFeesInPrice: boolean;
3262
+ };
3263
+ customerConfig: {
3264
+ requireLogin: boolean;
3265
+ allowGuestCheckout: boolean;
3266
+ collectPhone: boolean;
3267
+ collectAddress: boolean;
3268
+ };
3269
+ reservationTtlSeconds: number;
3270
+ checkoutTtlSeconds: number;
3271
+ customerFacing: {
3272
+ enabled: boolean;
3273
+ subdomain?: string;
3274
+ customDomain?: string;
3275
+ allowedOrigins: string[];
3276
+ magicLinkBaseUrl?: string;
3277
+ partnerIdentity?: {
3278
+ issuer: string;
3279
+ publicKeyPem: string;
3280
+ algorithm: string;
3281
+ };
3282
+ };
3283
+ receivingAccountId: string;
3284
+ feeProfileId: string | null;
3285
+ themeId: string | null;
3286
+ isActive: boolean;
3287
+ isDeleted: boolean;
3288
+ deletedAt: string | null;
3289
+ createdAt: string;
3290
+ updatedAt: string;
3291
+ }>;
3292
+ delete: (channelId: string) => Promise<boolean>;
3293
+ };
3294
+ presaleCodes: {
3295
+ create: (request: {
3296
+ accountId: string;
3297
+ code: string;
3298
+ benefit: string;
3299
+ channelId?: string;
3300
+ maxRedemptions?: number;
3301
+ expiresAt?: string;
3302
+ benefitExpiresAt?: string;
3303
+ }) => Promise<{
3304
+ id: string;
3305
+ organisationId: string;
3306
+ accountId: string;
3307
+ code: string;
3308
+ benefit: string;
3309
+ channelId: string | null;
3310
+ maxRedemptions: number | null;
3311
+ redemptionCount: number;
3312
+ expiresAt: string | null;
3313
+ benefitExpiresAt: string | null;
3314
+ isActive: boolean;
3315
+ createdBy: string | null;
3316
+ createdAt: string;
3317
+ updatedAt: string;
3318
+ }>;
3319
+ list: () => Promise<{
3320
+ id: string;
3321
+ organisationId: string;
3322
+ accountId: string;
3323
+ code: string;
3324
+ benefit: string;
3325
+ channelId: string | null;
3326
+ maxRedemptions: number | null;
3327
+ redemptionCount: number;
3328
+ expiresAt: string | null;
3329
+ benefitExpiresAt: string | null;
3330
+ isActive: boolean;
3331
+ createdBy: string | null;
3332
+ createdAt: string;
3333
+ updatedAt: string;
3334
+ }[]>;
3335
+ deactivate: (codeId: string) => Promise<{
3336
+ id: string;
3337
+ organisationId: string;
3338
+ accountId: string;
3339
+ code: string;
3340
+ benefit: string;
3341
+ channelId: string | null;
3342
+ maxRedemptions: number | null;
3343
+ redemptionCount: number;
3344
+ expiresAt: string | null;
3345
+ benefitExpiresAt: string | null;
3346
+ isActive: boolean;
3347
+ createdBy: string | null;
3348
+ createdAt: string;
3349
+ updatedAt: string;
3350
+ }>;
3351
+ };
3352
+ feeProfiles: {
3353
+ create: (request: {
3354
+ name: string;
3355
+ serviceFeeEnabled?: boolean;
3356
+ serviceFeePercent?: number;
3357
+ serviceFeeFixed?: number;
3358
+ serviceFeeLabel?: string;
3359
+ }) => Promise<{
3360
+ id: string;
3361
+ organisationId: string;
3362
+ name: string;
3363
+ serviceFeeEnabled: boolean;
3364
+ serviceFeePercent: string | null;
3365
+ serviceFeeFixed: number | null;
3366
+ serviceFeeLabel: string | null;
3367
+ isDeleted: boolean;
3368
+ deletedAt: string | null;
3369
+ createdAt: string;
3370
+ updatedAt: string;
3371
+ }>;
3372
+ list: () => Promise<{
3373
+ id: string;
3374
+ organisationId: string;
3375
+ name: string;
3376
+ serviceFeeEnabled: boolean;
3377
+ serviceFeePercent: string | null;
3378
+ serviceFeeFixed: number | null;
3379
+ serviceFeeLabel: string | null;
3380
+ isDeleted: boolean;
3381
+ deletedAt: string | null;
3382
+ createdAt: string;
3383
+ updatedAt: string;
3384
+ }[]>;
3385
+ get: (profileId: string) => Promise<{
3386
+ id: string;
3387
+ organisationId: string;
3388
+ name: string;
3389
+ serviceFeeEnabled: boolean;
3390
+ serviceFeePercent: string | null;
3391
+ serviceFeeFixed: number | null;
3392
+ serviceFeeLabel: string | null;
3393
+ isDeleted: boolean;
3394
+ deletedAt: string | null;
3395
+ createdAt: string;
3396
+ updatedAt: string;
3397
+ }>;
3398
+ update: (profileId: string, request: {
3399
+ name?: string;
3400
+ serviceFeeEnabled?: boolean;
3401
+ serviceFeePercent?: number;
3402
+ serviceFeeFixed?: number;
3403
+ serviceFeeLabel?: string;
3404
+ }) => Promise<{
3405
+ id: string;
3406
+ organisationId: string;
3407
+ name: string;
3408
+ serviceFeeEnabled: boolean;
3409
+ serviceFeePercent: string | null;
3410
+ serviceFeeFixed: number | null;
3411
+ serviceFeeLabel: string | null;
3412
+ isDeleted: boolean;
3413
+ deletedAt: string | null;
3414
+ createdAt: string;
3415
+ updatedAt: string;
3416
+ }>;
3417
+ delete: (profileId: string) => Promise<boolean>;
3418
+ };
3419
+ salesListings: {
3420
+ list: () => Promise<{
3421
+ channel: components["schemas"]["SalesChannelSummary"];
3422
+ listings: components["schemas"]["SalesListing"][];
3423
+ }>;
3424
+ };
3425
+ salesCustomerAuth: {
3426
+ magicLink: (request: {
3427
+ email?: string;
3428
+ phone?: string;
3429
+ }) => Promise<boolean>;
3430
+ };
3431
+ salesCustomerTokens: {
3432
+ create: (request: {
3433
+ proof: any;
3434
+ }) => Promise<{
3435
+ customerToken: string;
3436
+ expiresIn: number;
3437
+ customer: components["schemas"]["SalesCustomer"];
3438
+ }>;
3439
+ refresh: () => Promise<{
3440
+ customerToken: string;
3441
+ expiresIn: number;
3442
+ customer: components["schemas"]["SalesCustomer"];
3443
+ }>;
3444
+ };
3445
+ salesCarts: {
3446
+ create: (request: {
3447
+ metadata?: Record<string, any>;
3448
+ }) => Promise<{
3449
+ id: string;
3450
+ status: string;
3451
+ currency: string | null;
3452
+ expiresAt: string;
3453
+ orderId: string | null;
3454
+ items: components["schemas"]["SalesCartItem"][];
3455
+ itemsSubtotal: number;
3456
+ }>;
3457
+ get: (cartId: string) => Promise<{
3458
+ id: string;
3459
+ status: string;
3460
+ currency: string | null;
3461
+ expiresAt: string;
3462
+ orderId: string | null;
3463
+ items: components["schemas"]["SalesCartItem"][];
3464
+ itemsSubtotal: number;
3465
+ }>;
3466
+ addItem: (cartId: string, request: {
3467
+ eventOccurrenceId: string;
3468
+ categoryId: string;
3469
+ ticketTypeId: string;
3470
+ quantity?: number;
3471
+ eventLayoutAreaId?: string;
3472
+ eventLayoutSeatIds?: string[];
3473
+ }) => Promise<{
3474
+ id: string;
3475
+ status: string;
3476
+ currency: string | null;
3477
+ expiresAt: string;
3478
+ orderId: string | null;
3479
+ items: components["schemas"]["SalesCartItem"][];
3480
+ itemsSubtotal: number;
3481
+ }>;
3482
+ removeItem: (cartId: string, itemId: string) => Promise<{
3483
+ id: string;
3484
+ status: string;
3485
+ currency: string | null;
3486
+ expiresAt: string;
3487
+ orderId: string | null;
3488
+ items: components["schemas"]["SalesCartItem"][];
3489
+ itemsSubtotal: number;
3490
+ }>;
3491
+ checkout: (cartId: string, request: {
3492
+ customerNotes?: string;
3493
+ metadata?: Record<string, any>;
3494
+ customer?: {
3495
+ email: string;
3496
+ firstName?: string;
3497
+ lastName?: string;
3498
+ phone?: string;
3499
+ marketingConsent?: boolean;
3500
+ };
3501
+ }) => Promise<{
3502
+ cart: components["schemas"]["SalesCart"];
3503
+ order: components["schemas"]["SalesOrder"];
3504
+ orderAccessToken: string;
3505
+ }>;
3506
+ };
3507
+ salesMyOrders: {
3508
+ list: () => Promise<{
3509
+ id: string;
3510
+ orderNumber: string;
3511
+ status: string;
3512
+ paymentStatus: string;
3513
+ currency: string;
3514
+ items: components["schemas"]["SalesOrderItem"][];
3515
+ subtotal: number;
3516
+ totalFees: number;
3517
+ totalTax: number;
3518
+ total: number;
3519
+ tickets: components["schemas"]["SalesTicket"][];
3520
+ expiresAt: string | null;
3521
+ createdAt: string;
3522
+ }[]>;
3523
+ };
3524
+ salesOrders: {
3525
+ get: (orderId: string) => Promise<{
3526
+ id: string;
3527
+ orderNumber: string;
3528
+ status: string;
3529
+ paymentStatus: string;
3530
+ currency: string;
3531
+ items: components["schemas"]["SalesOrderItem"][];
3532
+ subtotal: number;
3533
+ totalFees: number;
3534
+ totalTax: number;
3535
+ total: number;
3536
+ tickets: components["schemas"]["SalesTicket"][];
3537
+ expiresAt: string | null;
3538
+ createdAt: string;
3539
+ }>;
3540
+ ticketPdf: (orderId: string, passId: string) => Promise<any>;
3541
+ };
3542
+ salesOrderPayments: {
3543
+ create: (orderId: string, request: {
3544
+ paymentType?: "online_card" | "online_bank_transfer" | "online_wallet";
3545
+ returnUrl?: string;
3546
+ }) => Promise<{
3547
+ id: string;
3548
+ orderId: string;
3549
+ status: string;
3550
+ paymentType: string;
3551
+ amount: number;
3552
+ currency: string;
3553
+ providerClientSecret: string | null;
3554
+ externalPaymentUrl: string | null;
3555
+ publishableKey: string | null;
3556
+ connectedAccountId: string | null;
3557
+ providerType: string | null;
3558
+ }>;
3559
+ };
3560
+ salesRefundRequests: {
3561
+ create: (orderId: string, request: {
3562
+ type: "refund" | "exchange";
3563
+ reason?: string;
3564
+ }) => Promise<{
3565
+ id: string;
3566
+ orderId: string;
3567
+ type: string;
3568
+ status: string;
3569
+ reason: string | null;
3570
+ createdAt: string;
3571
+ }>;
3572
+ };
3573
+ salesCustomers: {
3574
+ create: (request: {
3575
+ email: string;
3576
+ firstName?: string;
3577
+ lastName?: string;
3578
+ phone?: string;
3579
+ marketingConsent?: boolean;
3580
+ }) => Promise<{
3581
+ id: string;
3582
+ email: string;
3583
+ firstName: string | null;
3584
+ lastName: string | null;
3585
+ }>;
3586
+ get: (customerId: string) => Promise<{
3587
+ id: string;
3588
+ email: string;
3589
+ firstName: string | null;
3590
+ lastName: string | null;
3591
+ }>;
3592
+ update: (customerId: string, request: {
3593
+ firstName?: string;
3594
+ lastName?: string;
3595
+ phone?: string;
3596
+ }) => Promise<{
3597
+ id: string;
3598
+ email: string;
3599
+ firstName: string | null;
3600
+ lastName: string | null;
3601
+ }>;
3602
+ };
3603
+ salesPresaleCodes: {
3604
+ redeem: (request: {
3605
+ code: string;
3606
+ }) => Promise<{
3607
+ benefit: string;
3608
+ alreadyHeld: boolean;
3609
+ }>;
3610
+ };
3611
+ sales: {
3612
+ resolveChannel: (options?: {
3613
+ domain: string;
3614
+ }) => Promise<{
3615
+ channel: components["schemas"]["SalesChannelSummary"];
3616
+ publishableKey: string | null;
3617
+ }>;
3618
+ get: (eventId: string) => Promise<{
3619
+ id: string;
3620
+ name: string;
3621
+ subtitle: string | null;
3622
+ description: string | null;
3623
+ shortDescription: string | null;
3624
+ status: string;
3625
+ imageUrl: string | null;
3626
+ heroImageUrl: string | null;
3627
+ presentation: {
3628
+ heroLayout?: {
3629
+ type: "hero" | "cinema";
3630
+ size: "small" | "medium" | "large";
3631
+ };
3632
+ cinemaGradient?: {
3633
+ strength: 20 | 50 | 70;
3634
+ position: "bottom" | "center";
3635
+ };
3636
+ twoColumnSplit?: [number, number];
3637
+ navbar?: {
3638
+ transparent?: boolean;
3639
+ };
3640
+ buttonSize?: "small" | "medium" | "large";
3641
+ } | null;
3642
+ venueId: string | null;
3643
+ venueName: string | null;
3644
+ venueCity: string | null;
3645
+ priceFrom: number | null;
3646
+ currency: string | null;
3647
+ timezone: string;
3648
+ occurrences: {
3649
+ id: string;
3650
+ startsAt: string | null;
3651
+ endsAt: string | null;
3652
+ timezone: string;
3653
+ startDate: string;
3654
+ startTime: string;
3655
+ endDate: string;
3656
+ endTime: string;
3657
+ status: string;
3658
+ ticketTypes: {
3659
+ ticketTypeId: string;
3660
+ ticketTypeName: string;
3661
+ description: string | null;
3662
+ categoryId: string;
3663
+ categoryName: string;
3664
+ unitPrice: number;
3665
+ currency: string;
3666
+ }[];
3667
+ }[];
3668
+ }>;
3669
+ getTheme: () => Promise<{
3670
+ id: string;
3671
+ name: string;
3672
+ brand: {
3673
+ [key: string]: unknown;
3674
+ };
3675
+ colors: {
3676
+ [key: string]: unknown;
3677
+ };
3678
+ typography: {
3679
+ [key: string]: unknown;
3680
+ };
3681
+ shape: {
3682
+ [key: string]: unknown;
3683
+ };
3684
+ design?: {
3685
+ [key: string]: unknown;
3686
+ } | null;
3687
+ }>;
3688
+ };
3689
+ themes: {
3690
+ list: () => Promise<{
3691
+ id: string;
3692
+ organisationId: string;
3693
+ name: string;
3694
+ description: string | null;
3695
+ extendsThemeId: string | null;
3696
+ isBaseTheme: boolean;
3697
+ isActive: boolean;
3698
+ brand: {
3699
+ logoUrl?: string;
3700
+ logoDarkUrl?: string;
3701
+ faviconUrl?: string;
3702
+ displayName?: string;
3703
+ };
3704
+ colors: {
3705
+ primary?: string;
3706
+ primaryForeground?: string;
3707
+ secondary?: string;
3708
+ secondaryForeground?: string;
3709
+ accent?: string;
3710
+ accentForeground?: string;
3711
+ background?: string;
3712
+ foreground?: string;
3713
+ muted?: string;
3714
+ mutedForeground?: string;
3715
+ border?: string;
3716
+ input?: string;
3717
+ ring?: string;
3718
+ success?: string;
3719
+ successForeground?: string;
3720
+ warning?: string;
3721
+ warningForeground?: string;
3722
+ destructive?: string;
3723
+ destructiveForeground?: string;
3724
+ };
3725
+ typography: {
3726
+ fontFamily?: string;
3727
+ fontFamilyMono?: string;
3728
+ baseSize?: string;
3729
+ scaleRatio?: number;
3730
+ };
3731
+ shape: {
3732
+ radiusNone?: string;
3733
+ radiusSm?: string;
3734
+ radiusMd?: string;
3735
+ radiusLg?: string;
3736
+ radiusFull?: string;
3737
+ };
3738
+ design: components["schemas"]["ThemeDesign"];
3739
+ createdAt: string;
3740
+ updatedAt: string;
3741
+ }[]>;
3742
+ create: (request: {
3743
+ name: string;
3744
+ description?: string;
3745
+ extendsThemeId?: string;
3746
+ isBaseTheme?: boolean;
3747
+ isActive?: boolean;
3748
+ brand?: components["schemas"]["ThemeBrandInput"];
3749
+ colors?: components["schemas"]["ThemeColorsInput"];
3750
+ typography?: components["schemas"]["ThemeTypographyInput"];
3751
+ shape?: components["schemas"]["ThemeShapeInput"];
3752
+ design?: components["schemas"]["ThemeDesignInput"];
3753
+ }) => Promise<{
3754
+ id: string;
3755
+ organisationId: string;
3756
+ name: string;
3757
+ description: string | null;
3758
+ extendsThemeId: string | null;
3759
+ isBaseTheme: boolean;
3760
+ isActive: boolean;
3761
+ brand: {
3762
+ logoUrl?: string;
3763
+ logoDarkUrl?: string;
3764
+ faviconUrl?: string;
3765
+ displayName?: string;
3766
+ };
3767
+ colors: {
3768
+ primary?: string;
3769
+ primaryForeground?: string;
3770
+ secondary?: string;
3771
+ secondaryForeground?: string;
3772
+ accent?: string;
3773
+ accentForeground?: string;
3774
+ background?: string;
3775
+ foreground?: string;
3776
+ muted?: string;
3777
+ mutedForeground?: string;
3778
+ border?: string;
3779
+ input?: string;
3780
+ ring?: string;
3781
+ success?: string;
3782
+ successForeground?: string;
3783
+ warning?: string;
3784
+ warningForeground?: string;
3785
+ destructive?: string;
3786
+ destructiveForeground?: string;
3787
+ };
3788
+ typography: {
3789
+ fontFamily?: string;
3790
+ fontFamilyMono?: string;
3791
+ baseSize?: string;
3792
+ scaleRatio?: number;
3793
+ };
3794
+ shape: {
3795
+ radiusNone?: string;
3796
+ radiusSm?: string;
3797
+ radiusMd?: string;
3798
+ radiusLg?: string;
3799
+ radiusFull?: string;
3800
+ };
3801
+ design: components["schemas"]["ThemeDesign"];
3802
+ createdAt: string;
3803
+ updatedAt: string;
3804
+ }>;
3805
+ get: (id: string) => Promise<{
3806
+ id: string;
3807
+ organisationId: string;
3808
+ name: string;
3809
+ description: string | null;
3810
+ extendsThemeId: string | null;
3811
+ isBaseTheme: boolean;
3812
+ isActive: boolean;
3813
+ brand: {
3814
+ logoUrl?: string;
3815
+ logoDarkUrl?: string;
3816
+ faviconUrl?: string;
3817
+ displayName?: string;
3818
+ };
3819
+ colors: {
3820
+ primary?: string;
3821
+ primaryForeground?: string;
3822
+ secondary?: string;
3823
+ secondaryForeground?: string;
3824
+ accent?: string;
3825
+ accentForeground?: string;
3826
+ background?: string;
3827
+ foreground?: string;
3828
+ muted?: string;
3829
+ mutedForeground?: string;
3830
+ border?: string;
3831
+ input?: string;
3832
+ ring?: string;
3833
+ success?: string;
3834
+ successForeground?: string;
3835
+ warning?: string;
3836
+ warningForeground?: string;
3837
+ destructive?: string;
3838
+ destructiveForeground?: string;
3839
+ };
3840
+ typography: {
3841
+ fontFamily?: string;
3842
+ fontFamilyMono?: string;
3843
+ baseSize?: string;
3844
+ scaleRatio?: number;
3845
+ };
3846
+ shape: {
3847
+ radiusNone?: string;
3848
+ radiusSm?: string;
3849
+ radiusMd?: string;
3850
+ radiusLg?: string;
3851
+ radiusFull?: string;
3852
+ };
3853
+ design: components["schemas"]["ThemeDesign"];
3854
+ createdAt: string;
3855
+ updatedAt: string;
3856
+ }>;
3857
+ update: (id: string, request: {
3858
+ name?: string;
3859
+ description?: any;
3860
+ extendsThemeId?: any;
3861
+ isBaseTheme?: boolean;
3862
+ isActive?: boolean;
3863
+ brand?: components["schemas"]["ThemeBrandInput"];
3864
+ colors?: components["schemas"]["ThemeColorsInput"];
3865
+ typography?: components["schemas"]["ThemeTypographyInput"];
3866
+ shape?: components["schemas"]["ThemeShapeInput"];
3867
+ design?: any;
3868
+ }) => Promise<{
3869
+ id: string;
3870
+ organisationId: string;
3871
+ name: string;
3872
+ description: string | null;
3873
+ extendsThemeId: string | null;
3874
+ isBaseTheme: boolean;
3875
+ isActive: boolean;
3876
+ brand: {
3877
+ logoUrl?: string;
3878
+ logoDarkUrl?: string;
3879
+ faviconUrl?: string;
3880
+ displayName?: string;
3881
+ };
3882
+ colors: {
3883
+ primary?: string;
3884
+ primaryForeground?: string;
3885
+ secondary?: string;
3886
+ secondaryForeground?: string;
3887
+ accent?: string;
3888
+ accentForeground?: string;
3889
+ background?: string;
3890
+ foreground?: string;
3891
+ muted?: string;
3892
+ mutedForeground?: string;
3893
+ border?: string;
3894
+ input?: string;
3895
+ ring?: string;
3896
+ success?: string;
3897
+ successForeground?: string;
3898
+ warning?: string;
3899
+ warningForeground?: string;
3900
+ destructive?: string;
3901
+ destructiveForeground?: string;
3902
+ };
3903
+ typography: {
3904
+ fontFamily?: string;
3905
+ fontFamilyMono?: string;
3906
+ baseSize?: string;
3907
+ scaleRatio?: number;
3908
+ };
3909
+ shape: {
3910
+ radiusNone?: string;
3911
+ radiusSm?: string;
3912
+ radiusMd?: string;
3913
+ radiusLg?: string;
3914
+ radiusFull?: string;
3915
+ };
3916
+ design: components["schemas"]["ThemeDesign"];
3917
+ createdAt: string;
3918
+ updatedAt: string;
3919
+ }>;
3920
+ delete: (id: string) => Promise<boolean>;
3921
+ resolved: (id: string) => Promise<{
3922
+ id: string;
3923
+ organisationId: string;
3924
+ name: string;
3925
+ description: string | null;
3926
+ extendsThemeId: string | null;
3927
+ isBaseTheme: boolean;
3928
+ isActive: boolean;
3929
+ brand: {
3930
+ logoUrl?: string;
3931
+ logoDarkUrl?: string;
3932
+ faviconUrl?: string;
3933
+ displayName?: string;
3934
+ };
3935
+ colors: {
3936
+ primary?: string;
3937
+ primaryForeground?: string;
3938
+ secondary?: string;
3939
+ secondaryForeground?: string;
3940
+ accent?: string;
3941
+ accentForeground?: string;
3942
+ background?: string;
3943
+ foreground?: string;
3944
+ muted?: string;
3945
+ mutedForeground?: string;
3946
+ border?: string;
3947
+ input?: string;
3948
+ ring?: string;
3949
+ success?: string;
3950
+ successForeground?: string;
3951
+ warning?: string;
3952
+ warningForeground?: string;
3953
+ destructive?: string;
3954
+ destructiveForeground?: string;
3955
+ };
3956
+ typography: {
3957
+ fontFamily?: string;
3958
+ fontFamilyMono?: string;
3959
+ baseSize?: string;
3960
+ scaleRatio?: number;
3961
+ };
3962
+ shape: {
3963
+ radiusNone?: string;
3964
+ radiusSm?: string;
3965
+ radiusMd?: string;
3966
+ radiusLg?: string;
3967
+ radiusFull?: string;
3968
+ };
3969
+ design: components["schemas"]["ThemeDesign"];
3970
+ }>;
3971
+ };
3972
+ passes: (passeId: string) => {
3973
+ entitlements: {
3974
+ redeem: (barcode: string, request: {
3975
+ deviceId?: string;
3976
+ location?: string;
3977
+ idempotencyKey?: string;
3978
+ }) => Promise<{
3979
+ outcome: "valid" | "duplicate" | "void";
3980
+ reason?: string;
3981
+ pass: {
3982
+ id: string;
3983
+ status: string;
3984
+ };
3985
+ entitlement: {
3986
+ id: string;
3987
+ type: string;
3988
+ name: string;
3989
+ status: string;
3990
+ redemptionCount: number;
3991
+ redemptionLimit: number | null;
3992
+ eventOccurrenceId: string | null;
3993
+ seatLabel: string | null;
3994
+ };
3995
+ redemption?: {
3996
+ id: string;
3997
+ redeemedAt: string;
3998
+ };
3999
+ }>;
4000
+ };
4001
+ };
4002
+ ticketTemplates: {
4003
+ list: (options?: {
4004
+ status?: "draft" | "active" | "archived";
4005
+ eventId?: string;
4006
+ }) => Promise<{
4007
+ id: string;
4008
+ organisationId: string;
4009
+ accountId: string | null;
4010
+ name: string;
4011
+ type: string;
4012
+ description: string | null;
4013
+ layout: {
4014
+ page: {
4015
+ width: number;
4016
+ height: number;
4017
+ background?: {
4018
+ color?: string;
4019
+ } & {
4020
+ [key: string]: unknown;
4021
+ };
4022
+ } & {
4023
+ [key: string]: unknown;
4024
+ };
4025
+ blocks: ({
4026
+ id: string;
4027
+ type: "text" | "qr" | "barcode" | "image" | "rect";
4028
+ x: number;
4029
+ y: number;
4030
+ width: number;
4031
+ height: number;
4032
+ } & {
4033
+ [key: string]: unknown;
4034
+ })[];
4035
+ };
4036
+ version: number;
4037
+ scopeEventId: string | null;
4038
+ scopeTicketTypeId: string | null;
4039
+ scopeChannelId: string | null;
4040
+ themeId: string | null;
4041
+ status: string;
4042
+ isDefault: boolean;
4043
+ createdAt: string;
4044
+ updatedAt: string;
4045
+ }[]>;
4046
+ create: (request: {
4047
+ name: string;
4048
+ type?: "ticket" | "eticket" | "label" | "receipt";
4049
+ description?: any;
4050
+ layout?: {
4051
+ page: {
4052
+ width: number;
4053
+ height: number;
4054
+ background?: {
4055
+ color?: string;
4056
+ };
4057
+ };
4058
+ blocks: ({
4059
+ id: string;
4060
+ type: "text" | "qr" | "barcode" | "image" | "rect";
4061
+ x: number;
4062
+ y: number;
4063
+ width: number;
4064
+ height: number;
4065
+ })[];
4066
+ };
4067
+ scopeEventId?: any;
4068
+ scopeTicketTypeId?: any;
4069
+ scopeChannelId?: any;
4070
+ themeId?: any;
4071
+ status?: "draft" | "active" | "archived";
4072
+ isDefault?: boolean;
4073
+ accountId?: any;
4074
+ }) => Promise<{
4075
+ id: string;
4076
+ organisationId: string;
4077
+ accountId: string | null;
4078
+ name: string;
4079
+ type: string;
4080
+ description: string | null;
4081
+ layout: {
4082
+ page: {
4083
+ width: number;
4084
+ height: number;
4085
+ background?: {
4086
+ color?: string;
4087
+ } & {
4088
+ [key: string]: unknown;
4089
+ };
4090
+ } & {
4091
+ [key: string]: unknown;
4092
+ };
4093
+ blocks: ({
4094
+ id: string;
4095
+ type: "text" | "qr" | "barcode" | "image" | "rect";
4096
+ x: number;
4097
+ y: number;
4098
+ width: number;
4099
+ height: number;
4100
+ } & {
4101
+ [key: string]: unknown;
4102
+ })[];
4103
+ };
4104
+ version: number;
4105
+ scopeEventId: string | null;
4106
+ scopeTicketTypeId: string | null;
4107
+ scopeChannelId: string | null;
4108
+ themeId: string | null;
4109
+ status: string;
4110
+ isDefault: boolean;
4111
+ createdAt: string;
4112
+ updatedAt: string;
4113
+ }>;
4114
+ get: (id: string) => Promise<{
4115
+ id: string;
4116
+ organisationId: string;
4117
+ accountId: string | null;
4118
+ name: string;
4119
+ type: string;
4120
+ description: string | null;
4121
+ layout: {
4122
+ page: {
4123
+ width: number;
4124
+ height: number;
4125
+ background?: {
4126
+ color?: string;
4127
+ } & {
4128
+ [key: string]: unknown;
4129
+ };
4130
+ } & {
4131
+ [key: string]: unknown;
4132
+ };
4133
+ blocks: ({
4134
+ id: string;
4135
+ type: "text" | "qr" | "barcode" | "image" | "rect";
4136
+ x: number;
4137
+ y: number;
4138
+ width: number;
4139
+ height: number;
4140
+ } & {
4141
+ [key: string]: unknown;
4142
+ })[];
4143
+ };
4144
+ version: number;
4145
+ scopeEventId: string | null;
4146
+ scopeTicketTypeId: string | null;
4147
+ scopeChannelId: string | null;
4148
+ themeId: string | null;
4149
+ status: string;
4150
+ isDefault: boolean;
4151
+ createdAt: string;
4152
+ updatedAt: string;
4153
+ }>;
4154
+ update: (id: string, request: {
4155
+ name?: string;
4156
+ type?: "ticket" | "eticket" | "label" | "receipt";
4157
+ description?: any;
4158
+ layout?: {
4159
+ page: {
4160
+ width: number;
4161
+ height: number;
4162
+ background?: {
4163
+ color?: string;
4164
+ };
4165
+ };
4166
+ blocks: ({
4167
+ id: string;
4168
+ type: "text" | "qr" | "barcode" | "image" | "rect";
4169
+ x: number;
4170
+ y: number;
4171
+ width: number;
4172
+ height: number;
4173
+ })[];
4174
+ };
4175
+ scopeEventId?: any;
4176
+ scopeTicketTypeId?: any;
4177
+ scopeChannelId?: any;
4178
+ themeId?: any;
4179
+ status?: "draft" | "active" | "archived";
4180
+ isDefault?: boolean;
4181
+ }) => Promise<{
4182
+ id: string;
4183
+ organisationId: string;
4184
+ accountId: string | null;
4185
+ name: string;
4186
+ type: string;
4187
+ description: string | null;
4188
+ layout: {
4189
+ page: {
4190
+ width: number;
4191
+ height: number;
4192
+ background?: {
4193
+ color?: string;
4194
+ } & {
4195
+ [key: string]: unknown;
4196
+ };
4197
+ } & {
4198
+ [key: string]: unknown;
4199
+ };
4200
+ blocks: ({
4201
+ id: string;
4202
+ type: "text" | "qr" | "barcode" | "image" | "rect";
4203
+ x: number;
4204
+ y: number;
4205
+ width: number;
4206
+ height: number;
4207
+ } & {
4208
+ [key: string]: unknown;
4209
+ })[];
4210
+ };
4211
+ version: number;
4212
+ scopeEventId: string | null;
4213
+ scopeTicketTypeId: string | null;
4214
+ scopeChannelId: string | null;
4215
+ themeId: string | null;
4216
+ status: string;
4217
+ isDefault: boolean;
4218
+ createdAt: string;
4219
+ updatedAt: string;
4220
+ }>;
4221
+ delete: (id: string) => Promise<boolean>;
4222
+ };
4223
+ scanConfigs: {
4224
+ create: (request: {
4225
+ accountId: string;
4226
+ name: string;
4227
+ eventFilter: {
4228
+ mode: "all" | "events" | "occurrences";
4229
+ eventIds?: string[];
4230
+ occurrenceIds?: string[];
4231
+ };
4232
+ entitlementFilter?: {
4233
+ types?: string[];
4234
+ ticketTypeIds?: string[];
4235
+ entitlementIds?: string[];
4236
+ tags?: string[];
4237
+ };
4238
+ allowedKinds: ("validate" | "redeem" | "reverse")[];
4239
+ gates?: string[];
4240
+ validFrom?: string;
4241
+ validUntil?: string;
4242
+ }) => Promise<any>;
4243
+ list: () => Promise<any>;
4244
+ get: (configId: string) => Promise<any>;
4245
+ update: (configId: string, request: {
4246
+ accountId?: string;
4247
+ name?: string;
4248
+ eventFilter?: {
4249
+ mode: "all" | "events" | "occurrences";
4250
+ eventIds?: string[];
4251
+ occurrenceIds?: string[];
4252
+ };
4253
+ entitlementFilter?: {
4254
+ types?: string[];
4255
+ ticketTypeIds?: string[];
4256
+ entitlementIds?: string[];
4257
+ tags?: string[];
4258
+ };
4259
+ allowedKinds?: ("validate" | "redeem" | "reverse")[];
4260
+ gates?: string[];
4261
+ validFrom?: string;
4262
+ validUntil?: string;
4263
+ status?: "active" | "archived";
4264
+ }) => Promise<any>;
4265
+ delete: (configId: string) => Promise<any>;
4266
+ setDevices: (configId: string, request: {
4267
+ deviceIds: string[];
4268
+ }) => Promise<any>;
4269
+ };
4270
+ scan: {
4271
+ config: () => Promise<any>;
4272
+ manifest: (options?: {
4273
+ since?: string;
4274
+ }) => Promise<any>;
4275
+ operations: (request: {
4276
+ operations: ({
4277
+ opId: string;
4278
+ kind: "validate" | "redeem" | "reverse";
4279
+ passBarcode: string;
4280
+ entitlementId?: string;
4281
+ occurredAt: string;
4282
+ seq?: number;
4283
+ gate?: string;
4284
+ reverseOf?: string;
4285
+ originDeviceId?: string;
4286
+ locationId?: string;
4287
+ actor?: {
4288
+ type: "device" | "user";
4289
+ id: string;
4290
+ };
4291
+ hopPath?: string[];
4292
+ })[];
4293
+ }) => Promise<any>;
4294
+ };
4295
+ scans: {
4296
+ list: (options?: {
4297
+ occurrenceId?: string;
4298
+ eventId?: string;
4299
+ deviceId?: string;
4300
+ status?: "validated" | "redeemed" | "rejected" | "reversed";
4301
+ from?: string;
4302
+ to?: string;
4303
+ limit?: number;
4304
+ }) => Promise<any>;
4305
+ reverse: (redemptionId: string, request: {
4306
+ reason?: string;
4307
+ }) => Promise<any>;
4308
+ };
4309
+ assets: (assetId: string) => {
4310
+ assets: {
4311
+ list: (options?: {
4312
+ q?: string;
4313
+ purpose?: string;
4314
+ ownerType?: string;
4315
+ ownerId?: string;
4316
+ accountId?: string;
4317
+ }) => Promise<{
4318
+ id: string;
4319
+ organisationId: string;
4320
+ accountId: string | null;
4321
+ name: string | null;
4322
+ purpose: string;
4323
+ ownerType: string | null;
4324
+ ownerId: string | null;
4325
+ filename: string | null;
4326
+ contentType: string;
4327
+ sizeBytes: number;
4328
+ storageDriver: string;
4329
+ storageBucket: string | null;
4330
+ storageKey: string;
4331
+ url: string;
4332
+ cdn: boolean;
4333
+ cdnUrl: string | null;
4334
+ visibility: string;
4335
+ metadata: {
4336
+ [key: string]: unknown;
4337
+ };
4338
+ uploadedBy: string | null;
4339
+ createdAt: string;
4340
+ updatedAt: string;
4341
+ }[]>;
4342
+ upload: (request: {
4343
+ name?: string;
4344
+ purpose?: "event_image" | "organisation_logo" | "account_logo" | "user_avatar" | "ticket_template_asset" | "rendered_pass" | "rendered_receipt" | "export" | "other";
4345
+ ownerType?: string;
4346
+ ownerId?: string;
4347
+ accountId?: string;
4348
+ visibility?: "public" | "private";
4349
+ cdn?: any;
4350
+ }) => Promise<{
4351
+ id: string;
4352
+ organisationId: string;
4353
+ accountId: string | null;
4354
+ name: string | null;
4355
+ purpose: string;
4356
+ ownerType: string | null;
4357
+ ownerId: string | null;
4358
+ filename: string | null;
4359
+ contentType: string;
4360
+ sizeBytes: number;
4361
+ storageDriver: string;
4362
+ storageBucket: string | null;
4363
+ storageKey: string;
4364
+ url: string;
4365
+ cdn: boolean;
4366
+ cdnUrl: string | null;
4367
+ visibility: string;
4368
+ metadata: {
4369
+ [key: string]: unknown;
4370
+ };
4371
+ uploadedBy: string | null;
4372
+ createdAt: string;
4373
+ updatedAt: string;
4374
+ }>;
4375
+ get: (id: string) => Promise<{
4376
+ id: string;
4377
+ organisationId: string;
4378
+ accountId: string | null;
4379
+ name: string | null;
4380
+ purpose: string;
4381
+ ownerType: string | null;
4382
+ ownerId: string | null;
4383
+ filename: string | null;
4384
+ contentType: string;
4385
+ sizeBytes: number;
4386
+ storageDriver: string;
4387
+ storageBucket: string | null;
4388
+ storageKey: string;
4389
+ url: string;
4390
+ cdn: boolean;
4391
+ cdnUrl: string | null;
4392
+ visibility: string;
4393
+ metadata: {
4394
+ [key: string]: unknown;
4395
+ };
4396
+ uploadedBy: string | null;
4397
+ createdAt: string;
4398
+ updatedAt: string;
4399
+ }>;
4400
+ delete: (id: string) => Promise<boolean>;
4401
+ };
4402
+ };
4403
+ devicePairing: {
4404
+ start: (request: {
4405
+ type: "relay" | "scanner" | "kiosk" | "signage";
4406
+ name?: string;
4407
+ platform?: {
4408
+ os?: string;
4409
+ osVersion?: string;
4410
+ appVersion?: string;
4411
+ hostname?: string;
4412
+ arch?: string;
4413
+ };
4414
+ }) => Promise<any>;
4415
+ getStatus: (pairingId: string) => Promise<any>;
4416
+ claim: (request: {
4417
+ userCode: string;
4418
+ name: string;
4419
+ accountId: string;
4420
+ locationId?: string;
4421
+ accountRoles: {
4422
+ accountId: string;
4423
+ roleId: string;
4424
+ }[];
4425
+ }) => Promise<any>;
4426
+ confirm: (pairingId: string, request: {
4427
+ deviceCode: string;
4428
+ }) => Promise<any>;
4429
+ reject: (pairingId: string, request: {
4430
+ deviceCode: string;
4431
+ }) => Promise<any>;
4432
+ };
4433
+ deviceAuth: {
4434
+ issueToken: (request: {
4435
+ deviceId: string;
4436
+ deviceSecret: string;
4437
+ }) => Promise<any>;
4438
+ jwks: () => Promise<any>;
4439
+ };
4440
+ deviceSelf: {
4441
+ getMe: () => Promise<any>;
4442
+ heartbeat: (request: {
4443
+ appVersion?: string;
4444
+ localPort?: number;
4445
+ lanAddresses?: {
4446
+ ip: string;
4447
+ interface: string;
4448
+ }[];
4449
+ peripheralStatuses?: {
4450
+ clientKey: string;
4451
+ status: Record<string, any>;
4452
+ }[];
4453
+ }) => Promise<any>;
4454
+ declarePeripherals: (request: {
4455
+ peripherals: ({
4456
+ clientKey: string;
4457
+ kind: string;
4458
+ name: string;
4459
+ attachment?: "child" | "routed";
4460
+ vendor?: string;
4461
+ model?: string;
4462
+ capabilities?: Record<string, any>;
4463
+ address?: {
4464
+ host: string;
4465
+ port: number;
4466
+ };
4467
+ provider?: string;
4468
+ })[];
4469
+ }) => Promise<any>;
4470
+ fetchCommands: (options?: {
4471
+ wait?: number;
4472
+ }) => Promise<any>;
4473
+ reportProgress: (commandId: string, request: {
4474
+ progress: Record<string, any>;
4475
+ }) => Promise<any>;
4476
+ reportResult: (commandId: string, request: {
4477
+ status: "completed" | "failed";
4478
+ result?: Record<string, any>;
4479
+ }) => Promise<any>;
4480
+ ingestEvents: (request: {
4481
+ events: {
4482
+ id: string;
4483
+ type: string;
4484
+ occurredAt: string;
4485
+ payload?: Record<string, any>;
4486
+ }[];
4487
+ }) => Promise<any>;
4488
+ getCertificate: () => Promise<any>;
4489
+ };
4490
+ devices: {
4491
+ printers: () => Promise<any>;
4492
+ mediaCatalog: () => Promise<any>;
4493
+ list: (options?: {
4494
+ accountId?: string;
4495
+ type?: string;
4496
+ status?: "active" | "revoked";
4497
+ connectivity?: "unknown" | "online" | "offline";
4498
+ locationId?: string;
4499
+ }) => Promise<any>;
4500
+ get: (deviceId: string) => Promise<any>;
4501
+ update: (deviceId: string, request: {
4502
+ name?: string;
4503
+ locationId?: any;
4504
+ }) => Promise<any>;
4505
+ delete: (deviceId: string) => Promise<any>;
4506
+ revoke: (deviceId: string) => Promise<any>;
4507
+ assignRoles: (deviceId: string, request: {
4508
+ accountRoles: {
4509
+ accountId: string;
4510
+ roleId: string;
4511
+ }[];
4512
+ }) => Promise<any>;
4513
+ rotateCredential: (deviceId: string, request: {
4514
+ graceSeconds?: number;
4515
+ }) => Promise<any>;
4516
+ dispatchCommand: (deviceId: string, request: {
4517
+ type: string;
4518
+ payload?: Record<string, any>;
4519
+ peripheralId?: string;
4520
+ idempotencyKey?: string;
4521
+ }) => Promise<any>;
4522
+ listCommands: (deviceId: string) => Promise<any>;
4523
+ getCommand: (commandId: string) => Promise<any>;
4524
+ listEvents: (deviceId: string) => Promise<any>;
4525
+ mintLocalToken: (deviceId: string, request: {
4526
+ allowedCommandTypes?: string[];
4527
+ ttlSeconds?: number;
4528
+ accountIds?: string[];
4529
+ }) => Promise<any>;
4530
+ };
4531
+ locations: {
4532
+ create: (request: {
4533
+ accountId: string;
4534
+ name: string;
4535
+ description?: string;
4536
+ }) => Promise<any>;
4537
+ list: () => Promise<any>;
4538
+ get: (locationId: string) => Promise<any>;
4539
+ update: (locationId: string, request: {
4540
+ name?: string;
4541
+ description?: any;
4542
+ }) => Promise<any>;
4543
+ delete: (locationId: string) => Promise<any>;
4544
+ };
4545
+ reports: {
4546
+ summary: (options?: {
4547
+ eventId?: string;
4548
+ from?: string;
4549
+ to?: string;
4550
+ }) => Promise<{
4551
+ status: "success";
4552
+ data: {
4553
+ currencies: components["schemas"]["ReportCurrencyTotals"][];
4554
+ filters: {
4555
+ eventId?: string;
4556
+ from?: string;
4557
+ to?: string;
4558
+ };
4559
+ };
4560
+ }>;
4561
+ timeseries: (options?: {
4562
+ eventId?: string;
4563
+ from?: string;
4564
+ to?: string;
4565
+ granularity?: "day" | "week" | "month";
4566
+ }) => Promise<{
4567
+ status: "success";
4568
+ data: {
4569
+ series: {
4570
+ date: string | null;
4571
+ currency: string | null;
4572
+ grossRevenue: number;
4573
+ ticketsSold: number;
4574
+ }[];
4575
+ granularity: string;
4576
+ filters: {
4577
+ [key: string]: unknown;
4578
+ };
4579
+ };
4580
+ }>;
4581
+ inventory: (options?: {
4582
+ eventId?: string;
4583
+ }) => Promise<{
4584
+ status: "success";
4585
+ data: {
4586
+ occurrences: {
4587
+ eventId: string | null;
4588
+ occurrenceId: string | null;
4589
+ totalCapacity: number;
4590
+ available: number;
4591
+ reserved: number;
4592
+ confirmed: number;
4593
+ held: number;
4594
+ sellThroughPct: number;
4595
+ utilisationPct: number;
4596
+ }[];
4597
+ filters: {
4598
+ [key: string]: unknown;
4599
+ };
4600
+ };
4601
+ }>;
4602
+ meta: () => Promise<{
4603
+ status: "success";
4604
+ data: {
4605
+ models: {
4606
+ [key: string]: unknown;
4607
+ }[];
4608
+ };
4609
+ }>;
4610
+ query: (request: {
4611
+ query: {
4612
+ measures?: string[];
4613
+ dimensions?: string[];
4614
+ timeDimensions?: ({
4615
+ dimension: string;
4616
+ granularity?: "hour" | "day" | "week" | "month" | "quarter" | "year";
4617
+ dateRange?: any;
4618
+ })[];
4619
+ filters?: {
4620
+ member: string;
4621
+ operator: string;
4622
+ values?: string[];
4623
+ }[];
4624
+ segments?: string[];
4625
+ order?: any;
4626
+ limit?: number;
4627
+ offset?: number;
4628
+ timezone?: string;
4629
+ };
4630
+ }) => Promise<{
4631
+ status: "success";
4632
+ data: {
4633
+ rows: {
4634
+ [key: string]: unknown;
4635
+ }[];
4636
+ query: {
4637
+ [key: string]: unknown;
4638
+ };
4639
+ };
4640
+ }>;
4641
+ savedList: (options?: {
4642
+ accountId?: string;
4643
+ }) => Promise<{
4644
+ status: "success";
4645
+ data: {
4646
+ reports: components["schemas"]["SavedReport"][];
4647
+ };
4648
+ }>;
4649
+ savedCreate: (request: {
4650
+ name: string;
4651
+ description?: string;
4652
+ accountId?: string;
4653
+ query: {
4654
+ measures?: string[];
4655
+ dimensions?: string[];
4656
+ timeDimensions?: ({
4657
+ dimension: string;
4658
+ granularity?: "hour" | "day" | "week" | "month" | "quarter" | "year";
4659
+ dateRange?: any;
4660
+ })[];
4661
+ filters?: {
4662
+ member: string;
4663
+ operator: string;
4664
+ values?: string[];
4665
+ }[];
4666
+ segments?: string[];
4667
+ order?: any;
4668
+ limit?: number;
4669
+ offset?: number;
4670
+ timezone?: string;
4671
+ };
4672
+ params?: ({
4673
+ kind: "timeRange" | "groupBy" | "filter" | "compare";
4674
+ member?: string;
4675
+ label?: string;
4676
+ allowed?: string[];
4677
+ })[];
4678
+ viz?: {
4679
+ type: "table" | "line" | "bar" | "area" | "pie" | "kpi";
4680
+ x?: string;
4681
+ y?: any;
4682
+ series?: string;
4683
+ };
4684
+ }) => Promise<{
4685
+ status: "success";
4686
+ data: {
4687
+ report: components["schemas"]["SavedReport"];
4688
+ };
4689
+ }>;
4690
+ savedGet: (id: string) => Promise<{
4691
+ status: "success";
4692
+ data: {
4693
+ report: components["schemas"]["SavedReport"];
4694
+ };
4695
+ }>;
4696
+ savedUpdate: (id: string, request: {
4697
+ name?: string;
4698
+ description?: string;
4699
+ accountId?: string;
4700
+ query?: {
4701
+ measures?: string[];
4702
+ dimensions?: string[];
4703
+ timeDimensions?: ({
4704
+ dimension: string;
4705
+ granularity?: "hour" | "day" | "week" | "month" | "quarter" | "year";
4706
+ dateRange?: any;
4707
+ })[];
4708
+ filters?: {
4709
+ member: string;
4710
+ operator: string;
4711
+ values?: string[];
4712
+ }[];
4713
+ segments?: string[];
4714
+ order?: any;
4715
+ limit?: number;
4716
+ offset?: number;
4717
+ timezone?: string;
4718
+ };
4719
+ params?: ({
4720
+ kind: "timeRange" | "groupBy" | "filter" | "compare";
4721
+ member?: string;
4722
+ label?: string;
4723
+ allowed?: string[];
4724
+ })[];
4725
+ viz?: {
4726
+ type: "table" | "line" | "bar" | "area" | "pie" | "kpi";
4727
+ x?: string;
4728
+ y?: any;
4729
+ series?: string;
4730
+ };
4731
+ }) => Promise<{
4732
+ status: "success";
4733
+ data: {
4734
+ report: components["schemas"]["SavedReport"];
4735
+ };
4736
+ }>;
4737
+ savedDelete: (id: string) => Promise<{
4738
+ status: "success";
4739
+ data: {
4740
+ deleted: boolean;
4741
+ };
4742
+ }>;
4743
+ savedRun: (id: string, request: {
4744
+ overrides?: {
4745
+ measures?: string[];
4746
+ dimensions?: string[];
4747
+ timeDimensions?: ({
4748
+ dimension: string;
4749
+ granularity?: "hour" | "day" | "week" | "month" | "quarter" | "year";
4750
+ dateRange?: any;
4751
+ })[];
4752
+ filters?: {
4753
+ member: string;
4754
+ operator: string;
4755
+ values?: string[];
4756
+ }[];
4757
+ segments?: string[];
4758
+ order?: any;
4759
+ limit?: number;
4760
+ offset?: number;
4761
+ timezone?: string;
4762
+ };
4763
+ }) => Promise<{
4764
+ status: "success";
4765
+ data: {
4766
+ rows: {
4767
+ [key: string]: unknown;
4768
+ }[];
4769
+ query: {
4770
+ [key: string]: unknown;
4771
+ };
4772
+ };
4773
+ }>;
4774
+ dashboardList: (options?: {
4775
+ accountId?: string;
4776
+ }) => Promise<{
4777
+ status: "success";
4778
+ data: {
4779
+ dashboards: components["schemas"]["Dashboard"][];
4780
+ };
4781
+ }>;
4782
+ dashboardCreate: (request: {
4783
+ name: string;
4784
+ description?: string;
4785
+ accountId?: string;
4786
+ layout?: ({
4787
+ tileId: string;
4788
+ title?: string;
4789
+ reportId?: string;
4790
+ query?: {
4791
+ measures?: string[];
4792
+ dimensions?: string[];
4793
+ timeDimensions?: ({
4794
+ dimension: string;
4795
+ granularity?: "hour" | "day" | "week" | "month" | "quarter" | "year";
4796
+ dateRange?: any;
4797
+ })[];
4798
+ filters?: {
4799
+ member: string;
4800
+ operator: string;
4801
+ values?: string[];
4802
+ }[];
4803
+ segments?: string[];
4804
+ order?: any;
4805
+ limit?: number;
4806
+ offset?: number;
4807
+ timezone?: string;
4808
+ };
4809
+ viz?: {
4810
+ type: "table" | "line" | "bar" | "area" | "pie" | "kpi";
4811
+ x?: string;
4812
+ y?: any;
4813
+ series?: string;
4814
+ };
4815
+ x: number;
4816
+ y: number;
4817
+ w: number;
4818
+ h: number;
4819
+ })[];
4820
+ globalFilters?: ({
4821
+ key: string;
4822
+ label: string;
4823
+ control: "dateRange" | "select" | "multiselect";
4824
+ member?: string;
4825
+ members?: Record<string, any>;
4826
+ default?: any;
4827
+ })[];
4828
+ }) => Promise<{
4829
+ status: "success";
4830
+ data: {
4831
+ dashboard: components["schemas"]["Dashboard"];
4832
+ };
4833
+ }>;
4834
+ dashboardGet: (id: string) => Promise<{
4835
+ status: "success";
4836
+ data: {
4837
+ dashboard: components["schemas"]["Dashboard"];
4838
+ };
4839
+ }>;
4840
+ dashboardUpdate: (id: string, request: {
4841
+ name?: string;
4842
+ description?: string;
4843
+ accountId?: string;
4844
+ layout?: ({
4845
+ tileId: string;
4846
+ title?: string;
4847
+ reportId?: string;
4848
+ query?: {
4849
+ measures?: string[];
4850
+ dimensions?: string[];
4851
+ timeDimensions?: ({
4852
+ dimension: string;
4853
+ granularity?: "hour" | "day" | "week" | "month" | "quarter" | "year";
4854
+ dateRange?: any;
4855
+ })[];
4856
+ filters?: {
4857
+ member: string;
4858
+ operator: string;
4859
+ values?: string[];
4860
+ }[];
4861
+ segments?: string[];
4862
+ order?: any;
4863
+ limit?: number;
4864
+ offset?: number;
4865
+ timezone?: string;
4866
+ };
4867
+ viz?: {
4868
+ type: "table" | "line" | "bar" | "area" | "pie" | "kpi";
4869
+ x?: string;
4870
+ y?: any;
4871
+ series?: string;
4872
+ };
4873
+ x: number;
4874
+ y: number;
4875
+ w: number;
4876
+ h: number;
4877
+ })[];
4878
+ globalFilters?: ({
4879
+ key: string;
4880
+ label: string;
4881
+ control: "dateRange" | "select" | "multiselect";
4882
+ member?: string;
4883
+ members?: Record<string, any>;
4884
+ default?: any;
4885
+ })[];
4886
+ }) => Promise<{
4887
+ status: "success";
4888
+ data: {
4889
+ dashboard: components["schemas"]["Dashboard"];
4890
+ };
4891
+ }>;
4892
+ dashboardDelete: (id: string) => Promise<{
4893
+ status: "success";
4894
+ data: {
4895
+ deleted: boolean;
4896
+ };
4897
+ }>;
4898
+ templateList: () => Promise<{
4899
+ status: "success";
4900
+ data: {
4901
+ templates: {
4902
+ key: string;
4903
+ name: string;
4904
+ description: string;
4905
+ tileCount: number;
4906
+ }[];
4907
+ };
4908
+ }>;
4909
+ templateInstall: (key: string) => Promise<{
4910
+ status: "success";
4911
+ data: {
4912
+ dashboard: components["schemas"]["Dashboard"];
4913
+ };
4914
+ }>;
4915
+ };
4916
+ webhookEndpoints: {
4917
+ create: (request: CreateWebhookEndpoint) => Promise<any>;
4918
+ list: (options?: {
4919
+ accountId?: string;
4920
+ }) => Promise<any>;
4921
+ get: (endpointId: string) => Promise<any>;
4922
+ update: (endpointId: string, request: UpdateWebhookEndpoint) => Promise<any>;
4923
+ delete: (endpointId: string) => Promise<any>;
4924
+ test: (endpointId: string) => Promise<any>;
4925
+ };
4926
+ webhookEventTypes: {
4927
+ list: () => Promise<any>;
4928
+ };
4929
+ webhookDeliveries: {
4930
+ listInbound: () => Promise<any>;
4931
+ list: (options?: {
4932
+ endpointId?: string;
4933
+ limit?: number;
4934
+ }) => Promise<any>;
4935
+ get: (deliveryId: string) => Promise<any>;
4936
+ };
4937
+ integrations: {
4938
+ list: () => Promise<any>;
4939
+ listConnectedApps: () => Promise<any>;
4940
+ get: (id: string) => Promise<any>;
4941
+ revokeConnection: (id: string) => Promise<any>;
4942
+ };
4943
+ }
4944
+ export {};
4945
+ //# sourceMappingURL=client.d.ts.map