@matchi/api 0.20250423.1 → 0.20250514.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.
@@ -1353,11 +1353,13 @@ type playerLevels = Record<string, {
1353
1353
  * If provided, only returns playsessions which match this players status:
1354
1354
  * * `ALL` - Default: No filtering.
1355
1355
  * * `PENDING_APPROVAL` - Only returns owned playsessions where at least one player has status `UNAPPROVED`.
1356
+ * * `PENDING_ACTION` - Only returns playsessions where either the user is UNCONFIRMED or is owner and there is at least one player with status `UNAPPROVED`.
1356
1357
  *
1357
1358
  */
1358
1359
  declare enum playerStatusParam {
1359
1360
  ALL = "ALL",
1360
- PENDING_APPROVAL = "PENDING_APPROVAL"
1361
+ PENDING_APPROVAL = "PENDING_APPROVAL",
1362
+ PENDING_ACTION = "PENDING_ACTION"
1361
1363
  }
1362
1364
 
1363
1365
  type playingUserResponse = {
@@ -1964,7 +1966,8 @@ declare class AuthorizedService {
1964
1966
  */
1965
1967
  static createPromoCode(requestBody: createPromoCode): CancelablePromise<promoCode>;
1966
1968
  /**
1967
- * Get users of a booking the current user is allowed to see
1969
+ * @deprecated
1970
+ * Get users of a booking the current user is allowed to see. Deprecated: Use /playsessions/{sessionId} or /playsessions/by-bookingid/{bookingId} to get the booking's users instead
1968
1971
  * @param bookingId id of the booking
1969
1972
  * @returns bookingUsersResponse Booking users details
1970
1973
  * @throws ApiError
@@ -2308,11 +2311,12 @@ declare class AuthorizedService {
2308
2311
  * @param playerStatus If provided, only returns playsessions which match this players status:
2309
2312
  * * `ALL` - Default: No filtering.
2310
2313
  * * `PENDING_APPROVAL` - Only returns owned playsessions where at least one player has status `UNAPPROVED`.
2314
+ * * `PENDING_ACTION` - Only returns playsessions where either the user is UNCONFIRMED or is owner and there is at least one player with status `UNAPPROVED`.
2311
2315
  *
2312
2316
  * @returns playSessionResponse List of play sessions connected to the user
2313
2317
  * @throws ApiError
2314
2318
  */
2315
- static getUserPlaySessions(offset?: number, limit?: number, direction?: 'UPCOMING' | 'HISTORICAL', playerStatus?: 'ALL' | 'PENDING_APPROVAL'): CancelablePromise<playSessionResponse>;
2319
+ static getUserPlaySessions(offset?: number, limit?: number, direction?: 'UPCOMING' | 'HISTORICAL', playerStatus?: 'ALL' | 'PENDING_APPROVAL' | 'PENDING_ACTION'): CancelablePromise<playSessionResponse>;
2316
2320
  /**
2317
2321
  * @deprecated
2318
2322
  * Get past play sessions. Deprecated: Use paginated POST /users/playsessions?direction=HISTORICAL instead
@@ -2515,7 +2519,8 @@ declare class BookingServiceV1Service {
2515
2519
  */
2516
2520
  static listAvailabilityEndTimesWithRestrictions(resourceId: string, startTime: timeStamp, numberOfSlots?: number, emails?: Array<string>, userIds?: Array<string>): CancelablePromise<endTimesWithRestrictions>;
2517
2521
  /**
2518
- * Get users of a booking the current user is allowed to see
2522
+ * @deprecated
2523
+ * Get users of a booking the current user is allowed to see. Deprecated: Use /playsessions/{sessionId} or /playsessions/by-bookingid/{bookingId} to get the booking's users instead
2519
2524
  * @param bookingId id of the booking
2520
2525
  * @returns bookingUsersResponse Booking users details
2521
2526
  * @throws ApiError
@@ -2793,11 +2798,12 @@ declare class PlaySessionServiceV1Service {
2793
2798
  * @param playerStatus If provided, only returns playsessions which match this players status:
2794
2799
  * * `ALL` - Default: No filtering.
2795
2800
  * * `PENDING_APPROVAL` - Only returns owned playsessions where at least one player has status `UNAPPROVED`.
2801
+ * * `PENDING_ACTION` - Only returns playsessions where either the user is UNCONFIRMED or is owner and there is at least one player with status `UNAPPROVED`.
2796
2802
  *
2797
2803
  * @returns playSessionResponse List of play sessions connected to the user
2798
2804
  * @throws ApiError
2799
2805
  */
2800
- static getUserPlaySessions(offset?: number, limit?: number, direction?: 'UPCOMING' | 'HISTORICAL', playerStatus?: 'ALL' | 'PENDING_APPROVAL'): CancelablePromise<playSessionResponse>;
2806
+ static getUserPlaySessions(offset?: number, limit?: number, direction?: 'UPCOMING' | 'HISTORICAL', playerStatus?: 'ALL' | 'PENDING_APPROVAL' | 'PENDING_ACTION'): CancelablePromise<playSessionResponse>;
2801
2807
  /**
2802
2808
  * @deprecated
2803
2809
  * Get past play sessions. Deprecated: Use paginated POST /users/playsessions?direction=HISTORICAL instead
@@ -1353,11 +1353,13 @@ type playerLevels = Record<string, {
1353
1353
  * If provided, only returns playsessions which match this players status:
1354
1354
  * * `ALL` - Default: No filtering.
1355
1355
  * * `PENDING_APPROVAL` - Only returns owned playsessions where at least one player has status `UNAPPROVED`.
1356
+ * * `PENDING_ACTION` - Only returns playsessions where either the user is UNCONFIRMED or is owner and there is at least one player with status `UNAPPROVED`.
1356
1357
  *
1357
1358
  */
1358
1359
  declare enum playerStatusParam {
1359
1360
  ALL = "ALL",
1360
- PENDING_APPROVAL = "PENDING_APPROVAL"
1361
+ PENDING_APPROVAL = "PENDING_APPROVAL",
1362
+ PENDING_ACTION = "PENDING_ACTION"
1361
1363
  }
1362
1364
 
1363
1365
  type playingUserResponse = {
@@ -1964,7 +1966,8 @@ declare class AuthorizedService {
1964
1966
  */
1965
1967
  static createPromoCode(requestBody: createPromoCode): CancelablePromise<promoCode>;
1966
1968
  /**
1967
- * Get users of a booking the current user is allowed to see
1969
+ * @deprecated
1970
+ * Get users of a booking the current user is allowed to see. Deprecated: Use /playsessions/{sessionId} or /playsessions/by-bookingid/{bookingId} to get the booking's users instead
1968
1971
  * @param bookingId id of the booking
1969
1972
  * @returns bookingUsersResponse Booking users details
1970
1973
  * @throws ApiError
@@ -2308,11 +2311,12 @@ declare class AuthorizedService {
2308
2311
  * @param playerStatus If provided, only returns playsessions which match this players status:
2309
2312
  * * `ALL` - Default: No filtering.
2310
2313
  * * `PENDING_APPROVAL` - Only returns owned playsessions where at least one player has status `UNAPPROVED`.
2314
+ * * `PENDING_ACTION` - Only returns playsessions where either the user is UNCONFIRMED or is owner and there is at least one player with status `UNAPPROVED`.
2311
2315
  *
2312
2316
  * @returns playSessionResponse List of play sessions connected to the user
2313
2317
  * @throws ApiError
2314
2318
  */
2315
- static getUserPlaySessions(offset?: number, limit?: number, direction?: 'UPCOMING' | 'HISTORICAL', playerStatus?: 'ALL' | 'PENDING_APPROVAL'): CancelablePromise<playSessionResponse>;
2319
+ static getUserPlaySessions(offset?: number, limit?: number, direction?: 'UPCOMING' | 'HISTORICAL', playerStatus?: 'ALL' | 'PENDING_APPROVAL' | 'PENDING_ACTION'): CancelablePromise<playSessionResponse>;
2316
2320
  /**
2317
2321
  * @deprecated
2318
2322
  * Get past play sessions. Deprecated: Use paginated POST /users/playsessions?direction=HISTORICAL instead
@@ -2515,7 +2519,8 @@ declare class BookingServiceV1Service {
2515
2519
  */
2516
2520
  static listAvailabilityEndTimesWithRestrictions(resourceId: string, startTime: timeStamp, numberOfSlots?: number, emails?: Array<string>, userIds?: Array<string>): CancelablePromise<endTimesWithRestrictions>;
2517
2521
  /**
2518
- * Get users of a booking the current user is allowed to see
2522
+ * @deprecated
2523
+ * Get users of a booking the current user is allowed to see. Deprecated: Use /playsessions/{sessionId} or /playsessions/by-bookingid/{bookingId} to get the booking's users instead
2519
2524
  * @param bookingId id of the booking
2520
2525
  * @returns bookingUsersResponse Booking users details
2521
2526
  * @throws ApiError
@@ -2793,11 +2798,12 @@ declare class PlaySessionServiceV1Service {
2793
2798
  * @param playerStatus If provided, only returns playsessions which match this players status:
2794
2799
  * * `ALL` - Default: No filtering.
2795
2800
  * * `PENDING_APPROVAL` - Only returns owned playsessions where at least one player has status `UNAPPROVED`.
2801
+ * * `PENDING_ACTION` - Only returns playsessions where either the user is UNCONFIRMED or is owner and there is at least one player with status `UNAPPROVED`.
2796
2802
  *
2797
2803
  * @returns playSessionResponse List of play sessions connected to the user
2798
2804
  * @throws ApiError
2799
2805
  */
2800
- static getUserPlaySessions(offset?: number, limit?: number, direction?: 'UPCOMING' | 'HISTORICAL', playerStatus?: 'ALL' | 'PENDING_APPROVAL'): CancelablePromise<playSessionResponse>;
2806
+ static getUserPlaySessions(offset?: number, limit?: number, direction?: 'UPCOMING' | 'HISTORICAL', playerStatus?: 'ALL' | 'PENDING_APPROVAL' | 'PENDING_ACTION'): CancelablePromise<playSessionResponse>;
2801
2807
  /**
2802
2808
  * @deprecated
2803
2809
  * Get past play sessions. Deprecated: Use paginated POST /users/playsessions?direction=HISTORICAL instead
@@ -1 +1 @@
1
- "use strict";var z=Object.defineProperty,pr=Object.defineProperties,ur=Object.getOwnPropertyDescriptor,cr=Object.getOwnPropertyDescriptors,dr=Object.getOwnPropertyNames,L=Object.getOwnPropertySymbols;var Ce=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable;var Te=(t,e,r)=>e in t?z(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,u=(t,e)=>{for(var r in e||(e={}))Ce.call(e,r)&&Te(t,r,e[r]);if(L)for(var r of L(e))Me.call(e,r)&&Te(t,r,e[r]);return t},d=(t,e)=>pr(t,cr(e));var $e=(t,e)=>{var r={};for(var o in t)Ce.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&L)for(var o of L(t))e.indexOf(o)<0&&Me.call(t,o)&&(r[o]=t[o]);return r};var N=(t,e)=>{for(var r in e)z(t,r,{get:e[r],enumerable:!0})},mr=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of dr(e))!Ce.call(t,a)&&a!==r&&z(t,a,{get:()=>e[a],enumerable:!(o=ur(e,a))||o.enumerable});return t};var fr=t=>mr(z({},"__esModule",{value:!0}),t);var He=(t,e,r)=>(Te(t,typeof e!="symbol"?e+"":e,r),r),Ve=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var f=(t,e,r)=>(Ve(t,e,"read from private field"),r?r.call(t):e.get(t)),S=(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)},I=(t,e,r,o)=>(Ve(t,e,"write to private field"),o?o.call(t,r):e.set(t,r),r);var h=(t,e,r)=>new Promise((o,a)=>{var l=c=>{try{p(r.next(c))}catch(y){a(y)}},n=c=>{try{p(r.throw(c))}catch(y){a(y)}},p=c=>c.done?o(c.value):Promise.resolve(c.value).then(l,n);p((r=r.apply(t,e)).next())});var ht={};N(ht,{ActivityServiceV1Service:()=>ee,AnonymousService:()=>re,ApiClientServiceV1Service:()=>te,ApiError:()=>R,AuthorizedService:()=>oe,BookingServiceV1Service:()=>ie,CancelError:()=>w,CancelablePromise:()=>U,CheckoutServiceV1Service:()=>se,CompetitionServiceV1Service:()=>ae,CorsService:()=>ne,LoyaltyServiceV1Service:()=>le,MembershipServiceV1Service:()=>pe,OpenAPI:()=>i,PlaySessionServiceV1Service:()=>ue,UserServiceV1Service:()=>ce,access:()=>Ee,bookingRestriction:()=>Oe,bookingSubType:()=>Se,bookingSubscription:()=>j,bookingUserStatus:()=>Pe,cancellationPolicy:()=>M,chat:()=>$,chatTarget:()=>ve,clientType:()=>Re,createChatResponse:()=>H,directionParam:()=>Ae,months:()=>ke,notificationChatGroup:()=>V,notificationEntity:()=>W,pendingPayment:()=>K,playSessionSettings:()=>Q,playSessionUser:()=>J,playerStatusParam:()=>xe,playingUserResponse:()=>Y,userChatStatusParam:()=>Ue,userPunchCard:()=>X,v1:()=>Ie});module.exports=fr(ht);var R=class extends Error{constructor(r,o,a){super(a);this.name="ApiError",this.url=o.url,this.status=o.status,this.statusText=o.statusText,this.body=o.body,this.request=r}};var w=class extends Error{constructor(e){super(e),this.name="CancelError"}get isCancelled(){return!0}},E,O,T,P,A,G,x,U=class{constructor(e){S(this,E,void 0);S(this,O,void 0);S(this,T,void 0);S(this,P,void 0);S(this,A,void 0);S(this,G,void 0);S(this,x,void 0);I(this,E,!1),I(this,O,!1),I(this,T,!1),I(this,P,[]),I(this,A,new Promise((r,o)=>{I(this,G,r),I(this,x,o);let a=p=>{var c;f(this,E)||f(this,O)||f(this,T)||(I(this,E,!0),(c=f(this,G))==null||c.call(this,p))},l=p=>{var c;f(this,E)||f(this,O)||f(this,T)||(I(this,O,!0),(c=f(this,x))==null||c.call(this,p))},n=p=>{f(this,E)||f(this,O)||f(this,T)||f(this,P).push(p)};return Object.defineProperty(n,"isResolved",{get:()=>f(this,E)}),Object.defineProperty(n,"isRejected",{get:()=>f(this,O)}),Object.defineProperty(n,"isCancelled",{get:()=>f(this,T)}),e(a,l,n)}))}get[Symbol.toStringTag](){return"Cancellable Promise"}then(e,r){return f(this,A).then(e,r)}catch(e){return f(this,A).catch(e)}finally(e){return f(this,A).finally(e)}cancel(){var e;if(!(f(this,E)||f(this,O)||f(this,T))){if(I(this,T,!0),f(this,P).length)try{for(let r of f(this,P))r()}catch(r){console.warn("Cancellation threw an error",r);return}f(this,P).length=0,(e=f(this,x))==null||e.call(this,new w("Request aborted"))}}get isCancelled(){return f(this,T)}};E=new WeakMap,O=new WeakMap,T=new WeakMap,P=new WeakMap,A=new WeakMap,G=new WeakMap,x=new WeakMap;var i={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 Ee=(r=>(r.BOOKING_DETAILS="BOOKING_DETAILS",r.PUBLIC_MATCHES="PUBLIC_MATCHES",r))(Ee||{});var Oe=(p=>(p.LIMIT_REACHED="LIMIT_REACHED",p.DAY_LIMIT_REACHED="DAY_LIMIT_REACHED",p.MINUTES_OF_BOOKING_LIMIT_REACHED="MINUTES_OF_BOOKING_LIMIT_REACHED",p.MINUTES_OF_BOOKING_PER_DAY_LIMIT_REACHED="MINUTES_OF_BOOKING_PER_DAY_LIMIT_REACHED",p.COURT_GROUP="COURT_GROUP",p.TOO_SOON="TOO_SOON",p.MEMBERS_ONLY="MEMBERS_ONLY",p))(Oe||{});var j;(e=>{let t;(g=>(g.MONDAY="MONDAY",g.TUESDAY="TUESDAY",g.WEDNESDAY="WEDNESDAY",g.THURSDAY="THURSDAY",g.FRIDAY="FRIDAY",g.SATURDAY="SATURDAY",g.SUNDAY="SUNDAY",g.UNKNOWN="UNKNOWN"))(t=e.weekday||(e.weekday={}))})(j||(j={}));var Se=(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))(Se||{});var Pe=(n=>(n.UNAPPROVED="UNAPPROVED",n.UNCONFIRMED="UNCONFIRMED",n.DECLINED="DECLINED",n.PARTICIPANT="PARTICIPANT",n.CO_BOOKER="CO-BOOKER",n.OWNER="OWNER",n))(Pe||{});var M;(e=>{let t;(a=>(a.AVAILABILITY="AVAILABILITY",a.OCCASION="OCCASION"))(t=e.itemType||(e.itemType={}))})(M||(M={}));var $;(e=>{let t;(l=>(l.ACTIVE="active",l.INACTIVE="inactive",l.NOT_CONNECTED="notConnected"))(t=e.status||(e.status={}))})($||($={}));var ve=(e=>(e.PLAYSESSION="playsession",e))(ve||{});var Re=(r=>(r.WIDGET="WIDGET",r.API="API",r))(Re||{});var H;(e=>{let t;(l=>(l.PUBLIC="public",l.PRIVATE="private",l.PASSWORD="password"))(t=e.type||(e.type={}))})(H||(H={}));var Ae=(r=>(r.UPCOMING="UPCOMING",r.HISTORICAL="HISTORICAL",r))(Ae||{});var ke=(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))(ke||{});var V;(e=>{let t;(l=>(l.PUBLIC="public",l.PRIVATE="private",l.PASSWORD="password"))(t=e.type||(e.type={}))})(V||(V={}));var W;(e=>{let t;(a=>(a.GROUP="group",a.USER="user"))(t=e.entityType||(e.entityType={}))})(W||(W={}));var K;(e=>{let t;(n=>(n.BOOKING="BOOKING",n.ACTIVITY="ACTIVITY",n.MEMBERSHIP="MEMBERSHIP",n.SUBSCRIPTION="SUBSCRIPTION"))(t=e.type||(e.type={}))})(K||(K={}));var xe=(r=>(r.ALL="ALL",r.PENDING_APPROVAL="PENDING_APPROVAL",r))(xe||{});var Y;(e=>{let t;(n=>(n.PAID="PAID",n.INVITED="INVITED",n.JOINED="JOINED",n.BOOKER="BOOKER"))(t=e.status||(e.status={}))})(Y||(Y={}));var Q;(e=>{let t;(a=>(a.JOIN_APPROVAL_NONE="JOIN_APPROVAL_NONE",a.JOIN_APPROVAL_REQUIRED_FOR_ALL="JOIN_APPROVAL_REQUIRED_FOR_ALL"))(t=e.joinApproval||(e.joinApproval={}))})(Q||(Q={}));var J;(e=>{let t;(a=>(a.APPLIED="APPLIED",a.INVITED="INVITED"))(t=e.joiningMethod||(e.joiningMethod={}))})(J||(J={}));var Ue=(a=>(a.ALL="ALL",a.ACTIVE="ACTIVE",a.INACTIVE="INACTIVE",a.NOT_CONNECTED="NOT_CONNECTED",a))(Ue||{});var X;(e=>{let t;(a=>(a.UNLIMITED="UNLIMITED",a.NUMBERED="NUMBERED"))(t=e.type||(e.type={}))})(X||(X={}));var we=t=>t!=null,_=t=>typeof t=="string",De=t=>_(t)&&t!=="",Ge=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]),We=t=>t instanceof FormData,yr=t=>{try{return btoa(t)}catch(e){return Buffer.from(t).toString("base64")}},gr=t=>{let e=[],r=(a,l)=>{e.push(`${encodeURIComponent(a)}=${encodeURIComponent(String(l))}`)},o=(a,l)=>{we(l)&&(Array.isArray(l)?l.forEach(n=>{o(a,n)}):typeof l=="object"?Object.entries(l).forEach(([n,p])=>{o(`${a}[${n}]`,p)}):r(a,l))};return Object.entries(t).forEach(([a,l])=>{o(a,l)}),e.length>0?`?${e.join("&")}`:""},hr=(t,e)=>{let r=t.ENCODE_PATH||encodeURI,o=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}${o}`;return e.query?`${a}${gr(e.query)}`:a},br=t=>{if(t.formData){let e=new FormData,r=(o,a)=>{_(a)||Ge(a)?e.append(o,a):e.append(o,JSON.stringify(a))};return Object.entries(t.formData).filter(([o,a])=>we(a)).forEach(([o,a])=>{Array.isArray(a)?a.forEach(l=>r(o,l)):r(o,a)}),e}},Z=(t,e)=>h(void 0,null,function*(){return typeof e=="function"?e(t):e}),Ir=(t,e)=>h(void 0,null,function*(){let r=yield Z(e,t.TOKEN),o=yield Z(e,t.USERNAME),a=yield Z(e,t.PASSWORD),l=yield Z(e,t.HEADERS),n=Object.entries(u(u({Accept:"application/json"},l),e.headers)).filter(([p,c])=>we(c)).reduce((p,[c,y])=>d(u({},p),{[c]:String(y)}),{});if(De(r)&&(n.Authorization=`Bearer ${r}`),De(o)&&De(a)){let p=yr(`${o}:${a}`);n.Authorization=`Basic ${p}`}return e.body&&(e.mediaType?n["Content-Type"]=e.mediaType:Ge(e.body)?n["Content-Type"]=e.body.type||"application/octet-stream":_(e.body)?n["Content-Type"]="text/plain":We(e.body)||(n["Content-Type"]="application/json")),new Headers(n)}),Tr=t=>{var e;if(t.body!==void 0)return(e=t.mediaType)!=null&&e.includes("/json")?JSON.stringify(t.body):_(t.body)||Ge(t.body)||We(t.body)?t.body:JSON.stringify(t.body)},Cr=(t,e,r,o,a,l,n)=>h(void 0,null,function*(){let p=new AbortController,c={headers:l,body:o!=null?o:a,method:e.method,signal:p.signal};return t.WITH_CREDENTIALS&&(c.credentials=t.CREDENTIALS),n(()=>p.abort()),yield fetch(r,c)}),Er=(t,e)=>{if(e){let r=t.headers.get(e);if(_(r))return r}},Or=t=>h(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)}}),Sr=(t,e)=>{var a,l;let o=u({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(o)throw new R(t,e,o);if(!e.ok){let n=(a=e.status)!=null?a:"unknown",p=(l=e.statusText)!=null?l:"unknown",c=(()=>{try{return JSON.stringify(e.body,null,2)}catch(y){return}})();throw new R(t,e,`Generic Error: status: ${n}; status text: ${p}; body: ${c}`)}},s=(t,e)=>new U((r,o,a)=>h(void 0,null,function*(){try{let l=hr(t,e),n=br(e),p=Tr(e),c=yield Ir(t,e);if(!a.isCancelled){let y=yield Cr(t,e,l,p,n,c,a),g=yield Or(y),v=Er(y,e.responseHeader),m={url:l,ok:y.ok,status:y.status,statusText:y.statusText,body:v!=null?v:g};Sr(e,m),r(m.body)}}catch(l){o(l)}}));var ee=class{static getAdminActivityOccasions(e,r,o,a,l,n=10){return s(i,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:o,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 re=class{static listActivities(e=!1,r=!1,o,a,l,n,p,c,y,g,v,m=10){return s(i,{method:"GET",url:"/activities",query:{hideFullyBooked:e,exposeOccasions:r,facilityIds:o,level:a,locationSearch:l,categorySearch:n,querySearch:p,resourceTypes:c,startDate:y,endDate:g,offset:v,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 s(i,{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,o,a,l){return s(i,{method:"GET",url:"/activities/{activityId}/occasions",path:{activityId:e},query:{hideFullyBooked:r,hidePastOccasions:o,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 s(i,{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,o,a,l,n=10){return s(i,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:o,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 s(i,{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,o,a,l,n,p,c,y=10){return s(i,{method:"GET",url:"/facilities",query:{city:e,countryCode:r,name:o,latitude:a,longitude:l,radius:n,resourceTypes:p,offset:c,limit:y},errors:{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 s(i,{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 s(i,{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 s(i,{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,o){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities",path:{resourceId:e},query:{startDateTime:r,endDateTime:o},errors:{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 te=class{static getApiClientList(e,r=10){return s(i,{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 s(i,{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 s(i,{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,o){return s(i,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:o},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 s(i,{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 oe=class{static getActivityOccasionForUser(e){return s(i,{method:"GET",url:"/activities/user-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 getActivityOccasionPrice(e,r){return s(i,{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 s(i,{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,o,a,l,n,p){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:o,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,o,a,l){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimes/prices",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,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 listAvailabilityEndTimesWithRestrictions(e,r,o,a,l){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimeswithrestrictions",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,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,o,a){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/cancellation-policy",path:{resourceId:e},query:{startTime:r,endTime:o,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 s(i,{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 getBookingUsers(e){return s(i,{method:"GET",url:"/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 searchUsers(e){return s(i,{method:"GET",url:"/profiles/users/search",query:{key:e},errors:{400:"Illegal input for operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static listChats(e="ALL",r,o=10){return s(i,{method:"GET",url:"/users/chats",query:{userChatStatus:e,offset:r,limit:o},errors:{400:"Illegal input for operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static createChat(e){return s(i,{method:"POST",url:"/users/chats",body:e,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."}})}static adminCreateChat(e){return s(i,{method:"POST",url:"/admin/chats",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error."}})}static getTargetChat(e,r){return s(i,{method:"GET",url:"/users/chats/by-targetid/{target}/{targetId}",path:{target:e,targetId:r},errors:{400:"Illegal input for operation.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static addUserToChat(e,r){return s(i,{method:"POST",url:"/users/chats/{chatId}/users/{userId}",path:{chatId:e,userId:r},errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",500:"General Error."}})}static removeUserFromChat(e,r){return s(i,{method:"DELETE",url:"/users/chats/{chatId}/users/{userId}",path:{chatId:e,userId:r},errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",500:"General Error."}})}static getChatAuth(){return s(i,{method:"GET",url:"/users/chats/auth",errors:{401:"Unauthorized.",500:"General Error."}})}static getUserInfo(){return s(i,{method:"GET",url:"/users/info",errors:{500:"General Error.",503:"Service unavailable, please try again."}})}static getUsersProfile(){return s(i,{method:"GET",url:"/users/profile",errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",500:"General Error.",503:"Service unavailable, please try again."}})}static updateUsersProfile(e){return s(i,{method:"PUT",url:"/users/profile",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 listUserFavourites(){return s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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,o){return s(i,{method:"GET",url:"/users/bookings",query:{offset:e,limit:r,subType:o},errors:{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 getUserBookingRestrictions(e){return s(i,{method:"GET",url:"/users/bookings/{bookingId}/restrictions",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUsersInBooking(e){return s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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,o){return s(i,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier:o},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserPlaySessions(e,r=10,o="UPCOMING",a="ALL"){return s(i,{method:"GET",url:"/users/playsessions",query:{offset:e,limit:r,direction:o,playerStatus:a},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserPlaySessionsHistory(e,r=10){return s(i,{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 s(i,{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 getUserPlaySessionsMarketplace(e,r,o,a,l){return s(i,{method:"GET",url:"/users/playsessions/marketplace",query:{facilityIds:e,startDateTime:r,endDateTime:o,sportIds:a,availableSpots: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 addWaitlistOccasion(e){return s(i,{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 s(i,{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 listUserOfferPunchCards(e,r=10){return s(i,{method:"GET",url:"/users/offers/punchcards",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",500:"General Error.",503:"Service unavailable, please try again."}})}static listUserOfferValueCards(e,r=10){return s(i,{method:"GET",url:"/users/offers/valuecards",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",500:"General Error.",503:"Service unavailable, please try again."}})}static getCheckout(e){return s(i,{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 s(i,{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,o){return s(i,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:o},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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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,o){return s(i,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:o},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 s(i,{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 ie=class{static getAvailabilityWithPrice(e,r,o,a,l,n,p){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:o,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,o,a,l){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimes/prices",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,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 listAvailabilityEndTimesWithRestrictions(e,r,o,a,l){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimeswithrestrictions",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,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 getBookingUsers(e){return s(i,{method:"GET",url:"/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 getBookingSubscriptionsListUpcoming(e,r=10){return s(i,{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 s(i,{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 s(i,{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 getUserBookingRestrictions(e){return s(i,{method:"GET",url:"/users/bookings/{bookingId}/restrictions",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUsersInBooking(e){return s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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,o){return s(i,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier:o},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 se=class{static getCheckout(e){return s(i,{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,o){return s(i,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:o},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 ae=class{static updateCompetitionAccount(e){return s(i,{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 ne=class{static options(e){return s(i,{method:"OPTIONS",url:"/{cors+}",path:{"cors+":e},responseHeader:"Access-Control-Allow-Origin"})}};var le=class{static createPromoCode(e){return s(i,{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 pe=class{static createMembership(e){return s(i,{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 s(i,{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 ue=class{static getPlaySessionById(e){return s(i,{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 s(i,{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 s(i,{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 s(i,{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 addUserWithId(e,r,o){return s(i,{method:"POST",url:"/playsessions/{sessionId}/users/{userId}",path:{sessionId:e,userId:r},body:o,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 updateUserWithId(e,r,o){return s(i,{method:"PATCH",url:"/playsessions/{sessionId}/users/{userId}",path:{sessionId:e,userId:r},body:o,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 removePlayerWithUserEmail(e,r){return s(i,{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 s(i,{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.",409:"Conflict with the current state of the target resource.",412:"The request does not meet all conditions for intended operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static joinPlaySession(e){return s(i,{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 getUserPlaySessions(e,r=10,o="UPCOMING",a="ALL"){return s(i,{method:"GET",url:"/users/playsessions",query:{offset:e,limit:r,direction:o,playerStatus:a},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserPlaySessionsHistory(e,r=10){return s(i,{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 s(i,{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 getUserPlaySessionsMarketplace(e,r,o,a,l){return s(i,{method:"GET",url:"/users/playsessions/marketplace",query:{facilityIds:e,startDateTime:r,endDateTime:o,sportIds:a,availableSpots:l},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}};var ce=class{static searchUsers(e){return s(i,{method:"GET",url:"/profiles/users/search",query:{key:e},errors:{400:"Illegal input for operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserProfile(e){return s(i,{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 listChats(e="ALL",r,o=10){return s(i,{method:"GET",url:"/users/chats",query:{userChatStatus:e,offset:r,limit:o},errors:{400:"Illegal input for operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static createChat(e){return s(i,{method:"POST",url:"/users/chats",body:e,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."}})}static adminCreateChat(e){return s(i,{method:"POST",url:"/admin/chats",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error."}})}static getTargetChat(e,r){return s(i,{method:"GET",url:"/users/chats/by-targetid/{target}/{targetId}",path:{target:e,targetId:r},errors:{400:"Illegal input for operation.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static addUserToChat(e,r){return s(i,{method:"POST",url:"/users/chats/{chatId}/users/{userId}",path:{chatId:e,userId:r},errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",500:"General Error."}})}static removeUserFromChat(e,r){return s(i,{method:"DELETE",url:"/users/chats/{chatId}/users/{userId}",path:{chatId:e,userId:r},errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",500:"General Error."}})}static getChatAuth(){return s(i,{method:"GET",url:"/users/chats/auth",errors:{401:"Unauthorized.",500:"General Error."}})}static handleChatMessage(e){return s(i,{method:"POST",url:"/cometchat/webhooks/message",body:e,mediaType:"application/json"})}static getUsersProfile(){return s(i,{method:"GET",url:"/users/profile",errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",500:"General Error.",503:"Service unavailable, please try again."}})}static updateUsersProfile(e){return s(i,{method:"PUT",url:"/users/profile",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 getRelationToFriend(e){return s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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."}})}static listUserOfferPunchCards(e,r=10){return s(i,{method:"GET",url:"/users/offers/punchcards",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",500:"General Error.",503:"Service unavailable, please try again."}})}static listUserOfferValueCards(e,r=10){return s(i,{method:"GET",url:"/users/offers/valuecards",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",500:"General Error.",503:"Service unavailable, please try again."}})}};var Ie={};N(Ie,{addBooking:()=>ye,client:()=>b,createFacilityOfferOrder:()=>he,deleteBooking:()=>qe,findBookingById:()=>Fe,findBookings:()=>fe,listFacilityOffers:()=>ge,queries:()=>be,schemas:()=>me,updateBooking:()=>Le});var Pr=(t,e)=>h(void 0,null,function*(){let r=typeof e=="function"?yield e(t):e;if(r)return t.scheme==="bearer"?`Bearer ${r}`:t.scheme==="basic"?`Basic ${btoa(r)}`:r});var vr={bodySerializer:t=>JSON.stringify(t,(e,r)=>typeof r=="bigint"?r.toString():r)};var Rr=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Ar=t=>{switch(t){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},kr=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Qe=({allowReserved:t,explode:e,name:r,style:o,value:a})=>{if(!e){let p=(t?a:a.map(c=>encodeURIComponent(c))).join(Ar(o));switch(o){case"label":return`.${p}`;case"matrix":return`;${r}=${p}`;case"simple":return p;default:return`${r}=${p}`}}let l=Rr(o),n=a.map(p=>o==="label"||o==="simple"?t?p:encodeURIComponent(p):de({allowReserved:t,name:r,value:p})).join(l);return o==="label"||o==="matrix"?l+n:n},de=({allowReserved:t,name:e,value:r})=>{if(r==null)return"";if(typeof r=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${t?r:encodeURIComponent(r)}`},Je=({allowReserved:t,explode:e,name:r,style:o,value:a})=>{if(a instanceof Date)return`${r}=${a.toISOString()}`;if(o!=="deepObject"&&!e){let p=[];Object.entries(a).forEach(([y,g])=>{p=[...p,y,t?g:encodeURIComponent(g)]});let c=p.join(",");switch(o){case"form":return`${r}=${c}`;case"label":return`.${c}`;case"matrix":return`;${r}=${c}`;default:return c}}let l=kr(o),n=Object.entries(a).map(([p,c])=>de({allowReserved:t,name:o==="deepObject"?`${r}[${p}]`:p,value:c})).join(l);return o==="label"||o==="matrix"?l+n:n},xr=/\{[^{}]+\}/g,Ur=({path:t,url:e})=>{let r=e,o=e.match(xr);if(o)for(let a of o){let l=!1,n=a.substring(1,a.length-1),p="simple";n.endsWith("*")&&(l=!0,n=n.substring(0,n.length-1)),n.startsWith(".")?(n=n.substring(1),p="label"):n.startsWith(";")&&(n=n.substring(1),p="matrix");let c=t[n];if(c==null)continue;if(Array.isArray(c)){r=r.replace(a,Qe({explode:l,name:n,style:p,value:c}));continue}if(typeof c=="object"){r=r.replace(a,Je({explode:l,name:n,style:p,value:c}));continue}if(p==="matrix"){r=r.replace(a,`;${de({name:n,value:c})}`);continue}let y=encodeURIComponent(p==="label"?`.${c}`:c);r=r.replace(a,y)}return r},Xe=({allowReserved:t,array:e,object:r}={})=>o=>{let a=[];if(o&&typeof o=="object")for(let l in o){let n=o[l];if(n!=null){if(Array.isArray(n)){a=[...a,Qe(u({allowReserved:t,explode:!0,name:l,style:"form",value:n},e))];continue}if(typeof n=="object"){a=[...a,Je(u({allowReserved:t,explode:!0,name:l,style:"deepObject",value:n},r))];continue}a=[...a,de({allowReserved:t,name:l,value:n})]}}return a.join("&")},Dr=t=>{var r;if(!t)return"stream";let e=(r=t.split(";")[0])==null?void 0:r.trim();if(e){if(e.startsWith("application/json")||e.endsWith("+json"))return"json";if(e==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(o=>e.startsWith(o)))return"blob";if(e.startsWith("text/"))return"text"}},wr=r=>h(void 0,null,function*(){var o=r,{security:t}=o,e=$e(o,["security"]);var a;for(let l of t){let n=yield Pr(l,e.auth);if(!n)continue;let p=(a=l.name)!=null?a:"Authorization";switch(l.in){case"query":e.query||(e.query={}),e.query[p]=n;break;case"header":default:e.headers.set(p,n);break}return}}),Ke=t=>Gr({baseUrl:t.baseUrl,path:t.path,query:t.query,querySerializer:typeof t.querySerializer=="function"?t.querySerializer:Xe(t.querySerializer),url:t.url}),Gr=({baseUrl:t,path:e,query:r,querySerializer:o,url:a})=>{let l=a.startsWith("/")?a:`/${a}`,n=(t!=null?t:"")+l;e&&(n=Ur({path:e,url:n}));let p=r?o(r):"";return p.startsWith("?")&&(p=p.substring(1)),p&&(n+=`?${p}`),n},Ye=(t,e)=>{var o;let r=u(u({},t),e);return(o=r.baseUrl)!=null&&o.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=Ze(t.headers,e.headers),r},Ze=(...t)=>{let e=new Headers;for(let r of t){if(!r||typeof r!="object")continue;let o=r instanceof Headers?r.entries():Object.entries(r);for(let[a,l]of o)if(l===null)e.delete(a);else if(Array.isArray(l))for(let n of l)e.append(a,n);else l!==void 0&&e.set(a,typeof l=="object"?JSON.stringify(l):l)}return e},_e=class{constructor(){He(this,"_fns");this._fns=[]}clear(){this._fns=[]}exists(t){return this._fns.indexOf(t)!==-1}eject(t){let e=this._fns.indexOf(t);e!==-1&&(this._fns=[...this._fns.slice(0,e),...this._fns.slice(e+1)])}use(t){this._fns=[...this._fns,t]}},_r=()=>({error:new _e,request:new _e,response:new _e}),Br=Xe({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),qr={"Content-Type":"application/json"},Be=(t={})=>u(d(u({},vr),{headers:qr,parseAs:"auto",querySerializer:Br}),t),er=(t={})=>{let e=Ye(Be(),t),r=()=>u({},e),o=n=>(e=Ye(e,n),r()),a=_r(),l=n=>h(void 0,null,function*(){var ze,Ne,je;let p=d(u(u({},e),n),{fetch:(Ne=(ze=n.fetch)!=null?ze:e.fetch)!=null?Ne:globalThis.fetch,headers:Ze(e.headers,n.headers)});p.security&&(yield wr(d(u({},p),{security:p.security}))),p.body&&p.bodySerializer&&(p.body=p.bodySerializer(p.body)),(p.body===void 0||p.body==="")&&p.headers.delete("Content-Type");let c=Ke(p),y=u({redirect:"follow"},p),g=new Request(c,y);for(let C of a.request._fns)g=yield C(g,p);let v=p.fetch,m=yield v(g);for(let C of a.response._fns)m=yield C(m,g,p);let B={request:g,response:m};if(m.ok){if(m.status===204||m.headers.get("Content-Length")==="0")return u({data:{}},B);let C=(je=p.parseAs==="auto"?Dr(m.headers.get("Content-Type")):p.parseAs)!=null?je:"json";if(C==="stream")return u({data:m.body},B);let F=yield m[C]();return C==="json"&&(p.responseValidator&&(yield p.responseValidator(F)),p.responseTransformer&&(F=yield p.responseTransformer(F))),u({data:F},B)}let q=yield m.text();try{q=JSON.parse(q)}catch(C){}let D=q;for(let C of a.error._fns)D=yield C(q,m,g,p);if(D=D||{},p.throwOnError)throw D;return u({error:D},B)});return{buildUrl:Ke,connect:n=>l(d(u({},n),{method:"CONNECT"})),delete:n=>l(d(u({},n),{method:"DELETE"})),get:n=>l(d(u({},n),{method:"GET"})),getConfig:r,head:n=>l(d(u({},n),{method:"HEAD"})),interceptors:a,options:n=>l(d(u({},n),{method:"OPTIONS"})),patch:n=>l(d(u({},n),{method:"PATCH"})),post:n=>l(d(u({},n),{method:"POST"})),put:n=>l(d(u({},n),{method:"PUT"})),request:l,setConfig:o,trace:n=>l(d(u({},n),{method:"TRACE"}))}};var b=er(Be({baseUrl:"https://api.matchi.com/v1"}));var me={};N(me,{BookingSchema:()=>Fr,CreateBookingSchema:()=>Lr,FacilityOfferConditionActivitiesSchema:()=>jr,FacilityOfferConditionCourtsSchema:()=>Mr,FacilityOfferConditionDateSchema:()=>$r,FacilityOfferConditionHoursinadvanceSchema:()=>Hr,FacilityOfferConditionSchema:()=>Nr,FacilityOfferConditionTimeSchema:()=>Vr,FacilityOfferConditionWeekdaysSchema:()=>Wr,FacilityOfferListSchema:()=>Kr,FacilityOfferOrderSchema:()=>Yr,FacilityOfferSchema:()=>zr,FacilityPunchCardDataSchema:()=>Qr,FacilityValueCardDataSchema:()=>Jr,GuestSchema:()=>Xr,PlayerSchema:()=>Zr,UpdateBookingSchema:()=>et,pkgOpenapiSharedCursorPaginatedResultSetSchema:()=>rt,pkgOpenapiSharedErrorSchema:()=>tt,pkgOpenapiSharedErrorsSchema:()=>ot,pkgOpenapiSharedOffsetPaginatedResultSetSchema:()=>it,pkgOpenapiSharedProblemDetailsSchema:()=>st});var Fr={properties:{booker:{format:"uuid",type:"string"},created_at:{format:"date-time",type:"string"},created_by:{type:"string"},end_time:{format:"date-time",type:"string"},id:{format:"uuid",type:"string"},location:{type:"string"},participants:{properties:{guests:{items:{$ref:"#/components/schemas/Guest"},type:"array"},players:{items:{$ref:"#/components/schemas/Player"},type:"array"}},required:["guests","players"],type:"object"},payment_reference:{type:"string"},start_time:{format:"date-time",type:"string"},updated_at:{format:"date-time",type:"string"},updated_by:{type:"string"}},required:["id","booker","location","start_time","end_time","created_at","updated_at","participants","payment_reference","created_by","updated_by"],type:"object"},Lr={properties:{booker:{format:"uuid",type:"string"},created_by:{type:"string"},end_time:{format:"date-time",type:"string"},location:{type:"string"},participants:{properties:{guests:{items:{$ref:"#/components/schemas/Guest"},type:"array"},players:{items:{$ref:"#/components/schemas/Player"},type:"array"}},type:"object"},payment_reference:{type:"string"},start_time:{format:"date-time",type:"string"}},required:["booker","location","start_time","end_time","participants","payment_reference"],type:"object"},zr={properties:{data:{oneOf:[{$ref:"#/components/schemas/FacilityPunchCardData"},{$ref:"#/components/schemas/FacilityValueCardData"}]},type:{enum:["FACILITY_PUNCH_CARD","FACILITY_VALUE_CARD"],type:"string"}},required:["type","data"],type:"object"},Nr={oneOf:[{$ref:"#/components/schemas/FacilityOfferConditionWeekdays"},{$ref:"#/components/schemas/FacilityOfferConditionCourts"},{$ref:"#/components/schemas/FacilityOfferConditionDate"},{$ref:"#/components/schemas/FacilityOfferConditionTime"},{$ref:"#/components/schemas/FacilityOfferConditionHoursinadvance"},{$ref:"#/components/schemas/FacilityOfferConditionActivities"}],properties:{type:{enum:["WEEKDAYS","COURTS","DATE","TIME","HOURSINADVANCE","ACTIVITIES"],type:"string"}},required:["type"],type:"object"},jr={properties:{activities:{items:{properties:{id:{type:"integer"},name:{type:"string"},type:{nullable:!0,type:"string"}},required:["id","name","type"],type:"object"},type:"array"},all_activities:{type:"boolean"},not_valid_for_activities:{type:"boolean"}},required:["not_valid_for_activities","all_activities","activities"],type:"object"},Mr={properties:{courts:{items:{properties:{id:{type:"integer"},name:{type:"string"}},required:["id","name"],type:"object"},type:"array"}},required:["courts"],type:"object"},$r={properties:{end_date:{format:"date",type:"string"},start_date:{format:"date",type:"string"}},required:["start_date","end_date"],type:"object"},Hr={properties:{nr_of_hours:{type:"integer"}},required:["nr_of_hours"],type:"object"},Vr={properties:{end_time:{format:"time",type:"string"},start_time:{format:"time",type:"string"}},required:["start_time","end_time"],type:"object"},Wr={properties:{weekdays:{items:{description:"Interger representation of weekday. 1 (Monday), 7 (Sunday).",type:"integer"},type:"array"}},required:["weekdays"],type:"object"},Kr={properties:{data:{items:{$ref:"#/components/schemas/FacilityOffer"},type:"array"},meta:{$ref:"#/components/schemas/pkgOpenapiSharedCursorPaginatedResultSet"}},required:["data","meta"],type:"object"},Yr={properties:{checkout_url:{description:"The URL to the checkout page for the facility offer order",example:"https://checkout.matchi.com/pay/1b44a93b24a3413dadsee96e1bc7a4350ecac",format:"uri",type:"string"},id:{type:"string"}},required:["id","checkout_url"],type:"object"},Qr={properties:{conditions:{items:{$ref:"#/components/schemas/FacilityOfferCondition"},type:"array"},description:{nullable:!0,type:"string"},expire_date:{format:"date-time",type:"string"},facility_id:{type:"integer"},facility_receive_membership_requests:{type:"boolean"},max_duration:{type:"integer"},members_only:{type:"boolean"},name:{type:"string"},nr_of_bookings_in_period:{nullable:!0,type:"integer"},nr_of_days_valid:{nullable:!0,type:"integer"},nr_of_tickets:{type:"integer"},offer_id:{type:"integer"},price:{type:"string"},unlimited:{type:"boolean"},user_has_active_membership:{type:"boolean"}},required:["offer_id","facility_id","name","description","price","unlimited","max_duration","nr_of_days_valid","nr_of_tickets","members_only","user_has_active_membership","facility_receive_membership_requests","expire_date","conditions","nr_of_bookings_in_period"],type:"object"},Jr={properties:{amount:{type:"string"},conditions:{items:{$ref:"#/components/schemas/FacilityOfferCondition"},type:"array"},description:{nullable:!0,type:"string"},expire_date:{format:"date-time",type:"string"},facility_id:{type:"integer"},facility_receive_membership_requests:{type:"boolean"},members_only:{type:"boolean"},name:{type:"string"},nr_of_days_valid:{nullable:!0,type:"integer"},offer_id:{type:"integer"},price:{type:"string"},user_has_active_membership:{type:"boolean"}},required:["offer_id","facility_id","name","description","price","nr_of_days_valid","amount","members_only","user_has_active_membership","facility_receive_membership_requests","expire_date","conditions"],type:"object"},Xr={properties:{email:{type:"string"}},required:["email"],type:"object"},Zr={properties:{email:{type:"string"},id:{format:"uuid",type:"string"}},required:["id","email"],type:"object"},et={properties:{booker:{format:"uuid",type:"string"},end_time:{format:"date-time",type:"string"},location:{type:"string"},participants:{properties:{guests:{items:{$ref:"#/components/schemas/Guest"},type:"array"},players:{items:{$ref:"#/components/schemas/Player"},type:"array"}},type:"object"},payment_reference:{type:"string"},start_time:{format:"date-time",type:"string"}},required:["booker","location","start_time","end_time","participants","payment_reference"],type:"object"},rt={description:"Metadata about the cursor based pagination for the result. This information is coupled with the CursorParam and CursorLimitParam. Intended to be used as the `meta` field in a list response, next to an `items` array field containing the data.\n",properties:{current_cursor:{description:"Cursor used to retrieve the current page of results.",type:"string"},more_results:{description:"Indicates if there are more results available.",type:"boolean"},next_cursor:{description:"Cursor to retrieve the next page of results.",type:"string"}},required:["current_cursor","more_results"],type:"object"},tt={properties:{message:{description:"The error message",type:"string"}},type:"object"},ot={description:"An array of error details to accompany a problem details response.",items:{$ref:"#/components/schemas/pkgOpenapiSharedError"},maxItems:1e3,type:"array"},it={description:"Metadata about the offset based pagination for the result. This information is coupled with the OffsetParam and OffsetLimitParam. Intended to be used as the `meta` field in a list response, next to an `items` array field containing the data.\n",properties:{limit:{type:"integer"},more_results:{type:"boolean"},offset:{type:"integer"}},required:["offset","limit","more_results"],type:"object"},st={properties:{detail:{description:"A human-readable explanation specific to this occurrence of the problem.",maxLength:4096,type:"string"},errors:{$ref:"#/components/schemas/pkgOpenapiSharedErrors"},instance:{description:"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.",maxLength:1024,type:"string"},status:{description:"The HTTP status code generated by the origin server for this occurrence of the problem.",format:"int32",maximum:599,minimum:100,type:"integer"},title:{description:"A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization.",maxLength:1024,type:"string"},type:{description:"A URI reference that identifies the problem type.",format:"uri",maxLength:1024,type:"string"}},required:["title"],type:"object"};var fe=t=>{var e;return((e=t==null?void 0:t.client)!=null?e:b).get(u({url:"/bookings"},t))},ye=t=>{var e;return((e=t.client)!=null?e:b).post(d(u({url:"/bookings"},t),{headers:u({"Content-Type":"application/json"},t==null?void 0:t.headers)}))},qe=t=>{var e;return((e=t.client)!=null?e:b).delete(u({url:"/bookings/{bookingId}"},t))},Fe=t=>{var e;return((e=t.client)!=null?e:b).get(u({url:"/bookings/{bookingId}"},t))},Le=t=>{var e;return((e=t.client)!=null?e:b).put(d(u({url:"/bookings/{bookingId}"},t),{headers:u({"Content-Type":"application/json"},t==null?void 0:t.headers)}))},ge=t=>{var e;return((e=t.client)!=null?e:b).get(u({url:"/facilities/{facility_id}/offers"},t))},he=t=>{var e;return((e=t.client)!=null?e:b).post(u({url:"/facilities/{facility_id}/offers/{offer_id}"},t))};var be={};N(be,{addBookingMutation:()=>pt,addBookingOptions:()=>lt,addBookingQueryKey:()=>ir,createFacilityOfferOrderMutation:()=>gt,createFacilityOfferOrderOptions:()=>yt,createFacilityOfferOrderQueryKey:()=>lr,deleteBookingMutation:()=>ut,findBookingByIdOptions:()=>ct,findBookingByIdQueryKey:()=>sr,findBookingsInfiniteOptions:()=>nt,findBookingsInfiniteQueryKey:()=>or,findBookingsOptions:()=>at,findBookingsQueryKey:()=>rr,listFacilityOffersInfiniteOptions:()=>ft,listFacilityOffersInfiniteQueryKey:()=>nr,listFacilityOffersOptions:()=>mt,listFacilityOffersQueryKey:()=>ar,updateBookingMutation:()=>dt});var k=(t,e,r)=>{var a;let o={_id:t,baseUrl:((a=e==null?void 0:e.client)!=null?a:b).getConfig().baseUrl};return r&&(o._infinite=r),e!=null&&e.body&&(o.body=e.body),e!=null&&e.headers&&(o.headers=e.headers),e!=null&&e.path&&(o.path=e.path),e!=null&&e.query&&(o.query=e.query),[o]},rr=t=>k("findBookings",t),at=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:a}=yield fe(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return a}),queryKey:rr(t)}),tr=(t,e)=>{let r=t[0];return e.body&&(r.body=u(u({},t[0].body),e.body)),e.headers&&(r.headers=u(u({},t[0].headers),e.headers)),e.path&&(r.path=u(u({},t[0].path),e.path)),e.query&&(r.query=u(u({},t[0].query),e.query)),r},or=t=>k("findBookings",t,!0),nt=t=>({queryFn:a=>h(void 0,[a],function*({pageParam:e,queryKey:r,signal:o}){let n=tr(r,typeof e=="object"?e:{query:{offset:e}}),{data:p}=yield fe(d(u(u({},t),n),{signal:o,throwOnError:!0}));return p}),queryKey:or(t)}),ir=t=>k("addBooking",t),lt=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:a}=yield ye(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return a}),queryKey:ir(t)}),pt=t=>({mutationFn:r=>h(void 0,null,function*(){let{data:o}=yield ye(d(u(u({},t),r),{throwOnError:!0}));return o})}),ut=t=>({mutationFn:r=>h(void 0,null,function*(){let{data:o}=yield qe(d(u(u({},t),r),{throwOnError:!0}));return o})}),sr=t=>k("findBookingById",t),ct=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:a}=yield Fe(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return a}),queryKey:sr(t)}),dt=t=>({mutationFn:r=>h(void 0,null,function*(){let{data:o}=yield Le(d(u(u({},t),r),{throwOnError:!0}));return o})}),ar=t=>k("listFacilityOffers",t),mt=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:a}=yield ge(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return a}),queryKey:ar(t)}),nr=t=>k("listFacilityOffers",t,!0),ft=t=>({queryFn:a=>h(void 0,[a],function*({pageParam:e,queryKey:r,signal:o}){let n=tr(r,typeof e=="object"?e:{query:{cursor:e}}),{data:p}=yield ge(d(u(u({},t),n),{signal:o,throwOnError:!0}));return p}),queryKey:nr(t)}),lr=t=>k("createFacilityOfferOrder",t),yt=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:a}=yield he(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return a}),queryKey:lr(t)}),gt=t=>({mutationFn:r=>h(void 0,null,function*(){let{data:o}=yield he(d(u(u({},t),r),{throwOnError:!0}));return o})});0&&(module.exports={ActivityServiceV1Service,AnonymousService,ApiClientServiceV1Service,ApiError,AuthorizedService,BookingServiceV1Service,CancelError,CancelablePromise,CheckoutServiceV1Service,CompetitionServiceV1Service,CorsService,LoyaltyServiceV1Service,MembershipServiceV1Service,OpenAPI,PlaySessionServiceV1Service,UserServiceV1Service,access,bookingRestriction,bookingSubType,bookingSubscription,bookingUserStatus,cancellationPolicy,chat,chatTarget,clientType,createChatResponse,directionParam,months,notificationChatGroup,notificationEntity,pendingPayment,playSessionSettings,playSessionUser,playerStatusParam,playingUserResponse,userChatStatusParam,userPunchCard,v1});
1
+ "use strict";var L=Object.defineProperty,pr=Object.defineProperties,ur=Object.getOwnPropertyDescriptor,cr=Object.getOwnPropertyDescriptors,dr=Object.getOwnPropertyNames,N=Object.getOwnPropertySymbols;var Ce=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable;var Te=(t,e,r)=>e in t?L(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,u=(t,e)=>{for(var r in e||(e={}))Ce.call(e,r)&&Te(t,r,e[r]);if(N)for(var r of N(e))Me.call(e,r)&&Te(t,r,e[r]);return t},d=(t,e)=>pr(t,cr(e));var $e=(t,e)=>{var r={};for(var o in t)Ce.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&N)for(var o of N(t))e.indexOf(o)<0&&Me.call(t,o)&&(r[o]=t[o]);return r};var z=(t,e)=>{for(var r in e)L(t,r,{get:e[r],enumerable:!0})},mr=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of dr(e))!Ce.call(t,a)&&a!==r&&L(t,a,{get:()=>e[a],enumerable:!(o=ur(e,a))||o.enumerable});return t};var fr=t=>mr(L({},"__esModule",{value:!0}),t);var He=(t,e,r)=>(Te(t,typeof e!="symbol"?e+"":e,r),r),Ve=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var f=(t,e,r)=>(Ve(t,e,"read from private field"),r?r.call(t):e.get(t)),S=(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)},I=(t,e,r,o)=>(Ve(t,e,"write to private field"),o?o.call(t,r):e.set(t,r),r);var h=(t,e,r)=>new Promise((o,a)=>{var l=c=>{try{p(r.next(c))}catch(y){a(y)}},n=c=>{try{p(r.throw(c))}catch(y){a(y)}},p=c=>c.done?o(c.value):Promise.resolve(c.value).then(l,n);p((r=r.apply(t,e)).next())});var ht={};z(ht,{ActivityServiceV1Service:()=>ee,AnonymousService:()=>re,ApiClientServiceV1Service:()=>te,ApiError:()=>R,AuthorizedService:()=>oe,BookingServiceV1Service:()=>ie,CancelError:()=>w,CancelablePromise:()=>U,CheckoutServiceV1Service:()=>se,CompetitionServiceV1Service:()=>ae,CorsService:()=>ne,LoyaltyServiceV1Service:()=>le,MembershipServiceV1Service:()=>pe,OpenAPI:()=>i,PlaySessionServiceV1Service:()=>ue,UserServiceV1Service:()=>ce,access:()=>Ee,bookingRestriction:()=>Oe,bookingSubType:()=>Se,bookingSubscription:()=>j,bookingUserStatus:()=>Pe,cancellationPolicy:()=>M,chat:()=>$,chatTarget:()=>ve,clientType:()=>Re,createChatResponse:()=>H,directionParam:()=>Ae,months:()=>ke,notificationChatGroup:()=>V,notificationEntity:()=>W,pendingPayment:()=>K,playSessionSettings:()=>Q,playSessionUser:()=>J,playerStatusParam:()=>xe,playingUserResponse:()=>Y,userChatStatusParam:()=>Ue,userPunchCard:()=>X,v1:()=>Ie});module.exports=fr(ht);var R=class extends Error{constructor(r,o,a){super(a);this.name="ApiError",this.url=o.url,this.status=o.status,this.statusText=o.statusText,this.body=o.body,this.request=r}};var w=class extends Error{constructor(e){super(e),this.name="CancelError"}get isCancelled(){return!0}},E,O,T,P,A,G,x,U=class{constructor(e){S(this,E,void 0);S(this,O,void 0);S(this,T,void 0);S(this,P,void 0);S(this,A,void 0);S(this,G,void 0);S(this,x,void 0);I(this,E,!1),I(this,O,!1),I(this,T,!1),I(this,P,[]),I(this,A,new Promise((r,o)=>{I(this,G,r),I(this,x,o);let a=p=>{var c;f(this,E)||f(this,O)||f(this,T)||(I(this,E,!0),(c=f(this,G))==null||c.call(this,p))},l=p=>{var c;f(this,E)||f(this,O)||f(this,T)||(I(this,O,!0),(c=f(this,x))==null||c.call(this,p))},n=p=>{f(this,E)||f(this,O)||f(this,T)||f(this,P).push(p)};return Object.defineProperty(n,"isResolved",{get:()=>f(this,E)}),Object.defineProperty(n,"isRejected",{get:()=>f(this,O)}),Object.defineProperty(n,"isCancelled",{get:()=>f(this,T)}),e(a,l,n)}))}get[Symbol.toStringTag](){return"Cancellable Promise"}then(e,r){return f(this,A).then(e,r)}catch(e){return f(this,A).catch(e)}finally(e){return f(this,A).finally(e)}cancel(){var e;if(!(f(this,E)||f(this,O)||f(this,T))){if(I(this,T,!0),f(this,P).length)try{for(let r of f(this,P))r()}catch(r){console.warn("Cancellation threw an error",r);return}f(this,P).length=0,(e=f(this,x))==null||e.call(this,new w("Request aborted"))}}get isCancelled(){return f(this,T)}};E=new WeakMap,O=new WeakMap,T=new WeakMap,P=new WeakMap,A=new WeakMap,G=new WeakMap,x=new WeakMap;var i={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 Ee=(r=>(r.BOOKING_DETAILS="BOOKING_DETAILS",r.PUBLIC_MATCHES="PUBLIC_MATCHES",r))(Ee||{});var Oe=(p=>(p.LIMIT_REACHED="LIMIT_REACHED",p.DAY_LIMIT_REACHED="DAY_LIMIT_REACHED",p.MINUTES_OF_BOOKING_LIMIT_REACHED="MINUTES_OF_BOOKING_LIMIT_REACHED",p.MINUTES_OF_BOOKING_PER_DAY_LIMIT_REACHED="MINUTES_OF_BOOKING_PER_DAY_LIMIT_REACHED",p.COURT_GROUP="COURT_GROUP",p.TOO_SOON="TOO_SOON",p.MEMBERS_ONLY="MEMBERS_ONLY",p))(Oe||{});var j;(e=>{let t;(g=>(g.MONDAY="MONDAY",g.TUESDAY="TUESDAY",g.WEDNESDAY="WEDNESDAY",g.THURSDAY="THURSDAY",g.FRIDAY="FRIDAY",g.SATURDAY="SATURDAY",g.SUNDAY="SUNDAY",g.UNKNOWN="UNKNOWN"))(t=e.weekday||(e.weekday={}))})(j||(j={}));var Se=(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))(Se||{});var Pe=(n=>(n.UNAPPROVED="UNAPPROVED",n.UNCONFIRMED="UNCONFIRMED",n.DECLINED="DECLINED",n.PARTICIPANT="PARTICIPANT",n.CO_BOOKER="CO-BOOKER",n.OWNER="OWNER",n))(Pe||{});var M;(e=>{let t;(a=>(a.AVAILABILITY="AVAILABILITY",a.OCCASION="OCCASION"))(t=e.itemType||(e.itemType={}))})(M||(M={}));var $;(e=>{let t;(l=>(l.ACTIVE="active",l.INACTIVE="inactive",l.NOT_CONNECTED="notConnected"))(t=e.status||(e.status={}))})($||($={}));var ve=(e=>(e.PLAYSESSION="playsession",e))(ve||{});var Re=(r=>(r.WIDGET="WIDGET",r.API="API",r))(Re||{});var H;(e=>{let t;(l=>(l.PUBLIC="public",l.PRIVATE="private",l.PASSWORD="password"))(t=e.type||(e.type={}))})(H||(H={}));var Ae=(r=>(r.UPCOMING="UPCOMING",r.HISTORICAL="HISTORICAL",r))(Ae||{});var ke=(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))(ke||{});var V;(e=>{let t;(l=>(l.PUBLIC="public",l.PRIVATE="private",l.PASSWORD="password"))(t=e.type||(e.type={}))})(V||(V={}));var W;(e=>{let t;(a=>(a.GROUP="group",a.USER="user"))(t=e.entityType||(e.entityType={}))})(W||(W={}));var K;(e=>{let t;(n=>(n.BOOKING="BOOKING",n.ACTIVITY="ACTIVITY",n.MEMBERSHIP="MEMBERSHIP",n.SUBSCRIPTION="SUBSCRIPTION"))(t=e.type||(e.type={}))})(K||(K={}));var xe=(o=>(o.ALL="ALL",o.PENDING_APPROVAL="PENDING_APPROVAL",o.PENDING_ACTION="PENDING_ACTION",o))(xe||{});var Y;(e=>{let t;(n=>(n.PAID="PAID",n.INVITED="INVITED",n.JOINED="JOINED",n.BOOKER="BOOKER"))(t=e.status||(e.status={}))})(Y||(Y={}));var Q;(e=>{let t;(a=>(a.JOIN_APPROVAL_NONE="JOIN_APPROVAL_NONE",a.JOIN_APPROVAL_REQUIRED_FOR_ALL="JOIN_APPROVAL_REQUIRED_FOR_ALL"))(t=e.joinApproval||(e.joinApproval={}))})(Q||(Q={}));var J;(e=>{let t;(a=>(a.APPLIED="APPLIED",a.INVITED="INVITED"))(t=e.joiningMethod||(e.joiningMethod={}))})(J||(J={}));var Ue=(a=>(a.ALL="ALL",a.ACTIVE="ACTIVE",a.INACTIVE="INACTIVE",a.NOT_CONNECTED="NOT_CONNECTED",a))(Ue||{});var X;(e=>{let t;(a=>(a.UNLIMITED="UNLIMITED",a.NUMBERED="NUMBERED"))(t=e.type||(e.type={}))})(X||(X={}));var we=t=>t!=null,_=t=>typeof t=="string",De=t=>_(t)&&t!=="",Ge=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]),We=t=>t instanceof FormData,yr=t=>{try{return btoa(t)}catch(e){return Buffer.from(t).toString("base64")}},gr=t=>{let e=[],r=(a,l)=>{e.push(`${encodeURIComponent(a)}=${encodeURIComponent(String(l))}`)},o=(a,l)=>{we(l)&&(Array.isArray(l)?l.forEach(n=>{o(a,n)}):typeof l=="object"?Object.entries(l).forEach(([n,p])=>{o(`${a}[${n}]`,p)}):r(a,l))};return Object.entries(t).forEach(([a,l])=>{o(a,l)}),e.length>0?`?${e.join("&")}`:""},hr=(t,e)=>{let r=t.ENCODE_PATH||encodeURI,o=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}${o}`;return e.query?`${a}${gr(e.query)}`:a},br=t=>{if(t.formData){let e=new FormData,r=(o,a)=>{_(a)||Ge(a)?e.append(o,a):e.append(o,JSON.stringify(a))};return Object.entries(t.formData).filter(([o,a])=>we(a)).forEach(([o,a])=>{Array.isArray(a)?a.forEach(l=>r(o,l)):r(o,a)}),e}},Z=(t,e)=>h(void 0,null,function*(){return typeof e=="function"?e(t):e}),Ir=(t,e)=>h(void 0,null,function*(){let r=yield Z(e,t.TOKEN),o=yield Z(e,t.USERNAME),a=yield Z(e,t.PASSWORD),l=yield Z(e,t.HEADERS),n=Object.entries(u(u({Accept:"application/json"},l),e.headers)).filter(([p,c])=>we(c)).reduce((p,[c,y])=>d(u({},p),{[c]:String(y)}),{});if(De(r)&&(n.Authorization=`Bearer ${r}`),De(o)&&De(a)){let p=yr(`${o}:${a}`);n.Authorization=`Basic ${p}`}return e.body&&(e.mediaType?n["Content-Type"]=e.mediaType:Ge(e.body)?n["Content-Type"]=e.body.type||"application/octet-stream":_(e.body)?n["Content-Type"]="text/plain":We(e.body)||(n["Content-Type"]="application/json")),new Headers(n)}),Tr=t=>{var e;if(t.body!==void 0)return(e=t.mediaType)!=null&&e.includes("/json")?JSON.stringify(t.body):_(t.body)||Ge(t.body)||We(t.body)?t.body:JSON.stringify(t.body)},Cr=(t,e,r,o,a,l,n)=>h(void 0,null,function*(){let p=new AbortController,c={headers:l,body:o!=null?o:a,method:e.method,signal:p.signal};return t.WITH_CREDENTIALS&&(c.credentials=t.CREDENTIALS),n(()=>p.abort()),yield fetch(r,c)}),Er=(t,e)=>{if(e){let r=t.headers.get(e);if(_(r))return r}},Or=t=>h(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)}}),Sr=(t,e)=>{var a,l;let o=u({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(o)throw new R(t,e,o);if(!e.ok){let n=(a=e.status)!=null?a:"unknown",p=(l=e.statusText)!=null?l:"unknown",c=(()=>{try{return JSON.stringify(e.body,null,2)}catch(y){return}})();throw new R(t,e,`Generic Error: status: ${n}; status text: ${p}; body: ${c}`)}},s=(t,e)=>new U((r,o,a)=>h(void 0,null,function*(){try{let l=hr(t,e),n=br(e),p=Tr(e),c=yield Ir(t,e);if(!a.isCancelled){let y=yield Cr(t,e,l,p,n,c,a),g=yield Or(y),v=Er(y,e.responseHeader),m={url:l,ok:y.ok,status:y.status,statusText:y.statusText,body:v!=null?v:g};Sr(e,m),r(m.body)}}catch(l){o(l)}}));var ee=class{static getAdminActivityOccasions(e,r,o,a,l,n=10){return s(i,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:o,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 re=class{static listActivities(e=!1,r=!1,o,a,l,n,p,c,y,g,v,m=10){return s(i,{method:"GET",url:"/activities",query:{hideFullyBooked:e,exposeOccasions:r,facilityIds:o,level:a,locationSearch:l,categorySearch:n,querySearch:p,resourceTypes:c,startDate:y,endDate:g,offset:v,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 s(i,{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,o,a,l){return s(i,{method:"GET",url:"/activities/{activityId}/occasions",path:{activityId:e},query:{hideFullyBooked:r,hidePastOccasions:o,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 s(i,{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,o,a,l,n=10){return s(i,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:o,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 s(i,{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,o,a,l,n,p,c,y=10){return s(i,{method:"GET",url:"/facilities",query:{city:e,countryCode:r,name:o,latitude:a,longitude:l,radius:n,resourceTypes:p,offset:c,limit:y},errors:{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 s(i,{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 s(i,{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 s(i,{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,o){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities",path:{resourceId:e},query:{startDateTime:r,endDateTime:o},errors:{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 te=class{static getApiClientList(e,r=10){return s(i,{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 s(i,{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 s(i,{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,o){return s(i,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:o},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 s(i,{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 oe=class{static getActivityOccasionForUser(e){return s(i,{method:"GET",url:"/activities/user-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 getActivityOccasionPrice(e,r){return s(i,{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 s(i,{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,o,a,l,n,p){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:o,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,o,a,l){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimes/prices",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,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 listAvailabilityEndTimesWithRestrictions(e,r,o,a,l){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimeswithrestrictions",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,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,o,a){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/cancellation-policy",path:{resourceId:e},query:{startTime:r,endTime:o,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 s(i,{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 getBookingUsers(e){return s(i,{method:"GET",url:"/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 searchUsers(e){return s(i,{method:"GET",url:"/profiles/users/search",query:{key:e},errors:{400:"Illegal input for operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static listChats(e="ALL",r,o=10){return s(i,{method:"GET",url:"/users/chats",query:{userChatStatus:e,offset:r,limit:o},errors:{400:"Illegal input for operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static createChat(e){return s(i,{method:"POST",url:"/users/chats",body:e,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."}})}static adminCreateChat(e){return s(i,{method:"POST",url:"/admin/chats",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error."}})}static getTargetChat(e,r){return s(i,{method:"GET",url:"/users/chats/by-targetid/{target}/{targetId}",path:{target:e,targetId:r},errors:{400:"Illegal input for operation.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static addUserToChat(e,r){return s(i,{method:"POST",url:"/users/chats/{chatId}/users/{userId}",path:{chatId:e,userId:r},errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",500:"General Error."}})}static removeUserFromChat(e,r){return s(i,{method:"DELETE",url:"/users/chats/{chatId}/users/{userId}",path:{chatId:e,userId:r},errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",500:"General Error."}})}static getChatAuth(){return s(i,{method:"GET",url:"/users/chats/auth",errors:{401:"Unauthorized.",500:"General Error."}})}static getUserInfo(){return s(i,{method:"GET",url:"/users/info",errors:{500:"General Error.",503:"Service unavailable, please try again."}})}static getUsersProfile(){return s(i,{method:"GET",url:"/users/profile",errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",500:"General Error.",503:"Service unavailable, please try again."}})}static updateUsersProfile(e){return s(i,{method:"PUT",url:"/users/profile",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 listUserFavourites(){return s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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,o){return s(i,{method:"GET",url:"/users/bookings",query:{offset:e,limit:r,subType:o},errors:{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 getUserBookingRestrictions(e){return s(i,{method:"GET",url:"/users/bookings/{bookingId}/restrictions",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUsersInBooking(e){return s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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,o){return s(i,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier:o},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserPlaySessions(e,r=10,o="UPCOMING",a="ALL"){return s(i,{method:"GET",url:"/users/playsessions",query:{offset:e,limit:r,direction:o,playerStatus:a},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserPlaySessionsHistory(e,r=10){return s(i,{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 s(i,{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 getUserPlaySessionsMarketplace(e,r,o,a,l){return s(i,{method:"GET",url:"/users/playsessions/marketplace",query:{facilityIds:e,startDateTime:r,endDateTime:o,sportIds:a,availableSpots: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 addWaitlistOccasion(e){return s(i,{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 s(i,{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 listUserOfferPunchCards(e,r=10){return s(i,{method:"GET",url:"/users/offers/punchcards",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",500:"General Error.",503:"Service unavailable, please try again."}})}static listUserOfferValueCards(e,r=10){return s(i,{method:"GET",url:"/users/offers/valuecards",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",500:"General Error.",503:"Service unavailable, please try again."}})}static getCheckout(e){return s(i,{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 s(i,{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,o){return s(i,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:o},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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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,o){return s(i,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:o},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 s(i,{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 ie=class{static getAvailabilityWithPrice(e,r,o,a,l,n,p){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:o,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,o,a,l){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimes/prices",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,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 listAvailabilityEndTimesWithRestrictions(e,r,o,a,l){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimeswithrestrictions",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,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 getBookingUsers(e){return s(i,{method:"GET",url:"/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 getBookingSubscriptionsListUpcoming(e,r=10){return s(i,{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 s(i,{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 s(i,{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 getUserBookingRestrictions(e){return s(i,{method:"GET",url:"/users/bookings/{bookingId}/restrictions",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUsersInBooking(e){return s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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,o){return s(i,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier:o},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 se=class{static getCheckout(e){return s(i,{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,o){return s(i,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:o},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 ae=class{static updateCompetitionAccount(e){return s(i,{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 ne=class{static options(e){return s(i,{method:"OPTIONS",url:"/{cors+}",path:{"cors+":e},responseHeader:"Access-Control-Allow-Origin"})}};var le=class{static createPromoCode(e){return s(i,{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 pe=class{static createMembership(e){return s(i,{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 s(i,{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 ue=class{static getPlaySessionById(e){return s(i,{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 s(i,{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 s(i,{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 s(i,{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 addUserWithId(e,r,o){return s(i,{method:"POST",url:"/playsessions/{sessionId}/users/{userId}",path:{sessionId:e,userId:r},body:o,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 updateUserWithId(e,r,o){return s(i,{method:"PATCH",url:"/playsessions/{sessionId}/users/{userId}",path:{sessionId:e,userId:r},body:o,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 removePlayerWithUserEmail(e,r){return s(i,{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 s(i,{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.",409:"Conflict with the current state of the target resource.",412:"The request does not meet all conditions for intended operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static joinPlaySession(e){return s(i,{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 getUserPlaySessions(e,r=10,o="UPCOMING",a="ALL"){return s(i,{method:"GET",url:"/users/playsessions",query:{offset:e,limit:r,direction:o,playerStatus:a},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserPlaySessionsHistory(e,r=10){return s(i,{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 s(i,{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 getUserPlaySessionsMarketplace(e,r,o,a,l){return s(i,{method:"GET",url:"/users/playsessions/marketplace",query:{facilityIds:e,startDateTime:r,endDateTime:o,sportIds:a,availableSpots:l},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}};var ce=class{static searchUsers(e){return s(i,{method:"GET",url:"/profiles/users/search",query:{key:e},errors:{400:"Illegal input for operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserProfile(e){return s(i,{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 listChats(e="ALL",r,o=10){return s(i,{method:"GET",url:"/users/chats",query:{userChatStatus:e,offset:r,limit:o},errors:{400:"Illegal input for operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static createChat(e){return s(i,{method:"POST",url:"/users/chats",body:e,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."}})}static adminCreateChat(e){return s(i,{method:"POST",url:"/admin/chats",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error."}})}static getTargetChat(e,r){return s(i,{method:"GET",url:"/users/chats/by-targetid/{target}/{targetId}",path:{target:e,targetId:r},errors:{400:"Illegal input for operation.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static addUserToChat(e,r){return s(i,{method:"POST",url:"/users/chats/{chatId}/users/{userId}",path:{chatId:e,userId:r},errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",500:"General Error."}})}static removeUserFromChat(e,r){return s(i,{method:"DELETE",url:"/users/chats/{chatId}/users/{userId}",path:{chatId:e,userId:r},errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",500:"General Error."}})}static getChatAuth(){return s(i,{method:"GET",url:"/users/chats/auth",errors:{401:"Unauthorized.",500:"General Error."}})}static handleChatMessage(e){return s(i,{method:"POST",url:"/cometchat/webhooks/message",body:e,mediaType:"application/json"})}static getUsersProfile(){return s(i,{method:"GET",url:"/users/profile",errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",500:"General Error.",503:"Service unavailable, please try again."}})}static updateUsersProfile(e){return s(i,{method:"PUT",url:"/users/profile",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 getRelationToFriend(e){return s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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."}})}static listUserOfferPunchCards(e,r=10){return s(i,{method:"GET",url:"/users/offers/punchcards",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",500:"General Error.",503:"Service unavailable, please try again."}})}static listUserOfferValueCards(e,r=10){return s(i,{method:"GET",url:"/users/offers/valuecards",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",500:"General Error.",503:"Service unavailable, please try again."}})}};var Ie={};z(Ie,{addBooking:()=>ye,client:()=>b,createFacilityOfferOrder:()=>he,deleteBooking:()=>qe,findBookingById:()=>Fe,findBookings:()=>fe,listFacilityOffers:()=>ge,queries:()=>be,schemas:()=>me,updateBooking:()=>Ne});var Pr=(t,e)=>h(void 0,null,function*(){let r=typeof e=="function"?yield e(t):e;if(r)return t.scheme==="bearer"?`Bearer ${r}`:t.scheme==="basic"?`Basic ${btoa(r)}`:r});var vr={bodySerializer:t=>JSON.stringify(t,(e,r)=>typeof r=="bigint"?r.toString():r)};var Rr=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Ar=t=>{switch(t){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},kr=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Qe=({allowReserved:t,explode:e,name:r,style:o,value:a})=>{if(!e){let p=(t?a:a.map(c=>encodeURIComponent(c))).join(Ar(o));switch(o){case"label":return`.${p}`;case"matrix":return`;${r}=${p}`;case"simple":return p;default:return`${r}=${p}`}}let l=Rr(o),n=a.map(p=>o==="label"||o==="simple"?t?p:encodeURIComponent(p):de({allowReserved:t,name:r,value:p})).join(l);return o==="label"||o==="matrix"?l+n:n},de=({allowReserved:t,name:e,value:r})=>{if(r==null)return"";if(typeof r=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${t?r:encodeURIComponent(r)}`},Je=({allowReserved:t,explode:e,name:r,style:o,value:a})=>{if(a instanceof Date)return`${r}=${a.toISOString()}`;if(o!=="deepObject"&&!e){let p=[];Object.entries(a).forEach(([y,g])=>{p=[...p,y,t?g:encodeURIComponent(g)]});let c=p.join(",");switch(o){case"form":return`${r}=${c}`;case"label":return`.${c}`;case"matrix":return`;${r}=${c}`;default:return c}}let l=kr(o),n=Object.entries(a).map(([p,c])=>de({allowReserved:t,name:o==="deepObject"?`${r}[${p}]`:p,value:c})).join(l);return o==="label"||o==="matrix"?l+n:n},xr=/\{[^{}]+\}/g,Ur=({path:t,url:e})=>{let r=e,o=e.match(xr);if(o)for(let a of o){let l=!1,n=a.substring(1,a.length-1),p="simple";n.endsWith("*")&&(l=!0,n=n.substring(0,n.length-1)),n.startsWith(".")?(n=n.substring(1),p="label"):n.startsWith(";")&&(n=n.substring(1),p="matrix");let c=t[n];if(c==null)continue;if(Array.isArray(c)){r=r.replace(a,Qe({explode:l,name:n,style:p,value:c}));continue}if(typeof c=="object"){r=r.replace(a,Je({explode:l,name:n,style:p,value:c}));continue}if(p==="matrix"){r=r.replace(a,`;${de({name:n,value:c})}`);continue}let y=encodeURIComponent(p==="label"?`.${c}`:c);r=r.replace(a,y)}return r},Xe=({allowReserved:t,array:e,object:r}={})=>o=>{let a=[];if(o&&typeof o=="object")for(let l in o){let n=o[l];if(n!=null){if(Array.isArray(n)){a=[...a,Qe(u({allowReserved:t,explode:!0,name:l,style:"form",value:n},e))];continue}if(typeof n=="object"){a=[...a,Je(u({allowReserved:t,explode:!0,name:l,style:"deepObject",value:n},r))];continue}a=[...a,de({allowReserved:t,name:l,value:n})]}}return a.join("&")},Dr=t=>{var r;if(!t)return"stream";let e=(r=t.split(";")[0])==null?void 0:r.trim();if(e){if(e.startsWith("application/json")||e.endsWith("+json"))return"json";if(e==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(o=>e.startsWith(o)))return"blob";if(e.startsWith("text/"))return"text"}},wr=r=>h(void 0,null,function*(){var o=r,{security:t}=o,e=$e(o,["security"]);var a;for(let l of t){let n=yield Pr(l,e.auth);if(!n)continue;let p=(a=l.name)!=null?a:"Authorization";switch(l.in){case"query":e.query||(e.query={}),e.query[p]=n;break;case"header":default:e.headers.set(p,n);break}return}}),Ke=t=>Gr({baseUrl:t.baseUrl,path:t.path,query:t.query,querySerializer:typeof t.querySerializer=="function"?t.querySerializer:Xe(t.querySerializer),url:t.url}),Gr=({baseUrl:t,path:e,query:r,querySerializer:o,url:a})=>{let l=a.startsWith("/")?a:`/${a}`,n=(t!=null?t:"")+l;e&&(n=Ur({path:e,url:n}));let p=r?o(r):"";return p.startsWith("?")&&(p=p.substring(1)),p&&(n+=`?${p}`),n},Ye=(t,e)=>{var o;let r=u(u({},t),e);return(o=r.baseUrl)!=null&&o.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=Ze(t.headers,e.headers),r},Ze=(...t)=>{let e=new Headers;for(let r of t){if(!r||typeof r!="object")continue;let o=r instanceof Headers?r.entries():Object.entries(r);for(let[a,l]of o)if(l===null)e.delete(a);else if(Array.isArray(l))for(let n of l)e.append(a,n);else l!==void 0&&e.set(a,typeof l=="object"?JSON.stringify(l):l)}return e},_e=class{constructor(){He(this,"_fns");this._fns=[]}clear(){this._fns=[]}exists(t){return this._fns.indexOf(t)!==-1}eject(t){let e=this._fns.indexOf(t);e!==-1&&(this._fns=[...this._fns.slice(0,e),...this._fns.slice(e+1)])}use(t){this._fns=[...this._fns,t]}},_r=()=>({error:new _e,request:new _e,response:new _e}),Br=Xe({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),qr={"Content-Type":"application/json"},Be=(t={})=>u(d(u({},vr),{headers:qr,parseAs:"auto",querySerializer:Br}),t),er=(t={})=>{let e=Ye(Be(),t),r=()=>u({},e),o=n=>(e=Ye(e,n),r()),a=_r(),l=n=>h(void 0,null,function*(){var Le,ze,je;let p=d(u(u({},e),n),{fetch:(ze=(Le=n.fetch)!=null?Le:e.fetch)!=null?ze:globalThis.fetch,headers:Ze(e.headers,n.headers)});p.security&&(yield wr(d(u({},p),{security:p.security}))),p.body&&p.bodySerializer&&(p.body=p.bodySerializer(p.body)),(p.body===void 0||p.body==="")&&p.headers.delete("Content-Type");let c=Ke(p),y=u({redirect:"follow"},p),g=new Request(c,y);for(let C of a.request._fns)g=yield C(g,p);let v=p.fetch,m=yield v(g);for(let C of a.response._fns)m=yield C(m,g,p);let B={request:g,response:m};if(m.ok){if(m.status===204||m.headers.get("Content-Length")==="0")return u({data:{}},B);let C=(je=p.parseAs==="auto"?Dr(m.headers.get("Content-Type")):p.parseAs)!=null?je:"json";if(C==="stream")return u({data:m.body},B);let F=yield m[C]();return C==="json"&&(p.responseValidator&&(yield p.responseValidator(F)),p.responseTransformer&&(F=yield p.responseTransformer(F))),u({data:F},B)}let q=yield m.text();try{q=JSON.parse(q)}catch(C){}let D=q;for(let C of a.error._fns)D=yield C(q,m,g,p);if(D=D||{},p.throwOnError)throw D;return u({error:D},B)});return{buildUrl:Ke,connect:n=>l(d(u({},n),{method:"CONNECT"})),delete:n=>l(d(u({},n),{method:"DELETE"})),get:n=>l(d(u({},n),{method:"GET"})),getConfig:r,head:n=>l(d(u({},n),{method:"HEAD"})),interceptors:a,options:n=>l(d(u({},n),{method:"OPTIONS"})),patch:n=>l(d(u({},n),{method:"PATCH"})),post:n=>l(d(u({},n),{method:"POST"})),put:n=>l(d(u({},n),{method:"PUT"})),request:l,setConfig:o,trace:n=>l(d(u({},n),{method:"TRACE"}))}};var b=er(Be({baseUrl:"https://api.matchi.com/v1"}));var me={};z(me,{BookingSchema:()=>Fr,CreateBookingSchema:()=>Nr,FacilityOfferConditionActivitiesSchema:()=>jr,FacilityOfferConditionCourtsSchema:()=>Mr,FacilityOfferConditionDateSchema:()=>$r,FacilityOfferConditionHoursinadvanceSchema:()=>Hr,FacilityOfferConditionSchema:()=>zr,FacilityOfferConditionTimeSchema:()=>Vr,FacilityOfferConditionWeekdaysSchema:()=>Wr,FacilityOfferListSchema:()=>Kr,FacilityOfferOrderSchema:()=>Yr,FacilityOfferSchema:()=>Lr,FacilityPunchCardDataSchema:()=>Qr,FacilityValueCardDataSchema:()=>Jr,GuestSchema:()=>Xr,PlayerSchema:()=>Zr,UpdateBookingSchema:()=>et,pkgOpenapiSharedCursorPaginatedResultSetSchema:()=>rt,pkgOpenapiSharedErrorSchema:()=>tt,pkgOpenapiSharedErrorsSchema:()=>ot,pkgOpenapiSharedOffsetPaginatedResultSetSchema:()=>it,pkgOpenapiSharedProblemDetailsSchema:()=>st});var Fr={properties:{booker:{format:"uuid",type:"string"},created_at:{format:"date-time",type:"string"},created_by:{type:"string"},end_time:{format:"date-time",type:"string"},id:{format:"uuid",type:"string"},location:{type:"string"},participants:{properties:{guests:{items:{$ref:"#/components/schemas/Guest"},type:"array"},players:{items:{$ref:"#/components/schemas/Player"},type:"array"}},required:["guests","players"],type:"object"},payment_reference:{type:"string"},start_time:{format:"date-time",type:"string"},updated_at:{format:"date-time",type:"string"},updated_by:{type:"string"}},required:["id","booker","location","start_time","end_time","created_at","updated_at","participants","payment_reference","created_by","updated_by"],type:"object"},Nr={properties:{booker:{format:"uuid",type:"string"},created_by:{type:"string"},end_time:{format:"date-time",type:"string"},location:{type:"string"},participants:{properties:{guests:{items:{$ref:"#/components/schemas/Guest"},type:"array"},players:{items:{$ref:"#/components/schemas/Player"},type:"array"}},type:"object"},payment_reference:{type:"string"},start_time:{format:"date-time",type:"string"}},required:["booker","location","start_time","end_time","participants","payment_reference"],type:"object"},Lr={properties:{data:{oneOf:[{$ref:"#/components/schemas/FacilityPunchCardData"},{$ref:"#/components/schemas/FacilityValueCardData"}]},type:{enum:["FACILITY_PUNCH_CARD","FACILITY_VALUE_CARD"],type:"string"}},required:["type","data"],type:"object"},zr={oneOf:[{$ref:"#/components/schemas/FacilityOfferConditionWeekdays"},{$ref:"#/components/schemas/FacilityOfferConditionCourts"},{$ref:"#/components/schemas/FacilityOfferConditionDate"},{$ref:"#/components/schemas/FacilityOfferConditionTime"},{$ref:"#/components/schemas/FacilityOfferConditionHoursinadvance"},{$ref:"#/components/schemas/FacilityOfferConditionActivities"}],properties:{type:{enum:["WEEKDAYS","COURTS","DATE","TIME","HOURSINADVANCE","ACTIVITIES"],type:"string"}},required:["type"],type:"object"},jr={properties:{activities:{items:{properties:{id:{type:"integer"},name:{type:"string"},type:{nullable:!0,type:"string"}},required:["id","name","type"],type:"object"},type:"array"},all_activities:{type:"boolean"},not_valid_for_activities:{type:"boolean"}},required:["not_valid_for_activities","all_activities","activities"],type:"object"},Mr={properties:{courts:{items:{properties:{id:{type:"integer"},name:{type:"string"}},required:["id","name"],type:"object"},type:"array"}},required:["courts"],type:"object"},$r={properties:{end_date:{format:"date",type:"string"},start_date:{format:"date",type:"string"}},required:["start_date","end_date"],type:"object"},Hr={properties:{nr_of_hours:{type:"integer"}},required:["nr_of_hours"],type:"object"},Vr={properties:{end_time:{format:"time",type:"string"},start_time:{format:"time",type:"string"}},required:["start_time","end_time"],type:"object"},Wr={properties:{weekdays:{items:{description:"Interger representation of weekday. 1 (Monday), 7 (Sunday).",type:"integer"},type:"array"}},required:["weekdays"],type:"object"},Kr={properties:{data:{items:{$ref:"#/components/schemas/FacilityOffer"},type:"array"},meta:{$ref:"#/components/schemas/pkgOpenapiSharedCursorPaginatedResultSet"}},required:["data","meta"],type:"object"},Yr={properties:{checkout_url:{description:"The URL to the checkout page for the facility offer order",example:"https://checkout.matchi.com/pay/1b44a93b24a3413dadsee96e1bc7a4350ecac",format:"uri",type:"string"},id:{type:"string"}},required:["id","checkout_url"],type:"object"},Qr={properties:{conditions:{items:{$ref:"#/components/schemas/FacilityOfferCondition"},type:"array"},description:{nullable:!0,type:"string"},expire_date:{format:"date-time",type:"string"},facility_id:{type:"integer"},facility_receive_membership_requests:{type:"boolean"},max_duration:{type:"integer"},members_only:{type:"boolean"},name:{type:"string"},nr_of_bookings_in_period:{nullable:!0,type:"integer"},nr_of_days_valid:{nullable:!0,type:"integer"},nr_of_tickets:{type:"integer"},offer_id:{type:"integer"},price:{type:"string"},unlimited:{type:"boolean"},user_has_active_membership:{type:"boolean"}},required:["offer_id","facility_id","name","description","price","unlimited","max_duration","nr_of_days_valid","nr_of_tickets","members_only","user_has_active_membership","facility_receive_membership_requests","expire_date","conditions","nr_of_bookings_in_period"],type:"object"},Jr={properties:{amount:{type:"string"},conditions:{items:{$ref:"#/components/schemas/FacilityOfferCondition"},type:"array"},description:{nullable:!0,type:"string"},expire_date:{format:"date-time",type:"string"},facility_id:{type:"integer"},facility_receive_membership_requests:{type:"boolean"},members_only:{type:"boolean"},name:{type:"string"},nr_of_days_valid:{nullable:!0,type:"integer"},offer_id:{type:"integer"},price:{type:"string"},user_has_active_membership:{type:"boolean"}},required:["offer_id","facility_id","name","description","price","nr_of_days_valid","amount","members_only","user_has_active_membership","facility_receive_membership_requests","expire_date","conditions"],type:"object"},Xr={properties:{email:{type:"string"}},required:["email"],type:"object"},Zr={properties:{email:{type:"string"},id:{format:"uuid",type:"string"}},required:["id","email"],type:"object"},et={properties:{booker:{format:"uuid",type:"string"},end_time:{format:"date-time",type:"string"},location:{type:"string"},participants:{properties:{guests:{items:{$ref:"#/components/schemas/Guest"},type:"array"},players:{items:{$ref:"#/components/schemas/Player"},type:"array"}},type:"object"},payment_reference:{type:"string"},start_time:{format:"date-time",type:"string"}},required:["booker","location","start_time","end_time","participants","payment_reference"],type:"object"},rt={description:"Metadata about the cursor based pagination for the result. This information is coupled with the CursorParam and CursorLimitParam. Intended to be used as the `meta` field in a list response, next to an `items` array field containing the data.\n",properties:{current_cursor:{description:"Cursor used to retrieve the current page of results.",type:"string"},more_results:{description:"Indicates if there are more results available.",type:"boolean"},next_cursor:{description:"Cursor to retrieve the next page of results.",type:"string"}},required:["current_cursor","more_results"],type:"object"},tt={properties:{message:{description:"The error message",type:"string"}},type:"object"},ot={description:"An array of error details to accompany a problem details response.",items:{$ref:"#/components/schemas/pkgOpenapiSharedError"},maxItems:1e3,type:"array"},it={description:"Metadata about the offset based pagination for the result. This information is coupled with the OffsetParam and OffsetLimitParam. Intended to be used as the `meta` field in a list response, next to an `items` array field containing the data.\n",properties:{limit:{type:"integer"},more_results:{type:"boolean"},offset:{type:"integer"}},required:["offset","limit","more_results"],type:"object"},st={properties:{detail:{description:"A human-readable explanation specific to this occurrence of the problem.",maxLength:4096,type:"string"},errors:{$ref:"#/components/schemas/pkgOpenapiSharedErrors"},instance:{description:"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.",maxLength:1024,type:"string"},status:{description:"The HTTP status code generated by the origin server for this occurrence of the problem.",format:"int32",maximum:599,minimum:100,type:"integer"},title:{description:"A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization.",maxLength:1024,type:"string"},type:{description:"A URI reference that identifies the problem type.",format:"uri",maxLength:1024,type:"string"}},required:["title"],type:"object"};var fe=t=>{var e;return((e=t==null?void 0:t.client)!=null?e:b).get(u({url:"/bookings"},t))},ye=t=>{var e;return((e=t.client)!=null?e:b).post(d(u({url:"/bookings"},t),{headers:u({"Content-Type":"application/json"},t==null?void 0:t.headers)}))},qe=t=>{var e;return((e=t.client)!=null?e:b).delete(u({url:"/bookings/{bookingId}"},t))},Fe=t=>{var e;return((e=t.client)!=null?e:b).get(u({url:"/bookings/{bookingId}"},t))},Ne=t=>{var e;return((e=t.client)!=null?e:b).put(d(u({url:"/bookings/{bookingId}"},t),{headers:u({"Content-Type":"application/json"},t==null?void 0:t.headers)}))},ge=t=>{var e;return((e=t.client)!=null?e:b).get(u({url:"/facilities/{facility_id}/offers"},t))},he=t=>{var e;return((e=t.client)!=null?e:b).post(u({url:"/facilities/{facility_id}/offers/{offer_id}"},t))};var be={};z(be,{addBookingMutation:()=>pt,addBookingOptions:()=>lt,addBookingQueryKey:()=>ir,createFacilityOfferOrderMutation:()=>gt,createFacilityOfferOrderOptions:()=>yt,createFacilityOfferOrderQueryKey:()=>lr,deleteBookingMutation:()=>ut,findBookingByIdOptions:()=>ct,findBookingByIdQueryKey:()=>sr,findBookingsInfiniteOptions:()=>nt,findBookingsInfiniteQueryKey:()=>or,findBookingsOptions:()=>at,findBookingsQueryKey:()=>rr,listFacilityOffersInfiniteOptions:()=>ft,listFacilityOffersInfiniteQueryKey:()=>nr,listFacilityOffersOptions:()=>mt,listFacilityOffersQueryKey:()=>ar,updateBookingMutation:()=>dt});var k=(t,e,r)=>{var a;let o={_id:t,baseUrl:((a=e==null?void 0:e.client)!=null?a:b).getConfig().baseUrl};return r&&(o._infinite=r),e!=null&&e.body&&(o.body=e.body),e!=null&&e.headers&&(o.headers=e.headers),e!=null&&e.path&&(o.path=e.path),e!=null&&e.query&&(o.query=e.query),[o]},rr=t=>k("findBookings",t),at=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:a}=yield fe(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return a}),queryKey:rr(t)}),tr=(t,e)=>{let r=t[0];return e.body&&(r.body=u(u({},t[0].body),e.body)),e.headers&&(r.headers=u(u({},t[0].headers),e.headers)),e.path&&(r.path=u(u({},t[0].path),e.path)),e.query&&(r.query=u(u({},t[0].query),e.query)),r},or=t=>k("findBookings",t,!0),nt=t=>({queryFn:a=>h(void 0,[a],function*({pageParam:e,queryKey:r,signal:o}){let n=tr(r,typeof e=="object"?e:{query:{offset:e}}),{data:p}=yield fe(d(u(u({},t),n),{signal:o,throwOnError:!0}));return p}),queryKey:or(t)}),ir=t=>k("addBooking",t),lt=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:a}=yield ye(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return a}),queryKey:ir(t)}),pt=t=>({mutationFn:r=>h(void 0,null,function*(){let{data:o}=yield ye(d(u(u({},t),r),{throwOnError:!0}));return o})}),ut=t=>({mutationFn:r=>h(void 0,null,function*(){let{data:o}=yield qe(d(u(u({},t),r),{throwOnError:!0}));return o})}),sr=t=>k("findBookingById",t),ct=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:a}=yield Fe(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return a}),queryKey:sr(t)}),dt=t=>({mutationFn:r=>h(void 0,null,function*(){let{data:o}=yield Ne(d(u(u({},t),r),{throwOnError:!0}));return o})}),ar=t=>k("listFacilityOffers",t),mt=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:a}=yield ge(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return a}),queryKey:ar(t)}),nr=t=>k("listFacilityOffers",t,!0),ft=t=>({queryFn:a=>h(void 0,[a],function*({pageParam:e,queryKey:r,signal:o}){let n=tr(r,typeof e=="object"?e:{query:{cursor:e}}),{data:p}=yield ge(d(u(u({},t),n),{signal:o,throwOnError:!0}));return p}),queryKey:nr(t)}),lr=t=>k("createFacilityOfferOrder",t),yt=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:a}=yield he(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return a}),queryKey:lr(t)}),gt=t=>({mutationFn:r=>h(void 0,null,function*(){let{data:o}=yield he(d(u(u({},t),r),{throwOnError:!0}));return o})});0&&(module.exports={ActivityServiceV1Service,AnonymousService,ApiClientServiceV1Service,ApiError,AuthorizedService,BookingServiceV1Service,CancelError,CancelablePromise,CheckoutServiceV1Service,CompetitionServiceV1Service,CorsService,LoyaltyServiceV1Service,MembershipServiceV1Service,OpenAPI,PlaySessionServiceV1Service,UserServiceV1Service,access,bookingRestriction,bookingSubType,bookingSubscription,bookingUserStatus,cancellationPolicy,chat,chatTarget,clientType,createChatResponse,directionParam,months,notificationChatGroup,notificationEntity,pendingPayment,playSessionSettings,playSessionUser,playerStatusParam,playingUserResponse,userChatStatusParam,userPunchCard,v1});
@@ -1 +1 @@
1
- var Ue=Object.defineProperty,pr=Object.defineProperties;var ur=Object.getOwnPropertyDescriptors;var F=Object.getOwnPropertySymbols;var De=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable;var K=(t,e,r)=>e in t?Ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,u=(t,e)=>{for(var r in e||(e={}))De.call(e,r)&&K(t,r,e[r]);if(F)for(var r of F(e))we.call(e,r)&&K(t,r,e[r]);return t},d=(t,e)=>pr(t,ur(e));var Ge=(t,e)=>{var r={};for(var o in t)De.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&F)for(var o of F(t))e.indexOf(o)<0&&we.call(t,o)&&(r[o]=t[o]);return r};var Y=(t,e)=>{for(var r in e)Ue(t,r,{get:e[r],enumerable:!0})};var _e=(t,e,r)=>(K(t,typeof e!="symbol"?e+"":e,r),r),Be=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var f=(t,e,r)=>(Be(t,e,"read from private field"),r?r.call(t):e.get(t)),S=(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)},I=(t,e,r,o)=>(Be(t,e,"write to private field"),o?o.call(t,r):e.set(t,r),r);var h=(t,e,r)=>new Promise((o,a)=>{var l=c=>{try{p(r.next(c))}catch(y){a(y)}},n=c=>{try{p(r.throw(c))}catch(y){a(y)}},p=c=>c.done?o(c.value):Promise.resolve(c.value).then(l,n);p((r=r.apply(t,e)).next())});var k=class extends Error{constructor(r,o,a){super(a);this.name="ApiError",this.url=o.url,this.status=o.status,this.statusText=o.statusText,this.body=o.body,this.request=r}};var L=class extends Error{constructor(e){super(e),this.name="CancelError"}get isCancelled(){return!0}},E,O,T,P,R,w,x,D=class{constructor(e){S(this,E,void 0);S(this,O,void 0);S(this,T,void 0);S(this,P,void 0);S(this,R,void 0);S(this,w,void 0);S(this,x,void 0);I(this,E,!1),I(this,O,!1),I(this,T,!1),I(this,P,[]),I(this,R,new Promise((r,o)=>{I(this,w,r),I(this,x,o);let a=p=>{var c;f(this,E)||f(this,O)||f(this,T)||(I(this,E,!0),(c=f(this,w))==null||c.call(this,p))},l=p=>{var c;f(this,E)||f(this,O)||f(this,T)||(I(this,O,!0),(c=f(this,x))==null||c.call(this,p))},n=p=>{f(this,E)||f(this,O)||f(this,T)||f(this,P).push(p)};return Object.defineProperty(n,"isResolved",{get:()=>f(this,E)}),Object.defineProperty(n,"isRejected",{get:()=>f(this,O)}),Object.defineProperty(n,"isCancelled",{get:()=>f(this,T)}),e(a,l,n)}))}get[Symbol.toStringTag](){return"Cancellable Promise"}then(e,r){return f(this,R).then(e,r)}catch(e){return f(this,R).catch(e)}finally(e){return f(this,R).finally(e)}cancel(){var e;if(!(f(this,E)||f(this,O)||f(this,T))){if(I(this,T,!0),f(this,P).length)try{for(let r of f(this,P))r()}catch(r){console.warn("Cancellation threw an error",r);return}f(this,P).length=0,(e=f(this,x))==null||e.call(this,new L("Request aborted"))}}get isCancelled(){return f(this,T)}};E=new WeakMap,O=new WeakMap,T=new WeakMap,P=new WeakMap,R=new WeakMap,w=new WeakMap,x=new WeakMap;var i={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 qe=(r=>(r.BOOKING_DETAILS="BOOKING_DETAILS",r.PUBLIC_MATCHES="PUBLIC_MATCHES",r))(qe||{});var Fe=(p=>(p.LIMIT_REACHED="LIMIT_REACHED",p.DAY_LIMIT_REACHED="DAY_LIMIT_REACHED",p.MINUTES_OF_BOOKING_LIMIT_REACHED="MINUTES_OF_BOOKING_LIMIT_REACHED",p.MINUTES_OF_BOOKING_PER_DAY_LIMIT_REACHED="MINUTES_OF_BOOKING_PER_DAY_LIMIT_REACHED",p.COURT_GROUP="COURT_GROUP",p.TOO_SOON="TOO_SOON",p.MEMBERS_ONLY="MEMBERS_ONLY",p))(Fe||{});var Q;(e=>{let t;(g=>(g.MONDAY="MONDAY",g.TUESDAY="TUESDAY",g.WEDNESDAY="WEDNESDAY",g.THURSDAY="THURSDAY",g.FRIDAY="FRIDAY",g.SATURDAY="SATURDAY",g.SUNDAY="SUNDAY",g.UNKNOWN="UNKNOWN"))(t=e.weekday||(e.weekday={}))})(Q||(Q={}));var Le=(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))(Le||{});var ze=(n=>(n.UNAPPROVED="UNAPPROVED",n.UNCONFIRMED="UNCONFIRMED",n.DECLINED="DECLINED",n.PARTICIPANT="PARTICIPANT",n.CO_BOOKER="CO-BOOKER",n.OWNER="OWNER",n))(ze||{});var J;(e=>{let t;(a=>(a.AVAILABILITY="AVAILABILITY",a.OCCASION="OCCASION"))(t=e.itemType||(e.itemType={}))})(J||(J={}));var X;(e=>{let t;(l=>(l.ACTIVE="active",l.INACTIVE="inactive",l.NOT_CONNECTED="notConnected"))(t=e.status||(e.status={}))})(X||(X={}));var Ne=(e=>(e.PLAYSESSION="playsession",e))(Ne||{});var je=(r=>(r.WIDGET="WIDGET",r.API="API",r))(je||{});var Z;(e=>{let t;(l=>(l.PUBLIC="public",l.PRIVATE="private",l.PASSWORD="password"))(t=e.type||(e.type={}))})(Z||(Z={}));var Me=(r=>(r.UPCOMING="UPCOMING",r.HISTORICAL="HISTORICAL",r))(Me||{});var $e=(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))($e||{});var ee;(e=>{let t;(l=>(l.PUBLIC="public",l.PRIVATE="private",l.PASSWORD="password"))(t=e.type||(e.type={}))})(ee||(ee={}));var re;(e=>{let t;(a=>(a.GROUP="group",a.USER="user"))(t=e.entityType||(e.entityType={}))})(re||(re={}));var te;(e=>{let t;(n=>(n.BOOKING="BOOKING",n.ACTIVITY="ACTIVITY",n.MEMBERSHIP="MEMBERSHIP",n.SUBSCRIPTION="SUBSCRIPTION"))(t=e.type||(e.type={}))})(te||(te={}));var He=(r=>(r.ALL="ALL",r.PENDING_APPROVAL="PENDING_APPROVAL",r))(He||{});var oe;(e=>{let t;(n=>(n.PAID="PAID",n.INVITED="INVITED",n.JOINED="JOINED",n.BOOKER="BOOKER"))(t=e.status||(e.status={}))})(oe||(oe={}));var ie;(e=>{let t;(a=>(a.JOIN_APPROVAL_NONE="JOIN_APPROVAL_NONE",a.JOIN_APPROVAL_REQUIRED_FOR_ALL="JOIN_APPROVAL_REQUIRED_FOR_ALL"))(t=e.joinApproval||(e.joinApproval={}))})(ie||(ie={}));var se;(e=>{let t;(a=>(a.APPLIED="APPLIED",a.INVITED="INVITED"))(t=e.joiningMethod||(e.joiningMethod={}))})(se||(se={}));var Ve=(a=>(a.ALL="ALL",a.ACTIVE="ACTIVE",a.INACTIVE="INACTIVE",a.NOT_CONNECTED="NOT_CONNECTED",a))(Ve||{});var ae;(e=>{let t;(a=>(a.UNLIMITED="UNLIMITED",a.NUMBERED="NUMBERED"))(t=e.type||(e.type={}))})(ae||(ae={}));var le=t=>t!=null,G=t=>typeof t=="string",ne=t=>G(t)&&t!=="",pe=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]),We=t=>t instanceof FormData,cr=t=>{try{return btoa(t)}catch(e){return Buffer.from(t).toString("base64")}},dr=t=>{let e=[],r=(a,l)=>{e.push(`${encodeURIComponent(a)}=${encodeURIComponent(String(l))}`)},o=(a,l)=>{le(l)&&(Array.isArray(l)?l.forEach(n=>{o(a,n)}):typeof l=="object"?Object.entries(l).forEach(([n,p])=>{o(`${a}[${n}]`,p)}):r(a,l))};return Object.entries(t).forEach(([a,l])=>{o(a,l)}),e.length>0?`?${e.join("&")}`:""},mr=(t,e)=>{let r=t.ENCODE_PATH||encodeURI,o=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}${o}`;return e.query?`${a}${dr(e.query)}`:a},fr=t=>{if(t.formData){let e=new FormData,r=(o,a)=>{G(a)||pe(a)?e.append(o,a):e.append(o,JSON.stringify(a))};return Object.entries(t.formData).filter(([o,a])=>le(a)).forEach(([o,a])=>{Array.isArray(a)?a.forEach(l=>r(o,l)):r(o,a)}),e}},z=(t,e)=>h(void 0,null,function*(){return typeof e=="function"?e(t):e}),yr=(t,e)=>h(void 0,null,function*(){let r=yield z(e,t.TOKEN),o=yield z(e,t.USERNAME),a=yield z(e,t.PASSWORD),l=yield z(e,t.HEADERS),n=Object.entries(u(u({Accept:"application/json"},l),e.headers)).filter(([p,c])=>le(c)).reduce((p,[c,y])=>d(u({},p),{[c]:String(y)}),{});if(ne(r)&&(n.Authorization=`Bearer ${r}`),ne(o)&&ne(a)){let p=cr(`${o}:${a}`);n.Authorization=`Basic ${p}`}return e.body&&(e.mediaType?n["Content-Type"]=e.mediaType:pe(e.body)?n["Content-Type"]=e.body.type||"application/octet-stream":G(e.body)?n["Content-Type"]="text/plain":We(e.body)||(n["Content-Type"]="application/json")),new Headers(n)}),gr=t=>{var e;if(t.body!==void 0)return(e=t.mediaType)!=null&&e.includes("/json")?JSON.stringify(t.body):G(t.body)||pe(t.body)||We(t.body)?t.body:JSON.stringify(t.body)},hr=(t,e,r,o,a,l,n)=>h(void 0,null,function*(){let p=new AbortController,c={headers:l,body:o!=null?o:a,method:e.method,signal:p.signal};return t.WITH_CREDENTIALS&&(c.credentials=t.CREDENTIALS),n(()=>p.abort()),yield fetch(r,c)}),br=(t,e)=>{if(e){let r=t.headers.get(e);if(G(r))return r}},Ir=t=>h(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)}}),Tr=(t,e)=>{var a,l;let o=u({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(o)throw new k(t,e,o);if(!e.ok){let n=(a=e.status)!=null?a:"unknown",p=(l=e.statusText)!=null?l:"unknown",c=(()=>{try{return JSON.stringify(e.body,null,2)}catch(y){return}})();throw new k(t,e,`Generic Error: status: ${n}; status text: ${p}; body: ${c}`)}},s=(t,e)=>new D((r,o,a)=>h(void 0,null,function*(){try{let l=mr(t,e),n=fr(e),p=gr(e),c=yield yr(t,e);if(!a.isCancelled){let y=yield hr(t,e,l,p,n,c,a),g=yield Ir(y),v=br(y,e.responseHeader),m={url:l,ok:y.ok,status:y.status,statusText:y.statusText,body:v!=null?v:g};Tr(e,m),r(m.body)}}catch(l){o(l)}}));var ue=class{static getAdminActivityOccasions(e,r,o,a,l,n=10){return s(i,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:o,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 ce=class{static listActivities(e=!1,r=!1,o,a,l,n,p,c,y,g,v,m=10){return s(i,{method:"GET",url:"/activities",query:{hideFullyBooked:e,exposeOccasions:r,facilityIds:o,level:a,locationSearch:l,categorySearch:n,querySearch:p,resourceTypes:c,startDate:y,endDate:g,offset:v,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 s(i,{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,o,a,l){return s(i,{method:"GET",url:"/activities/{activityId}/occasions",path:{activityId:e},query:{hideFullyBooked:r,hidePastOccasions:o,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 s(i,{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,o,a,l,n=10){return s(i,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:o,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 s(i,{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,o,a,l,n,p,c,y=10){return s(i,{method:"GET",url:"/facilities",query:{city:e,countryCode:r,name:o,latitude:a,longitude:l,radius:n,resourceTypes:p,offset:c,limit:y},errors:{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 s(i,{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 s(i,{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 s(i,{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,o){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities",path:{resourceId:e},query:{startDateTime:r,endDateTime:o},errors:{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 de=class{static getApiClientList(e,r=10){return s(i,{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 s(i,{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 s(i,{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,o){return s(i,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:o},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 s(i,{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 me=class{static getActivityOccasionForUser(e){return s(i,{method:"GET",url:"/activities/user-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 getActivityOccasionPrice(e,r){return s(i,{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 s(i,{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,o,a,l,n,p){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:o,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,o,a,l){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimes/prices",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,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 listAvailabilityEndTimesWithRestrictions(e,r,o,a,l){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimeswithrestrictions",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,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,o,a){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/cancellation-policy",path:{resourceId:e},query:{startTime:r,endTime:o,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 s(i,{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 getBookingUsers(e){return s(i,{method:"GET",url:"/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 searchUsers(e){return s(i,{method:"GET",url:"/profiles/users/search",query:{key:e},errors:{400:"Illegal input for operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static listChats(e="ALL",r,o=10){return s(i,{method:"GET",url:"/users/chats",query:{userChatStatus:e,offset:r,limit:o},errors:{400:"Illegal input for operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static createChat(e){return s(i,{method:"POST",url:"/users/chats",body:e,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."}})}static adminCreateChat(e){return s(i,{method:"POST",url:"/admin/chats",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error."}})}static getTargetChat(e,r){return s(i,{method:"GET",url:"/users/chats/by-targetid/{target}/{targetId}",path:{target:e,targetId:r},errors:{400:"Illegal input for operation.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static addUserToChat(e,r){return s(i,{method:"POST",url:"/users/chats/{chatId}/users/{userId}",path:{chatId:e,userId:r},errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",500:"General Error."}})}static removeUserFromChat(e,r){return s(i,{method:"DELETE",url:"/users/chats/{chatId}/users/{userId}",path:{chatId:e,userId:r},errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",500:"General Error."}})}static getChatAuth(){return s(i,{method:"GET",url:"/users/chats/auth",errors:{401:"Unauthorized.",500:"General Error."}})}static getUserInfo(){return s(i,{method:"GET",url:"/users/info",errors:{500:"General Error.",503:"Service unavailable, please try again."}})}static getUsersProfile(){return s(i,{method:"GET",url:"/users/profile",errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",500:"General Error.",503:"Service unavailable, please try again."}})}static updateUsersProfile(e){return s(i,{method:"PUT",url:"/users/profile",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 listUserFavourites(){return s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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,o){return s(i,{method:"GET",url:"/users/bookings",query:{offset:e,limit:r,subType:o},errors:{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 getUserBookingRestrictions(e){return s(i,{method:"GET",url:"/users/bookings/{bookingId}/restrictions",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUsersInBooking(e){return s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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,o){return s(i,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier:o},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserPlaySessions(e,r=10,o="UPCOMING",a="ALL"){return s(i,{method:"GET",url:"/users/playsessions",query:{offset:e,limit:r,direction:o,playerStatus:a},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserPlaySessionsHistory(e,r=10){return s(i,{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 s(i,{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 getUserPlaySessionsMarketplace(e,r,o,a,l){return s(i,{method:"GET",url:"/users/playsessions/marketplace",query:{facilityIds:e,startDateTime:r,endDateTime:o,sportIds:a,availableSpots: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 addWaitlistOccasion(e){return s(i,{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 s(i,{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 listUserOfferPunchCards(e,r=10){return s(i,{method:"GET",url:"/users/offers/punchcards",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",500:"General Error.",503:"Service unavailable, please try again."}})}static listUserOfferValueCards(e,r=10){return s(i,{method:"GET",url:"/users/offers/valuecards",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",500:"General Error.",503:"Service unavailable, please try again."}})}static getCheckout(e){return s(i,{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 s(i,{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,o){return s(i,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:o},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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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,o){return s(i,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:o},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 s(i,{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 fe=class{static getAvailabilityWithPrice(e,r,o,a,l,n,p){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:o,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,o,a,l){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimes/prices",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,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 listAvailabilityEndTimesWithRestrictions(e,r,o,a,l){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimeswithrestrictions",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,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 getBookingUsers(e){return s(i,{method:"GET",url:"/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 getBookingSubscriptionsListUpcoming(e,r=10){return s(i,{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 s(i,{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 s(i,{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 getUserBookingRestrictions(e){return s(i,{method:"GET",url:"/users/bookings/{bookingId}/restrictions",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUsersInBooking(e){return s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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,o){return s(i,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier:o},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 ye=class{static getCheckout(e){return s(i,{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,o){return s(i,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:o},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 ge=class{static updateCompetitionAccount(e){return s(i,{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 he=class{static options(e){return s(i,{method:"OPTIONS",url:"/{cors+}",path:{"cors+":e},responseHeader:"Access-Control-Allow-Origin"})}};var be=class{static createPromoCode(e){return s(i,{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 Ie=class{static createMembership(e){return s(i,{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 s(i,{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 Te=class{static getPlaySessionById(e){return s(i,{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 s(i,{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 s(i,{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 s(i,{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 addUserWithId(e,r,o){return s(i,{method:"POST",url:"/playsessions/{sessionId}/users/{userId}",path:{sessionId:e,userId:r},body:o,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 updateUserWithId(e,r,o){return s(i,{method:"PATCH",url:"/playsessions/{sessionId}/users/{userId}",path:{sessionId:e,userId:r},body:o,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 removePlayerWithUserEmail(e,r){return s(i,{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 s(i,{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.",409:"Conflict with the current state of the target resource.",412:"The request does not meet all conditions for intended operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static joinPlaySession(e){return s(i,{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 getUserPlaySessions(e,r=10,o="UPCOMING",a="ALL"){return s(i,{method:"GET",url:"/users/playsessions",query:{offset:e,limit:r,direction:o,playerStatus:a},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserPlaySessionsHistory(e,r=10){return s(i,{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 s(i,{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 getUserPlaySessionsMarketplace(e,r,o,a,l){return s(i,{method:"GET",url:"/users/playsessions/marketplace",query:{facilityIds:e,startDateTime:r,endDateTime:o,sportIds:a,availableSpots:l},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}};var Ce=class{static searchUsers(e){return s(i,{method:"GET",url:"/profiles/users/search",query:{key:e},errors:{400:"Illegal input for operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserProfile(e){return s(i,{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 listChats(e="ALL",r,o=10){return s(i,{method:"GET",url:"/users/chats",query:{userChatStatus:e,offset:r,limit:o},errors:{400:"Illegal input for operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static createChat(e){return s(i,{method:"POST",url:"/users/chats",body:e,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."}})}static adminCreateChat(e){return s(i,{method:"POST",url:"/admin/chats",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error."}})}static getTargetChat(e,r){return s(i,{method:"GET",url:"/users/chats/by-targetid/{target}/{targetId}",path:{target:e,targetId:r},errors:{400:"Illegal input for operation.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static addUserToChat(e,r){return s(i,{method:"POST",url:"/users/chats/{chatId}/users/{userId}",path:{chatId:e,userId:r},errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",500:"General Error."}})}static removeUserFromChat(e,r){return s(i,{method:"DELETE",url:"/users/chats/{chatId}/users/{userId}",path:{chatId:e,userId:r},errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",500:"General Error."}})}static getChatAuth(){return s(i,{method:"GET",url:"/users/chats/auth",errors:{401:"Unauthorized.",500:"General Error."}})}static handleChatMessage(e){return s(i,{method:"POST",url:"/cometchat/webhooks/message",body:e,mediaType:"application/json"})}static getUsersProfile(){return s(i,{method:"GET",url:"/users/profile",errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",500:"General Error.",503:"Service unavailable, please try again."}})}static updateUsersProfile(e){return s(i,{method:"PUT",url:"/users/profile",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 getRelationToFriend(e){return s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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."}})}static listUserOfferPunchCards(e,r=10){return s(i,{method:"GET",url:"/users/offers/punchcards",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",500:"General Error.",503:"Service unavailable, please try again."}})}static listUserOfferValueCards(e,r=10){return s(i,{method:"GET",url:"/users/offers/valuecards",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",500:"General Error.",503:"Service unavailable, please try again."}})}};var Re={};Y(Re,{addBooking:()=>$,client:()=>b,createFacilityOfferOrder:()=>V,deleteBooking:()=>Se,findBookingById:()=>Pe,findBookings:()=>M,listFacilityOffers:()=>H,queries:()=>W,schemas:()=>j,updateBooking:()=>ve});var Cr=(t,e)=>h(void 0,null,function*(){let r=typeof e=="function"?yield e(t):e;if(r)return t.scheme==="bearer"?`Bearer ${r}`:t.scheme==="basic"?`Basic ${btoa(r)}`:r});var Er={bodySerializer:t=>JSON.stringify(t,(e,r)=>typeof r=="bigint"?r.toString():r)};var Or=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Sr=t=>{switch(t){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},Pr=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Qe=({allowReserved:t,explode:e,name:r,style:o,value:a})=>{if(!e){let p=(t?a:a.map(c=>encodeURIComponent(c))).join(Sr(o));switch(o){case"label":return`.${p}`;case"matrix":return`;${r}=${p}`;case"simple":return p;default:return`${r}=${p}`}}let l=Or(o),n=a.map(p=>o==="label"||o==="simple"?t?p:encodeURIComponent(p):N({allowReserved:t,name:r,value:p})).join(l);return o==="label"||o==="matrix"?l+n:n},N=({allowReserved:t,name:e,value:r})=>{if(r==null)return"";if(typeof r=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${t?r:encodeURIComponent(r)}`},Je=({allowReserved:t,explode:e,name:r,style:o,value:a})=>{if(a instanceof Date)return`${r}=${a.toISOString()}`;if(o!=="deepObject"&&!e){let p=[];Object.entries(a).forEach(([y,g])=>{p=[...p,y,t?g:encodeURIComponent(g)]});let c=p.join(",");switch(o){case"form":return`${r}=${c}`;case"label":return`.${c}`;case"matrix":return`;${r}=${c}`;default:return c}}let l=Pr(o),n=Object.entries(a).map(([p,c])=>N({allowReserved:t,name:o==="deepObject"?`${r}[${p}]`:p,value:c})).join(l);return o==="label"||o==="matrix"?l+n:n},vr=/\{[^{}]+\}/g,Rr=({path:t,url:e})=>{let r=e,o=e.match(vr);if(o)for(let a of o){let l=!1,n=a.substring(1,a.length-1),p="simple";n.endsWith("*")&&(l=!0,n=n.substring(0,n.length-1)),n.startsWith(".")?(n=n.substring(1),p="label"):n.startsWith(";")&&(n=n.substring(1),p="matrix");let c=t[n];if(c==null)continue;if(Array.isArray(c)){r=r.replace(a,Qe({explode:l,name:n,style:p,value:c}));continue}if(typeof c=="object"){r=r.replace(a,Je({explode:l,name:n,style:p,value:c}));continue}if(p==="matrix"){r=r.replace(a,`;${N({name:n,value:c})}`);continue}let y=encodeURIComponent(p==="label"?`.${c}`:c);r=r.replace(a,y)}return r},Xe=({allowReserved:t,array:e,object:r}={})=>o=>{let a=[];if(o&&typeof o=="object")for(let l in o){let n=o[l];if(n!=null){if(Array.isArray(n)){a=[...a,Qe(u({allowReserved:t,explode:!0,name:l,style:"form",value:n},e))];continue}if(typeof n=="object"){a=[...a,Je(u({allowReserved:t,explode:!0,name:l,style:"deepObject",value:n},r))];continue}a=[...a,N({allowReserved:t,name:l,value:n})]}}return a.join("&")},Ar=t=>{var r;if(!t)return"stream";let e=(r=t.split(";")[0])==null?void 0:r.trim();if(e){if(e.startsWith("application/json")||e.endsWith("+json"))return"json";if(e==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(o=>e.startsWith(o)))return"blob";if(e.startsWith("text/"))return"text"}},kr=r=>h(void 0,null,function*(){var o=r,{security:t}=o,e=Ge(o,["security"]);var a;for(let l of t){let n=yield Cr(l,e.auth);if(!n)continue;let p=(a=l.name)!=null?a:"Authorization";switch(l.in){case"query":e.query||(e.query={}),e.query[p]=n;break;case"header":default:e.headers.set(p,n);break}return}}),Ke=t=>xr({baseUrl:t.baseUrl,path:t.path,query:t.query,querySerializer:typeof t.querySerializer=="function"?t.querySerializer:Xe(t.querySerializer),url:t.url}),xr=({baseUrl:t,path:e,query:r,querySerializer:o,url:a})=>{let l=a.startsWith("/")?a:`/${a}`,n=(t!=null?t:"")+l;e&&(n=Rr({path:e,url:n}));let p=r?o(r):"";return p.startsWith("?")&&(p=p.substring(1)),p&&(n+=`?${p}`),n},Ye=(t,e)=>{var o;let r=u(u({},t),e);return(o=r.baseUrl)!=null&&o.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=Ze(t.headers,e.headers),r},Ze=(...t)=>{let e=new Headers;for(let r of t){if(!r||typeof r!="object")continue;let o=r instanceof Headers?r.entries():Object.entries(r);for(let[a,l]of o)if(l===null)e.delete(a);else if(Array.isArray(l))for(let n of l)e.append(a,n);else l!==void 0&&e.set(a,typeof l=="object"?JSON.stringify(l):l)}return e},Ee=class{constructor(){_e(this,"_fns");this._fns=[]}clear(){this._fns=[]}exists(t){return this._fns.indexOf(t)!==-1}eject(t){let e=this._fns.indexOf(t);e!==-1&&(this._fns=[...this._fns.slice(0,e),...this._fns.slice(e+1)])}use(t){this._fns=[...this._fns,t]}},Ur=()=>({error:new Ee,request:new Ee,response:new Ee}),Dr=Xe({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),wr={"Content-Type":"application/json"},Oe=(t={})=>u(d(u({},Er),{headers:wr,parseAs:"auto",querySerializer:Dr}),t),er=(t={})=>{let e=Ye(Oe(),t),r=()=>u({},e),o=n=>(e=Ye(e,n),r()),a=Ur(),l=n=>h(void 0,null,function*(){var Ae,ke,xe;let p=d(u(u({},e),n),{fetch:(ke=(Ae=n.fetch)!=null?Ae:e.fetch)!=null?ke:globalThis.fetch,headers:Ze(e.headers,n.headers)});p.security&&(yield kr(d(u({},p),{security:p.security}))),p.body&&p.bodySerializer&&(p.body=p.bodySerializer(p.body)),(p.body===void 0||p.body==="")&&p.headers.delete("Content-Type");let c=Ke(p),y=u({redirect:"follow"},p),g=new Request(c,y);for(let C of a.request._fns)g=yield C(g,p);let v=p.fetch,m=yield v(g);for(let C of a.response._fns)m=yield C(m,g,p);let _={request:g,response:m};if(m.ok){if(m.status===204||m.headers.get("Content-Length")==="0")return u({data:{}},_);let C=(xe=p.parseAs==="auto"?Ar(m.headers.get("Content-Type")):p.parseAs)!=null?xe:"json";if(C==="stream")return u({data:m.body},_);let q=yield m[C]();return C==="json"&&(p.responseValidator&&(yield p.responseValidator(q)),p.responseTransformer&&(q=yield p.responseTransformer(q))),u({data:q},_)}let B=yield m.text();try{B=JSON.parse(B)}catch(C){}let U=B;for(let C of a.error._fns)U=yield C(B,m,g,p);if(U=U||{},p.throwOnError)throw U;return u({error:U},_)});return{buildUrl:Ke,connect:n=>l(d(u({},n),{method:"CONNECT"})),delete:n=>l(d(u({},n),{method:"DELETE"})),get:n=>l(d(u({},n),{method:"GET"})),getConfig:r,head:n=>l(d(u({},n),{method:"HEAD"})),interceptors:a,options:n=>l(d(u({},n),{method:"OPTIONS"})),patch:n=>l(d(u({},n),{method:"PATCH"})),post:n=>l(d(u({},n),{method:"POST"})),put:n=>l(d(u({},n),{method:"PUT"})),request:l,setConfig:o,trace:n=>l(d(u({},n),{method:"TRACE"}))}};var b=er(Oe({baseUrl:"https://api.matchi.com/v1"}));var j={};Y(j,{BookingSchema:()=>Gr,CreateBookingSchema:()=>_r,FacilityOfferConditionActivitiesSchema:()=>Fr,FacilityOfferConditionCourtsSchema:()=>Lr,FacilityOfferConditionDateSchema:()=>zr,FacilityOfferConditionHoursinadvanceSchema:()=>Nr,FacilityOfferConditionSchema:()=>qr,FacilityOfferConditionTimeSchema:()=>jr,FacilityOfferConditionWeekdaysSchema:()=>Mr,FacilityOfferListSchema:()=>$r,FacilityOfferOrderSchema:()=>Hr,FacilityOfferSchema:()=>Br,FacilityPunchCardDataSchema:()=>Vr,FacilityValueCardDataSchema:()=>Wr,GuestSchema:()=>Kr,PlayerSchema:()=>Yr,UpdateBookingSchema:()=>Qr,pkgOpenapiSharedCursorPaginatedResultSetSchema:()=>Jr,pkgOpenapiSharedErrorSchema:()=>Xr,pkgOpenapiSharedErrorsSchema:()=>Zr,pkgOpenapiSharedOffsetPaginatedResultSetSchema:()=>et,pkgOpenapiSharedProblemDetailsSchema:()=>rt});var Gr={properties:{booker:{format:"uuid",type:"string"},created_at:{format:"date-time",type:"string"},created_by:{type:"string"},end_time:{format:"date-time",type:"string"},id:{format:"uuid",type:"string"},location:{type:"string"},participants:{properties:{guests:{items:{$ref:"#/components/schemas/Guest"},type:"array"},players:{items:{$ref:"#/components/schemas/Player"},type:"array"}},required:["guests","players"],type:"object"},payment_reference:{type:"string"},start_time:{format:"date-time",type:"string"},updated_at:{format:"date-time",type:"string"},updated_by:{type:"string"}},required:["id","booker","location","start_time","end_time","created_at","updated_at","participants","payment_reference","created_by","updated_by"],type:"object"},_r={properties:{booker:{format:"uuid",type:"string"},created_by:{type:"string"},end_time:{format:"date-time",type:"string"},location:{type:"string"},participants:{properties:{guests:{items:{$ref:"#/components/schemas/Guest"},type:"array"},players:{items:{$ref:"#/components/schemas/Player"},type:"array"}},type:"object"},payment_reference:{type:"string"},start_time:{format:"date-time",type:"string"}},required:["booker","location","start_time","end_time","participants","payment_reference"],type:"object"},Br={properties:{data:{oneOf:[{$ref:"#/components/schemas/FacilityPunchCardData"},{$ref:"#/components/schemas/FacilityValueCardData"}]},type:{enum:["FACILITY_PUNCH_CARD","FACILITY_VALUE_CARD"],type:"string"}},required:["type","data"],type:"object"},qr={oneOf:[{$ref:"#/components/schemas/FacilityOfferConditionWeekdays"},{$ref:"#/components/schemas/FacilityOfferConditionCourts"},{$ref:"#/components/schemas/FacilityOfferConditionDate"},{$ref:"#/components/schemas/FacilityOfferConditionTime"},{$ref:"#/components/schemas/FacilityOfferConditionHoursinadvance"},{$ref:"#/components/schemas/FacilityOfferConditionActivities"}],properties:{type:{enum:["WEEKDAYS","COURTS","DATE","TIME","HOURSINADVANCE","ACTIVITIES"],type:"string"}},required:["type"],type:"object"},Fr={properties:{activities:{items:{properties:{id:{type:"integer"},name:{type:"string"},type:{nullable:!0,type:"string"}},required:["id","name","type"],type:"object"},type:"array"},all_activities:{type:"boolean"},not_valid_for_activities:{type:"boolean"}},required:["not_valid_for_activities","all_activities","activities"],type:"object"},Lr={properties:{courts:{items:{properties:{id:{type:"integer"},name:{type:"string"}},required:["id","name"],type:"object"},type:"array"}},required:["courts"],type:"object"},zr={properties:{end_date:{format:"date",type:"string"},start_date:{format:"date",type:"string"}},required:["start_date","end_date"],type:"object"},Nr={properties:{nr_of_hours:{type:"integer"}},required:["nr_of_hours"],type:"object"},jr={properties:{end_time:{format:"time",type:"string"},start_time:{format:"time",type:"string"}},required:["start_time","end_time"],type:"object"},Mr={properties:{weekdays:{items:{description:"Interger representation of weekday. 1 (Monday), 7 (Sunday).",type:"integer"},type:"array"}},required:["weekdays"],type:"object"},$r={properties:{data:{items:{$ref:"#/components/schemas/FacilityOffer"},type:"array"},meta:{$ref:"#/components/schemas/pkgOpenapiSharedCursorPaginatedResultSet"}},required:["data","meta"],type:"object"},Hr={properties:{checkout_url:{description:"The URL to the checkout page for the facility offer order",example:"https://checkout.matchi.com/pay/1b44a93b24a3413dadsee96e1bc7a4350ecac",format:"uri",type:"string"},id:{type:"string"}},required:["id","checkout_url"],type:"object"},Vr={properties:{conditions:{items:{$ref:"#/components/schemas/FacilityOfferCondition"},type:"array"},description:{nullable:!0,type:"string"},expire_date:{format:"date-time",type:"string"},facility_id:{type:"integer"},facility_receive_membership_requests:{type:"boolean"},max_duration:{type:"integer"},members_only:{type:"boolean"},name:{type:"string"},nr_of_bookings_in_period:{nullable:!0,type:"integer"},nr_of_days_valid:{nullable:!0,type:"integer"},nr_of_tickets:{type:"integer"},offer_id:{type:"integer"},price:{type:"string"},unlimited:{type:"boolean"},user_has_active_membership:{type:"boolean"}},required:["offer_id","facility_id","name","description","price","unlimited","max_duration","nr_of_days_valid","nr_of_tickets","members_only","user_has_active_membership","facility_receive_membership_requests","expire_date","conditions","nr_of_bookings_in_period"],type:"object"},Wr={properties:{amount:{type:"string"},conditions:{items:{$ref:"#/components/schemas/FacilityOfferCondition"},type:"array"},description:{nullable:!0,type:"string"},expire_date:{format:"date-time",type:"string"},facility_id:{type:"integer"},facility_receive_membership_requests:{type:"boolean"},members_only:{type:"boolean"},name:{type:"string"},nr_of_days_valid:{nullable:!0,type:"integer"},offer_id:{type:"integer"},price:{type:"string"},user_has_active_membership:{type:"boolean"}},required:["offer_id","facility_id","name","description","price","nr_of_days_valid","amount","members_only","user_has_active_membership","facility_receive_membership_requests","expire_date","conditions"],type:"object"},Kr={properties:{email:{type:"string"}},required:["email"],type:"object"},Yr={properties:{email:{type:"string"},id:{format:"uuid",type:"string"}},required:["id","email"],type:"object"},Qr={properties:{booker:{format:"uuid",type:"string"},end_time:{format:"date-time",type:"string"},location:{type:"string"},participants:{properties:{guests:{items:{$ref:"#/components/schemas/Guest"},type:"array"},players:{items:{$ref:"#/components/schemas/Player"},type:"array"}},type:"object"},payment_reference:{type:"string"},start_time:{format:"date-time",type:"string"}},required:["booker","location","start_time","end_time","participants","payment_reference"],type:"object"},Jr={description:"Metadata about the cursor based pagination for the result. This information is coupled with the CursorParam and CursorLimitParam. Intended to be used as the `meta` field in a list response, next to an `items` array field containing the data.\n",properties:{current_cursor:{description:"Cursor used to retrieve the current page of results.",type:"string"},more_results:{description:"Indicates if there are more results available.",type:"boolean"},next_cursor:{description:"Cursor to retrieve the next page of results.",type:"string"}},required:["current_cursor","more_results"],type:"object"},Xr={properties:{message:{description:"The error message",type:"string"}},type:"object"},Zr={description:"An array of error details to accompany a problem details response.",items:{$ref:"#/components/schemas/pkgOpenapiSharedError"},maxItems:1e3,type:"array"},et={description:"Metadata about the offset based pagination for the result. This information is coupled with the OffsetParam and OffsetLimitParam. Intended to be used as the `meta` field in a list response, next to an `items` array field containing the data.\n",properties:{limit:{type:"integer"},more_results:{type:"boolean"},offset:{type:"integer"}},required:["offset","limit","more_results"],type:"object"},rt={properties:{detail:{description:"A human-readable explanation specific to this occurrence of the problem.",maxLength:4096,type:"string"},errors:{$ref:"#/components/schemas/pkgOpenapiSharedErrors"},instance:{description:"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.",maxLength:1024,type:"string"},status:{description:"The HTTP status code generated by the origin server for this occurrence of the problem.",format:"int32",maximum:599,minimum:100,type:"integer"},title:{description:"A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization.",maxLength:1024,type:"string"},type:{description:"A URI reference that identifies the problem type.",format:"uri",maxLength:1024,type:"string"}},required:["title"],type:"object"};var M=t=>{var e;return((e=t==null?void 0:t.client)!=null?e:b).get(u({url:"/bookings"},t))},$=t=>{var e;return((e=t.client)!=null?e:b).post(d(u({url:"/bookings"},t),{headers:u({"Content-Type":"application/json"},t==null?void 0:t.headers)}))},Se=t=>{var e;return((e=t.client)!=null?e:b).delete(u({url:"/bookings/{bookingId}"},t))},Pe=t=>{var e;return((e=t.client)!=null?e:b).get(u({url:"/bookings/{bookingId}"},t))},ve=t=>{var e;return((e=t.client)!=null?e:b).put(d(u({url:"/bookings/{bookingId}"},t),{headers:u({"Content-Type":"application/json"},t==null?void 0:t.headers)}))},H=t=>{var e;return((e=t.client)!=null?e:b).get(u({url:"/facilities/{facility_id}/offers"},t))},V=t=>{var e;return((e=t.client)!=null?e:b).post(u({url:"/facilities/{facility_id}/offers/{offer_id}"},t))};var W={};Y(W,{addBookingMutation:()=>st,addBookingOptions:()=>it,addBookingQueryKey:()=>ir,createFacilityOfferOrderMutation:()=>dt,createFacilityOfferOrderOptions:()=>ct,createFacilityOfferOrderQueryKey:()=>lr,deleteBookingMutation:()=>at,findBookingByIdOptions:()=>nt,findBookingByIdQueryKey:()=>sr,findBookingsInfiniteOptions:()=>ot,findBookingsInfiniteQueryKey:()=>or,findBookingsOptions:()=>tt,findBookingsQueryKey:()=>rr,listFacilityOffersInfiniteOptions:()=>ut,listFacilityOffersInfiniteQueryKey:()=>nr,listFacilityOffersOptions:()=>pt,listFacilityOffersQueryKey:()=>ar,updateBookingMutation:()=>lt});var A=(t,e,r)=>{var a;let o={_id:t,baseUrl:((a=e==null?void 0:e.client)!=null?a:b).getConfig().baseUrl};return r&&(o._infinite=r),e!=null&&e.body&&(o.body=e.body),e!=null&&e.headers&&(o.headers=e.headers),e!=null&&e.path&&(o.path=e.path),e!=null&&e.query&&(o.query=e.query),[o]},rr=t=>A("findBookings",t),tt=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:a}=yield M(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return a}),queryKey:rr(t)}),tr=(t,e)=>{let r=t[0];return e.body&&(r.body=u(u({},t[0].body),e.body)),e.headers&&(r.headers=u(u({},t[0].headers),e.headers)),e.path&&(r.path=u(u({},t[0].path),e.path)),e.query&&(r.query=u(u({},t[0].query),e.query)),r},or=t=>A("findBookings",t,!0),ot=t=>({queryFn:a=>h(void 0,[a],function*({pageParam:e,queryKey:r,signal:o}){let n=tr(r,typeof e=="object"?e:{query:{offset:e}}),{data:p}=yield M(d(u(u({},t),n),{signal:o,throwOnError:!0}));return p}),queryKey:or(t)}),ir=t=>A("addBooking",t),it=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:a}=yield $(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return a}),queryKey:ir(t)}),st=t=>({mutationFn:r=>h(void 0,null,function*(){let{data:o}=yield $(d(u(u({},t),r),{throwOnError:!0}));return o})}),at=t=>({mutationFn:r=>h(void 0,null,function*(){let{data:o}=yield Se(d(u(u({},t),r),{throwOnError:!0}));return o})}),sr=t=>A("findBookingById",t),nt=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:a}=yield Pe(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return a}),queryKey:sr(t)}),lt=t=>({mutationFn:r=>h(void 0,null,function*(){let{data:o}=yield ve(d(u(u({},t),r),{throwOnError:!0}));return o})}),ar=t=>A("listFacilityOffers",t),pt=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:a}=yield H(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return a}),queryKey:ar(t)}),nr=t=>A("listFacilityOffers",t,!0),ut=t=>({queryFn:a=>h(void 0,[a],function*({pageParam:e,queryKey:r,signal:o}){let n=tr(r,typeof e=="object"?e:{query:{cursor:e}}),{data:p}=yield H(d(u(u({},t),n),{signal:o,throwOnError:!0}));return p}),queryKey:nr(t)}),lr=t=>A("createFacilityOfferOrder",t),ct=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:a}=yield V(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return a}),queryKey:lr(t)}),dt=t=>({mutationFn:r=>h(void 0,null,function*(){let{data:o}=yield V(d(u(u({},t),r),{throwOnError:!0}));return o})});export{ue as ActivityServiceV1Service,ce as AnonymousService,de as ApiClientServiceV1Service,k as ApiError,me as AuthorizedService,fe as BookingServiceV1Service,L as CancelError,D as CancelablePromise,ye as CheckoutServiceV1Service,ge as CompetitionServiceV1Service,he as CorsService,be as LoyaltyServiceV1Service,Ie as MembershipServiceV1Service,i as OpenAPI,Te as PlaySessionServiceV1Service,Ce as UserServiceV1Service,qe as access,Fe as bookingRestriction,Le as bookingSubType,Q as bookingSubscription,ze as bookingUserStatus,J as cancellationPolicy,X as chat,Ne as chatTarget,je as clientType,Z as createChatResponse,Me as directionParam,$e as months,ee as notificationChatGroup,re as notificationEntity,te as pendingPayment,ie as playSessionSettings,se as playSessionUser,He as playerStatusParam,oe as playingUserResponse,Ve as userChatStatusParam,ae as userPunchCard,Re as v1};
1
+ var Ue=Object.defineProperty,pr=Object.defineProperties;var ur=Object.getOwnPropertyDescriptors;var F=Object.getOwnPropertySymbols;var De=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable;var K=(t,e,r)=>e in t?Ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,u=(t,e)=>{for(var r in e||(e={}))De.call(e,r)&&K(t,r,e[r]);if(F)for(var r of F(e))we.call(e,r)&&K(t,r,e[r]);return t},d=(t,e)=>pr(t,ur(e));var Ge=(t,e)=>{var r={};for(var o in t)De.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&F)for(var o of F(t))e.indexOf(o)<0&&we.call(t,o)&&(r[o]=t[o]);return r};var Y=(t,e)=>{for(var r in e)Ue(t,r,{get:e[r],enumerable:!0})};var _e=(t,e,r)=>(K(t,typeof e!="symbol"?e+"":e,r),r),Be=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var f=(t,e,r)=>(Be(t,e,"read from private field"),r?r.call(t):e.get(t)),S=(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)},I=(t,e,r,o)=>(Be(t,e,"write to private field"),o?o.call(t,r):e.set(t,r),r);var h=(t,e,r)=>new Promise((o,a)=>{var l=c=>{try{p(r.next(c))}catch(y){a(y)}},n=c=>{try{p(r.throw(c))}catch(y){a(y)}},p=c=>c.done?o(c.value):Promise.resolve(c.value).then(l,n);p((r=r.apply(t,e)).next())});var k=class extends Error{constructor(r,o,a){super(a);this.name="ApiError",this.url=o.url,this.status=o.status,this.statusText=o.statusText,this.body=o.body,this.request=r}};var N=class extends Error{constructor(e){super(e),this.name="CancelError"}get isCancelled(){return!0}},E,O,T,P,R,w,x,D=class{constructor(e){S(this,E,void 0);S(this,O,void 0);S(this,T,void 0);S(this,P,void 0);S(this,R,void 0);S(this,w,void 0);S(this,x,void 0);I(this,E,!1),I(this,O,!1),I(this,T,!1),I(this,P,[]),I(this,R,new Promise((r,o)=>{I(this,w,r),I(this,x,o);let a=p=>{var c;f(this,E)||f(this,O)||f(this,T)||(I(this,E,!0),(c=f(this,w))==null||c.call(this,p))},l=p=>{var c;f(this,E)||f(this,O)||f(this,T)||(I(this,O,!0),(c=f(this,x))==null||c.call(this,p))},n=p=>{f(this,E)||f(this,O)||f(this,T)||f(this,P).push(p)};return Object.defineProperty(n,"isResolved",{get:()=>f(this,E)}),Object.defineProperty(n,"isRejected",{get:()=>f(this,O)}),Object.defineProperty(n,"isCancelled",{get:()=>f(this,T)}),e(a,l,n)}))}get[Symbol.toStringTag](){return"Cancellable Promise"}then(e,r){return f(this,R).then(e,r)}catch(e){return f(this,R).catch(e)}finally(e){return f(this,R).finally(e)}cancel(){var e;if(!(f(this,E)||f(this,O)||f(this,T))){if(I(this,T,!0),f(this,P).length)try{for(let r of f(this,P))r()}catch(r){console.warn("Cancellation threw an error",r);return}f(this,P).length=0,(e=f(this,x))==null||e.call(this,new N("Request aborted"))}}get isCancelled(){return f(this,T)}};E=new WeakMap,O=new WeakMap,T=new WeakMap,P=new WeakMap,R=new WeakMap,w=new WeakMap,x=new WeakMap;var i={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 qe=(r=>(r.BOOKING_DETAILS="BOOKING_DETAILS",r.PUBLIC_MATCHES="PUBLIC_MATCHES",r))(qe||{});var Fe=(p=>(p.LIMIT_REACHED="LIMIT_REACHED",p.DAY_LIMIT_REACHED="DAY_LIMIT_REACHED",p.MINUTES_OF_BOOKING_LIMIT_REACHED="MINUTES_OF_BOOKING_LIMIT_REACHED",p.MINUTES_OF_BOOKING_PER_DAY_LIMIT_REACHED="MINUTES_OF_BOOKING_PER_DAY_LIMIT_REACHED",p.COURT_GROUP="COURT_GROUP",p.TOO_SOON="TOO_SOON",p.MEMBERS_ONLY="MEMBERS_ONLY",p))(Fe||{});var Q;(e=>{let t;(g=>(g.MONDAY="MONDAY",g.TUESDAY="TUESDAY",g.WEDNESDAY="WEDNESDAY",g.THURSDAY="THURSDAY",g.FRIDAY="FRIDAY",g.SATURDAY="SATURDAY",g.SUNDAY="SUNDAY",g.UNKNOWN="UNKNOWN"))(t=e.weekday||(e.weekday={}))})(Q||(Q={}));var Ne=(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))(Ne||{});var Le=(n=>(n.UNAPPROVED="UNAPPROVED",n.UNCONFIRMED="UNCONFIRMED",n.DECLINED="DECLINED",n.PARTICIPANT="PARTICIPANT",n.CO_BOOKER="CO-BOOKER",n.OWNER="OWNER",n))(Le||{});var J;(e=>{let t;(a=>(a.AVAILABILITY="AVAILABILITY",a.OCCASION="OCCASION"))(t=e.itemType||(e.itemType={}))})(J||(J={}));var X;(e=>{let t;(l=>(l.ACTIVE="active",l.INACTIVE="inactive",l.NOT_CONNECTED="notConnected"))(t=e.status||(e.status={}))})(X||(X={}));var ze=(e=>(e.PLAYSESSION="playsession",e))(ze||{});var je=(r=>(r.WIDGET="WIDGET",r.API="API",r))(je||{});var Z;(e=>{let t;(l=>(l.PUBLIC="public",l.PRIVATE="private",l.PASSWORD="password"))(t=e.type||(e.type={}))})(Z||(Z={}));var Me=(r=>(r.UPCOMING="UPCOMING",r.HISTORICAL="HISTORICAL",r))(Me||{});var $e=(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))($e||{});var ee;(e=>{let t;(l=>(l.PUBLIC="public",l.PRIVATE="private",l.PASSWORD="password"))(t=e.type||(e.type={}))})(ee||(ee={}));var re;(e=>{let t;(a=>(a.GROUP="group",a.USER="user"))(t=e.entityType||(e.entityType={}))})(re||(re={}));var te;(e=>{let t;(n=>(n.BOOKING="BOOKING",n.ACTIVITY="ACTIVITY",n.MEMBERSHIP="MEMBERSHIP",n.SUBSCRIPTION="SUBSCRIPTION"))(t=e.type||(e.type={}))})(te||(te={}));var He=(o=>(o.ALL="ALL",o.PENDING_APPROVAL="PENDING_APPROVAL",o.PENDING_ACTION="PENDING_ACTION",o))(He||{});var oe;(e=>{let t;(n=>(n.PAID="PAID",n.INVITED="INVITED",n.JOINED="JOINED",n.BOOKER="BOOKER"))(t=e.status||(e.status={}))})(oe||(oe={}));var ie;(e=>{let t;(a=>(a.JOIN_APPROVAL_NONE="JOIN_APPROVAL_NONE",a.JOIN_APPROVAL_REQUIRED_FOR_ALL="JOIN_APPROVAL_REQUIRED_FOR_ALL"))(t=e.joinApproval||(e.joinApproval={}))})(ie||(ie={}));var se;(e=>{let t;(a=>(a.APPLIED="APPLIED",a.INVITED="INVITED"))(t=e.joiningMethod||(e.joiningMethod={}))})(se||(se={}));var Ve=(a=>(a.ALL="ALL",a.ACTIVE="ACTIVE",a.INACTIVE="INACTIVE",a.NOT_CONNECTED="NOT_CONNECTED",a))(Ve||{});var ae;(e=>{let t;(a=>(a.UNLIMITED="UNLIMITED",a.NUMBERED="NUMBERED"))(t=e.type||(e.type={}))})(ae||(ae={}));var le=t=>t!=null,G=t=>typeof t=="string",ne=t=>G(t)&&t!=="",pe=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]),We=t=>t instanceof FormData,cr=t=>{try{return btoa(t)}catch(e){return Buffer.from(t).toString("base64")}},dr=t=>{let e=[],r=(a,l)=>{e.push(`${encodeURIComponent(a)}=${encodeURIComponent(String(l))}`)},o=(a,l)=>{le(l)&&(Array.isArray(l)?l.forEach(n=>{o(a,n)}):typeof l=="object"?Object.entries(l).forEach(([n,p])=>{o(`${a}[${n}]`,p)}):r(a,l))};return Object.entries(t).forEach(([a,l])=>{o(a,l)}),e.length>0?`?${e.join("&")}`:""},mr=(t,e)=>{let r=t.ENCODE_PATH||encodeURI,o=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}${o}`;return e.query?`${a}${dr(e.query)}`:a},fr=t=>{if(t.formData){let e=new FormData,r=(o,a)=>{G(a)||pe(a)?e.append(o,a):e.append(o,JSON.stringify(a))};return Object.entries(t.formData).filter(([o,a])=>le(a)).forEach(([o,a])=>{Array.isArray(a)?a.forEach(l=>r(o,l)):r(o,a)}),e}},L=(t,e)=>h(void 0,null,function*(){return typeof e=="function"?e(t):e}),yr=(t,e)=>h(void 0,null,function*(){let r=yield L(e,t.TOKEN),o=yield L(e,t.USERNAME),a=yield L(e,t.PASSWORD),l=yield L(e,t.HEADERS),n=Object.entries(u(u({Accept:"application/json"},l),e.headers)).filter(([p,c])=>le(c)).reduce((p,[c,y])=>d(u({},p),{[c]:String(y)}),{});if(ne(r)&&(n.Authorization=`Bearer ${r}`),ne(o)&&ne(a)){let p=cr(`${o}:${a}`);n.Authorization=`Basic ${p}`}return e.body&&(e.mediaType?n["Content-Type"]=e.mediaType:pe(e.body)?n["Content-Type"]=e.body.type||"application/octet-stream":G(e.body)?n["Content-Type"]="text/plain":We(e.body)||(n["Content-Type"]="application/json")),new Headers(n)}),gr=t=>{var e;if(t.body!==void 0)return(e=t.mediaType)!=null&&e.includes("/json")?JSON.stringify(t.body):G(t.body)||pe(t.body)||We(t.body)?t.body:JSON.stringify(t.body)},hr=(t,e,r,o,a,l,n)=>h(void 0,null,function*(){let p=new AbortController,c={headers:l,body:o!=null?o:a,method:e.method,signal:p.signal};return t.WITH_CREDENTIALS&&(c.credentials=t.CREDENTIALS),n(()=>p.abort()),yield fetch(r,c)}),br=(t,e)=>{if(e){let r=t.headers.get(e);if(G(r))return r}},Ir=t=>h(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)}}),Tr=(t,e)=>{var a,l;let o=u({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(o)throw new k(t,e,o);if(!e.ok){let n=(a=e.status)!=null?a:"unknown",p=(l=e.statusText)!=null?l:"unknown",c=(()=>{try{return JSON.stringify(e.body,null,2)}catch(y){return}})();throw new k(t,e,`Generic Error: status: ${n}; status text: ${p}; body: ${c}`)}},s=(t,e)=>new D((r,o,a)=>h(void 0,null,function*(){try{let l=mr(t,e),n=fr(e),p=gr(e),c=yield yr(t,e);if(!a.isCancelled){let y=yield hr(t,e,l,p,n,c,a),g=yield Ir(y),v=br(y,e.responseHeader),m={url:l,ok:y.ok,status:y.status,statusText:y.statusText,body:v!=null?v:g};Tr(e,m),r(m.body)}}catch(l){o(l)}}));var ue=class{static getAdminActivityOccasions(e,r,o,a,l,n=10){return s(i,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:o,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 ce=class{static listActivities(e=!1,r=!1,o,a,l,n,p,c,y,g,v,m=10){return s(i,{method:"GET",url:"/activities",query:{hideFullyBooked:e,exposeOccasions:r,facilityIds:o,level:a,locationSearch:l,categorySearch:n,querySearch:p,resourceTypes:c,startDate:y,endDate:g,offset:v,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 s(i,{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,o,a,l){return s(i,{method:"GET",url:"/activities/{activityId}/occasions",path:{activityId:e},query:{hideFullyBooked:r,hidePastOccasions:o,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 s(i,{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,o,a,l,n=10){return s(i,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:o,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 s(i,{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,o,a,l,n,p,c,y=10){return s(i,{method:"GET",url:"/facilities",query:{city:e,countryCode:r,name:o,latitude:a,longitude:l,radius:n,resourceTypes:p,offset:c,limit:y},errors:{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 s(i,{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 s(i,{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 s(i,{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,o){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities",path:{resourceId:e},query:{startDateTime:r,endDateTime:o},errors:{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 de=class{static getApiClientList(e,r=10){return s(i,{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 s(i,{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 s(i,{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,o){return s(i,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:o},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 s(i,{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 me=class{static getActivityOccasionForUser(e){return s(i,{method:"GET",url:"/activities/user-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 getActivityOccasionPrice(e,r){return s(i,{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 s(i,{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,o,a,l,n,p){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:o,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,o,a,l){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimes/prices",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,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 listAvailabilityEndTimesWithRestrictions(e,r,o,a,l){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimeswithrestrictions",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,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,o,a){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/cancellation-policy",path:{resourceId:e},query:{startTime:r,endTime:o,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 s(i,{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 getBookingUsers(e){return s(i,{method:"GET",url:"/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 searchUsers(e){return s(i,{method:"GET",url:"/profiles/users/search",query:{key:e},errors:{400:"Illegal input for operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static listChats(e="ALL",r,o=10){return s(i,{method:"GET",url:"/users/chats",query:{userChatStatus:e,offset:r,limit:o},errors:{400:"Illegal input for operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static createChat(e){return s(i,{method:"POST",url:"/users/chats",body:e,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."}})}static adminCreateChat(e){return s(i,{method:"POST",url:"/admin/chats",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error."}})}static getTargetChat(e,r){return s(i,{method:"GET",url:"/users/chats/by-targetid/{target}/{targetId}",path:{target:e,targetId:r},errors:{400:"Illegal input for operation.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static addUserToChat(e,r){return s(i,{method:"POST",url:"/users/chats/{chatId}/users/{userId}",path:{chatId:e,userId:r},errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",500:"General Error."}})}static removeUserFromChat(e,r){return s(i,{method:"DELETE",url:"/users/chats/{chatId}/users/{userId}",path:{chatId:e,userId:r},errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",500:"General Error."}})}static getChatAuth(){return s(i,{method:"GET",url:"/users/chats/auth",errors:{401:"Unauthorized.",500:"General Error."}})}static getUserInfo(){return s(i,{method:"GET",url:"/users/info",errors:{500:"General Error.",503:"Service unavailable, please try again."}})}static getUsersProfile(){return s(i,{method:"GET",url:"/users/profile",errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",500:"General Error.",503:"Service unavailable, please try again."}})}static updateUsersProfile(e){return s(i,{method:"PUT",url:"/users/profile",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 listUserFavourites(){return s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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,o){return s(i,{method:"GET",url:"/users/bookings",query:{offset:e,limit:r,subType:o},errors:{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 getUserBookingRestrictions(e){return s(i,{method:"GET",url:"/users/bookings/{bookingId}/restrictions",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUsersInBooking(e){return s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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,o){return s(i,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier:o},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserPlaySessions(e,r=10,o="UPCOMING",a="ALL"){return s(i,{method:"GET",url:"/users/playsessions",query:{offset:e,limit:r,direction:o,playerStatus:a},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserPlaySessionsHistory(e,r=10){return s(i,{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 s(i,{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 getUserPlaySessionsMarketplace(e,r,o,a,l){return s(i,{method:"GET",url:"/users/playsessions/marketplace",query:{facilityIds:e,startDateTime:r,endDateTime:o,sportIds:a,availableSpots: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 addWaitlistOccasion(e){return s(i,{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 s(i,{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 listUserOfferPunchCards(e,r=10){return s(i,{method:"GET",url:"/users/offers/punchcards",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",500:"General Error.",503:"Service unavailable, please try again."}})}static listUserOfferValueCards(e,r=10){return s(i,{method:"GET",url:"/users/offers/valuecards",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",500:"General Error.",503:"Service unavailable, please try again."}})}static getCheckout(e){return s(i,{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 s(i,{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,o){return s(i,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:o},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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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,o){return s(i,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:o},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 s(i,{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 fe=class{static getAvailabilityWithPrice(e,r,o,a,l,n,p){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:o,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,o,a,l){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimes/prices",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,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 listAvailabilityEndTimesWithRestrictions(e,r,o,a,l){return s(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimeswithrestrictions",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,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 getBookingUsers(e){return s(i,{method:"GET",url:"/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 getBookingSubscriptionsListUpcoming(e,r=10){return s(i,{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 s(i,{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 s(i,{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 getUserBookingRestrictions(e){return s(i,{method:"GET",url:"/users/bookings/{bookingId}/restrictions",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUsersInBooking(e){return s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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,o){return s(i,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier:o},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 ye=class{static getCheckout(e){return s(i,{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,o){return s(i,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:o},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 ge=class{static updateCompetitionAccount(e){return s(i,{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 he=class{static options(e){return s(i,{method:"OPTIONS",url:"/{cors+}",path:{"cors+":e},responseHeader:"Access-Control-Allow-Origin"})}};var be=class{static createPromoCode(e){return s(i,{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 Ie=class{static createMembership(e){return s(i,{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 s(i,{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 Te=class{static getPlaySessionById(e){return s(i,{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 s(i,{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 s(i,{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 s(i,{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 addUserWithId(e,r,o){return s(i,{method:"POST",url:"/playsessions/{sessionId}/users/{userId}",path:{sessionId:e,userId:r},body:o,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 updateUserWithId(e,r,o){return s(i,{method:"PATCH",url:"/playsessions/{sessionId}/users/{userId}",path:{sessionId:e,userId:r},body:o,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 removePlayerWithUserEmail(e,r){return s(i,{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 s(i,{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.",409:"Conflict with the current state of the target resource.",412:"The request does not meet all conditions for intended operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static joinPlaySession(e){return s(i,{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 getUserPlaySessions(e,r=10,o="UPCOMING",a="ALL"){return s(i,{method:"GET",url:"/users/playsessions",query:{offset:e,limit:r,direction:o,playerStatus:a},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserPlaySessionsHistory(e,r=10){return s(i,{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 s(i,{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 getUserPlaySessionsMarketplace(e,r,o,a,l){return s(i,{method:"GET",url:"/users/playsessions/marketplace",query:{facilityIds:e,startDateTime:r,endDateTime:o,sportIds:a,availableSpots:l},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}};var Ce=class{static searchUsers(e){return s(i,{method:"GET",url:"/profiles/users/search",query:{key:e},errors:{400:"Illegal input for operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserProfile(e){return s(i,{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 listChats(e="ALL",r,o=10){return s(i,{method:"GET",url:"/users/chats",query:{userChatStatus:e,offset:r,limit:o},errors:{400:"Illegal input for operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static createChat(e){return s(i,{method:"POST",url:"/users/chats",body:e,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."}})}static adminCreateChat(e){return s(i,{method:"POST",url:"/admin/chats",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error."}})}static getTargetChat(e,r){return s(i,{method:"GET",url:"/users/chats/by-targetid/{target}/{targetId}",path:{target:e,targetId:r},errors:{400:"Illegal input for operation.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static addUserToChat(e,r){return s(i,{method:"POST",url:"/users/chats/{chatId}/users/{userId}",path:{chatId:e,userId:r},errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",500:"General Error."}})}static removeUserFromChat(e,r){return s(i,{method:"DELETE",url:"/users/chats/{chatId}/users/{userId}",path:{chatId:e,userId:r},errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",500:"General Error."}})}static getChatAuth(){return s(i,{method:"GET",url:"/users/chats/auth",errors:{401:"Unauthorized.",500:"General Error."}})}static handleChatMessage(e){return s(i,{method:"POST",url:"/cometchat/webhooks/message",body:e,mediaType:"application/json"})}static getUsersProfile(){return s(i,{method:"GET",url:"/users/profile",errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",500:"General Error.",503:"Service unavailable, please try again."}})}static updateUsersProfile(e){return s(i,{method:"PUT",url:"/users/profile",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 getRelationToFriend(e){return s(i,{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 s(i,{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 s(i,{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 s(i,{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 s(i,{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."}})}static listUserOfferPunchCards(e,r=10){return s(i,{method:"GET",url:"/users/offers/punchcards",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",500:"General Error.",503:"Service unavailable, please try again."}})}static listUserOfferValueCards(e,r=10){return s(i,{method:"GET",url:"/users/offers/valuecards",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",500:"General Error.",503:"Service unavailable, please try again."}})}};var Re={};Y(Re,{addBooking:()=>$,client:()=>b,createFacilityOfferOrder:()=>V,deleteBooking:()=>Se,findBookingById:()=>Pe,findBookings:()=>M,listFacilityOffers:()=>H,queries:()=>W,schemas:()=>j,updateBooking:()=>ve});var Cr=(t,e)=>h(void 0,null,function*(){let r=typeof e=="function"?yield e(t):e;if(r)return t.scheme==="bearer"?`Bearer ${r}`:t.scheme==="basic"?`Basic ${btoa(r)}`:r});var Er={bodySerializer:t=>JSON.stringify(t,(e,r)=>typeof r=="bigint"?r.toString():r)};var Or=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Sr=t=>{switch(t){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},Pr=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Qe=({allowReserved:t,explode:e,name:r,style:o,value:a})=>{if(!e){let p=(t?a:a.map(c=>encodeURIComponent(c))).join(Sr(o));switch(o){case"label":return`.${p}`;case"matrix":return`;${r}=${p}`;case"simple":return p;default:return`${r}=${p}`}}let l=Or(o),n=a.map(p=>o==="label"||o==="simple"?t?p:encodeURIComponent(p):z({allowReserved:t,name:r,value:p})).join(l);return o==="label"||o==="matrix"?l+n:n},z=({allowReserved:t,name:e,value:r})=>{if(r==null)return"";if(typeof r=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${t?r:encodeURIComponent(r)}`},Je=({allowReserved:t,explode:e,name:r,style:o,value:a})=>{if(a instanceof Date)return`${r}=${a.toISOString()}`;if(o!=="deepObject"&&!e){let p=[];Object.entries(a).forEach(([y,g])=>{p=[...p,y,t?g:encodeURIComponent(g)]});let c=p.join(",");switch(o){case"form":return`${r}=${c}`;case"label":return`.${c}`;case"matrix":return`;${r}=${c}`;default:return c}}let l=Pr(o),n=Object.entries(a).map(([p,c])=>z({allowReserved:t,name:o==="deepObject"?`${r}[${p}]`:p,value:c})).join(l);return o==="label"||o==="matrix"?l+n:n},vr=/\{[^{}]+\}/g,Rr=({path:t,url:e})=>{let r=e,o=e.match(vr);if(o)for(let a of o){let l=!1,n=a.substring(1,a.length-1),p="simple";n.endsWith("*")&&(l=!0,n=n.substring(0,n.length-1)),n.startsWith(".")?(n=n.substring(1),p="label"):n.startsWith(";")&&(n=n.substring(1),p="matrix");let c=t[n];if(c==null)continue;if(Array.isArray(c)){r=r.replace(a,Qe({explode:l,name:n,style:p,value:c}));continue}if(typeof c=="object"){r=r.replace(a,Je({explode:l,name:n,style:p,value:c}));continue}if(p==="matrix"){r=r.replace(a,`;${z({name:n,value:c})}`);continue}let y=encodeURIComponent(p==="label"?`.${c}`:c);r=r.replace(a,y)}return r},Xe=({allowReserved:t,array:e,object:r}={})=>o=>{let a=[];if(o&&typeof o=="object")for(let l in o){let n=o[l];if(n!=null){if(Array.isArray(n)){a=[...a,Qe(u({allowReserved:t,explode:!0,name:l,style:"form",value:n},e))];continue}if(typeof n=="object"){a=[...a,Je(u({allowReserved:t,explode:!0,name:l,style:"deepObject",value:n},r))];continue}a=[...a,z({allowReserved:t,name:l,value:n})]}}return a.join("&")},Ar=t=>{var r;if(!t)return"stream";let e=(r=t.split(";")[0])==null?void 0:r.trim();if(e){if(e.startsWith("application/json")||e.endsWith("+json"))return"json";if(e==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(o=>e.startsWith(o)))return"blob";if(e.startsWith("text/"))return"text"}},kr=r=>h(void 0,null,function*(){var o=r,{security:t}=o,e=Ge(o,["security"]);var a;for(let l of t){let n=yield Cr(l,e.auth);if(!n)continue;let p=(a=l.name)!=null?a:"Authorization";switch(l.in){case"query":e.query||(e.query={}),e.query[p]=n;break;case"header":default:e.headers.set(p,n);break}return}}),Ke=t=>xr({baseUrl:t.baseUrl,path:t.path,query:t.query,querySerializer:typeof t.querySerializer=="function"?t.querySerializer:Xe(t.querySerializer),url:t.url}),xr=({baseUrl:t,path:e,query:r,querySerializer:o,url:a})=>{let l=a.startsWith("/")?a:`/${a}`,n=(t!=null?t:"")+l;e&&(n=Rr({path:e,url:n}));let p=r?o(r):"";return p.startsWith("?")&&(p=p.substring(1)),p&&(n+=`?${p}`),n},Ye=(t,e)=>{var o;let r=u(u({},t),e);return(o=r.baseUrl)!=null&&o.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=Ze(t.headers,e.headers),r},Ze=(...t)=>{let e=new Headers;for(let r of t){if(!r||typeof r!="object")continue;let o=r instanceof Headers?r.entries():Object.entries(r);for(let[a,l]of o)if(l===null)e.delete(a);else if(Array.isArray(l))for(let n of l)e.append(a,n);else l!==void 0&&e.set(a,typeof l=="object"?JSON.stringify(l):l)}return e},Ee=class{constructor(){_e(this,"_fns");this._fns=[]}clear(){this._fns=[]}exists(t){return this._fns.indexOf(t)!==-1}eject(t){let e=this._fns.indexOf(t);e!==-1&&(this._fns=[...this._fns.slice(0,e),...this._fns.slice(e+1)])}use(t){this._fns=[...this._fns,t]}},Ur=()=>({error:new Ee,request:new Ee,response:new Ee}),Dr=Xe({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),wr={"Content-Type":"application/json"},Oe=(t={})=>u(d(u({},Er),{headers:wr,parseAs:"auto",querySerializer:Dr}),t),er=(t={})=>{let e=Ye(Oe(),t),r=()=>u({},e),o=n=>(e=Ye(e,n),r()),a=Ur(),l=n=>h(void 0,null,function*(){var Ae,ke,xe;let p=d(u(u({},e),n),{fetch:(ke=(Ae=n.fetch)!=null?Ae:e.fetch)!=null?ke:globalThis.fetch,headers:Ze(e.headers,n.headers)});p.security&&(yield kr(d(u({},p),{security:p.security}))),p.body&&p.bodySerializer&&(p.body=p.bodySerializer(p.body)),(p.body===void 0||p.body==="")&&p.headers.delete("Content-Type");let c=Ke(p),y=u({redirect:"follow"},p),g=new Request(c,y);for(let C of a.request._fns)g=yield C(g,p);let v=p.fetch,m=yield v(g);for(let C of a.response._fns)m=yield C(m,g,p);let _={request:g,response:m};if(m.ok){if(m.status===204||m.headers.get("Content-Length")==="0")return u({data:{}},_);let C=(xe=p.parseAs==="auto"?Ar(m.headers.get("Content-Type")):p.parseAs)!=null?xe:"json";if(C==="stream")return u({data:m.body},_);let q=yield m[C]();return C==="json"&&(p.responseValidator&&(yield p.responseValidator(q)),p.responseTransformer&&(q=yield p.responseTransformer(q))),u({data:q},_)}let B=yield m.text();try{B=JSON.parse(B)}catch(C){}let U=B;for(let C of a.error._fns)U=yield C(B,m,g,p);if(U=U||{},p.throwOnError)throw U;return u({error:U},_)});return{buildUrl:Ke,connect:n=>l(d(u({},n),{method:"CONNECT"})),delete:n=>l(d(u({},n),{method:"DELETE"})),get:n=>l(d(u({},n),{method:"GET"})),getConfig:r,head:n=>l(d(u({},n),{method:"HEAD"})),interceptors:a,options:n=>l(d(u({},n),{method:"OPTIONS"})),patch:n=>l(d(u({},n),{method:"PATCH"})),post:n=>l(d(u({},n),{method:"POST"})),put:n=>l(d(u({},n),{method:"PUT"})),request:l,setConfig:o,trace:n=>l(d(u({},n),{method:"TRACE"}))}};var b=er(Oe({baseUrl:"https://api.matchi.com/v1"}));var j={};Y(j,{BookingSchema:()=>Gr,CreateBookingSchema:()=>_r,FacilityOfferConditionActivitiesSchema:()=>Fr,FacilityOfferConditionCourtsSchema:()=>Nr,FacilityOfferConditionDateSchema:()=>Lr,FacilityOfferConditionHoursinadvanceSchema:()=>zr,FacilityOfferConditionSchema:()=>qr,FacilityOfferConditionTimeSchema:()=>jr,FacilityOfferConditionWeekdaysSchema:()=>Mr,FacilityOfferListSchema:()=>$r,FacilityOfferOrderSchema:()=>Hr,FacilityOfferSchema:()=>Br,FacilityPunchCardDataSchema:()=>Vr,FacilityValueCardDataSchema:()=>Wr,GuestSchema:()=>Kr,PlayerSchema:()=>Yr,UpdateBookingSchema:()=>Qr,pkgOpenapiSharedCursorPaginatedResultSetSchema:()=>Jr,pkgOpenapiSharedErrorSchema:()=>Xr,pkgOpenapiSharedErrorsSchema:()=>Zr,pkgOpenapiSharedOffsetPaginatedResultSetSchema:()=>et,pkgOpenapiSharedProblemDetailsSchema:()=>rt});var Gr={properties:{booker:{format:"uuid",type:"string"},created_at:{format:"date-time",type:"string"},created_by:{type:"string"},end_time:{format:"date-time",type:"string"},id:{format:"uuid",type:"string"},location:{type:"string"},participants:{properties:{guests:{items:{$ref:"#/components/schemas/Guest"},type:"array"},players:{items:{$ref:"#/components/schemas/Player"},type:"array"}},required:["guests","players"],type:"object"},payment_reference:{type:"string"},start_time:{format:"date-time",type:"string"},updated_at:{format:"date-time",type:"string"},updated_by:{type:"string"}},required:["id","booker","location","start_time","end_time","created_at","updated_at","participants","payment_reference","created_by","updated_by"],type:"object"},_r={properties:{booker:{format:"uuid",type:"string"},created_by:{type:"string"},end_time:{format:"date-time",type:"string"},location:{type:"string"},participants:{properties:{guests:{items:{$ref:"#/components/schemas/Guest"},type:"array"},players:{items:{$ref:"#/components/schemas/Player"},type:"array"}},type:"object"},payment_reference:{type:"string"},start_time:{format:"date-time",type:"string"}},required:["booker","location","start_time","end_time","participants","payment_reference"],type:"object"},Br={properties:{data:{oneOf:[{$ref:"#/components/schemas/FacilityPunchCardData"},{$ref:"#/components/schemas/FacilityValueCardData"}]},type:{enum:["FACILITY_PUNCH_CARD","FACILITY_VALUE_CARD"],type:"string"}},required:["type","data"],type:"object"},qr={oneOf:[{$ref:"#/components/schemas/FacilityOfferConditionWeekdays"},{$ref:"#/components/schemas/FacilityOfferConditionCourts"},{$ref:"#/components/schemas/FacilityOfferConditionDate"},{$ref:"#/components/schemas/FacilityOfferConditionTime"},{$ref:"#/components/schemas/FacilityOfferConditionHoursinadvance"},{$ref:"#/components/schemas/FacilityOfferConditionActivities"}],properties:{type:{enum:["WEEKDAYS","COURTS","DATE","TIME","HOURSINADVANCE","ACTIVITIES"],type:"string"}},required:["type"],type:"object"},Fr={properties:{activities:{items:{properties:{id:{type:"integer"},name:{type:"string"},type:{nullable:!0,type:"string"}},required:["id","name","type"],type:"object"},type:"array"},all_activities:{type:"boolean"},not_valid_for_activities:{type:"boolean"}},required:["not_valid_for_activities","all_activities","activities"],type:"object"},Nr={properties:{courts:{items:{properties:{id:{type:"integer"},name:{type:"string"}},required:["id","name"],type:"object"},type:"array"}},required:["courts"],type:"object"},Lr={properties:{end_date:{format:"date",type:"string"},start_date:{format:"date",type:"string"}},required:["start_date","end_date"],type:"object"},zr={properties:{nr_of_hours:{type:"integer"}},required:["nr_of_hours"],type:"object"},jr={properties:{end_time:{format:"time",type:"string"},start_time:{format:"time",type:"string"}},required:["start_time","end_time"],type:"object"},Mr={properties:{weekdays:{items:{description:"Interger representation of weekday. 1 (Monday), 7 (Sunday).",type:"integer"},type:"array"}},required:["weekdays"],type:"object"},$r={properties:{data:{items:{$ref:"#/components/schemas/FacilityOffer"},type:"array"},meta:{$ref:"#/components/schemas/pkgOpenapiSharedCursorPaginatedResultSet"}},required:["data","meta"],type:"object"},Hr={properties:{checkout_url:{description:"The URL to the checkout page for the facility offer order",example:"https://checkout.matchi.com/pay/1b44a93b24a3413dadsee96e1bc7a4350ecac",format:"uri",type:"string"},id:{type:"string"}},required:["id","checkout_url"],type:"object"},Vr={properties:{conditions:{items:{$ref:"#/components/schemas/FacilityOfferCondition"},type:"array"},description:{nullable:!0,type:"string"},expire_date:{format:"date-time",type:"string"},facility_id:{type:"integer"},facility_receive_membership_requests:{type:"boolean"},max_duration:{type:"integer"},members_only:{type:"boolean"},name:{type:"string"},nr_of_bookings_in_period:{nullable:!0,type:"integer"},nr_of_days_valid:{nullable:!0,type:"integer"},nr_of_tickets:{type:"integer"},offer_id:{type:"integer"},price:{type:"string"},unlimited:{type:"boolean"},user_has_active_membership:{type:"boolean"}},required:["offer_id","facility_id","name","description","price","unlimited","max_duration","nr_of_days_valid","nr_of_tickets","members_only","user_has_active_membership","facility_receive_membership_requests","expire_date","conditions","nr_of_bookings_in_period"],type:"object"},Wr={properties:{amount:{type:"string"},conditions:{items:{$ref:"#/components/schemas/FacilityOfferCondition"},type:"array"},description:{nullable:!0,type:"string"},expire_date:{format:"date-time",type:"string"},facility_id:{type:"integer"},facility_receive_membership_requests:{type:"boolean"},members_only:{type:"boolean"},name:{type:"string"},nr_of_days_valid:{nullable:!0,type:"integer"},offer_id:{type:"integer"},price:{type:"string"},user_has_active_membership:{type:"boolean"}},required:["offer_id","facility_id","name","description","price","nr_of_days_valid","amount","members_only","user_has_active_membership","facility_receive_membership_requests","expire_date","conditions"],type:"object"},Kr={properties:{email:{type:"string"}},required:["email"],type:"object"},Yr={properties:{email:{type:"string"},id:{format:"uuid",type:"string"}},required:["id","email"],type:"object"},Qr={properties:{booker:{format:"uuid",type:"string"},end_time:{format:"date-time",type:"string"},location:{type:"string"},participants:{properties:{guests:{items:{$ref:"#/components/schemas/Guest"},type:"array"},players:{items:{$ref:"#/components/schemas/Player"},type:"array"}},type:"object"},payment_reference:{type:"string"},start_time:{format:"date-time",type:"string"}},required:["booker","location","start_time","end_time","participants","payment_reference"],type:"object"},Jr={description:"Metadata about the cursor based pagination for the result. This information is coupled with the CursorParam and CursorLimitParam. Intended to be used as the `meta` field in a list response, next to an `items` array field containing the data.\n",properties:{current_cursor:{description:"Cursor used to retrieve the current page of results.",type:"string"},more_results:{description:"Indicates if there are more results available.",type:"boolean"},next_cursor:{description:"Cursor to retrieve the next page of results.",type:"string"}},required:["current_cursor","more_results"],type:"object"},Xr={properties:{message:{description:"The error message",type:"string"}},type:"object"},Zr={description:"An array of error details to accompany a problem details response.",items:{$ref:"#/components/schemas/pkgOpenapiSharedError"},maxItems:1e3,type:"array"},et={description:"Metadata about the offset based pagination for the result. This information is coupled with the OffsetParam and OffsetLimitParam. Intended to be used as the `meta` field in a list response, next to an `items` array field containing the data.\n",properties:{limit:{type:"integer"},more_results:{type:"boolean"},offset:{type:"integer"}},required:["offset","limit","more_results"],type:"object"},rt={properties:{detail:{description:"A human-readable explanation specific to this occurrence of the problem.",maxLength:4096,type:"string"},errors:{$ref:"#/components/schemas/pkgOpenapiSharedErrors"},instance:{description:"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.",maxLength:1024,type:"string"},status:{description:"The HTTP status code generated by the origin server for this occurrence of the problem.",format:"int32",maximum:599,minimum:100,type:"integer"},title:{description:"A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization.",maxLength:1024,type:"string"},type:{description:"A URI reference that identifies the problem type.",format:"uri",maxLength:1024,type:"string"}},required:["title"],type:"object"};var M=t=>{var e;return((e=t==null?void 0:t.client)!=null?e:b).get(u({url:"/bookings"},t))},$=t=>{var e;return((e=t.client)!=null?e:b).post(d(u({url:"/bookings"},t),{headers:u({"Content-Type":"application/json"},t==null?void 0:t.headers)}))},Se=t=>{var e;return((e=t.client)!=null?e:b).delete(u({url:"/bookings/{bookingId}"},t))},Pe=t=>{var e;return((e=t.client)!=null?e:b).get(u({url:"/bookings/{bookingId}"},t))},ve=t=>{var e;return((e=t.client)!=null?e:b).put(d(u({url:"/bookings/{bookingId}"},t),{headers:u({"Content-Type":"application/json"},t==null?void 0:t.headers)}))},H=t=>{var e;return((e=t.client)!=null?e:b).get(u({url:"/facilities/{facility_id}/offers"},t))},V=t=>{var e;return((e=t.client)!=null?e:b).post(u({url:"/facilities/{facility_id}/offers/{offer_id}"},t))};var W={};Y(W,{addBookingMutation:()=>st,addBookingOptions:()=>it,addBookingQueryKey:()=>ir,createFacilityOfferOrderMutation:()=>dt,createFacilityOfferOrderOptions:()=>ct,createFacilityOfferOrderQueryKey:()=>lr,deleteBookingMutation:()=>at,findBookingByIdOptions:()=>nt,findBookingByIdQueryKey:()=>sr,findBookingsInfiniteOptions:()=>ot,findBookingsInfiniteQueryKey:()=>or,findBookingsOptions:()=>tt,findBookingsQueryKey:()=>rr,listFacilityOffersInfiniteOptions:()=>ut,listFacilityOffersInfiniteQueryKey:()=>nr,listFacilityOffersOptions:()=>pt,listFacilityOffersQueryKey:()=>ar,updateBookingMutation:()=>lt});var A=(t,e,r)=>{var a;let o={_id:t,baseUrl:((a=e==null?void 0:e.client)!=null?a:b).getConfig().baseUrl};return r&&(o._infinite=r),e!=null&&e.body&&(o.body=e.body),e!=null&&e.headers&&(o.headers=e.headers),e!=null&&e.path&&(o.path=e.path),e!=null&&e.query&&(o.query=e.query),[o]},rr=t=>A("findBookings",t),tt=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:a}=yield M(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return a}),queryKey:rr(t)}),tr=(t,e)=>{let r=t[0];return e.body&&(r.body=u(u({},t[0].body),e.body)),e.headers&&(r.headers=u(u({},t[0].headers),e.headers)),e.path&&(r.path=u(u({},t[0].path),e.path)),e.query&&(r.query=u(u({},t[0].query),e.query)),r},or=t=>A("findBookings",t,!0),ot=t=>({queryFn:a=>h(void 0,[a],function*({pageParam:e,queryKey:r,signal:o}){let n=tr(r,typeof e=="object"?e:{query:{offset:e}}),{data:p}=yield M(d(u(u({},t),n),{signal:o,throwOnError:!0}));return p}),queryKey:or(t)}),ir=t=>A("addBooking",t),it=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:a}=yield $(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return a}),queryKey:ir(t)}),st=t=>({mutationFn:r=>h(void 0,null,function*(){let{data:o}=yield $(d(u(u({},t),r),{throwOnError:!0}));return o})}),at=t=>({mutationFn:r=>h(void 0,null,function*(){let{data:o}=yield Se(d(u(u({},t),r),{throwOnError:!0}));return o})}),sr=t=>A("findBookingById",t),nt=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:a}=yield Pe(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return a}),queryKey:sr(t)}),lt=t=>({mutationFn:r=>h(void 0,null,function*(){let{data:o}=yield ve(d(u(u({},t),r),{throwOnError:!0}));return o})}),ar=t=>A("listFacilityOffers",t),pt=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:a}=yield H(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return a}),queryKey:ar(t)}),nr=t=>A("listFacilityOffers",t,!0),ut=t=>({queryFn:a=>h(void 0,[a],function*({pageParam:e,queryKey:r,signal:o}){let n=tr(r,typeof e=="object"?e:{query:{cursor:e}}),{data:p}=yield H(d(u(u({},t),n),{signal:o,throwOnError:!0}));return p}),queryKey:nr(t)}),lr=t=>A("createFacilityOfferOrder",t),ct=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:a}=yield V(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return a}),queryKey:lr(t)}),dt=t=>({mutationFn:r=>h(void 0,null,function*(){let{data:o}=yield V(d(u(u({},t),r),{throwOnError:!0}));return o})});export{ue as ActivityServiceV1Service,ce as AnonymousService,de as ApiClientServiceV1Service,k as ApiError,me as AuthorizedService,fe as BookingServiceV1Service,N as CancelError,D as CancelablePromise,ye as CheckoutServiceV1Service,ge as CompetitionServiceV1Service,he as CorsService,be as LoyaltyServiceV1Service,Ie as MembershipServiceV1Service,i as OpenAPI,Te as PlaySessionServiceV1Service,Ce as UserServiceV1Service,qe as access,Fe as bookingRestriction,Ne as bookingSubType,Q as bookingSubscription,Le as bookingUserStatus,J as cancellationPolicy,X as chat,ze as chatTarget,je as clientType,Z as createChatResponse,Me as directionParam,$e as months,ee as notificationChatGroup,re as notificationEntity,te as pendingPayment,ie as playSessionSettings,se as playSessionUser,He as playerStatusParam,oe as playingUserResponse,Ve as userChatStatusParam,ae as userPunchCard,Re as v1};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matchi/api",
3
- "version": "0.20250423.1",
3
+ "version": "0.20250514.1",
4
4
  "main": "dist/main/index.js",
5
5
  "module": "dist/main/index.mjs",
6
6
  "devDependencies": {