@matchi/api 0.20241211.1 → 0.20250110.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,316 @@
1
+ type Booking = {
2
+ booker: string;
3
+ createdAt: string;
4
+ createdBy: string;
5
+ endTime: string;
6
+ id: string;
7
+ location: string;
8
+ participants: {
9
+ guests: Array<Guest>;
10
+ players: Array<Player>;
11
+ };
12
+ paymentReference: string;
13
+ startTime: string;
14
+ updatedAt: string;
15
+ updatedBy: string;
16
+ };
17
+ type CreateBooking = {
18
+ booker: string;
19
+ createdBy?: string;
20
+ endTime: string;
21
+ location: string;
22
+ participants: {
23
+ guests?: Array<Guest>;
24
+ players?: Array<Player>;
25
+ };
26
+ paymentReference: string;
27
+ startTime: string;
28
+ };
29
+ type Guest = {
30
+ email: string;
31
+ };
32
+ type Player = {
33
+ email: string;
34
+ id: string;
35
+ };
36
+ type UpdateBooking = {
37
+ booker: string;
38
+ endTime: string;
39
+ location: string;
40
+ participants: {
41
+ guests?: Array<Guest>;
42
+ players?: Array<Player>;
43
+ };
44
+ paymentReference: string;
45
+ startTime: string;
46
+ };
47
+ type PkgOpenapiSharedError = {
48
+ /**
49
+ * The error message
50
+ */
51
+ message?: string;
52
+ };
53
+ /**
54
+ * An array of error details to accompany a problem details response.
55
+ */
56
+ type PkgOpenapiSharedErrors = Array<PkgOpenapiSharedError>;
57
+ /**
58
+ * 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.
59
+ *
60
+ */
61
+ type PkgOpenapiSharedOffsetPaginatedResultSet = {
62
+ limit: number;
63
+ moreResults: boolean;
64
+ offset: number;
65
+ };
66
+ type PkgOpenapiSharedProblemDetails = {
67
+ /**
68
+ * A human-readable explanation specific to this occurrence of the problem.
69
+ */
70
+ detail?: string;
71
+ errors?: PkgOpenapiSharedErrors;
72
+ /**
73
+ * A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
74
+ */
75
+ instance?: string;
76
+ /**
77
+ * The HTTP status code generated by the origin server for this occurrence of the problem.
78
+ */
79
+ status?: number;
80
+ /**
81
+ * 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.
82
+ */
83
+ title: string;
84
+ /**
85
+ * A URI reference that identifies the problem type.
86
+ */
87
+ type?: string;
88
+ };
89
+ /**
90
+ * Maximum number of items to return.
91
+ */
92
+ type PkgOpenapiSharedOffsetLimitParam = number;
93
+ /**
94
+ * Number of items to skip before returning the results.
95
+ */
96
+ type PkgOpenapiSharedOffsetParam = number;
97
+ type FindBookingsData = {
98
+ body?: never;
99
+ path?: never;
100
+ query?: {
101
+ /**
102
+ * Number of items to skip before returning the results.
103
+ */
104
+ offset?: number;
105
+ /**
106
+ * Maximum number of items to return.
107
+ */
108
+ limit?: number;
109
+ /**
110
+ * The location to filter the bookings by.
111
+ */
112
+ location?: string;
113
+ };
114
+ url: '/bookings';
115
+ };
116
+ type FindBookingsErrors = {
117
+ /**
118
+ * Access token is not set or invalid.
119
+ */
120
+ 401: PkgOpenapiSharedProblemDetails;
121
+ /**
122
+ * The requestor is not authorized to perform this operation on the resource.
123
+ */
124
+ 403: PkgOpenapiSharedProblemDetails;
125
+ /**
126
+ * The server encountered an unexpected error
127
+ */
128
+ 500: PkgOpenapiSharedProblemDetails;
129
+ /**
130
+ * The requested operation is not implemented.
131
+ */
132
+ 501: PkgOpenapiSharedProblemDetails;
133
+ };
134
+ type FindBookingsError = FindBookingsErrors[keyof FindBookingsErrors];
135
+ type FindBookingsResponses = {
136
+ /**
137
+ * OK
138
+ */
139
+ 200: {
140
+ data?: Array<Booking>;
141
+ meta?: PkgOpenapiSharedOffsetPaginatedResultSet;
142
+ };
143
+ };
144
+ type FindBookingsResponse = FindBookingsResponses[keyof FindBookingsResponses];
145
+ type AddBookingData = {
146
+ body: CreateBooking;
147
+ path?: never;
148
+ query?: never;
149
+ url: '/bookings';
150
+ };
151
+ type AddBookingErrors = {
152
+ /**
153
+ * The request was malformed or could not be processed.
154
+ */
155
+ 400: PkgOpenapiSharedProblemDetails;
156
+ /**
157
+ * Access token is not set or invalid.
158
+ */
159
+ 401: PkgOpenapiSharedProblemDetails;
160
+ /**
161
+ * The requestor is not authorized to perform this operation on the resource.
162
+ */
163
+ 403: PkgOpenapiSharedProblemDetails;
164
+ /**
165
+ * The resource being created is found to already exist on the server.
166
+ */
167
+ 409: PkgOpenapiSharedProblemDetails;
168
+ /**
169
+ * The server encountered an unexpected error
170
+ */
171
+ 500: PkgOpenapiSharedProblemDetails;
172
+ /**
173
+ * The service requested is unavailable
174
+ */
175
+ 503: PkgOpenapiSharedProblemDetails;
176
+ };
177
+ type AddBookingError = AddBookingErrors[keyof AddBookingErrors];
178
+ type AddBookingResponses = {
179
+ /**
180
+ * Created
181
+ */
182
+ 201: Booking;
183
+ };
184
+ type AddBookingResponse = AddBookingResponses[keyof AddBookingResponses];
185
+ type DeleteBookingData = {
186
+ body?: never;
187
+ path: {
188
+ bookingId: string;
189
+ };
190
+ query?: never;
191
+ url: '/bookings/{bookingId}';
192
+ };
193
+ type DeleteBookingErrors = {
194
+ /**
195
+ * Access token is not set or invalid.
196
+ */
197
+ 401: PkgOpenapiSharedProblemDetails;
198
+ /**
199
+ * The requestor is not authorized to perform this operation on the resource.
200
+ */
201
+ 403: PkgOpenapiSharedProblemDetails;
202
+ /**
203
+ * The requested resource was not found.
204
+ */
205
+ 404: PkgOpenapiSharedProblemDetails;
206
+ /**
207
+ * The server encountered an unexpected error
208
+ */
209
+ 500: PkgOpenapiSharedProblemDetails;
210
+ /**
211
+ * The requested operation is not implemented.
212
+ */
213
+ 501: PkgOpenapiSharedProblemDetails;
214
+ /**
215
+ * The service requested is unavailable
216
+ */
217
+ 503: PkgOpenapiSharedProblemDetails;
218
+ };
219
+ type DeleteBookingError = DeleteBookingErrors[keyof DeleteBookingErrors];
220
+ type DeleteBookingResponses = {
221
+ /**
222
+ * No Content
223
+ */
224
+ 204: void;
225
+ };
226
+ type DeleteBookingResponse = DeleteBookingResponses[keyof DeleteBookingResponses];
227
+ type FindBookingByIdData = {
228
+ body?: never;
229
+ path: {
230
+ bookingId: string;
231
+ };
232
+ query?: never;
233
+ url: '/bookings/{bookingId}';
234
+ };
235
+ type FindBookingByIdErrors = {
236
+ /**
237
+ * Access token is not set or invalid.
238
+ */
239
+ 401: PkgOpenapiSharedProblemDetails;
240
+ /**
241
+ * The requestor is not authorized to perform this operation on the resource.
242
+ */
243
+ 403: PkgOpenapiSharedProblemDetails;
244
+ /**
245
+ * The requested resource was not found.
246
+ */
247
+ 404: PkgOpenapiSharedProblemDetails;
248
+ /**
249
+ * The server encountered an unexpected error
250
+ */
251
+ 500: PkgOpenapiSharedProblemDetails;
252
+ /**
253
+ * The requested operation is not implemented.
254
+ */
255
+ 501: PkgOpenapiSharedProblemDetails;
256
+ /**
257
+ * The service requested is unavailable
258
+ */
259
+ 503: PkgOpenapiSharedProblemDetails;
260
+ };
261
+ type FindBookingByIdError = FindBookingByIdErrors[keyof FindBookingByIdErrors];
262
+ type FindBookingByIdResponses = {
263
+ /**
264
+ * OK
265
+ */
266
+ 200: Booking;
267
+ };
268
+ type FindBookingByIdResponse = FindBookingByIdResponses[keyof FindBookingByIdResponses];
269
+ type UpdateBookingData = {
270
+ body: UpdateBooking;
271
+ path: {
272
+ bookingId: string;
273
+ };
274
+ query?: never;
275
+ url: '/bookings/{bookingId}';
276
+ };
277
+ type UpdateBookingErrors = {
278
+ /**
279
+ * The request was malformed or could not be processed.
280
+ */
281
+ 400: PkgOpenapiSharedProblemDetails;
282
+ /**
283
+ * Access token is not set or invalid.
284
+ */
285
+ 401: PkgOpenapiSharedProblemDetails;
286
+ /**
287
+ * The requestor is not authorized to perform this operation on the resource.
288
+ */
289
+ 403: PkgOpenapiSharedProblemDetails;
290
+ /**
291
+ * The requested resource was not found.
292
+ */
293
+ 404: PkgOpenapiSharedProblemDetails;
294
+ /**
295
+ * The server encountered an unexpected error
296
+ */
297
+ 500: PkgOpenapiSharedProblemDetails;
298
+ /**
299
+ * The requested operation is not implemented.
300
+ */
301
+ 501: PkgOpenapiSharedProblemDetails;
302
+ /**
303
+ * The service requested is unavailable
304
+ */
305
+ 503: PkgOpenapiSharedProblemDetails;
306
+ };
307
+ type UpdateBookingError = UpdateBookingErrors[keyof UpdateBookingErrors];
308
+ type UpdateBookingResponses = {
309
+ /**
310
+ * OK
311
+ */
312
+ 200: Booking;
313
+ };
314
+ type UpdateBookingResponse = UpdateBookingResponses[keyof UpdateBookingResponses];
315
+
316
+ export type { AddBookingData, AddBookingError, AddBookingErrors, AddBookingResponse, AddBookingResponses, Booking, CreateBooking, DeleteBookingData, DeleteBookingError, DeleteBookingErrors, DeleteBookingResponse, DeleteBookingResponses, FindBookingByIdData, FindBookingByIdError, FindBookingByIdErrors, FindBookingByIdResponse, FindBookingByIdResponses, FindBookingsData, FindBookingsError, FindBookingsErrors, FindBookingsResponse, FindBookingsResponses, Guest, PkgOpenapiSharedError, PkgOpenapiSharedErrors, PkgOpenapiSharedOffsetLimitParam, PkgOpenapiSharedOffsetPaginatedResultSet, PkgOpenapiSharedOffsetParam, PkgOpenapiSharedProblemDetails, Player, UpdateBooking, UpdateBookingData, UpdateBookingError, UpdateBookingErrors, UpdateBookingResponse, UpdateBookingResponses };
@@ -0,0 +1 @@
1
+ "use strict";var i=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var g=(r,e,n,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of a(e))!s.call(r,o)&&o!==n&&i(r,o,{get:()=>e[o],enumerable:!(t=p(e,o))||t.enumerable});return r};var d=r=>g(i({},"__esModule",{value:!0}),r);var k={};module.exports=d(k);
@@ -0,0 +1 @@
1
+ import"./chunk-PT2OYMNL.mjs";
package/package.json CHANGED
@@ -1,20 +1,67 @@
1
1
  {
2
2
  "name": "@matchi/api",
3
- "version": "0.20241211.1",
4
- "main": "dist/index.js",
5
- "types": "dist/index.d.ts",
6
- "module": "dist/index.mjs",
3
+ "version": "0.20250110.1",
4
+ "main": "dist/main/index.js",
5
+ "module": "dist/main/index.mjs",
6
+ "devDependencies": {
7
+ "@hey-api/client-fetch": "^0.6.0",
8
+ "@hey-api/openapi-ts": "^0.59.2",
9
+ "@microsoft/api-extractor": "^7.48.1",
10
+ "@tanstack/react-query": "^5.62.10",
11
+ "bun-types": "latest",
12
+ "openapi-typescript-codegen": "^0.25.0",
13
+ "tsup": "^8.0.1",
14
+ "typescript": "^5.3.3"
15
+ },
16
+ "exports": {
17
+ ".": {
18
+ "import": "./dist/main/index.mjs",
19
+ "require": "./dist/main/index.js",
20
+ "types": {
21
+ "import": "./dist/main/index.d.mts",
22
+ "default": "./dist/main/index.d.ts"
23
+ }
24
+ },
25
+ "./v1/@tanstack/react-query.gen": {
26
+ "import": "./dist/v1/@tanstack/react-query.gen.mjs",
27
+ "require": "./dist/v1/@tanstack/react-query.gen.js",
28
+ "types": {
29
+ "import": "./dist/v1/@tanstack/react-query.gen.d.mts",
30
+ "default": "./dist/v1/@tanstack/react-query.gen.d.ts"
31
+ }
32
+ },
33
+ "./v1/sdk.gen": {
34
+ "import": "./dist/v1/sdk.gen.mjs",
35
+ "require": "./dist/v1/sdk.gen.js",
36
+ "types": {
37
+ "import": "./dist/v1/sdk.gen.d.mts",
38
+ "default": "./dist/v1/sdk.gen.d.ts"
39
+ }
40
+ },
41
+ "./v1/schemas.gen": {
42
+ "import": "./dist/v1/schemas.gen.mjs",
43
+ "require": "./dist/v1/schemas.gen.js",
44
+ "types": {
45
+ "import": "./dist/v1/schemas.gen.d.mts",
46
+ "default": "./dist/v1/schemas.gen.d.ts"
47
+ }
48
+ },
49
+ "./v1/types.gen": {
50
+ "import": "./dist/v1/types.gen.mjs",
51
+ "require": "./dist/v1/types.gen.js",
52
+ "types": {
53
+ "import": "./dist/v1/types.gen.d.mts",
54
+ "default": "./dist/v1/types.gen.d.ts"
55
+ }
56
+ }
57
+ },
7
58
  "files": [
8
59
  "dist"
9
60
  ],
10
61
  "scripts": {
11
62
  "typecheck": "tsc",
12
- "build": "tsup index.ts --format cjs,esm --dts --minify"
63
+ "build-local": "openapi-ts --input ${BACKEND_REPO}/infra/matchiapi/api/v1/aggregated-prod.yml",
64
+ "build": "tsup"
13
65
  },
14
- "devDependencies": {
15
- "bun-types": "latest",
16
- "openapi-typescript-codegen": "^0.25.0",
17
- "tsup": "^8.0.1",
18
- "typescript": "^5.3.3"
19
- }
66
+ "types": "dist/main/index.d.ts"
20
67
  }
