@matchi/api 0.20250701.1 → 0.20250701.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main/index.d.mts +14 -0
- package/dist/main/index.d.ts +14 -0
- package/dist/main/index.js +1 -1
- package/dist/main/index.mjs +1 -1
- package/package.json +1 -1
package/dist/main/index.d.mts
CHANGED
|
@@ -2115,6 +2115,13 @@ declare class AuthorizedService {
|
|
|
2115
2115
|
* @throws ApiError
|
|
2116
2116
|
*/
|
|
2117
2117
|
static getUserGroupChat(userIds: string): CancelablePromise<chat>;
|
|
2118
|
+
/**
|
|
2119
|
+
* Get chat details
|
|
2120
|
+
* @param chatId The unique identifier for the chat
|
|
2121
|
+
* @returns chat Returns the user's chat details
|
|
2122
|
+
* @throws ApiError
|
|
2123
|
+
*/
|
|
2124
|
+
static getChatByChatId(chatId: string): CancelablePromise<chat>;
|
|
2118
2125
|
/**
|
|
2119
2126
|
* Add user to chat or change existing's user status to active
|
|
2120
2127
|
* @param chatId The unique identifier for the chat
|
|
@@ -3000,6 +3007,13 @@ declare class UserServiceV1Service {
|
|
|
3000
3007
|
* @throws ApiError
|
|
3001
3008
|
*/
|
|
3002
3009
|
static getUserGroupChat(userIds: string): CancelablePromise<chat>;
|
|
3010
|
+
/**
|
|
3011
|
+
* Get chat details
|
|
3012
|
+
* @param chatId The unique identifier for the chat
|
|
3013
|
+
* @returns chat Returns the user's chat details
|
|
3014
|
+
* @throws ApiError
|
|
3015
|
+
*/
|
|
3016
|
+
static getChatByChatId(chatId: string): CancelablePromise<chat>;
|
|
3003
3017
|
/**
|
|
3004
3018
|
* Add user to chat or change existing's user status to active
|
|
3005
3019
|
* @param chatId The unique identifier for the chat
|
package/dist/main/index.d.ts
CHANGED
|
@@ -2115,6 +2115,13 @@ declare class AuthorizedService {
|
|
|
2115
2115
|
* @throws ApiError
|
|
2116
2116
|
*/
|
|
2117
2117
|
static getUserGroupChat(userIds: string): CancelablePromise<chat>;
|
|
2118
|
+
/**
|
|
2119
|
+
* Get chat details
|
|
2120
|
+
* @param chatId The unique identifier for the chat
|
|
2121
|
+
* @returns chat Returns the user's chat details
|
|
2122
|
+
* @throws ApiError
|
|
2123
|
+
*/
|
|
2124
|
+
static getChatByChatId(chatId: string): CancelablePromise<chat>;
|
|
2118
2125
|
/**
|
|
2119
2126
|
* Add user to chat or change existing's user status to active
|
|
2120
2127
|
* @param chatId The unique identifier for the chat
|
|
@@ -3000,6 +3007,13 @@ declare class UserServiceV1Service {
|
|
|
3000
3007
|
* @throws ApiError
|
|
3001
3008
|
*/
|
|
3002
3009
|
static getUserGroupChat(userIds: string): CancelablePromise<chat>;
|
|
3010
|
+
/**
|
|
3011
|
+
* Get chat details
|
|
3012
|
+
* @param chatId The unique identifier for the chat
|
|
3013
|
+
* @returns chat Returns the user's chat details
|
|
3014
|
+
* @throws ApiError
|
|
3015
|
+
*/
|
|
3016
|
+
static getChatByChatId(chatId: string): CancelablePromise<chat>;
|
|
3003
3017
|
/**
|
|
3004
3018
|
* Add user to chat or change existing's user status to active
|
|
3005
3019
|
* @param chatId The unique identifier for the chat
|
package/dist/main/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var F=Object.defineProperty,cr=Object.defineProperties,dr=Object.getOwnPropertyDescriptor,mr=Object.getOwnPropertyDescriptors,fr=Object.getOwnPropertyNames,N=Object.getOwnPropertySymbols;var Oe=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable;var Ee=(t,e,r)=>e in t?F(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,u=(t,e)=>{for(var r in e||(e={}))Oe.call(e,r)&&Ee(t,r,e[r]);if(N)for(var r of N(e))He.call(e,r)&&Ee(t,r,e[r]);return t},d=(t,e)=>cr(t,mr(e));var Ve=(t,e)=>{var r={};for(var o in t)Oe.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&&He.call(t,o)&&(r[o]=t[o]);return r};var z=(t,e)=>{for(var r in e)F(t,r,{get:e[r],enumerable:!0})},yr=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of fr(e))!Oe.call(t,s)&&s!==r&&F(t,s,{get:()=>e[s],enumerable:!(o=dr(e,s))||o.enumerable});return t};var gr=t=>yr(F({},"__esModule",{value:!0}),t);var We=(t,e,r)=>(Ee(t,typeof e!="symbol"?e+"":e,r),r),Ke=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var f=(t,e,r)=>(Ke(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)=>(Ke(t,e,"write to private field"),o?o.call(t,r):e.set(t,r),r);var h=(t,e,r)=>new Promise((o,s)=>{var l=c=>{try{p(r.next(c))}catch(y){s(y)}},n=c=>{try{p(r.throw(c))}catch(y){s(y)}},p=c=>c.done?o(c.value):Promise.resolve(c.value).then(l,n);p((r=r.apply(t,e)).next())});var It={};z(It,{ActivityServiceV1Service:()=>re,AnonymousService:()=>te,ApiClientServiceV1Service:()=>oe,ApiError:()=>R,AuthorizedService:()=>ie,BookingServiceV1Service:()=>ae,CancelError:()=>w,CancelablePromise:()=>U,CheckoutServiceV1Service:()=>se,CompetitionServiceV1Service:()=>ne,CorsService:()=>le,LoyaltyServiceV1Service:()=>pe,MembershipServiceV1Service:()=>ue,OpenAPI:()=>i,PlaySessionServiceV1Service:()=>ce,UserServiceV1Service:()=>de,access:()=>Ce,bookingRestriction:()=>Se,bookingSubType:()=>Pe,bookingSubscription:()=>j,bookingUserStatus:()=>ve,cancellationPolicy:()=>M,chat:()=>$,chatCreation:()=>H,chatTarget:()=>Re,clientType:()=>Ae,directionParam:()=>ke,months:()=>xe,notificationChatGroup:()=>V,notificationEntity:()=>W,pendingPayment:()=>K,playSessionSettings:()=>Q,playSessionUser:()=>J,playerStatusParam:()=>Ue,playingUserResponse:()=>Y,userChatStatusParam:()=>De,userChatTargetParam:()=>we,userPunchCard:()=>X,userRelation:()=>Z,v1:()=>Te});module.exports=gr(It);var R=class extends Error{constructor(r,o,s){super(s);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}},O,C,T,P,A,G,x,U=class{constructor(e){S(this,O,void 0);S(this,C,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,O,!1),I(this,C,!1),I(this,T,!1),I(this,P,[]),I(this,A,new Promise((r,o)=>{I(this,G,r),I(this,x,o);let s=p=>{var c;f(this,O)||f(this,C)||f(this,T)||(I(this,O,!0),(c=f(this,G))==null||c.call(this,p))},l=p=>{var c;f(this,O)||f(this,C)||f(this,T)||(I(this,C,!0),(c=f(this,x))==null||c.call(this,p))},n=p=>{f(this,O)||f(this,C)||f(this,T)||f(this,P).push(p)};return Object.defineProperty(n,"isResolved",{get:()=>f(this,O)}),Object.defineProperty(n,"isRejected",{get:()=>f(this,C)}),Object.defineProperty(n,"isCancelled",{get:()=>f(this,T)}),e(s,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,O)||f(this,C)||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)}};O=new WeakMap,C=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 Ce=(r=>(r.BOOKING_DETAILS="BOOKING_DETAILS",r.PUBLIC_MATCHES="PUBLIC_MATCHES",r))(Ce||{});var Se=(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))(Se||{});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 Pe=(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))(Pe||{});var ve=(n=>(n.UNAPPROVED="UNAPPROVED",n.UNCONFIRMED="UNCONFIRMED",n.DECLINED="DECLINED",n.PARTICIPANT="PARTICIPANT",n.CO_BOOKER="CO-BOOKER",n.OWNER="OWNER",n))(ve||{});var M;(e=>{let t;(s=>(s.AVAILABILITY="AVAILABILITY",s.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 H;(e=>{let t;(l=>(l.PUBLIC="public",l.PRIVATE="private",l.PASSWORD="password"))(t=e.type||(e.type={}))})(H||(H={}));var Re=(r=>(r.PLAYSESSION="playsession",r.USERGROUP="usergroup",r))(Re||{});var Ae=(r=>(r.WIDGET="WIDGET",r.API="API",r))(Ae||{});var ke=(r=>(r.UPCOMING="UPCOMING",r.HISTORICAL="HISTORICAL",r))(ke||{});var xe=(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))(xe||{});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;(s=>(s.GROUP="group",s.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 Ue=(o=>(o.ALL="ALL",o.PENDING_APPROVAL="PENDING_APPROVAL",o.PENDING_ACTION="PENDING_ACTION",o))(Ue||{});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;(s=>(s.JOIN_APPROVAL_NONE="JOIN_APPROVAL_NONE",s.JOIN_APPROVAL_REQUIRED_FOR_ALL="JOIN_APPROVAL_REQUIRED_FOR_ALL"))(t=e.joinApproval||(e.joinApproval={}))})(Q||(Q={}));var J;(e=>{let t;(s=>(s.APPLIED="APPLIED",s.INVITED="INVITED"))(t=e.joiningMethod||(e.joiningMethod={}))})(J||(J={}));var De=(s=>(s.ALL="ALL",s.ACTIVE="ACTIVE",s.INACTIVE="INACTIVE",s.NOT_CONNECTED="NOT_CONNECTED",s))(De||{});var we=(o=>(o.ALL="ALL",o.PLAYSESSION="PLAYSESSION",o.USERGROUP="USERGROUP",o))(we||{});var X;(e=>{let t;(s=>(s.UNLIMITED="UNLIMITED",s.NUMBERED="NUMBERED"))(t=e.type||(e.type={}))})(X||(X={}));var Z;(e=>{let t;(p=>(p.FRIENDS="FRIENDS",p.OUTGOING="OUTGOING",p.INCOMING="INCOMING",p.BLOCKED="BLOCKED",p.NO_RELATION="NO_RELATION"))(t=e.status||(e.status={}))})(Z||(Z={}));var _e=t=>t!=null,_=t=>typeof t=="string",Ge=t=>_(t)&&t!=="",Be=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]),Ye=t=>t instanceof FormData,hr=t=>{try{return btoa(t)}catch(e){return Buffer.from(t).toString("base64")}},br=t=>{let e=[],r=(s,l)=>{e.push(`${encodeURIComponent(s)}=${encodeURIComponent(String(l))}`)},o=(s,l)=>{_e(l)&&(Array.isArray(l)?l.forEach(n=>{o(s,n)}):typeof l=="object"?Object.entries(l).forEach(([n,p])=>{o(`${s}[${n}]`,p)}):r(s,l))};return Object.entries(t).forEach(([s,l])=>{o(s,l)}),e.length>0?`?${e.join("&")}`:""},Ir=(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}),s=`${t.BASE}${o}`;return e.query?`${s}${br(e.query)}`:s},Tr=t=>{if(t.formData){let e=new FormData,r=(o,s)=>{_(s)||Be(s)?e.append(o,s):e.append(o,JSON.stringify(s))};return Object.entries(t.formData).filter(([o,s])=>_e(s)).forEach(([o,s])=>{Array.isArray(s)?s.forEach(l=>r(o,l)):r(o,s)}),e}},ee=(t,e)=>h(void 0,null,function*(){return typeof e=="function"?e(t):e}),Er=(t,e)=>h(void 0,null,function*(){let r=yield ee(e,t.TOKEN),o=yield ee(e,t.USERNAME),s=yield ee(e,t.PASSWORD),l=yield ee(e,t.HEADERS),n=Object.entries(u(u({Accept:"application/json"},l),e.headers)).filter(([p,c])=>_e(c)).reduce((p,[c,y])=>d(u({},p),{[c]:String(y)}),{});if(Ge(r)&&(n.Authorization=`Bearer ${r}`),Ge(o)&&Ge(s)){let p=hr(`${o}:${s}`);n.Authorization=`Basic ${p}`}return e.body&&(e.mediaType?n["Content-Type"]=e.mediaType:Be(e.body)?n["Content-Type"]=e.body.type||"application/octet-stream":_(e.body)?n["Content-Type"]="text/plain":Ye(e.body)||(n["Content-Type"]="application/json")),new Headers(n)}),Or=t=>{var e;if(t.body!==void 0)return(e=t.mediaType)!=null&&e.includes("/json")?JSON.stringify(t.body):_(t.body)||Be(t.body)||Ye(t.body)?t.body:JSON.stringify(t.body)},Cr=(t,e,r,o,s,l,n)=>h(void 0,null,function*(){let p=new AbortController,c={headers:l,body:o!=null?o:s,method:e.method,signal:p.signal};return t.WITH_CREDENTIALS&&(c.credentials=t.CREDENTIALS),n(()=>p.abort()),yield fetch(r,c)}),Sr=(t,e)=>{if(e){let r=t.headers.get(e);if(_(r))return r}},Pr=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(s=>e.toLowerCase().startsWith(s))?yield t.json():yield t.text()}catch(e){console.error(e)}}),vr=(t,e)=>{var s,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=(s=e.status)!=null?s:"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}`)}},a=(t,e)=>new U((r,o,s)=>h(void 0,null,function*(){try{let l=Ir(t,e),n=Tr(e),p=Or(e),c=yield Er(t,e);if(!s.isCancelled){let y=yield Cr(t,e,l,p,n,c,s),g=yield Pr(y),v=Sr(y,e.responseHeader),m={url:l,ok:y.ok,status:y.status,statusText:y.statusText,body:v!=null?v:g};vr(e,m),r(m.body)}}catch(l){o(l)}}));var re=class{static getAdminActivityOccasions(e,r,o,s,l,n=10){return a(i,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:o,endDate:s,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 te=class{static listActivities(e=!1,r=!1,o,s,l,n,p,c,y,g,v,m=10){return a(i,{method:"GET",url:"/activities",query:{hideFullyBooked:e,exposeOccasions:r,facilityIds:o,level:s,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 a(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,s,l){return a(i,{method:"GET",url:"/activities/{activityId}/occasions",path:{activityId:e},query:{hideFullyBooked:r,hidePastOccasions:o,startDate:s,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 a(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,s,l,n=10){return a(i,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:o,endDate:s,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 a(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,s,l,n,p,c,y=10){return a(i,{method:"GET",url:"/facilities",query:{city:e,countryCode:r,name:o,latitude:s,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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 getRelationToUser(e){return a(i,{method:"GET",url:"/users/relations/{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 oe=class{static getApiClientList(e,r=10){return a(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 a(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 a(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 a(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 a(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 getActivityOccasionForUser(e){return a(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 a(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 a(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,s,l,n,p){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:o,promoCode:s,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,s,l){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimes/prices",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,emails:s,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,s,l){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimeswithrestrictions",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,emails:s,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,s){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/cancellation-policy",path:{resourceId:e},query:{startTime:r,endTime:o,locale:s},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static createPromoCode(e){return a(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 a(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 a(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="ALL",o,s=10){return a(i,{method:"GET",url:"/users/chats",query:{userChatStatus:e,userChatTarget:r,offset:o,limit:s},errors:{400:"Illegal input for operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static createChat(e){return a(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 a(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 a(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 getUserGroupChat(e){return a(i,{method:"GET",url:"/users/chats/by-userids",query:{userIds:e},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 a(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 a(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 a(i,{method:"GET",url:"/users/chats/auth",errors:{401:"Unauthorized.",500:"General Error."}})}static getUserInfo(){return a(i,{method:"GET",url:"/users/info",errors:{500:"General Error.",503:"Service unavailable, please try again."}})}static getUsersProfile(){return a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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",s="ALL"){return a(i,{method:"GET",url:"/users/playsessions",query:{offset:e,limit:r,direction:o,playerStatus:s},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserPlaySessionsHistory(e,r=10){return a(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 a(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,s,l){return a(i,{method:"GET",url:"/users/playsessions/marketplace",query:{facilityIds:e,startDateTime:r,endDateTime:o,sportIds:s,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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 ae=class{static getAvailabilityWithPrice(e,r,o,s,l,n,p){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:o,promoCode:s,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,s,l){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimes/prices",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,emails:s,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,s,l){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimeswithrestrictions",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,emails:s,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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 ne=class{static updateCompetitionAccount(e){return a(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 le=class{static options(e){return a(i,{method:"OPTIONS",url:"/{cors+}",path:{"cors+":e},responseHeader:"Access-Control-Allow-Origin"})}};var pe=class{static createPromoCode(e){return a(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 ue=class{static createMembership(e){return a(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 a(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 ce=class{static getPlaySessionById(e){return a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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",s="ALL"){return a(i,{method:"GET",url:"/users/playsessions",query:{offset:e,limit:r,direction:o,playerStatus:s},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserPlaySessionsHistory(e,r=10){return a(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 a(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,s,l){return a(i,{method:"GET",url:"/users/playsessions/marketplace",query:{facilityIds:e,startDateTime:r,endDateTime:o,sportIds:s,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 de=class{static searchUsers(e){return a(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 a(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="ALL",o,s=10){return a(i,{method:"GET",url:"/users/chats",query:{userChatStatus:e,userChatTarget:r,offset:o,limit:s},errors:{400:"Illegal input for operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static createChat(e){return a(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 a(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 a(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 getUserGroupChat(e){return a(i,{method:"GET",url:"/users/chats/by-userids",query:{userIds:e},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 a(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 a(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 a(i,{method:"GET",url:"/users/chats/auth",errors:{401:"Unauthorized.",500:"General Error."}})}static handleChatMessage(e){return a(i,{method:"POST",url:"/cometchat/webhooks/message",body:e,mediaType:"application/json"})}static getUsersProfile(){return a(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 a(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 a(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 a(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 a(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 getRelationToUser(e){return a(i,{method:"GET",url:"/users/relations/{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 blockRelationToUser(e){return a(i,{method:"POST",url:"/users/relations/{userId}/block",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 unblockRelationToUser(e){return a(i,{method:"DELETE",url:"/users/relations/{userId}/block",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 listFriends(e,r=10){return a(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 a(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 a(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 a(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 Te={};z(Te,{addBooking:()=>ge,client:()=>b,createFacilityOfferOrder:()=>be,deleteBooking:()=>Ne,findBookingById:()=>Fe,findBookings:()=>ye,listFacilityOffers:()=>he,queries:()=>Ie,schemas:()=>fe,updateBooking:()=>ze});var Rr=(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 Ar={bodySerializer:t=>JSON.stringify(t,(e,r)=>typeof r=="bigint"?r.toString():r)};var kr=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},xr=t=>{switch(t){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},Ur=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Xe=({allowReserved:t,explode:e,name:r,style:o,value:s})=>{if(!e){let p=(t?s:s.map(c=>encodeURIComponent(c))).join(xr(o));switch(o){case"label":return`.${p}`;case"matrix":return`;${r}=${p}`;case"simple":return p;default:return`${r}=${p}`}}let l=kr(o),n=s.map(p=>o==="label"||o==="simple"?t?p:encodeURIComponent(p):me({allowReserved:t,name:r,value:p})).join(l);return o==="label"||o==="matrix"?l+n:n},me=({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)}`},Ze=({allowReserved:t,explode:e,name:r,style:o,value:s})=>{if(s instanceof Date)return`${r}=${s.toISOString()}`;if(o!=="deepObject"&&!e){let p=[];Object.entries(s).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=Ur(o),n=Object.entries(s).map(([p,c])=>me({allowReserved:t,name:o==="deepObject"?`${r}[${p}]`:p,value:c})).join(l);return o==="label"||o==="matrix"?l+n:n},Dr=/\{[^{}]+\}/g,wr=({path:t,url:e})=>{let r=e,o=e.match(Dr);if(o)for(let s of o){let l=!1,n=s.substring(1,s.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(s,Xe({explode:l,name:n,style:p,value:c}));continue}if(typeof c=="object"){r=r.replace(s,Ze({explode:l,name:n,style:p,value:c}));continue}if(p==="matrix"){r=r.replace(s,`;${me({name:n,value:c})}`);continue}let y=encodeURIComponent(p==="label"?`.${c}`:c);r=r.replace(s,y)}return r},er=({allowReserved:t,array:e,object:r}={})=>o=>{let s=[];if(o&&typeof o=="object")for(let l in o){let n=o[l];if(n!=null){if(Array.isArray(n)){s=[...s,Xe(u({allowReserved:t,explode:!0,name:l,style:"form",value:n},e))];continue}if(typeof n=="object"){s=[...s,Ze(u({allowReserved:t,explode:!0,name:l,style:"deepObject",value:n},r))];continue}s=[...s,me({allowReserved:t,name:l,value:n})]}}return s.join("&")},Gr=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"}},_r=r=>h(void 0,null,function*(){var o=r,{security:t}=o,e=Ve(o,["security"]);var s;for(let l of t){let n=yield Rr(l,e.auth);if(!n)continue;let p=(s=l.name)!=null?s:"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}}),Qe=t=>Br({baseUrl:t.baseUrl,path:t.path,query:t.query,querySerializer:typeof t.querySerializer=="function"?t.querySerializer:er(t.querySerializer),url:t.url}),Br=({baseUrl:t,path:e,query:r,querySerializer:o,url:s})=>{let l=s.startsWith("/")?s:`/${s}`,n=(t!=null?t:"")+l;e&&(n=wr({path:e,url:n}));let p=r?o(r):"";return p.startsWith("?")&&(p=p.substring(1)),p&&(n+=`?${p}`),n},Je=(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=rr(t.headers,e.headers),r},rr=(...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[s,l]of o)if(l===null)e.delete(s);else if(Array.isArray(l))for(let n of l)e.append(s,n);else l!==void 0&&e.set(s,typeof l=="object"?JSON.stringify(l):l)}return e},qe=class{constructor(){We(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]}},qr=()=>({error:new qe,request:new qe,response:new qe}),Lr=er({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),Nr={"Content-Type":"application/json"},Le=(t={})=>u(d(u({},Ar),{headers:Nr,parseAs:"auto",querySerializer:Lr}),t),tr=(t={})=>{let e=Je(Le(),t),r=()=>u({},e),o=n=>(e=Je(e,n),r()),s=qr(),l=n=>h(void 0,null,function*(){var je,Me,$e;let p=d(u(u({},e),n),{fetch:(Me=(je=n.fetch)!=null?je:e.fetch)!=null?Me:globalThis.fetch,headers:rr(e.headers,n.headers)});p.security&&(yield _r(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=Qe(p),y=u({redirect:"follow"},p),g=new Request(c,y);for(let E of s.request._fns)g=yield E(g,p);let v=p.fetch,m=yield v(g);for(let E of s.response._fns)m=yield E(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 E=($e=p.parseAs==="auto"?Gr(m.headers.get("Content-Type")):p.parseAs)!=null?$e:"json";if(E==="stream")return u({data:m.body},B);let L=yield m[E]();return E==="json"&&(p.responseValidator&&(yield p.responseValidator(L)),p.responseTransformer&&(L=yield p.responseTransformer(L))),u({data:L},B)}let q=yield m.text();try{q=JSON.parse(q)}catch(E){}let D=q;for(let E of s.error._fns)D=yield E(q,m,g,p);if(D=D||{},p.throwOnError)throw D;return u({error:D},B)});return{buildUrl:Qe,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:s,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=tr(Le({baseUrl:"https://api.matchi.com/v1"}));var fe={};z(fe,{BookingSchema:()=>Fr,CreateBookingSchema:()=>zr,FacilityOfferConditionActivitiesSchema:()=>$r,FacilityOfferConditionCourtsSchema:()=>Hr,FacilityOfferConditionDateSchema:()=>Vr,FacilityOfferConditionHoursinadvanceSchema:()=>Wr,FacilityOfferConditionSchema:()=>Mr,FacilityOfferConditionTimeSchema:()=>Kr,FacilityOfferConditionWeekdaysSchema:()=>Yr,FacilityOfferListSchema:()=>Qr,FacilityOfferOrderSchema:()=>Jr,FacilityOfferSchema:()=>jr,FacilityPunchCardDataSchema:()=>Xr,FacilityValueCardDataSchema:()=>Zr,GuestSchema:()=>et,PlayerSchema:()=>rt,UpdateBookingSchema:()=>tt,pkgOpenapiSharedCursorPaginatedResultSetSchema:()=>ot,pkgOpenapiSharedErrorSchema:()=>it,pkgOpenapiSharedErrorsSchema:()=>at,pkgOpenapiSharedOffsetPaginatedResultSetSchema:()=>st,pkgOpenapiSharedProblemDetailsSchema:()=>nt});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"},zr={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"},jr={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"},Mr={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"},$r={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"},Hr={properties:{courts:{items:{properties:{id:{type:"integer"},name:{type:"string"}},required:["id","name"],type:"object"},type:"array"}},required:["courts"],type:"object"},Vr={properties:{end_date:{format:"date",type:"string"},start_date:{format:"date",type:"string"}},required:["start_date","end_date"],type:"object"},Wr={properties:{nr_of_hours:{type:"integer"}},required:["nr_of_hours"],type:"object"},Kr={properties:{end_time:{format:"time",type:"string"},start_time:{format:"time",type:"string"}},required:["start_time","end_time"],type:"object"},Yr={properties:{weekdays:{items:{description:"Interger representation of weekday. 1 (Monday), 7 (Sunday).",type:"integer"},type:"array"}},required:["weekdays"],type:"object"},Qr={properties:{data:{items:{$ref:"#/components/schemas/FacilityOffer"},type:"array"},meta:{$ref:"#/components/schemas/pkgOpenapiSharedCursorPaginatedResultSet"}},required:["data","meta"],type:"object"},Jr={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"},Xr={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"},Zr={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"},et={properties:{email:{type:"string"}},required:["email"],type:"object"},rt={properties:{email:{type:"string"},id:{format:"uuid",type:"string"}},required:["id","email"],type:"object"},tt={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"},ot={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"},it={properties:{message:{description:"The error message",type:"string"}},type:"object"},at={description:"An array of error details to accompany a problem details response.",items:{$ref:"#/components/schemas/pkgOpenapiSharedError"},maxItems:1e3,type:"array"},st={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"},nt={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 ye=t=>{var e;return((e=t==null?void 0:t.client)!=null?e:b).get(u({url:"/bookings"},t))},ge=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)}))},Ne=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))},ze=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)}))},he=t=>{var e;return((e=t.client)!=null?e:b).get(u({url:"/facilities/{facility_id}/offers"},t))},be=t=>{var e;return((e=t.client)!=null?e:b).post(u({url:"/facilities/{facility_id}/offers/{offer_id}"},t))};var Ie={};z(Ie,{addBookingMutation:()=>ct,addBookingOptions:()=>ut,addBookingQueryKey:()=>sr,createFacilityOfferOrderMutation:()=>bt,createFacilityOfferOrderOptions:()=>ht,createFacilityOfferOrderQueryKey:()=>ur,deleteBookingMutation:()=>dt,findBookingByIdOptions:()=>mt,findBookingByIdQueryKey:()=>nr,findBookingsInfiniteOptions:()=>pt,findBookingsInfiniteQueryKey:()=>ar,findBookingsOptions:()=>lt,findBookingsQueryKey:()=>or,listFacilityOffersInfiniteOptions:()=>gt,listFacilityOffersInfiniteQueryKey:()=>pr,listFacilityOffersOptions:()=>yt,listFacilityOffersQueryKey:()=>lr,updateBookingMutation:()=>ft});var k=(t,e,r)=>{var s;let o={_id:t,baseUrl:((s=e==null?void 0:e.client)!=null?s: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]},or=t=>k("findBookings",t),lt=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:s}=yield ye(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return s}),queryKey:or(t)}),ir=(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},ar=t=>k("findBookings",t,!0),pt=t=>({queryFn:s=>h(void 0,[s],function*({pageParam:e,queryKey:r,signal:o}){let n=ir(r,typeof e=="object"?e:{query:{offset:e}}),{data:p}=yield ye(d(u(u({},t),n),{signal:o,throwOnError:!0}));return p}),queryKey:ar(t)}),sr=t=>k("addBooking",t),ut=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:s}=yield ge(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return s}),queryKey:sr(t)}),ct=t=>({mutationFn:r=>h(void 0,null,function*(){let{data:o}=yield ge(d(u(u({},t),r),{throwOnError:!0}));return o})}),dt=t=>({mutationFn:r=>h(void 0,null,function*(){let{data:o}=yield Ne(d(u(u({},t),r),{throwOnError:!0}));return o})}),nr=t=>k("findBookingById",t),mt=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:s}=yield Fe(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return s}),queryKey:nr(t)}),ft=t=>({mutationFn:r=>h(void 0,null,function*(){let{data:o}=yield ze(d(u(u({},t),r),{throwOnError:!0}));return o})}),lr=t=>k("listFacilityOffers",t),yt=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:s}=yield he(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return s}),queryKey:lr(t)}),pr=t=>k("listFacilityOffers",t,!0),gt=t=>({queryFn:s=>h(void 0,[s],function*({pageParam:e,queryKey:r,signal:o}){let n=ir(r,typeof e=="object"?e:{query:{cursor:e}}),{data:p}=yield he(d(u(u({},t),n),{signal:o,throwOnError:!0}));return p}),queryKey:pr(t)}),ur=t=>k("createFacilityOfferOrder",t),ht=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:s}=yield be(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return s}),queryKey:ur(t)}),bt=t=>({mutationFn:r=>h(void 0,null,function*(){let{data:o}=yield be(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,chatCreation,chatTarget,clientType,directionParam,months,notificationChatGroup,notificationEntity,pendingPayment,playSessionSettings,playSessionUser,playerStatusParam,playingUserResponse,userChatStatusParam,userChatTargetParam,userPunchCard,userRelation,v1});
|
|
1
|
+
"use strict";var F=Object.defineProperty,cr=Object.defineProperties,dr=Object.getOwnPropertyDescriptor,mr=Object.getOwnPropertyDescriptors,fr=Object.getOwnPropertyNames,N=Object.getOwnPropertySymbols;var Oe=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable;var Ee=(t,e,r)=>e in t?F(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,u=(t,e)=>{for(var r in e||(e={}))Oe.call(e,r)&&Ee(t,r,e[r]);if(N)for(var r of N(e))He.call(e,r)&&Ee(t,r,e[r]);return t},d=(t,e)=>cr(t,mr(e));var Ve=(t,e)=>{var r={};for(var o in t)Oe.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&&He.call(t,o)&&(r[o]=t[o]);return r};var z=(t,e)=>{for(var r in e)F(t,r,{get:e[r],enumerable:!0})},yr=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of fr(e))!Oe.call(t,s)&&s!==r&&F(t,s,{get:()=>e[s],enumerable:!(o=dr(e,s))||o.enumerable});return t};var hr=t=>yr(F({},"__esModule",{value:!0}),t);var We=(t,e,r)=>(Ee(t,typeof e!="symbol"?e+"":e,r),r),Ke=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var f=(t,e,r)=>(Ke(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)=>(Ke(t,e,"write to private field"),o?o.call(t,r):e.set(t,r),r);var g=(t,e,r)=>new Promise((o,s)=>{var l=c=>{try{p(r.next(c))}catch(y){s(y)}},n=c=>{try{p(r.throw(c))}catch(y){s(y)}},p=c=>c.done?o(c.value):Promise.resolve(c.value).then(l,n);p((r=r.apply(t,e)).next())});var It={};z(It,{ActivityServiceV1Service:()=>re,AnonymousService:()=>te,ApiClientServiceV1Service:()=>oe,ApiError:()=>R,AuthorizedService:()=>ie,BookingServiceV1Service:()=>ae,CancelError:()=>w,CancelablePromise:()=>U,CheckoutServiceV1Service:()=>se,CompetitionServiceV1Service:()=>ne,CorsService:()=>le,LoyaltyServiceV1Service:()=>pe,MembershipServiceV1Service:()=>ue,OpenAPI:()=>i,PlaySessionServiceV1Service:()=>ce,UserServiceV1Service:()=>de,access:()=>Ce,bookingRestriction:()=>Se,bookingSubType:()=>Pe,bookingSubscription:()=>j,bookingUserStatus:()=>ve,cancellationPolicy:()=>M,chat:()=>$,chatCreation:()=>H,chatTarget:()=>Re,clientType:()=>Ae,directionParam:()=>ke,months:()=>xe,notificationChatGroup:()=>V,notificationEntity:()=>W,pendingPayment:()=>K,playSessionSettings:()=>Q,playSessionUser:()=>J,playerStatusParam:()=>Ue,playingUserResponse:()=>Y,userChatStatusParam:()=>De,userChatTargetParam:()=>we,userPunchCard:()=>X,userRelation:()=>Z,v1:()=>Te});module.exports=hr(It);var R=class extends Error{constructor(r,o,s){super(s);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}},O,C,T,P,A,G,x,U=class{constructor(e){S(this,O,void 0);S(this,C,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,O,!1),I(this,C,!1),I(this,T,!1),I(this,P,[]),I(this,A,new Promise((r,o)=>{I(this,G,r),I(this,x,o);let s=p=>{var c;f(this,O)||f(this,C)||f(this,T)||(I(this,O,!0),(c=f(this,G))==null||c.call(this,p))},l=p=>{var c;f(this,O)||f(this,C)||f(this,T)||(I(this,C,!0),(c=f(this,x))==null||c.call(this,p))},n=p=>{f(this,O)||f(this,C)||f(this,T)||f(this,P).push(p)};return Object.defineProperty(n,"isResolved",{get:()=>f(this,O)}),Object.defineProperty(n,"isRejected",{get:()=>f(this,C)}),Object.defineProperty(n,"isCancelled",{get:()=>f(this,T)}),e(s,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,O)||f(this,C)||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)}};O=new WeakMap,C=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 Ce=(r=>(r.BOOKING_DETAILS="BOOKING_DETAILS",r.PUBLIC_MATCHES="PUBLIC_MATCHES",r))(Ce||{});var Se=(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))(Se||{});var j;(e=>{let t;(h=>(h.MONDAY="MONDAY",h.TUESDAY="TUESDAY",h.WEDNESDAY="WEDNESDAY",h.THURSDAY="THURSDAY",h.FRIDAY="FRIDAY",h.SATURDAY="SATURDAY",h.SUNDAY="SUNDAY",h.UNKNOWN="UNKNOWN"))(t=e.weekday||(e.weekday={}))})(j||(j={}));var Pe=(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))(Pe||{});var ve=(n=>(n.UNAPPROVED="UNAPPROVED",n.UNCONFIRMED="UNCONFIRMED",n.DECLINED="DECLINED",n.PARTICIPANT="PARTICIPANT",n.CO_BOOKER="CO-BOOKER",n.OWNER="OWNER",n))(ve||{});var M;(e=>{let t;(s=>(s.AVAILABILITY="AVAILABILITY",s.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 H;(e=>{let t;(l=>(l.PUBLIC="public",l.PRIVATE="private",l.PASSWORD="password"))(t=e.type||(e.type={}))})(H||(H={}));var Re=(r=>(r.PLAYSESSION="playsession",r.USERGROUP="usergroup",r))(Re||{});var Ae=(r=>(r.WIDGET="WIDGET",r.API="API",r))(Ae||{});var ke=(r=>(r.UPCOMING="UPCOMING",r.HISTORICAL="HISTORICAL",r))(ke||{});var xe=(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))(xe||{});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;(s=>(s.GROUP="group",s.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 Ue=(o=>(o.ALL="ALL",o.PENDING_APPROVAL="PENDING_APPROVAL",o.PENDING_ACTION="PENDING_ACTION",o))(Ue||{});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;(s=>(s.JOIN_APPROVAL_NONE="JOIN_APPROVAL_NONE",s.JOIN_APPROVAL_REQUIRED_FOR_ALL="JOIN_APPROVAL_REQUIRED_FOR_ALL"))(t=e.joinApproval||(e.joinApproval={}))})(Q||(Q={}));var J;(e=>{let t;(s=>(s.APPLIED="APPLIED",s.INVITED="INVITED"))(t=e.joiningMethod||(e.joiningMethod={}))})(J||(J={}));var De=(s=>(s.ALL="ALL",s.ACTIVE="ACTIVE",s.INACTIVE="INACTIVE",s.NOT_CONNECTED="NOT_CONNECTED",s))(De||{});var we=(o=>(o.ALL="ALL",o.PLAYSESSION="PLAYSESSION",o.USERGROUP="USERGROUP",o))(we||{});var X;(e=>{let t;(s=>(s.UNLIMITED="UNLIMITED",s.NUMBERED="NUMBERED"))(t=e.type||(e.type={}))})(X||(X={}));var Z;(e=>{let t;(p=>(p.FRIENDS="FRIENDS",p.OUTGOING="OUTGOING",p.INCOMING="INCOMING",p.BLOCKED="BLOCKED",p.NO_RELATION="NO_RELATION"))(t=e.status||(e.status={}))})(Z||(Z={}));var _e=t=>t!=null,_=t=>typeof t=="string",Ge=t=>_(t)&&t!=="",Be=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]),Ye=t=>t instanceof FormData,gr=t=>{try{return btoa(t)}catch(e){return Buffer.from(t).toString("base64")}},br=t=>{let e=[],r=(s,l)=>{e.push(`${encodeURIComponent(s)}=${encodeURIComponent(String(l))}`)},o=(s,l)=>{_e(l)&&(Array.isArray(l)?l.forEach(n=>{o(s,n)}):typeof l=="object"?Object.entries(l).forEach(([n,p])=>{o(`${s}[${n}]`,p)}):r(s,l))};return Object.entries(t).forEach(([s,l])=>{o(s,l)}),e.length>0?`?${e.join("&")}`:""},Ir=(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}),s=`${t.BASE}${o}`;return e.query?`${s}${br(e.query)}`:s},Tr=t=>{if(t.formData){let e=new FormData,r=(o,s)=>{_(s)||Be(s)?e.append(o,s):e.append(o,JSON.stringify(s))};return Object.entries(t.formData).filter(([o,s])=>_e(s)).forEach(([o,s])=>{Array.isArray(s)?s.forEach(l=>r(o,l)):r(o,s)}),e}},ee=(t,e)=>g(void 0,null,function*(){return typeof e=="function"?e(t):e}),Er=(t,e)=>g(void 0,null,function*(){let r=yield ee(e,t.TOKEN),o=yield ee(e,t.USERNAME),s=yield ee(e,t.PASSWORD),l=yield ee(e,t.HEADERS),n=Object.entries(u(u({Accept:"application/json"},l),e.headers)).filter(([p,c])=>_e(c)).reduce((p,[c,y])=>d(u({},p),{[c]:String(y)}),{});if(Ge(r)&&(n.Authorization=`Bearer ${r}`),Ge(o)&&Ge(s)){let p=gr(`${o}:${s}`);n.Authorization=`Basic ${p}`}return e.body&&(e.mediaType?n["Content-Type"]=e.mediaType:Be(e.body)?n["Content-Type"]=e.body.type||"application/octet-stream":_(e.body)?n["Content-Type"]="text/plain":Ye(e.body)||(n["Content-Type"]="application/json")),new Headers(n)}),Or=t=>{var e;if(t.body!==void 0)return(e=t.mediaType)!=null&&e.includes("/json")?JSON.stringify(t.body):_(t.body)||Be(t.body)||Ye(t.body)?t.body:JSON.stringify(t.body)},Cr=(t,e,r,o,s,l,n)=>g(void 0,null,function*(){let p=new AbortController,c={headers:l,body:o!=null?o:s,method:e.method,signal:p.signal};return t.WITH_CREDENTIALS&&(c.credentials=t.CREDENTIALS),n(()=>p.abort()),yield fetch(r,c)}),Sr=(t,e)=>{if(e){let r=t.headers.get(e);if(_(r))return r}},Pr=t=>g(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(s=>e.toLowerCase().startsWith(s))?yield t.json():yield t.text()}catch(e){console.error(e)}}),vr=(t,e)=>{var s,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=(s=e.status)!=null?s:"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}`)}},a=(t,e)=>new U((r,o,s)=>g(void 0,null,function*(){try{let l=Ir(t,e),n=Tr(e),p=Or(e),c=yield Er(t,e);if(!s.isCancelled){let y=yield Cr(t,e,l,p,n,c,s),h=yield Pr(y),v=Sr(y,e.responseHeader),m={url:l,ok:y.ok,status:y.status,statusText:y.statusText,body:v!=null?v:h};vr(e,m),r(m.body)}}catch(l){o(l)}}));var re=class{static getAdminActivityOccasions(e,r,o,s,l,n=10){return a(i,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:o,endDate:s,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 te=class{static listActivities(e=!1,r=!1,o,s,l,n,p,c,y,h,v,m=10){return a(i,{method:"GET",url:"/activities",query:{hideFullyBooked:e,exposeOccasions:r,facilityIds:o,level:s,locationSearch:l,categorySearch:n,querySearch:p,resourceTypes:c,startDate:y,endDate:h,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 a(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,s,l){return a(i,{method:"GET",url:"/activities/{activityId}/occasions",path:{activityId:e},query:{hideFullyBooked:r,hidePastOccasions:o,startDate:s,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 a(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,s,l,n=10){return a(i,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:o,endDate:s,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 a(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,s,l,n,p,c,y=10){return a(i,{method:"GET",url:"/facilities",query:{city:e,countryCode:r,name:o,latitude:s,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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 getRelationToUser(e){return a(i,{method:"GET",url:"/users/relations/{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 oe=class{static getApiClientList(e,r=10){return a(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 a(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 a(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 a(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 a(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 getActivityOccasionForUser(e){return a(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 a(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 a(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,s,l,n,p){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:o,promoCode:s,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,s,l){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimes/prices",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,emails:s,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,s,l){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimeswithrestrictions",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,emails:s,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,s){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/cancellation-policy",path:{resourceId:e},query:{startTime:r,endTime:o,locale:s},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static createPromoCode(e){return a(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 a(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 a(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="ALL",o,s=10){return a(i,{method:"GET",url:"/users/chats",query:{userChatStatus:e,userChatTarget:r,offset:o,limit:s},errors:{400:"Illegal input for operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static createChat(e){return a(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 a(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 a(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 getUserGroupChat(e){return a(i,{method:"GET",url:"/users/chats/by-userids",query:{userIds:e},errors:{400:"Illegal input for operation.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getChatByChatId(e){return a(i,{method:"GET",url:"/users/chats/by-chatid/{chatId}",path:{chatId:e},errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",500:"General Error."}})}static addUserToChat(e,r){return a(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 a(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 a(i,{method:"GET",url:"/users/chats/auth",errors:{401:"Unauthorized.",500:"General Error."}})}static getUserInfo(){return a(i,{method:"GET",url:"/users/info",errors:{500:"General Error.",503:"Service unavailable, please try again."}})}static getUsersProfile(){return a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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",s="ALL"){return a(i,{method:"GET",url:"/users/playsessions",query:{offset:e,limit:r,direction:o,playerStatus:s},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserPlaySessionsHistory(e,r=10){return a(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 a(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,s,l){return a(i,{method:"GET",url:"/users/playsessions/marketplace",query:{facilityIds:e,startDateTime:r,endDateTime:o,sportIds:s,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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 ae=class{static getAvailabilityWithPrice(e,r,o,s,l,n,p){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:o,promoCode:s,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,s,l){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimes/prices",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,emails:s,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,s,l){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimeswithrestrictions",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,emails:s,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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 ne=class{static updateCompetitionAccount(e){return a(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 le=class{static options(e){return a(i,{method:"OPTIONS",url:"/{cors+}",path:{"cors+":e},responseHeader:"Access-Control-Allow-Origin"})}};var pe=class{static createPromoCode(e){return a(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 ue=class{static createMembership(e){return a(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 a(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 ce=class{static getPlaySessionById(e){return a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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",s="ALL"){return a(i,{method:"GET",url:"/users/playsessions",query:{offset:e,limit:r,direction:o,playerStatus:s},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserPlaySessionsHistory(e,r=10){return a(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 a(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,s,l){return a(i,{method:"GET",url:"/users/playsessions/marketplace",query:{facilityIds:e,startDateTime:r,endDateTime:o,sportIds:s,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 de=class{static searchUsers(e){return a(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 a(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="ALL",o,s=10){return a(i,{method:"GET",url:"/users/chats",query:{userChatStatus:e,userChatTarget:r,offset:o,limit:s},errors:{400:"Illegal input for operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static createChat(e){return a(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 a(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 a(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 getUserGroupChat(e){return a(i,{method:"GET",url:"/users/chats/by-userids",query:{userIds:e},errors:{400:"Illegal input for operation.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getChatByChatId(e){return a(i,{method:"GET",url:"/users/chats/by-chatid/{chatId}",path:{chatId:e},errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",500:"General Error."}})}static addUserToChat(e,r){return a(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 a(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 a(i,{method:"GET",url:"/users/chats/auth",errors:{401:"Unauthorized.",500:"General Error."}})}static handleChatMessage(e){return a(i,{method:"POST",url:"/cometchat/webhooks/message",body:e,mediaType:"application/json"})}static getUsersProfile(){return a(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 a(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 a(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 a(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 a(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 getRelationToUser(e){return a(i,{method:"GET",url:"/users/relations/{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 blockRelationToUser(e){return a(i,{method:"POST",url:"/users/relations/{userId}/block",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 unblockRelationToUser(e){return a(i,{method:"DELETE",url:"/users/relations/{userId}/block",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 listFriends(e,r=10){return a(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 a(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 a(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 a(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 Te={};z(Te,{addBooking:()=>he,client:()=>b,createFacilityOfferOrder:()=>be,deleteBooking:()=>Ne,findBookingById:()=>Fe,findBookings:()=>ye,listFacilityOffers:()=>ge,queries:()=>Ie,schemas:()=>fe,updateBooking:()=>ze});var Rr=(t,e)=>g(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 Ar={bodySerializer:t=>JSON.stringify(t,(e,r)=>typeof r=="bigint"?r.toString():r)};var kr=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},xr=t=>{switch(t){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},Ur=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Xe=({allowReserved:t,explode:e,name:r,style:o,value:s})=>{if(!e){let p=(t?s:s.map(c=>encodeURIComponent(c))).join(xr(o));switch(o){case"label":return`.${p}`;case"matrix":return`;${r}=${p}`;case"simple":return p;default:return`${r}=${p}`}}let l=kr(o),n=s.map(p=>o==="label"||o==="simple"?t?p:encodeURIComponent(p):me({allowReserved:t,name:r,value:p})).join(l);return o==="label"||o==="matrix"?l+n:n},me=({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)}`},Ze=({allowReserved:t,explode:e,name:r,style:o,value:s})=>{if(s instanceof Date)return`${r}=${s.toISOString()}`;if(o!=="deepObject"&&!e){let p=[];Object.entries(s).forEach(([y,h])=>{p=[...p,y,t?h:encodeURIComponent(h)]});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=Ur(o),n=Object.entries(s).map(([p,c])=>me({allowReserved:t,name:o==="deepObject"?`${r}[${p}]`:p,value:c})).join(l);return o==="label"||o==="matrix"?l+n:n},Dr=/\{[^{}]+\}/g,wr=({path:t,url:e})=>{let r=e,o=e.match(Dr);if(o)for(let s of o){let l=!1,n=s.substring(1,s.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(s,Xe({explode:l,name:n,style:p,value:c}));continue}if(typeof c=="object"){r=r.replace(s,Ze({explode:l,name:n,style:p,value:c}));continue}if(p==="matrix"){r=r.replace(s,`;${me({name:n,value:c})}`);continue}let y=encodeURIComponent(p==="label"?`.${c}`:c);r=r.replace(s,y)}return r},er=({allowReserved:t,array:e,object:r}={})=>o=>{let s=[];if(o&&typeof o=="object")for(let l in o){let n=o[l];if(n!=null){if(Array.isArray(n)){s=[...s,Xe(u({allowReserved:t,explode:!0,name:l,style:"form",value:n},e))];continue}if(typeof n=="object"){s=[...s,Ze(u({allowReserved:t,explode:!0,name:l,style:"deepObject",value:n},r))];continue}s=[...s,me({allowReserved:t,name:l,value:n})]}}return s.join("&")},Gr=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"}},_r=r=>g(void 0,null,function*(){var o=r,{security:t}=o,e=Ve(o,["security"]);var s;for(let l of t){let n=yield Rr(l,e.auth);if(!n)continue;let p=(s=l.name)!=null?s:"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}}),Qe=t=>Br({baseUrl:t.baseUrl,path:t.path,query:t.query,querySerializer:typeof t.querySerializer=="function"?t.querySerializer:er(t.querySerializer),url:t.url}),Br=({baseUrl:t,path:e,query:r,querySerializer:o,url:s})=>{let l=s.startsWith("/")?s:`/${s}`,n=(t!=null?t:"")+l;e&&(n=wr({path:e,url:n}));let p=r?o(r):"";return p.startsWith("?")&&(p=p.substring(1)),p&&(n+=`?${p}`),n},Je=(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=rr(t.headers,e.headers),r},rr=(...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[s,l]of o)if(l===null)e.delete(s);else if(Array.isArray(l))for(let n of l)e.append(s,n);else l!==void 0&&e.set(s,typeof l=="object"?JSON.stringify(l):l)}return e},qe=class{constructor(){We(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]}},qr=()=>({error:new qe,request:new qe,response:new qe}),Lr=er({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),Nr={"Content-Type":"application/json"},Le=(t={})=>u(d(u({},Ar),{headers:Nr,parseAs:"auto",querySerializer:Lr}),t),tr=(t={})=>{let e=Je(Le(),t),r=()=>u({},e),o=n=>(e=Je(e,n),r()),s=qr(),l=n=>g(void 0,null,function*(){var je,Me,$e;let p=d(u(u({},e),n),{fetch:(Me=(je=n.fetch)!=null?je:e.fetch)!=null?Me:globalThis.fetch,headers:rr(e.headers,n.headers)});p.security&&(yield _r(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=Qe(p),y=u({redirect:"follow"},p),h=new Request(c,y);for(let E of s.request._fns)h=yield E(h,p);let v=p.fetch,m=yield v(h);for(let E of s.response._fns)m=yield E(m,h,p);let B={request:h,response:m};if(m.ok){if(m.status===204||m.headers.get("Content-Length")==="0")return u({data:{}},B);let E=($e=p.parseAs==="auto"?Gr(m.headers.get("Content-Type")):p.parseAs)!=null?$e:"json";if(E==="stream")return u({data:m.body},B);let L=yield m[E]();return E==="json"&&(p.responseValidator&&(yield p.responseValidator(L)),p.responseTransformer&&(L=yield p.responseTransformer(L))),u({data:L},B)}let q=yield m.text();try{q=JSON.parse(q)}catch(E){}let D=q;for(let E of s.error._fns)D=yield E(q,m,h,p);if(D=D||{},p.throwOnError)throw D;return u({error:D},B)});return{buildUrl:Qe,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:s,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=tr(Le({baseUrl:"https://api.matchi.com/v1"}));var fe={};z(fe,{BookingSchema:()=>Fr,CreateBookingSchema:()=>zr,FacilityOfferConditionActivitiesSchema:()=>$r,FacilityOfferConditionCourtsSchema:()=>Hr,FacilityOfferConditionDateSchema:()=>Vr,FacilityOfferConditionHoursinadvanceSchema:()=>Wr,FacilityOfferConditionSchema:()=>Mr,FacilityOfferConditionTimeSchema:()=>Kr,FacilityOfferConditionWeekdaysSchema:()=>Yr,FacilityOfferListSchema:()=>Qr,FacilityOfferOrderSchema:()=>Jr,FacilityOfferSchema:()=>jr,FacilityPunchCardDataSchema:()=>Xr,FacilityValueCardDataSchema:()=>Zr,GuestSchema:()=>et,PlayerSchema:()=>rt,UpdateBookingSchema:()=>tt,pkgOpenapiSharedCursorPaginatedResultSetSchema:()=>ot,pkgOpenapiSharedErrorSchema:()=>it,pkgOpenapiSharedErrorsSchema:()=>at,pkgOpenapiSharedOffsetPaginatedResultSetSchema:()=>st,pkgOpenapiSharedProblemDetailsSchema:()=>nt});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"},zr={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"},jr={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"},Mr={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"},$r={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"},Hr={properties:{courts:{items:{properties:{id:{type:"integer"},name:{type:"string"}},required:["id","name"],type:"object"},type:"array"}},required:["courts"],type:"object"},Vr={properties:{end_date:{format:"date",type:"string"},start_date:{format:"date",type:"string"}},required:["start_date","end_date"],type:"object"},Wr={properties:{nr_of_hours:{type:"integer"}},required:["nr_of_hours"],type:"object"},Kr={properties:{end_time:{format:"time",type:"string"},start_time:{format:"time",type:"string"}},required:["start_time","end_time"],type:"object"},Yr={properties:{weekdays:{items:{description:"Interger representation of weekday. 1 (Monday), 7 (Sunday).",type:"integer"},type:"array"}},required:["weekdays"],type:"object"},Qr={properties:{data:{items:{$ref:"#/components/schemas/FacilityOffer"},type:"array"},meta:{$ref:"#/components/schemas/pkgOpenapiSharedCursorPaginatedResultSet"}},required:["data","meta"],type:"object"},Jr={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"},Xr={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"},Zr={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"},et={properties:{email:{type:"string"}},required:["email"],type:"object"},rt={properties:{email:{type:"string"},id:{format:"uuid",type:"string"}},required:["id","email"],type:"object"},tt={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"},ot={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"},it={properties:{message:{description:"The error message",type:"string"}},type:"object"},at={description:"An array of error details to accompany a problem details response.",items:{$ref:"#/components/schemas/pkgOpenapiSharedError"},maxItems:1e3,type:"array"},st={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"},nt={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 ye=t=>{var e;return((e=t==null?void 0:t.client)!=null?e:b).get(u({url:"/bookings"},t))},he=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)}))},Ne=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))},ze=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))},be=t=>{var e;return((e=t.client)!=null?e:b).post(u({url:"/facilities/{facility_id}/offers/{offer_id}"},t))};var Ie={};z(Ie,{addBookingMutation:()=>ct,addBookingOptions:()=>ut,addBookingQueryKey:()=>sr,createFacilityOfferOrderMutation:()=>bt,createFacilityOfferOrderOptions:()=>gt,createFacilityOfferOrderQueryKey:()=>ur,deleteBookingMutation:()=>dt,findBookingByIdOptions:()=>mt,findBookingByIdQueryKey:()=>nr,findBookingsInfiniteOptions:()=>pt,findBookingsInfiniteQueryKey:()=>ar,findBookingsOptions:()=>lt,findBookingsQueryKey:()=>or,listFacilityOffersInfiniteOptions:()=>ht,listFacilityOffersInfiniteQueryKey:()=>pr,listFacilityOffersOptions:()=>yt,listFacilityOffersQueryKey:()=>lr,updateBookingMutation:()=>ft});var k=(t,e,r)=>{var s;let o={_id:t,baseUrl:((s=e==null?void 0:e.client)!=null?s: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]},or=t=>k("findBookings",t),lt=t=>({queryFn:o=>g(void 0,[o],function*({queryKey:e,signal:r}){let{data:s}=yield ye(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return s}),queryKey:or(t)}),ir=(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},ar=t=>k("findBookings",t,!0),pt=t=>({queryFn:s=>g(void 0,[s],function*({pageParam:e,queryKey:r,signal:o}){let n=ir(r,typeof e=="object"?e:{query:{offset:e}}),{data:p}=yield ye(d(u(u({},t),n),{signal:o,throwOnError:!0}));return p}),queryKey:ar(t)}),sr=t=>k("addBooking",t),ut=t=>({queryFn:o=>g(void 0,[o],function*({queryKey:e,signal:r}){let{data:s}=yield he(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return s}),queryKey:sr(t)}),ct=t=>({mutationFn:r=>g(void 0,null,function*(){let{data:o}=yield he(d(u(u({},t),r),{throwOnError:!0}));return o})}),dt=t=>({mutationFn:r=>g(void 0,null,function*(){let{data:o}=yield Ne(d(u(u({},t),r),{throwOnError:!0}));return o})}),nr=t=>k("findBookingById",t),mt=t=>({queryFn:o=>g(void 0,[o],function*({queryKey:e,signal:r}){let{data:s}=yield Fe(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return s}),queryKey:nr(t)}),ft=t=>({mutationFn:r=>g(void 0,null,function*(){let{data:o}=yield ze(d(u(u({},t),r),{throwOnError:!0}));return o})}),lr=t=>k("listFacilityOffers",t),yt=t=>({queryFn:o=>g(void 0,[o],function*({queryKey:e,signal:r}){let{data:s}=yield ge(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return s}),queryKey:lr(t)}),pr=t=>k("listFacilityOffers",t,!0),ht=t=>({queryFn:s=>g(void 0,[s],function*({pageParam:e,queryKey:r,signal:o}){let n=ir(r,typeof e=="object"?e:{query:{cursor:e}}),{data:p}=yield ge(d(u(u({},t),n),{signal:o,throwOnError:!0}));return p}),queryKey:pr(t)}),ur=t=>k("createFacilityOfferOrder",t),gt=t=>({queryFn:o=>g(void 0,[o],function*({queryKey:e,signal:r}){let{data:s}=yield be(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return s}),queryKey:ur(t)}),bt=t=>({mutationFn:r=>g(void 0,null,function*(){let{data:o}=yield be(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,chatCreation,chatTarget,clientType,directionParam,months,notificationChatGroup,notificationEntity,pendingPayment,playSessionSettings,playSessionUser,playerStatusParam,playingUserResponse,userChatStatusParam,userChatTargetParam,userPunchCard,userRelation,v1});
|
package/dist/main/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var De=Object.defineProperty,cr=Object.defineProperties;var dr=Object.getOwnPropertyDescriptors;var L=Object.getOwnPropertySymbols;var we=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable;var K=(t,e,r)=>e in t?De(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,u=(t,e)=>{for(var r in e||(e={}))we.call(e,r)&&K(t,r,e[r]);if(L)for(var r of L(e))Ge.call(e,r)&&K(t,r,e[r]);return t},d=(t,e)=>cr(t,dr(e));var _e=(t,e)=>{var r={};for(var o in t)we.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&&Ge.call(t,o)&&(r[o]=t[o]);return r};var Y=(t,e)=>{for(var r in e)De(t,r,{get:e[r],enumerable:!0})};var Be=(t,e,r)=>(K(t,typeof e!="symbol"?e+"":e,r),r),qe=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var f=(t,e,r)=>(qe(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)=>(qe(t,e,"write to private field"),o?o.call(t,r):e.set(t,r),r);var h=(t,e,r)=>new Promise((o,s)=>{var l=c=>{try{p(r.next(c))}catch(y){s(y)}},n=c=>{try{p(r.throw(c))}catch(y){s(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,s){super(s);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}},O,C,T,P,R,w,x,D=class{constructor(e){S(this,O,void 0);S(this,C,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,O,!1),I(this,C,!1),I(this,T,!1),I(this,P,[]),I(this,R,new Promise((r,o)=>{I(this,w,r),I(this,x,o);let s=p=>{var c;f(this,O)||f(this,C)||f(this,T)||(I(this,O,!0),(c=f(this,w))==null||c.call(this,p))},l=p=>{var c;f(this,O)||f(this,C)||f(this,T)||(I(this,C,!0),(c=f(this,x))==null||c.call(this,p))},n=p=>{f(this,O)||f(this,C)||f(this,T)||f(this,P).push(p)};return Object.defineProperty(n,"isResolved",{get:()=>f(this,O)}),Object.defineProperty(n,"isRejected",{get:()=>f(this,C)}),Object.defineProperty(n,"isCancelled",{get:()=>f(this,T)}),e(s,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,O)||f(this,C)||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)}};O=new WeakMap,C=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 Le=(r=>(r.BOOKING_DETAILS="BOOKING_DETAILS",r.PUBLIC_MATCHES="PUBLIC_MATCHES",r))(Le||{});var Ne=(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))(Ne||{});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 Fe=(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))(Fe||{});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;(s=>(s.AVAILABILITY="AVAILABILITY",s.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 Z;(e=>{let t;(l=>(l.PUBLIC="public",l.PRIVATE="private",l.PASSWORD="password"))(t=e.type||(e.type={}))})(Z||(Z={}));var je=(r=>(r.PLAYSESSION="playsession",r.USERGROUP="usergroup",r))(je||{});var Me=(r=>(r.WIDGET="WIDGET",r.API="API",r))(Me||{});var $e=(r=>(r.UPCOMING="UPCOMING",r.HISTORICAL="HISTORICAL",r))($e||{});var He=(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))(He||{});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;(s=>(s.GROUP="group",s.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 Ve=(o=>(o.ALL="ALL",o.PENDING_APPROVAL="PENDING_APPROVAL",o.PENDING_ACTION="PENDING_ACTION",o))(Ve||{});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;(s=>(s.JOIN_APPROVAL_NONE="JOIN_APPROVAL_NONE",s.JOIN_APPROVAL_REQUIRED_FOR_ALL="JOIN_APPROVAL_REQUIRED_FOR_ALL"))(t=e.joinApproval||(e.joinApproval={}))})(ie||(ie={}));var ae;(e=>{let t;(s=>(s.APPLIED="APPLIED",s.INVITED="INVITED"))(t=e.joiningMethod||(e.joiningMethod={}))})(ae||(ae={}));var We=(s=>(s.ALL="ALL",s.ACTIVE="ACTIVE",s.INACTIVE="INACTIVE",s.NOT_CONNECTED="NOT_CONNECTED",s))(We||{});var Ke=(o=>(o.ALL="ALL",o.PLAYSESSION="PLAYSESSION",o.USERGROUP="USERGROUP",o))(Ke||{});var se;(e=>{let t;(s=>(s.UNLIMITED="UNLIMITED",s.NUMBERED="NUMBERED"))(t=e.type||(e.type={}))})(se||(se={}));var ne;(e=>{let t;(p=>(p.FRIENDS="FRIENDS",p.OUTGOING="OUTGOING",p.INCOMING="INCOMING",p.BLOCKED="BLOCKED",p.NO_RELATION="NO_RELATION"))(t=e.status||(e.status={}))})(ne||(ne={}));var pe=t=>t!=null,G=t=>typeof t=="string",le=t=>G(t)&&t!=="",ue=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]),Ye=t=>t instanceof FormData,mr=t=>{try{return btoa(t)}catch(e){return Buffer.from(t).toString("base64")}},fr=t=>{let e=[],r=(s,l)=>{e.push(`${encodeURIComponent(s)}=${encodeURIComponent(String(l))}`)},o=(s,l)=>{pe(l)&&(Array.isArray(l)?l.forEach(n=>{o(s,n)}):typeof l=="object"?Object.entries(l).forEach(([n,p])=>{o(`${s}[${n}]`,p)}):r(s,l))};return Object.entries(t).forEach(([s,l])=>{o(s,l)}),e.length>0?`?${e.join("&")}`:""},yr=(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}),s=`${t.BASE}${o}`;return e.query?`${s}${fr(e.query)}`:s},gr=t=>{if(t.formData){let e=new FormData,r=(o,s)=>{G(s)||ue(s)?e.append(o,s):e.append(o,JSON.stringify(s))};return Object.entries(t.formData).filter(([o,s])=>pe(s)).forEach(([o,s])=>{Array.isArray(s)?s.forEach(l=>r(o,l)):r(o,s)}),e}},F=(t,e)=>h(void 0,null,function*(){return typeof e=="function"?e(t):e}),hr=(t,e)=>h(void 0,null,function*(){let r=yield F(e,t.TOKEN),o=yield F(e,t.USERNAME),s=yield F(e,t.PASSWORD),l=yield F(e,t.HEADERS),n=Object.entries(u(u({Accept:"application/json"},l),e.headers)).filter(([p,c])=>pe(c)).reduce((p,[c,y])=>d(u({},p),{[c]:String(y)}),{});if(le(r)&&(n.Authorization=`Bearer ${r}`),le(o)&&le(s)){let p=mr(`${o}:${s}`);n.Authorization=`Basic ${p}`}return e.body&&(e.mediaType?n["Content-Type"]=e.mediaType:ue(e.body)?n["Content-Type"]=e.body.type||"application/octet-stream":G(e.body)?n["Content-Type"]="text/plain":Ye(e.body)||(n["Content-Type"]="application/json")),new Headers(n)}),br=t=>{var e;if(t.body!==void 0)return(e=t.mediaType)!=null&&e.includes("/json")?JSON.stringify(t.body):G(t.body)||ue(t.body)||Ye(t.body)?t.body:JSON.stringify(t.body)},Ir=(t,e,r,o,s,l,n)=>h(void 0,null,function*(){let p=new AbortController,c={headers:l,body:o!=null?o:s,method:e.method,signal:p.signal};return t.WITH_CREDENTIALS&&(c.credentials=t.CREDENTIALS),n(()=>p.abort()),yield fetch(r,c)}),Tr=(t,e)=>{if(e){let r=t.headers.get(e);if(G(r))return r}},Er=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(s=>e.toLowerCase().startsWith(s))?yield t.json():yield t.text()}catch(e){console.error(e)}}),Or=(t,e)=>{var s,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=(s=e.status)!=null?s:"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}`)}},a=(t,e)=>new D((r,o,s)=>h(void 0,null,function*(){try{let l=yr(t,e),n=gr(e),p=br(e),c=yield hr(t,e);if(!s.isCancelled){let y=yield Ir(t,e,l,p,n,c,s),g=yield Er(y),v=Tr(y,e.responseHeader),m={url:l,ok:y.ok,status:y.status,statusText:y.statusText,body:v!=null?v:g};Or(e,m),r(m.body)}}catch(l){o(l)}}));var ce=class{static getAdminActivityOccasions(e,r,o,s,l,n=10){return a(i,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:o,endDate:s,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 de=class{static listActivities(e=!1,r=!1,o,s,l,n,p,c,y,g,v,m=10){return a(i,{method:"GET",url:"/activities",query:{hideFullyBooked:e,exposeOccasions:r,facilityIds:o,level:s,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 a(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,s,l){return a(i,{method:"GET",url:"/activities/{activityId}/occasions",path:{activityId:e},query:{hideFullyBooked:r,hidePastOccasions:o,startDate:s,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 a(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,s,l,n=10){return a(i,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:o,endDate:s,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 a(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,s,l,n,p,c,y=10){return a(i,{method:"GET",url:"/facilities",query:{city:e,countryCode:r,name:o,latitude:s,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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 getRelationToUser(e){return a(i,{method:"GET",url:"/users/relations/{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 me=class{static getApiClientList(e,r=10){return a(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 a(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 a(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 a(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 a(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 getActivityOccasionForUser(e){return a(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 a(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 a(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,s,l,n,p){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:o,promoCode:s,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,s,l){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimes/prices",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,emails:s,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,s,l){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimeswithrestrictions",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,emails:s,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,s){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/cancellation-policy",path:{resourceId:e},query:{startTime:r,endTime:o,locale:s},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static createPromoCode(e){return a(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 a(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 a(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="ALL",o,s=10){return a(i,{method:"GET",url:"/users/chats",query:{userChatStatus:e,userChatTarget:r,offset:o,limit:s},errors:{400:"Illegal input for operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static createChat(e){return a(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 a(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 a(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 getUserGroupChat(e){return a(i,{method:"GET",url:"/users/chats/by-userids",query:{userIds:e},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 a(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 a(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 a(i,{method:"GET",url:"/users/chats/auth",errors:{401:"Unauthorized.",500:"General Error."}})}static getUserInfo(){return a(i,{method:"GET",url:"/users/info",errors:{500:"General Error.",503:"Service unavailable, please try again."}})}static getUsersProfile(){return a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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",s="ALL"){return a(i,{method:"GET",url:"/users/playsessions",query:{offset:e,limit:r,direction:o,playerStatus:s},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserPlaySessionsHistory(e,r=10){return a(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 a(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,s,l){return a(i,{method:"GET",url:"/users/playsessions/marketplace",query:{facilityIds:e,startDateTime:r,endDateTime:o,sportIds:s,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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 ye=class{static getAvailabilityWithPrice(e,r,o,s,l,n,p){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:o,promoCode:s,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,s,l){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimes/prices",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,emails:s,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,s,l){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimeswithrestrictions",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,emails:s,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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 ge=class{static getCheckout(e){return a(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 a(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 he=class{static updateCompetitionAccount(e){return a(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 be=class{static options(e){return a(i,{method:"OPTIONS",url:"/{cors+}",path:{"cors+":e},responseHeader:"Access-Control-Allow-Origin"})}};var Ie=class{static createPromoCode(e){return a(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 Te=class{static createMembership(e){return a(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 a(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 Ee=class{static getPlaySessionById(e){return a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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",s="ALL"){return a(i,{method:"GET",url:"/users/playsessions",query:{offset:e,limit:r,direction:o,playerStatus:s},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserPlaySessionsHistory(e,r=10){return a(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 a(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,s,l){return a(i,{method:"GET",url:"/users/playsessions/marketplace",query:{facilityIds:e,startDateTime:r,endDateTime:o,sportIds:s,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 Oe=class{static searchUsers(e){return a(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 a(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="ALL",o,s=10){return a(i,{method:"GET",url:"/users/chats",query:{userChatStatus:e,userChatTarget:r,offset:o,limit:s},errors:{400:"Illegal input for operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static createChat(e){return a(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 a(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 a(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 getUserGroupChat(e){return a(i,{method:"GET",url:"/users/chats/by-userids",query:{userIds:e},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 a(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 a(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 a(i,{method:"GET",url:"/users/chats/auth",errors:{401:"Unauthorized.",500:"General Error."}})}static handleChatMessage(e){return a(i,{method:"POST",url:"/cometchat/webhooks/message",body:e,mediaType:"application/json"})}static getUsersProfile(){return a(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 a(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 a(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 a(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 a(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 getRelationToUser(e){return a(i,{method:"GET",url:"/users/relations/{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 blockRelationToUser(e){return a(i,{method:"POST",url:"/users/relations/{userId}/block",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 unblockRelationToUser(e){return a(i,{method:"DELETE",url:"/users/relations/{userId}/block",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 listFriends(e,r=10){return a(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 a(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 a(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 a(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 Ae={};Y(Ae,{addBooking:()=>$,client:()=>b,createFacilityOfferOrder:()=>V,deleteBooking:()=>Pe,findBookingById:()=>ve,findBookings:()=>M,listFacilityOffers:()=>H,queries:()=>W,schemas:()=>j,updateBooking:()=>Re});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 Sr={bodySerializer:t=>JSON.stringify(t,(e,r)=>typeof r=="bigint"?r.toString():r)};var Pr=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},vr=t=>{switch(t){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},Rr=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Xe=({allowReserved:t,explode:e,name:r,style:o,value:s})=>{if(!e){let p=(t?s:s.map(c=>encodeURIComponent(c))).join(vr(o));switch(o){case"label":return`.${p}`;case"matrix":return`;${r}=${p}`;case"simple":return p;default:return`${r}=${p}`}}let l=Pr(o),n=s.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)}`},Ze=({allowReserved:t,explode:e,name:r,style:o,value:s})=>{if(s instanceof Date)return`${r}=${s.toISOString()}`;if(o!=="deepObject"&&!e){let p=[];Object.entries(s).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=Rr(o),n=Object.entries(s).map(([p,c])=>z({allowReserved:t,name:o==="deepObject"?`${r}[${p}]`:p,value:c})).join(l);return o==="label"||o==="matrix"?l+n:n},Ar=/\{[^{}]+\}/g,kr=({path:t,url:e})=>{let r=e,o=e.match(Ar);if(o)for(let s of o){let l=!1,n=s.substring(1,s.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(s,Xe({explode:l,name:n,style:p,value:c}));continue}if(typeof c=="object"){r=r.replace(s,Ze({explode:l,name:n,style:p,value:c}));continue}if(p==="matrix"){r=r.replace(s,`;${z({name:n,value:c})}`);continue}let y=encodeURIComponent(p==="label"?`.${c}`:c);r=r.replace(s,y)}return r},er=({allowReserved:t,array:e,object:r}={})=>o=>{let s=[];if(o&&typeof o=="object")for(let l in o){let n=o[l];if(n!=null){if(Array.isArray(n)){s=[...s,Xe(u({allowReserved:t,explode:!0,name:l,style:"form",value:n},e))];continue}if(typeof n=="object"){s=[...s,Ze(u({allowReserved:t,explode:!0,name:l,style:"deepObject",value:n},r))];continue}s=[...s,z({allowReserved:t,name:l,value:n})]}}return s.join("&")},xr=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"}},Ur=r=>h(void 0,null,function*(){var o=r,{security:t}=o,e=_e(o,["security"]);var s;for(let l of t){let n=yield Cr(l,e.auth);if(!n)continue;let p=(s=l.name)!=null?s:"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}}),Qe=t=>Dr({baseUrl:t.baseUrl,path:t.path,query:t.query,querySerializer:typeof t.querySerializer=="function"?t.querySerializer:er(t.querySerializer),url:t.url}),Dr=({baseUrl:t,path:e,query:r,querySerializer:o,url:s})=>{let l=s.startsWith("/")?s:`/${s}`,n=(t!=null?t:"")+l;e&&(n=kr({path:e,url:n}));let p=r?o(r):"";return p.startsWith("?")&&(p=p.substring(1)),p&&(n+=`?${p}`),n},Je=(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=rr(t.headers,e.headers),r},rr=(...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[s,l]of o)if(l===null)e.delete(s);else if(Array.isArray(l))for(let n of l)e.append(s,n);else l!==void 0&&e.set(s,typeof l=="object"?JSON.stringify(l):l)}return e},Ce=class{constructor(){Be(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]}},wr=()=>({error:new Ce,request:new Ce,response:new Ce}),Gr=er({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),_r={"Content-Type":"application/json"},Se=(t={})=>u(d(u({},Sr),{headers:_r,parseAs:"auto",querySerializer:Gr}),t),tr=(t={})=>{let e=Je(Se(),t),r=()=>u({},e),o=n=>(e=Je(e,n),r()),s=wr(),l=n=>h(void 0,null,function*(){var ke,xe,Ue;let p=d(u(u({},e),n),{fetch:(xe=(ke=n.fetch)!=null?ke:e.fetch)!=null?xe:globalThis.fetch,headers:rr(e.headers,n.headers)});p.security&&(yield Ur(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=Qe(p),y=u({redirect:"follow"},p),g=new Request(c,y);for(let E of s.request._fns)g=yield E(g,p);let v=p.fetch,m=yield v(g);for(let E of s.response._fns)m=yield E(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 E=(Ue=p.parseAs==="auto"?xr(m.headers.get("Content-Type")):p.parseAs)!=null?Ue:"json";if(E==="stream")return u({data:m.body},_);let q=yield m[E]();return E==="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(E){}let U=B;for(let E of s.error._fns)U=yield E(B,m,g,p);if(U=U||{},p.throwOnError)throw U;return u({error:U},_)});return{buildUrl:Qe,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:s,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=tr(Se({baseUrl:"https://api.matchi.com/v1"}));var j={};Y(j,{BookingSchema:()=>Br,CreateBookingSchema:()=>qr,FacilityOfferConditionActivitiesSchema:()=>Fr,FacilityOfferConditionCourtsSchema:()=>zr,FacilityOfferConditionDateSchema:()=>jr,FacilityOfferConditionHoursinadvanceSchema:()=>Mr,FacilityOfferConditionSchema:()=>Nr,FacilityOfferConditionTimeSchema:()=>$r,FacilityOfferConditionWeekdaysSchema:()=>Hr,FacilityOfferListSchema:()=>Vr,FacilityOfferOrderSchema:()=>Wr,FacilityOfferSchema:()=>Lr,FacilityPunchCardDataSchema:()=>Kr,FacilityValueCardDataSchema:()=>Yr,GuestSchema:()=>Qr,PlayerSchema:()=>Jr,UpdateBookingSchema:()=>Xr,pkgOpenapiSharedCursorPaginatedResultSetSchema:()=>Zr,pkgOpenapiSharedErrorSchema:()=>et,pkgOpenapiSharedErrorsSchema:()=>rt,pkgOpenapiSharedOffsetPaginatedResultSetSchema:()=>tt,pkgOpenapiSharedProblemDetailsSchema:()=>ot});var Br={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"},qr={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"},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"},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"},zr={properties:{courts:{items:{properties:{id:{type:"integer"},name:{type:"string"}},required:["id","name"],type:"object"},type:"array"}},required:["courts"],type:"object"},jr={properties:{end_date:{format:"date",type:"string"},start_date:{format:"date",type:"string"}},required:["start_date","end_date"],type:"object"},Mr={properties:{nr_of_hours:{type:"integer"}},required:["nr_of_hours"],type:"object"},$r={properties:{end_time:{format:"time",type:"string"},start_time:{format:"time",type:"string"}},required:["start_time","end_time"],type:"object"},Hr={properties:{weekdays:{items:{description:"Interger representation of weekday. 1 (Monday), 7 (Sunday).",type:"integer"},type:"array"}},required:["weekdays"],type:"object"},Vr={properties:{data:{items:{$ref:"#/components/schemas/FacilityOffer"},type:"array"},meta:{$ref:"#/components/schemas/pkgOpenapiSharedCursorPaginatedResultSet"}},required:["data","meta"],type:"object"},Wr={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"},Kr={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"},Yr={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"},Qr={properties:{email:{type:"string"}},required:["email"],type:"object"},Jr={properties:{email:{type:"string"},id:{format:"uuid",type:"string"}},required:["id","email"],type:"object"},Xr={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"},Zr={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"},et={properties:{message:{description:"The error message",type:"string"}},type:"object"},rt={description:"An array of error details to accompany a problem details response.",items:{$ref:"#/components/schemas/pkgOpenapiSharedError"},maxItems:1e3,type:"array"},tt={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"},ot={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)}))},Pe=t=>{var e;return((e=t.client)!=null?e:b).delete(u({url:"/bookings/{bookingId}"},t))},ve=t=>{var e;return((e=t.client)!=null?e:b).get(u({url:"/bookings/{bookingId}"},t))},Re=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:()=>nt,addBookingOptions:()=>st,addBookingQueryKey:()=>sr,createFacilityOfferOrderMutation:()=>ft,createFacilityOfferOrderOptions:()=>mt,createFacilityOfferOrderQueryKey:()=>ur,deleteBookingMutation:()=>lt,findBookingByIdOptions:()=>pt,findBookingByIdQueryKey:()=>nr,findBookingsInfiniteOptions:()=>at,findBookingsInfiniteQueryKey:()=>ar,findBookingsOptions:()=>it,findBookingsQueryKey:()=>or,listFacilityOffersInfiniteOptions:()=>dt,listFacilityOffersInfiniteQueryKey:()=>pr,listFacilityOffersOptions:()=>ct,listFacilityOffersQueryKey:()=>lr,updateBookingMutation:()=>ut});var A=(t,e,r)=>{var s;let o={_id:t,baseUrl:((s=e==null?void 0:e.client)!=null?s: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]},or=t=>A("findBookings",t),it=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:s}=yield M(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return s}),queryKey:or(t)}),ir=(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},ar=t=>A("findBookings",t,!0),at=t=>({queryFn:s=>h(void 0,[s],function*({pageParam:e,queryKey:r,signal:o}){let n=ir(r,typeof e=="object"?e:{query:{offset:e}}),{data:p}=yield M(d(u(u({},t),n),{signal:o,throwOnError:!0}));return p}),queryKey:ar(t)}),sr=t=>A("addBooking",t),st=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:s}=yield $(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return s}),queryKey:sr(t)}),nt=t=>({mutationFn:r=>h(void 0,null,function*(){let{data:o}=yield $(d(u(u({},t),r),{throwOnError:!0}));return o})}),lt=t=>({mutationFn:r=>h(void 0,null,function*(){let{data:o}=yield Pe(d(u(u({},t),r),{throwOnError:!0}));return o})}),nr=t=>A("findBookingById",t),pt=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:s}=yield ve(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return s}),queryKey:nr(t)}),ut=t=>({mutationFn:r=>h(void 0,null,function*(){let{data:o}=yield Re(d(u(u({},t),r),{throwOnError:!0}));return o})}),lr=t=>A("listFacilityOffers",t),ct=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:s}=yield H(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return s}),queryKey:lr(t)}),pr=t=>A("listFacilityOffers",t,!0),dt=t=>({queryFn:s=>h(void 0,[s],function*({pageParam:e,queryKey:r,signal:o}){let n=ir(r,typeof e=="object"?e:{query:{cursor:e}}),{data:p}=yield H(d(u(u({},t),n),{signal:o,throwOnError:!0}));return p}),queryKey:pr(t)}),ur=t=>A("createFacilityOfferOrder",t),mt=t=>({queryFn:o=>h(void 0,[o],function*({queryKey:e,signal:r}){let{data:s}=yield V(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return s}),queryKey:ur(t)}),ft=t=>({mutationFn:r=>h(void 0,null,function*(){let{data:o}=yield V(d(u(u({},t),r),{throwOnError:!0}));return o})});export{ce as ActivityServiceV1Service,de as AnonymousService,me as ApiClientServiceV1Service,k as ApiError,fe as AuthorizedService,ye as BookingServiceV1Service,N as CancelError,D as CancelablePromise,ge as CheckoutServiceV1Service,he as CompetitionServiceV1Service,be as CorsService,Ie as LoyaltyServiceV1Service,Te as MembershipServiceV1Service,i as OpenAPI,Ee as PlaySessionServiceV1Service,Oe as UserServiceV1Service,Le as access,Ne as bookingRestriction,Fe as bookingSubType,Q as bookingSubscription,ze as bookingUserStatus,J as cancellationPolicy,X as chat,Z as chatCreation,je as chatTarget,Me as clientType,$e as directionParam,He as months,ee as notificationChatGroup,re as notificationEntity,te as pendingPayment,ie as playSessionSettings,ae as playSessionUser,Ve as playerStatusParam,oe as playingUserResponse,We as userChatStatusParam,Ke as userChatTargetParam,se as userPunchCard,ne as userRelation,Ae as v1};
|
|
1
|
+
var De=Object.defineProperty,cr=Object.defineProperties;var dr=Object.getOwnPropertyDescriptors;var L=Object.getOwnPropertySymbols;var we=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable;var K=(t,e,r)=>e in t?De(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,u=(t,e)=>{for(var r in e||(e={}))we.call(e,r)&&K(t,r,e[r]);if(L)for(var r of L(e))Ge.call(e,r)&&K(t,r,e[r]);return t},d=(t,e)=>cr(t,dr(e));var _e=(t,e)=>{var r={};for(var o in t)we.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&&Ge.call(t,o)&&(r[o]=t[o]);return r};var Y=(t,e)=>{for(var r in e)De(t,r,{get:e[r],enumerable:!0})};var Be=(t,e,r)=>(K(t,typeof e!="symbol"?e+"":e,r),r),qe=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var f=(t,e,r)=>(qe(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)=>(qe(t,e,"write to private field"),o?o.call(t,r):e.set(t,r),r);var g=(t,e,r)=>new Promise((o,s)=>{var l=c=>{try{p(r.next(c))}catch(y){s(y)}},n=c=>{try{p(r.throw(c))}catch(y){s(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,s){super(s);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}},O,C,T,P,R,w,x,D=class{constructor(e){S(this,O,void 0);S(this,C,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,O,!1),I(this,C,!1),I(this,T,!1),I(this,P,[]),I(this,R,new Promise((r,o)=>{I(this,w,r),I(this,x,o);let s=p=>{var c;f(this,O)||f(this,C)||f(this,T)||(I(this,O,!0),(c=f(this,w))==null||c.call(this,p))},l=p=>{var c;f(this,O)||f(this,C)||f(this,T)||(I(this,C,!0),(c=f(this,x))==null||c.call(this,p))},n=p=>{f(this,O)||f(this,C)||f(this,T)||f(this,P).push(p)};return Object.defineProperty(n,"isResolved",{get:()=>f(this,O)}),Object.defineProperty(n,"isRejected",{get:()=>f(this,C)}),Object.defineProperty(n,"isCancelled",{get:()=>f(this,T)}),e(s,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,O)||f(this,C)||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)}};O=new WeakMap,C=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 Le=(r=>(r.BOOKING_DETAILS="BOOKING_DETAILS",r.PUBLIC_MATCHES="PUBLIC_MATCHES",r))(Le||{});var Ne=(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))(Ne||{});var Q;(e=>{let t;(h=>(h.MONDAY="MONDAY",h.TUESDAY="TUESDAY",h.WEDNESDAY="WEDNESDAY",h.THURSDAY="THURSDAY",h.FRIDAY="FRIDAY",h.SATURDAY="SATURDAY",h.SUNDAY="SUNDAY",h.UNKNOWN="UNKNOWN"))(t=e.weekday||(e.weekday={}))})(Q||(Q={}));var Fe=(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))(Fe||{});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;(s=>(s.AVAILABILITY="AVAILABILITY",s.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 Z;(e=>{let t;(l=>(l.PUBLIC="public",l.PRIVATE="private",l.PASSWORD="password"))(t=e.type||(e.type={}))})(Z||(Z={}));var je=(r=>(r.PLAYSESSION="playsession",r.USERGROUP="usergroup",r))(je||{});var Me=(r=>(r.WIDGET="WIDGET",r.API="API",r))(Me||{});var $e=(r=>(r.UPCOMING="UPCOMING",r.HISTORICAL="HISTORICAL",r))($e||{});var He=(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))(He||{});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;(s=>(s.GROUP="group",s.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 Ve=(o=>(o.ALL="ALL",o.PENDING_APPROVAL="PENDING_APPROVAL",o.PENDING_ACTION="PENDING_ACTION",o))(Ve||{});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;(s=>(s.JOIN_APPROVAL_NONE="JOIN_APPROVAL_NONE",s.JOIN_APPROVAL_REQUIRED_FOR_ALL="JOIN_APPROVAL_REQUIRED_FOR_ALL"))(t=e.joinApproval||(e.joinApproval={}))})(ie||(ie={}));var ae;(e=>{let t;(s=>(s.APPLIED="APPLIED",s.INVITED="INVITED"))(t=e.joiningMethod||(e.joiningMethod={}))})(ae||(ae={}));var We=(s=>(s.ALL="ALL",s.ACTIVE="ACTIVE",s.INACTIVE="INACTIVE",s.NOT_CONNECTED="NOT_CONNECTED",s))(We||{});var Ke=(o=>(o.ALL="ALL",o.PLAYSESSION="PLAYSESSION",o.USERGROUP="USERGROUP",o))(Ke||{});var se;(e=>{let t;(s=>(s.UNLIMITED="UNLIMITED",s.NUMBERED="NUMBERED"))(t=e.type||(e.type={}))})(se||(se={}));var ne;(e=>{let t;(p=>(p.FRIENDS="FRIENDS",p.OUTGOING="OUTGOING",p.INCOMING="INCOMING",p.BLOCKED="BLOCKED",p.NO_RELATION="NO_RELATION"))(t=e.status||(e.status={}))})(ne||(ne={}));var pe=t=>t!=null,G=t=>typeof t=="string",le=t=>G(t)&&t!=="",ue=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]),Ye=t=>t instanceof FormData,mr=t=>{try{return btoa(t)}catch(e){return Buffer.from(t).toString("base64")}},fr=t=>{let e=[],r=(s,l)=>{e.push(`${encodeURIComponent(s)}=${encodeURIComponent(String(l))}`)},o=(s,l)=>{pe(l)&&(Array.isArray(l)?l.forEach(n=>{o(s,n)}):typeof l=="object"?Object.entries(l).forEach(([n,p])=>{o(`${s}[${n}]`,p)}):r(s,l))};return Object.entries(t).forEach(([s,l])=>{o(s,l)}),e.length>0?`?${e.join("&")}`:""},yr=(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}),s=`${t.BASE}${o}`;return e.query?`${s}${fr(e.query)}`:s},hr=t=>{if(t.formData){let e=new FormData,r=(o,s)=>{G(s)||ue(s)?e.append(o,s):e.append(o,JSON.stringify(s))};return Object.entries(t.formData).filter(([o,s])=>pe(s)).forEach(([o,s])=>{Array.isArray(s)?s.forEach(l=>r(o,l)):r(o,s)}),e}},F=(t,e)=>g(void 0,null,function*(){return typeof e=="function"?e(t):e}),gr=(t,e)=>g(void 0,null,function*(){let r=yield F(e,t.TOKEN),o=yield F(e,t.USERNAME),s=yield F(e,t.PASSWORD),l=yield F(e,t.HEADERS),n=Object.entries(u(u({Accept:"application/json"},l),e.headers)).filter(([p,c])=>pe(c)).reduce((p,[c,y])=>d(u({},p),{[c]:String(y)}),{});if(le(r)&&(n.Authorization=`Bearer ${r}`),le(o)&&le(s)){let p=mr(`${o}:${s}`);n.Authorization=`Basic ${p}`}return e.body&&(e.mediaType?n["Content-Type"]=e.mediaType:ue(e.body)?n["Content-Type"]=e.body.type||"application/octet-stream":G(e.body)?n["Content-Type"]="text/plain":Ye(e.body)||(n["Content-Type"]="application/json")),new Headers(n)}),br=t=>{var e;if(t.body!==void 0)return(e=t.mediaType)!=null&&e.includes("/json")?JSON.stringify(t.body):G(t.body)||ue(t.body)||Ye(t.body)?t.body:JSON.stringify(t.body)},Ir=(t,e,r,o,s,l,n)=>g(void 0,null,function*(){let p=new AbortController,c={headers:l,body:o!=null?o:s,method:e.method,signal:p.signal};return t.WITH_CREDENTIALS&&(c.credentials=t.CREDENTIALS),n(()=>p.abort()),yield fetch(r,c)}),Tr=(t,e)=>{if(e){let r=t.headers.get(e);if(G(r))return r}},Er=t=>g(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(s=>e.toLowerCase().startsWith(s))?yield t.json():yield t.text()}catch(e){console.error(e)}}),Or=(t,e)=>{var s,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=(s=e.status)!=null?s:"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}`)}},a=(t,e)=>new D((r,o,s)=>g(void 0,null,function*(){try{let l=yr(t,e),n=hr(e),p=br(e),c=yield gr(t,e);if(!s.isCancelled){let y=yield Ir(t,e,l,p,n,c,s),h=yield Er(y),v=Tr(y,e.responseHeader),m={url:l,ok:y.ok,status:y.status,statusText:y.statusText,body:v!=null?v:h};Or(e,m),r(m.body)}}catch(l){o(l)}}));var ce=class{static getAdminActivityOccasions(e,r,o,s,l,n=10){return a(i,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:o,endDate:s,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 de=class{static listActivities(e=!1,r=!1,o,s,l,n,p,c,y,h,v,m=10){return a(i,{method:"GET",url:"/activities",query:{hideFullyBooked:e,exposeOccasions:r,facilityIds:o,level:s,locationSearch:l,categorySearch:n,querySearch:p,resourceTypes:c,startDate:y,endDate:h,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 a(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,s,l){return a(i,{method:"GET",url:"/activities/{activityId}/occasions",path:{activityId:e},query:{hideFullyBooked:r,hidePastOccasions:o,startDate:s,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 a(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,s,l,n=10){return a(i,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:o,endDate:s,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 a(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,s,l,n,p,c,y=10){return a(i,{method:"GET",url:"/facilities",query:{city:e,countryCode:r,name:o,latitude:s,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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 getRelationToUser(e){return a(i,{method:"GET",url:"/users/relations/{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 me=class{static getApiClientList(e,r=10){return a(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 a(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 a(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 a(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 a(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 getActivityOccasionForUser(e){return a(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 a(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 a(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,s,l,n,p){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:o,promoCode:s,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,s,l){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimes/prices",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,emails:s,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,s,l){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimeswithrestrictions",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,emails:s,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,s){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/cancellation-policy",path:{resourceId:e},query:{startTime:r,endTime:o,locale:s},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static createPromoCode(e){return a(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 a(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 a(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="ALL",o,s=10){return a(i,{method:"GET",url:"/users/chats",query:{userChatStatus:e,userChatTarget:r,offset:o,limit:s},errors:{400:"Illegal input for operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static createChat(e){return a(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 a(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 a(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 getUserGroupChat(e){return a(i,{method:"GET",url:"/users/chats/by-userids",query:{userIds:e},errors:{400:"Illegal input for operation.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getChatByChatId(e){return a(i,{method:"GET",url:"/users/chats/by-chatid/{chatId}",path:{chatId:e},errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",500:"General Error."}})}static addUserToChat(e,r){return a(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 a(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 a(i,{method:"GET",url:"/users/chats/auth",errors:{401:"Unauthorized.",500:"General Error."}})}static getUserInfo(){return a(i,{method:"GET",url:"/users/info",errors:{500:"General Error.",503:"Service unavailable, please try again."}})}static getUsersProfile(){return a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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",s="ALL"){return a(i,{method:"GET",url:"/users/playsessions",query:{offset:e,limit:r,direction:o,playerStatus:s},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserPlaySessionsHistory(e,r=10){return a(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 a(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,s,l){return a(i,{method:"GET",url:"/users/playsessions/marketplace",query:{facilityIds:e,startDateTime:r,endDateTime:o,sportIds:s,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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 ye=class{static getAvailabilityWithPrice(e,r,o,s,l,n,p){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:o,promoCode:s,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,s,l){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimes/prices",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,emails:s,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,s,l){return a(i,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimeswithrestrictions",path:{resourceId:e},query:{startTime:r,numberOfSlots:o,emails:s,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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 he=class{static getCheckout(e){return a(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 a(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 a(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 be=class{static options(e){return a(i,{method:"OPTIONS",url:"/{cors+}",path:{"cors+":e},responseHeader:"Access-Control-Allow-Origin"})}};var Ie=class{static createPromoCode(e){return a(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 Te=class{static createMembership(e){return a(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 a(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 Ee=class{static getPlaySessionById(e){return a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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 a(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",s="ALL"){return a(i,{method:"GET",url:"/users/playsessions",query:{offset:e,limit:r,direction:o,playerStatus:s},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserPlaySessionsHistory(e,r=10){return a(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 a(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,s,l){return a(i,{method:"GET",url:"/users/playsessions/marketplace",query:{facilityIds:e,startDateTime:r,endDateTime:o,sportIds:s,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 Oe=class{static searchUsers(e){return a(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 a(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="ALL",o,s=10){return a(i,{method:"GET",url:"/users/chats",query:{userChatStatus:e,userChatTarget:r,offset:o,limit:s},errors:{400:"Illegal input for operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static createChat(e){return a(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 a(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 a(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 getUserGroupChat(e){return a(i,{method:"GET",url:"/users/chats/by-userids",query:{userIds:e},errors:{400:"Illegal input for operation.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getChatByChatId(e){return a(i,{method:"GET",url:"/users/chats/by-chatid/{chatId}",path:{chatId:e},errors:{401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",500:"General Error."}})}static addUserToChat(e,r){return a(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 a(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 a(i,{method:"GET",url:"/users/chats/auth",errors:{401:"Unauthorized.",500:"General Error."}})}static handleChatMessage(e){return a(i,{method:"POST",url:"/cometchat/webhooks/message",body:e,mediaType:"application/json"})}static getUsersProfile(){return a(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 a(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 a(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 a(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 a(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 getRelationToUser(e){return a(i,{method:"GET",url:"/users/relations/{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 blockRelationToUser(e){return a(i,{method:"POST",url:"/users/relations/{userId}/block",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 unblockRelationToUser(e){return a(i,{method:"DELETE",url:"/users/relations/{userId}/block",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 listFriends(e,r=10){return a(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 a(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 a(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 a(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 Ae={};Y(Ae,{addBooking:()=>$,client:()=>b,createFacilityOfferOrder:()=>V,deleteBooking:()=>Pe,findBookingById:()=>ve,findBookings:()=>M,listFacilityOffers:()=>H,queries:()=>W,schemas:()=>j,updateBooking:()=>Re});var Cr=(t,e)=>g(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 Sr={bodySerializer:t=>JSON.stringify(t,(e,r)=>typeof r=="bigint"?r.toString():r)};var Pr=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},vr=t=>{switch(t){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},Rr=t=>{switch(t){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Xe=({allowReserved:t,explode:e,name:r,style:o,value:s})=>{if(!e){let p=(t?s:s.map(c=>encodeURIComponent(c))).join(vr(o));switch(o){case"label":return`.${p}`;case"matrix":return`;${r}=${p}`;case"simple":return p;default:return`${r}=${p}`}}let l=Pr(o),n=s.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)}`},Ze=({allowReserved:t,explode:e,name:r,style:o,value:s})=>{if(s instanceof Date)return`${r}=${s.toISOString()}`;if(o!=="deepObject"&&!e){let p=[];Object.entries(s).forEach(([y,h])=>{p=[...p,y,t?h:encodeURIComponent(h)]});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=Rr(o),n=Object.entries(s).map(([p,c])=>z({allowReserved:t,name:o==="deepObject"?`${r}[${p}]`:p,value:c})).join(l);return o==="label"||o==="matrix"?l+n:n},Ar=/\{[^{}]+\}/g,kr=({path:t,url:e})=>{let r=e,o=e.match(Ar);if(o)for(let s of o){let l=!1,n=s.substring(1,s.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(s,Xe({explode:l,name:n,style:p,value:c}));continue}if(typeof c=="object"){r=r.replace(s,Ze({explode:l,name:n,style:p,value:c}));continue}if(p==="matrix"){r=r.replace(s,`;${z({name:n,value:c})}`);continue}let y=encodeURIComponent(p==="label"?`.${c}`:c);r=r.replace(s,y)}return r},er=({allowReserved:t,array:e,object:r}={})=>o=>{let s=[];if(o&&typeof o=="object")for(let l in o){let n=o[l];if(n!=null){if(Array.isArray(n)){s=[...s,Xe(u({allowReserved:t,explode:!0,name:l,style:"form",value:n},e))];continue}if(typeof n=="object"){s=[...s,Ze(u({allowReserved:t,explode:!0,name:l,style:"deepObject",value:n},r))];continue}s=[...s,z({allowReserved:t,name:l,value:n})]}}return s.join("&")},xr=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"}},Ur=r=>g(void 0,null,function*(){var o=r,{security:t}=o,e=_e(o,["security"]);var s;for(let l of t){let n=yield Cr(l,e.auth);if(!n)continue;let p=(s=l.name)!=null?s:"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}}),Qe=t=>Dr({baseUrl:t.baseUrl,path:t.path,query:t.query,querySerializer:typeof t.querySerializer=="function"?t.querySerializer:er(t.querySerializer),url:t.url}),Dr=({baseUrl:t,path:e,query:r,querySerializer:o,url:s})=>{let l=s.startsWith("/")?s:`/${s}`,n=(t!=null?t:"")+l;e&&(n=kr({path:e,url:n}));let p=r?o(r):"";return p.startsWith("?")&&(p=p.substring(1)),p&&(n+=`?${p}`),n},Je=(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=rr(t.headers,e.headers),r},rr=(...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[s,l]of o)if(l===null)e.delete(s);else if(Array.isArray(l))for(let n of l)e.append(s,n);else l!==void 0&&e.set(s,typeof l=="object"?JSON.stringify(l):l)}return e},Ce=class{constructor(){Be(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]}},wr=()=>({error:new Ce,request:new Ce,response:new Ce}),Gr=er({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),_r={"Content-Type":"application/json"},Se=(t={})=>u(d(u({},Sr),{headers:_r,parseAs:"auto",querySerializer:Gr}),t),tr=(t={})=>{let e=Je(Se(),t),r=()=>u({},e),o=n=>(e=Je(e,n),r()),s=wr(),l=n=>g(void 0,null,function*(){var ke,xe,Ue;let p=d(u(u({},e),n),{fetch:(xe=(ke=n.fetch)!=null?ke:e.fetch)!=null?xe:globalThis.fetch,headers:rr(e.headers,n.headers)});p.security&&(yield Ur(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=Qe(p),y=u({redirect:"follow"},p),h=new Request(c,y);for(let E of s.request._fns)h=yield E(h,p);let v=p.fetch,m=yield v(h);for(let E of s.response._fns)m=yield E(m,h,p);let _={request:h,response:m};if(m.ok){if(m.status===204||m.headers.get("Content-Length")==="0")return u({data:{}},_);let E=(Ue=p.parseAs==="auto"?xr(m.headers.get("Content-Type")):p.parseAs)!=null?Ue:"json";if(E==="stream")return u({data:m.body},_);let q=yield m[E]();return E==="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(E){}let U=B;for(let E of s.error._fns)U=yield E(B,m,h,p);if(U=U||{},p.throwOnError)throw U;return u({error:U},_)});return{buildUrl:Qe,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:s,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=tr(Se({baseUrl:"https://api.matchi.com/v1"}));var j={};Y(j,{BookingSchema:()=>Br,CreateBookingSchema:()=>qr,FacilityOfferConditionActivitiesSchema:()=>Fr,FacilityOfferConditionCourtsSchema:()=>zr,FacilityOfferConditionDateSchema:()=>jr,FacilityOfferConditionHoursinadvanceSchema:()=>Mr,FacilityOfferConditionSchema:()=>Nr,FacilityOfferConditionTimeSchema:()=>$r,FacilityOfferConditionWeekdaysSchema:()=>Hr,FacilityOfferListSchema:()=>Vr,FacilityOfferOrderSchema:()=>Wr,FacilityOfferSchema:()=>Lr,FacilityPunchCardDataSchema:()=>Kr,FacilityValueCardDataSchema:()=>Yr,GuestSchema:()=>Qr,PlayerSchema:()=>Jr,UpdateBookingSchema:()=>Xr,pkgOpenapiSharedCursorPaginatedResultSetSchema:()=>Zr,pkgOpenapiSharedErrorSchema:()=>et,pkgOpenapiSharedErrorsSchema:()=>rt,pkgOpenapiSharedOffsetPaginatedResultSetSchema:()=>tt,pkgOpenapiSharedProblemDetailsSchema:()=>ot});var Br={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"},qr={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"},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"},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"},zr={properties:{courts:{items:{properties:{id:{type:"integer"},name:{type:"string"}},required:["id","name"],type:"object"},type:"array"}},required:["courts"],type:"object"},jr={properties:{end_date:{format:"date",type:"string"},start_date:{format:"date",type:"string"}},required:["start_date","end_date"],type:"object"},Mr={properties:{nr_of_hours:{type:"integer"}},required:["nr_of_hours"],type:"object"},$r={properties:{end_time:{format:"time",type:"string"},start_time:{format:"time",type:"string"}},required:["start_time","end_time"],type:"object"},Hr={properties:{weekdays:{items:{description:"Interger representation of weekday. 1 (Monday), 7 (Sunday).",type:"integer"},type:"array"}},required:["weekdays"],type:"object"},Vr={properties:{data:{items:{$ref:"#/components/schemas/FacilityOffer"},type:"array"},meta:{$ref:"#/components/schemas/pkgOpenapiSharedCursorPaginatedResultSet"}},required:["data","meta"],type:"object"},Wr={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"},Kr={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"},Yr={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"},Qr={properties:{email:{type:"string"}},required:["email"],type:"object"},Jr={properties:{email:{type:"string"},id:{format:"uuid",type:"string"}},required:["id","email"],type:"object"},Xr={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"},Zr={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"},et={properties:{message:{description:"The error message",type:"string"}},type:"object"},rt={description:"An array of error details to accompany a problem details response.",items:{$ref:"#/components/schemas/pkgOpenapiSharedError"},maxItems:1e3,type:"array"},tt={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"},ot={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)}))},Pe=t=>{var e;return((e=t.client)!=null?e:b).delete(u({url:"/bookings/{bookingId}"},t))},ve=t=>{var e;return((e=t.client)!=null?e:b).get(u({url:"/bookings/{bookingId}"},t))},Re=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:()=>nt,addBookingOptions:()=>st,addBookingQueryKey:()=>sr,createFacilityOfferOrderMutation:()=>ft,createFacilityOfferOrderOptions:()=>mt,createFacilityOfferOrderQueryKey:()=>ur,deleteBookingMutation:()=>lt,findBookingByIdOptions:()=>pt,findBookingByIdQueryKey:()=>nr,findBookingsInfiniteOptions:()=>at,findBookingsInfiniteQueryKey:()=>ar,findBookingsOptions:()=>it,findBookingsQueryKey:()=>or,listFacilityOffersInfiniteOptions:()=>dt,listFacilityOffersInfiniteQueryKey:()=>pr,listFacilityOffersOptions:()=>ct,listFacilityOffersQueryKey:()=>lr,updateBookingMutation:()=>ut});var A=(t,e,r)=>{var s;let o={_id:t,baseUrl:((s=e==null?void 0:e.client)!=null?s: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]},or=t=>A("findBookings",t),it=t=>({queryFn:o=>g(void 0,[o],function*({queryKey:e,signal:r}){let{data:s}=yield M(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return s}),queryKey:or(t)}),ir=(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},ar=t=>A("findBookings",t,!0),at=t=>({queryFn:s=>g(void 0,[s],function*({pageParam:e,queryKey:r,signal:o}){let n=ir(r,typeof e=="object"?e:{query:{offset:e}}),{data:p}=yield M(d(u(u({},t),n),{signal:o,throwOnError:!0}));return p}),queryKey:ar(t)}),sr=t=>A("addBooking",t),st=t=>({queryFn:o=>g(void 0,[o],function*({queryKey:e,signal:r}){let{data:s}=yield $(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return s}),queryKey:sr(t)}),nt=t=>({mutationFn:r=>g(void 0,null,function*(){let{data:o}=yield $(d(u(u({},t),r),{throwOnError:!0}));return o})}),lt=t=>({mutationFn:r=>g(void 0,null,function*(){let{data:o}=yield Pe(d(u(u({},t),r),{throwOnError:!0}));return o})}),nr=t=>A("findBookingById",t),pt=t=>({queryFn:o=>g(void 0,[o],function*({queryKey:e,signal:r}){let{data:s}=yield ve(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return s}),queryKey:nr(t)}),ut=t=>({mutationFn:r=>g(void 0,null,function*(){let{data:o}=yield Re(d(u(u({},t),r),{throwOnError:!0}));return o})}),lr=t=>A("listFacilityOffers",t),ct=t=>({queryFn:o=>g(void 0,[o],function*({queryKey:e,signal:r}){let{data:s}=yield H(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return s}),queryKey:lr(t)}),pr=t=>A("listFacilityOffers",t,!0),dt=t=>({queryFn:s=>g(void 0,[s],function*({pageParam:e,queryKey:r,signal:o}){let n=ir(r,typeof e=="object"?e:{query:{cursor:e}}),{data:p}=yield H(d(u(u({},t),n),{signal:o,throwOnError:!0}));return p}),queryKey:pr(t)}),ur=t=>A("createFacilityOfferOrder",t),mt=t=>({queryFn:o=>g(void 0,[o],function*({queryKey:e,signal:r}){let{data:s}=yield V(d(u(u({},t),e[0]),{signal:r,throwOnError:!0}));return s}),queryKey:ur(t)}),ft=t=>({mutationFn:r=>g(void 0,null,function*(){let{data:o}=yield V(d(u(u({},t),r),{throwOnError:!0}));return o})});export{ce as ActivityServiceV1Service,de as AnonymousService,me as ApiClientServiceV1Service,k as ApiError,fe as AuthorizedService,ye as BookingServiceV1Service,N as CancelError,D as CancelablePromise,he as CheckoutServiceV1Service,ge as CompetitionServiceV1Service,be as CorsService,Ie as LoyaltyServiceV1Service,Te as MembershipServiceV1Service,i as OpenAPI,Ee as PlaySessionServiceV1Service,Oe as UserServiceV1Service,Le as access,Ne as bookingRestriction,Fe as bookingSubType,Q as bookingSubscription,ze as bookingUserStatus,J as cancellationPolicy,X as chat,Z as chatCreation,je as chatTarget,Me as clientType,$e as directionParam,He as months,ee as notificationChatGroup,re as notificationEntity,te as pendingPayment,ie as playSessionSettings,ae as playSessionUser,Ve as playerStatusParam,oe as playingUserResponse,We as userChatStatusParam,Ke as userChatTargetParam,se as userPunchCard,ne as userRelation,Ae as v1};
|