@matchi/api 0.20240223.1 → 0.20240305.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 CHANGED
@@ -565,6 +565,14 @@ type deleteBookingEventExternal = {
565
565
  resourceId: number;
566
566
  };
567
567
 
568
+ type endTimePriceDetail = {
569
+ availability: availability;
570
+ price: price;
571
+ priceBase: price;
572
+ splitFee?: price;
573
+ numberOfSlots?: number;
574
+ };
575
+
568
576
  type Error$1 = {
569
577
  code: string;
570
578
  message: string;
@@ -1338,6 +1346,17 @@ declare class AuthorizedService {
1338
1346
  * @throws ApiError
1339
1347
  */
1340
1348
  static getAvailabilityWithPrice(resourceId: string, startTime: timeStamp, endTime: timeStamp, promoCode?: string, numberOfSlots?: number, emails?: Array<string>, userIds?: Array<string>): CancelablePromise<priceDetails>;
1349
+ /**
1350
+ * Get list of possible availability durations with prices
1351
+ * @param resourceId Resource that price is requested for
1352
+ * @param startTime Start time that price is requested for
1353
+ * @param numberOfSlots Number of slots that should be included in the price detail calculation.
1354
+ * @param emails List of player emails that should be included in the price detail calculation.
1355
+ * @param userIds List of player user IDs that should be included in the price detail calculation.
1356
+ * @returns endTimePriceDetail Price details for possible durations
1357
+ * @throws ApiError
1358
+ */
1359
+ static listAvailabilityEndTimesWithPrices(resourceId: string, startTime: timeStamp, numberOfSlots?: number, emails?: Array<string>, userIds?: Array<string>): CancelablePromise<Array<endTimePriceDetail>>;
1341
1360
  /**
1342
1361
  * Get cancellation policy of availabilities by resource ID
1343
1362
  * @param resourceId The ID of the resource that offers the availability
@@ -1545,7 +1564,7 @@ declare class AuthorizedService {
1545
1564
  static deleteActivityBooking(bookingId: number): CancelablePromise<any>;
1546
1565
  /**
1547
1566
  * Create m2m/admin booking(s) by timespan(s)
1548
- * @param requestBody Include the resourceIds, start/endtimes, types and players that should be included in the booking.
1567
+ * @param requestBody Include the resourceIds, start/end times, types and players that should be included in the booking.
1549
1568
  * @returns booking Details on the created booking(s)
1550
1569
  * @throws ApiError
1551
1570
  */
@@ -1730,6 +1749,17 @@ declare class BookingServiceV1Service {
1730
1749
  * @throws ApiError
1731
1750
  */
1732
1751
  static getAvailabilityWithPrice(resourceId: string, startTime: timeStamp, endTime: timeStamp, promoCode?: string, numberOfSlots?: number, emails?: Array<string>, userIds?: Array<string>): CancelablePromise<priceDetails>;
1752
+ /**
1753
+ * Get list of possible availability durations with prices
1754
+ * @param resourceId Resource that price is requested for
1755
+ * @param startTime Start time that price is requested for
1756
+ * @param numberOfSlots Number of slots that should be included in the price detail calculation.
1757
+ * @param emails List of player emails that should be included in the price detail calculation.
1758
+ * @param userIds List of player user IDs that should be included in the price detail calculation.
1759
+ * @returns endTimePriceDetail Price details for possible durations
1760
+ * @throws ApiError
1761
+ */
1762
+ static listAvailabilityEndTimesWithPrices(resourceId: string, startTime: timeStamp, numberOfSlots?: number, emails?: Array<string>, userIds?: Array<string>): CancelablePromise<Array<endTimePriceDetail>>;
1733
1763
  /**
1734
1764
  * List upcoming booking subscriptions for currently authorized user
1735
1765
  * @param offset Number of items to skip before returning the results.
@@ -1799,7 +1829,7 @@ declare class BookingServiceV1Service {
1799
1829
  static removeUserFromBooking(bookingId: number, userId: string): CancelablePromise<any>;
1800
1830
  /**
1801
1831
  * Create m2m/admin booking(s) by timespan(s)
1802
- * @param requestBody Include the resourceIds, start/endtimes, types and players that should be included in the booking.
1832
+ * @param requestBody Include the resourceIds, start/end times, types and players that should be included in the booking.
1803
1833
  * @returns booking Details on the created booking(s)
1804
1834
  * @throws ApiError
1805
1835
  */
@@ -2034,4 +2064,4 @@ declare class UserServiceV1Service {
2034
2064
  static listIncomingFriendRequests(offset?: number, limit?: number): CancelablePromise<friendRelationsResponse>;
2035
2065
  }
2036
2066
 
2037
- 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, pendingPayment, type playSession, type playSessionBooking, type playSessionBookingPayment, type playSessionResponse, type playSessionSettings, type playSessionUser, type playerLevels, 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 userMembership, type userPublicProfile, type valueCardOutcome };
2067
+ 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 endTimePriceDetail, 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, pendingPayment, type playSession, type playSessionBooking, type playSessionBookingPayment, type playSessionResponse, type playSessionSettings, type playSessionUser, type playerLevels, 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 userMembership, type userPublicProfile, type valueCardOutcome };
package/dist/index.d.ts CHANGED
@@ -565,6 +565,14 @@ type deleteBookingEventExternal = {
565
565
  resourceId: number;
566
566
  };
567
567
 
568
+ type endTimePriceDetail = {
569
+ availability: availability;
570
+ price: price;
571
+ priceBase: price;
572
+ splitFee?: price;
573
+ numberOfSlots?: number;
574
+ };
575
+
568
576
  type Error$1 = {
569
577
  code: string;
570
578
  message: string;
@@ -1338,6 +1346,17 @@ declare class AuthorizedService {
1338
1346
  * @throws ApiError
1339
1347
  */
1340
1348
  static getAvailabilityWithPrice(resourceId: string, startTime: timeStamp, endTime: timeStamp, promoCode?: string, numberOfSlots?: number, emails?: Array<string>, userIds?: Array<string>): CancelablePromise<priceDetails>;
1349
+ /**
1350
+ * Get list of possible availability durations with prices
1351
+ * @param resourceId Resource that price is requested for
1352
+ * @param startTime Start time that price is requested for
1353
+ * @param numberOfSlots Number of slots that should be included in the price detail calculation.
1354
+ * @param emails List of player emails that should be included in the price detail calculation.
1355
+ * @param userIds List of player user IDs that should be included in the price detail calculation.
1356
+ * @returns endTimePriceDetail Price details for possible durations
1357
+ * @throws ApiError
1358
+ */
1359
+ static listAvailabilityEndTimesWithPrices(resourceId: string, startTime: timeStamp, numberOfSlots?: number, emails?: Array<string>, userIds?: Array<string>): CancelablePromise<Array<endTimePriceDetail>>;
1341
1360
  /**
1342
1361
  * Get cancellation policy of availabilities by resource ID
1343
1362
  * @param resourceId The ID of the resource that offers the availability
@@ -1545,7 +1564,7 @@ declare class AuthorizedService {
1545
1564
  static deleteActivityBooking(bookingId: number): CancelablePromise<any>;
1546
1565
  /**
1547
1566
  * Create m2m/admin booking(s) by timespan(s)
1548
- * @param requestBody Include the resourceIds, start/endtimes, types and players that should be included in the booking.
1567
+ * @param requestBody Include the resourceIds, start/end times, types and players that should be included in the booking.
1549
1568
  * @returns booking Details on the created booking(s)
1550
1569
  * @throws ApiError
1551
1570
  */
@@ -1730,6 +1749,17 @@ declare class BookingServiceV1Service {
1730
1749
  * @throws ApiError
1731
1750
  */
1732
1751
  static getAvailabilityWithPrice(resourceId: string, startTime: timeStamp, endTime: timeStamp, promoCode?: string, numberOfSlots?: number, emails?: Array<string>, userIds?: Array<string>): CancelablePromise<priceDetails>;
1752
+ /**
1753
+ * Get list of possible availability durations with prices
1754
+ * @param resourceId Resource that price is requested for
1755
+ * @param startTime Start time that price is requested for
1756
+ * @param numberOfSlots Number of slots that should be included in the price detail calculation.
1757
+ * @param emails List of player emails that should be included in the price detail calculation.
1758
+ * @param userIds List of player user IDs that should be included in the price detail calculation.
1759
+ * @returns endTimePriceDetail Price details for possible durations
1760
+ * @throws ApiError
1761
+ */
1762
+ static listAvailabilityEndTimesWithPrices(resourceId: string, startTime: timeStamp, numberOfSlots?: number, emails?: Array<string>, userIds?: Array<string>): CancelablePromise<Array<endTimePriceDetail>>;
1733
1763
  /**
1734
1764
  * List upcoming booking subscriptions for currently authorized user
1735
1765
  * @param offset Number of items to skip before returning the results.
@@ -1799,7 +1829,7 @@ declare class BookingServiceV1Service {
1799
1829
  static removeUserFromBooking(bookingId: number, userId: string): CancelablePromise<any>;
1800
1830
  /**
1801
1831
  * Create m2m/admin booking(s) by timespan(s)
1802
- * @param requestBody Include the resourceIds, start/endtimes, types and players that should be included in the booking.
1832
+ * @param requestBody Include the resourceIds, start/end times, types and players that should be included in the booking.
1803
1833
  * @returns booking Details on the created booking(s)
1804
1834
  * @throws ApiError
1805
1835
  */
@@ -2034,4 +2064,4 @@ declare class UserServiceV1Service {
2034
2064
  static listIncomingFriendRequests(offset?: number, limit?: number): CancelablePromise<friendRelationsResponse>;
2035
2065
  }
2036
2066
 
2037
- 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, pendingPayment, type playSession, type playSessionBooking, type playSessionBookingPayment, type playSessionResponse, type playSessionSettings, type playSessionUser, type playerLevels, 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 userMembership, type userPublicProfile, type valueCardOutcome };
2067
+ 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 endTimePriceDetail, 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, pendingPayment, type playSession, type playSessionBooking, type playSessionBookingPayment, type playSessionResponse, type playSessionSettings, type playSessionUser, type playerLevels, 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 userMembership, type userPublicProfile, type valueCardOutcome };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var O=Object.defineProperty,ne=Object.defineProperties,le=Object.getOwnPropertyDescriptor,pe=Object.getOwnPropertyDescriptors,ue=Object.getOwnPropertyNames,re=Object.getOwnPropertySymbols;var te=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable;var oe=(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={}))te.call(e,r)&&oe(o,r,e[r]);if(re)for(var r of re(e))ce.call(e,r)&&oe(o,r,e[r]);return o},ie=(o,e)=>ne(o,pe(e));var me=(o,e)=>{for(var r in e)O(o,r,{get:e[r],enumerable:!0})},de=(o,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of ue(e))!te.call(o,a)&&a!==r&&O(o,a,{get:()=>e[a],enumerable:!(s=le(e,a))||s.enumerable});return o};var fe=o=>de(O({},"__esModule",{value:!0}),o);var se=(o,e,r)=>{if(!e.has(o))throw TypeError("Cannot "+r)};var c=(o,e,r)=>(se(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,s)=>(se(o,e,"write to private field"),s?s.call(o,r):e.set(o,r),r);var P=(o,e,r)=>new Promise((s,a)=>{var l=u=>{try{p(r.next(u))}catch(d){a(d)}},n=u=>{try{p(r.throw(u))}catch(d){a(d)}},p=u=>u.done?s(u.value):Promise.resolve(u.value).then(l,n);p((r=r.apply(o,e)).next())});var Ce={};me(Ce,{ActivityServiceV1Service:()=>B,AnonymousService:()=>N,ApiClientServiceV1Service:()=>L,ApiError:()=>S,AuthorizedService:()=>j,BookingServiceV1Service:()=>M,CancelError:()=>k,CancelablePromise:()=>C,CheckoutServiceV1Service:()=>_,CompetitionServiceV1Service:()=>F,CorsService:()=>H,LoyaltyServiceV1Service:()=>Y,MembershipServiceV1Service:()=>W,OpenAPI:()=>t,PlaySessionServiceV1Service:()=>$,UserServiceV1Service:()=>V,bookingSubType:()=>J,bookingSubscription:()=>G,cancellationPolicy:()=>w,clientType:()=>K,months:()=>Q,pendingPayment:()=>D,playingUserResponse:()=>q});module.exports=fe(Ce);var S=class extends Error{constructor(r,s,a){super(a);this.name="ApiError",this.url=s.url,this.status=s.status,this.statusText=s.statusText,this.body=s.body,this.request=r}};var k=class extends Error{constructor(e){super(e),this.name="CancelError"}get isCancelled(){return!0}},g,h,b,T,v,x,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,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,s)=>{y(this,x,r),y(this,E,s);let a=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))},l=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))},n=p=>{c(this,g)||c(this,h)||c(this,b)||c(this,T).push(p)};return Object.defineProperty(n,"isResolved",{get:()=>c(this,g)}),Object.defineProperty(n,"isRejected",{get:()=>c(this,h)}),Object.defineProperty(n,"isCancelled",{get:()=>c(this,b)}),e(a,l,n)}))}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 k("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 J=(n=>(n.BOOKING="booking",n.BOOKING_PLAYER="booking_player",n.ACTIVITY="activity",n.SPLIT="split",n.SPLIT_MAIN="split_main",n.SPLIT_INVITE="split_invite",n))(J||{});var w;(e=>{let o;(a=>(a.AVAILABILITY="AVAILABILITY",a.OCCASION="OCCASION"))(o=e.itemType||(e.itemType={}))})(w||(w={}));var K=(r=>(r.WIDGET="WIDGET",r.API="API",r))(K||{});var Q=(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))(Q||{});var D;(e=>{let o;(n=>(n.BOOKING="BOOKING",n.ACTIVITY="ACTIVITY",n.MEMBERSHIP="MEMBERSHIP",n.SUBSCRIPTION="SUBSCRIPTION"))(o=e.type||(e.type={}))})(D||(D={}));var q;(e=>{let o;(n=>(n.PAID="PAID",n.INVITED="INVITED",n.JOINED="JOINED",n.BOOKER="BOOKER"))(o=e.status||(e.status={}))})(q||(q={}));var Z=o=>o!=null,U=o=>typeof o=="string",X=o=>U(o)&&o!=="",ee=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,ye=o=>{try{return btoa(o)}catch(e){return Buffer.from(o).toString("base64")}},be=o=>{let e=[],r=(a,l)=>{e.push(`${encodeURIComponent(a)}=${encodeURIComponent(String(l))}`)},s=(a,l)=>{Z(l)&&(Array.isArray(l)?l.forEach(n=>{s(a,n)}):typeof l=="object"?Object.entries(l).forEach(([n,p])=>{s(`${a}[${n}]`,p)}):r(a,l))};return Object.entries(o).forEach(([a,l])=>{s(a,l)}),e.length>0?`?${e.join("&")}`:""},ge=(o,e)=>{let r=o.ENCODE_PATH||encodeURI,s=e.url.replace("{api-version}",o.VERSION).replace(/{(.*?)}/g,(l,n)=>{var p;return(p=e.path)!=null&&p.hasOwnProperty(n)?r(String(e.path[n])):l}),a=`${o.BASE}${s}`;return e.query?`${a}${be(e.query)}`:a},he=o=>{if(o.formData){let e=new FormData,r=(s,a)=>{U(a)||ee(a)?e.append(s,a):e.append(s,JSON.stringify(a))};return Object.entries(o.formData).filter(([s,a])=>Z(a)).forEach(([s,a])=>{Array.isArray(a)?a.forEach(l=>r(s,l)):r(s,a)}),e}},z=(o,e)=>P(void 0,null,function*(){return typeof e=="function"?e(o):e}),Ie=(o,e)=>P(void 0,null,function*(){let r=yield z(e,o.TOKEN),s=yield z(e,o.USERNAME),a=yield z(e,o.PASSWORD),l=yield z(e,o.HEADERS),n=Object.entries(A(A({Accept:"application/json"},l),e.headers)).filter(([p,u])=>Z(u)).reduce((p,[u,d])=>ie(A({},p),{[u]:String(d)}),{});if(X(r)&&(n.Authorization=`Bearer ${r}`),X(s)&&X(a)){let p=ye(`${s}:${a}`);n.Authorization=`Basic ${p}`}return e.body&&(e.mediaType?n["Content-Type"]=e.mediaType:ee(e.body)?n["Content-Type"]=e.body.type||"application/octet-stream":U(e.body)?n["Content-Type"]="text/plain":ae(e.body)||(n["Content-Type"]="application/json")),new Headers(n)}),Te=o=>{var e;if(o.body!==void 0)return(e=o.mediaType)!=null&&e.includes("/json")?JSON.stringify(o.body):U(o.body)||ee(o.body)||ae(o.body)?o.body:JSON.stringify(o.body)},Se=(o,e,r,s,a,l,n)=>P(void 0,null,function*(){let p=new AbortController,u={headers:l,body:s!=null?s:a,method:e.method,signal:p.signal};return o.WITH_CREDENTIALS&&(u.credentials=o.CREDENTIALS),n(()=>p.abort()),yield fetch(r,u)}),ve=(o,e)=>{if(e){let r=o.headers.get(e);if(U(r))return r}},Pe=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(a=>e.toLowerCase().startsWith(a))?yield o.json():yield o.text()}catch(e){console.error(e)}}),Ee=(o,e)=>{var a,l;let s=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(s)throw new S(o,e,s);if(!e.ok){let n=(a=e.status)!=null?a:"unknown",p=(l=e.statusText)!=null?l:"unknown",u=(()=>{try{return JSON.stringify(e.body,null,2)}catch(d){return}})();throw new S(o,e,`Generic Error: status: ${n}; status text: ${p}; body: ${u}`)}},i=(o,e)=>new C((r,s,a)=>P(void 0,null,function*(){try{let l=ge(o,e),n=he(e),p=Te(e),u=yield Ie(o,e);if(!a.isCancelled){let d=yield Se(o,e,l,p,n,u,a),f=yield Pe(d),R=ve(d,e.responseHeader),m={url:l,ok:d.ok,status:d.status,statusText:d.statusText,body:R!=null?R:f};Ee(e,m),r(m.body)}}catch(l){s(l)}}));var B=class{static getAdminActivityOccasions(e,r,s,a,l,n=10){return i(t,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:s,endDate:a,offset:l,limit: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"}})}};var N=class{static listActivities(e=!1,r=!1,s,a,l,n,p,u,d,f,R,m=10){return i(t,{method:"GET",url:"/activities",query:{hideFullyBooked:e,exposeOccasions:r,facilityIds:s,level:a,locationSearch:l,categorySearch:n,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,s,a,l){return i(t,{method:"GET",url:"/activities/{activityId}/occasions",path:{activityId:e},query:{hideFullyBooked:r,hidePastOccasions:s,startDate:a,endDate: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 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,s,a,l,n=10){return i(t,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:s,endDate:a,offset:l,limit: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 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,s,a,l,n,p,u,d=10){return i(t,{method:"GET",url:"/facilities",query:{city:e,countryCode:r,name:s,latitude:a,longitude:l,radius:n,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,s){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities",path:{resourceId:e},query:{startDateTime:r,endDateTime: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 listAvailabilityEndTimes(e,r){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimes",path:{resourceId:e},query:{startDateTime: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 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,s){return i(t,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:s},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,s,a,l,n,p){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:s,promoCode:a,numberOfSlots:l,emails:n,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,s,a){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/cancellation-policy",path:{resourceId:e},query:{startTime:r,endTime:s,locale: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 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,s){return i(t,{method:"GET",url:"/users/bookings",query:{offset:e,limit:r,subType: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 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 getBookingSubscriptionsListUpcoming(e,r=10){return i(t,{method:"GET",url:"/users/bookings/subscriptions/upcoming",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 getBookingSubscriptionsListHistory(e,r=10){return i(t,{method:"GET",url:"/users/bookings/subscriptions/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 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,s){return i(t,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier: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 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,s){return i(t,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:s},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,s){return i(t,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:s},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 M=class{static getAvailabilityWithPrice(e,r,s,a,l,n,p){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:s,promoCode:a,numberOfSlots:l,emails:n,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 getBookingSubscriptionsListUpcoming(e,r=10){return i(t,{method:"GET",url:"/users/bookings/subscriptions/upcoming",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 getBookingSubscriptionsListHistory(e,r=10){return i(t,{method:"GET",url:"/users/bookings/subscriptions/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 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,s){return i(t,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier: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"}})}};var _=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,s){return i(t,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:s},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 F=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 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 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 $=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 getPlaySessionByBookingId(e){return i(t,{method:"GET",url:"/playsessions/by-bookingid/{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 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"}})}};0&&(module.exports={ActivityServiceV1Service,AnonymousService,ApiClientServiceV1Service,ApiError,AuthorizedService,BookingServiceV1Service,CancelError,CancelablePromise,CheckoutServiceV1Service,CompetitionServiceV1Service,CorsService,LoyaltyServiceV1Service,MembershipServiceV1Service,OpenAPI,PlaySessionServiceV1Service,UserServiceV1Service,bookingSubType,bookingSubscription,cancellationPolicy,clientType,months,pendingPayment,playingUserResponse});
1
+ "use strict";var O=Object.defineProperty,ne=Object.defineProperties,le=Object.getOwnPropertyDescriptor,pe=Object.getOwnPropertyDescriptors,ue=Object.getOwnPropertyNames,re=Object.getOwnPropertySymbols;var te=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable;var oe=(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={}))te.call(e,r)&&oe(o,r,e[r]);if(re)for(var r of re(e))ce.call(e,r)&&oe(o,r,e[r]);return o},ie=(o,e)=>ne(o,pe(e));var me=(o,e)=>{for(var r in e)O(o,r,{get:e[r],enumerable:!0})},de=(o,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of ue(e))!te.call(o,a)&&a!==r&&O(o,a,{get:()=>e[a],enumerable:!(s=le(e,a))||s.enumerable});return o};var fe=o=>de(O({},"__esModule",{value:!0}),o);var se=(o,e,r)=>{if(!e.has(o))throw TypeError("Cannot "+r)};var c=(o,e,r)=>(se(o,e,"read from private field"),r?r.call(o):e.get(o)),T=(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,s)=>(se(o,e,"write to private field"),s?s.call(o,r):e.set(o,r),r);var P=(o,e,r)=>new Promise((s,a)=>{var l=u=>{try{p(r.next(u))}catch(d){a(d)}},n=u=>{try{p(r.throw(u))}catch(d){a(d)}},p=u=>u.done?s(u.value):Promise.resolve(u.value).then(l,n);p((r=r.apply(o,e)).next())});var Ce={};me(Ce,{ActivityServiceV1Service:()=>B,AnonymousService:()=>N,ApiClientServiceV1Service:()=>L,ApiError:()=>S,AuthorizedService:()=>j,BookingServiceV1Service:()=>M,CancelError:()=>x,CancelablePromise:()=>C,CheckoutServiceV1Service:()=>_,CompetitionServiceV1Service:()=>F,CorsService:()=>H,LoyaltyServiceV1Service:()=>Y,MembershipServiceV1Service:()=>W,OpenAPI:()=>t,PlaySessionServiceV1Service:()=>$,UserServiceV1Service:()=>V,bookingSubType:()=>J,bookingSubscription:()=>G,cancellationPolicy:()=>w,clientType:()=>K,months:()=>Q,pendingPayment:()=>D,playingUserResponse:()=>q});module.exports=fe(Ce);var S=class extends Error{constructor(r,s,a){super(a);this.name="ApiError",this.url=s.url,this.status=s.status,this.statusText=s.statusText,this.body=s.body,this.request=r}};var x=class extends Error{constructor(e){super(e),this.name="CancelError"}get isCancelled(){return!0}},g,h,b,I,v,k,E,C=class{constructor(e){T(this,g,void 0);T(this,h,void 0);T(this,b,void 0);T(this,I,void 0);T(this,v,void 0);T(this,k,void 0);T(this,E,void 0);y(this,g,!1),y(this,h,!1),y(this,b,!1),y(this,I,[]),y(this,v,new Promise((r,s)=>{y(this,k,r),y(this,E,s);let a=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))},l=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))},n=p=>{c(this,g)||c(this,h)||c(this,b)||c(this,I).push(p)};return Object.defineProperty(n,"isResolved",{get:()=>c(this,g)}),Object.defineProperty(n,"isRejected",{get:()=>c(this,h)}),Object.defineProperty(n,"isCancelled",{get:()=>c(this,b)}),e(a,l,n)}))}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,I).length)try{for(let r of c(this,I))r()}catch(r){console.warn("Cancellation threw an error",r);return}c(this,I).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,I=new WeakMap,v=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=(n=>(n.BOOKING="booking",n.BOOKING_PLAYER="booking_player",n.ACTIVITY="activity",n.SPLIT="split",n.SPLIT_MAIN="split_main",n.SPLIT_INVITE="split_invite",n))(J||{});var w;(e=>{let o;(a=>(a.AVAILABILITY="AVAILABILITY",a.OCCASION="OCCASION"))(o=e.itemType||(e.itemType={}))})(w||(w={}));var K=(r=>(r.WIDGET="WIDGET",r.API="API",r))(K||{});var Q=(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))(Q||{});var D;(e=>{let o;(n=>(n.BOOKING="BOOKING",n.ACTIVITY="ACTIVITY",n.MEMBERSHIP="MEMBERSHIP",n.SUBSCRIPTION="SUBSCRIPTION"))(o=e.type||(e.type={}))})(D||(D={}));var q;(e=>{let o;(n=>(n.PAID="PAID",n.INVITED="INVITED",n.JOINED="JOINED",n.BOOKER="BOOKER"))(o=e.status||(e.status={}))})(q||(q={}));var Z=o=>o!=null,U=o=>typeof o=="string",X=o=>U(o)&&o!=="",ee=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,ye=o=>{try{return btoa(o)}catch(e){return Buffer.from(o).toString("base64")}},be=o=>{let e=[],r=(a,l)=>{e.push(`${encodeURIComponent(a)}=${encodeURIComponent(String(l))}`)},s=(a,l)=>{Z(l)&&(Array.isArray(l)?l.forEach(n=>{s(a,n)}):typeof l=="object"?Object.entries(l).forEach(([n,p])=>{s(`${a}[${n}]`,p)}):r(a,l))};return Object.entries(o).forEach(([a,l])=>{s(a,l)}),e.length>0?`?${e.join("&")}`:""},ge=(o,e)=>{let r=o.ENCODE_PATH||encodeURI,s=e.url.replace("{api-version}",o.VERSION).replace(/{(.*?)}/g,(l,n)=>{var p;return(p=e.path)!=null&&p.hasOwnProperty(n)?r(String(e.path[n])):l}),a=`${o.BASE}${s}`;return e.query?`${a}${be(e.query)}`:a},he=o=>{if(o.formData){let e=new FormData,r=(s,a)=>{U(a)||ee(a)?e.append(s,a):e.append(s,JSON.stringify(a))};return Object.entries(o.formData).filter(([s,a])=>Z(a)).forEach(([s,a])=>{Array.isArray(a)?a.forEach(l=>r(s,l)):r(s,a)}),e}},z=(o,e)=>P(void 0,null,function*(){return typeof e=="function"?e(o):e}),Te=(o,e)=>P(void 0,null,function*(){let r=yield z(e,o.TOKEN),s=yield z(e,o.USERNAME),a=yield z(e,o.PASSWORD),l=yield z(e,o.HEADERS),n=Object.entries(R(R({Accept:"application/json"},l),e.headers)).filter(([p,u])=>Z(u)).reduce((p,[u,d])=>ie(R({},p),{[u]:String(d)}),{});if(X(r)&&(n.Authorization=`Bearer ${r}`),X(s)&&X(a)){let p=ye(`${s}:${a}`);n.Authorization=`Basic ${p}`}return e.body&&(e.mediaType?n["Content-Type"]=e.mediaType:ee(e.body)?n["Content-Type"]=e.body.type||"application/octet-stream":U(e.body)?n["Content-Type"]="text/plain":ae(e.body)||(n["Content-Type"]="application/json")),new Headers(n)}),Ie=o=>{var e;if(o.body!==void 0)return(e=o.mediaType)!=null&&e.includes("/json")?JSON.stringify(o.body):U(o.body)||ee(o.body)||ae(o.body)?o.body:JSON.stringify(o.body)},Se=(o,e,r,s,a,l,n)=>P(void 0,null,function*(){let p=new AbortController,u={headers:l,body:s!=null?s:a,method:e.method,signal:p.signal};return o.WITH_CREDENTIALS&&(u.credentials=o.CREDENTIALS),n(()=>p.abort()),yield fetch(r,u)}),ve=(o,e)=>{if(e){let r=o.headers.get(e);if(U(r))return r}},Pe=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(a=>e.toLowerCase().startsWith(a))?yield o.json():yield o.text()}catch(e){console.error(e)}}),Ee=(o,e)=>{var a,l;let s=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(s)throw new S(o,e,s);if(!e.ok){let n=(a=e.status)!=null?a:"unknown",p=(l=e.statusText)!=null?l:"unknown",u=(()=>{try{return JSON.stringify(e.body,null,2)}catch(d){return}})();throw new S(o,e,`Generic Error: status: ${n}; status text: ${p}; body: ${u}`)}},i=(o,e)=>new C((r,s,a)=>P(void 0,null,function*(){try{let l=ge(o,e),n=he(e),p=Ie(e),u=yield Te(o,e);if(!a.isCancelled){let d=yield Se(o,e,l,p,n,u,a),f=yield Pe(d),A=ve(d,e.responseHeader),m={url:l,ok:d.ok,status:d.status,statusText:d.statusText,body:A!=null?A:f};Ee(e,m),r(m.body)}}catch(l){s(l)}}));var B=class{static getAdminActivityOccasions(e,r,s,a,l,n=10){return i(t,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:s,endDate:a,offset:l,limit: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"}})}};var N=class{static listActivities(e=!1,r=!1,s,a,l,n,p,u,d,f,A,m=10){return i(t,{method:"GET",url:"/activities",query:{hideFullyBooked:e,exposeOccasions:r,facilityIds:s,level:a,locationSearch:l,categorySearch:n,querySearch:p,resourceTypes:u,startDate:d,endDate:f,offset:A,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,s,a,l){return i(t,{method:"GET",url:"/activities/{activityId}/occasions",path:{activityId:e},query:{hideFullyBooked:r,hidePastOccasions:s,startDate:a,endDate: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 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,s,a,l,n=10){return i(t,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:s,endDate:a,offset:l,limit: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 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,s,a,l,n,p,u,d=10){return i(t,{method:"GET",url:"/facilities",query:{city:e,countryCode:r,name:s,latitude:a,longitude:l,radius:n,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,s){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities",path:{resourceId:e},query:{startDateTime:r,endDateTime: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 listAvailabilityEndTimes(e,r){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimes",path:{resourceId:e},query:{startDateTime: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 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,s){return i(t,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:s},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,s,a,l,n,p){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:s,promoCode:a,numberOfSlots:l,emails:n,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 listAvailabilityEndTimesWithPrices(e,r,s,a,l){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimes/prices",path:{resourceId:e},query:{startTime:r,numberOfSlots:s,emails:a,userIds: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 getCancellationPolicy(e,r,s,a){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/cancellation-policy",path:{resourceId:e},query:{startTime:r,endTime:s,locale: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 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,s){return i(t,{method:"GET",url:"/users/bookings",query:{offset:e,limit:r,subType: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 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 getBookingSubscriptionsListUpcoming(e,r=10){return i(t,{method:"GET",url:"/users/bookings/subscriptions/upcoming",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 getBookingSubscriptionsListHistory(e,r=10){return i(t,{method:"GET",url:"/users/bookings/subscriptions/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 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,s){return i(t,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier: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 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,s){return i(t,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:s},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,s){return i(t,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:s},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 M=class{static getAvailabilityWithPrice(e,r,s,a,l,n,p){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:s,promoCode:a,numberOfSlots:l,emails:n,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 listAvailabilityEndTimesWithPrices(e,r,s,a,l){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimes/prices",path:{resourceId:e},query:{startTime:r,numberOfSlots:s,emails:a,userIds: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 getBookingSubscriptionsListUpcoming(e,r=10){return i(t,{method:"GET",url:"/users/bookings/subscriptions/upcoming",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 getBookingSubscriptionsListHistory(e,r=10){return i(t,{method:"GET",url:"/users/bookings/subscriptions/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 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,s){return i(t,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier: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"}})}};var _=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,s){return i(t,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:s},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 F=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 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 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 $=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 getPlaySessionByBookingId(e){return i(t,{method:"GET",url:"/playsessions/by-bookingid/{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 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"}})}};0&&(module.exports={ActivityServiceV1Service,AnonymousService,ApiClientServiceV1Service,ApiError,AuthorizedService,BookingServiceV1Service,CancelError,CancelablePromise,CheckoutServiceV1Service,CompetitionServiceV1Service,CorsService,LoyaltyServiceV1Service,MembershipServiceV1Service,OpenAPI,PlaySessionServiceV1Service,UserServiceV1Service,bookingSubType,bookingSubscription,cancellationPolicy,clientType,months,pendingPayment,playingUserResponse});
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- var se=Object.defineProperty,ae=Object.defineProperties;var ne=Object.getOwnPropertyDescriptors;var Q=Object.getOwnPropertySymbols;var le=Object.prototype.hasOwnProperty,pe=Object.prototype.propertyIsEnumerable;var X=(t,e,r)=>e in t?se(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,R=(t,e)=>{for(var r in e||(e={}))le.call(e,r)&&X(t,r,e[r]);if(Q)for(var r of Q(e))pe.call(e,r)&&X(t,r,e[r]);return t},Z=(t,e)=>ae(t,ne(e));var ee=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var c=(t,e,r)=>(ee(t,e,"read from private field"),r?r.call(t):e.get(t)),I=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},y=(t,e,r,s)=>(ee(t,e,"write to private field"),s?s.call(t,r):e.set(t,r),r);var v=(t,e,r)=>new Promise((s,a)=>{var l=u=>{try{p(r.next(u))}catch(d){a(d)}},n=u=>{try{p(r.throw(u))}catch(d){a(d)}},p=u=>u.done?s(u.value):Promise.resolve(u.value).then(l,n);p((r=r.apply(t,e)).next())});var P=class extends Error{constructor(r,s,a){super(a);this.name="ApiError",this.url=s.url,this.status=s.status,this.statusText=s.statusText,this.body=s.body,this.request=r}};var U=class extends Error{constructor(e){super(e),this.name="CancelError"}get isCancelled(){return!0}},g,h,b,T,S,k,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,S,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,S,new Promise((r,s)=>{y(this,k,r),y(this,E,s);let a=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))},l=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))},n=p=>{c(this,g)||c(this,h)||c(this,b)||c(this,T).push(p)};return Object.defineProperty(n,"isResolved",{get:()=>c(this,g)}),Object.defineProperty(n,"isRejected",{get:()=>c(this,h)}),Object.defineProperty(n,"isCancelled",{get:()=>c(this,b)}),e(a,l,n)}))}get[Symbol.toStringTag](){return"Cancellable Promise"}then(e,r){return c(this,S).then(e,r)}catch(e){return c(this,S).catch(e)}finally(e){return c(this,S).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,S=new WeakMap,k=new WeakMap,E=new WeakMap;var o={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 t;(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"))(t=e.weekday||(e.weekday={}))})(G||(G={}));var re=(n=>(n.BOOKING="booking",n.BOOKING_PLAYER="booking_player",n.ACTIVITY="activity",n.SPLIT="split",n.SPLIT_MAIN="split_main",n.SPLIT_INVITE="split_invite",n))(re||{});var w;(e=>{let t;(a=>(a.AVAILABILITY="AVAILABILITY",a.OCCASION="OCCASION"))(t=e.itemType||(e.itemType={}))})(w||(w={}));var oe=(r=>(r.WIDGET="WIDGET",r.API="API",r))(oe||{});var te=(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))(te||{});var D;(e=>{let t;(n=>(n.BOOKING="BOOKING",n.ACTIVITY="ACTIVITY",n.MEMBERSHIP="MEMBERSHIP",n.SUBSCRIPTION="SUBSCRIPTION"))(t=e.type||(e.type={}))})(D||(D={}));var q;(e=>{let t;(n=>(n.PAID="PAID",n.INVITED="INVITED",n.JOINED="JOINED",n.BOOKER="BOOKER"))(t=e.status||(e.status={}))})(q||(q={}));var B=t=>t!=null,x=t=>typeof t=="string",z=t=>x(t)&&t!=="",N=t=>typeof t=="object"&&typeof t.type=="string"&&typeof t.stream=="function"&&typeof t.arrayBuffer=="function"&&typeof t.constructor=="function"&&typeof t.constructor.name=="string"&&/^(Blob|File)$/.test(t.constructor.name)&&/^(Blob|File)$/.test(t[Symbol.toStringTag]),ie=t=>t instanceof FormData,ue=t=>{try{return btoa(t)}catch(e){return Buffer.from(t).toString("base64")}},ce=t=>{let e=[],r=(a,l)=>{e.push(`${encodeURIComponent(a)}=${encodeURIComponent(String(l))}`)},s=(a,l)=>{B(l)&&(Array.isArray(l)?l.forEach(n=>{s(a,n)}):typeof l=="object"?Object.entries(l).forEach(([n,p])=>{s(`${a}[${n}]`,p)}):r(a,l))};return Object.entries(t).forEach(([a,l])=>{s(a,l)}),e.length>0?`?${e.join("&")}`:""},me=(t,e)=>{let r=t.ENCODE_PATH||encodeURI,s=e.url.replace("{api-version}",t.VERSION).replace(/{(.*?)}/g,(l,n)=>{var p;return(p=e.path)!=null&&p.hasOwnProperty(n)?r(String(e.path[n])):l}),a=`${t.BASE}${s}`;return e.query?`${a}${ce(e.query)}`:a},de=t=>{if(t.formData){let e=new FormData,r=(s,a)=>{x(a)||N(a)?e.append(s,a):e.append(s,JSON.stringify(a))};return Object.entries(t.formData).filter(([s,a])=>B(a)).forEach(([s,a])=>{Array.isArray(a)?a.forEach(l=>r(s,l)):r(s,a)}),e}},O=(t,e)=>v(void 0,null,function*(){return typeof e=="function"?e(t):e}),fe=(t,e)=>v(void 0,null,function*(){let r=yield O(e,t.TOKEN),s=yield O(e,t.USERNAME),a=yield O(e,t.PASSWORD),l=yield O(e,t.HEADERS),n=Object.entries(R(R({Accept:"application/json"},l),e.headers)).filter(([p,u])=>B(u)).reduce((p,[u,d])=>Z(R({},p),{[u]:String(d)}),{});if(z(r)&&(n.Authorization=`Bearer ${r}`),z(s)&&z(a)){let p=ue(`${s}:${a}`);n.Authorization=`Basic ${p}`}return e.body&&(e.mediaType?n["Content-Type"]=e.mediaType:N(e.body)?n["Content-Type"]=e.body.type||"application/octet-stream":x(e.body)?n["Content-Type"]="text/plain":ie(e.body)||(n["Content-Type"]="application/json")),new Headers(n)}),ye=t=>{var e;if(t.body!==void 0)return(e=t.mediaType)!=null&&e.includes("/json")?JSON.stringify(t.body):x(t.body)||N(t.body)||ie(t.body)?t.body:JSON.stringify(t.body)},be=(t,e,r,s,a,l,n)=>v(void 0,null,function*(){let p=new AbortController,u={headers:l,body:s!=null?s:a,method:e.method,signal:p.signal};return t.WITH_CREDENTIALS&&(u.credentials=t.CREDENTIALS),n(()=>p.abort()),yield fetch(r,u)}),ge=(t,e)=>{if(e){let r=t.headers.get(e);if(x(r))return r}},he=t=>v(void 0,null,function*(){if(t.status!==204)try{let e=t.headers.get("Content-Type");if(e)return["application/json","application/problem+json"].some(a=>e.toLowerCase().startsWith(a))?yield t.json():yield t.text()}catch(e){console.error(e)}}),Ie=(t,e)=>{var a,l;let s=R({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},t.errors)[e.status];if(s)throw new P(t,e,s);if(!e.ok){let n=(a=e.status)!=null?a:"unknown",p=(l=e.statusText)!=null?l:"unknown",u=(()=>{try{return JSON.stringify(e.body,null,2)}catch(d){return}})();throw new P(t,e,`Generic Error: status: ${n}; status text: ${p}; body: ${u}`)}},i=(t,e)=>new A((r,s,a)=>v(void 0,null,function*(){try{let l=me(t,e),n=de(e),p=ye(e),u=yield fe(t,e);if(!a.isCancelled){let d=yield be(t,e,l,p,n,u,a),f=yield he(d),C=ge(d,e.responseHeader),m={url:l,ok:d.ok,status:d.status,statusText:d.statusText,body:C!=null?C:f};Ie(e,m),r(m.body)}}catch(l){s(l)}}));var L=class{static getAdminActivityOccasions(e,r,s,a,l,n=10){return i(o,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:s,endDate:a,offset:l,limit: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"}})}};var j=class{static listActivities(e=!1,r=!1,s,a,l,n,p,u,d,f,C,m=10){return i(o,{method:"GET",url:"/activities",query:{hideFullyBooked:e,exposeOccasions:r,facilityIds:s,level:a,locationSearch:l,categorySearch:n,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(o,{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,s,a,l){return i(o,{method:"GET",url:"/activities/{activityId}/occasions",path:{activityId:e},query:{hideFullyBooked:r,hidePastOccasions:s,startDate:a,endDate: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 getActivityOccasion(e){return i(o,{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,s,a,l,n=10){return i(o,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:s,endDate:a,offset:l,limit: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 updateCompetitionAccount(e){return i(o,{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,s,a,l,n,p,u,d=10){return i(o,{method:"GET",url:"/facilities",query:{city:e,countryCode:r,name:s,latitude:a,longitude:l,radius:n,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(o,{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(o,{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(o,{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,s){return i(o,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities",path:{resourceId:e},query:{startDateTime:r,endDateTime: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 listAvailabilityEndTimes(e,r){return i(o,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimes",path:{resourceId:e},query:{startDateTime: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 getUserProfile(e){return i(o,{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(o,{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(o,{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 M=class{static getApiClientList(e,r=10){return i(o,{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(o,{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(o,{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,s){return i(o,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:s},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(o,{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 getActivityOccasionPrice(e,r){return i(o,{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(o,{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,s,a,l,n,p){return i(o,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:s,promoCode:a,numberOfSlots:l,emails:n,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,s,a){return i(o,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/cancellation-policy",path:{resourceId:e},query:{startTime:r,endTime:s,locale: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 createPromoCode(e){return i(o,{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(o,{method:"GET",url:"/users/info",errors:{500:"General Error",503:"Service unavailable, please try again"}})}static listUserFavourites(){return i(o,{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(o,{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(o,{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(o,{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(o,{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(o,{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,s){return i(o,{method:"GET",url:"/users/bookings",query:{offset:e,limit:r,subType: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 createBooking(e){return i(o,{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(o,{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(o,{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 getBookingSubscriptionsListUpcoming(e,r=10){return i(o,{method:"GET",url:"/users/bookings/subscriptions/upcoming",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 getBookingSubscriptionsListHistory(e,r=10){return i(o,{method:"GET",url:"/users/bookings/subscriptions/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 getBookingSubscriptionDetails(e){return i(o,{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(o,{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(o,{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(o,{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(o,{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(o,{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(o,{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(o,{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(o,{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(o,{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(o,{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,s){return i(o,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier: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 getUserPlaySessionsHistory(e,r=10){return i(o,{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(o,{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(o,{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(o,{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(o,{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(o,{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,s){return i(o,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:s},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(o,{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(o,{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(o,{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(o,{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(o,{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(o,{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(o,{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,s){return i(o,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:s},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(o,{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 getAvailabilityWithPrice(e,r,s,a,l,n,p){return i(o,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:s,promoCode:a,numberOfSlots:l,emails:n,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 getBookingSubscriptionsListUpcoming(e,r=10){return i(o,{method:"GET",url:"/users/bookings/subscriptions/upcoming",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 getBookingSubscriptionsListHistory(e,r=10){return i(o,{method:"GET",url:"/users/bookings/subscriptions/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 getBookingSubscriptionDetails(e){return i(o,{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(o,{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(o,{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(o,{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(o,{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(o,{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(o,{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(o,{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,s){return i(o,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier: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"}})}};var H=class{static getCheckout(e){return i(o,{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,s){return i(o,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:s},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 Y=class{static updateCompetitionAccount(e){return i(o,{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(o,{method:"OPTIONS",url:"/{cors+}",path:{"cors+":e},responseHeader:"Access-Control-Allow-Origin"})}};var $=class{static createPromoCode(e){return i(o,{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 V=class{static createMembership(e){return i(o,{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(o,{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(o,{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 getPlaySessionByBookingId(e){return i(o,{method:"GET",url:"/playsessions/by-bookingid/{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 addPlayerWithUserId(e,r){return i(o,{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(o,{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(o,{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(o,{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(o,{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(o,{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(o,{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 K=class{static getUserProfile(e){return i(o,{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(o,{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(o,{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(o,{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(o,{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(o,{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{L as ActivityServiceV1Service,j as AnonymousService,M as ApiClientServiceV1Service,P as ApiError,_ as AuthorizedService,F as BookingServiceV1Service,U as CancelError,A as CancelablePromise,H as CheckoutServiceV1Service,Y as CompetitionServiceV1Service,W as CorsService,$ as LoyaltyServiceV1Service,V as MembershipServiceV1Service,o as OpenAPI,J as PlaySessionServiceV1Service,K as UserServiceV1Service,re as bookingSubType,G as bookingSubscription,w as cancellationPolicy,oe as clientType,te as months,D as pendingPayment,q as playingUserResponse};
1
+ var se=Object.defineProperty,ae=Object.defineProperties;var ne=Object.getOwnPropertyDescriptors;var Q=Object.getOwnPropertySymbols;var le=Object.prototype.hasOwnProperty,pe=Object.prototype.propertyIsEnumerable;var X=(i,e,r)=>e in i?se(i,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[e]=r,A=(i,e)=>{for(var r in e||(e={}))le.call(e,r)&&X(i,r,e[r]);if(Q)for(var r of Q(e))pe.call(e,r)&&X(i,r,e[r]);return i},Z=(i,e)=>ae(i,ne(e));var ee=(i,e,r)=>{if(!e.has(i))throw TypeError("Cannot "+r)};var c=(i,e,r)=>(ee(i,e,"read from private field"),r?r.call(i):e.get(i)),T=(i,e,r)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,r)},y=(i,e,r,s)=>(ee(i,e,"write to private field"),s?s.call(i,r):e.set(i,r),r);var v=(i,e,r)=>new Promise((s,a)=>{var l=u=>{try{p(r.next(u))}catch(d){a(d)}},n=u=>{try{p(r.throw(u))}catch(d){a(d)}},p=u=>u.done?s(u.value):Promise.resolve(u.value).then(l,n);p((r=r.apply(i,e)).next())});var P=class extends Error{constructor(r,s,a){super(a);this.name="ApiError",this.url=s.url,this.status=s.status,this.statusText=s.statusText,this.body=s.body,this.request=r}};var U=class extends Error{constructor(e){super(e),this.name="CancelError"}get isCancelled(){return!0}},g,h,b,I,S,x,E,R=class{constructor(e){T(this,g,void 0);T(this,h,void 0);T(this,b,void 0);T(this,I,void 0);T(this,S,void 0);T(this,x,void 0);T(this,E,void 0);y(this,g,!1),y(this,h,!1),y(this,b,!1),y(this,I,[]),y(this,S,new Promise((r,s)=>{y(this,x,r),y(this,E,s);let a=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))},l=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))},n=p=>{c(this,g)||c(this,h)||c(this,b)||c(this,I).push(p)};return Object.defineProperty(n,"isResolved",{get:()=>c(this,g)}),Object.defineProperty(n,"isRejected",{get:()=>c(this,h)}),Object.defineProperty(n,"isCancelled",{get:()=>c(this,b)}),e(a,l,n)}))}get[Symbol.toStringTag](){return"Cancellable Promise"}then(e,r){return c(this,S).then(e,r)}catch(e){return c(this,S).catch(e)}finally(e){return c(this,S).finally(e)}cancel(){var e;if(!(c(this,g)||c(this,h)||c(this,b))){if(y(this,b,!0),c(this,I).length)try{for(let r of c(this,I))r()}catch(r){console.warn("Cancellation threw an error",r);return}c(this,I).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,I=new WeakMap,S=new WeakMap,x=new WeakMap,E=new WeakMap;var o={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 i;(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"))(i=e.weekday||(e.weekday={}))})(G||(G={}));var re=(n=>(n.BOOKING="booking",n.BOOKING_PLAYER="booking_player",n.ACTIVITY="activity",n.SPLIT="split",n.SPLIT_MAIN="split_main",n.SPLIT_INVITE="split_invite",n))(re||{});var w;(e=>{let i;(a=>(a.AVAILABILITY="AVAILABILITY",a.OCCASION="OCCASION"))(i=e.itemType||(e.itemType={}))})(w||(w={}));var oe=(r=>(r.WIDGET="WIDGET",r.API="API",r))(oe||{});var te=(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))(te||{});var D;(e=>{let i;(n=>(n.BOOKING="BOOKING",n.ACTIVITY="ACTIVITY",n.MEMBERSHIP="MEMBERSHIP",n.SUBSCRIPTION="SUBSCRIPTION"))(i=e.type||(e.type={}))})(D||(D={}));var q;(e=>{let i;(n=>(n.PAID="PAID",n.INVITED="INVITED",n.JOINED="JOINED",n.BOOKER="BOOKER"))(i=e.status||(e.status={}))})(q||(q={}));var B=i=>i!=null,k=i=>typeof i=="string",z=i=>k(i)&&i!=="",N=i=>typeof i=="object"&&typeof i.type=="string"&&typeof i.stream=="function"&&typeof i.arrayBuffer=="function"&&typeof i.constructor=="function"&&typeof i.constructor.name=="string"&&/^(Blob|File)$/.test(i.constructor.name)&&/^(Blob|File)$/.test(i[Symbol.toStringTag]),ie=i=>i instanceof FormData,ue=i=>{try{return btoa(i)}catch(e){return Buffer.from(i).toString("base64")}},ce=i=>{let e=[],r=(a,l)=>{e.push(`${encodeURIComponent(a)}=${encodeURIComponent(String(l))}`)},s=(a,l)=>{B(l)&&(Array.isArray(l)?l.forEach(n=>{s(a,n)}):typeof l=="object"?Object.entries(l).forEach(([n,p])=>{s(`${a}[${n}]`,p)}):r(a,l))};return Object.entries(i).forEach(([a,l])=>{s(a,l)}),e.length>0?`?${e.join("&")}`:""},me=(i,e)=>{let r=i.ENCODE_PATH||encodeURI,s=e.url.replace("{api-version}",i.VERSION).replace(/{(.*?)}/g,(l,n)=>{var p;return(p=e.path)!=null&&p.hasOwnProperty(n)?r(String(e.path[n])):l}),a=`${i.BASE}${s}`;return e.query?`${a}${ce(e.query)}`:a},de=i=>{if(i.formData){let e=new FormData,r=(s,a)=>{k(a)||N(a)?e.append(s,a):e.append(s,JSON.stringify(a))};return Object.entries(i.formData).filter(([s,a])=>B(a)).forEach(([s,a])=>{Array.isArray(a)?a.forEach(l=>r(s,l)):r(s,a)}),e}},O=(i,e)=>v(void 0,null,function*(){return typeof e=="function"?e(i):e}),fe=(i,e)=>v(void 0,null,function*(){let r=yield O(e,i.TOKEN),s=yield O(e,i.USERNAME),a=yield O(e,i.PASSWORD),l=yield O(e,i.HEADERS),n=Object.entries(A(A({Accept:"application/json"},l),e.headers)).filter(([p,u])=>B(u)).reduce((p,[u,d])=>Z(A({},p),{[u]:String(d)}),{});if(z(r)&&(n.Authorization=`Bearer ${r}`),z(s)&&z(a)){let p=ue(`${s}:${a}`);n.Authorization=`Basic ${p}`}return e.body&&(e.mediaType?n["Content-Type"]=e.mediaType:N(e.body)?n["Content-Type"]=e.body.type||"application/octet-stream":k(e.body)?n["Content-Type"]="text/plain":ie(e.body)||(n["Content-Type"]="application/json")),new Headers(n)}),ye=i=>{var e;if(i.body!==void 0)return(e=i.mediaType)!=null&&e.includes("/json")?JSON.stringify(i.body):k(i.body)||N(i.body)||ie(i.body)?i.body:JSON.stringify(i.body)},be=(i,e,r,s,a,l,n)=>v(void 0,null,function*(){let p=new AbortController,u={headers:l,body:s!=null?s:a,method:e.method,signal:p.signal};return i.WITH_CREDENTIALS&&(u.credentials=i.CREDENTIALS),n(()=>p.abort()),yield fetch(r,u)}),ge=(i,e)=>{if(e){let r=i.headers.get(e);if(k(r))return r}},he=i=>v(void 0,null,function*(){if(i.status!==204)try{let e=i.headers.get("Content-Type");if(e)return["application/json","application/problem+json"].some(a=>e.toLowerCase().startsWith(a))?yield i.json():yield i.text()}catch(e){console.error(e)}}),Te=(i,e)=>{var a,l;let s=A({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},i.errors)[e.status];if(s)throw new P(i,e,s);if(!e.ok){let n=(a=e.status)!=null?a:"unknown",p=(l=e.statusText)!=null?l:"unknown",u=(()=>{try{return JSON.stringify(e.body,null,2)}catch(d){return}})();throw new P(i,e,`Generic Error: status: ${n}; status text: ${p}; body: ${u}`)}},t=(i,e)=>new R((r,s,a)=>v(void 0,null,function*(){try{let l=me(i,e),n=de(e),p=ye(e),u=yield fe(i,e);if(!a.isCancelled){let d=yield be(i,e,l,p,n,u,a),f=yield he(d),C=ge(d,e.responseHeader),m={url:l,ok:d.ok,status:d.status,statusText:d.statusText,body:C!=null?C:f};Te(e,m),r(m.body)}}catch(l){s(l)}}));var L=class{static getAdminActivityOccasions(e,r,s,a,l,n=10){return t(o,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:s,endDate:a,offset:l,limit: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"}})}};var j=class{static listActivities(e=!1,r=!1,s,a,l,n,p,u,d,f,C,m=10){return t(o,{method:"GET",url:"/activities",query:{hideFullyBooked:e,exposeOccasions:r,facilityIds:s,level:a,locationSearch:l,categorySearch:n,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 t(o,{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,s,a,l){return t(o,{method:"GET",url:"/activities/{activityId}/occasions",path:{activityId:e},query:{hideFullyBooked:r,hidePastOccasions:s,startDate:a,endDate: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 getActivityOccasion(e){return t(o,{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,s,a,l,n=10){return t(o,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:s,endDate:a,offset:l,limit: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 updateCompetitionAccount(e){return t(o,{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,s,a,l,n,p,u,d=10){return t(o,{method:"GET",url:"/facilities",query:{city:e,countryCode:r,name:s,latitude:a,longitude:l,radius:n,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 t(o,{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 t(o,{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 t(o,{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,s){return t(o,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities",path:{resourceId:e},query:{startDateTime:r,endDateTime: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 listAvailabilityEndTimes(e,r){return t(o,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimes",path:{resourceId:e},query:{startDateTime: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 getUserProfile(e){return t(o,{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 t(o,{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 t(o,{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 M=class{static getApiClientList(e,r=10){return t(o,{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 t(o,{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 t(o,{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,s){return t(o,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:s},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 t(o,{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 getActivityOccasionPrice(e,r){return t(o,{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 t(o,{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,s,a,l,n,p){return t(o,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:s,promoCode:a,numberOfSlots:l,emails:n,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 listAvailabilityEndTimesWithPrices(e,r,s,a,l){return t(o,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimes/prices",path:{resourceId:e},query:{startTime:r,numberOfSlots:s,emails:a,userIds: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 getCancellationPolicy(e,r,s,a){return t(o,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/cancellation-policy",path:{resourceId:e},query:{startTime:r,endTime:s,locale: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 createPromoCode(e){return t(o,{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 t(o,{method:"GET",url:"/users/info",errors:{500:"General Error",503:"Service unavailable, please try again"}})}static listUserFavourites(){return t(o,{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 t(o,{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 t(o,{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 t(o,{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 t(o,{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 t(o,{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,s){return t(o,{method:"GET",url:"/users/bookings",query:{offset:e,limit:r,subType: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 createBooking(e){return t(o,{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 t(o,{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 t(o,{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 getBookingSubscriptionsListUpcoming(e,r=10){return t(o,{method:"GET",url:"/users/bookings/subscriptions/upcoming",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 getBookingSubscriptionsListHistory(e,r=10){return t(o,{method:"GET",url:"/users/bookings/subscriptions/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 getBookingSubscriptionDetails(e){return t(o,{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 t(o,{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 t(o,{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 t(o,{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 t(o,{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 t(o,{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 t(o,{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 t(o,{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 t(o,{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 t(o,{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 t(o,{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,s){return t(o,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier: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 getUserPlaySessionsHistory(e,r=10){return t(o,{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 t(o,{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 t(o,{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 t(o,{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 t(o,{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 t(o,{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,s){return t(o,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:s},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 t(o,{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 t(o,{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 t(o,{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 t(o,{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 t(o,{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 t(o,{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 t(o,{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,s){return t(o,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:s},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 t(o,{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 getAvailabilityWithPrice(e,r,s,a,l,n,p){return t(o,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:s,promoCode:a,numberOfSlots:l,emails:n,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 listAvailabilityEndTimesWithPrices(e,r,s,a,l){return t(o,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimes/prices",path:{resourceId:e},query:{startTime:r,numberOfSlots:s,emails:a,userIds: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 getBookingSubscriptionsListUpcoming(e,r=10){return t(o,{method:"GET",url:"/users/bookings/subscriptions/upcoming",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 getBookingSubscriptionsListHistory(e,r=10){return t(o,{method:"GET",url:"/users/bookings/subscriptions/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 getBookingSubscriptionDetails(e){return t(o,{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 t(o,{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 t(o,{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 t(o,{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 t(o,{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 t(o,{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 t(o,{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 t(o,{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,s){return t(o,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier: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"}})}};var H=class{static getCheckout(e){return t(o,{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,s){return t(o,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:s},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 Y=class{static updateCompetitionAccount(e){return t(o,{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 t(o,{method:"OPTIONS",url:"/{cors+}",path:{"cors+":e},responseHeader:"Access-Control-Allow-Origin"})}};var $=class{static createPromoCode(e){return t(o,{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 V=class{static createMembership(e){return t(o,{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 t(o,{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 t(o,{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 getPlaySessionByBookingId(e){return t(o,{method:"GET",url:"/playsessions/by-bookingid/{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 addPlayerWithUserId(e,r){return t(o,{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 t(o,{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 t(o,{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 t(o,{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 t(o,{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 t(o,{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 t(o,{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 K=class{static getUserProfile(e){return t(o,{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 t(o,{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 t(o,{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 t(o,{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 t(o,{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 t(o,{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{L as ActivityServiceV1Service,j as AnonymousService,M as ApiClientServiceV1Service,P as ApiError,_ as AuthorizedService,F as BookingServiceV1Service,U as CancelError,R as CancelablePromise,H as CheckoutServiceV1Service,Y as CompetitionServiceV1Service,W as CorsService,$ as LoyaltyServiceV1Service,V as MembershipServiceV1Service,o as OpenAPI,J as PlaySessionServiceV1Service,K as UserServiceV1Service,re as bookingSubType,G as bookingSubscription,w as cancellationPolicy,oe as clientType,te as months,D as pendingPayment,q as playingUserResponse};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matchi/api",
3
- "version": "0.20240223.1",
3
+ "version": "0.20240305.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "module": "dist/index.mjs",