@matchi/api 0.20231006.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/index.d.mts +1756 -0
- package/dist/index.d.ts +1756 -0
- package/dist/index.js +1 -0
- package/dist/index.mjs +1 -0
- package/package.json +20 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var U=Object.defineProperty,ie=Object.defineProperties,ae=Object.getOwnPropertyDescriptor,se=Object.getOwnPropertyDescriptors,ne=Object.getOwnPropertyNames,X=Object.getOwnPropertySymbols;var ee=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable;var Z=(o,e,r)=>e in o?U(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,R=(o,e)=>{for(var r in e||(e={}))ee.call(e,r)&&Z(o,r,e[r]);if(X)for(var r of X(e))le.call(e,r)&&Z(o,r,e[r]);return o},re=(o,e)=>ie(o,se(e));var pe=(o,e)=>{for(var r in e)U(o,r,{get:e[r],enumerable:!0})},ue=(o,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of ne(e))!ee.call(o,s)&&s!==r&&U(o,s,{get:()=>e[s],enumerable:!(a=ae(e,s))||a.enumerable});return o};var ce=o=>ue(U({},"__esModule",{value:!0}),o);var oe=(o,e,r)=>{if(!e.has(o))throw TypeError("Cannot "+r)};var c=(o,e,r)=>(oe(o,e,"read from private field"),r?r.call(o):e.get(o)),h=(o,e,r)=>{if(e.has(o))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(o):e.set(o,r)},f=(o,e,r,a)=>(oe(o,e,"write to private field"),a?a.call(o,r):e.set(o,r),r);var P=(o,e,r)=>new Promise((a,s)=>{var n=u=>{try{p(r.next(u))}catch(d){s(d)}},l=u=>{try{p(r.throw(u))}catch(d){s(d)}},p=u=>u.done?a(u.value):Promise.resolve(u.value).then(n,l);p((r=r.apply(o,e)).next())});var Pe={};pe(Pe,{ActivityServiceV1Service:()=>D,AnonymousService:()=>q,ApiClientServiceV1Service:()=>z,ApiError:()=>T,AuthorizedService:()=>B,BookingServiceV1Service:()=>j,CancelError:()=>A,CancelablePromise:()=>E,CheckoutServiceV1Service:()=>L,CorsService:()=>N,LoyaltyServiceV1Service:()=>F,MembershipServiceV1Service:()=>_,OpenAPI:()=>t,PlaySessionServiceV1Service:()=>H,UserServiceV1Service:()=>M,bookingSubType:()=>W,cancellationPolicy:()=>O,clientType:()=>J,months:()=>V,playingUserResponse:()=>G});module.exports=ce(Pe);var T=class extends Error{constructor(r,a,s){super(s);this.name="ApiError",this.url=a.url,this.status=a.status,this.statusText=a.statusText,this.body=a.body,this.request=r}};var A=class extends Error{constructor(e){super(e),this.name="CancelError"}get isCancelled(){return!0}},b,g,y,I,v,x,C,E=class{constructor(e){h(this,b,void 0);h(this,g,void 0);h(this,y,void 0);h(this,I,void 0);h(this,v,void 0);h(this,x,void 0);h(this,C,void 0);f(this,b,!1),f(this,g,!1),f(this,y,!1),f(this,I,[]),f(this,v,new Promise((r,a)=>{f(this,x,r),f(this,C,a);let s=p=>{var u;c(this,b)||c(this,g)||c(this,y)||(f(this,b,!0),(u=c(this,x))==null||u.call(this,p))},n=p=>{var u;c(this,b)||c(this,g)||c(this,y)||(f(this,g,!0),(u=c(this,C))==null||u.call(this,p))},l=p=>{c(this,b)||c(this,g)||c(this,y)||c(this,I).push(p)};return Object.defineProperty(l,"isResolved",{get:()=>c(this,b)}),Object.defineProperty(l,"isRejected",{get:()=>c(this,g)}),Object.defineProperty(l,"isCancelled",{get:()=>c(this,y)}),e(s,n,l)}))}get[Symbol.toStringTag](){return"Cancellable Promise"}then(e,r){return c(this,v).then(e,r)}catch(e){return c(this,v).catch(e)}finally(e){return c(this,v).finally(e)}cancel(){var e;if(!(c(this,b)||c(this,g)||c(this,y))){if(f(this,y,!0),c(this,I).length)try{for(let r of c(this,I))r()}catch(r){console.warn("Cancellation threw an error",r);return}c(this,I).length=0,(e=c(this,C))==null||e.call(this,new A("Request aborted"))}}get isCancelled(){return c(this,y)}};b=new WeakMap,g=new WeakMap,y=new WeakMap,I=new WeakMap,v=new WeakMap,x=new WeakMap,C=new WeakMap;var t={BASE:"https://api.dev.matchi.com",VERSION:"1",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0};var W=(n=>(n.BOOKING="booking",n.ACTIVITY="activity",n.SPLIT="split",n.SPLIT_MAIN="split_main",n.SPLIT_INVITE="split_invite",n))(W||{});var O;(e=>{let o;(s=>(s.AVAILABILITY="AVAILABILITY",s.OCCASION="OCCASION"))(o=e.itemType||(e.itemType={}))})(O||(O={}));var J=(r=>(r.WIDGET="WIDGET",r.API="API",r))(J||{});var V=(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))(V||{});var G;(e=>{let o;(l=>(l.PAID="PAID",l.INVITED="INVITED",l.JOINED="JOINED",l.BOOKER="BOOKER"))(o=e.status||(e.status={}))})(G||(G={}));var Y=o=>o!=null,k=o=>typeof o=="string",K=o=>k(o)&&o!=="",Q=o=>typeof o=="object"&&typeof o.type=="string"&&typeof o.stream=="function"&&typeof o.arrayBuffer=="function"&&typeof o.constructor=="function"&&typeof o.constructor.name=="string"&&/^(Blob|File)$/.test(o.constructor.name)&&/^(Blob|File)$/.test(o[Symbol.toStringTag]),te=o=>o instanceof FormData,me=o=>{try{return btoa(o)}catch(e){return Buffer.from(o).toString("base64")}},de=o=>{let e=[],r=(s,n)=>{e.push(`${encodeURIComponent(s)}=${encodeURIComponent(String(n))}`)},a=(s,n)=>{Y(n)&&(Array.isArray(n)?n.forEach(l=>{a(s,l)}):typeof n=="object"?Object.entries(n).forEach(([l,p])=>{a(`${s}[${l}]`,p)}):r(s,n))};return Object.entries(o).forEach(([s,n])=>{a(s,n)}),e.length>0?`?${e.join("&")}`:""},fe=(o,e)=>{let r=o.ENCODE_PATH||encodeURI,a=e.url.replace("{api-version}",o.VERSION).replace(/{(.*?)}/g,(n,l)=>{var p;return(p=e.path)!=null&&p.hasOwnProperty(l)?r(String(e.path[l])):n}),s=`${o.BASE}${a}`;return e.query?`${s}${de(e.query)}`:s},ye=o=>{if(o.formData){let e=new FormData,r=(a,s)=>{k(s)||Q(s)?e.append(a,s):e.append(a,JSON.stringify(s))};return Object.entries(o.formData).filter(([a,s])=>Y(s)).forEach(([a,s])=>{Array.isArray(s)?s.forEach(n=>r(a,n)):r(a,s)}),e}},w=(o,e)=>P(void 0,null,function*(){return typeof e=="function"?e(o):e}),be=(o,e)=>P(void 0,null,function*(){let r=yield w(e,o.TOKEN),a=yield w(e,o.USERNAME),s=yield w(e,o.PASSWORD),n=yield w(e,o.HEADERS),l=Object.entries(R(R({Accept:"application/json"},n),e.headers)).filter(([p,u])=>Y(u)).reduce((p,[u,d])=>re(R({},p),{[u]:String(d)}),{});if(K(r)&&(l.Authorization=`Bearer ${r}`),K(a)&&K(s)){let p=me(`${a}:${s}`);l.Authorization=`Basic ${p}`}return e.body&&(e.mediaType?l["Content-Type"]=e.mediaType:Q(e.body)?l["Content-Type"]=e.body.type||"application/octet-stream":k(e.body)?l["Content-Type"]="text/plain":te(e.body)||(l["Content-Type"]="application/json")),new Headers(l)}),ge=o=>{var e;if(o.body!==void 0)return(e=o.mediaType)!=null&&e.includes("/json")?JSON.stringify(o.body):k(o.body)||Q(o.body)||te(o.body)?o.body:JSON.stringify(o.body)},he=(o,e,r,a,s,n,l)=>P(void 0,null,function*(){let p=new AbortController,u={headers:n,body:a!=null?a:s,method:e.method,signal:p.signal};return o.WITH_CREDENTIALS&&(u.credentials=o.CREDENTIALS),l(()=>p.abort()),yield fetch(r,u)}),Ie=(o,e)=>{if(e){let r=o.headers.get(e);if(k(r))return r}},Te=o=>P(void 0,null,function*(){if(o.status!==204)try{let e=o.headers.get("Content-Type");if(e)return["application/json","application/problem+json"].some(s=>e.toLowerCase().startsWith(s))?yield o.json():yield o.text()}catch(e){console.error(e)}}),ve=(o,e)=>{var s,n;let a=R({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},o.errors)[e.status];if(a)throw new T(o,e,a);if(!e.ok){let l=(s=e.status)!=null?s:"unknown",p=(n=e.statusText)!=null?n:"unknown",u=(()=>{try{return JSON.stringify(e.body,null,2)}catch(d){return}})();throw new T(o,e,`Generic Error: status: ${l}; status text: ${p}; body: ${u}`)}},i=(o,e)=>new E((r,a,s)=>P(void 0,null,function*(){try{let n=fe(o,e),l=ye(e),p=ge(e),u=yield be(o,e);if(!s.isCancelled){let d=yield he(o,e,n,p,l,u,s),$=yield Te(d),S=Ie(d,e.responseHeader),m={url:n,ok:d.ok,status:d.status,statusText:d.statusText,body:S!=null?S:$};ve(e,m),r(m.body)}}catch(n){a(n)}}));var D=class{static getAdminActivityOccasions(e,r,a,s,n,l=10){return i(t,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:a,endDate:s,offset:n,limit:l},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var q=class{static listActivities(e=!1,r=!1,a,s,n,l,p,u,d,$,S,m=10){return i(t,{method:"GET",url:"/activities",query:{hideFullyBooked:e,exposeOccasions:r,facilityIds:a,level:s,locationSearch:n,categorySearch:l,querySearch:p,resourceTypes:u,startDate:d,endDate:$,offset:S,limit:m},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getActivity(e){return i(t,{method:"GET",url:"/activities/{activityId}",path:{activityId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listActivitiesOccasions(e,r=!1,a,s,n){return i(t,{method:"GET",url:"/activities/{activityId}/occasions",path:{activityId:e},query:{hideFullyBooked:r,hidePastOccasions:a,startDate:s,endDate:n},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getActivityOccasion(e){return i(t,{method:"GET",url:"/activities/occasions/{occasionId}",path:{occasionId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getAdminActivityOccasions(e,r,a,s,n,l=10){return i(t,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:a,endDate:s,offset:n,limit:l},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listFacilities(e,r,a,s,n,l,p,u,d=10){return i(t,{method:"GET",url:"/facilities",query:{city:e,countryCode:r,name:a,latitude:s,longitude:n,radius:l,resourceTypes:p,offset:u,limit:d},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getFacility(e){return i(t,{method:"GET",url:"/facilities/{facilityId}",path:{facilityId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listResources(e){return i(t,{method:"GET",url:"/facilities/{facilityId}/resources",path:{facilityId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getResource(e){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}",path:{resourceId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listAvailabilities(e,r,a){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities",path:{resourceId:e},query:{startDateTime:r,endDateTime:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserProfile(e){return i(t,{method:"GET",url:"/profiles/users/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getConfig(e){return i(t,{method:"GET",url:"/config/{locale}",path:{locale:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getRelationToFriend(e){return i(t,{method:"GET",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var z=class{static getApiClientList(e,r=10){return i(t,{method:"GET",url:"/api-client",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createApiClient(e){return i(t,{method:"POST",url:"/api-client",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The specified resource identifier already exists",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientById(e){return i(t,{method:"GET",url:"/api-client/{clientId}",path:{clientId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateApiClientById(e,r,a){return i(t,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:a},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientUsageById(e,r){return i(t,{method:"GET",url:"/api-client/{clientId}/usage",path:{clientId:e},query:{month:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var B=class{static getActivityOccasionPrice(e,r){return i(t,{method:"GET",url:"/activities/occasions/{occasionId}/price",path:{occasionId:e},query:{promoCode:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getActivityCancellationPolicy(e,r){return i(t,{method:"GET",url:"/activities/occasions/{occasionId}/cancellation-policy",path:{occasionId:e},query:{locale:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getAvailabilityWithPrice(e,r,a,s,n,l,p){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:a,promoCode:s,numberOfSlots:n,emails:l,userIds:p},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getCancellationPolicy(e,r,a,s){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/cancellation-policy",path:{resourceId:e},query:{startTime:r,endTime:a,locale:s},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createPromoCode(e){return i(t,{method:"POST",url:"/admin/loyalty/promo-codes",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserInfo(){return i(t,{method:"GET",url:"/users/info",errors:{500:"General Error",503:"Service unavailable, please try again"}})}static listUserFavourites(){return i(t,{method:"GET",url:"/users/favourites",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listUserMemberships(){return i(t,{method:"GET",url:"/users/memberships",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createMembership(e){return i(t,{method:"POST",url:"/users/memberships",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listUserPayments(e,r=10){return i(t,{method:"GET",url:"/users/payments",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPayment(e){return i(t,{method:"GET",url:"/users/payments/{paymentId}",path:{paymentId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listUserPendingPayments(){return i(t,{method:"GET",url:"/users/payments/pending",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listUserBookings(e,r=10,a){return i(t,{method:"GET",url:"/users/bookings",query:{offset:e,limit:r,subType:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createBooking(e){return i(t,{method:"POST",url:"/users/bookings/time",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getBookingDetails(e){return i(t,{method:"GET",url:"/users/bookings/time/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteBooking(e){return i(t,{method:"DELETE",url:"/users/bookings/time/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUsersInBooking(e){return i(t,{method:"GET",url:"/users/bookings/{bookingId}/users",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static inviteUserToBooking(e,r){return i(t,{method:"POST",url:"/users/bookings/{bookingId}/users/invite/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static addUserToBooking(e,r){return i(t,{method:"POST",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static removeUserFromBooking(e,r){return i(t,{method:"DELETE",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static createActivityBooking(e){return i(t,{method:"POST",url:"/users/bookings/activity",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getActivityDetails(e){return i(t,{method:"GET",url:"/users/bookings/activity/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteActivityBooking(e){return i(t,{method:"DELETE",url:"/users/bookings/activity/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createBookingsAdmin(e){return i(t,{method:"POST",url:"/admin/bookings/time",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateBookingAdmin(e,r){return i(t,{method:"PATCH",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteBookingAdmin(e,r,a){return i(t,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPlaySessionsHistory(e,r=10){return i(t,{method:"GET",url:"/users/playsessions/history",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPlaySessionsUpcoming(){return i(t,{method:"GET",url:"/users/playsessions/upcoming",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static addWaitlistOccasion(e){return i(t,{method:"POST",url:"/users/waitlist/occasions/{id}",path:{id:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static removeWaitlistOccasion(e){return i(t,{method:"DELETE",url:"/users/waitlist/occasions/{id}",path:{id:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static getCheckout(e){return i(t,{method:"GET",url:"/checkout/{token}",path:{token:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createCheckoutBooking(e,r){return i(t,{method:"POST",url:"/checkout/{token}",path:{token:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getPspSession(e,r,a){return i(t,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static applyValueCard(e,r){return i(t,{method:"POST",url:"/checkout/{token}/valuecard",path:{token:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static unapplyValueCard(e,r){return i(t,{method:"DELETE",url:"/checkout/{token}/valuecard/{customerCouponId}",path:{token:e,customerCouponId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static applyPromoCode(e,r){return i(t,{method:"POST",url:"/checkout/{token}/promocode",path:{token:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static unapplyPromocode(e){return i(t,{method:"DELETE",url:"/checkout/{token}/promocode",path:{token:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientList(e,r=10){return i(t,{method:"GET",url:"/api-client",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createApiClient(e){return i(t,{method:"POST",url:"/api-client",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The specified resource identifier already exists",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientById(e){return i(t,{method:"GET",url:"/api-client/{clientId}",path:{clientId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateApiClientById(e,r,a){return i(t,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:a},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientUsageById(e,r){return i(t,{method:"GET",url:"/api-client/{clientId}/usage",path:{clientId:e},query:{month:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var j=class{static getAvailabilityWithPrice(e,r,a,s,n,l,p){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:a,promoCode:s,numberOfSlots:n,emails:l,userIds:p},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUsersInBooking(e){return i(t,{method:"GET",url:"/users/bookings/{bookingId}/users",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static inviteUserToBooking(e,r){return i(t,{method:"POST",url:"/users/bookings/{bookingId}/users/invite/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static addUserToBooking(e,r){return i(t,{method:"POST",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static removeUserFromBooking(e,r){return i(t,{method:"DELETE",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static createBookingsAdmin(e){return i(t,{method:"POST",url:"/admin/bookings/time",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateBookingAdmin(e,r){return i(t,{method:"PATCH",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteBookingAdmin(e,r,a){return i(t,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var L=class{static getCheckout(e){return i(t,{method:"GET",url:"/checkout/{token}",path:{token:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getPspSession(e,r,a){return i(t,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}};var N=class{static options(e){return i(t,{method:"OPTIONS",url:"/{cors+}",path:{"cors+":e},responseHeader:"Access-Control-Allow-Origin"})}};var F=class{static createPromoCode(e){return i(t,{method:"POST",url:"/admin/loyalty/promo-codes",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var _=class{static createMembership(e){return i(t,{method:"POST",url:"/users/memberships",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static cancellationPolicy(e,r){return i(t,{method:"GET",url:"/users/memberships/{membershipTypeId}/cancellation-policy",path:{membershipTypeId:e},query:{locale:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var H=class{static getPlaySessionById(e){return i(t,{method:"GET",url:"/playsessions/{sessionId}",path:{sessionId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static addPlayerWithUserId(e,r){return i(t,{method:"POST",url:"/playsessions/{sessionId}/players/by-userid/{userId}",path:{sessionId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static removePlayerWithUserId(e,r){return i(t,{method:"DELETE",url:"/playsessions/{sessionId}/players/by-userid/{userId}",path:{sessionId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static removePlayerWithUserEmail(e,r){return i(t,{method:"DELETE",url:"/playsessions/{sessionId}/players/by-email/{userEmail}",path:{sessionId:e,userEmail:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updatePlaySessionSettings(e,r){return i(t,{method:"PUT",url:"/playsessions/{sessionId}/settings",path:{sessionId:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static joinPlaySession(e){return i(t,{method:"POST",url:"/users/playsessions/{sessionId}/join",path:{sessionId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPlaySessionsHistory(e,r=10){return i(t,{method:"GET",url:"/users/playsessions/history",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPlaySessionsUpcoming(){return i(t,{method:"GET",url:"/users/playsessions/upcoming",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var M=class{static getUserProfile(e){return i(t,{method:"GET",url:"/profiles/users/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getRelationToFriend(e){return i(t,{method:"GET",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static addRelationToFriend(e){return i(t,{method:"POST",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteRelationToFriend(e){return i(t,{method:"DELETE",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listFriends(e,r=10){return i(t,{method:"GET",url:"/users/relations/friends",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listIncomingFriendRequests(e,r=10){return i(t,{method:"GET",url:"/users/relations/friends/incoming",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};0&&(module.exports={ActivityServiceV1Service,AnonymousService,ApiClientServiceV1Service,ApiError,AuthorizedService,BookingServiceV1Service,CancelError,CancelablePromise,CheckoutServiceV1Service,CorsService,LoyaltyServiceV1Service,MembershipServiceV1Service,OpenAPI,PlaySessionServiceV1Service,UserServiceV1Service,bookingSubType,cancellationPolicy,clientType,months,playingUserResponse});
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var oe=Object.defineProperty,te=Object.defineProperties;var ie=Object.getOwnPropertyDescriptors;var V=Object.getOwnPropertySymbols;var ae=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable;var K=(o,e,r)=>e in o?oe(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,S=(o,e)=>{for(var r in e||(e={}))ae.call(e,r)&&K(o,r,e[r]);if(V)for(var r of V(e))se.call(e,r)&&K(o,r,e[r]);return o},Y=(o,e)=>te(o,ie(e));var Q=(o,e,r)=>{if(!e.has(o))throw TypeError("Cannot "+r)};var c=(o,e,r)=>(Q(o,e,"read from private field"),r?r.call(o):e.get(o)),h=(o,e,r)=>{if(e.has(o))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(o):e.set(o,r)},f=(o,e,r,a)=>(Q(o,e,"write to private field"),a?a.call(o,r):e.set(o,r),r);var v=(o,e,r)=>new Promise((a,s)=>{var n=u=>{try{p(r.next(u))}catch(d){s(d)}},l=u=>{try{p(r.throw(u))}catch(d){s(d)}},p=u=>u.done?a(u.value):Promise.resolve(u.value).then(n,l);p((r=r.apply(o,e)).next())});var P=class extends Error{constructor(r,a,s){super(s);this.name="ApiError",this.url=a.url,this.status=a.status,this.statusText=a.statusText,this.body=a.body,this.request=r}};var k=class extends Error{constructor(e){super(e),this.name="CancelError"}get isCancelled(){return!0}},b,g,y,I,T,A,C,R=class{constructor(e){h(this,b,void 0);h(this,g,void 0);h(this,y,void 0);h(this,I,void 0);h(this,T,void 0);h(this,A,void 0);h(this,C,void 0);f(this,b,!1),f(this,g,!1),f(this,y,!1),f(this,I,[]),f(this,T,new Promise((r,a)=>{f(this,A,r),f(this,C,a);let s=p=>{var u;c(this,b)||c(this,g)||c(this,y)||(f(this,b,!0),(u=c(this,A))==null||u.call(this,p))},n=p=>{var u;c(this,b)||c(this,g)||c(this,y)||(f(this,g,!0),(u=c(this,C))==null||u.call(this,p))},l=p=>{c(this,b)||c(this,g)||c(this,y)||c(this,I).push(p)};return Object.defineProperty(l,"isResolved",{get:()=>c(this,b)}),Object.defineProperty(l,"isRejected",{get:()=>c(this,g)}),Object.defineProperty(l,"isCancelled",{get:()=>c(this,y)}),e(s,n,l)}))}get[Symbol.toStringTag](){return"Cancellable Promise"}then(e,r){return c(this,T).then(e,r)}catch(e){return c(this,T).catch(e)}finally(e){return c(this,T).finally(e)}cancel(){var e;if(!(c(this,b)||c(this,g)||c(this,y))){if(f(this,y,!0),c(this,I).length)try{for(let r of c(this,I))r()}catch(r){console.warn("Cancellation threw an error",r);return}c(this,I).length=0,(e=c(this,C))==null||e.call(this,new k("Request aborted"))}}get isCancelled(){return c(this,y)}};b=new WeakMap,g=new WeakMap,y=new WeakMap,I=new WeakMap,T=new WeakMap,A=new WeakMap,C=new WeakMap;var t={BASE:"https://api.dev.matchi.com",VERSION:"1",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0};var X=(n=>(n.BOOKING="booking",n.ACTIVITY="activity",n.SPLIT="split",n.SPLIT_MAIN="split_main",n.SPLIT_INVITE="split_invite",n))(X||{});var G;(e=>{let o;(s=>(s.AVAILABILITY="AVAILABILITY",s.OCCASION="OCCASION"))(o=e.itemType||(e.itemType={}))})(G||(G={}));var Z=(r=>(r.WIDGET="WIDGET",r.API="API",r))(Z||{});var ee=(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))(ee||{});var w;(e=>{let o;(l=>(l.PAID="PAID",l.INVITED="INVITED",l.JOINED="JOINED",l.BOOKER="BOOKER"))(o=e.status||(e.status={}))})(w||(w={}));var q=o=>o!=null,x=o=>typeof o=="string",D=o=>x(o)&&o!=="",z=o=>typeof o=="object"&&typeof o.type=="string"&&typeof o.stream=="function"&&typeof o.arrayBuffer=="function"&&typeof o.constructor=="function"&&typeof o.constructor.name=="string"&&/^(Blob|File)$/.test(o.constructor.name)&&/^(Blob|File)$/.test(o[Symbol.toStringTag]),re=o=>o instanceof FormData,ne=o=>{try{return btoa(o)}catch(e){return Buffer.from(o).toString("base64")}},le=o=>{let e=[],r=(s,n)=>{e.push(`${encodeURIComponent(s)}=${encodeURIComponent(String(n))}`)},a=(s,n)=>{q(n)&&(Array.isArray(n)?n.forEach(l=>{a(s,l)}):typeof n=="object"?Object.entries(n).forEach(([l,p])=>{a(`${s}[${l}]`,p)}):r(s,n))};return Object.entries(o).forEach(([s,n])=>{a(s,n)}),e.length>0?`?${e.join("&")}`:""},pe=(o,e)=>{let r=o.ENCODE_PATH||encodeURI,a=e.url.replace("{api-version}",o.VERSION).replace(/{(.*?)}/g,(n,l)=>{var p;return(p=e.path)!=null&&p.hasOwnProperty(l)?r(String(e.path[l])):n}),s=`${o.BASE}${a}`;return e.query?`${s}${le(e.query)}`:s},ue=o=>{if(o.formData){let e=new FormData,r=(a,s)=>{x(s)||z(s)?e.append(a,s):e.append(a,JSON.stringify(s))};return Object.entries(o.formData).filter(([a,s])=>q(s)).forEach(([a,s])=>{Array.isArray(s)?s.forEach(n=>r(a,n)):r(a,s)}),e}},U=(o,e)=>v(void 0,null,function*(){return typeof e=="function"?e(o):e}),ce=(o,e)=>v(void 0,null,function*(){let r=yield U(e,o.TOKEN),a=yield U(e,o.USERNAME),s=yield U(e,o.PASSWORD),n=yield U(e,o.HEADERS),l=Object.entries(S(S({Accept:"application/json"},n),e.headers)).filter(([p,u])=>q(u)).reduce((p,[u,d])=>Y(S({},p),{[u]:String(d)}),{});if(D(r)&&(l.Authorization=`Bearer ${r}`),D(a)&&D(s)){let p=ne(`${a}:${s}`);l.Authorization=`Basic ${p}`}return e.body&&(e.mediaType?l["Content-Type"]=e.mediaType:z(e.body)?l["Content-Type"]=e.body.type||"application/octet-stream":x(e.body)?l["Content-Type"]="text/plain":re(e.body)||(l["Content-Type"]="application/json")),new Headers(l)}),me=o=>{var e;if(o.body!==void 0)return(e=o.mediaType)!=null&&e.includes("/json")?JSON.stringify(o.body):x(o.body)||z(o.body)||re(o.body)?o.body:JSON.stringify(o.body)},de=(o,e,r,a,s,n,l)=>v(void 0,null,function*(){let p=new AbortController,u={headers:n,body:a!=null?a:s,method:e.method,signal:p.signal};return o.WITH_CREDENTIALS&&(u.credentials=o.CREDENTIALS),l(()=>p.abort()),yield fetch(r,u)}),fe=(o,e)=>{if(e){let r=o.headers.get(e);if(x(r))return r}},ye=o=>v(void 0,null,function*(){if(o.status!==204)try{let e=o.headers.get("Content-Type");if(e)return["application/json","application/problem+json"].some(s=>e.toLowerCase().startsWith(s))?yield o.json():yield o.text()}catch(e){console.error(e)}}),be=(o,e)=>{var s,n;let a=S({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},o.errors)[e.status];if(a)throw new P(o,e,a);if(!e.ok){let l=(s=e.status)!=null?s:"unknown",p=(n=e.statusText)!=null?n:"unknown",u=(()=>{try{return JSON.stringify(e.body,null,2)}catch(d){return}})();throw new P(o,e,`Generic Error: status: ${l}; status text: ${p}; body: ${u}`)}},i=(o,e)=>new R((r,a,s)=>v(void 0,null,function*(){try{let n=pe(o,e),l=ue(e),p=me(e),u=yield ce(o,e);if(!s.isCancelled){let d=yield de(o,e,n,p,l,u,s),O=yield ye(d),E=fe(d,e.responseHeader),m={url:n,ok:d.ok,status:d.status,statusText:d.statusText,body:E!=null?E:O};be(e,m),r(m.body)}}catch(n){a(n)}}));var B=class{static getAdminActivityOccasions(e,r,a,s,n,l=10){return i(t,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:a,endDate:s,offset:n,limit:l},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var j=class{static listActivities(e=!1,r=!1,a,s,n,l,p,u,d,O,E,m=10){return i(t,{method:"GET",url:"/activities",query:{hideFullyBooked:e,exposeOccasions:r,facilityIds:a,level:s,locationSearch:n,categorySearch:l,querySearch:p,resourceTypes:u,startDate:d,endDate:O,offset:E,limit:m},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getActivity(e){return i(t,{method:"GET",url:"/activities/{activityId}",path:{activityId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listActivitiesOccasions(e,r=!1,a,s,n){return i(t,{method:"GET",url:"/activities/{activityId}/occasions",path:{activityId:e},query:{hideFullyBooked:r,hidePastOccasions:a,startDate:s,endDate:n},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getActivityOccasion(e){return i(t,{method:"GET",url:"/activities/occasions/{occasionId}",path:{occasionId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getAdminActivityOccasions(e,r,a,s,n,l=10){return i(t,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:a,endDate:s,offset:n,limit:l},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listFacilities(e,r,a,s,n,l,p,u,d=10){return i(t,{method:"GET",url:"/facilities",query:{city:e,countryCode:r,name:a,latitude:s,longitude:n,radius:l,resourceTypes:p,offset:u,limit:d},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getFacility(e){return i(t,{method:"GET",url:"/facilities/{facilityId}",path:{facilityId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listResources(e){return i(t,{method:"GET",url:"/facilities/{facilityId}/resources",path:{facilityId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getResource(e){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}",path:{resourceId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listAvailabilities(e,r,a){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities",path:{resourceId:e},query:{startDateTime:r,endDateTime:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserProfile(e){return i(t,{method:"GET",url:"/profiles/users/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getConfig(e){return i(t,{method:"GET",url:"/config/{locale}",path:{locale:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getRelationToFriend(e){return i(t,{method:"GET",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var L=class{static getApiClientList(e,r=10){return i(t,{method:"GET",url:"/api-client",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createApiClient(e){return i(t,{method:"POST",url:"/api-client",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The specified resource identifier already exists",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientById(e){return i(t,{method:"GET",url:"/api-client/{clientId}",path:{clientId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateApiClientById(e,r,a){return i(t,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:a},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientUsageById(e,r){return i(t,{method:"GET",url:"/api-client/{clientId}/usage",path:{clientId:e},query:{month:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var N=class{static getActivityOccasionPrice(e,r){return i(t,{method:"GET",url:"/activities/occasions/{occasionId}/price",path:{occasionId:e},query:{promoCode:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getActivityCancellationPolicy(e,r){return i(t,{method:"GET",url:"/activities/occasions/{occasionId}/cancellation-policy",path:{occasionId:e},query:{locale:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getAvailabilityWithPrice(e,r,a,s,n,l,p){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:a,promoCode:s,numberOfSlots:n,emails:l,userIds:p},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getCancellationPolicy(e,r,a,s){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/cancellation-policy",path:{resourceId:e},query:{startTime:r,endTime:a,locale:s},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createPromoCode(e){return i(t,{method:"POST",url:"/admin/loyalty/promo-codes",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserInfo(){return i(t,{method:"GET",url:"/users/info",errors:{500:"General Error",503:"Service unavailable, please try again"}})}static listUserFavourites(){return i(t,{method:"GET",url:"/users/favourites",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listUserMemberships(){return i(t,{method:"GET",url:"/users/memberships",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createMembership(e){return i(t,{method:"POST",url:"/users/memberships",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listUserPayments(e,r=10){return i(t,{method:"GET",url:"/users/payments",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPayment(e){return i(t,{method:"GET",url:"/users/payments/{paymentId}",path:{paymentId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listUserPendingPayments(){return i(t,{method:"GET",url:"/users/payments/pending",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listUserBookings(e,r=10,a){return i(t,{method:"GET",url:"/users/bookings",query:{offset:e,limit:r,subType:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createBooking(e){return i(t,{method:"POST",url:"/users/bookings/time",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getBookingDetails(e){return i(t,{method:"GET",url:"/users/bookings/time/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteBooking(e){return i(t,{method:"DELETE",url:"/users/bookings/time/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUsersInBooking(e){return i(t,{method:"GET",url:"/users/bookings/{bookingId}/users",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static inviteUserToBooking(e,r){return i(t,{method:"POST",url:"/users/bookings/{bookingId}/users/invite/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static addUserToBooking(e,r){return i(t,{method:"POST",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static removeUserFromBooking(e,r){return i(t,{method:"DELETE",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static createActivityBooking(e){return i(t,{method:"POST",url:"/users/bookings/activity",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getActivityDetails(e){return i(t,{method:"GET",url:"/users/bookings/activity/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteActivityBooking(e){return i(t,{method:"DELETE",url:"/users/bookings/activity/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createBookingsAdmin(e){return i(t,{method:"POST",url:"/admin/bookings/time",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateBookingAdmin(e,r){return i(t,{method:"PATCH",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteBookingAdmin(e,r,a){return i(t,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPlaySessionsHistory(e,r=10){return i(t,{method:"GET",url:"/users/playsessions/history",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPlaySessionsUpcoming(){return i(t,{method:"GET",url:"/users/playsessions/upcoming",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static addWaitlistOccasion(e){return i(t,{method:"POST",url:"/users/waitlist/occasions/{id}",path:{id:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static removeWaitlistOccasion(e){return i(t,{method:"DELETE",url:"/users/waitlist/occasions/{id}",path:{id:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static getCheckout(e){return i(t,{method:"GET",url:"/checkout/{token}",path:{token:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createCheckoutBooking(e,r){return i(t,{method:"POST",url:"/checkout/{token}",path:{token:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getPspSession(e,r,a){return i(t,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static applyValueCard(e,r){return i(t,{method:"POST",url:"/checkout/{token}/valuecard",path:{token:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static unapplyValueCard(e,r){return i(t,{method:"DELETE",url:"/checkout/{token}/valuecard/{customerCouponId}",path:{token:e,customerCouponId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static applyPromoCode(e,r){return i(t,{method:"POST",url:"/checkout/{token}/promocode",path:{token:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static unapplyPromocode(e){return i(t,{method:"DELETE",url:"/checkout/{token}/promocode",path:{token:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientList(e,r=10){return i(t,{method:"GET",url:"/api-client",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static createApiClient(e){return i(t,{method:"POST",url:"/api-client",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The specified resource identifier already exists",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientById(e){return i(t,{method:"GET",url:"/api-client/{clientId}",path:{clientId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateApiClientById(e,r,a){return i(t,{method:"PUT",url:"/api-client/{clientId}",path:{clientId:e},query:{regenerateKey:a},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getApiClientUsageById(e,r){return i(t,{method:"GET",url:"/api-client/{clientId}/usage",path:{clientId:e},query:{month:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var F=class{static getAvailabilityWithPrice(e,r,a,s,n,l,p){return i(t,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:a,promoCode:s,numberOfSlots:n,emails:l,userIds:p},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUsersInBooking(e){return i(t,{method:"GET",url:"/users/bookings/{bookingId}/users",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static inviteUserToBooking(e,r){return i(t,{method:"POST",url:"/users/bookings/{bookingId}/users/invite/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static addUserToBooking(e,r){return i(t,{method:"POST",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static removeUserFromBooking(e,r){return i(t,{method:"DELETE",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static createBookingsAdmin(e){return i(t,{method:"POST",url:"/admin/bookings/time",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updateBookingAdmin(e,r){return i(t,{method:"PATCH",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteBookingAdmin(e,r,a){return i(t,{method:"DELETE",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},query:{initiator:r,systemIdentifier:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var _=class{static getCheckout(e){return i(t,{method:"GET",url:"/checkout/{token}",path:{token:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getPspSession(e,r,a){return i(t,{method:"GET",url:"/checkout/{token}/pspsession",path:{token:e},query:{returnUrl:r,enableRecurring:a},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}};var H=class{static options(e){return i(t,{method:"OPTIONS",url:"/{cors+}",path:{"cors+":e},responseHeader:"Access-Control-Allow-Origin"})}};var M=class{static createPromoCode(e){return i(t,{method:"POST",url:"/admin/loyalty/promo-codes",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var $=class{static createMembership(e){return i(t,{method:"POST",url:"/users/memberships",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static cancellationPolicy(e,r){return i(t,{method:"GET",url:"/users/memberships/{membershipTypeId}/cancellation-policy",path:{membershipTypeId:e},query:{locale:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var W=class{static getPlaySessionById(e){return i(t,{method:"GET",url:"/playsessions/{sessionId}",path:{sessionId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static addPlayerWithUserId(e,r){return i(t,{method:"POST",url:"/playsessions/{sessionId}/players/by-userid/{userId}",path:{sessionId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static removePlayerWithUserId(e,r){return i(t,{method:"DELETE",url:"/playsessions/{sessionId}/players/by-userid/{userId}",path:{sessionId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static removePlayerWithUserEmail(e,r){return i(t,{method:"DELETE",url:"/playsessions/{sessionId}/players/by-email/{userEmail}",path:{sessionId:e,userEmail:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static updatePlaySessionSettings(e,r){return i(t,{method:"PUT",url:"/playsessions/{sessionId}/settings",path:{sessionId:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static joinPlaySession(e){return i(t,{method:"POST",url:"/users/playsessions/{sessionId}/join",path:{sessionId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPlaySessionsHistory(e,r=10){return i(t,{method:"GET",url:"/users/playsessions/history",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getUserPlaySessionsUpcoming(){return i(t,{method:"GET",url:"/users/playsessions/upcoming",errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};var J=class{static getUserProfile(e){return i(t,{method:"GET",url:"/profiles/users/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static getRelationToFriend(e){return i(t,{method:"GET",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static addRelationToFriend(e){return i(t,{method:"POST",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error",503:"Service unavailable, please try again"}})}static deleteRelationToFriend(e){return i(t,{method:"DELETE",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listFriends(e,r=10){return i(t,{method:"GET",url:"/users/relations/friends",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}static listIncomingFriendRequests(e,r=10){return i(t,{method:"GET",url:"/users/relations/friends/incoming",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized",404:"The specified resource was not found.",500:"General Error",503:"Service unavailable, please try again"}})}};export{B as ActivityServiceV1Service,j as AnonymousService,L as ApiClientServiceV1Service,P as ApiError,N as AuthorizedService,F as BookingServiceV1Service,k as CancelError,R as CancelablePromise,_ as CheckoutServiceV1Service,H as CorsService,M as LoyaltyServiceV1Service,$ as MembershipServiceV1Service,t as OpenAPI,W as PlaySessionServiceV1Service,J as UserServiceV1Service,X as bookingSubType,G as cancellationPolicy,Z as clientType,ee as months,w as playingUserResponse};
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@matchi/api",
|
|
3
|
+
"version": "0.20231006.2",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"typecheck": "tsc",
|
|
12
|
+
"build": "tsup index.ts --format cjs,esm --dts --minify"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"bun-types": "latest",
|
|
16
|
+
"openapi-typescript-codegen": "^0.25.0",
|
|
17
|
+
"tsup": "^7.2.0",
|
|
18
|
+
"typescript": "^5.2.2"
|
|
19
|
+
}
|
|
20
|
+
}
|