package/dist/index.js DELETED
@@ -1 +0,0 @@
1
- "use strict";var x=Object.defineProperty,ge=Object.defineProperties,he=Object.getOwnPropertyDescriptor,Ie=Object.getOwnPropertyDescriptors,Te=Object.getOwnPropertyNames,ce=Object.getOwnPropertySymbols;var de=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable;var me=(i,e,r)=>e in i?x(i,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[e]=r,A=(i,e)=>{for(var r in e||(e={}))de.call(e,r)&&me(i,r,e[r]);if(ce)for(var r of ce(e))Ee.call(e,r)&&me(i,r,e[r]);return i},fe=(i,e)=>ge(i,Ie(e));var Ce=(i,e)=>{for(var r in e)x(i,r,{get:e[r],enumerable:!0})},Pe=(i,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Te(e))!de.call(i,s)&&s!==r&&x(i,s,{get:()=>e[s],enumerable:!(a=he(e,s))||a.enumerable});return i};var Se=i=>Pe(x({},"__esModule",{value:!0}),i);var ye=(i,e,r)=>{if(!e.has(i))throw TypeError("Cannot "+r)};var c=(i,e,r)=>(ye(i,e,"read from private field"),r?r.call(i):e.get(i)),I=(i,e,r)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,r)},y=(i,e,r,a)=>(ye(i,e,"write to private field"),a?a.call(i,r):e.set(i,r),r);var P=(i,e,r)=>new Promise((a,s)=>{var l=u=>{try{p(r.next(u))}catch(d){s(d)}},n=u=>{try{p(r.throw(u))}catch(d){s(d)}},p=u=>u.done?a(u.value):Promise.resolve(u.value).then(l,n);p((r=r.apply(i,e)).next())});var qe={};Ce(qe,{ActivityServiceV1Service:()=>M,AnonymousService:()=>j,ApiClientServiceV1Service:()=>H,ApiError:()=>E,AuthorizedService:()=>V,BookingServiceV1Service:()=>F,CancelError:()=>O,CancelablePromise:()=>v,CheckoutServiceV1Service:()=>W,CompetitionServiceV1Service:()=>Y,CorsService:()=>K,LoyaltyServiceV1Service:()=>J,MembershipServiceV1Service:()=>$,OpenAPI:()=>o,PlaySessionServiceV1Service:()=>Q,UserServiceV1Service:()=>X,access:()=>Z,bookingRestriction:()=>ee,bookingSubType:()=>re,bookingSubscription:()=>k,bookingUserStatus:()=>oe,cancellationPolicy:()=>D,clientType:()=>te,createChatResponse:()=>w,directionParam:()=>ie,months:()=>se,pendingPayment:()=>q,playSessionSettings:()=>N,playSessionUser:()=>L,playerStatusParam:()=>ae,playingUserResponse:()=>z,userChatStatusParam:()=>ne,userPunchCard:()=>B});module.exports=Se(qe);var E=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 O=class extends Error{constructor(e){super(e),this.name="CancelError"}get isCancelled(){return!0}},g,h,b,T,C,U,S,v=class{constructor(e){I(this,g,void 0);I(this,h,void 0);I(this,b,void 0);I(this,T,void 0);I(this,C,void 0);I(this,U,void 0);I(this,S,void 0);y(this,g,!1),y(this,h,!1),y(this,b,!1),y(this,T,[]),y(this,C,new Promise((r,a)=>{y(this,U,r),y(this,S,a);let s=p=>{var u;c(this,g)||c(this,h)||c(this,b)||(y(this,g,!0),(u=c(this,U))==null||u.call(this,p))},l=p=>{var u;c(this,g)||c(this,h)||c(this,b)||(y(this,h,!0),(u=c(this,S))==null||u.call(this,p))},n=p=>{c(this,g)||c(this,h)||c(this,b)||c(this,T).push(p)};return Object.defineProperty(n,"isResolved",{get:()=>c(this,g)}),Object.defineProperty(n,"isRejected",{get:()=>c(this,h)}),Object.defineProperty(n,"isCancelled",{get:()=>c(this,b)}),e(s,l,n)}))}get[Symbol.toStringTag](){return"Cancellable Promise"}then(e,r){return c(this,C).then(e,r)}catch(e){return c(this,C).catch(e)}finally(e){return c(this,C).finally(e)}cancel(){var e;if(!(c(this,g)||c(this,h)||c(this,b))){if(y(this,b,!0),c(this,T).length)try{for(let r of c(this,T))r()}catch(r){console.warn("Cancellation threw an error",r);return}c(this,T).length=0,(e=c(this,S))==null||e.call(this,new O("Request aborted"))}}get isCancelled(){return c(this,b)}};g=new WeakMap,h=new WeakMap,b=new WeakMap,T=new WeakMap,C=new WeakMap,U=new WeakMap,S=new WeakMap;var o={BASE:"https://api.dev.matchi.com",VERSION:"1",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0};var Z=(r=>(r.BOOKING_DETAILS="BOOKING_DETAILS",r.PUBLIC_MATCHES="PUBLIC_MATCHES",r))(Z||{});var ee=(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))(ee||{});var k;(e=>{let i;(f=>(f.MONDAY="MONDAY",f.TUESDAY="TUESDAY",f.WEDNESDAY="WEDNESDAY",f.THURSDAY="THURSDAY",f.FRIDAY="FRIDAY",f.SATURDAY="SATURDAY",f.SUNDAY="SUNDAY",f.UNKNOWN="UNKNOWN"))(i=e.weekday||(e.weekday={}))})(k||(k={}));var re=(n=>(n.BOOKING="booking",n.BOOKING_PLAYER="booking_player",n.ACTIVITY="activity",n.SPLIT="split",n.SPLIT_MAIN="split_main",n.SPLIT_INVITE="split_invite",n))(re||{});var oe=(n=>(n.UNAPPROVED="UNAPPROVED",n.UNCONFIRMED="UNCONFIRMED",n.DECLINED="DECLINED",n.PARTICIPANT="PARTICIPANT",n.CO_BOOKER="CO-BOOKER",n.OWNER="OWNER",n))(oe||{});var D;(e=>{let i;(s=>(s.AVAILABILITY="AVAILABILITY",s.OCCASION="OCCASION"))(i=e.itemType||(e.itemType={}))})(D||(D={}));var te=(r=>(r.WIDGET="WIDGET",r.API="API",r))(te||{});var w;(e=>{let i;(l=>(l.PUBLIC="public",l.PRIVATE="private",l.PASSWORD="password"))(i=e.type||(e.type={}))})(w||(w={}));var ie=(r=>(r.UPCOMING="UPCOMING",r.HISTORICAL="HISTORICAL",r))(ie||{});var se=(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))(se||{});var q;(e=>{let i;(n=>(n.BOOKING="BOOKING",n.ACTIVITY="ACTIVITY",n.MEMBERSHIP="MEMBERSHIP",n.SUBSCRIPTION="SUBSCRIPTION"))(i=e.type||(e.type={}))})(q||(q={}));var ae=(r=>(r.ALL="ALL",r.PENDING_APPROVAL="PENDING_APPROVAL",r))(ae||{});var z;(e=>{let i;(n=>(n.PAID="PAID",n.INVITED="INVITED",n.JOINED="JOINED",n.BOOKER="BOOKER"))(i=e.status||(e.status={}))})(z||(z={}));var N;(e=>{let i;(s=>(s.JOIN_APPROVAL_NONE="JOIN_APPROVAL_NONE",s.JOIN_APPROVAL_REQUIRED_FOR_ALL="JOIN_APPROVAL_REQUIRED_FOR_ALL"))(i=e.joinApproval||(e.joinApproval={}))})(N||(N={}));var L;(e=>{let i;(s=>(s.APPLIED="APPLIED",s.INVITED="INVITED"))(i=e.joiningMethod||(e.joiningMethod={}))})(L||(L={}));var ne=(s=>(s.ALL="ALL",s.ACTIVE="ACTIVE",s.INACTIVE="INACTIVE",s.NOT_CONNECTED="NOT_CONNECTED",s))(ne||{});var B;(e=>{let i;(s=>(s.UNLIMITED="UNLIMITED",s.NUMBERED="NUMBERED"))(i=e.type||(e.type={}))})(B||(B={}));var pe=i=>i!=null,G=i=>typeof i=="string",le=i=>G(i)&&i!=="",ue=i=>typeof i=="object"&&typeof i.type=="string"&&typeof i.stream=="function"&&typeof i.arrayBuffer=="function"&&typeof i.constructor=="function"&&typeof i.constructor.name=="string"&&/^(Blob|File)$/.test(i.constructor.name)&&/^(Blob|File)$/.test(i[Symbol.toStringTag]),be=i=>i instanceof FormData,ve=i=>{try{return btoa(i)}catch(e){return Buffer.from(i).toString("base64")}},Re=i=>{let e=[],r=(s,l)=>{e.push(`${encodeURIComponent(s)}=${encodeURIComponent(String(l))}`)},a=(s,l)=>{pe(l)&&(Array.isArray(l)?l.forEach(n=>{a(s,n)}):typeof l=="object"?Object.entries(l).forEach(([n,p])=>{a(`${s}[${n}]`,p)}):r(s,l))};return Object.entries(i).forEach(([s,l])=>{a(s,l)}),e.length>0?`?${e.join("&")}`:""},Ae=(i,e)=>{let r=i.ENCODE_PATH||encodeURI,a=e.url.replace("{api-version}",i.VERSION).replace(/{(.*?)}/g,(l,n)=>{var p;return(p=e.path)!=null&&p.hasOwnProperty(n)?r(String(e.path[n])):l}),s=`${i.BASE}${a}`;return e.query?`${s}${Re(e.query)}`:s},Oe=i=>{if(i.formData){let e=new FormData,r=(a,s)=>{G(s)||ue(s)?e.append(a,s):e.append(a,JSON.stringify(s))};return Object.entries(i.formData).filter(([a,s])=>pe(s)).forEach(([a,s])=>{Array.isArray(s)?s.forEach(l=>r(a,l)):r(a,s)}),e}},_=(i,e)=>P(void 0,null,function*(){return typeof e=="function"?e(i):e}),Ue=(i,e)=>P(void 0,null,function*(){let r=yield _(e,i.TOKEN),a=yield _(e,i.USERNAME),s=yield _(e,i.PASSWORD),l=yield _(e,i.HEADERS),n=Object.entries(A(A({Accept:"application/json"},l),e.headers)).filter(([p,u])=>pe(u)).reduce((p,[u,d])=>fe(A({},p),{[u]:String(d)}),{});if(le(r)&&(n.Authorization=`Bearer ${r}`),le(a)&&le(s)){let p=ve(`${a}:${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":be(e.body)||(n["Content-Type"]="application/json")),new Headers(n)}),Ge=i=>{var e;if(i.body!==void 0)return(e=i.mediaType)!=null&&e.includes("/json")?JSON.stringify(i.body):G(i.body)||ue(i.body)||be(i.body)?i.body:JSON.stringify(i.body)},xe=(i,e,r,a,s,l,n)=>P(void 0,null,function*(){let p=new AbortController,u={headers:l,body:a!=null?a:s,method:e.method,signal:p.signal};return i.WITH_CREDENTIALS&&(u.credentials=i.CREDENTIALS),n(()=>p.abort()),yield fetch(r,u)}),ke=(i,e)=>{if(e){let r=i.headers.get(e);if(G(r))return r}},De=i=>P(void 0,null,function*(){if(i.status!==204)try{let e=i.headers.get("Content-Type");if(e)return["application/json","application/problem+json"].some(s=>e.toLowerCase().startsWith(s))?yield i.json():yield i.text()}catch(e){console.error(e)}}),we=(i,e)=>{var s,l;let a=A({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},i.errors)[e.status];if(a)throw new E(i,e,a);if(!e.ok){let n=(s=e.status)!=null?s:"unknown",p=(l=e.statusText)!=null?l:"unknown",u=(()=>{try{return JSON.stringify(e.body,null,2)}catch(d){return}})();throw new E(i,e,`Generic Error: status: ${n}; status text: ${p}; body: ${u}`)}},t=(i,e)=>new v((r,a,s)=>P(void 0,null,function*(){try{let l=Ae(i,e),n=Oe(e),p=Ge(e),u=yield Ue(i,e);if(!s.isCancelled){let d=yield xe(i,e,l,p,n,u,s),f=yield De(d),R=ke(d,e.responseHeader),m={url:l,ok:d.ok,status:d.status,statusText:d.statusText,body:R!=null?R:f};we(e,m),r(m.body)}}catch(l){a(l)}}));var M=class{static getAdminActivityOccasions(e,r,a,s,l,n=10){return t(o,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:a,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 j=class{static listActivities(e=!1,r=!1,a,s,l,n,p,u,d,f,R,m=10){return t(o,{method:"GET",url:"/activities",query:{hideFullyBooked:e,exposeOccasions:r,facilityIds:a,level:s,locationSearch:l,categorySearch:n,querySearch:p,resourceTypes:u,startDate:d,endDate:f,offset:R,limit:m},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getActivity(e){return t(o,{method:"GET",url:"/activities/{activityId}",path:{activityId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static listActivitiesOccasions(e,r=!1,a,s,l){return t(o,{method:"GET",url:"/activities/{activityId}/occasions",path:{activityId:e},query:{hideFullyBooked:r,hidePastOccasions:a,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 t(o,{method:"GET",url:"/activities/occasions/{occasionId}",path:{occasionId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getAdminActivityOccasions(e,r,a,s,l,n=10){return t(o,{method:"GET",url:"/admin/activities/{activityId}/occasions",path:{activityId:e},query:{filter:r,startDate:a,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 t(o,{method:"PUT",url:"/admin/competition/account/update",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",500:"General Error.",503:"Service unavailable, please try again."}})}static listFacilities(e,r,a,s,l,n,p,u,d=10){return t(o,{method:"GET",url:"/facilities",query:{city:e,countryCode:r,name:a,latitude:s,longitude:l,radius:n,resourceTypes:p,offset:u,limit:d},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getFacility(e){return t(o,{method:"GET",url:"/facilities/{facilityId}",path:{facilityId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static listResources(e){return t(o,{method:"GET",url:"/facilities/{facilityId}/resources",path:{facilityId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getResource(e){return t(o,{method:"GET",url:"/facilities/resources/{resourceId}",path:{resourceId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static listAvailabilities(e,r,a){return t(o,{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 listAvailabilityEndTimes(e,r){return t(o,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimes",path:{resourceId:e},query:{startDateTime:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserProfile(e){return t(o,{method:"GET",url:"/profiles/users/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getConfig(e){return t(o,{method:"GET",url:"/config/{locale}",path:{locale:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getRelationToFriend(e){return t(o,{method:"GET",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}};var H=class{static getApiClientList(e,r=10){return t(o,{method:"GET",url:"/api-client",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static createApiClient(e){return t(o,{method:"POST",url:"/api-client",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized.",403:"The specified resource identifier already exists.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getApiClientById(e){return t(o,{method:"GET",url:"/api-client/{clientId}",path:{clientId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static updateApiClientById(e,r,a){return t(o,{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 t(o,{method:"GET",url:"/api-client/{clientId}/usage",path:{clientId:e},query:{month:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}};var V=class{static getActivityOccasionPrice(e,r){return t(o,{method:"GET",url:"/activities/occasions/{occasionId}/price",path:{occasionId:e},query:{promoCode:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getActivityCancellationPolicy(e,r){return t(o,{method:"GET",url:"/activities/occasions/{occasionId}/cancellation-policy",path:{occasionId:e},query:{locale:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getAvailabilityWithPrice(e,r,a,s,l,n,p){return t(o,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:a,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,a,s,l){return t(o,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimes/prices",path:{resourceId:e},query:{startTime:r,numberOfSlots:a,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,a,s,l){return t(o,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimeswithrestrictions",path:{resourceId:e},query:{startTime:r,numberOfSlots:a,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,a,s){return t(o,{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 t(o,{method:"POST",url:"/admin/loyalty/promo-codes",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getBookingUsers(e){return t(o,{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 listChats(e="ALL",r,a=10){return t(o,{method:"GET",url:"/users/chats",query:{userChatStatus:e,offset:r,limit:a},errors:{400:"Illegal input for operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static createChat(e){return t(o,{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 addUserToChat(e,r){return t(o,{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 t(o,{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 t(o,{method:"GET",url:"/users/chats/auth",errors:{401:"Unauthorized.",500:"General Error."}})}static getUserInfo(){return t(o,{method:"GET",url:"/users/info",errors:{500:"General Error.",503:"Service unavailable, please try again."}})}static getUsersProfile(){return t(o,{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 t(o,{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 t(o,{method:"GET",url:"/users/favourites",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static listUserMemberships(){return t(o,{method:"GET",url:"/users/memberships",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static createMembership(e){return t(o,{method:"POST",url:"/users/memberships",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static listUserPayments(e,r=10){return t(o,{method:"GET",url:"/users/payments",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserPayment(e){return t(o,{method:"GET",url:"/users/payments/{paymentId}",path:{paymentId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static listUserPendingPayments(){return t(o,{method:"GET",url:"/users/payments/pending",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static listUserBookings(e,r=10,a){return t(o,{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 t(o,{method:"POST",url:"/users/bookings/time",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getBookingDetails(e){return t(o,{method:"GET",url:"/users/bookings/time/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static deleteBooking(e){return t(o,{method:"DELETE",url:"/users/bookings/time/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getBookingSubscriptionsListUpcoming(e,r=10){return t(o,{method:"GET",url:"/users/bookings/subscriptions/upcoming",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getBookingSubscriptionsListHistory(e,r=10){return t(o,{method:"GET",url:"/users/bookings/subscriptions/history",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getBookingSubscriptionDetails(e){return t(o,{method:"GET",url:"/users/bookings/subscriptions/{subscriptionId}",path:{subscriptionId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserBookingRestrictions(e){return t(o,{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 t(o,{method:"GET",url:"/users/bookings/{bookingId}/users",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getPriceOfOrderSplitBooking(e){return t(o,{method:"GET",url:"/users/bookings/{bookingId}/price",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static inviteUserToBooking(e,r){return t(o,{method:"POST",url:"/users/bookings/{bookingId}/users/invite/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error.",503:"Service unavailable, please try again."}})}static addUserToBooking(e,r){return t(o,{method:"POST",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error.",503:"Service unavailable, please try again."}})}static removeUserFromBooking(e,r){return t(o,{method:"DELETE",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error.",503:"Service unavailable, please try again."}})}static createActivityBooking(e){return t(o,{method:"POST",url:"/users/bookings/activity",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getActivityDetails(e){return t(o,{method:"GET",url:"/users/bookings/activity/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static deleteActivityBooking(e){return t(o,{method:"DELETE",url:"/users/bookings/activity/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static createBookingsAdmin(e){return t(o,{method:"POST",url:"/admin/bookings/time",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static updateBookingAdmin(e,r){return t(o,{method:"PATCH",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static deleteBookingAdmin(e,r,a){return t(o,{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 getUserPlaySessions(e,r=10,a="UPCOMING",s="ALL"){return t(o,{method:"GET",url:"/users/playsessions",query:{offset:e,limit:r,direction:a,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 t(o,{method:"GET",url:"/users/playsessions/history",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserPlaySessionsUpcoming(){return t(o,{method:"GET",url:"/users/playsessions/upcoming",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserPlaySessionsMarketplace(e,r,a,s,l,n=10){return t(o,{method:"GET",url:"/users/playsessions/marketplace",query:{facilityIds:e,startDateTime:r,endDateTime:a,sportIds:s,availableSpots: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 addWaitlistOccasion(e){return t(o,{method:"POST",url:"/users/waitlist/occasions/{id}",path:{id:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error.",503:"Service unavailable, please try again."}})}static removeWaitlistOccasion(e){return t(o,{method:"DELETE",url:"/users/waitlist/occasions/{id}",path:{id:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error.",503:"Service unavailable, please try again."}})}static listUserOfferPunchCards(e,r=10){return t(o,{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 t(o,{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 t(o,{method:"GET",url:"/checkout/{token}",path:{token:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static createCheckoutBooking(e,r){return t(o,{method:"POST",url:"/checkout/{token}",path:{token:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getPspSession(e,r,a){return t(o,{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 t(o,{method:"POST",url:"/checkout/{token}/valuecard",path:{token:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error.",503:"Service unavailable, please try again."}})}static unapplyValueCard(e,r){return t(o,{method:"DELETE",url:"/checkout/{token}/valuecard/{customerCouponId}",path:{token:e,customerCouponId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static applyPromoCode(e,r){return t(o,{method:"POST",url:"/checkout/{token}/promocode",path:{token:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error.",503:"Service unavailable, please try again."}})}static unapplyPromocode(e){return t(o,{method:"DELETE",url:"/checkout/{token}/promocode",path:{token:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getApiClientList(e,r=10){return t(o,{method:"GET",url:"/api-client",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static createApiClient(e){return t(o,{method:"POST",url:"/api-client",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized.",403:"The specified resource identifier already exists.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getApiClientById(e){return t(o,{method:"GET",url:"/api-client/{clientId}",path:{clientId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static updateApiClientById(e,r,a){return t(o,{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 t(o,{method:"GET",url:"/api-client/{clientId}/usage",path:{clientId:e},query:{month:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}};var F=class{static getAvailabilityWithPrice(e,r,a,s,l,n,p){return t(o,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/price",path:{resourceId:e},query:{startTime:r,endTime:a,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,a,s,l){return t(o,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimes/prices",path:{resourceId:e},query:{startTime:r,numberOfSlots:a,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,a,s,l){return t(o,{method:"GET",url:"/facilities/resources/{resourceId}/availabilities/endtimeswithrestrictions",path:{resourceId:e},query:{startTime:r,numberOfSlots:a,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 t(o,{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 t(o,{method:"GET",url:"/users/bookings/subscriptions/upcoming",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getBookingSubscriptionsListHistory(e,r=10){return t(o,{method:"GET",url:"/users/bookings/subscriptions/history",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getBookingSubscriptionDetails(e){return t(o,{method:"GET",url:"/users/bookings/subscriptions/{subscriptionId}",path:{subscriptionId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserBookingRestrictions(e){return t(o,{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 t(o,{method:"GET",url:"/users/bookings/{bookingId}/users",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getPriceOfOrderSplitBooking(e){return t(o,{method:"GET",url:"/users/bookings/{bookingId}/price",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static inviteUserToBooking(e,r){return t(o,{method:"POST",url:"/users/bookings/{bookingId}/users/invite/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error.",503:"Service unavailable, please try again."}})}static addUserToBooking(e,r){return t(o,{method:"POST",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error.",503:"Service unavailable, please try again."}})}static removeUserFromBooking(e,r){return t(o,{method:"DELETE",url:"/users/bookings/{bookingId}/users/{userId}",path:{bookingId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error.",503:"Service unavailable, please try again."}})}static createBookingsAdmin(e){return t(o,{method:"POST",url:"/admin/bookings/time",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static updateBookingAdmin(e,r){return t(o,{method:"PATCH",url:"/admin/bookings/time/{bookingId}",path:{bookingId:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static deleteBookingAdmin(e,r,a){return t(o,{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 W=class{static getCheckout(e){return t(o,{method:"GET",url:"/checkout/{token}",path:{token:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getPspSession(e,r,a){return t(o,{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 Y=class{static updateCompetitionAccount(e){return t(o,{method:"PUT",url:"/admin/competition/account/update",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized.",403:"The request was denied due to insufficient permissions.",500:"General Error.",503:"Service unavailable, please try again."}})}};var K=class{static options(e){return t(o,{method:"OPTIONS",url:"/{cors+}",path:{"cors+":e},responseHeader:"Access-Control-Allow-Origin"})}};var J=class{static createPromoCode(e){return t(o,{method:"POST",url:"/admin/loyalty/promo-codes",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}};var $=class{static createMembership(e){return t(o,{method:"POST",url:"/users/memberships",body:e,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static cancellationPolicy(e,r){return t(o,{method:"GET",url:"/users/memberships/{membershipTypeId}/cancellation-policy",path:{membershipTypeId:e},query:{locale:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}};var Q=class{static getPlaySessionById(e){return t(o,{method:"GET",url:"/playsessions/{sessionId}",path:{sessionId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getPlaySessionByBookingId(e){return t(o,{method:"GET",url:"/playsessions/by-bookingid/{bookingId}",path:{bookingId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static addPlayerWithUserId(e,r){return t(o,{method:"POST",url:"/playsessions/{sessionId}/players/by-userid/{userId}",path:{sessionId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static removePlayerWithUserId(e,r){return t(o,{method:"DELETE",url:"/playsessions/{sessionId}/players/by-userid/{userId}",path:{sessionId:e,userId:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static addUserWithId(e,r,a){return t(o,{method:"POST",url:"/playsessions/{sessionId}/users/{userId}",path:{sessionId:e,userId:r},body:a,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static removePlayerWithUserEmail(e,r){return t(o,{method:"DELETE",url:"/playsessions/{sessionId}/players/by-email/{userEmail}",path:{sessionId:e,userEmail:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static updatePlaySessionSettings(e,r){return t(o,{method:"PUT",url:"/playsessions/{sessionId}/settings",path:{sessionId:e},body:r,mediaType:"application/json",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",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 t(o,{method:"POST",url:"/users/playsessions/{sessionId}/join",path:{sessionId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserPlaySessions(e,r=10,a="UPCOMING",s="ALL"){return t(o,{method:"GET",url:"/users/playsessions",query:{offset:e,limit:r,direction:a,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 t(o,{method:"GET",url:"/users/playsessions/history",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserPlaySessionsUpcoming(){return t(o,{method:"GET",url:"/users/playsessions/upcoming",errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static getUserPlaySessionsMarketplace(e,r,a,s,l,n=10){return t(o,{method:"GET",url:"/users/playsessions/marketplace",query:{facilityIds:e,startDateTime:r,endDateTime:a,sportIds:s,availableSpots: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 X=class{static getUserProfile(e){return t(o,{method:"GET",url:"/profiles/users/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static listChats(e="ALL",r,a=10){return t(o,{method:"GET",url:"/users/chats",query:{userChatStatus:e,offset:r,limit:a},errors:{400:"Illegal input for operation.",500:"General Error.",503:"Service unavailable, please try again."}})}static createChat(e){return t(o,{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 addUserToChat(e,r){return t(o,{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 t(o,{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 t(o,{method:"GET",url:"/users/chats/auth",errors:{401:"Unauthorized.",500:"General Error."}})}static getUsersProfile(){return t(o,{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 t(o,{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 t(o,{method:"GET",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static addRelationToFriend(e){return t(o,{method:"POST",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",409:"Conflict with the current state of the target resource.",500:"General Error.",503:"Service unavailable, please try again."}})}static deleteRelationToFriend(e){return t(o,{method:"DELETE",url:"/users/relations/friends/{userId}",path:{userId:e},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static listFriends(e,r=10){return t(o,{method:"GET",url:"/users/relations/friends",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static listIncomingFriendRequests(e,r=10){return t(o,{method:"GET",url:"/users/relations/friends/incoming",query:{offset:e,limit:r},errors:{400:"Illegal input for operation.",401:"Unauthorized.",404:"The specified resource was not found.",500:"General Error.",503:"Service unavailable, please try again."}})}static listUserOfferPunchCards(e,r=10){return t(o,{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 t(o,{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."}})}};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,clientType,createChatResponse,directionParam,months,pendingPayment,playSessionSettings,playSessionUser,playerStatusParam,playingUserResponse,userChatStatusParam,userPunchCard});