@matchi/api 0.20250130.1 → 0.20250203.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main/index.d.mts +28 -1
- package/dist/main/index.d.ts +28 -1
- package/dist/main/index.js +1 -1
- package/dist/main/index.mjs +1 -1
- package/dist/v1/@tanstack/react-query.gen.d.mts +63 -2
- package/dist/v1/@tanstack/react-query.gen.d.ts +63 -2
- package/dist/v1/@tanstack/react-query.gen.js +1 -1
- package/dist/v1/@tanstack/react-query.gen.mjs +1 -1
- package/dist/v1/chunk-M5A265XW.mjs +1 -0
- package/dist/v1/index.d.mts +2 -2
- package/dist/v1/index.d.ts +2 -2
- package/dist/v1/index.js +1 -1
- package/dist/v1/index.mjs +1 -1
- package/dist/v1/schemas.gen.d.mts +288 -3
- package/dist/v1/schemas.gen.d.ts +288 -3
- package/dist/v1/schemas.gen.js +1 -1
- package/dist/v1/schemas.gen.mjs +1 -1
- package/dist/v1/sdk.gen.d.mts +12 -2
- package/dist/v1/sdk.gen.d.ts +12 -2
- package/dist/v1/sdk.gen.js +1 -1
- package/dist/v1/sdk.gen.mjs +1 -1
- package/dist/v1/types.gen.d.mts +191 -1
- package/dist/v1/types.gen.d.ts +191 -1
- package/dist/v1/types.gen.js +1 -1
- package/package.json +1 -1
- package/dist/v1/chunk-SNGJPP3Q.mjs +0 -1
package/dist/v1/schemas.gen.d.ts
CHANGED
|
@@ -102,6 +102,272 @@ declare const CreateBookingSchema: {
|
|
|
102
102
|
readonly required: readonly ["booker", "location", "start_time", "end_time", "participants", "payment_reference"];
|
|
103
103
|
readonly type: "object";
|
|
104
104
|
};
|
|
105
|
+
declare const FacilityOfferSchema: {
|
|
106
|
+
readonly properties: {
|
|
107
|
+
readonly data: {
|
|
108
|
+
readonly oneOf: readonly [{
|
|
109
|
+
readonly $ref: "#/components/schemas/FacilityPunchCardData";
|
|
110
|
+
}, {
|
|
111
|
+
readonly $ref: "#/components/schemas/FacilityValueCardData";
|
|
112
|
+
}];
|
|
113
|
+
};
|
|
114
|
+
readonly type: {
|
|
115
|
+
readonly enum: readonly ["FACILITY_PUNCH_CARD", "FACILITY_VALUE_CARD"];
|
|
116
|
+
readonly type: "string";
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
readonly required: readonly ["type", "data"];
|
|
120
|
+
readonly type: "object";
|
|
121
|
+
};
|
|
122
|
+
declare const FacilityOfferConditionSchema: {
|
|
123
|
+
readonly oneOf: readonly [{
|
|
124
|
+
readonly $ref: "#/components/schemas/FacilityOfferConditionWeekdays";
|
|
125
|
+
}, {
|
|
126
|
+
readonly $ref: "#/components/schemas/FacilityOfferConditionCourts";
|
|
127
|
+
}, {
|
|
128
|
+
readonly $ref: "#/components/schemas/FacilityOfferConditionDate";
|
|
129
|
+
}, {
|
|
130
|
+
readonly $ref: "#/components/schemas/FacilityOfferConditionTime";
|
|
131
|
+
}, {
|
|
132
|
+
readonly $ref: "#/components/schemas/FacilityOfferConditionHoursinadvance";
|
|
133
|
+
}, {
|
|
134
|
+
readonly $ref: "#/components/schemas/FacilityOfferConditionActivities";
|
|
135
|
+
}, {
|
|
136
|
+
readonly $ref: "#/components/schemas/FacilityOfferConditionNotImplemented";
|
|
137
|
+
}];
|
|
138
|
+
readonly properties: {
|
|
139
|
+
readonly type: {
|
|
140
|
+
readonly enum: readonly ["WEEKDAYS", "COURTS", "DATE", "TIME", "HOURSINADVANCE", "ACTIVITIES", "NOT_IMPLEMENTED"];
|
|
141
|
+
readonly type: "string";
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
readonly type: "object";
|
|
145
|
+
};
|
|
146
|
+
declare const FacilityOfferConditionActivitiesSchema: {
|
|
147
|
+
readonly properties: {
|
|
148
|
+
readonly all_activities: {
|
|
149
|
+
readonly type: "boolean";
|
|
150
|
+
};
|
|
151
|
+
readonly not_valid_for_activities: {
|
|
152
|
+
readonly type: "boolean";
|
|
153
|
+
};
|
|
154
|
+
readonly type: {
|
|
155
|
+
readonly type: "string";
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
readonly required: readonly ["type", "not_valid_for_activities", "all_activities"];
|
|
159
|
+
readonly type: "object";
|
|
160
|
+
};
|
|
161
|
+
declare const FacilityOfferConditionCourtsSchema: {
|
|
162
|
+
readonly properties: {
|
|
163
|
+
readonly name: {
|
|
164
|
+
readonly type: "string";
|
|
165
|
+
};
|
|
166
|
+
readonly type: {
|
|
167
|
+
readonly type: "string";
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
readonly required: readonly ["type"];
|
|
171
|
+
readonly type: "object";
|
|
172
|
+
};
|
|
173
|
+
declare const FacilityOfferConditionDateSchema: {
|
|
174
|
+
readonly properties: {
|
|
175
|
+
readonly end_date: {
|
|
176
|
+
readonly format: "date-time";
|
|
177
|
+
readonly type: "string";
|
|
178
|
+
};
|
|
179
|
+
readonly start_date: {
|
|
180
|
+
readonly format: "date-time";
|
|
181
|
+
readonly type: "string";
|
|
182
|
+
};
|
|
183
|
+
readonly type: {
|
|
184
|
+
readonly type: "string";
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
readonly required: readonly ["type", "start_date", "end_date"];
|
|
188
|
+
readonly type: "object";
|
|
189
|
+
};
|
|
190
|
+
declare const FacilityOfferConditionHoursinadvanceSchema: {
|
|
191
|
+
readonly properties: {
|
|
192
|
+
readonly nr_of_hours: {
|
|
193
|
+
readonly type: "integer";
|
|
194
|
+
};
|
|
195
|
+
readonly type: {
|
|
196
|
+
readonly type: "string";
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
readonly required: readonly ["type", "nr_of_hours"];
|
|
200
|
+
readonly type: "object";
|
|
201
|
+
};
|
|
202
|
+
declare const FacilityOfferConditionNotImplementedSchema: {
|
|
203
|
+
readonly properties: {
|
|
204
|
+
readonly type: {
|
|
205
|
+
readonly type: "string";
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
readonly required: readonly ["type"];
|
|
209
|
+
readonly type: "object";
|
|
210
|
+
};
|
|
211
|
+
declare const FacilityOfferConditionTimeSchema: {
|
|
212
|
+
readonly properties: {
|
|
213
|
+
readonly end_time: {
|
|
214
|
+
readonly format: "time";
|
|
215
|
+
readonly type: "string";
|
|
216
|
+
};
|
|
217
|
+
readonly start_time: {
|
|
218
|
+
readonly format: "time";
|
|
219
|
+
readonly type: "string";
|
|
220
|
+
};
|
|
221
|
+
readonly type: {
|
|
222
|
+
readonly type: "string";
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
readonly required: readonly ["type", "start_time", "end_time"];
|
|
226
|
+
readonly type: "object";
|
|
227
|
+
};
|
|
228
|
+
declare const FacilityOfferConditionWeekdaysSchema: {
|
|
229
|
+
readonly properties: {
|
|
230
|
+
readonly type: {
|
|
231
|
+
readonly type: "string";
|
|
232
|
+
};
|
|
233
|
+
readonly weekdays: {
|
|
234
|
+
readonly items: {
|
|
235
|
+
readonly description: "Interger representation of weekday. 1 (Monday), 7 (Sunday).";
|
|
236
|
+
readonly type: "integer";
|
|
237
|
+
};
|
|
238
|
+
readonly type: "array";
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
readonly required: readonly ["type", "weekdays"];
|
|
242
|
+
readonly type: "object";
|
|
243
|
+
};
|
|
244
|
+
declare const FacilityOfferListSchema: {
|
|
245
|
+
readonly properties: {
|
|
246
|
+
readonly data: {
|
|
247
|
+
readonly items: {
|
|
248
|
+
readonly $ref: "#/components/schemas/FacilityOffer";
|
|
249
|
+
};
|
|
250
|
+
readonly type: "array";
|
|
251
|
+
};
|
|
252
|
+
readonly meta: {
|
|
253
|
+
readonly $ref: "#/components/schemas/pkgOpenapiSharedCursorPaginatedResultSet";
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
readonly required: readonly ["data", "meta"];
|
|
257
|
+
readonly type: "object";
|
|
258
|
+
};
|
|
259
|
+
declare const FacilityOfferOrderSchema: {
|
|
260
|
+
readonly properties: {
|
|
261
|
+
readonly checkout_url: {
|
|
262
|
+
readonly description: "The URL to the checkout page for the facility offer order";
|
|
263
|
+
readonly example: "https://checkout.matchi.com/pay/1b44a93b24a3413dadsee96e1bc7a4350ecac";
|
|
264
|
+
readonly format: "uri";
|
|
265
|
+
readonly type: "string";
|
|
266
|
+
};
|
|
267
|
+
readonly id: {
|
|
268
|
+
readonly type: "string";
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
readonly required: readonly ["id", "checkout_url"];
|
|
272
|
+
readonly type: "object";
|
|
273
|
+
};
|
|
274
|
+
declare const FacilityPunchCardDataSchema: {
|
|
275
|
+
readonly properties: {
|
|
276
|
+
readonly conditions: {
|
|
277
|
+
readonly items: {
|
|
278
|
+
readonly $ref: "#/components/schemas/FacilityOfferCondition";
|
|
279
|
+
};
|
|
280
|
+
readonly type: "array";
|
|
281
|
+
};
|
|
282
|
+
readonly description: {
|
|
283
|
+
readonly nullable: true;
|
|
284
|
+
readonly type: "string";
|
|
285
|
+
};
|
|
286
|
+
readonly expire_date: {
|
|
287
|
+
readonly format: "date-time";
|
|
288
|
+
readonly type: "string";
|
|
289
|
+
};
|
|
290
|
+
readonly facility_id: {
|
|
291
|
+
readonly type: "integer";
|
|
292
|
+
};
|
|
293
|
+
readonly facility_receive_membership_requests: {
|
|
294
|
+
readonly type: "boolean";
|
|
295
|
+
};
|
|
296
|
+
readonly id: {
|
|
297
|
+
readonly type: "integer";
|
|
298
|
+
};
|
|
299
|
+
readonly max_duration: {
|
|
300
|
+
readonly type: "integer";
|
|
301
|
+
};
|
|
302
|
+
readonly members_only: {
|
|
303
|
+
readonly type: "boolean";
|
|
304
|
+
};
|
|
305
|
+
readonly name: {
|
|
306
|
+
readonly type: "string";
|
|
307
|
+
};
|
|
308
|
+
readonly nr_of_bookings_in_period: {
|
|
309
|
+
readonly type: "integer";
|
|
310
|
+
};
|
|
311
|
+
readonly nr_of_days_valid: {
|
|
312
|
+
readonly type: "integer";
|
|
313
|
+
};
|
|
314
|
+
readonly nr_of_tickets: {
|
|
315
|
+
readonly type: "integer";
|
|
316
|
+
};
|
|
317
|
+
readonly price: {
|
|
318
|
+
readonly type: "string";
|
|
319
|
+
};
|
|
320
|
+
readonly unlimited: {
|
|
321
|
+
readonly type: "boolean";
|
|
322
|
+
};
|
|
323
|
+
readonly user_has_active_membership: {
|
|
324
|
+
readonly type: "boolean";
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
readonly required: readonly ["id", "facility_id", "name", "description", "price", "unlimited", "max_duration", "nr_of_days_valid", "nr_of_tickets", "members_only", "user_has_active_membership", "facility_receive_membership_requests", "expire_date", "conditions", "nr_of_bookings_in_period"];
|
|
328
|
+
readonly type: "object";
|
|
329
|
+
};
|
|
330
|
+
declare const FacilityValueCardDataSchema: {
|
|
331
|
+
readonly properties: {
|
|
332
|
+
readonly amount: {
|
|
333
|
+
readonly type: "string";
|
|
334
|
+
};
|
|
335
|
+
readonly description: {
|
|
336
|
+
readonly nullable: true;
|
|
337
|
+
readonly type: "string";
|
|
338
|
+
};
|
|
339
|
+
readonly expire_date: {
|
|
340
|
+
readonly format: "date-time";
|
|
341
|
+
readonly type: "string";
|
|
342
|
+
};
|
|
343
|
+
readonly facility_id: {
|
|
344
|
+
readonly type: "integer";
|
|
345
|
+
};
|
|
346
|
+
readonly facility_receive_membership_requests: {
|
|
347
|
+
readonly type: "boolean";
|
|
348
|
+
};
|
|
349
|
+
readonly id: {
|
|
350
|
+
readonly type: "integer";
|
|
351
|
+
};
|
|
352
|
+
readonly members_only: {
|
|
353
|
+
readonly type: "boolean";
|
|
354
|
+
};
|
|
355
|
+
readonly name: {
|
|
356
|
+
readonly type: "string";
|
|
357
|
+
};
|
|
358
|
+
readonly nr_of_days_valid: {
|
|
359
|
+
readonly type: "integer";
|
|
360
|
+
};
|
|
361
|
+
readonly price: {
|
|
362
|
+
readonly type: "string";
|
|
363
|
+
};
|
|
364
|
+
readonly user_has_active_membership: {
|
|
365
|
+
readonly type: "boolean";
|
|
366
|
+
};
|
|
367
|
+
};
|
|
368
|
+
readonly required: readonly ["id", "facility_id", "name", "description", "price", "nr_of_days_valid", "amount", "members_only", "user_has_active_membership", "facility_receive_membership_requests", "expire_date"];
|
|
369
|
+
readonly type: "object";
|
|
370
|
+
};
|
|
105
371
|
declare const GuestSchema: {
|
|
106
372
|
readonly properties: {
|
|
107
373
|
readonly email: {
|
|
@@ -165,6 +431,25 @@ declare const UpdateBookingSchema: {
|
|
|
165
431
|
readonly required: readonly ["booker", "location", "start_time", "end_time", "participants", "payment_reference"];
|
|
166
432
|
readonly type: "object";
|
|
167
433
|
};
|
|
434
|
+
declare const pkgOpenapiSharedCursorPaginatedResultSetSchema: {
|
|
435
|
+
readonly description: "Metadata about the cursor based pagination for the result. This information is coupled with the CursorParam and CursorLimitParam. Intended to be used as the `meta` field in a list response, next to an `items` array field containing the data.\n";
|
|
436
|
+
readonly properties: {
|
|
437
|
+
readonly current_cursor: {
|
|
438
|
+
readonly description: "Cursor used to retrieve the current page of results.";
|
|
439
|
+
readonly type: "string";
|
|
440
|
+
};
|
|
441
|
+
readonly more_results: {
|
|
442
|
+
readonly description: "Indicates if there are more results available.";
|
|
443
|
+
readonly type: "boolean";
|
|
444
|
+
};
|
|
445
|
+
readonly next_cursor: {
|
|
446
|
+
readonly description: "Cursor to retrieve the next page of results.";
|
|
447
|
+
readonly type: "string";
|
|
448
|
+
};
|
|
449
|
+
};
|
|
450
|
+
readonly required: readonly ["current_cursor", "more_results"];
|
|
451
|
+
readonly type: "object";
|
|
452
|
+
};
|
|
168
453
|
declare const pkgOpenapiSharedErrorSchema: {
|
|
169
454
|
readonly properties: {
|
|
170
455
|
readonly message: {
|
|
@@ -188,14 +473,14 @@ declare const pkgOpenapiSharedOffsetPaginatedResultSetSchema: {
|
|
|
188
473
|
readonly limit: {
|
|
189
474
|
readonly type: "integer";
|
|
190
475
|
};
|
|
191
|
-
readonly
|
|
476
|
+
readonly more_results: {
|
|
192
477
|
readonly type: "boolean";
|
|
193
478
|
};
|
|
194
479
|
readonly offset: {
|
|
195
480
|
readonly type: "integer";
|
|
196
481
|
};
|
|
197
482
|
};
|
|
198
|
-
readonly required: readonly ["offset", "limit", "
|
|
483
|
+
readonly required: readonly ["offset", "limit", "more_results"];
|
|
199
484
|
readonly type: "object";
|
|
200
485
|
};
|
|
201
486
|
declare const pkgOpenapiSharedProblemDetailsSchema: {
|
|
@@ -236,4 +521,4 @@ declare const pkgOpenapiSharedProblemDetailsSchema: {
|
|
|
236
521
|
readonly type: "object";
|
|
237
522
|
};
|
|
238
523
|
|
|
239
|
-
export { BookingSchema, CreateBookingSchema, GuestSchema, PlayerSchema, UpdateBookingSchema, pkgOpenapiSharedErrorSchema, pkgOpenapiSharedErrorsSchema, pkgOpenapiSharedOffsetPaginatedResultSetSchema, pkgOpenapiSharedProblemDetailsSchema };
|
|
524
|
+
export { BookingSchema, CreateBookingSchema, FacilityOfferConditionActivitiesSchema, FacilityOfferConditionCourtsSchema, FacilityOfferConditionDateSchema, FacilityOfferConditionHoursinadvanceSchema, FacilityOfferConditionNotImplementedSchema, FacilityOfferConditionSchema, FacilityOfferConditionTimeSchema, FacilityOfferConditionWeekdaysSchema, FacilityOfferListSchema, FacilityOfferOrderSchema, FacilityOfferSchema, FacilityPunchCardDataSchema, FacilityValueCardDataSchema, GuestSchema, PlayerSchema, UpdateBookingSchema, pkgOpenapiSharedCursorPaginatedResultSetSchema, pkgOpenapiSharedErrorSchema, pkgOpenapiSharedErrorsSchema, pkgOpenapiSharedOffsetPaginatedResultSetSchema, pkgOpenapiSharedProblemDetailsSchema };
|
package/dist/v1/schemas.gen.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var a=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var c=(t,e)=>{for(var i in e)a(t,i,{get:e[i],enumerable:!0})},m=(t,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of n(e))!p.call(t,r)&&r!==i&&a(t,r,{get:()=>e[r],enumerable:!(o=s(e,r))||o.enumerable});return t};var y=t=>m(a({},"__esModule",{value:!0}),t);var D={};c(D,{BookingSchema:()=>d,CreateBookingSchema:()=>f,FacilityOfferConditionActivitiesSchema:()=>_,FacilityOfferConditionCourtsSchema:()=>h,FacilityOfferConditionDateSchema:()=>g,FacilityOfferConditionHoursinadvanceSchema:()=>b,FacilityOfferConditionNotImplementedSchema:()=>x,FacilityOfferConditionSchema:()=>u,FacilityOfferConditionTimeSchema:()=>S,FacilityOfferConditionWeekdaysSchema:()=>C,FacilityOfferListSchema:()=>O,FacilityOfferOrderSchema:()=>k,FacilityOfferSchema:()=>l,FacilityPunchCardDataSchema:()=>v,FacilityValueCardDataSchema:()=>F,GuestSchema:()=>j,PlayerSchema:()=>q,UpdateBookingSchema:()=>I,pkgOpenapiSharedCursorPaginatedResultSetSchema:()=>$,pkgOpenapiSharedErrorSchema:()=>T,pkgOpenapiSharedErrorsSchema:()=>A,pkgOpenapiSharedOffsetPaginatedResultSetSchema:()=>P,pkgOpenapiSharedProblemDetailsSchema:()=>E});module.exports=y(D);var d={properties:{booker:{format:"uuid",type:"string"},created_at:{format:"date-time",type:"string"},created_by:{type:"string"},end_time:{format:"date-time",type:"string"},id:{format:"uuid",type:"string"},location:{type:"string"},participants:{properties:{guests:{items:{$ref:"#/components/schemas/Guest"},type:"array"},players:{items:{$ref:"#/components/schemas/Player"},type:"array"}},required:["guests","players"],type:"object"},payment_reference:{type:"string"},start_time:{format:"date-time",type:"string"},updated_at:{format:"date-time",type:"string"},updated_by:{type:"string"}},required:["id","booker","location","start_time","end_time","created_at","updated_at","participants","payment_reference","created_by","updated_by"],type:"object"},f={properties:{booker:{format:"uuid",type:"string"},created_by:{type:"string"},end_time:{format:"date-time",type:"string"},location:{type:"string"},participants:{properties:{guests:{items:{$ref:"#/components/schemas/Guest"},type:"array"},players:{items:{$ref:"#/components/schemas/Player"},type:"array"}},type:"object"},payment_reference:{type:"string"},start_time:{format:"date-time",type:"string"}},required:["booker","location","start_time","end_time","participants","payment_reference"],type:"object"},l={properties:{data:{oneOf:[{$ref:"#/components/schemas/FacilityPunchCardData"},{$ref:"#/components/schemas/FacilityValueCardData"}]},type:{enum:["FACILITY_PUNCH_CARD","FACILITY_VALUE_CARD"],type:"string"}},required:["type","data"],type:"object"},u={oneOf:[{$ref:"#/components/schemas/FacilityOfferConditionWeekdays"},{$ref:"#/components/schemas/FacilityOfferConditionCourts"},{$ref:"#/components/schemas/FacilityOfferConditionDate"},{$ref:"#/components/schemas/FacilityOfferConditionTime"},{$ref:"#/components/schemas/FacilityOfferConditionHoursinadvance"},{$ref:"#/components/schemas/FacilityOfferConditionActivities"},{$ref:"#/components/schemas/FacilityOfferConditionNotImplemented"}],properties:{type:{enum:["WEEKDAYS","COURTS","DATE","TIME","HOURSINADVANCE","ACTIVITIES","NOT_IMPLEMENTED"],type:"string"}},type:"object"},_={properties:{all_activities:{type:"boolean"},not_valid_for_activities:{type:"boolean"},type:{type:"string"}},required:["type","not_valid_for_activities","all_activities"],type:"object"},h={properties:{name:{type:"string"},type:{type:"string"}},required:["type"],type:"object"},g={properties:{end_date:{format:"date-time",type:"string"},start_date:{format:"date-time",type:"string"},type:{type:"string"}},required:["type","start_date","end_date"],type:"object"},b={properties:{nr_of_hours:{type:"integer"},type:{type:"string"}},required:["type","nr_of_hours"],type:"object"},x={properties:{type:{type:"string"}},required:["type"],type:"object"},S={properties:{end_time:{format:"time",type:"string"},start_time:{format:"time",type:"string"},type:{type:"string"}},required:["type","start_time","end_time"],type:"object"},C={properties:{type:{type:"string"},weekdays:{items:{description:"Interger representation of weekday. 1 (Monday), 7 (Sunday).",type:"integer"},type:"array"}},required:["type","weekdays"],type:"object"},O={properties:{data:{items:{$ref:"#/components/schemas/FacilityOffer"},type:"array"},meta:{$ref:"#/components/schemas/pkgOpenapiSharedCursorPaginatedResultSet"}},required:["data","meta"],type:"object"},k={properties:{checkout_url:{description:"The URL to the checkout page for the facility offer order",example:"https://checkout.matchi.com/pay/1b44a93b24a3413dadsee96e1bc7a4350ecac",format:"uri",type:"string"},id:{type:"string"}},required:["id","checkout_url"],type:"object"},v={properties:{conditions:{items:{$ref:"#/components/schemas/FacilityOfferCondition"},type:"array"},description:{nullable:!0,type:"string"},expire_date:{format:"date-time",type:"string"},facility_id:{type:"integer"},facility_receive_membership_requests:{type:"boolean"},id:{type:"integer"},max_duration:{type:"integer"},members_only:{type:"boolean"},name:{type:"string"},nr_of_bookings_in_period:{type:"integer"},nr_of_days_valid:{type:"integer"},nr_of_tickets:{type:"integer"},price:{type:"string"},unlimited:{type:"boolean"},user_has_active_membership:{type:"boolean"}},required:["id","facility_id","name","description","price","unlimited","max_duration","nr_of_days_valid","nr_of_tickets","members_only","user_has_active_membership","facility_receive_membership_requests","expire_date","conditions","nr_of_bookings_in_period"],type:"object"},F={properties:{amount:{type:"string"},description:{nullable:!0,type:"string"},expire_date:{format:"date-time",type:"string"},facility_id:{type:"integer"},facility_receive_membership_requests:{type:"boolean"},id:{type:"integer"},members_only:{type:"boolean"},name:{type:"string"},nr_of_days_valid:{type:"integer"},price:{type:"string"},user_has_active_membership:{type:"boolean"}},required:["id","facility_id","name","description","price","nr_of_days_valid","amount","members_only","user_has_active_membership","facility_receive_membership_requests","expire_date"],type:"object"},j={properties:{email:{type:"string"}},required:["email"],type:"object"},q={properties:{email:{type:"string"},id:{format:"uuid",type:"string"}},required:["id","email"],type:"object"},I={properties:{booker:{format:"uuid",type:"string"},end_time:{format:"date-time",type:"string"},location:{type:"string"},participants:{properties:{guests:{items:{$ref:"#/components/schemas/Guest"},type:"array"},players:{items:{$ref:"#/components/schemas/Player"},type:"array"}},type:"object"},payment_reference:{type:"string"},start_time:{format:"date-time",type:"string"}},required:["booker","location","start_time","end_time","participants","payment_reference"],type:"object"},$={description:"Metadata about the cursor based pagination for the result. This information is coupled with the CursorParam and CursorLimitParam. Intended to be used as the `meta` field in a list response, next to an `items` array field containing the data.\n",properties:{current_cursor:{description:"Cursor used to retrieve the current page of results.",type:"string"},more_results:{description:"Indicates if there are more results available.",type:"boolean"},next_cursor:{description:"Cursor to retrieve the next page of results.",type:"string"}},required:["current_cursor","more_results"],type:"object"},T={properties:{message:{description:"The error message",type:"string"}},type:"object"},A={description:"An array of error details to accompany a problem details response.",items:{$ref:"#/components/schemas/pkgOpenapiSharedError"},maxItems:1e3,type:"array"},P={description:"Metadata about the offset based pagination for the result. This information is coupled with the OffsetParam and OffsetLimitParam. Intended to be used as the `meta` field in a list response, next to an `items` array field containing the data.\n",properties:{limit:{type:"integer"},more_results:{type:"boolean"},offset:{type:"integer"}},required:["offset","limit","more_results"],type:"object"},E={properties:{detail:{description:"A human-readable explanation specific to this occurrence of the problem.",maxLength:4096,type:"string"},errors:{$ref:"#/components/schemas/pkgOpenapiSharedErrors"},instance:{description:"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.",maxLength:1024,type:"string"},status:{description:"The HTTP status code generated by the origin server for this occurrence of the problem.",format:"int32",maximum:599,minimum:100,type:"integer"},title:{description:"A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization.",maxLength:1024,type:"string"},type:{description:"A URI reference that identifies the problem type.",format:"uri",maxLength:1024,type:"string"}},required:["title"],type:"object"};0&&(module.exports={BookingSchema,CreateBookingSchema,FacilityOfferConditionActivitiesSchema,FacilityOfferConditionCourtsSchema,FacilityOfferConditionDateSchema,FacilityOfferConditionHoursinadvanceSchema,FacilityOfferConditionNotImplementedSchema,FacilityOfferConditionSchema,FacilityOfferConditionTimeSchema,FacilityOfferConditionWeekdaysSchema,FacilityOfferListSchema,FacilityOfferOrderSchema,FacilityOfferSchema,FacilityPunchCardDataSchema,FacilityValueCardDataSchema,GuestSchema,PlayerSchema,UpdateBookingSchema,pkgOpenapiSharedCursorPaginatedResultSetSchema,pkgOpenapiSharedErrorSchema,pkgOpenapiSharedErrorsSchema,pkgOpenapiSharedOffsetPaginatedResultSetSchema,pkgOpenapiSharedProblemDetailsSchema});
|
package/dist/v1/schemas.gen.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={properties:{booker:{format:"uuid",type:"string"},created_at:{format:"date-time",type:"string"},created_by:{type:"string"},end_time:{format:"date-time",type:"string"},id:{format:"uuid",type:"string"},location:{type:"string"},participants:{properties:{guests:{items:{$ref:"#/components/schemas/Guest"},type:"array"},players:{items:{$ref:"#/components/schemas/Player"},type:"array"}},required:["guests","players"],type:"object"},payment_reference:{type:"string"},start_time:{format:"date-time",type:"string"},updated_at:{format:"date-time",type:"string"},updated_by:{type:"string"}},required:["id","booker","location","start_time","end_time","created_at","updated_at","participants","payment_reference","created_by","updated_by"],type:"object"},t={properties:{booker:{format:"uuid",type:"string"},created_by:{type:"string"},end_time:{format:"date-time",type:"string"},location:{type:"string"},participants:{properties:{guests:{items:{$ref:"#/components/schemas/Guest"},type:"array"},players:{items:{$ref:"#/components/schemas/Player"},type:"array"}},type:"object"},payment_reference:{type:"string"},start_time:{format:"date-time",type:"string"}},required:["booker","location","start_time","end_time","participants","payment_reference"],type:"object"},r={properties:{email:{type:"string"}},required:["email"],type:"object"},
|
|
1
|
+
var e={properties:{booker:{format:"uuid",type:"string"},created_at:{format:"date-time",type:"string"},created_by:{type:"string"},end_time:{format:"date-time",type:"string"},id:{format:"uuid",type:"string"},location:{type:"string"},participants:{properties:{guests:{items:{$ref:"#/components/schemas/Guest"},type:"array"},players:{items:{$ref:"#/components/schemas/Player"},type:"array"}},required:["guests","players"],type:"object"},payment_reference:{type:"string"},start_time:{format:"date-time",type:"string"},updated_at:{format:"date-time",type:"string"},updated_by:{type:"string"}},required:["id","booker","location","start_time","end_time","created_at","updated_at","participants","payment_reference","created_by","updated_by"],type:"object"},t={properties:{booker:{format:"uuid",type:"string"},created_by:{type:"string"},end_time:{format:"date-time",type:"string"},location:{type:"string"},participants:{properties:{guests:{items:{$ref:"#/components/schemas/Guest"},type:"array"},players:{items:{$ref:"#/components/schemas/Player"},type:"array"}},type:"object"},payment_reference:{type:"string"},start_time:{format:"date-time",type:"string"}},required:["booker","location","start_time","end_time","participants","payment_reference"],type:"object"},r={properties:{data:{oneOf:[{$ref:"#/components/schemas/FacilityPunchCardData"},{$ref:"#/components/schemas/FacilityValueCardData"}]},type:{enum:["FACILITY_PUNCH_CARD","FACILITY_VALUE_CARD"],type:"string"}},required:["type","data"],type:"object"},i={oneOf:[{$ref:"#/components/schemas/FacilityOfferConditionWeekdays"},{$ref:"#/components/schemas/FacilityOfferConditionCourts"},{$ref:"#/components/schemas/FacilityOfferConditionDate"},{$ref:"#/components/schemas/FacilityOfferConditionTime"},{$ref:"#/components/schemas/FacilityOfferConditionHoursinadvance"},{$ref:"#/components/schemas/FacilityOfferConditionActivities"},{$ref:"#/components/schemas/FacilityOfferConditionNotImplemented"}],properties:{type:{enum:["WEEKDAYS","COURTS","DATE","TIME","HOURSINADVANCE","ACTIVITIES","NOT_IMPLEMENTED"],type:"string"}},type:"object"},a={properties:{all_activities:{type:"boolean"},not_valid_for_activities:{type:"boolean"},type:{type:"string"}},required:["type","not_valid_for_activities","all_activities"],type:"object"},o={properties:{name:{type:"string"},type:{type:"string"}},required:["type"],type:"object"},s={properties:{end_date:{format:"date-time",type:"string"},start_date:{format:"date-time",type:"string"},type:{type:"string"}},required:["type","start_date","end_date"],type:"object"},n={properties:{nr_of_hours:{type:"integer"},type:{type:"string"}},required:["type","nr_of_hours"],type:"object"},p={properties:{type:{type:"string"}},required:["type"],type:"object"},c={properties:{end_time:{format:"time",type:"string"},start_time:{format:"time",type:"string"},type:{type:"string"}},required:["type","start_time","end_time"],type:"object"},m={properties:{type:{type:"string"},weekdays:{items:{description:"Interger representation of weekday. 1 (Monday), 7 (Sunday).",type:"integer"},type:"array"}},required:["type","weekdays"],type:"object"},y={properties:{data:{items:{$ref:"#/components/schemas/FacilityOffer"},type:"array"},meta:{$ref:"#/components/schemas/pkgOpenapiSharedCursorPaginatedResultSet"}},required:["data","meta"],type:"object"},d={properties:{checkout_url:{description:"The URL to the checkout page for the facility offer order",example:"https://checkout.matchi.com/pay/1b44a93b24a3413dadsee96e1bc7a4350ecac",format:"uri",type:"string"},id:{type:"string"}},required:["id","checkout_url"],type:"object"},f={properties:{conditions:{items:{$ref:"#/components/schemas/FacilityOfferCondition"},type:"array"},description:{nullable:!0,type:"string"},expire_date:{format:"date-time",type:"string"},facility_id:{type:"integer"},facility_receive_membership_requests:{type:"boolean"},id:{type:"integer"},max_duration:{type:"integer"},members_only:{type:"boolean"},name:{type:"string"},nr_of_bookings_in_period:{type:"integer"},nr_of_days_valid:{type:"integer"},nr_of_tickets:{type:"integer"},price:{type:"string"},unlimited:{type:"boolean"},user_has_active_membership:{type:"boolean"}},required:["id","facility_id","name","description","price","unlimited","max_duration","nr_of_days_valid","nr_of_tickets","members_only","user_has_active_membership","facility_receive_membership_requests","expire_date","conditions","nr_of_bookings_in_period"],type:"object"},l={properties:{amount:{type:"string"},description:{nullable:!0,type:"string"},expire_date:{format:"date-time",type:"string"},facility_id:{type:"integer"},facility_receive_membership_requests:{type:"boolean"},id:{type:"integer"},members_only:{type:"boolean"},name:{type:"string"},nr_of_days_valid:{type:"integer"},price:{type:"string"},user_has_active_membership:{type:"boolean"}},required:["id","facility_id","name","description","price","nr_of_days_valid","amount","members_only","user_has_active_membership","facility_receive_membership_requests","expire_date"],type:"object"},u={properties:{email:{type:"string"}},required:["email"],type:"object"},_={properties:{email:{type:"string"},id:{format:"uuid",type:"string"}},required:["id","email"],type:"object"},h={properties:{booker:{format:"uuid",type:"string"},end_time:{format:"date-time",type:"string"},location:{type:"string"},participants:{properties:{guests:{items:{$ref:"#/components/schemas/Guest"},type:"array"},players:{items:{$ref:"#/components/schemas/Player"},type:"array"}},type:"object"},payment_reference:{type:"string"},start_time:{format:"date-time",type:"string"}},required:["booker","location","start_time","end_time","participants","payment_reference"],type:"object"},g={description:"Metadata about the cursor based pagination for the result. This information is coupled with the CursorParam and CursorLimitParam. Intended to be used as the `meta` field in a list response, next to an `items` array field containing the data.\n",properties:{current_cursor:{description:"Cursor used to retrieve the current page of results.",type:"string"},more_results:{description:"Indicates if there are more results available.",type:"boolean"},next_cursor:{description:"Cursor to retrieve the next page of results.",type:"string"}},required:["current_cursor","more_results"],type:"object"},b={properties:{message:{description:"The error message",type:"string"}},type:"object"},x={description:"An array of error details to accompany a problem details response.",items:{$ref:"#/components/schemas/pkgOpenapiSharedError"},maxItems:1e3,type:"array"},S={description:"Metadata about the offset based pagination for the result. This information is coupled with the OffsetParam and OffsetLimitParam. Intended to be used as the `meta` field in a list response, next to an `items` array field containing the data.\n",properties:{limit:{type:"integer"},more_results:{type:"boolean"},offset:{type:"integer"}},required:["offset","limit","more_results"],type:"object"},C={properties:{detail:{description:"A human-readable explanation specific to this occurrence of the problem.",maxLength:4096,type:"string"},errors:{$ref:"#/components/schemas/pkgOpenapiSharedErrors"},instance:{description:"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.",maxLength:1024,type:"string"},status:{description:"The HTTP status code generated by the origin server for this occurrence of the problem.",format:"int32",maximum:599,minimum:100,type:"integer"},title:{description:"A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization.",maxLength:1024,type:"string"},type:{description:"A URI reference that identifies the problem type.",format:"uri",maxLength:1024,type:"string"}},required:["title"],type:"object"};export{e as BookingSchema,t as CreateBookingSchema,a as FacilityOfferConditionActivitiesSchema,o as FacilityOfferConditionCourtsSchema,s as FacilityOfferConditionDateSchema,n as FacilityOfferConditionHoursinadvanceSchema,p as FacilityOfferConditionNotImplementedSchema,i as FacilityOfferConditionSchema,c as FacilityOfferConditionTimeSchema,m as FacilityOfferConditionWeekdaysSchema,y as FacilityOfferListSchema,d as FacilityOfferOrderSchema,r as FacilityOfferSchema,f as FacilityPunchCardDataSchema,l as FacilityValueCardDataSchema,u as GuestSchema,_ as PlayerSchema,h as UpdateBookingSchema,g as pkgOpenapiSharedCursorPaginatedResultSetSchema,b as pkgOpenapiSharedErrorSchema,x as pkgOpenapiSharedErrorsSchema,S as pkgOpenapiSharedOffsetPaginatedResultSetSchema,C as pkgOpenapiSharedProblemDetailsSchema};
|
package/dist/v1/sdk.gen.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FindBookingsData, Booking, PkgOpenapiSharedOffsetPaginatedResultSet, PkgOpenapiSharedProblemDetails, AddBookingData, DeleteBookingData, FindBookingByIdData, UpdateBookingData } from './types.gen.mjs';
|
|
1
|
+
import { FindBookingsData, Booking, PkgOpenapiSharedOffsetPaginatedResultSet, PkgOpenapiSharedProblemDetails, AddBookingData, DeleteBookingData, FindBookingByIdData, UpdateBookingData, ListFacilityOffersData, FacilityOfferList, CreateFacilityOfferOrderData, FacilityOfferOrder } from './types.gen.mjs';
|
|
2
2
|
import * as _hey_api_client_fetch from '@hey-api/client-fetch';
|
|
3
3
|
import { Options } from '@hey-api/client-fetch';
|
|
4
4
|
|
|
@@ -31,5 +31,15 @@ declare const findBookingById: <ThrowOnError extends boolean = false>(options: O
|
|
|
31
31
|
* Update a booking with the specified ID using the provided details
|
|
32
32
|
*/
|
|
33
33
|
declare const updateBooking: <ThrowOnError extends boolean = false>(options: Options<UpdateBookingData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<Booking, PkgOpenapiSharedProblemDetails, ThrowOnError>;
|
|
34
|
+
/**
|
|
35
|
+
* List all offers for a facility
|
|
36
|
+
* Retrieve a list of all facility offers
|
|
37
|
+
*/
|
|
38
|
+
declare const listFacilityOffers: <ThrowOnError extends boolean = false>(options: Options<ListFacilityOffersData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<FacilityOfferList, PkgOpenapiSharedProblemDetails, ThrowOnError>;
|
|
39
|
+
/**
|
|
40
|
+
* Create a facility offer order
|
|
41
|
+
* Will create a facility offer order and return the order object
|
|
42
|
+
*/
|
|
43
|
+
declare const createFacilityOfferOrder: <ThrowOnError extends boolean = false>(options: Options<CreateFacilityOfferOrderData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<FacilityOfferOrder, PkgOpenapiSharedProblemDetails, ThrowOnError>;
|
|
34
44
|
|
|
35
|
-
export { addBooking, client, deleteBooking, findBookingById, findBookings, updateBooking };
|
|
45
|
+
export { addBooking, client, createFacilityOfferOrder, deleteBooking, findBookingById, findBookings, listFacilityOffers, updateBooking };
|
package/dist/v1/sdk.gen.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FindBookingsData, Booking, PkgOpenapiSharedOffsetPaginatedResultSet, PkgOpenapiSharedProblemDetails, AddBookingData, DeleteBookingData, FindBookingByIdData, UpdateBookingData } from './types.gen.js';
|
|
1
|
+
import { FindBookingsData, Booking, PkgOpenapiSharedOffsetPaginatedResultSet, PkgOpenapiSharedProblemDetails, AddBookingData, DeleteBookingData, FindBookingByIdData, UpdateBookingData, ListFacilityOffersData, FacilityOfferList, CreateFacilityOfferOrderData, FacilityOfferOrder } from './types.gen.js';
|
|
2
2
|
import * as _hey_api_client_fetch from '@hey-api/client-fetch';
|
|
3
3
|
import { Options } from '@hey-api/client-fetch';
|
|
4
4
|
|
|
@@ -31,5 +31,15 @@ declare const findBookingById: <ThrowOnError extends boolean = false>(options: O
|
|
|
31
31
|
* Update a booking with the specified ID using the provided details
|
|
32
32
|
*/
|
|
33
33
|
declare const updateBooking: <ThrowOnError extends boolean = false>(options: Options<UpdateBookingData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<Booking, PkgOpenapiSharedProblemDetails, ThrowOnError>;
|
|
34
|
+
/**
|
|
35
|
+
* List all offers for a facility
|
|
36
|
+
* Retrieve a list of all facility offers
|
|
37
|
+
*/
|
|
38
|
+
declare const listFacilityOffers: <ThrowOnError extends boolean = false>(options: Options<ListFacilityOffersData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<FacilityOfferList, PkgOpenapiSharedProblemDetails, ThrowOnError>;
|
|
39
|
+
/**
|
|
40
|
+
* Create a facility offer order
|
|
41
|
+
* Will create a facility offer order and return the order object
|
|
42
|
+
*/
|
|
43
|
+
declare const createFacilityOfferOrder: <ThrowOnError extends boolean = false>(options: Options<CreateFacilityOfferOrderData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<FacilityOfferOrder, PkgOpenapiSharedProblemDetails, ThrowOnError>;
|
|
34
44
|
|
|
35
|
-
export { addBooking, client, deleteBooking, findBookingById, findBookings, updateBooking };
|
|
45
|
+
export { addBooking, client, createFacilityOfferOrder, deleteBooking, findBookingById, findBookings, listFacilityOffers, updateBooking };
|
package/dist/v1/sdk.gen.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var m=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var A=(e,t)=>{for(var r in t)m(e,r,{get:t[r],enumerable:!0})},U=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of S(t))!v.call(e,a)&&a!==r&&m(e,a,{get:()=>t[a],enumerable:!(i=F(t,a))||i.enumerable});return e};var $=e=>U(m({},"__esModule",{value:!0}),e);var te={};A(te,{addBooking:()=>K,client:()=>c,createFacilityOfferOrder:()=>re,deleteBooking:()=>X,findBookingById:()=>Y,findBookings:()=>Q,listFacilityOffers:()=>ee,updateBooking:()=>Z});module.exports=$(te);var q=/\{[^{}]+\}/g,O=({allowReserved:e,name:t,value:r})=>{if(r==null)return"";if(typeof r=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?r:encodeURIComponent(r)}`},I=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},z=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},_=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},x=({allowReserved:e,explode:t,name:r,style:i,value:a})=>{if(!t){let n=(e?a:a.map(l=>encodeURIComponent(l))).join(z(i));switch(i){case"label":return`.${n}`;case"matrix":return`;${r}=${n}`;case"simple":return n;default:return`${r}=${n}`}}let s=I(i),o=a.map(n=>i==="label"||i==="simple"?e?n:encodeURIComponent(n):O({allowReserved:e,name:r,value:n})).join(s);return i==="label"||i==="matrix"?s+o:o},T=({allowReserved:e,explode:t,name:r,style:i,value:a})=>{if(a instanceof Date)return`${r}=${a.toISOString()}`;if(i!=="deepObject"&&!t){let n=[];Object.entries(a).forEach(([p,f])=>{n=[...n,p,e?f:encodeURIComponent(f)]});let l=n.join(",");switch(i){case"form":return`${r}=${l}`;case"label":return`.${l}`;case"matrix":return`;${r}=${l}`;default:return l}}let s=_(i),o=Object.entries(a).map(([n,l])=>O({allowReserved:e,name:i==="deepObject"?`${r}[${n}]`:n,value:l})).join(s);return i==="label"||i==="matrix"?s+o:o},W=({path:e,url:t})=>{let r=t,i=t.match(q);if(i)for(let a of i){let s=!1,o=a.substring(1,a.length-1),n="simple";o.endsWith("*")&&(s=!0,o=o.substring(0,o.length-1)),o.startsWith(".")?(o=o.substring(1),n="label"):o.startsWith(";")&&(o=o.substring(1),n="matrix");let l=e[o];if(l==null)continue;if(Array.isArray(l)){r=r.replace(a,x({explode:s,name:o,style:n,value:l}));continue}if(typeof l=="object"){r=r.replace(a,T({explode:s,name:o,style:n,value:l}));continue}if(n==="matrix"){r=r.replace(a,`;${O({name:o,value:l})}`);continue}let p=encodeURIComponent(n==="label"?`.${l}`:l);r=r.replace(a,p)}return r},j=({allowReserved:e,array:t,object:r}={})=>i=>{let a=[];if(i&&typeof i=="object")for(let s in i){let o=i[s];if(o!=null){if(Array.isArray(o)){a=[...a,x({allowReserved:e,explode:!0,name:s,style:"form",value:o,...t})];continue}if(typeof o=="object"){a=[...a,T({allowReserved:e,explode:!0,name:s,style:"deepObject",value:o,...r})];continue}a=[...a,O({allowReserved:e,name:s,value:o})]}}return a.join("&")},L=e=>{if(!e)return"stream";let t=e.split(";")[0]?.trim();if(t){if(t.startsWith("application/json")||t.endsWith("+json"))return"json";if(t==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(r=>t.startsWith(r)))return"blob";if(t.startsWith("text/"))return"text"}},N=async(e,t)=>{let r=typeof t=="function"?await t(e):t;if(r)return e.scheme==="bearer"?`Bearer ${r}`:e.scheme==="basic"?`Basic ${btoa(r)}`:r},P=async({security:e,...t})=>{for(let r of e){let i=await N(r,t.auth);if(!i)continue;let a=r.name??"Authorization";switch(r.in){case"query":t.query||(t.query={}),t.query[a]=i;break;case"header":default:t.headers.set(a,i);break}return}},B=e=>H({baseUrl:e.baseUrl??"",path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:j(e.querySerializer),url:e.url}),H=({baseUrl:e,path:t,query:r,querySerializer:i,url:a})=>{let s=a.startsWith("/")?a:`/${a}`,o=e+s;t&&(o=W({path:t,url:o}));let n=r?i(r):"";return n.startsWith("?")&&(n=n.substring(1)),n&&(o+=`?${n}`),o},k=(e,t)=>{let r={...e,...t};return r.baseUrl?.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=R(e.headers,t.headers),r},R=(...e)=>{let t=new Headers;for(let r of e){if(!r||typeof r!="object")continue;let i=r instanceof Headers?r.entries():Object.entries(r);for(let[a,s]of i)if(s===null)t.delete(a);else if(Array.isArray(s))for(let o of s)t.append(a,o);else s!==void 0&&t.set(a,typeof s=="object"?JSON.stringify(s):s)}return t},w=class{_fns;constructor(){this._fns=[]}clear(){this._fns=[]}exists(e){return this._fns.indexOf(e)!==-1}eject(e){let t=this._fns.indexOf(e);t!==-1&&(this._fns=[...this._fns.slice(0,t),...this._fns.slice(t+1)])}use(e){this._fns=[...this._fns,e]}},J=()=>({error:new w,request:new w,response:new w});var V={bodySerializer:e=>JSON.stringify(e)};var G=j({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),M={"Content-Type":"application/json"},E=(e={})=>({...V,baseUrl:"",headers:M,parseAs:"auto",querySerializer:G,...e}),D=(e={})=>{let t=k(E(),e),r=()=>({...t}),i=o=>(t=k(t,o),r()),a=J(),s=async o=>{let n={...t,...o,fetch:o.fetch??t.fetch??globalThis.fetch,headers:R(t.headers,o.headers)};n.security&&await P({...n,security:n.security}),n.body&&n.bodySerializer&&(n.body=n.bodySerializer(n.body)),n.body||n.headers.delete("Content-Type");let l=B(n),p={redirect:"follow",...n},f=new Request(l,p);for(let u of a.request._fns)f=await u(f,n);let C=n.fetch,d=await C(f);for(let u of a.response._fns)d=await u(d,f,n);let y={request:f,response:d};if(d.ok){if(d.status===204||d.headers.get("Content-Length")==="0")return{data:{},...y};let u=(n.parseAs==="auto"?L(d.headers.get("Content-Type")):n.parseAs)??"json";if(u==="stream")return{data:d.body,...y};let g=await d[u]();return u==="json"&&(n.responseValidator&&await n.responseValidator(g),n.responseTransformer&&(g=await n.responseTransformer(g))),{data:g,...y}}let b=await d.text();try{b=JSON.parse(b)}catch{}let h=b;for(let u of a.error._fns)h=await u(b,d,f,n);if(h=h||{},n.throwOnError)throw h;return{error:h,...y}};return{buildUrl:B,connect:o=>s({...o,method:"CONNECT"}),delete:o=>s({...o,method:"DELETE"}),get:o=>s({...o,method:"GET"}),getConfig:r,head:o=>s({...o,method:"HEAD"}),interceptors:a,options:o=>s({...o,method:"OPTIONS"}),patch:o=>s({...o,method:"PATCH"}),post:o=>s({...o,method:"POST"}),put:o=>s({...o,method:"PUT"}),request:s,setConfig:i,trace:o=>s({...o,method:"TRACE"})}};var c=D(E()),Q=e=>(e?.client??c).get({...e,url:"/bookings"}),K=e=>(e?.client??c).post({...e,headers:{"Content-Type":"application/json",...e?.headers},url:"/bookings"}),X=e=>(e?.client??c).delete({...e,url:"/bookings/{bookingId}"}),Y=e=>(e?.client??c).get({...e,url:"/bookings/{bookingId}"}),Z=e=>(e?.client??c).put({...e,headers:{"Content-Type":"application/json",...e?.headers},url:"/bookings/{bookingId}"}),ee=e=>(e?.client??c).get({...e,url:"/facilities/{facility_id}/offers"}),re=e=>(e?.client??c).post({...e,url:"/facilities/{facility_id}/offers/{offer_id}"});0&&(module.exports={addBooking,client,createFacilityOfferOrder,deleteBooking,findBookingById,findBookings,listFacilityOffers,updateBooking});
|
package/dist/v1/sdk.gen.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e,f}from"./chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h}from"./chunk-M5A265XW.mjs";export{c as addBooking,a as client,h as createFacilityOfferOrder,d as deleteBooking,e as findBookingById,b as findBookings,g as listFacilityOffers,f as updateBooking};
|