@matchi/api 0.20231006.2

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,1756 @@
1
+ type ApiRequestOptions = {
2
+ readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
3
+ readonly url: string;
4
+ readonly path?: Record<string, any>;
5
+ readonly cookies?: Record<string, any>;
6
+ readonly headers?: Record<string, any>;
7
+ readonly query?: Record<string, any>;
8
+ readonly formData?: Record<string, any>;
9
+ readonly body?: any;
10
+ readonly mediaType?: string;
11
+ readonly responseHeader?: string;
12
+ readonly errors?: Record<number, string>;
13
+ };
14
+
15
+ type ApiResult = {
16
+ readonly url: string;
17
+ readonly ok: boolean;
18
+ readonly status: number;
19
+ readonly statusText: string;
20
+ readonly body: any;
21
+ };
22
+
23
+ declare class ApiError extends Error {
24
+ readonly url: string;
25
+ readonly status: number;
26
+ readonly statusText: string;
27
+ readonly body: any;
28
+ readonly request: ApiRequestOptions;
29
+ constructor(request: ApiRequestOptions, response: ApiResult, message: string);
30
+ }
31
+
32
+ declare class CancelError extends Error {
33
+ constructor(message: string);
34
+ get isCancelled(): boolean;
35
+ }
36
+ interface OnCancel {
37
+ readonly isResolved: boolean;
38
+ readonly isRejected: boolean;
39
+ readonly isCancelled: boolean;
40
+ (cancelHandler: () => void): void;
41
+ }
42
+ declare class CancelablePromise<T> implements Promise<T> {
43
+ #private;
44
+ constructor(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void, onCancel: OnCancel) => void);
45
+ get [Symbol.toStringTag](): string;
46
+ then<TResult1 = T, TResult2 = never>(onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
47
+ catch<TResult = never>(onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>;
48
+ finally(onFinally?: (() => void) | null): Promise<T>;
49
+ cancel(): void;
50
+ get isCancelled(): boolean;
51
+ }
52
+
53
+ type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
54
+ type Headers = Record<string, string>;
55
+ type OpenAPIConfig = {
56
+ BASE: string;
57
+ VERSION: string;
58
+ WITH_CREDENTIALS: boolean;
59
+ CREDENTIALS: 'include' | 'omit' | 'same-origin';
60
+ TOKEN?: string | Resolver<string> | undefined;
61
+ USERNAME?: string | Resolver<string> | undefined;
62
+ PASSWORD?: string | Resolver<string> | undefined;
63
+ HEADERS?: Headers | Resolver<Headers> | undefined;
64
+ ENCODE_PATH?: ((path: string) => string) | undefined;
65
+ };
66
+ declare const OpenAPI: OpenAPIConfig;
67
+
68
+ type ActivityEvent = {
69
+ name: string;
70
+ supportedBy: string;
71
+ };
72
+
73
+ type ExternalServiceProperty = {
74
+ name: string;
75
+ link?: string;
76
+ logoUrl?: string;
77
+ config: Array<Record<string, string>>;
78
+ };
79
+
80
+ type OccasionCourt = {
81
+ id: number;
82
+ name: string;
83
+ };
84
+
85
+ type participants = {
86
+ booked: number;
87
+ max: number;
88
+ userIds?: Array<string>;
89
+ };
90
+
91
+ type OrderSplitPrice = {
92
+ reservationSum?: string;
93
+ totalOrderPrice?: string;
94
+ currency?: string;
95
+ };
96
+
97
+ type price = {
98
+ currency?: string;
99
+ amount: string;
100
+ vat?: string;
101
+ orderSplitPrice?: OrderSplitPrice;
102
+ };
103
+
104
+ type timeStamp = string;
105
+
106
+ type activityOccasion = {
107
+ id: number;
108
+ startTime: timeStamp;
109
+ endTime: timeStamp;
110
+ activityId: number;
111
+ description: string;
112
+ membersOnly: boolean;
113
+ participants: participants;
114
+ price: price;
115
+ courts: Array<OccasionCourt>;
116
+ activityType?: string;
117
+ activityEvent?: ActivityEvent;
118
+ externalServiceProperties: Array<ExternalServiceProperty>;
119
+ };
120
+
121
+ type levelRange = {
122
+ min?: number;
123
+ max?: number;
124
+ };
125
+
126
+ type activity = {
127
+ id: number;
128
+ name: string;
129
+ description?: string;
130
+ category?: string;
131
+ terms?: string;
132
+ facilityId: number;
133
+ level: levelRange;
134
+ pictureUrl?: string;
135
+ startDate?: string;
136
+ membersOnly?: boolean;
137
+ occasions: Array<activityOccasion>;
138
+ activityType?: string;
139
+ activityEvent?: ActivityEvent;
140
+ externalServiceProperties: Array<ExternalServiceProperty>;
141
+ };
142
+
143
+ type resultSet = {
144
+ offset: number;
145
+ limit: number;
146
+ moreResults: boolean;
147
+ };
148
+
149
+ type activitiesResponse = {
150
+ resultSet: resultSet;
151
+ items: Array<activity>;
152
+ };
153
+
154
+ type activityType = string;
155
+
156
+ type actor = {
157
+ /**
158
+ * Identifies the initiator of a request in a client system, used for logging and audit
159
+ */
160
+ initiator: string;
161
+ /**
162
+ * Identifies a client system, used for logging and audit
163
+ */
164
+ systemIdentifier: string;
165
+ };
166
+
167
+ type address = {
168
+ streetAddress?: string;
169
+ postalCode?: string;
170
+ city?: string;
171
+ countryCode?: string;
172
+ };
173
+
174
+ /**
175
+ * If the participant is not a user, we will pass an interimId instead of userId
176
+ */
177
+ type occasionParticipant = {
178
+ userId?: string;
179
+ firstname?: string;
180
+ lastname?: string;
181
+ profileImageUrl?: string;
182
+ interimId?: string;
183
+ };
184
+
185
+ type AdminOccasionDetails = {
186
+ id: number;
187
+ activityId: number;
188
+ maxNumParticipants: number;
189
+ minNumParticipants?: number;
190
+ standardPrice: number;
191
+ currency: string;
192
+ message?: string;
193
+ startTime: timeStamp;
194
+ endTime: timeStamp;
195
+ courts: Array<OccasionCourt>;
196
+ occasionParticipants: Array<occasionParticipant>;
197
+ type?: string;
198
+ event?: ActivityEvent;
199
+ externalServiceProperties: Array<ExternalServiceProperty>;
200
+ };
201
+
202
+ declare enum clientType {
203
+ WIDGET = "WIDGET",
204
+ API = "API"
205
+ }
206
+
207
+ type usagePlan = {
208
+ quotaLimit: number;
209
+ /**
210
+ * We currently only support dayily quota period.
211
+ */
212
+ quotaPeriod: string;
213
+ throttleRateLimit: number;
214
+ throttleBurstLimit: number;
215
+ };
216
+
217
+ type apiClientInput = {
218
+ displayName: string;
219
+ clientID: string;
220
+ clientType?: clientType;
221
+ redirectURIs: Array<string>;
222
+ enabled: boolean;
223
+ usagePlan?: usagePlan;
224
+ termsOfServiceURL: string;
225
+ defaultClientScopes?: Array<string>;
226
+ /**
227
+ * Users should concent the client to read it's MATCHi usser. This must be true for all third party clients, but false for MATCHi clients. (Including widget clients).
228
+ */
229
+ consentRequired?: boolean;
230
+ loginTheme?: string;
231
+ };
232
+
233
+ type apiClient = (apiClientInput & {
234
+ createdBy?: string;
235
+ createdAt?: string;
236
+ lastUpdatedAt?: string;
237
+ apiKey: string;
238
+ });
239
+
240
+ type apiClientListResponse = Array<apiClient>;
241
+
242
+ type cancellationPolicy = {
243
+ policy: string;
244
+ automaticCancellationPolicy?: string;
245
+ locale: string;
246
+ refundableHoursInAdvance: number;
247
+ itemType: cancellationPolicy.itemType;
248
+ itemId: string;
249
+ fee?: price;
250
+ paymentMethod: string;
251
+ };
252
+ declare namespace cancellationPolicy {
253
+ enum itemType {
254
+ AVAILABILITY = "AVAILABILITY",
255
+ OCCASION = "OCCASION"
256
+ }
257
+ }
258
+
259
+ type articleMetadata = {
260
+ facility?: string;
261
+ resource?: string;
262
+ startTime?: timeStamp;
263
+ endTime?: timeStamp;
264
+ terms?: string;
265
+ cancellationPolicy?: cancellationPolicy;
266
+ imageUrl?: string;
267
+ };
268
+
269
+ type paymentInterval = {
270
+ timeUnit: string;
271
+ interval: number;
272
+ };
273
+
274
+ type article = {
275
+ description: string;
276
+ type: string;
277
+ price: price;
278
+ priceBase?: price;
279
+ metadata: articleMetadata;
280
+ paymentInterval?: paymentInterval;
281
+ };
282
+
283
+ type availability = {
284
+ startDateTime: timeStamp;
285
+ endDateTime: timeStamp;
286
+ type?: string;
287
+ resourceId: number;
288
+ price: price;
289
+ };
290
+
291
+ declare enum bookingSubType {
292
+ BOOKING = "booking",
293
+ ACTIVITY = "activity",
294
+ SPLIT = "split",
295
+ SPLIT_MAIN = "split_main",
296
+ SPLIT_INVITE = "split_invite"
297
+ }
298
+
299
+ type booking = {
300
+ id: number;
301
+ description: string;
302
+ startTime: timeStamp;
303
+ endTime: timeStamp;
304
+ facilityId: number;
305
+ resourceId?: number;
306
+ entryCode?: string;
307
+ resourceType?: string;
308
+ type: string;
309
+ subType?: bookingSubType;
310
+ paymentId: number;
311
+ };
312
+
313
+ type bookingsResponse = {
314
+ resultSet: resultSet;
315
+ items: Array<booking>;
316
+ };
317
+
318
+ type camera = {
319
+ id?: number;
320
+ name?: string;
321
+ };
322
+
323
+ type giftCard = {
324
+ method?: string;
325
+ id?: number;
326
+ name: string;
327
+ amountOriginal: string;
328
+ currency: string;
329
+ amount: string;
330
+ };
331
+
332
+ type coupon = {
333
+ method?: string;
334
+ id?: number;
335
+ name: string;
336
+ unlimited: boolean;
337
+ punchesOriginal?: string;
338
+ punches?: string;
339
+ };
340
+
341
+ type paymentMethods = {
342
+ giftCards: Array<giftCard>;
343
+ coupons: Array<coupon>;
344
+ };
345
+
346
+ type promoCodeOutcome = {
347
+ promoCode: string;
348
+ status: string;
349
+ amount: string;
350
+ };
351
+
352
+ type valueCardOutcome = {
353
+ amount: number;
354
+ valueCard: giftCard;
355
+ };
356
+
357
+ type checkoutResponse = {
358
+ facilityName: string;
359
+ facilityOrgNr?: string;
360
+ /**
361
+ * A timezone in the Area/Location format of the IANA timezone database
362
+ */
363
+ facilityTimeZone?: string;
364
+ facilityLegalEntityName?: string;
365
+ facilityPrivacyPolicyUrl?: string;
366
+ facilityAddress?: string;
367
+ facilityImageUrl?: string;
368
+ price?: price;
369
+ priceBase?: price;
370
+ articles: Array<article>;
371
+ isFree: boolean;
372
+ paymentMethods: paymentMethods;
373
+ valueCards: Array<giftCard>;
374
+ promoCodeOutcomes: Array<promoCodeOutcome>;
375
+ valueCardOutcomes: Array<valueCardOutcome>;
376
+ orderId: number;
377
+ orderStatus: string;
378
+ canUsePromoCode?: boolean;
379
+ };
380
+
381
+ type configurationEntry = {
382
+ translation: string;
383
+ sortOrder: number;
384
+ };
385
+
386
+ type configurationMap = {
387
+ map: Record<string, configurationEntry>;
388
+ };
389
+
390
+ type configurationResource = {
391
+ RESOURCE?: configurationMap;
392
+ LOCATION?: configurationMap;
393
+ SURFACE?: configurationMap;
394
+ SIZE?: Record<string, configurationMap>;
395
+ RESTRICTIONS?: configurationMap;
396
+ };
397
+
398
+ type facilityConfiguration = {
399
+ urls: Record<string, configurationEntry>;
400
+ socials: Record<string, configurationEntry>;
401
+ contacts: Record<string, configurationEntry>;
402
+ addresses: Record<string, configurationEntry>;
403
+ openingHours: Record<string, configurationEntry>;
404
+ };
405
+
406
+ type config = {
407
+ resource: configurationResource;
408
+ activity: Record<string, configurationEntry>;
409
+ facility: facilityConfiguration;
410
+ payment: Record<string, configurationEntry>;
411
+ category?: Record<string, string>;
412
+ };
413
+
414
+ type configuration = {
415
+ locale?: string;
416
+ config?: config;
417
+ };
418
+
419
+ type createBookingEventExternal = {
420
+ id: number;
421
+ startTime: timeStamp;
422
+ endTime: timeStamp;
423
+ facilityId: number;
424
+ resourceId: number;
425
+ entryCode?: string;
426
+ resourceType?: string;
427
+ type: string;
428
+ paymentId: number;
429
+ };
430
+
431
+ type createPromoCode = {
432
+ /**
433
+ * Between 3 and 40 characters, should not contain leading or trailing whitespace
434
+ */
435
+ code: string;
436
+ /**
437
+ * Between 1 and 100 characters, should not contain leading or trailing whitespace
438
+ */
439
+ name: string;
440
+ facilityId: number;
441
+ startDate: string;
442
+ endDate: string;
443
+ maxNumberOfUsages?: number;
444
+ maxNumberOfUsagesPerCustomer?: number;
445
+ /**
446
+ * A value, in your facility's currency
447
+ */
448
+ discountAmount?: number;
449
+ discountPercent?: number;
450
+ /**
451
+ * To differentiate which client did what, you sign your promo code creation with a name that means something to you. You might be able to filter on this name later on.
452
+ */
453
+ signature: string;
454
+ };
455
+
456
+ type dailyQuota = {
457
+ date?: string;
458
+ usedQuota?: number;
459
+ remainingQuota?: number;
460
+ };
461
+
462
+ type hours = {
463
+ open: string;
464
+ close: string;
465
+ };
466
+
467
+ type days = {
468
+ weekday?: string;
469
+ hours: Array<hours>;
470
+ };
471
+
472
+ type deleteBookingEventExternal = {
473
+ id: number;
474
+ startTime: timeStamp;
475
+ endTime: timeStamp;
476
+ facilityId: number;
477
+ resourceId: number;
478
+ };
479
+
480
+ type Error$1 = {
481
+ code: string;
482
+ message: string;
483
+ };
484
+
485
+ type exposeOccasions = boolean;
486
+
487
+ type position = {
488
+ latitude: number;
489
+ longitude: number;
490
+ };
491
+
492
+ type facility = {
493
+ id: number;
494
+ name: string;
495
+ logoUrl: string;
496
+ address: address;
497
+ position: position;
498
+ resourceTypes: Array<string>;
499
+ };
500
+
501
+ type facilitiesResponse = {
502
+ resultSet: resultSet;
503
+ items: Array<facility>;
504
+ };
505
+
506
+ type openingHours = {
507
+ type: string;
508
+ days: Array<days>;
509
+ };
510
+
511
+ type facilityDetails = {
512
+ id?: number;
513
+ name?: string;
514
+ timeZone?: string;
515
+ currency?: string;
516
+ description?: string;
517
+ position?: position;
518
+ addresses?: Record<string, address>;
519
+ openingHours?: Record<string, openingHours>;
520
+ urls?: Record<string, string>;
521
+ socials?: Record<string, string>;
522
+ contacts?: Record<string, string>;
523
+ resources?: Array<string>;
524
+ resourceTypes?: Array<string>;
525
+ multiplePlayersNumber?: Record<string, number>;
526
+ /**
527
+ * Temporary property, will be removed in future
528
+ */
529
+ mergedSlots?: boolean;
530
+ };
531
+
532
+ type friendRelationResponse = {
533
+ /**
534
+ * A string describing the friend relation, e.g.:
535
+ *
536
+ * friends
537
+ * outgoing
538
+ * incoming
539
+ * noRelation
540
+ *
541
+ */
542
+ status: string;
543
+ /**
544
+ * If the user is connectable, you may try to connect to it, otherwise you cannot
545
+ */
546
+ isConnectable: boolean;
547
+ };
548
+
549
+ /**
550
+ * User ID
551
+ */
552
+ type userId = string;
553
+
554
+ type friendRelationsResponse = {
555
+ resultSet: resultSet;
556
+ items: Array<userId>;
557
+ };
558
+
559
+ type hideFullyBooked = boolean;
560
+
561
+ type internalPaymentMethod = {
562
+ method: string;
563
+ id?: number;
564
+ };
565
+
566
+ /**
567
+ * Maximum number of items to return.
568
+ */
569
+ type limitParam = number;
570
+
571
+ type membershipRequestItem = {
572
+ membershipTypeId: number;
573
+ firstname: string;
574
+ lastname: string;
575
+ email: string;
576
+ /**
577
+ * Preferably a mobile phone number to be able to receive sms as notification
578
+ */
579
+ telephone: string;
580
+ address: string;
581
+ zipcode: string;
582
+ city: string;
583
+ /**
584
+ * 2-letter format, https://en.wikipedia.org/wiki/ISO_3166-2
585
+ */
586
+ country: string;
587
+ birthdate: string;
588
+ securityNumber?: string;
589
+ /**
590
+ * Gender (MALE/FEMALE) or ORGANIZATION
591
+ */
592
+ memberType?: string;
593
+ };
594
+
595
+ type paymentType = {
596
+ method: string;
597
+ id?: string;
598
+ name?: string;
599
+ amount?: string;
600
+ unlimited?: boolean;
601
+ returnUrl?: string;
602
+ };
603
+
604
+ type membershipRequest = {
605
+ /**
606
+ * Message to the club
607
+ */
608
+ message?: string;
609
+ /**
610
+ * Accept the terms
611
+ */
612
+ acceptTerms: boolean;
613
+ /**
614
+ * The local facility at which the membership should belong.
615
+ */
616
+ facilityId: number;
617
+ payment: paymentType;
618
+ /**
619
+ * List of membership applications, more than one if family membership request
620
+ */
621
+ items: Array<membershipRequestItem>;
622
+ };
623
+
624
+ type monthlyUsage = {
625
+ clientID?: string;
626
+ apiKey?: string;
627
+ quotaLimit?: number;
628
+ /**
629
+ * We currently only support dayily quota period.
630
+ */
631
+ quotaPeriod?: string;
632
+ startDate?: string;
633
+ endDate?: string;
634
+ monthlyQuotaUsage?: number;
635
+ dailyQuotas?: Array<dailyQuota>;
636
+ };
637
+
638
+ declare enum months {
639
+ JANUARY = "January",
640
+ FEBRUARY = "February",
641
+ MARCH = "March",
642
+ APRIL = "April",
643
+ MAY = "May",
644
+ JUNE = "June",
645
+ JULY = "July",
646
+ AUGUST = "August",
647
+ SEPTEMBER = "September",
648
+ OCTOBER = "October",
649
+ NOVEMBER = "November",
650
+ DECEMBER = "December"
651
+ }
652
+
653
+ type occasionBooking = {
654
+ id: number;
655
+ entryCode?: string;
656
+ activityOccasion: activityOccasion;
657
+ paymentId: number;
658
+ };
659
+
660
+ /**
661
+ * Number of items to skip before returning the results.
662
+ */
663
+ type offsetParam = number;
664
+
665
+ type order = {
666
+ id: string;
667
+ method: string;
668
+ orderStatus: string;
669
+ status: string;
670
+ };
671
+
672
+ type payment = {
673
+ id: number;
674
+ created: string;
675
+ status: string;
676
+ amount: string;
677
+ vat: string;
678
+ currency: string;
679
+ method: string;
680
+ description: string;
681
+ };
682
+
683
+ type paymentDetails = {
684
+ id: number;
685
+ /**
686
+ * Datetime when order is created
687
+ */
688
+ created: string;
689
+ /**
690
+ * OK if good
691
+ */
692
+ status: string;
693
+ /**
694
+ * Confirmed by payment provider
695
+ */
696
+ confirmed: string;
697
+ /**
698
+ * If annulled, the datetime when it happened
699
+ */
700
+ annulled: string;
701
+ /**
702
+ * If reversed, the datetime when it happened
703
+ */
704
+ reversed: string;
705
+ /**
706
+ * Total price of order
707
+ */
708
+ amount: string;
709
+ vat: string;
710
+ /**
711
+ * 3 letter currency, see https://en.wikipedia.org/wiki/ISO_4217
712
+ */
713
+ currency: string;
714
+ /**
715
+ * Article type
716
+ */
717
+ type: string;
718
+ /**
719
+ * First payment method
720
+ */
721
+ method: string;
722
+ /**
723
+ * Order description
724
+ */
725
+ description: string;
726
+ receiptUrl: string;
727
+ checkoutSessionId?: string;
728
+ checkoutSessionData?: string;
729
+ checkoutToken?: string;
730
+ checkoutUrl?: string;
731
+ bookingId?: number;
732
+ skipCheckout: boolean;
733
+ };
734
+
735
+ type paymentInfo = {
736
+ id?: number;
737
+ number?: string;
738
+ issuer?: string;
739
+ expiryMonth?: string;
740
+ expiryYear?: string;
741
+ holderName?: string;
742
+ recurringDetailReference?: string;
743
+ };
744
+
745
+ type paymentsResponse = {
746
+ resultSet: resultSet;
747
+ items: Array<payment>;
748
+ };
749
+
750
+ type pendingPayment = {
751
+ price: string;
752
+ vat: string;
753
+ currency: string;
754
+ type: string;
755
+ startDateTime: string;
756
+ description: string;
757
+ paylaterUrl: string;
758
+ };
759
+
760
+ type playingUserResponse = {
761
+ userId: string;
762
+ /**
763
+ * Booking status.
764
+ * * `PAID`
765
+ * * `INVITED` - Reserved spot, waiting for response.
766
+ * * `JOINED` - Accepted but unpaid spot.
767
+ * * `BOOKER` - The one responsible for the main order. Cannot be removed by anyone.
768
+ *
769
+ */
770
+ status: playingUserResponse.status;
771
+ };
772
+ declare namespace playingUserResponse {
773
+ /**
774
+ * Booking status.
775
+ * * `PAID`
776
+ * * `INVITED` - Reserved spot, waiting for response.
777
+ * * `JOINED` - Accepted but unpaid spot.
778
+ * * `BOOKER` - The one responsible for the main order. Cannot be removed by anyone.
779
+ *
780
+ */
781
+ enum status {
782
+ PAID = "PAID",
783
+ INVITED = "INVITED",
784
+ JOINED = "JOINED",
785
+ BOOKER = "BOOKER"
786
+ }
787
+ }
788
+
789
+ type playingUsersResponse = {
790
+ orderSplitPrice?: OrderSplitPrice;
791
+ numberOfSlots: number;
792
+ users: Array<playingUserResponse>;
793
+ };
794
+
795
+ type playSessionBookingPayment = {
796
+ currency?: string;
797
+ amount?: string;
798
+ method: string;
799
+ };
800
+
801
+ type playSessionBooking = {
802
+ bookingId: number;
803
+ startDateTime: timeStamp;
804
+ endDateTime: timeStamp;
805
+ /**
806
+ * ID of the resource that is booked, e.g. a court
807
+ */
808
+ resourceId: number;
809
+ accessCode: string;
810
+ payment: playSessionBookingPayment;
811
+ cancelled: boolean;
812
+ };
813
+
814
+ /**
815
+ * Settings on the play session
816
+ */
817
+ type playSessionSettings = {
818
+ /**
819
+ * Whether the play session is joinable by other users.
820
+ */
821
+ joinable: boolean;
822
+ /**
823
+ * When the number of players on a play session is equal to or greater than than this number, a new player will not be able to join. If the value is "-1", there is no limit to the number of players that can join.
824
+ */
825
+ joinLimitPlayers: number;
826
+ };
827
+
828
+ /**
829
+ * The user is identified with either userId or email
830
+ */
831
+ type playSessionUser = {
832
+ userId?: string;
833
+ email?: string;
834
+ status: string;
835
+ lastUpdated: timeStamp;
836
+ };
837
+
838
+ type playSession = {
839
+ startDateTime: timeStamp;
840
+ endDateTime: timeStamp;
841
+ facilityId: number;
842
+ sessionId: string;
843
+ users: Array<playSessionUser>;
844
+ bookings: Array<playSessionBooking>;
845
+ settings: playSessionSettings;
846
+ url: string;
847
+ splitPayment: boolean;
848
+ };
849
+
850
+ type playSessionResponse = {
851
+ resultSet: resultSet;
852
+ items: Array<playSession>;
853
+ };
854
+
855
+ type priceDetails = {
856
+ availabilities: Array<availability>;
857
+ price: price;
858
+ priceBase: price;
859
+ splitFee?: price;
860
+ numberOfSlots?: number;
861
+ canUsePromoCode: boolean;
862
+ paymentMethods: Array<paymentType>;
863
+ };
864
+
865
+ type priceDetailsActivity = {
866
+ price: price;
867
+ priceBase: price;
868
+ canUsePromoCode: boolean;
869
+ paymentMethods: Array<paymentType>;
870
+ };
871
+
872
+ type profile = {
873
+ address?: address;
874
+ dateOfBirth?: string;
875
+ firstname?: string;
876
+ lastname?: string;
877
+ gender?: string;
878
+ profileImageUrl?: string;
879
+ };
880
+
881
+ type promoCode = {
882
+ id: number;
883
+ code: string;
884
+ name: string;
885
+ facilityId: number;
886
+ startDate: string;
887
+ endDate: string;
888
+ maxNumberOfUsages?: number;
889
+ maxNumberOfUsagesPerCustomer?: number;
890
+ discountAmount?: number;
891
+ discountPercent?: number;
892
+ };
893
+
894
+ type pspSession = {
895
+ pspSessionExpiryTime: timeStamp;
896
+ pspSessionId: string;
897
+ pspSessionData: string;
898
+ enableRecurring: boolean;
899
+ };
900
+
901
+ type resource = {
902
+ id: number;
903
+ name: string;
904
+ description: string;
905
+ facilityId: number;
906
+ type: string;
907
+ category: string;
908
+ restrictions: Array<string>;
909
+ cameras: Array<camera>;
910
+ attributes: Record<string, string>;
911
+ };
912
+
913
+ type userFacility = {
914
+ id: number;
915
+ name: string;
916
+ logoUrl: string;
917
+ };
918
+
919
+ type userInfo = {
920
+ id: number;
921
+ uuid?: string;
922
+ profile: profile;
923
+ email: string;
924
+ address: address;
925
+ phone: string;
926
+ paymentInfo?: paymentInfo;
927
+ };
928
+
929
+ type userPublicProfile = {
930
+ userId?: string;
931
+ firstname?: string;
932
+ lastname?: string;
933
+ profileImageUrl?: string;
934
+ };
935
+
936
+ declare class ActivityServiceV1Service {
937
+ /**
938
+ * M2M request to get occasions with additional customer information of an activity by ID
939
+ * @param activityId ID of the activity
940
+ * @param filter String that can be used to filter the response
941
+ * @param startDate
942
+ * @param endDate
943
+ * @param offset Number of items to skip before returning the results.
944
+ * @param limit Maximum number of items to return.
945
+ * @returns any A list of occasions
946
+ * @throws ApiError
947
+ */
948
+ static getAdminActivityOccasions(activityId: number, filter?: string, startDate?: string, endDate?: string, offset?: number, limit?: number): CancelablePromise<{
949
+ resultSet: resultSet;
950
+ items: Array<AdminOccasionDetails>;
951
+ }>;
952
+ }
953
+
954
+ declare class AnonymousService {
955
+ /**
956
+ * Get list of activities based on filters
957
+ * @param hideFullyBooked
958
+ * @param exposeOccasions
959
+ * @param facilityIds
960
+ * @param level
961
+ * @param locationSearch
962
+ * @param categorySearch
963
+ * @param querySearch
964
+ * @param resourceTypes
965
+ * @param startDate
966
+ * @param endDate
967
+ * @param offset Number of items to skip before returning the results.
968
+ * @param limit Maximum number of items to return.
969
+ * @returns activitiesResponse A list of activities
970
+ * @throws ApiError
971
+ */
972
+ static listActivities(hideFullyBooked?: boolean, exposeOccasions?: boolean, facilityIds?: Array<number>, level?: number, locationSearch?: string, categorySearch?: string, querySearch?: string, resourceTypes?: Array<string>, startDate?: string, endDate?: string, offset?: number, limit?: number): CancelablePromise<activitiesResponse>;
973
+ /**
974
+ * Get details of an activity by ID
975
+ * @param activityId ID of the activity
976
+ * @returns activity Details about the requested activity
977
+ * @throws ApiError
978
+ */
979
+ static getActivity(activityId: number): CancelablePromise<activity>;
980
+ /**
981
+ * Get occasions of an activity by ID
982
+ * @param activityId ID of the activity
983
+ * @param hideFullyBooked
984
+ * @param hidePastOccasions Hide past occasions, Default false
985
+ * @param startDate
986
+ * @param endDate
987
+ * @returns activityOccasion A list of occasions
988
+ * @throws ApiError
989
+ */
990
+ static listActivitiesOccasions(activityId: number, hideFullyBooked?: boolean, hidePastOccasions?: boolean, startDate?: string, endDate?: string): CancelablePromise<Array<activityOccasion>>;
991
+ /**
992
+ * Get details of an occasion by ID
993
+ * @param occasionId ID of the activity occasion
994
+ * @returns activityOccasion Details about the requested activity occasion
995
+ * @throws ApiError
996
+ */
997
+ static getActivityOccasion(occasionId: number): CancelablePromise<activityOccasion>;
998
+ /**
999
+ * M2M request to get occasions with additional customer information of an activity by ID
1000
+ * @param activityId ID of the activity
1001
+ * @param filter String that can be used to filter the response
1002
+ * @param startDate
1003
+ * @param endDate
1004
+ * @param offset Number of items to skip before returning the results.
1005
+ * @param limit Maximum number of items to return.
1006
+ * @returns any A list of occasions
1007
+ * @throws ApiError
1008
+ */
1009
+ static getAdminActivityOccasions(activityId: number, filter?: string, startDate?: string, endDate?: string, offset?: number, limit?: number): CancelablePromise<{
1010
+ resultSet: resultSet;
1011
+ items: Array<AdminOccasionDetails>;
1012
+ }>;
1013
+ /**
1014
+ * Get list of facilities based on filters
1015
+ * @param city Name of city to filter facilities
1016
+ * @param countryCode Country code to filter facilities
1017
+ * @param name Name of facility to filter facilities
1018
+ * @param latitude Position to filter facilities. Use with longitude and radius to filter.
1019
+ * @param longitude Position to filter facilities. Use with latitude and radius to filter.
1020
+ * @param radius Radius from latitude/longitude position in kilometers to filter facilities,
1021
+ * @param resourceTypes Padel, Tennis, etc.
1022
+ * @param offset Number of items to skip before returning the results.
1023
+ * @param limit Maximum number of items to return.
1024
+ * @returns facilitiesResponse A list of facilities filtered according to criteria
1025
+ * @throws ApiError
1026
+ */
1027
+ static listFacilities(city?: string, countryCode?: string, name?: string, latitude?: number, longitude?: number, radius?: number, resourceTypes?: Array<string>, offset?: number, limit?: number): CancelablePromise<facilitiesResponse>;
1028
+ /**
1029
+ * @param facilityId Numeric ID of the facility to get
1030
+ * @returns facilityDetails Details about the requested facility
1031
+ * @throws ApiError
1032
+ */
1033
+ static getFacility(facilityId: number): CancelablePromise<facilityDetails>;
1034
+ /**
1035
+ * @param facilityId Numeric ID of the facility to get resources for
1036
+ * @returns resource List of resources for the requested facility
1037
+ * @throws ApiError
1038
+ */
1039
+ static listResources(facilityId: number): CancelablePromise<Array<resource>>;
1040
+ /**
1041
+ * @param resourceId Numeric ID of the resource to get
1042
+ * @returns resource Details of resource with specified resourceId
1043
+ * @throws ApiError
1044
+ */
1045
+ static getResource(resourceId: number): CancelablePromise<resource>;
1046
+ /**
1047
+ * Get list of availabilities by resource ID
1048
+ * @param resourceId Numeric ID of the resource to get availabilities for
1049
+ * @param startDateTime String start DateTime with TZ for availabilities filter
1050
+ * @param endDateTime String end DateTime with TZ for availabilities filter
1051
+ * @returns availability Availabilities for the requested facility and resource
1052
+ * @throws ApiError
1053
+ */
1054
+ static listAvailabilities(resourceId: number, startDateTime?: timeStamp, endDateTime?: timeStamp): CancelablePromise<Array<availability>>;
1055
+ /**
1056
+ * Get public profile of requested user
1057
+ * @param userId User ID
1058
+ * @returns userPublicProfile The requested user's public profile information
1059
+ * @throws ApiError
1060
+ */
1061
+ static getUserProfile(userId: string): CancelablePromise<userPublicProfile>;
1062
+ /**
1063
+ * Get global configuration values
1064
+ * @param locale locale of the requested configuration
1065
+ * @returns configuration The requested locales configuration
1066
+ * @throws ApiError
1067
+ */
1068
+ static getConfig(locale: string): CancelablePromise<configuration>;
1069
+ /**
1070
+ * Check status of friendship, and if you are able to connect to the user
1071
+ * @param userId User ID
1072
+ * @returns friendRelationResponse Status of friendship, and if you are able to connect to the user
1073
+ * @throws ApiError
1074
+ */
1075
+ static getRelationToFriend(userId: string): CancelablePromise<friendRelationResponse>;
1076
+ }
1077
+
1078
+ declare class ApiClientServiceV1Service {
1079
+ /**
1080
+ * List existing API clients
1081
+ * @param offset Number of items to skip before returning the results.
1082
+ * @param limit Maximum number of items to return.
1083
+ * @returns apiClientListResponse List of API client responses.
1084
+ * @throws ApiError
1085
+ */
1086
+ static getApiClientList(offset?: number, limit?: number): CancelablePromise<apiClientListResponse>;
1087
+ /**
1088
+ * Create a new API client
1089
+ * @param requestBody Input needed to create a new API client
1090
+ * @returns apiClient The succesfully created API client
1091
+ * @throws ApiError
1092
+ */
1093
+ static createApiClient(requestBody: apiClientInput): CancelablePromise<apiClient>;
1094
+ /**
1095
+ * Get details of a API client by id
1096
+ * @param clientId
1097
+ * @returns apiClient Details about the requested API client
1098
+ * @throws ApiError
1099
+ */
1100
+ static getApiClientById(clientId: string): CancelablePromise<apiClient>;
1101
+ /**
1102
+ * Update a existing API client by id
1103
+ * @param clientId
1104
+ * @param requestBody Input needed to update a existing API client
1105
+ * @param regenerateKey
1106
+ * @returns apiClient The succesfully updated API client
1107
+ * @throws ApiError
1108
+ */
1109
+ static updateApiClientById(clientId: string, requestBody: apiClientInput, regenerateKey?: boolean): CancelablePromise<apiClient>;
1110
+ /**
1111
+ * Get api usage details of a API client by id
1112
+ * @param clientId The id of the api client
1113
+ * @param month The month of interest to retrieve usage details about (if omitted defaults to current month)
1114
+ * @returns monthlyUsage Api usage details about the requested API client
1115
+ * @throws ApiError
1116
+ */
1117
+ static getApiClientUsageById(clientId: string, month?: months): CancelablePromise<monthlyUsage>;
1118
+ }
1119
+
1120
+ declare class AuthorizedService {
1121
+ /**
1122
+ * Get price of an occasion by ID
1123
+ * @param occasionId ID of the activity occasion
1124
+ * @param promoCode Promo code that customer wants to apply
1125
+ * @returns priceDetailsActivity Details about the requested activity occasion
1126
+ * @throws ApiError
1127
+ */
1128
+ static getActivityOccasionPrice(occasionId: number, promoCode?: string): CancelablePromise<priceDetailsActivity>;
1129
+ /**
1130
+ * Get cancellation policy of an occasion by ID
1131
+ * @param occasionId The ID of the OCCASION
1132
+ * @param locale locale of the requested policy
1133
+ * @returns cancellationPolicy Cancellation policy details for an occasion
1134
+ * @throws ApiError
1135
+ */
1136
+ static getActivityCancellationPolicy(occasionId: string, locale?: string): CancelablePromise<Array<cancellationPolicy>>;
1137
+ /**
1138
+ * Get availabilities with price for a resource ID
1139
+ * @param resourceId Resource that price is requested for
1140
+ * @param startTime Start time that price is requested for
1141
+ * @param endTime End time that price is requested for
1142
+ * @param promoCode Promo code that customer wants to apply
1143
+ * @param numberOfSlots Number of slots that should be included in the price detail calculation.
1144
+ * @param emails List of player emails that should be included in the price detail calculation.
1145
+ * @param userIds List of player user IDs that should be included in the price detail calculation.
1146
+ * @returns priceDetails Price details for the requested resource in a timespan with available payment methods
1147
+ * @throws ApiError
1148
+ */
1149
+ static getAvailabilityWithPrice(resourceId: string, startTime: timeStamp, endTime: timeStamp, promoCode?: string, numberOfSlots?: number, emails?: Array<string>, userIds?: Array<string>): CancelablePromise<priceDetails>;
1150
+ /**
1151
+ * Get cancellation policy of availabilities by resource ID
1152
+ * @param resourceId The ID of the resource that offers the availability
1153
+ * @param startTime Start time that cancellation policy is requested for
1154
+ * @param endTime End time that cancellation policy is requested for
1155
+ * @param locale locale of the requested policy
1156
+ * @returns cancellationPolicy Cancellation policy details for a resource in a timespan
1157
+ * @throws ApiError
1158
+ */
1159
+ static getCancellationPolicy(resourceId: string, startTime: timeStamp, endTime: timeStamp, locale?: string): CancelablePromise<Array<cancellationPolicy>>;
1160
+ /**
1161
+ * Create a promo code
1162
+ * @param requestBody Input needed to create a promo code
1163
+ * @returns promoCode Promo code created
1164
+ * @throws ApiError
1165
+ */
1166
+ static createPromoCode(requestBody: createPromoCode): CancelablePromise<promoCode>;
1167
+ /**
1168
+ * Get details of currently authorized user
1169
+ * @returns userInfo The requesting user's profile information
1170
+ * @throws ApiError
1171
+ */
1172
+ static getUserInfo(): CancelablePromise<userInfo>;
1173
+ /**
1174
+ * Get favourite facilities of currently authorized user
1175
+ * @returns userFacility A list of identifiers for the requesting users favourite facilities
1176
+ * @throws ApiError
1177
+ */
1178
+ static listUserFavourites(): CancelablePromise<Array<userFacility>>;
1179
+ /**
1180
+ * Get memberships of currently authorized user
1181
+ * @returns userFacility A list of identifiers for the requesting users membership facilities
1182
+ * @throws ApiError
1183
+ */
1184
+ static listUserMemberships(): CancelablePromise<Array<userFacility>>;
1185
+ /**
1186
+ * Request a membership for a customer. Creates one membership per item matched to the customer properties. Send more than one item to create a family membership.
1187
+ * @param requestBody Membership request. Supports both single and family membership requests.
1188
+ * @returns paymentDetails Details of the created order and how to pay, if unpaid.
1189
+ * @throws ApiError
1190
+ */
1191
+ static createMembership(requestBody?: membershipRequest): CancelablePromise<paymentDetails>;
1192
+ /**
1193
+ * Get payments of currently authorized user
1194
+ * @param offset Number of items to skip before returning the results.
1195
+ * @param limit Maximum number of items to return.
1196
+ * @returns paymentsResponse A list of payments
1197
+ * @throws ApiError
1198
+ */
1199
+ static listUserPayments(offset?: number, limit?: number): CancelablePromise<paymentsResponse>;
1200
+ /**
1201
+ * Get payment details by payment ID
1202
+ * @param paymentId Numeric ID of the payment to get details for
1203
+ * @returns paymentDetails Details about the requested payment
1204
+ * @throws ApiError
1205
+ */
1206
+ static getUserPayment(paymentId: number): CancelablePromise<paymentDetails>;
1207
+ /**
1208
+ * Get pending payments of currently authorized user
1209
+ * @returns pendingPayment A list of payments
1210
+ * @throws ApiError
1211
+ */
1212
+ static listUserPendingPayments(): CancelablePromise<Array<pendingPayment>>;
1213
+ /**
1214
+ * Get bookings of currently authorized user
1215
+ * @param offset Number of items to skip before returning the results.
1216
+ * @param limit Maximum number of items to return.
1217
+ * @param subType Filter bookings by subType
1218
+ * @returns bookingsResponse A list of bookings for the specified user
1219
+ * @throws ApiError
1220
+ */
1221
+ static listUserBookings(offset?: number, limit?: number, subType?: bookingSubType): CancelablePromise<bookingsResponse>;
1222
+ /**
1223
+ * Create a booking by timespan
1224
+ * @param requestBody Include resourceId, start/endtime, slots for split and players that should be included in the booking.
1225
+ * @returns paymentDetails Details on the created booking
1226
+ * @throws ApiError
1227
+ */
1228
+ static createBooking(requestBody: {
1229
+ /**
1230
+ * The id of the resource that should be included in the booking.
1231
+ */
1232
+ resourceId: number;
1233
+ startTime: timeStamp;
1234
+ endTime: timeStamp;
1235
+ /**
1236
+ * List of emails for the participating players.
1237
+ */
1238
+ playerEmails?: Array<string>;
1239
+ /**
1240
+ * List of user ids for the participating players.
1241
+ */
1242
+ userIds?: Array<string>;
1243
+ promoCode?: string;
1244
+ payment: paymentType;
1245
+ numberOfSlots?: number;
1246
+ }): CancelablePromise<paymentDetails>;
1247
+ /**
1248
+ * Get details of a booking by ID
1249
+ * @param bookingId ID of the booking to fetch details for
1250
+ * @returns booking Details about the requested booking
1251
+ * @throws ApiError
1252
+ */
1253
+ static getBookingDetails(bookingId: number): CancelablePromise<booking>;
1254
+ /**
1255
+ * Cancel a booking by ID
1256
+ * @param bookingId ID of the booking to cancel
1257
+ * @returns any Booking cancelled successfully
1258
+ * @throws ApiError
1259
+ */
1260
+ static deleteBooking(bookingId: number): CancelablePromise<any>;
1261
+ /**
1262
+ * Get users of a booking
1263
+ * @param bookingId id of the booking
1264
+ * @returns playingUsersResponse Playing users details
1265
+ * @throws ApiError
1266
+ */
1267
+ static getUsersInBooking(bookingId: number): CancelablePromise<playingUsersResponse>;
1268
+ /**
1269
+ * Invite user to a booking
1270
+ * @param bookingId id of the booking
1271
+ * @param userId ID of the user
1272
+ * @returns any User invite to the booking successfully
1273
+ * @throws ApiError
1274
+ */
1275
+ static inviteUserToBooking(bookingId: number, userId: string): CancelablePromise<any>;
1276
+ /**
1277
+ * Add user to a booking
1278
+ * @param bookingId id of the booking
1279
+ * @param userId ID of the user
1280
+ * @returns any User added to the booking successfully
1281
+ * @throws ApiError
1282
+ */
1283
+ static addUserToBooking(bookingId: number, userId: string): CancelablePromise<any>;
1284
+ /**
1285
+ * Remove user from a booking
1286
+ * @param bookingId ID of the booking
1287
+ * @param userId ID of the user
1288
+ * @returns any User removed from the booking
1289
+ * @throws ApiError
1290
+ */
1291
+ static removeUserFromBooking(bookingId: number, userId: string): CancelablePromise<any>;
1292
+ /**
1293
+ * Create an activity booking
1294
+ * @param requestBody Pass the id of the occasions that should be included in the booking.
1295
+ * @returns paymentDetails Details on the created booking
1296
+ * @throws ApiError
1297
+ */
1298
+ static createActivityBooking(requestBody: {
1299
+ activityOccasionId: number;
1300
+ promoCode?: string;
1301
+ payment: paymentType;
1302
+ acceptTerms: boolean;
1303
+ userMessage?: string;
1304
+ }): CancelablePromise<paymentDetails>;
1305
+ /**
1306
+ * Get activity details by booking ID
1307
+ * @param bookingId ID of the activity to fetch details for
1308
+ * @returns occasionBooking Details about the requested activity
1309
+ * @throws ApiError
1310
+ */
1311
+ static getActivityDetails(bookingId: number): CancelablePromise<occasionBooking>;
1312
+ /**
1313
+ * Cancel an activity booking by booking ID
1314
+ * @param bookingId ID of the booking to cancel
1315
+ * @returns any Booking cancelled successfully
1316
+ * @throws ApiError
1317
+ */
1318
+ static deleteActivityBooking(bookingId: number): CancelablePromise<any>;
1319
+ /**
1320
+ * Create m2m/admin booking(s) by timespan(s)
1321
+ * @param requestBody Include the resourceIds, start/endtimes, types and players that should be included in the booking.
1322
+ * @returns booking Details on the created booking(s)
1323
+ * @throws ApiError
1324
+ */
1325
+ static createBookingsAdmin(requestBody: {
1326
+ actor: actor;
1327
+ /**
1328
+ * ID of the resource that is booked, e.g. a court
1329
+ */
1330
+ resourceId: number;
1331
+ startTime: timeStamp;
1332
+ endTime: timeStamp;
1333
+ /**
1334
+ * The type of booking to be created in the schedule
1335
+ */
1336
+ type?: string;
1337
+ }): CancelablePromise<booking>;
1338
+ /**
1339
+ * Update fields in a booking for m2m/admin
1340
+ * @param bookingId ID of the booking to update
1341
+ * @param requestBody Update the entrycode for a booking
1342
+ * @returns any Booking updated successfully
1343
+ * @throws ApiError
1344
+ */
1345
+ static updateBookingAdmin(bookingId: number, requestBody: {
1346
+ actor: actor;
1347
+ entryCode?: string;
1348
+ }): CancelablePromise<any>;
1349
+ /**
1350
+ * Cancel a booking by ID for m2m/admin
1351
+ * @param bookingId ID of the booking to cancel
1352
+ * @param initiator Identifies the initiator of a request in a client system, used for logging and audit
1353
+ * @param systemIdentifier Identifies a client system, used for logging and audit
1354
+ * @returns any Booking cancelled successfully
1355
+ * @throws ApiError
1356
+ */
1357
+ static deleteBookingAdmin(bookingId: number, initiator: string, systemIdentifier: string): CancelablePromise<any>;
1358
+ /**
1359
+ * Get past play sessions
1360
+ * @param offset Number of items to skip before returning the results.
1361
+ * @param limit Maximum number of items to return.
1362
+ * @returns playSessionResponse List of historical play sessions connected to the user
1363
+ * @throws ApiError
1364
+ */
1365
+ static getUserPlaySessionsHistory(offset?: number, limit?: number): CancelablePromise<playSessionResponse>;
1366
+ /**
1367
+ * Get upcoming play sessions
1368
+ * @returns playSession List of upcoming play sessions connected to the user
1369
+ * @throws ApiError
1370
+ */
1371
+ static getUserPlaySessionsUpcoming(): CancelablePromise<Array<playSession>>;
1372
+ /**
1373
+ * Add user to waitlist on occasion with id
1374
+ * @param id Activity occasion id
1375
+ * @returns any Successfully added user to waitlist
1376
+ * @throws ApiError
1377
+ */
1378
+ static addWaitlistOccasion(id: number): CancelablePromise<any>;
1379
+ /**
1380
+ * Remove user from waitlist on occasion with id
1381
+ * @param id Activity occasion id
1382
+ * @returns any Successfully removed user from waitlist
1383
+ * @throws ApiError
1384
+ */
1385
+ static removeWaitlistOccasion(id: number): CancelablePromise<any>;
1386
+ /**
1387
+ * Fetch order data with payment information
1388
+ * @param token token of the requested order
1389
+ * @returns checkoutResponse The requested order payment information
1390
+ * @throws ApiError
1391
+ */
1392
+ static getCheckout(token: string): CancelablePromise<checkoutResponse>;
1393
+ /**
1394
+ * Complete the purchase for existing order with Matchi payment methods gift card, coupon or free
1395
+ * @param token token of the requested order
1396
+ * @param requestBody Include payment method
1397
+ * @returns paymentDetails Details on the created booking
1398
+ * @throws ApiError
1399
+ */
1400
+ static createCheckoutBooking(token: string, requestBody: {
1401
+ payment: internalPaymentMethod;
1402
+ }): CancelablePromise<paymentDetails>;
1403
+ /**
1404
+ * Fetch psp checkout session data using token to identify order
1405
+ * @param token token of the requested order
1406
+ * @param returnUrl returnUrl after possible redirect to 3rd party payment validation
1407
+ * @param enableRecurring
1408
+ * @returns pspSession The requested order psp session
1409
+ * @throws ApiError
1410
+ */
1411
+ static getPspSession(token: string, returnUrl: string, enableRecurring?: boolean): CancelablePromise<pspSession>;
1412
+ /**
1413
+ * Apply a value card and an amount to an existing order
1414
+ * @param token token of the requested order
1415
+ * @param requestBody Include value card and optional amount
1416
+ * @returns checkoutResponse The requested order payment information
1417
+ * @throws ApiError
1418
+ */
1419
+ static applyValueCard(token: string, requestBody: {
1420
+ customerCouponId: number;
1421
+ /**
1422
+ * if not applied the largest possible amount of the value card will be used
1423
+ */
1424
+ amount?: number;
1425
+ }): CancelablePromise<checkoutResponse>;
1426
+ /**
1427
+ * Delete the value card from an existing order
1428
+ * @param token Token of the requested order
1429
+ * @param customerCouponId ID of the value card
1430
+ * @returns checkoutResponse Value card unapplied successfully, order updated and returned
1431
+ * @throws ApiError
1432
+ */
1433
+ static unapplyValueCard(token: string, customerCouponId: number): CancelablePromise<checkoutResponse>;
1434
+ /**
1435
+ * Apply the promocode to an existing order
1436
+ * @param token token of the requested order
1437
+ * @param requestBody Include promo code
1438
+ * @returns checkoutResponse The requested order payment information
1439
+ * @throws ApiError
1440
+ */
1441
+ static applyPromoCode(token: string, requestBody: {
1442
+ promoCode: string;
1443
+ }): CancelablePromise<checkoutResponse>;
1444
+ /**
1445
+ * Delete the promocode from an existing order
1446
+ * @param token Token of the requested order
1447
+ * @returns checkoutResponse Promo code unapplied successfully, order updated and returned
1448
+ * @throws ApiError
1449
+ */
1450
+ static unapplyPromocode(token: string): CancelablePromise<checkoutResponse>;
1451
+ /**
1452
+ * List existing API clients
1453
+ * @param offset Number of items to skip before returning the results.
1454
+ * @param limit Maximum number of items to return.
1455
+ * @returns apiClientListResponse List of API client responses.
1456
+ * @throws ApiError
1457
+ */
1458
+ static getApiClientList(offset?: number, limit?: number): CancelablePromise<apiClientListResponse>;
1459
+ /**
1460
+ * Create a new API client
1461
+ * @param requestBody Input needed to create a new API client
1462
+ * @returns apiClient The succesfully created API client
1463
+ * @throws ApiError
1464
+ */
1465
+ static createApiClient(requestBody: apiClientInput): CancelablePromise<apiClient>;
1466
+ /**
1467
+ * Get details of a API client by id
1468
+ * @param clientId
1469
+ * @returns apiClient Details about the requested API client
1470
+ * @throws ApiError
1471
+ */
1472
+ static getApiClientById(clientId: string): CancelablePromise<apiClient>;
1473
+ /**
1474
+ * Update a existing API client by id
1475
+ * @param clientId
1476
+ * @param requestBody Input needed to update a existing API client
1477
+ * @param regenerateKey
1478
+ * @returns apiClient The succesfully updated API client
1479
+ * @throws ApiError
1480
+ */
1481
+ static updateApiClientById(clientId: string, requestBody: apiClientInput, regenerateKey?: boolean): CancelablePromise<apiClient>;
1482
+ /**
1483
+ * Get api usage details of a API client by id
1484
+ * @param clientId The id of the api client
1485
+ * @param month The month of interest to retrieve usage details about (if omitted defaults to current month)
1486
+ * @returns monthlyUsage Api usage details about the requested API client
1487
+ * @throws ApiError
1488
+ */
1489
+ static getApiClientUsageById(clientId: string, month?: months): CancelablePromise<monthlyUsage>;
1490
+ }
1491
+
1492
+ declare class BookingServiceV1Service {
1493
+ /**
1494
+ * Get availabilities with price for a resource ID
1495
+ * @param resourceId Resource that price is requested for
1496
+ * @param startTime Start time that price is requested for
1497
+ * @param endTime End time that price is requested for
1498
+ * @param promoCode Promo code that customer wants to apply
1499
+ * @param numberOfSlots Number of slots that should be included in the price detail calculation.
1500
+ * @param emails List of player emails that should be included in the price detail calculation.
1501
+ * @param userIds List of player user IDs that should be included in the price detail calculation.
1502
+ * @returns priceDetails Price details for the requested resource in a timespan with available payment methods
1503
+ * @throws ApiError
1504
+ */
1505
+ static getAvailabilityWithPrice(resourceId: string, startTime: timeStamp, endTime: timeStamp, promoCode?: string, numberOfSlots?: number, emails?: Array<string>, userIds?: Array<string>): CancelablePromise<priceDetails>;
1506
+ /**
1507
+ * Get users of a booking
1508
+ * @param bookingId id of the booking
1509
+ * @returns playingUsersResponse Playing users details
1510
+ * @throws ApiError
1511
+ */
1512
+ static getUsersInBooking(bookingId: number): CancelablePromise<playingUsersResponse>;
1513
+ /**
1514
+ * Invite user to a booking
1515
+ * @param bookingId id of the booking
1516
+ * @param userId ID of the user
1517
+ * @returns any User invite to the booking successfully
1518
+ * @throws ApiError
1519
+ */
1520
+ static inviteUserToBooking(bookingId: number, userId: string): CancelablePromise<any>;
1521
+ /**
1522
+ * Add user to a booking
1523
+ * @param bookingId id of the booking
1524
+ * @param userId ID of the user
1525
+ * @returns any User added to the booking successfully
1526
+ * @throws ApiError
1527
+ */
1528
+ static addUserToBooking(bookingId: number, userId: string): CancelablePromise<any>;
1529
+ /**
1530
+ * Remove user from a booking
1531
+ * @param bookingId ID of the booking
1532
+ * @param userId ID of the user
1533
+ * @returns any User removed from the booking
1534
+ * @throws ApiError
1535
+ */
1536
+ static removeUserFromBooking(bookingId: number, userId: string): CancelablePromise<any>;
1537
+ /**
1538
+ * Create m2m/admin booking(s) by timespan(s)
1539
+ * @param requestBody Include the resourceIds, start/endtimes, types and players that should be included in the booking.
1540
+ * @returns booking Details on the created booking(s)
1541
+ * @throws ApiError
1542
+ */
1543
+ static createBookingsAdmin(requestBody: {
1544
+ actor: actor;
1545
+ /**
1546
+ * ID of the resource that is booked, e.g. a court
1547
+ */
1548
+ resourceId: number;
1549
+ startTime: timeStamp;
1550
+ endTime: timeStamp;
1551
+ /**
1552
+ * The type of booking to be created in the schedule
1553
+ */
1554
+ type?: string;
1555
+ }): CancelablePromise<booking>;
1556
+ /**
1557
+ * Update fields in a booking for m2m/admin
1558
+ * @param bookingId ID of the booking to update
1559
+ * @param requestBody Update the entrycode for a booking
1560
+ * @returns any Booking updated successfully
1561
+ * @throws ApiError
1562
+ */
1563
+ static updateBookingAdmin(bookingId: number, requestBody: {
1564
+ actor: actor;
1565
+ entryCode?: string;
1566
+ }): CancelablePromise<any>;
1567
+ /**
1568
+ * Cancel a booking by ID for m2m/admin
1569
+ * @param bookingId ID of the booking to cancel
1570
+ * @param initiator Identifies the initiator of a request in a client system, used for logging and audit
1571
+ * @param systemIdentifier Identifies a client system, used for logging and audit
1572
+ * @returns any Booking cancelled successfully
1573
+ * @throws ApiError
1574
+ */
1575
+ static deleteBookingAdmin(bookingId: number, initiator: string, systemIdentifier: string): CancelablePromise<any>;
1576
+ }
1577
+
1578
+ declare class CheckoutServiceV1Service {
1579
+ /**
1580
+ * Fetch order data with payment information
1581
+ * @param token token of the requested order
1582
+ * @returns checkoutResponse The requested order payment information
1583
+ * @throws ApiError
1584
+ */
1585
+ static getCheckout(token: string): CancelablePromise<checkoutResponse>;
1586
+ /**
1587
+ * Fetch psp checkout session data using token to identify order
1588
+ * @param token token of the requested order
1589
+ * @param returnUrl returnUrl after possible redirect to 3rd party payment validation
1590
+ * @param enableRecurring
1591
+ * @returns pspSession The requested order psp session
1592
+ * @throws ApiError
1593
+ */
1594
+ static getPspSession(token: string, returnUrl: string, enableRecurring?: boolean): CancelablePromise<pspSession>;
1595
+ }
1596
+
1597
+ declare class CorsService {
1598
+ /**
1599
+ * CORS support
1600
+ * Enable CORS by returning correct headers
1601
+ *
1602
+ * @param cors CORS woodoo
1603
+ * @returns string Default response for CORS method
1604
+ * @throws ApiError
1605
+ */
1606
+ static options(cors: string): CancelablePromise<string>;
1607
+ }
1608
+
1609
+ declare class LoyaltyServiceV1Service {
1610
+ /**
1611
+ * Create a promo code
1612
+ * @param requestBody Input needed to create a promo code
1613
+ * @returns promoCode Promo code created
1614
+ * @throws ApiError
1615
+ */
1616
+ static createPromoCode(requestBody: createPromoCode): CancelablePromise<promoCode>;
1617
+ }
1618
+
1619
+ declare class MembershipServiceV1Service {
1620
+ /**
1621
+ * Request a membership for a customer. Creates one membership per item matched to the customer properties. Send more than one item to create a family membership.
1622
+ * @param requestBody Membership request. Supports both single and family membership requests.
1623
+ * @returns paymentDetails Details of the created order and how to pay, if unpaid.
1624
+ * @throws ApiError
1625
+ */
1626
+ static createMembership(requestBody?: membershipRequest): CancelablePromise<paymentDetails>;
1627
+ /**
1628
+ * Get cancellation policies for all memberships of currently authorized user
1629
+ * @param membershipTypeId The ID of the membership type
1630
+ * @param locale locale of the requested policy
1631
+ * @returns cancellationPolicy Cancellation policy details for a membership purchase
1632
+ * @throws ApiError
1633
+ */
1634
+ static cancellationPolicy(membershipTypeId: string, locale?: string): CancelablePromise<Array<cancellationPolicy>>;
1635
+ }
1636
+
1637
+ declare class PlaySessionServiceV1Service {
1638
+ /**
1639
+ * Get play session by ID
1640
+ * @param sessionId Play Session ID
1641
+ * @returns playSession Play session data
1642
+ * @throws ApiError
1643
+ */
1644
+ static getPlaySessionById(sessionId: string): CancelablePromise<playSession>;
1645
+ /**
1646
+ * Add player to play session given user id
1647
+ * @param sessionId Play Session ID
1648
+ * @param userId The user ID of the play session participant to add
1649
+ * @returns playSession User is added to playsession
1650
+ * @throws ApiError
1651
+ */
1652
+ static addPlayerWithUserId(sessionId: string, userId: string): CancelablePromise<playSession>;
1653
+ /**
1654
+ * Remove player from play session given user id
1655
+ * @param sessionId Play Session ID
1656
+ * @param userId The user ID of the play session participant to remove
1657
+ * @returns playSession Updated play session data
1658
+ * @throws ApiError
1659
+ */
1660
+ static removePlayerWithUserId(sessionId: string, userId: string): CancelablePromise<playSession>;
1661
+ /**
1662
+ * Remove player from play session given user email
1663
+ * @param sessionId Play Session ID
1664
+ * @param userEmail The email address of the play session participant to remove
1665
+ * @returns playSession Updated play session data
1666
+ * @throws ApiError
1667
+ */
1668
+ static removePlayerWithUserEmail(sessionId: string, userEmail: string): CancelablePromise<playSession>;
1669
+ /**
1670
+ * Update play session settings
1671
+ * @param sessionId Play Session ID
1672
+ * @param requestBody
1673
+ * @returns playSession Updated play session data
1674
+ * @throws ApiError
1675
+ */
1676
+ static updatePlaySessionSettings(sessionId: string, requestBody: playSessionSettings): CancelablePromise<playSession>;
1677
+ /**
1678
+ * Join play session
1679
+ * @param sessionId Play Session ID
1680
+ * @returns playSession Updated play session data
1681
+ * @throws ApiError
1682
+ */
1683
+ static joinPlaySession(sessionId: string): CancelablePromise<playSession>;
1684
+ /**
1685
+ * Get past play sessions
1686
+ * @param offset Number of items to skip before returning the results.
1687
+ * @param limit Maximum number of items to return.
1688
+ * @returns playSessionResponse List of historical play sessions connected to the user
1689
+ * @throws ApiError
1690
+ */
1691
+ static getUserPlaySessionsHistory(offset?: number, limit?: number): CancelablePromise<playSessionResponse>;
1692
+ /**
1693
+ * Get upcoming play sessions
1694
+ * @returns playSession List of upcoming play sessions connected to the user
1695
+ * @throws ApiError
1696
+ */
1697
+ static getUserPlaySessionsUpcoming(): CancelablePromise<Array<playSession>>;
1698
+ }
1699
+
1700
+ declare class UserServiceV1Service {
1701
+ /**
1702
+ * Get public profile of requested user
1703
+ * @param userId User ID
1704
+ * @returns userPublicProfile The requested user's public profile information
1705
+ * @throws ApiError
1706
+ */
1707
+ static getUserProfile(userId: string): CancelablePromise<userPublicProfile>;
1708
+ /**
1709
+ * Check status of friendship, and if you are able to connect to the user
1710
+ * @param userId User ID
1711
+ * @returns friendRelationResponse Status of friendship, and if you are able to connect to the user
1712
+ * @throws ApiError
1713
+ */
1714
+ static getRelationToFriend(userId: string): CancelablePromise<friendRelationResponse>;
1715
+ /**
1716
+ * Request friends connection to user, or accept incoming connection request from user.
1717
+ *
1718
+ * No-op if already connected to the user or if a pending connection request already exists.
1719
+ *
1720
+ * @param userId The ID of the user to connect to
1721
+ * @returns friendRelationResponse Successfully requested or created connection to user.
1722
+ * @throws ApiError
1723
+ */
1724
+ static addRelationToFriend(userId: string): CancelablePromise<friendRelationResponse>;
1725
+ /**
1726
+ * Delete friends connection to user.
1727
+ *
1728
+ * If another user tried to connect, that incoming friend request will be declined.
1729
+ * If there is a pending friend request to another user, that outgoing friend request will be removed.
1730
+ *
1731
+ * No-op if not connected at all, or not having an incoming/outgoing friend request.
1732
+ *
1733
+ * @param userId The ID of the user to remove connection to
1734
+ * @returns any Successfully removed connection to user.
1735
+ * @throws ApiError
1736
+ */
1737
+ static deleteRelationToFriend(userId: string): CancelablePromise<any>;
1738
+ /**
1739
+ * List friends
1740
+ * @param offset Number of items to skip before returning the results.
1741
+ * @param limit Maximum number of items to return.
1742
+ * @returns friendRelationsResponse Successfully listed all friends
1743
+ * @throws ApiError
1744
+ */
1745
+ static listFriends(offset?: number, limit?: number): CancelablePromise<friendRelationsResponse>;
1746
+ /**
1747
+ * List incoming friend requests
1748
+ * @param offset Number of items to skip before returning the results.
1749
+ * @param limit Maximum number of items to return.
1750
+ * @returns friendRelationsResponse Successfully listed all incoming friend requests
1751
+ * @throws ApiError
1752
+ */
1753
+ static listIncomingFriendRequests(offset?: number, limit?: number): CancelablePromise<friendRelationsResponse>;
1754
+ }
1755
+
1756
+ export { ActivityEvent, ActivityServiceV1Service, AdminOccasionDetails, AnonymousService, ApiClientServiceV1Service, ApiError, AuthorizedService, BookingServiceV1Service, CancelError, CancelablePromise, CheckoutServiceV1Service, CorsService, Error$1 as Error, ExternalServiceProperty, LoyaltyServiceV1Service, MembershipServiceV1Service, OccasionCourt, OpenAPI, OpenAPIConfig, OrderSplitPrice, PlaySessionServiceV1Service, UserServiceV1Service, activitiesResponse, activity, activityOccasion, activityType, actor, address, apiClient, apiClientInput, apiClientListResponse, article, articleMetadata, availability, booking, bookingSubType, bookingsResponse, camera, cancellationPolicy, checkoutResponse, clientType, config, configuration, configurationEntry, configurationMap, configurationResource, coupon, createBookingEventExternal, createPromoCode, dailyQuota, days, deleteBookingEventExternal, exposeOccasions, facilitiesResponse, facility, facilityConfiguration, facilityDetails, friendRelationResponse, friendRelationsResponse, giftCard, hideFullyBooked, hours, internalPaymentMethod, levelRange, limitParam, membershipRequest, membershipRequestItem, monthlyUsage, months, occasionBooking, occasionParticipant, offsetParam, openingHours, order, participants, payment, paymentDetails, paymentInfo, paymentInterval, paymentMethods, paymentType, paymentsResponse, pendingPayment, playSession, playSessionBooking, playSessionBookingPayment, playSessionResponse, playSessionSettings, playSessionUser, playingUserResponse, playingUsersResponse, position, price, priceDetails, priceDetailsActivity, profile, promoCode, promoCodeOutcome, pspSession, resource, resultSet, timeStamp, usagePlan, userFacility, userId, userInfo, userPublicProfile, valueCardOutcome };