@matchi/api 0.20231212.1 → 0.20231214.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +79 -1
- package/dist/index.d.ts +79 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -289,6 +289,11 @@ type availability = {
|
|
|
289
289
|
price: price;
|
|
290
290
|
};
|
|
291
291
|
|
|
292
|
+
type bookingGroup = {
|
|
293
|
+
type: string;
|
|
294
|
+
groupId: string;
|
|
295
|
+
};
|
|
296
|
+
|
|
292
297
|
declare enum bookingSubType {
|
|
293
298
|
BOOKING = "booking",
|
|
294
299
|
ACTIVITY = "activity",
|
|
@@ -309,6 +314,7 @@ type booking = {
|
|
|
309
314
|
type: string;
|
|
310
315
|
subType?: bookingSubType;
|
|
311
316
|
paymentId: number;
|
|
317
|
+
group?: bookingGroup;
|
|
312
318
|
/**
|
|
313
319
|
* If booking is a split payment this is the last time (UTC) a payment can be made
|
|
314
320
|
*/
|
|
@@ -320,6 +326,64 @@ type bookingsResponse = {
|
|
|
320
326
|
items: Array<booking>;
|
|
321
327
|
};
|
|
322
328
|
|
|
329
|
+
type bookingSubscriptionPayment = {
|
|
330
|
+
paymentId: number;
|
|
331
|
+
/**
|
|
332
|
+
* URL to the receipt of the payment. Is available if the subscription is paid in full.
|
|
333
|
+
*/
|
|
334
|
+
receiptUrl?: string | null;
|
|
335
|
+
/**
|
|
336
|
+
* URL to the checkout to pay for the subscription. Is available if the subscription is not paid in full.
|
|
337
|
+
*/
|
|
338
|
+
checkoutUrl?: string | null;
|
|
339
|
+
price: {
|
|
340
|
+
amount: string;
|
|
341
|
+
currency: string;
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Time of day in HH:MM format
|
|
347
|
+
*/
|
|
348
|
+
type timeOfDay = string;
|
|
349
|
+
|
|
350
|
+
type bookingSubscription = {
|
|
351
|
+
/**
|
|
352
|
+
* The ID of the booking subscription
|
|
353
|
+
*/
|
|
354
|
+
id: string;
|
|
355
|
+
facilityId: number;
|
|
356
|
+
/**
|
|
357
|
+
* The day of the week the bookings in the subscription take place. However, the bookings in the subscription could take place on a different weekday if they are moved.
|
|
358
|
+
*/
|
|
359
|
+
weekDay?: bookingSubscription.weekDay;
|
|
360
|
+
/**
|
|
361
|
+
* The time of day the bookings in the subscription take place. However, the bookings in the subscription could have a different start time if they are moved.
|
|
362
|
+
*/
|
|
363
|
+
timeOfDay: timeOfDay;
|
|
364
|
+
resourceId: number;
|
|
365
|
+
/**
|
|
366
|
+
* A list of booking IDs that are part of the subscription
|
|
367
|
+
*/
|
|
368
|
+
bookingIds: Array<number>;
|
|
369
|
+
payment: bookingSubscriptionPayment;
|
|
370
|
+
};
|
|
371
|
+
declare namespace bookingSubscription {
|
|
372
|
+
/**
|
|
373
|
+
* The day of the week the bookings in the subscription take place. However, the bookings in the subscription could take place on a different weekday if they are moved.
|
|
374
|
+
*/
|
|
375
|
+
enum weekDay {
|
|
376
|
+
MONDAY = "MONDAY",
|
|
377
|
+
TUESDAY = "TUESDAY",
|
|
378
|
+
WEDNESDAY = "WEDNESDAY",
|
|
379
|
+
THURSDAY = "THURSDAY",
|
|
380
|
+
FRIDAY = "FRIDAY",
|
|
381
|
+
SATURDAY = "SATURDAY",
|
|
382
|
+
SUNDAY = "SUNDAY",
|
|
383
|
+
UNKNOWN = "UNKNOWN"
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
323
387
|
type camera = {
|
|
324
388
|
id?: number;
|
|
325
389
|
name?: string;
|
|
@@ -1301,6 +1365,13 @@ declare class AuthorizedService {
|
|
|
1301
1365
|
* @throws ApiError
|
|
1302
1366
|
*/
|
|
1303
1367
|
static deleteBooking(bookingId: number): CancelablePromise<any>;
|
|
1368
|
+
/**
|
|
1369
|
+
* Get details of a subscription by ID
|
|
1370
|
+
* @param subscriptionId ID of the booking subscription to fetch details for
|
|
1371
|
+
* @returns bookingSubscription Details about the requested booking subscription
|
|
1372
|
+
* @throws ApiError
|
|
1373
|
+
*/
|
|
1374
|
+
static getBookingSubscriptionDetails(subscriptionId: string): CancelablePromise<bookingSubscription>;
|
|
1304
1375
|
/**
|
|
1305
1376
|
* Get users of a booking
|
|
1306
1377
|
* @param bookingId id of the booking
|
|
@@ -1553,6 +1624,13 @@ declare class BookingServiceV1Service {
|
|
|
1553
1624
|
* @throws ApiError
|
|
1554
1625
|
*/
|
|
1555
1626
|
static getAvailabilityWithPrice(resourceId: string, startTime: timeStamp, endTime: timeStamp, promoCode?: string, numberOfSlots?: number, emails?: Array<string>, userIds?: Array<string>): CancelablePromise<priceDetails>;
|
|
1627
|
+
/**
|
|
1628
|
+
* Get details of a subscription by ID
|
|
1629
|
+
* @param subscriptionId ID of the booking subscription to fetch details for
|
|
1630
|
+
* @returns bookingSubscription Details about the requested booking subscription
|
|
1631
|
+
* @throws ApiError
|
|
1632
|
+
*/
|
|
1633
|
+
static getBookingSubscriptionDetails(subscriptionId: string): CancelablePromise<bookingSubscription>;
|
|
1556
1634
|
/**
|
|
1557
1635
|
* Get users of a booking
|
|
1558
1636
|
* @param bookingId id of the booking
|
|
@@ -1820,4 +1898,4 @@ declare class UserServiceV1Service {
|
|
|
1820
1898
|
static listIncomingFriendRequests(offset?: number, limit?: number): CancelablePromise<friendRelationsResponse>;
|
|
1821
1899
|
}
|
|
1822
1900
|
|
|
1823
|
-
export { ActivityEvent, ActivityServiceV1Service, AdminOccasionDetails, AnonymousService, ApiClientServiceV1Service, ApiError, AuthorizedService, BookingServiceV1Service, CancelError, CancelablePromise, CheckoutServiceV1Service, CompetitionServiceV1Service, CorsService, Error$1 as Error, ExternalServiceProperty, LoyaltyServiceV1Service, MembershipServiceV1Service, OccasionCourt, OpenAPI, OpenAPIConfig, OrderSplitPayments, OrderSplitPaymentsRow, OrderSplitPrice, PlaySessionServiceV1Service, UserServiceV1Service, activitiesResponse, activity, activityOccasion, activityType, actor, address, apiClient, apiClientInput, apiClientListResponse, article, articleMetadata, availability, booking, bookingSubType, bookingsResponse, camera, cancellationPolicy, checkoutResponse, clientType, competitionAdminAccount, 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, orderSplitBaseResponse, 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 };
|
|
1901
|
+
export { type ActivityEvent, ActivityServiceV1Service, type AdminOccasionDetails, AnonymousService, ApiClientServiceV1Service, ApiError, AuthorizedService, BookingServiceV1Service, CancelError, CancelablePromise, CheckoutServiceV1Service, CompetitionServiceV1Service, CorsService, type Error$1 as Error, type ExternalServiceProperty, LoyaltyServiceV1Service, MembershipServiceV1Service, type OccasionCourt, OpenAPI, type OpenAPIConfig, type OrderSplitPayments, type OrderSplitPaymentsRow, type OrderSplitPrice, PlaySessionServiceV1Service, UserServiceV1Service, type activitiesResponse, type activity, type activityOccasion, type activityType, type actor, type address, type apiClient, type apiClientInput, type apiClientListResponse, type article, type articleMetadata, type availability, type booking, type bookingGroup, bookingSubType, bookingSubscription, type bookingSubscriptionPayment, type bookingsResponse, type camera, cancellationPolicy, type checkoutResponse, clientType, type competitionAdminAccount, type config, type configuration, type configurationEntry, type configurationMap, type configurationResource, type coupon, type createBookingEventExternal, type createPromoCode, type dailyQuota, type days, type deleteBookingEventExternal, type exposeOccasions, type facilitiesResponse, type facility, type facilityConfiguration, type facilityDetails, type friendRelationResponse, type friendRelationsResponse, type giftCard, type hideFullyBooked, type hours, type internalPaymentMethod, type levelRange, type limitParam, type membershipRequest, type membershipRequestItem, type monthlyUsage, months, type occasionBooking, type occasionParticipant, type offsetParam, type openingHours, type order, type orderSplitBaseResponse, type participants, type payment, type paymentDetails, type paymentInfo, type paymentInterval, type paymentMethods, type paymentType, type paymentsResponse, type pendingPayment, type playSession, type playSessionBooking, type playSessionBookingPayment, type playSessionResponse, type playSessionSettings, type playSessionUser, playingUserResponse, type playingUsersResponse, type position, type price, type priceDetails, type priceDetailsActivity, type profile, type promoCode, type promoCodeOutcome, type pspSession, type resource, type resultSet, type timeOfDay, type timeStamp, type usagePlan, type userFacility, type userId, type userInfo, type userPublicProfile, type valueCardOutcome };
|
package/dist/index.d.ts
CHANGED
|
@@ -289,6 +289,11 @@ type availability = {
|
|
|
289
289
|
price: price;
|
|
290
290
|
};
|
|
291
291
|
|
|
292
|
+
type bookingGroup = {
|
|
293
|
+
type: string;
|
|
294
|
+
groupId: string;
|
|
295
|
+
};
|
|
296
|
+
|
|
292
297
|
declare enum bookingSubType {
|
|
293
298
|
BOOKING = "booking",
|
|
294
299
|
ACTIVITY = "activity",
|
|
@@ -309,6 +314,7 @@ type booking = {
|
|
|
309
314
|
type: string;
|
|
310
315
|
subType?: bookingSubType;
|
|
311
316
|
paymentId: number;
|
|
317
|
+
group?: bookingGroup;
|
|
312
318
|
/**
|
|
313
319
|
* If booking is a split payment this is the last time (UTC) a payment can be made
|
|
314
320
|
*/
|
|
@@ -320,6 +326,64 @@ type bookingsResponse = {
|
|
|
320
326
|
items: Array<booking>;
|
|
321
327
|
};
|
|
322
328
|
|
|
329
|
+
type bookingSubscriptionPayment = {
|
|
330
|
+
paymentId: number;
|
|
331
|
+
/**
|
|
332
|
+
* URL to the receipt of the payment. Is available if the subscription is paid in full.
|
|
333
|
+
*/
|
|
334
|
+
receiptUrl?: string | null;
|
|
335
|
+
/**
|
|
336
|
+
* URL to the checkout to pay for the subscription. Is available if the subscription is not paid in full.
|
|
337
|
+
*/
|
|
338
|
+
checkoutUrl?: string | null;
|
|
339
|
+
price: {
|
|
340
|
+
amount: string;
|
|
341
|
+
currency: string;
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Time of day in HH:MM format
|
|
347
|
+
*/
|
|
348
|
+
type timeOfDay = string;
|
|
349
|
+
|
|
350
|
+
type bookingSubscription = {
|
|
351
|
+
/**
|
|
352
|
+
* The ID of the booking subscription
|
|
353
|
+
*/
|
|
354
|
+
id: string;
|
|
355
|
+
facilityId: number;
|
|
356
|
+
/**
|
|
357
|
+
* The day of the week the bookings in the subscription take place. However, the bookings in the subscription could take place on a different weekday if they are moved.
|
|
358
|
+
*/
|
|
359
|
+
weekDay?: bookingSubscription.weekDay;
|
|
360
|
+
/**
|
|
361
|
+
* The time of day the bookings in the subscription take place. However, the bookings in the subscription could have a different start time if they are moved.
|
|
362
|
+
*/
|
|
363
|
+
timeOfDay: timeOfDay;
|
|
364
|
+
resourceId: number;
|
|
365
|
+
/**
|
|
366
|
+
* A list of booking IDs that are part of the subscription
|
|
367
|
+
*/
|
|
368
|
+
bookingIds: Array<number>;
|
|
369
|
+
payment: bookingSubscriptionPayment;
|
|
370
|
+
};
|
|
371
|
+
declare namespace bookingSubscription {
|
|
372
|
+
/**
|
|
373
|
+
* The day of the week the bookings in the subscription take place. However, the bookings in the subscription could take place on a different weekday if they are moved.
|
|
374
|
+
*/
|
|
375
|
+
enum weekDay {
|
|
376
|
+
MONDAY = "MONDAY",
|
|
377
|
+
TUESDAY = "TUESDAY",
|
|
378
|
+
WEDNESDAY = "WEDNESDAY",
|
|
379
|
+
THURSDAY = "THURSDAY",
|
|
380
|
+
FRIDAY = "FRIDAY",
|
|
381
|
+
SATURDAY = "SATURDAY",
|
|
382
|
+
SUNDAY = "SUNDAY",
|
|
383
|
+
UNKNOWN = "UNKNOWN"
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
323
387
|
type camera = {
|
|
324
388
|
id?: number;
|
|
325
389
|
name?: string;
|
|
@@ -1301,6 +1365,13 @@ declare class AuthorizedService {
|
|
|
1301
1365
|
* @throws ApiError
|
|
1302
1366
|
*/
|
|
1303
1367
|
static deleteBooking(bookingId: number): CancelablePromise<any>;
|
|
1368
|
+
/**
|
|
1369
|
+
* Get details of a subscription by ID
|
|
1370
|
+
* @param subscriptionId ID of the booking subscription to fetch details for
|
|
1371
|
+
* @returns bookingSubscription Details about the requested booking subscription
|
|
1372
|
+
* @throws ApiError
|
|
1373
|
+
*/
|
|
1374
|
+
static getBookingSubscriptionDetails(subscriptionId: string): CancelablePromise<bookingSubscription>;
|
|
1304
1375
|
/**
|
|
1305
1376
|
* Get users of a booking
|
|
1306
1377
|
* @param bookingId id of the booking
|
|
@@ -1553,6 +1624,13 @@ declare class BookingServiceV1Service {
|
|
|
1553
1624
|
* @throws ApiError
|
|
1554
1625
|
*/
|
|
1555
1626
|
static getAvailabilityWithPrice(resourceId: string, startTime: timeStamp, endTime: timeStamp, promoCode?: string, numberOfSlots?: number, emails?: Array<string>, userIds?: Array<string>): CancelablePromise<priceDetails>;
|
|
1627
|
+
/**
|
|
1628
|
+
* Get details of a subscription by ID
|
|
1629
|
+
* @param subscriptionId ID of the booking subscription to fetch details for
|
|
1630
|
+
* @returns bookingSubscription Details about the requested booking subscription
|
|
1631
|
+
* @throws ApiError
|
|
1632
|
+
*/
|
|
1633
|
+
static getBookingSubscriptionDetails(subscriptionId: string): CancelablePromise<bookingSubscription>;
|
|
1556
1634
|
/**
|
|
1557
1635
|
* Get users of a booking
|
|
1558
1636
|
* @param bookingId id of the booking
|
|
@@ -1820,4 +1898,4 @@ declare class UserServiceV1Service {
|
|
|
1820
1898
|
static listIncomingFriendRequests(offset?: number, limit?: number): CancelablePromise<friendRelationsResponse>;
|
|
1821
1899
|
}
|
|
1822
1900
|
|
|
1823
|
-
export { ActivityEvent, ActivityServiceV1Service, AdminOccasionDetails, AnonymousService, ApiClientServiceV1Service, ApiError, AuthorizedService, BookingServiceV1Service, CancelError, CancelablePromise, CheckoutServiceV1Service, CompetitionServiceV1Service, CorsService, Error$1 as Error, ExternalServiceProperty, LoyaltyServiceV1Service, MembershipServiceV1Service, OccasionCourt, OpenAPI, OpenAPIConfig, OrderSplitPayments, OrderSplitPaymentsRow, OrderSplitPrice, PlaySessionServiceV1Service, UserServiceV1Service, activitiesResponse, activity, activityOccasion, activityType, actor, address, apiClient, apiClientInput, apiClientListResponse, article, articleMetadata, availability, booking, bookingSubType, bookingsResponse, camera, cancellationPolicy, checkoutResponse, clientType, competitionAdminAccount, 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, orderSplitBaseResponse, 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 };
|
|
1901
|
+
export { type ActivityEvent, ActivityServiceV1Service, type AdminOccasionDetails, AnonymousService, ApiClientServiceV1Service, ApiError, AuthorizedService, BookingServiceV1Service, CancelError, CancelablePromise, CheckoutServiceV1Service, CompetitionServiceV1Service, CorsService, type Error$1 as Error, type ExternalServiceProperty, LoyaltyServiceV1Service, MembershipServiceV1Service, type OccasionCourt, OpenAPI, type OpenAPIConfig, type OrderSplitPayments, type OrderSplitPaymentsRow, type OrderSplitPrice, PlaySessionServiceV1Service, UserServiceV1Service, type activitiesResponse, type activity, type activityOccasion, type activityType, type actor, type address, type apiClient, type apiClientInput, type apiClientListResponse, type article, type articleMetadata, type availability, type booking, type bookingGroup, bookingSubType, bookingSubscription, type bookingSubscriptionPayment, type bookingsResponse, type camera, cancellationPolicy, type checkoutResponse, clientType, type competitionAdminAccount, type config, type configuration, type configurationEntry, type configurationMap, type configurationResource, type coupon, type createBookingEventExternal, type createPromoCode, type dailyQuota, type days, type deleteBookingEventExternal, type exposeOccasions, type facilitiesResponse, type facility, type facilityConfiguration, type facilityDetails, type friendRelationResponse, type friendRelationsResponse, type giftCard, type hideFullyBooked, type hours, type internalPaymentMethod, type levelRange, type limitParam, type membershipRequest, type membershipRequestItem, type monthlyUsage, months, type occasionBooking, type occasionParticipant, type offsetParam, type openingHours, type order, type orderSplitBaseResponse, type participants, type payment, type paymentDetails, type paymentInfo, type paymentInterval, type paymentMethods, type paymentType, type paymentsResponse, type pendingPayment, type playSession, type playSessionBooking, type playSessionBookingPayment, type playSessionResponse, type playSessionSettings, type playSessionUser, playingUserResponse, type playingUsersResponse, type position, type price, type priceDetails, type priceDetailsActivity, type profile, type promoCode, type promoCodeOutcome, type pspSession, type resource, type resultSet, type timeOfDay, type timeStamp, type usagePlan, type userFacility, type userId, type userInfo, type userPublicProfile, type valueCardOutcome };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var O=Object.defineProperty,ae=Object.defineProperties,se=Object.getOwnPropertyDescriptor,ne=Object.getOwnPropertyDescriptors,le=Object.getOwnPropertyNames,Z=Object.getOwnPropertySymbols;var re=Object.prototype.hasOwnProperty,pe=Object.prototype.propertyIsEnumerable;var ee=(o,e,r)=>e in o?O(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,R=(o,e)=>{for(var r in e||(e={}))re.call(e,r)&&ee(o,r,e[r]);if(Z)for(var r of Z(e))pe.call(e,r)&&ee(o,r,e[r]);return o},oe=(o,e)=>ae(o,ne(e));var ue=(o,e)=>{for(var r in e)O(o,r,{get:e[r],enumerable:!0})},ce=(o,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of le(e))!re.call(o,s)&&s!==r&&O(o,s,{get:()=>e[s],enumerable:!(a=se(e,s))||a.enumerable});return o};var me=o=>ce(O({},"__esModule",{value:!0}),o);var te=(o,e,r)=>{if(!e.has(o))throw TypeError("Cannot "+r)};var c=(o,e,r)=>(te(o,e,"read from private field"),r?r.call(o):e.get(o)),h=(o,e,r)=>{if(e.has(o))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(o):e.set(o,r)},f=(o,e,r,a)=>(te(o,e,"write to private field"),a?a.call(o,r):e.set(o,r),r);var P=(o,e,r)=>new Promise((a,s)=>{var n=u=>{try{p(r.next(u))}catch(d){s(d)}},l=u=>{try{p(r.throw(u))}catch(d){s(d)}},p=u=>u.done?a(u.value):Promise.resolve(u.value).then(n,l);p((r=r.apply(o,e)).next())});var Ce={};ue(Ce,{ActivityServiceV1Service:()=>q,AnonymousService:()=>D,ApiClientServiceV1Service:()=>z,ApiError:()=>I,AuthorizedService:()=>B,BookingServiceV1Service:()=>j,CancelError:()=>A,CancelablePromise:()=>S,CheckoutServiceV1Service:()=>L,CompetitionServiceV1Service:()=>N,CorsService:()=>_,LoyaltyServiceV1Service:()=>F,MembershipServiceV1Service:()=>H,OpenAPI:()=>t,PlaySessionServiceV1Service:()=>M,UserServiceV1Service:()=>$,bookingSubType:()=>J,cancellationPolicy:()=>U,clientType:()=>V,months:()=>K,playingUserResponse:()=>G});module.exports=me(Ce);var I=class extends Error{constructor(r,a,s){super(s);this.name="ApiError",this.url=a.url,this.status=a.status,this.statusText=a.statusText,this.body=a.body,this.request=r}};var A=class extends Error{constructor(e){super(e),this.name="CancelError"}get isCancelled(){return!0}},b,g,y,T,v,x,C,S=class{constructor(e){h(this,b,void 0);h(this,g,void 0);h(this,y,void 0);h(this,T,void 0);h(this,v,void 0);h(this,x,void 0);h(this,C,void 0);f(this,b,!1),f(this,g,!1),f(this,y,!1),f(this,T,[]),f(this,v,new Promise((r,a)=>{f(this,x,r),f(this,C,a);let s=p=>{var u;c(this,b)||c(this,g)||c(this,y)||(f(this,b,!0),(u=c(this,x))==null||u.call(this,p))},n=p=>{var u;c(this,b)||c(this,g)||c(this,y)||(f(this,g,!0),(u=c(this,C))==null||u.call(this,p))},l=p=>{c(this,b)||c(this,g)||c(this,y)||c(this,T).push(p)};return Object.defineProperty(l,"isResolved",{get:()=>c(this,b)}),Object.defineProperty(l,"isRejected",{get:()=>c(this,g)}),Object.defineProperty(l,"isCancelled",{get:()=>c(this,y)}),e(s,n,l)}))}get[Symbol.toStringTag](){return"Cancellable Promise"}then(e,r){return c(this,v).then(e,r)}catch(e){return c(this,v).catch(e)}finally(e){return c(this,v).finally(e)}cancel(){var e;if(!(c(this,b)||c(this,g)||c(this,y))){if(f(this,y,!0),c(this,T).length)try{for(let r of c(this,T))r()}catch(r){console.warn("Cancellation threw an error",r);return}c(this,T).length=0,(e=c(this,C))==null||e.call(this,new A("Request aborted"))}}get isCancelled(){return c(this,y)}};b=new WeakMap,g=new WeakMap,y=new WeakMap,T=new WeakMap,v=new WeakMap,x=new WeakMap,C=new WeakMap;var t={BASE:"https://api.dev.matchi.com",VERSION:"1",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0};var J=(n=>(n.BOOKING="booking",n.ACTIVITY="activity",n.SPLIT="split",n.SPLIT_MAIN="split_main",n.SPLIT_INVITE="split_invite",n))(J||{});var U;(e=>{let o;(s=>(s.AVAILABILITY="AVAILABILITY",s.OCCASION="OCCASION"))(o=e.itemType||(e.itemType={}))})(U||(U={}));var V=(r=>(r.WIDGET="WIDGET",r.API="API",r))(V||{});var K=(m=>(m.JANUARY="January",m.FEBRUARY="February",m.MARCH="March",m.APRIL="April",m.MAY="May",m.JUNE="June",m.JULY="July",m.AUGUST="August",m.SEPTEMBER="September",m.OCTOBER="October",m.NOVEMBER="November",m.DECEMBER="December",m))(K||{});var G;(e=>{let o;(l=>(l.PAID="PAID",l.INVITED="INVITED",l.JOINED="JOINED",l.BOOKER="BOOKER"))(o=e.status||(e.status={}))})(G||(G={}));var Q=o=>o!=null,k=o=>typeof o=="string",Y=o=>k(o)&&o!=="",X=o=>typeof o=="object"&&typeof o.type=="string"&&typeof o.stream=="function"&&typeof o.arrayBuffer=="function"&&typeof o.constructor=="function"&&typeof o.constructor.name=="string"&&/^(Blob|File)$/.test(o.constructor.name)&&/^(Blob|File)$/.test(o[Symbol.toStringTag]),ie=o=>o instanceof FormData,de=o=>{try{return btoa(o)}catch(e){return Buffer.from(o).toString("base64")}},fe=o=>{let e=[],r=(s,n)=>{e.push(`${encodeURIComponent(s)}=${encodeURIComponent(String(n))}`)},a=(s,n)=>{Q(n)&&(Array.isArray(n)?n.forEach(l=>{a(s,l)}):typeof n=="object"?Object.entries(n).forEach(([l,p])=>{a(`${s}[${l}]`,p)}):r(s,n))};return Object.entries(o).forEach(([s,n])=>{a(s,n)}),e.length>0?`?${e.join("&")}`:""},ye=(o,e)=>{let r=o.ENCODE_PATH||encodeURI,a=e.url.replace("{api-version}",o.VERSION).replace(/{(.*?)}/g,(n,l)=>{var p;return(p=e.path)!=null&&p.hasOwnProperty(l)?r(String(e.path[l])):n}),s=`${o.BASE}${a}`;return e.query?`${s}${fe(e.query)}`:s},be=o=>{if(o.formData){let e=new FormData,r=(a,s)=>{k(s)||X(s)?e.append(a,s):e.append(a,JSON.stringify(s))};return Object.entries(o.formData).filter(([a,s])=>Q(s)).forEach(([a,s])=>{Array.isArray(s)?s.forEach(n=>r(a,n)):r(a,s)}),e}},w=(o,e)=>P(void 0,null,function*(){return typeof e=="function"?e(o):e}),ge=(o,e)=>P(void 0,null,function*(){let r=yield w(e,o.TOKEN),a=yield w(e,o.USERNAME),s=yield w(e,o.PASSWORD),n=yield w(e,o.HEADERS),l=Object.entries(R(R({Accept:"application/json"},n),e.headers)).filter(([p,u])=>Q(u)).reduce((p,[u,d])=>oe(R({},p),{[u]:String(d)}),{});if(Y(r)&&(l.Authorization=`Bearer ${r}`),Y(a)&&Y(s)){let p=de(`${a}:${s}`);l.Authorization=`Basic ${p}`}return e.body&&(e.mediaType?l["Content-Type"]=e.mediaType:X(e.body)?l["Content-Type"]=e.body.type||"application/octet-stream":k(e.body)?l["Content-Type"]="text/plain":ie(e.body)||(l["Content-Type"]="application/json")),new Headers(l)}),he=o=>{var e;if(o.body!==void 0)return(e=o.mediaType)!=null&&e.includes("/json")?JSON.stringify(o.body):k(o.body)||X(o.body)||ie(o.body)?o.body:JSON.stringify(o.body)},Te=(o,e,r,a,s,n,l)=>P(void 0,null,function*(){let p=new AbortController,u={headers:n,body:a!=null?a:s,method:e.method,signal:p.signal};return o.WITH_CREDENTIALS&&(u.credentials=o.CREDENTIALS),l(()=>p.abort()),yield fetch(r,u)}),Ie=(o,e)=>{if(e){let r=o.headers.get(e);if(k(r))return r}},ve=o=>P(void 0,null,function*(){if(o.status!==204)try{let e=o.headers.get("Content-Type");if(e)return["application/json","application/problem+json"].some(s=>e.toLowerCase().startsWith(s))?yield o.json():yield o.text()}catch(e){console.error(e)}}),Pe=(o,e)=>{var s,n;let a=R({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},o.errors)[e.status];if(a)throw new I(o,e,a);if(!e.ok){let l=(s=e.status)!=null?s:"unknown",p=(n=e.statusText)!=null?n:"unknown",u=(()=>{try{return JSON.stringify(e.body,null,2)}catch(d){return}})();throw new I(o,e,`Generic Error: status: ${l}; status text: ${p}; body: ${u}`)}},i=(o,e)=>new S((r,a,s)=>P(void 0,null,function*(){try{let n=ye(o,e),l=be(e),p=he(e),u=yield ge(o,e);if(!s.isCancelled){let d=yield Te(o,e,n,p,l,u,s),W=yield ve(d),E=Ie(d,e.responseHeader),m={url:n,ok:d.ok,status:d.status,statusText:d.statusText,body:E!=null?E:W};Pe(e,m),r(m.body)}}catch(n){a(n)}}));var q=class{static getAdminActivityOccasions(e,r,a,s,n,l=10){return i(t,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:a,endDate:s,offset:n,limit:l},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var D=class{static listActivities(e=!1,r=!1,a,s,n,l,p,u,d,W,E,m=10){return i(t,{method:"GET",url:"/activities",query:{hideFullyBooked:e,exposeOccasions:r,facilityIds:a,level:s,locationSearch:n,categorySearch:l,querySearch:p,resourceTypes:u,startDate:d,endDate:W,offset:E,limit:m},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getActivity(e){return i(t,{method:"GET",url:"/activities/{activityId}",path:{activityId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listActivitiesOccasions(e,r=!1,a,s,n){return i(t,{method:"GET",url:"/activities/{activityId}/occasions",path:{activityId:e},query:{hideFullyBooked:r,hidePastOccasions:a,startDate:s,endDate:n},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getActivityOccasion(e){return i(t,{method:"GET",url:"/activities/occasions/{occasionId}",path:{occasionId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getAdminActivityOccasions(e,r,a,s,n,l=10){return i(t,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:a,endDate:s,offset:n,limit:l},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateCompetitionAccount(e){return i(t,{method:"PUT",url:"/admin/competition/account/update",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",500:"General Error",503:"Service unavailable, please try again"}})}static listFacilities(e,r,a,s,n,l,p,u,d=10){return i(t,{method:"GET",url:"/facilities",query:{city:e,countryCode:r,name:a,latitude:s,longitude:n,radius:l,resourceTypes:p,offset:u,limit:d},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getFacility(e){return i(t,{method:"GET",url:"/facilities/{facilityId}",path:{facilityId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listResources(e){return i(t,{method:"GET",url:"/facilities/{facilityId}/resources",path:{facilityId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getResource(e){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}",path:{resourceId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listAvailabilities(e,r,a){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities",path:{resourceId:e},query:{startDateTime:r,endDateTime:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserProfile(e){return i(t,{method:"GET",url:"/profiles/users/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getConfig(e){return i(t,{method:"GET",url:"/config/{locale}",path:{locale:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getRelationToFriend(e){return i(t,{method:"GET",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var z=class{static getApiClientList(e,r=10){return i(t,{method:"GET",url:"/api-client",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createApiClient(e){return i(t,{method:"POST",url:"/api-client",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The specified resource identifier already exists",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientById(e){return i(t,{method:"GET",url:"/api-client/{clientId}",path:{clientId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateApiClientById(e,r,a){return i(t,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:a},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientUsageById(e,r){return i(t,{method:"GET",url:"/api-client/{clientId}/usage",path:{clientId:e},query:{month:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var B=class{static getActivityOccasionPrice(e,r){return i(t,{method:"GET",url:"/activities/occasions/{occasionId}/price",path:{occasionId:e},query:{promoCode:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getActivityCancellationPolicy(e,r){return i(t,{method:"GET",url:"/activities/occasions/{occasionId}/cancellation-policy",path:{occasionId:e},query:{locale:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getAvailabilityWithPrice(e,r,a,s,n,l,p){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:a,promoCode:s,numberOfSlots:n,emails:l,userIds:p},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getCancellationPolicy(e,r,a,s){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/cancellation-policy",path:{resourceId:e},query:{startTime:r,endTime:a,locale:s},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createPromoCode(e){return i(t,{method:"POST",url:"/admin/loyalty/promo-codes",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserInfo(){return i(t,{method:"GET",url:"/users/info",errors:{500:"General Error",503:"Service unavailable, please try again"}})}static listUserFavourites(){return i(t,{method:"GET",url:"/users/favourites",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listUserMemberships(){return i(t,{method:"GET",url:"/users/memberships",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createMembership(e){return i(t,{method:"POST",url:"/users/memberships",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listUserPayments(e,r=10){return i(t,{method:"GET",url:"/users/payments",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPayment(e){return i(t,{method:"GET",url:"/users/payments/{paymentId}",path:{paymentId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listUserPendingPayments(){return i(t,{method:"GET",url:"/users/payments/pending",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listUserBookings(e,r=10,a){return i(t,{method:"GET",url:"/users/bookings",query:{offset:e,limit:r,subType:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createBooking(e){return i(t,{method:"POST",url:"/users/bookings/time",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getBookingDetails(e){return i(t,{method:"GET",url:"/users/bookings/time/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteBooking(e){return i(t,{method:"DELETE",url:"/users/bookings/time/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUsersInBooking(e){return i(t,{method:"GET",url:"/users/bookings/{bookingId}/users",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getPriceOfOrderSplitBooking(e){return i(t,{method:"GET",url:"/users/bookings/{bookingId}/price",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static inviteUserToBooking(e,r){return i(t,{method:"POST",url:"/users/bookings/{bookingId}/users/invite/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static addUserToBooking(e,r){return i(t,{method:"POST",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static removeUserFromBooking(e,r){return i(t,{method:"DELETE",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static createActivityBooking(e){return i(t,{method:"POST",url:"/users/bookings/activity",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getActivityDetails(e){return i(t,{method:"GET",url:"/users/bookings/activity/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteActivityBooking(e){return i(t,{method:"DELETE",url:"/users/bookings/activity/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createBookingsAdmin(e){return i(t,{method:"POST",url:"/admin/bookings/time",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateBookingAdmin(e,r){return i(t,{method:"PATCH",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteBookingAdmin(e,r,a){return i(t,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPlaySessionsHistory(e,r=10){return i(t,{method:"GET",url:"/users/playsessions/history",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPlaySessionsUpcoming(){return i(t,{method:"GET",url:"/users/playsessions/upcoming",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static addWaitlistOccasion(e){return i(t,{method:"POST",url:"/users/waitlist/occasions/{id}",path:{id:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static removeWaitlistOccasion(e){return i(t,{method:"DELETE",url:"/users/waitlist/occasions/{id}",path:{id:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static getCheckout(e){return i(t,{method:"GET",url:"/checkout/{token}",path:{token:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createCheckoutBooking(e,r){return i(t,{method:"POST",url:"/checkout/{token}",path:{token:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getPspSession(e,r,a){return i(t,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static applyValueCard(e,r){return i(t,{method:"POST",url:"/checkout/{token}/valuecard",path:{token:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static unapplyValueCard(e,r){return i(t,{method:"DELETE",url:"/checkout/{token}/valuecard/{customerCouponId}",path:{token:e,customerCouponId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static applyPromoCode(e,r){return i(t,{method:"POST",url:"/checkout/{token}/promocode",path:{token:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static unapplyPromocode(e){return i(t,{method:"DELETE",url:"/checkout/{token}/promocode",path:{token:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientList(e,r=10){return i(t,{method:"GET",url:"/api-client",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createApiClient(e){return i(t,{method:"POST",url:"/api-client",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The specified resource identifier already exists",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientById(e){return i(t,{method:"GET",url:"/api-client/{clientId}",path:{clientId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateApiClientById(e,r,a){return i(t,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:a},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientUsageById(e,r){return i(t,{method:"GET",url:"/api-client/{clientId}/usage",path:{clientId:e},query:{month:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var j=class{static getAvailabilityWithPrice(e,r,a,s,n,l,p){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:a,promoCode:s,numberOfSlots:n,emails:l,userIds:p},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUsersInBooking(e){return i(t,{method:"GET",url:"/users/bookings/{bookingId}/users",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getPriceOfOrderSplitBooking(e){return i(t,{method:"GET",url:"/users/bookings/{bookingId}/price",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static inviteUserToBooking(e,r){return i(t,{method:"POST",url:"/users/bookings/{bookingId}/users/invite/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static addUserToBooking(e,r){return i(t,{method:"POST",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static removeUserFromBooking(e,r){return i(t,{method:"DELETE",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static createBookingsAdmin(e){return i(t,{method:"POST",url:"/admin/bookings/time",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateBookingAdmin(e,r){return i(t,{method:"PATCH",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteBookingAdmin(e,r,a){return i(t,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var L=class{static getCheckout(e){return i(t,{method:"GET",url:"/checkout/{token}",path:{token:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getPspSession(e,r,a){return i(t,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}};var N=class{static updateCompetitionAccount(e){return i(t,{method:"PUT",url:"/admin/competition/account/update",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",500:"General Error",503:"Service unavailable, please try again"}})}};var _=class{static options(e){return i(t,{method:"OPTIONS",url:"/{cors+}",path:{"cors+":e},responseHeader:"Access-Control-Allow-Origin"})}};var F=class{static createPromoCode(e){return i(t,{method:"POST",url:"/admin/loyalty/promo-codes",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var H=class{static createMembership(e){return i(t,{method:"POST",url:"/users/memberships",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static cancellationPolicy(e,r){return i(t,{method:"GET",url:"/users/memberships/{membershipTypeId}/cancellation-policy",path:{membershipTypeId:e},query:{locale:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var M=class{static getPlaySessionById(e){return i(t,{method:"GET",url:"/playsessions/{sessionId}",path:{sessionId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static addPlayerWithUserId(e,r){return i(t,{method:"POST",url:"/playsessions/{sessionId}/players/by-userid/{userId}",path:{sessionId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static removePlayerWithUserId(e,r){return i(t,{method:"DELETE",url:"/playsessions/{sessionId}/players/by-userid/{userId}",path:{sessionId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static removePlayerWithUserEmail(e,r){return i(t,{method:"DELETE",url:"/playsessions/{sessionId}/players/by-email/{userEmail}",path:{sessionId:e,userEmail:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updatePlaySessionSettings(e,r){return i(t,{method:"PUT",url:"/playsessions/{sessionId}/settings",path:{sessionId:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static joinPlaySession(e){return i(t,{method:"POST",url:"/users/playsessions/{sessionId}/join",path:{sessionId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPlaySessionsHistory(e,r=10){return i(t,{method:"GET",url:"/users/playsessions/history",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPlaySessionsUpcoming(){return i(t,{method:"GET",url:"/users/playsessions/upcoming",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var $=class{static getUserProfile(e){return i(t,{method:"GET",url:"/profiles/users/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getRelationToFriend(e){return i(t,{method:"GET",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static addRelationToFriend(e){return i(t,{method:"POST",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteRelationToFriend(e){return i(t,{method:"DELETE",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listFriends(e,r=10){return i(t,{method:"GET",url:"/users/relations/friends",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listIncomingFriendRequests(e,r=10){return i(t,{method:"GET",url:"/users/relations/friends/incoming",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};0&&(module.exports={ActivityServiceV1Service,AnonymousService,ApiClientServiceV1Service,ApiError,AuthorizedService,BookingServiceV1Service,CancelError,CancelablePromise,CheckoutServiceV1Service,CompetitionServiceV1Service,CorsService,LoyaltyServiceV1Service,MembershipServiceV1Service,OpenAPI,PlaySessionServiceV1Service,UserServiceV1Service,bookingSubType,cancellationPolicy,clientType,months,playingUserResponse});
|
|
1
|
+
"use strict";var O=Object.defineProperty,ne=Object.defineProperties,se=Object.getOwnPropertyDescriptor,le=Object.getOwnPropertyDescriptors,pe=Object.getOwnPropertyNames,ee=Object.getOwnPropertySymbols;var oe=Object.prototype.hasOwnProperty,ue=Object.prototype.propertyIsEnumerable;var re=(o,e,r)=>e in o?O(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,A=(o,e)=>{for(var r in e||(e={}))oe.call(e,r)&&re(o,r,e[r]);if(ee)for(var r of ee(e))ue.call(e,r)&&re(o,r,e[r]);return o},te=(o,e)=>ne(o,le(e));var ce=(o,e)=>{for(var r in e)O(o,r,{get:e[r],enumerable:!0})},me=(o,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of pe(e))!oe.call(o,n)&&n!==r&&O(o,n,{get:()=>e[n],enumerable:!(a=se(e,n))||a.enumerable});return o};var de=o=>me(O({},"__esModule",{value:!0}),o);var ie=(o,e,r)=>{if(!e.has(o))throw TypeError("Cannot "+r)};var c=(o,e,r)=>(ie(o,e,"read from private field"),r?r.call(o):e.get(o)),I=(o,e,r)=>{if(e.has(o))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(o):e.set(o,r)},y=(o,e,r,a)=>(ie(o,e,"write to private field"),a?a.call(o,r):e.set(o,r),r);var S=(o,e,r)=>new Promise((a,n)=>{var s=u=>{try{p(r.next(u))}catch(d){n(d)}},l=u=>{try{p(r.throw(u))}catch(d){n(d)}},p=u=>u.done?a(u.value):Promise.resolve(u.value).then(s,l);p((r=r.apply(o,e)).next())});var Ee={};ce(Ee,{ActivityServiceV1Service:()=>z,AnonymousService:()=>B,ApiClientServiceV1Service:()=>N,ApiError:()=>v,AuthorizedService:()=>j,BookingServiceV1Service:()=>L,CancelError:()=>x,CancelablePromise:()=>C,CheckoutServiceV1Service:()=>F,CompetitionServiceV1Service:()=>_,CorsService:()=>H,LoyaltyServiceV1Service:()=>M,MembershipServiceV1Service:()=>W,OpenAPI:()=>t,PlaySessionServiceV1Service:()=>Y,UserServiceV1Service:()=>$,bookingSubType:()=>J,bookingSubscription:()=>G,cancellationPolicy:()=>w,clientType:()=>V,months:()=>K,playingUserResponse:()=>D});module.exports=de(Ee);var v=class extends Error{constructor(r,a,n){super(n);this.name="ApiError",this.url=a.url,this.status=a.status,this.statusText=a.statusText,this.body=a.body,this.request=r}};var x=class extends Error{constructor(e){super(e),this.name="CancelError"}get isCancelled(){return!0}},g,h,b,T,P,k,E,C=class{constructor(e){I(this,g,void 0);I(this,h,void 0);I(this,b,void 0);I(this,T,void 0);I(this,P,void 0);I(this,k,void 0);I(this,E,void 0);y(this,g,!1),y(this,h,!1),y(this,b,!1),y(this,T,[]),y(this,P,new Promise((r,a)=>{y(this,k,r),y(this,E,a);let n=p=>{var u;c(this,g)||c(this,h)||c(this,b)||(y(this,g,!0),(u=c(this,k))==null||u.call(this,p))},s=p=>{var u;c(this,g)||c(this,h)||c(this,b)||(y(this,h,!0),(u=c(this,E))==null||u.call(this,p))},l=p=>{c(this,g)||c(this,h)||c(this,b)||c(this,T).push(p)};return Object.defineProperty(l,"isResolved",{get:()=>c(this,g)}),Object.defineProperty(l,"isRejected",{get:()=>c(this,h)}),Object.defineProperty(l,"isCancelled",{get:()=>c(this,b)}),e(n,s,l)}))}get[Symbol.toStringTag](){return"Cancellable Promise"}then(e,r){return c(this,P).then(e,r)}catch(e){return c(this,P).catch(e)}finally(e){return c(this,P).finally(e)}cancel(){var e;if(!(c(this,g)||c(this,h)||c(this,b))){if(y(this,b,!0),c(this,T).length)try{for(let r of c(this,T))r()}catch(r){console.warn("Cancellation threw an error",r);return}c(this,T).length=0,(e=c(this,E))==null||e.call(this,new x("Request aborted"))}}get isCancelled(){return c(this,b)}};g=new WeakMap,h=new WeakMap,b=new WeakMap,T=new WeakMap,P=new WeakMap,k=new WeakMap,E=new WeakMap;var t={BASE:"https://api.dev.matchi.com",VERSION:"1",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0};var G;(e=>{let o;(f=>(f.MONDAY="MONDAY",f.TUESDAY="TUESDAY",f.WEDNESDAY="WEDNESDAY",f.THURSDAY="THURSDAY",f.FRIDAY="FRIDAY",f.SATURDAY="SATURDAY",f.SUNDAY="SUNDAY",f.UNKNOWN="UNKNOWN"))(o=e.weekDay||(e.weekDay={}))})(G||(G={}));var J=(s=>(s.BOOKING="booking",s.ACTIVITY="activity",s.SPLIT="split",s.SPLIT_MAIN="split_main",s.SPLIT_INVITE="split_invite",s))(J||{});var w;(e=>{let o;(n=>(n.AVAILABILITY="AVAILABILITY",n.OCCASION="OCCASION"))(o=e.itemType||(e.itemType={}))})(w||(w={}));var V=(r=>(r.WIDGET="WIDGET",r.API="API",r))(V||{});var K=(m=>(m.JANUARY="January",m.FEBRUARY="February",m.MARCH="March",m.APRIL="April",m.MAY="May",m.JUNE="June",m.JULY="July",m.AUGUST="August",m.SEPTEMBER="September",m.OCTOBER="October",m.NOVEMBER="November",m.DECEMBER="December",m))(K||{});var D;(e=>{let o;(l=>(l.PAID="PAID",l.INVITED="INVITED",l.JOINED="JOINED",l.BOOKER="BOOKER"))(o=e.status||(e.status={}))})(D||(D={}));var X=o=>o!=null,U=o=>typeof o=="string",Q=o=>U(o)&&o!=="",Z=o=>typeof o=="object"&&typeof o.type=="string"&&typeof o.stream=="function"&&typeof o.arrayBuffer=="function"&&typeof o.constructor=="function"&&typeof o.constructor.name=="string"&&/^(Blob|File)$/.test(o.constructor.name)&&/^(Blob|File)$/.test(o[Symbol.toStringTag]),ae=o=>o instanceof FormData,fe=o=>{try{return btoa(o)}catch(e){return Buffer.from(o).toString("base64")}},ye=o=>{let e=[],r=(n,s)=>{e.push(`${encodeURIComponent(n)}=${encodeURIComponent(String(s))}`)},a=(n,s)=>{X(s)&&(Array.isArray(s)?s.forEach(l=>{a(n,l)}):typeof s=="object"?Object.entries(s).forEach(([l,p])=>{a(`${n}[${l}]`,p)}):r(n,s))};return Object.entries(o).forEach(([n,s])=>{a(n,s)}),e.length>0?`?${e.join("&")}`:""},be=(o,e)=>{let r=o.ENCODE_PATH||encodeURI,a=e.url.replace("{api-version}",o.VERSION).replace(/{(.*?)}/g,(s,l)=>{var p;return(p=e.path)!=null&&p.hasOwnProperty(l)?r(String(e.path[l])):s}),n=`${o.BASE}${a}`;return e.query?`${n}${ye(e.query)}`:n},ge=o=>{if(o.formData){let e=new FormData,r=(a,n)=>{U(n)||Z(n)?e.append(a,n):e.append(a,JSON.stringify(n))};return Object.entries(o.formData).filter(([a,n])=>X(n)).forEach(([a,n])=>{Array.isArray(n)?n.forEach(s=>r(a,s)):r(a,n)}),e}},q=(o,e)=>S(void 0,null,function*(){return typeof e=="function"?e(o):e}),he=(o,e)=>S(void 0,null,function*(){let r=yield q(e,o.TOKEN),a=yield q(e,o.USERNAME),n=yield q(e,o.PASSWORD),s=yield q(e,o.HEADERS),l=Object.entries(A(A({Accept:"application/json"},s),e.headers)).filter(([p,u])=>X(u)).reduce((p,[u,d])=>te(A({},p),{[u]:String(d)}),{});if(Q(r)&&(l.Authorization=`Bearer ${r}`),Q(a)&&Q(n)){let p=fe(`${a}:${n}`);l.Authorization=`Basic ${p}`}return e.body&&(e.mediaType?l["Content-Type"]=e.mediaType:Z(e.body)?l["Content-Type"]=e.body.type||"application/octet-stream":U(e.body)?l["Content-Type"]="text/plain":ae(e.body)||(l["Content-Type"]="application/json")),new Headers(l)}),Ie=o=>{var e;if(o.body!==void 0)return(e=o.mediaType)!=null&&e.includes("/json")?JSON.stringify(o.body):U(o.body)||Z(o.body)||ae(o.body)?o.body:JSON.stringify(o.body)},Te=(o,e,r,a,n,s,l)=>S(void 0,null,function*(){let p=new AbortController,u={headers:s,body:a!=null?a:n,method:e.method,signal:p.signal};return o.WITH_CREDENTIALS&&(u.credentials=o.CREDENTIALS),l(()=>p.abort()),yield fetch(r,u)}),ve=(o,e)=>{if(e){let r=o.headers.get(e);if(U(r))return r}},Pe=o=>S(void 0,null,function*(){if(o.status!==204)try{let e=o.headers.get("Content-Type");if(e)return["application/json","application/problem+json"].some(n=>e.toLowerCase().startsWith(n))?yield o.json():yield o.text()}catch(e){console.error(e)}}),Se=(o,e)=>{var n,s;let a=A({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},o.errors)[e.status];if(a)throw new v(o,e,a);if(!e.ok){let l=(n=e.status)!=null?n:"unknown",p=(s=e.statusText)!=null?s:"unknown",u=(()=>{try{return JSON.stringify(e.body,null,2)}catch(d){return}})();throw new v(o,e,`Generic Error: status: ${l}; status text: ${p}; body: ${u}`)}},i=(o,e)=>new C((r,a,n)=>S(void 0,null,function*(){try{let s=be(o,e),l=ge(e),p=Ie(e),u=yield he(o,e);if(!n.isCancelled){let d=yield Te(o,e,s,p,l,u,n),f=yield Pe(d),R=ve(d,e.responseHeader),m={url:s,ok:d.ok,status:d.status,statusText:d.statusText,body:R!=null?R:f};Se(e,m),r(m.body)}}catch(s){a(s)}}));var z=class{static getAdminActivityOccasions(e,r,a,n,s,l=10){return i(t,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:a,endDate:n,offset:s,limit:l},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var B=class{static listActivities(e=!1,r=!1,a,n,s,l,p,u,d,f,R,m=10){return i(t,{method:"GET",url:"/activities",query:{hideFullyBooked:e,exposeOccasions:r,facilityIds:a,level:n,locationSearch:s,categorySearch:l,querySearch:p,resourceTypes:u,startDate:d,endDate:f,offset:R,limit:m},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getActivity(e){return i(t,{method:"GET",url:"/activities/{activityId}",path:{activityId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listActivitiesOccasions(e,r=!1,a,n,s){return i(t,{method:"GET",url:"/activities/{activityId}/occasions",path:{activityId:e},query:{hideFullyBooked:r,hidePastOccasions:a,startDate:n,endDate:s},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getActivityOccasion(e){return i(t,{method:"GET",url:"/activities/occasions/{occasionId}",path:{occasionId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getAdminActivityOccasions(e,r,a,n,s,l=10){return i(t,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:a,endDate:n,offset:s,limit:l},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateCompetitionAccount(e){return i(t,{method:"PUT",url:"/admin/competition/account/update",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",500:"General Error",503:"Service unavailable, please try again"}})}static listFacilities(e,r,a,n,s,l,p,u,d=10){return i(t,{method:"GET",url:"/facilities",query:{city:e,countryCode:r,name:a,latitude:n,longitude:s,radius:l,resourceTypes:p,offset:u,limit:d},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getFacility(e){return i(t,{method:"GET",url:"/facilities/{facilityId}",path:{facilityId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listResources(e){return i(t,{method:"GET",url:"/facilities/{facilityId}/resources",path:{facilityId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getResource(e){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}",path:{resourceId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listAvailabilities(e,r,a){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities",path:{resourceId:e},query:{startDateTime:r,endDateTime:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserProfile(e){return i(t,{method:"GET",url:"/profiles/users/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getConfig(e){return i(t,{method:"GET",url:"/config/{locale}",path:{locale:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getRelationToFriend(e){return i(t,{method:"GET",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var N=class{static getApiClientList(e,r=10){return i(t,{method:"GET",url:"/api-client",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createApiClient(e){return i(t,{method:"POST",url:"/api-client",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The specified resource identifier already exists",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientById(e){return i(t,{method:"GET",url:"/api-client/{clientId}",path:{clientId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateApiClientById(e,r,a){return i(t,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:a},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientUsageById(e,r){return i(t,{method:"GET",url:"/api-client/{clientId}/usage",path:{clientId:e},query:{month:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var j=class{static getActivityOccasionPrice(e,r){return i(t,{method:"GET",url:"/activities/occasions/{occasionId}/price",path:{occasionId:e},query:{promoCode:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getActivityCancellationPolicy(e,r){return i(t,{method:"GET",url:"/activities/occasions/{occasionId}/cancellation-policy",path:{occasionId:e},query:{locale:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getAvailabilityWithPrice(e,r,a,n,s,l,p){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:a,promoCode:n,numberOfSlots:s,emails:l,userIds:p},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getCancellationPolicy(e,r,a,n){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/cancellation-policy",path:{resourceId:e},query:{startTime:r,endTime:a,locale:n},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createPromoCode(e){return i(t,{method:"POST",url:"/admin/loyalty/promo-codes",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserInfo(){return i(t,{method:"GET",url:"/users/info",errors:{500:"General Error",503:"Service unavailable, please try again"}})}static listUserFavourites(){return i(t,{method:"GET",url:"/users/favourites",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listUserMemberships(){return i(t,{method:"GET",url:"/users/memberships",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createMembership(e){return i(t,{method:"POST",url:"/users/memberships",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listUserPayments(e,r=10){return i(t,{method:"GET",url:"/users/payments",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPayment(e){return i(t,{method:"GET",url:"/users/payments/{paymentId}",path:{paymentId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listUserPendingPayments(){return i(t,{method:"GET",url:"/users/payments/pending",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listUserBookings(e,r=10,a){return i(t,{method:"GET",url:"/users/bookings",query:{offset:e,limit:r,subType:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createBooking(e){return i(t,{method:"POST",url:"/users/bookings/time",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getBookingDetails(e){return i(t,{method:"GET",url:"/users/bookings/time/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteBooking(e){return i(t,{method:"DELETE",url:"/users/bookings/time/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getBookingSubscriptionDetails(e){return i(t,{method:"GET",url:"/users/bookings/subscriptions/{subscriptionId}",path:{subscriptionId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUsersInBooking(e){return i(t,{method:"GET",url:"/users/bookings/{bookingId}/users",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getPriceOfOrderSplitBooking(e){return i(t,{method:"GET",url:"/users/bookings/{bookingId}/price",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static inviteUserToBooking(e,r){return i(t,{method:"POST",url:"/users/bookings/{bookingId}/users/invite/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static addUserToBooking(e,r){return i(t,{method:"POST",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static removeUserFromBooking(e,r){return i(t,{method:"DELETE",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static createActivityBooking(e){return i(t,{method:"POST",url:"/users/bookings/activity",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getActivityDetails(e){return i(t,{method:"GET",url:"/users/bookings/activity/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteActivityBooking(e){return i(t,{method:"DELETE",url:"/users/bookings/activity/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createBookingsAdmin(e){return i(t,{method:"POST",url:"/admin/bookings/time",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateBookingAdmin(e,r){return i(t,{method:"PATCH",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteBookingAdmin(e,r,a){return i(t,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPlaySessionsHistory(e,r=10){return i(t,{method:"GET",url:"/users/playsessions/history",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPlaySessionsUpcoming(){return i(t,{method:"GET",url:"/users/playsessions/upcoming",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static addWaitlistOccasion(e){return i(t,{method:"POST",url:"/users/waitlist/occasions/{id}",path:{id:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static removeWaitlistOccasion(e){return i(t,{method:"DELETE",url:"/users/waitlist/occasions/{id}",path:{id:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static getCheckout(e){return i(t,{method:"GET",url:"/checkout/{token}",path:{token:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createCheckoutBooking(e,r){return i(t,{method:"POST",url:"/checkout/{token}",path:{token:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getPspSession(e,r,a){return i(t,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static applyValueCard(e,r){return i(t,{method:"POST",url:"/checkout/{token}/valuecard",path:{token:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static unapplyValueCard(e,r){return i(t,{method:"DELETE",url:"/checkout/{token}/valuecard/{customerCouponId}",path:{token:e,customerCouponId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static applyPromoCode(e,r){return i(t,{method:"POST",url:"/checkout/{token}/promocode",path:{token:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static unapplyPromocode(e){return i(t,{method:"DELETE",url:"/checkout/{token}/promocode",path:{token:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientList(e,r=10){return i(t,{method:"GET",url:"/api-client",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createApiClient(e){return i(t,{method:"POST",url:"/api-client",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The specified resource identifier already exists",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientById(e){return i(t,{method:"GET",url:"/api-client/{clientId}",path:{clientId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateApiClientById(e,r,a){return i(t,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:a},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientUsageById(e,r){return i(t,{method:"GET",url:"/api-client/{clientId}/usage",path:{clientId:e},query:{month:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var L=class{static getAvailabilityWithPrice(e,r,a,n,s,l,p){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:a,promoCode:n,numberOfSlots:s,emails:l,userIds:p},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getBookingSubscriptionDetails(e){return i(t,{method:"GET",url:"/users/bookings/subscriptions/{subscriptionId}",path:{subscriptionId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUsersInBooking(e){return i(t,{method:"GET",url:"/users/bookings/{bookingId}/users",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getPriceOfOrderSplitBooking(e){return i(t,{method:"GET",url:"/users/bookings/{bookingId}/price",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static inviteUserToBooking(e,r){return i(t,{method:"POST",url:"/users/bookings/{bookingId}/users/invite/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static addUserToBooking(e,r){return i(t,{method:"POST",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static removeUserFromBooking(e,r){return i(t,{method:"DELETE",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static createBookingsAdmin(e){return i(t,{method:"POST",url:"/admin/bookings/time",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateBookingAdmin(e,r){return i(t,{method:"PATCH",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteBookingAdmin(e,r,a){return i(t,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var F=class{static getCheckout(e){return i(t,{method:"GET",url:"/checkout/{token}",path:{token:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getPspSession(e,r,a){return i(t,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}};var _=class{static updateCompetitionAccount(e){return i(t,{method:"PUT",url:"/admin/competition/account/update",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",500:"General Error",503:"Service unavailable, please try again"}})}};var H=class{static options(e){return i(t,{method:"OPTIONS",url:"/{cors+}",path:{"cors+":e},responseHeader:"Access-Control-Allow-Origin"})}};var M=class{static createPromoCode(e){return i(t,{method:"POST",url:"/admin/loyalty/promo-codes",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var W=class{static createMembership(e){return i(t,{method:"POST",url:"/users/memberships",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static cancellationPolicy(e,r){return i(t,{method:"GET",url:"/users/memberships/{membershipTypeId}/cancellation-policy",path:{membershipTypeId:e},query:{locale:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var Y=class{static getPlaySessionById(e){return i(t,{method:"GET",url:"/playsessions/{sessionId}",path:{sessionId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static addPlayerWithUserId(e,r){return i(t,{method:"POST",url:"/playsessions/{sessionId}/players/by-userid/{userId}",path:{sessionId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static removePlayerWithUserId(e,r){return i(t,{method:"DELETE",url:"/playsessions/{sessionId}/players/by-userid/{userId}",path:{sessionId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static removePlayerWithUserEmail(e,r){return i(t,{method:"DELETE",url:"/playsessions/{sessionId}/players/by-email/{userEmail}",path:{sessionId:e,userEmail:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updatePlaySessionSettings(e,r){return i(t,{method:"PUT",url:"/playsessions/{sessionId}/settings",path:{sessionId:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static joinPlaySession(e){return i(t,{method:"POST",url:"/users/playsessions/{sessionId}/join",path:{sessionId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPlaySessionsHistory(e,r=10){return i(t,{method:"GET",url:"/users/playsessions/history",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPlaySessionsUpcoming(){return i(t,{method:"GET",url:"/users/playsessions/upcoming",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var $=class{static getUserProfile(e){return i(t,{method:"GET",url:"/profiles/users/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getRelationToFriend(e){return i(t,{method:"GET",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static addRelationToFriend(e){return i(t,{method:"POST",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteRelationToFriend(e){return i(t,{method:"DELETE",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listFriends(e,r=10){return i(t,{method:"GET",url:"/users/relations/friends",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listIncomingFriendRequests(e,r=10){return i(t,{method:"GET",url:"/users/relations/friends/incoming",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};0&&(module.exports={ActivityServiceV1Service,AnonymousService,ApiClientServiceV1Service,ApiError,AuthorizedService,BookingServiceV1Service,CancelError,CancelablePromise,CheckoutServiceV1Service,CompetitionServiceV1Service,CorsService,LoyaltyServiceV1Service,MembershipServiceV1Service,OpenAPI,PlaySessionServiceV1Service,UserServiceV1Service,bookingSubType,bookingSubscription,cancellationPolicy,clientType,months,playingUserResponse});
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var te=Object.defineProperty,ie=Object.defineProperties;var ae=Object.getOwnPropertyDescriptors;var K=Object.getOwnPropertySymbols;var se=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable;var Y=(o,e,r)=>e in o?te(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,E=(o,e)=>{for(var r in e||(e={}))se.call(e,r)&&Y(o,r,e[r]);if(K)for(var r of K(e))ne.call(e,r)&&Y(o,r,e[r]);return o},Q=(o,e)=>ie(o,ae(e));var X=(o,e,r)=>{if(!e.has(o))throw TypeError("Cannot "+r)};var c=(o,e,r)=>(X(o,e,"read from private field"),r?r.call(o):e.get(o)),h=(o,e,r)=>{if(e.has(o))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(o):e.set(o,r)},f=(o,e,r,a)=>(X(o,e,"write to private field"),a?a.call(o,r):e.set(o,r),r);var v=(o,e,r)=>new Promise((a,s)=>{var n=u=>{try{p(r.next(u))}catch(d){s(d)}},l=u=>{try{p(r.throw(u))}catch(d){s(d)}},p=u=>u.done?a(u.value):Promise.resolve(u.value).then(n,l);p((r=r.apply(o,e)).next())});var P=class extends Error{constructor(r,a,s){super(s);this.name="ApiError",this.url=a.url,this.status=a.status,this.statusText=a.statusText,this.body=a.body,this.request=r}};var k=class extends Error{constructor(e){super(e),this.name="CancelError"}get isCancelled(){return!0}},b,g,y,T,I,A,C,R=class{constructor(e){h(this,b,void 0);h(this,g,void 0);h(this,y,void 0);h(this,T,void 0);h(this,I,void 0);h(this,A,void 0);h(this,C,void 0);f(this,b,!1),f(this,g,!1),f(this,y,!1),f(this,T,[]),f(this,I,new Promise((r,a)=>{f(this,A,r),f(this,C,a);let s=p=>{var u;c(this,b)||c(this,g)||c(this,y)||(f(this,b,!0),(u=c(this,A))==null||u.call(this,p))},n=p=>{var u;c(this,b)||c(this,g)||c(this,y)||(f(this,g,!0),(u=c(this,C))==null||u.call(this,p))},l=p=>{c(this,b)||c(this,g)||c(this,y)||c(this,T).push(p)};return Object.defineProperty(l,"isResolved",{get:()=>c(this,b)}),Object.defineProperty(l,"isRejected",{get:()=>c(this,g)}),Object.defineProperty(l,"isCancelled",{get:()=>c(this,y)}),e(s,n,l)}))}get[Symbol.toStringTag](){return"Cancellable Promise"}then(e,r){return c(this,I).then(e,r)}catch(e){return c(this,I).catch(e)}finally(e){return c(this,I).finally(e)}cancel(){var e;if(!(c(this,b)||c(this,g)||c(this,y))){if(f(this,y,!0),c(this,T).length)try{for(let r of c(this,T))r()}catch(r){console.warn("Cancellation threw an error",r);return}c(this,T).length=0,(e=c(this,C))==null||e.call(this,new k("Request aborted"))}}get isCancelled(){return c(this,y)}};b=new WeakMap,g=new WeakMap,y=new WeakMap,T=new WeakMap,I=new WeakMap,A=new WeakMap,C=new WeakMap;var t={BASE:"https://api.dev.matchi.com",VERSION:"1",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0};var Z=(n=>(n.BOOKING="booking",n.ACTIVITY="activity",n.SPLIT="split",n.SPLIT_MAIN="split_main",n.SPLIT_INVITE="split_invite",n))(Z||{});var G;(e=>{let o;(s=>(s.AVAILABILITY="AVAILABILITY",s.OCCASION="OCCASION"))(o=e.itemType||(e.itemType={}))})(G||(G={}));var ee=(r=>(r.WIDGET="WIDGET",r.API="API",r))(ee||{});var re=(m=>(m.JANUARY="January",m.FEBRUARY="February",m.MARCH="March",m.APRIL="April",m.MAY="May",m.JUNE="June",m.JULY="July",m.AUGUST="August",m.SEPTEMBER="September",m.OCTOBER="October",m.NOVEMBER="November",m.DECEMBER="December",m))(re||{});var w;(e=>{let o;(l=>(l.PAID="PAID",l.INVITED="INVITED",l.JOINED="JOINED",l.BOOKER="BOOKER"))(o=e.status||(e.status={}))})(w||(w={}));var D=o=>o!=null,x=o=>typeof o=="string",q=o=>x(o)&&o!=="",z=o=>typeof o=="object"&&typeof o.type=="string"&&typeof o.stream=="function"&&typeof o.arrayBuffer=="function"&&typeof o.constructor=="function"&&typeof o.constructor.name=="string"&&/^(Blob|File)$/.test(o.constructor.name)&&/^(Blob|File)$/.test(o[Symbol.toStringTag]),oe=o=>o instanceof FormData,le=o=>{try{return btoa(o)}catch(e){return Buffer.from(o).toString("base64")}},pe=o=>{let e=[],r=(s,n)=>{e.push(`${encodeURIComponent(s)}=${encodeURIComponent(String(n))}`)},a=(s,n)=>{D(n)&&(Array.isArray(n)?n.forEach(l=>{a(s,l)}):typeof n=="object"?Object.entries(n).forEach(([l,p])=>{a(`${s}[${l}]`,p)}):r(s,n))};return Object.entries(o).forEach(([s,n])=>{a(s,n)}),e.length>0?`?${e.join("&")}`:""},ue=(o,e)=>{let r=o.ENCODE_PATH||encodeURI,a=e.url.replace("{api-version}",o.VERSION).replace(/{(.*?)}/g,(n,l)=>{var p;return(p=e.path)!=null&&p.hasOwnProperty(l)?r(String(e.path[l])):n}),s=`${o.BASE}${a}`;return e.query?`${s}${pe(e.query)}`:s},ce=o=>{if(o.formData){let e=new FormData,r=(a,s)=>{x(s)||z(s)?e.append(a,s):e.append(a,JSON.stringify(s))};return Object.entries(o.formData).filter(([a,s])=>D(s)).forEach(([a,s])=>{Array.isArray(s)?s.forEach(n=>r(a,n)):r(a,s)}),e}},O=(o,e)=>v(void 0,null,function*(){return typeof e=="function"?e(o):e}),me=(o,e)=>v(void 0,null,function*(){let r=yield O(e,o.TOKEN),a=yield O(e,o.USERNAME),s=yield O(e,o.PASSWORD),n=yield O(e,o.HEADERS),l=Object.entries(E(E({Accept:"application/json"},n),e.headers)).filter(([p,u])=>D(u)).reduce((p,[u,d])=>Q(E({},p),{[u]:String(d)}),{});if(q(r)&&(l.Authorization=`Bearer ${r}`),q(a)&&q(s)){let p=le(`${a}:${s}`);l.Authorization=`Basic ${p}`}return e.body&&(e.mediaType?l["Content-Type"]=e.mediaType:z(e.body)?l["Content-Type"]=e.body.type||"application/octet-stream":x(e.body)?l["Content-Type"]="text/plain":oe(e.body)||(l["Content-Type"]="application/json")),new Headers(l)}),de=o=>{var e;if(o.body!==void 0)return(e=o.mediaType)!=null&&e.includes("/json")?JSON.stringify(o.body):x(o.body)||z(o.body)||oe(o.body)?o.body:JSON.stringify(o.body)},fe=(o,e,r,a,s,n,l)=>v(void 0,null,function*(){let p=new AbortController,u={headers:n,body:a!=null?a:s,method:e.method,signal:p.signal};return o.WITH_CREDENTIALS&&(u.credentials=o.CREDENTIALS),l(()=>p.abort()),yield fetch(r,u)}),ye=(o,e)=>{if(e){let r=o.headers.get(e);if(x(r))return r}},be=o=>v(void 0,null,function*(){if(o.status!==204)try{let e=o.headers.get("Content-Type");if(e)return["application/json","application/problem+json"].some(s=>e.toLowerCase().startsWith(s))?yield o.json():yield o.text()}catch(e){console.error(e)}}),ge=(o,e)=>{var s,n;let a=E({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},o.errors)[e.status];if(a)throw new P(o,e,a);if(!e.ok){let l=(s=e.status)!=null?s:"unknown",p=(n=e.statusText)!=null?n:"unknown",u=(()=>{try{return JSON.stringify(e.body,null,2)}catch(d){return}})();throw new P(o,e,`Generic Error: status: ${l}; status text: ${p}; body: ${u}`)}},i=(o,e)=>new R((r,a,s)=>v(void 0,null,function*(){try{let n=ue(o,e),l=ce(e),p=de(e),u=yield me(o,e);if(!s.isCancelled){let d=yield fe(o,e,n,p,l,u,s),U=yield be(d),S=ye(d,e.responseHeader),m={url:n,ok:d.ok,status:d.status,statusText:d.statusText,body:S!=null?S:U};ge(e,m),r(m.body)}}catch(n){a(n)}}));var B=class{static getAdminActivityOccasions(e,r,a,s,n,l=10){return i(t,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:a,endDate:s,offset:n,limit:l},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var j=class{static listActivities(e=!1,r=!1,a,s,n,l,p,u,d,U,S,m=10){return i(t,{method:"GET",url:"/activities",query:{hideFullyBooked:e,exposeOccasions:r,facilityIds:a,level:s,locationSearch:n,categorySearch:l,querySearch:p,resourceTypes:u,startDate:d,endDate:U,offset:S,limit:m},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getActivity(e){return i(t,{method:"GET",url:"/activities/{activityId}",path:{activityId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listActivitiesOccasions(e,r=!1,a,s,n){return i(t,{method:"GET",url:"/activities/{activityId}/occasions",path:{activityId:e},query:{hideFullyBooked:r,hidePastOccasions:a,startDate:s,endDate:n},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getActivityOccasion(e){return i(t,{method:"GET",url:"/activities/occasions/{occasionId}",path:{occasionId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getAdminActivityOccasions(e,r,a,s,n,l=10){return i(t,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:a,endDate:s,offset:n,limit:l},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateCompetitionAccount(e){return i(t,{method:"PUT",url:"/admin/competition/account/update",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",500:"General Error",503:"Service unavailable, please try again"}})}static listFacilities(e,r,a,s,n,l,p,u,d=10){return i(t,{method:"GET",url:"/facilities",query:{city:e,countryCode:r,name:a,latitude:s,longitude:n,radius:l,resourceTypes:p,offset:u,limit:d},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getFacility(e){return i(t,{method:"GET",url:"/facilities/{facilityId}",path:{facilityId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listResources(e){return i(t,{method:"GET",url:"/facilities/{facilityId}/resources",path:{facilityId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getResource(e){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}",path:{resourceId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listAvailabilities(e,r,a){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities",path:{resourceId:e},query:{startDateTime:r,endDateTime:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserProfile(e){return i(t,{method:"GET",url:"/profiles/users/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getConfig(e){return i(t,{method:"GET",url:"/config/{locale}",path:{locale:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getRelationToFriend(e){return i(t,{method:"GET",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var L=class{static getApiClientList(e,r=10){return i(t,{method:"GET",url:"/api-client",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createApiClient(e){return i(t,{method:"POST",url:"/api-client",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The specified resource identifier already exists",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientById(e){return i(t,{method:"GET",url:"/api-client/{clientId}",path:{clientId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateApiClientById(e,r,a){return i(t,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:a},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientUsageById(e,r){return i(t,{method:"GET",url:"/api-client/{clientId}/usage",path:{clientId:e},query:{month:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var N=class{static getActivityOccasionPrice(e,r){return i(t,{method:"GET",url:"/activities/occasions/{occasionId}/price",path:{occasionId:e},query:{promoCode:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getActivityCancellationPolicy(e,r){return i(t,{method:"GET",url:"/activities/occasions/{occasionId}/cancellation-policy",path:{occasionId:e},query:{locale:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getAvailabilityWithPrice(e,r,a,s,n,l,p){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:a,promoCode:s,numberOfSlots:n,emails:l,userIds:p},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getCancellationPolicy(e,r,a,s){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/cancellation-policy",path:{resourceId:e},query:{startTime:r,endTime:a,locale:s},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createPromoCode(e){return i(t,{method:"POST",url:"/admin/loyalty/promo-codes",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserInfo(){return i(t,{method:"GET",url:"/users/info",errors:{500:"General Error",503:"Service unavailable, please try again"}})}static listUserFavourites(){return i(t,{method:"GET",url:"/users/favourites",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listUserMemberships(){return i(t,{method:"GET",url:"/users/memberships",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createMembership(e){return i(t,{method:"POST",url:"/users/memberships",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listUserPayments(e,r=10){return i(t,{method:"GET",url:"/users/payments",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPayment(e){return i(t,{method:"GET",url:"/users/payments/{paymentId}",path:{paymentId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listUserPendingPayments(){return i(t,{method:"GET",url:"/users/payments/pending",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listUserBookings(e,r=10,a){return i(t,{method:"GET",url:"/users/bookings",query:{offset:e,limit:r,subType:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createBooking(e){return i(t,{method:"POST",url:"/users/bookings/time",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getBookingDetails(e){return i(t,{method:"GET",url:"/users/bookings/time/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteBooking(e){return i(t,{method:"DELETE",url:"/users/bookings/time/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUsersInBooking(e){return i(t,{method:"GET",url:"/users/bookings/{bookingId}/users",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getPriceOfOrderSplitBooking(e){return i(t,{method:"GET",url:"/users/bookings/{bookingId}/price",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static inviteUserToBooking(e,r){return i(t,{method:"POST",url:"/users/bookings/{bookingId}/users/invite/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static addUserToBooking(e,r){return i(t,{method:"POST",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static removeUserFromBooking(e,r){return i(t,{method:"DELETE",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static createActivityBooking(e){return i(t,{method:"POST",url:"/users/bookings/activity",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getActivityDetails(e){return i(t,{method:"GET",url:"/users/bookings/activity/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteActivityBooking(e){return i(t,{method:"DELETE",url:"/users/bookings/activity/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createBookingsAdmin(e){return i(t,{method:"POST",url:"/admin/bookings/time",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateBookingAdmin(e,r){return i(t,{method:"PATCH",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteBookingAdmin(e,r,a){return i(t,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPlaySessionsHistory(e,r=10){return i(t,{method:"GET",url:"/users/playsessions/history",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPlaySessionsUpcoming(){return i(t,{method:"GET",url:"/users/playsessions/upcoming",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static addWaitlistOccasion(e){return i(t,{method:"POST",url:"/users/waitlist/occasions/{id}",path:{id:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static removeWaitlistOccasion(e){return i(t,{method:"DELETE",url:"/users/waitlist/occasions/{id}",path:{id:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static getCheckout(e){return i(t,{method:"GET",url:"/checkout/{token}",path:{token:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createCheckoutBooking(e,r){return i(t,{method:"POST",url:"/checkout/{token}",path:{token:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getPspSession(e,r,a){return i(t,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static applyValueCard(e,r){return i(t,{method:"POST",url:"/checkout/{token}/valuecard",path:{token:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static unapplyValueCard(e,r){return i(t,{method:"DELETE",url:"/checkout/{token}/valuecard/{customerCouponId}",path:{token:e,customerCouponId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static applyPromoCode(e,r){return i(t,{method:"POST",url:"/checkout/{token}/promocode",path:{token:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static unapplyPromocode(e){return i(t,{method:"DELETE",url:"/checkout/{token}/promocode",path:{token:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientList(e,r=10){return i(t,{method:"GET",url:"/api-client",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createApiClient(e){return i(t,{method:"POST",url:"/api-client",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The specified resource identifier already exists",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientById(e){return i(t,{method:"GET",url:"/api-client/{clientId}",path:{clientId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateApiClientById(e,r,a){return i(t,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:a},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientUsageById(e,r){return i(t,{method:"GET",url:"/api-client/{clientId}/usage",path:{clientId:e},query:{month:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var _=class{static getAvailabilityWithPrice(e,r,a,s,n,l,p){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:a,promoCode:s,numberOfSlots:n,emails:l,userIds:p},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUsersInBooking(e){return i(t,{method:"GET",url:"/users/bookings/{bookingId}/users",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getPriceOfOrderSplitBooking(e){return i(t,{method:"GET",url:"/users/bookings/{bookingId}/price",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static inviteUserToBooking(e,r){return i(t,{method:"POST",url:"/users/bookings/{bookingId}/users/invite/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static addUserToBooking(e,r){return i(t,{method:"POST",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static removeUserFromBooking(e,r){return i(t,{method:"DELETE",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static createBookingsAdmin(e){return i(t,{method:"POST",url:"/admin/bookings/time",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateBookingAdmin(e,r){return i(t,{method:"PATCH",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteBookingAdmin(e,r,a){return i(t,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var F=class{static getCheckout(e){return i(t,{method:"GET",url:"/checkout/{token}",path:{token:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getPspSession(e,r,a){return i(t,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}};var H=class{static updateCompetitionAccount(e){return i(t,{method:"PUT",url:"/admin/competition/account/update",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",500:"General Error",503:"Service unavailable, please try again"}})}};var M=class{static options(e){return i(t,{method:"OPTIONS",url:"/{cors+}",path:{"cors+":e},responseHeader:"Access-Control-Allow-Origin"})}};var $=class{static createPromoCode(e){return i(t,{method:"POST",url:"/admin/loyalty/promo-codes",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var W=class{static createMembership(e){return i(t,{method:"POST",url:"/users/memberships",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static cancellationPolicy(e,r){return i(t,{method:"GET",url:"/users/memberships/{membershipTypeId}/cancellation-policy",path:{membershipTypeId:e},query:{locale:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var J=class{static getPlaySessionById(e){return i(t,{method:"GET",url:"/playsessions/{sessionId}",path:{sessionId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static addPlayerWithUserId(e,r){return i(t,{method:"POST",url:"/playsessions/{sessionId}/players/by-userid/{userId}",path:{sessionId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static removePlayerWithUserId(e,r){return i(t,{method:"DELETE",url:"/playsessions/{sessionId}/players/by-userid/{userId}",path:{sessionId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static removePlayerWithUserEmail(e,r){return i(t,{method:"DELETE",url:"/playsessions/{sessionId}/players/by-email/{userEmail}",path:{sessionId:e,userEmail:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updatePlaySessionSettings(e,r){return i(t,{method:"PUT",url:"/playsessions/{sessionId}/settings",path:{sessionId:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static joinPlaySession(e){return i(t,{method:"POST",url:"/users/playsessions/{sessionId}/join",path:{sessionId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPlaySessionsHistory(e,r=10){return i(t,{method:"GET",url:"/users/playsessions/history",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPlaySessionsUpcoming(){return i(t,{method:"GET",url:"/users/playsessions/upcoming",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var V=class{static getUserProfile(e){return i(t,{method:"GET",url:"/profiles/users/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getRelationToFriend(e){return i(t,{method:"GET",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static addRelationToFriend(e){return i(t,{method:"POST",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteRelationToFriend(e){return i(t,{method:"DELETE",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listFriends(e,r=10){return i(t,{method:"GET",url:"/users/relations/friends",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listIncomingFriendRequests(e,r=10){return i(t,{method:"GET",url:"/users/relations/friends/incoming",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};export{B as ActivityServiceV1Service,j as AnonymousService,L as ApiClientServiceV1Service,P as ApiError,N as AuthorizedService,_ as BookingServiceV1Service,k as CancelError,R as CancelablePromise,F as CheckoutServiceV1Service,H as CompetitionServiceV1Service,M as CorsService,$ as LoyaltyServiceV1Service,W as MembershipServiceV1Service,t as OpenAPI,J as PlaySessionServiceV1Service,V as UserServiceV1Service,Z as bookingSubType,G as cancellationPolicy,ee as clientType,re as months,w as playingUserResponse};
|
|
1
|
+
var ie=Object.defineProperty,ae=Object.defineProperties;var ne=Object.getOwnPropertyDescriptors;var K=Object.getOwnPropertySymbols;var se=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable;var Q=(o,e,r)=>e in o?ie(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,R=(o,e)=>{for(var r in e||(e={}))se.call(e,r)&&Q(o,r,e[r]);if(K)for(var r of K(e))le.call(e,r)&&Q(o,r,e[r]);return o},X=(o,e)=>ae(o,ne(e));var Z=(o,e,r)=>{if(!e.has(o))throw TypeError("Cannot "+r)};var c=(o,e,r)=>(Z(o,e,"read from private field"),r?r.call(o):e.get(o)),I=(o,e,r)=>{if(e.has(o))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(o):e.set(o,r)},y=(o,e,r,a)=>(Z(o,e,"write to private field"),a?a.call(o,r):e.set(o,r),r);var P=(o,e,r)=>new Promise((a,n)=>{var s=u=>{try{p(r.next(u))}catch(d){n(d)}},l=u=>{try{p(r.throw(u))}catch(d){n(d)}},p=u=>u.done?a(u.value):Promise.resolve(u.value).then(s,l);p((r=r.apply(o,e)).next())});var S=class extends Error{constructor(r,a,n){super(n);this.name="ApiError",this.url=a.url,this.status=a.status,this.statusText=a.statusText,this.body=a.body,this.request=r}};var U=class extends Error{constructor(e){super(e),this.name="CancelError"}get isCancelled(){return!0}},g,h,b,T,v,x,E,A=class{constructor(e){I(this,g,void 0);I(this,h,void 0);I(this,b,void 0);I(this,T,void 0);I(this,v,void 0);I(this,x,void 0);I(this,E,void 0);y(this,g,!1),y(this,h,!1),y(this,b,!1),y(this,T,[]),y(this,v,new Promise((r,a)=>{y(this,x,r),y(this,E,a);let n=p=>{var u;c(this,g)||c(this,h)||c(this,b)||(y(this,g,!0),(u=c(this,x))==null||u.call(this,p))},s=p=>{var u;c(this,g)||c(this,h)||c(this,b)||(y(this,h,!0),(u=c(this,E))==null||u.call(this,p))},l=p=>{c(this,g)||c(this,h)||c(this,b)||c(this,T).push(p)};return Object.defineProperty(l,"isResolved",{get:()=>c(this,g)}),Object.defineProperty(l,"isRejected",{get:()=>c(this,h)}),Object.defineProperty(l,"isCancelled",{get:()=>c(this,b)}),e(n,s,l)}))}get[Symbol.toStringTag](){return"Cancellable Promise"}then(e,r){return c(this,v).then(e,r)}catch(e){return c(this,v).catch(e)}finally(e){return c(this,v).finally(e)}cancel(){var e;if(!(c(this,g)||c(this,h)||c(this,b))){if(y(this,b,!0),c(this,T).length)try{for(let r of c(this,T))r()}catch(r){console.warn("Cancellation threw an error",r);return}c(this,T).length=0,(e=c(this,E))==null||e.call(this,new U("Request aborted"))}}get isCancelled(){return c(this,b)}};g=new WeakMap,h=new WeakMap,b=new WeakMap,T=new WeakMap,v=new WeakMap,x=new WeakMap,E=new WeakMap;var t={BASE:"https://api.dev.matchi.com",VERSION:"1",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0};var G;(e=>{let o;(f=>(f.MONDAY="MONDAY",f.TUESDAY="TUESDAY",f.WEDNESDAY="WEDNESDAY",f.THURSDAY="THURSDAY",f.FRIDAY="FRIDAY",f.SATURDAY="SATURDAY",f.SUNDAY="SUNDAY",f.UNKNOWN="UNKNOWN"))(o=e.weekDay||(e.weekDay={}))})(G||(G={}));var ee=(s=>(s.BOOKING="booking",s.ACTIVITY="activity",s.SPLIT="split",s.SPLIT_MAIN="split_main",s.SPLIT_INVITE="split_invite",s))(ee||{});var w;(e=>{let o;(n=>(n.AVAILABILITY="AVAILABILITY",n.OCCASION="OCCASION"))(o=e.itemType||(e.itemType={}))})(w||(w={}));var re=(r=>(r.WIDGET="WIDGET",r.API="API",r))(re||{});var oe=(m=>(m.JANUARY="January",m.FEBRUARY="February",m.MARCH="March",m.APRIL="April",m.MAY="May",m.JUNE="June",m.JULY="July",m.AUGUST="August",m.SEPTEMBER="September",m.OCTOBER="October",m.NOVEMBER="November",m.DECEMBER="December",m))(oe||{});var D;(e=>{let o;(l=>(l.PAID="PAID",l.INVITED="INVITED",l.JOINED="JOINED",l.BOOKER="BOOKER"))(o=e.status||(e.status={}))})(D||(D={}));var z=o=>o!=null,k=o=>typeof o=="string",q=o=>k(o)&&o!=="",B=o=>typeof o=="object"&&typeof o.type=="string"&&typeof o.stream=="function"&&typeof o.arrayBuffer=="function"&&typeof o.constructor=="function"&&typeof o.constructor.name=="string"&&/^(Blob|File)$/.test(o.constructor.name)&&/^(Blob|File)$/.test(o[Symbol.toStringTag]),te=o=>o instanceof FormData,pe=o=>{try{return btoa(o)}catch(e){return Buffer.from(o).toString("base64")}},ue=o=>{let e=[],r=(n,s)=>{e.push(`${encodeURIComponent(n)}=${encodeURIComponent(String(s))}`)},a=(n,s)=>{z(s)&&(Array.isArray(s)?s.forEach(l=>{a(n,l)}):typeof s=="object"?Object.entries(s).forEach(([l,p])=>{a(`${n}[${l}]`,p)}):r(n,s))};return Object.entries(o).forEach(([n,s])=>{a(n,s)}),e.length>0?`?${e.join("&")}`:""},ce=(o,e)=>{let r=o.ENCODE_PATH||encodeURI,a=e.url.replace("{api-version}",o.VERSION).replace(/{(.*?)}/g,(s,l)=>{var p;return(p=e.path)!=null&&p.hasOwnProperty(l)?r(String(e.path[l])):s}),n=`${o.BASE}${a}`;return e.query?`${n}${ue(e.query)}`:n},me=o=>{if(o.formData){let e=new FormData,r=(a,n)=>{k(n)||B(n)?e.append(a,n):e.append(a,JSON.stringify(n))};return Object.entries(o.formData).filter(([a,n])=>z(n)).forEach(([a,n])=>{Array.isArray(n)?n.forEach(s=>r(a,s)):r(a,n)}),e}},O=(o,e)=>P(void 0,null,function*(){return typeof e=="function"?e(o):e}),de=(o,e)=>P(void 0,null,function*(){let r=yield O(e,o.TOKEN),a=yield O(e,o.USERNAME),n=yield O(e,o.PASSWORD),s=yield O(e,o.HEADERS),l=Object.entries(R(R({Accept:"application/json"},s),e.headers)).filter(([p,u])=>z(u)).reduce((p,[u,d])=>X(R({},p),{[u]:String(d)}),{});if(q(r)&&(l.Authorization=`Bearer ${r}`),q(a)&&q(n)){let p=pe(`${a}:${n}`);l.Authorization=`Basic ${p}`}return e.body&&(e.mediaType?l["Content-Type"]=e.mediaType:B(e.body)?l["Content-Type"]=e.body.type||"application/octet-stream":k(e.body)?l["Content-Type"]="text/plain":te(e.body)||(l["Content-Type"]="application/json")),new Headers(l)}),fe=o=>{var e;if(o.body!==void 0)return(e=o.mediaType)!=null&&e.includes("/json")?JSON.stringify(o.body):k(o.body)||B(o.body)||te(o.body)?o.body:JSON.stringify(o.body)},ye=(o,e,r,a,n,s,l)=>P(void 0,null,function*(){let p=new AbortController,u={headers:s,body:a!=null?a:n,method:e.method,signal:p.signal};return o.WITH_CREDENTIALS&&(u.credentials=o.CREDENTIALS),l(()=>p.abort()),yield fetch(r,u)}),be=(o,e)=>{if(e){let r=o.headers.get(e);if(k(r))return r}},ge=o=>P(void 0,null,function*(){if(o.status!==204)try{let e=o.headers.get("Content-Type");if(e)return["application/json","application/problem+json"].some(n=>e.toLowerCase().startsWith(n))?yield o.json():yield o.text()}catch(e){console.error(e)}}),he=(o,e)=>{var n,s;let a=R({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},o.errors)[e.status];if(a)throw new S(o,e,a);if(!e.ok){let l=(n=e.status)!=null?n:"unknown",p=(s=e.statusText)!=null?s:"unknown",u=(()=>{try{return JSON.stringify(e.body,null,2)}catch(d){return}})();throw new S(o,e,`Generic Error: status: ${l}; status text: ${p}; body: ${u}`)}},i=(o,e)=>new A((r,a,n)=>P(void 0,null,function*(){try{let s=ce(o,e),l=me(e),p=fe(e),u=yield de(o,e);if(!n.isCancelled){let d=yield ye(o,e,s,p,l,u,n),f=yield ge(d),C=be(d,e.responseHeader),m={url:s,ok:d.ok,status:d.status,statusText:d.statusText,body:C!=null?C:f};he(e,m),r(m.body)}}catch(s){a(s)}}));var N=class{static getAdminActivityOccasions(e,r,a,n,s,l=10){return i(t,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:a,endDate:n,offset:s,limit:l},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var j=class{static listActivities(e=!1,r=!1,a,n,s,l,p,u,d,f,C,m=10){return i(t,{method:"GET",url:"/activities",query:{hideFullyBooked:e,exposeOccasions:r,facilityIds:a,level:n,locationSearch:s,categorySearch:l,querySearch:p,resourceTypes:u,startDate:d,endDate:f,offset:C,limit:m},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getActivity(e){return i(t,{method:"GET",url:"/activities/{activityId}",path:{activityId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listActivitiesOccasions(e,r=!1,a,n,s){return i(t,{method:"GET",url:"/activities/{activityId}/occasions",path:{activityId:e},query:{hideFullyBooked:r,hidePastOccasions:a,startDate:n,endDate:s},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getActivityOccasion(e){return i(t,{method:"GET",url:"/activities/occasions/{occasionId}",path:{occasionId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getAdminActivityOccasions(e,r,a,n,s,l=10){return i(t,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:a,endDate:n,offset:s,limit:l},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateCompetitionAccount(e){return i(t,{method:"PUT",url:"/admin/competition/account/update",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",500:"General Error",503:"Service unavailable, please try again"}})}static listFacilities(e,r,a,n,s,l,p,u,d=10){return i(t,{method:"GET",url:"/facilities",query:{city:e,countryCode:r,name:a,latitude:n,longitude:s,radius:l,resourceTypes:p,offset:u,limit:d},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getFacility(e){return i(t,{method:"GET",url:"/facilities/{facilityId}",path:{facilityId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listResources(e){return i(t,{method:"GET",url:"/facilities/{facilityId}/resources",path:{facilityId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getResource(e){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}",path:{resourceId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listAvailabilities(e,r,a){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities",path:{resourceId:e},query:{startDateTime:r,endDateTime:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserProfile(e){return i(t,{method:"GET",url:"/profiles/users/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getConfig(e){return i(t,{method:"GET",url:"/config/{locale}",path:{locale:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getRelationToFriend(e){return i(t,{method:"GET",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var L=class{static getApiClientList(e,r=10){return i(t,{method:"GET",url:"/api-client",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createApiClient(e){return i(t,{method:"POST",url:"/api-client",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The specified resource identifier already exists",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientById(e){return i(t,{method:"GET",url:"/api-client/{clientId}",path:{clientId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateApiClientById(e,r,a){return i(t,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:a},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientUsageById(e,r){return i(t,{method:"GET",url:"/api-client/{clientId}/usage",path:{clientId:e},query:{month:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var F=class{static getActivityOccasionPrice(e,r){return i(t,{method:"GET",url:"/activities/occasions/{occasionId}/price",path:{occasionId:e},query:{promoCode:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getActivityCancellationPolicy(e,r){return i(t,{method:"GET",url:"/activities/occasions/{occasionId}/cancellation-policy",path:{occasionId:e},query:{locale:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getAvailabilityWithPrice(e,r,a,n,s,l,p){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:a,promoCode:n,numberOfSlots:s,emails:l,userIds:p},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getCancellationPolicy(e,r,a,n){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/cancellation-policy",path:{resourceId:e},query:{startTime:r,endTime:a,locale:n},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createPromoCode(e){return i(t,{method:"POST",url:"/admin/loyalty/promo-codes",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserInfo(){return i(t,{method:"GET",url:"/users/info",errors:{500:"General Error",503:"Service unavailable, please try again"}})}static listUserFavourites(){return i(t,{method:"GET",url:"/users/favourites",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listUserMemberships(){return i(t,{method:"GET",url:"/users/memberships",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createMembership(e){return i(t,{method:"POST",url:"/users/memberships",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listUserPayments(e,r=10){return i(t,{method:"GET",url:"/users/payments",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPayment(e){return i(t,{method:"GET",url:"/users/payments/{paymentId}",path:{paymentId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listUserPendingPayments(){return i(t,{method:"GET",url:"/users/payments/pending",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listUserBookings(e,r=10,a){return i(t,{method:"GET",url:"/users/bookings",query:{offset:e,limit:r,subType:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createBooking(e){return i(t,{method:"POST",url:"/users/bookings/time",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getBookingDetails(e){return i(t,{method:"GET",url:"/users/bookings/time/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteBooking(e){return i(t,{method:"DELETE",url:"/users/bookings/time/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getBookingSubscriptionDetails(e){return i(t,{method:"GET",url:"/users/bookings/subscriptions/{subscriptionId}",path:{subscriptionId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUsersInBooking(e){return i(t,{method:"GET",url:"/users/bookings/{bookingId}/users",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getPriceOfOrderSplitBooking(e){return i(t,{method:"GET",url:"/users/bookings/{bookingId}/price",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static inviteUserToBooking(e,r){return i(t,{method:"POST",url:"/users/bookings/{bookingId}/users/invite/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static addUserToBooking(e,r){return i(t,{method:"POST",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static removeUserFromBooking(e,r){return i(t,{method:"DELETE",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static createActivityBooking(e){return i(t,{method:"POST",url:"/users/bookings/activity",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getActivityDetails(e){return i(t,{method:"GET",url:"/users/bookings/activity/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteActivityBooking(e){return i(t,{method:"DELETE",url:"/users/bookings/activity/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createBookingsAdmin(e){return i(t,{method:"POST",url:"/admin/bookings/time",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateBookingAdmin(e,r){return i(t,{method:"PATCH",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteBookingAdmin(e,r,a){return i(t,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPlaySessionsHistory(e,r=10){return i(t,{method:"GET",url:"/users/playsessions/history",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPlaySessionsUpcoming(){return i(t,{method:"GET",url:"/users/playsessions/upcoming",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static addWaitlistOccasion(e){return i(t,{method:"POST",url:"/users/waitlist/occasions/{id}",path:{id:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static removeWaitlistOccasion(e){return i(t,{method:"DELETE",url:"/users/waitlist/occasions/{id}",path:{id:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static getCheckout(e){return i(t,{method:"GET",url:"/checkout/{token}",path:{token:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createCheckoutBooking(e,r){return i(t,{method:"POST",url:"/checkout/{token}",path:{token:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getPspSession(e,r,a){return i(t,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static applyValueCard(e,r){return i(t,{method:"POST",url:"/checkout/{token}/valuecard",path:{token:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static unapplyValueCard(e,r){return i(t,{method:"DELETE",url:"/checkout/{token}/valuecard/{customerCouponId}",path:{token:e,customerCouponId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static applyPromoCode(e,r){return i(t,{method:"POST",url:"/checkout/{token}/promocode",path:{token:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static unapplyPromocode(e){return i(t,{method:"DELETE",url:"/checkout/{token}/promocode",path:{token:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientList(e,r=10){return i(t,{method:"GET",url:"/api-client",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createApiClient(e){return i(t,{method:"POST",url:"/api-client",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The specified resource identifier already exists",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientById(e){return i(t,{method:"GET",url:"/api-client/{clientId}",path:{clientId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateApiClientById(e,r,a){return i(t,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:a},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientUsageById(e,r){return i(t,{method:"GET",url:"/api-client/{clientId}/usage",path:{clientId:e},query:{month:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var _=class{static getAvailabilityWithPrice(e,r,a,n,s,l,p){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:a,promoCode:n,numberOfSlots:s,emails:l,userIds:p},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getBookingSubscriptionDetails(e){return i(t,{method:"GET",url:"/users/bookings/subscriptions/{subscriptionId}",path:{subscriptionId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUsersInBooking(e){return i(t,{method:"GET",url:"/users/bookings/{bookingId}/users",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getPriceOfOrderSplitBooking(e){return i(t,{method:"GET",url:"/users/bookings/{bookingId}/price",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static inviteUserToBooking(e,r){return i(t,{method:"POST",url:"/users/bookings/{bookingId}/users/invite/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static addUserToBooking(e,r){return i(t,{method:"POST",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static removeUserFromBooking(e,r){return i(t,{method:"DELETE",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static createBookingsAdmin(e){return i(t,{method:"POST",url:"/admin/bookings/time",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateBookingAdmin(e,r){return i(t,{method:"PATCH",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteBookingAdmin(e,r,a){return i(t,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var H=class{static getCheckout(e){return i(t,{method:"GET",url:"/checkout/{token}",path:{token:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getPspSession(e,r,a){return i(t,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}};var M=class{static updateCompetitionAccount(e){return i(t,{method:"PUT",url:"/admin/competition/account/update",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",500:"General Error",503:"Service unavailable, please try again"}})}};var W=class{static options(e){return i(t,{method:"OPTIONS",url:"/{cors+}",path:{"cors+":e},responseHeader:"Access-Control-Allow-Origin"})}};var Y=class{static createPromoCode(e){return i(t,{method:"POST",url:"/admin/loyalty/promo-codes",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var $=class{static createMembership(e){return i(t,{method:"POST",url:"/users/memberships",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static cancellationPolicy(e,r){return i(t,{method:"GET",url:"/users/memberships/{membershipTypeId}/cancellation-policy",path:{membershipTypeId:e},query:{locale:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var J=class{static getPlaySessionById(e){return i(t,{method:"GET",url:"/playsessions/{sessionId}",path:{sessionId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static addPlayerWithUserId(e,r){return i(t,{method:"POST",url:"/playsessions/{sessionId}/players/by-userid/{userId}",path:{sessionId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static removePlayerWithUserId(e,r){return i(t,{method:"DELETE",url:"/playsessions/{sessionId}/players/by-userid/{userId}",path:{sessionId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static removePlayerWithUserEmail(e,r){return i(t,{method:"DELETE",url:"/playsessions/{sessionId}/players/by-email/{userEmail}",path:{sessionId:e,userEmail:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updatePlaySessionSettings(e,r){return i(t,{method:"PUT",url:"/playsessions/{sessionId}/settings",path:{sessionId:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static joinPlaySession(e){return i(t,{method:"POST",url:"/users/playsessions/{sessionId}/join",path:{sessionId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPlaySessionsHistory(e,r=10){return i(t,{method:"GET",url:"/users/playsessions/history",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPlaySessionsUpcoming(){return i(t,{method:"GET",url:"/users/playsessions/upcoming",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var V=class{static getUserProfile(e){return i(t,{method:"GET",url:"/profiles/users/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getRelationToFriend(e){return i(t,{method:"GET",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static addRelationToFriend(e){return i(t,{method:"POST",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteRelationToFriend(e){return i(t,{method:"DELETE",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listFriends(e,r=10){return i(t,{method:"GET",url:"/users/relations/friends",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listIncomingFriendRequests(e,r=10){return i(t,{method:"GET",url:"/users/relations/friends/incoming",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};export{N as ActivityServiceV1Service,j as AnonymousService,L as ApiClientServiceV1Service,S as ApiError,F as AuthorizedService,_ as BookingServiceV1Service,U as CancelError,A as CancelablePromise,H as CheckoutServiceV1Service,M as CompetitionServiceV1Service,W as CorsService,Y as LoyaltyServiceV1Service,$ as MembershipServiceV1Service,t as OpenAPI,J as PlaySessionServiceV1Service,V as UserServiceV1Service,ee as bookingSubType,G as bookingSubscription,w as cancellationPolicy,re as clientType,oe as months,D as playingUserResponse};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matchi/api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20231214.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"bun-types": "latest",
|
|
16
16
|
"openapi-typescript-codegen": "^0.25.0",
|
|
17
|
-
"tsup": "^
|
|
18
|
-
"typescript": "^5.
|
|
17
|
+
"tsup": "^8.0.1",
|
|
18
|
+
"typescript": "^5.3.3"
|
|
19
19
|
}
|
|
20
20
|
}
|