@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/types.gen.d.mts
CHANGED
|
@@ -26,6 +26,84 @@ type CreateBooking = {
|
|
|
26
26
|
paymentReference: string;
|
|
27
27
|
startTime: string;
|
|
28
28
|
};
|
|
29
|
+
type FacilityOffer = {
|
|
30
|
+
data: FacilityPunchCardData | FacilityValueCardData;
|
|
31
|
+
type: 'FACILITY_PUNCH_CARD' | 'FACILITY_VALUE_CARD';
|
|
32
|
+
};
|
|
33
|
+
type FacilityOfferCondition = (FacilityOfferConditionWeekdays | FacilityOfferConditionCourts | FacilityOfferConditionDate | FacilityOfferConditionTime | FacilityOfferConditionHoursinadvance | FacilityOfferConditionActivities | FacilityOfferConditionNotImplemented) & {
|
|
34
|
+
type?: 'WEEKDAYS' | 'COURTS' | 'DATE' | 'TIME' | 'HOURSINADVANCE' | 'ACTIVITIES' | 'NOT_IMPLEMENTED';
|
|
35
|
+
};
|
|
36
|
+
type FacilityOfferConditionActivities = {
|
|
37
|
+
allActivities: boolean;
|
|
38
|
+
notValidForActivities: boolean;
|
|
39
|
+
type: string;
|
|
40
|
+
};
|
|
41
|
+
type FacilityOfferConditionCourts = {
|
|
42
|
+
name?: string;
|
|
43
|
+
type: string;
|
|
44
|
+
};
|
|
45
|
+
type FacilityOfferConditionDate = {
|
|
46
|
+
endDate: string;
|
|
47
|
+
startDate: string;
|
|
48
|
+
type: string;
|
|
49
|
+
};
|
|
50
|
+
type FacilityOfferConditionHoursinadvance = {
|
|
51
|
+
nrOfHours: number;
|
|
52
|
+
type: string;
|
|
53
|
+
};
|
|
54
|
+
type FacilityOfferConditionNotImplemented = {
|
|
55
|
+
type: string;
|
|
56
|
+
};
|
|
57
|
+
type FacilityOfferConditionTime = {
|
|
58
|
+
endTime: string;
|
|
59
|
+
startTime: string;
|
|
60
|
+
type: string;
|
|
61
|
+
};
|
|
62
|
+
type FacilityOfferConditionWeekdays = {
|
|
63
|
+
type: string;
|
|
64
|
+
weekdays: Array<number>;
|
|
65
|
+
};
|
|
66
|
+
type FacilityOfferList = {
|
|
67
|
+
data: Array<FacilityOffer>;
|
|
68
|
+
meta: PkgOpenapiSharedCursorPaginatedResultSet;
|
|
69
|
+
};
|
|
70
|
+
type FacilityOfferOrder = {
|
|
71
|
+
/**
|
|
72
|
+
* The URL to the checkout page for the facility offer order
|
|
73
|
+
*/
|
|
74
|
+
checkoutUrl: string;
|
|
75
|
+
id: string;
|
|
76
|
+
};
|
|
77
|
+
type FacilityPunchCardData = {
|
|
78
|
+
conditions: Array<FacilityOfferCondition>;
|
|
79
|
+
description: string | null;
|
|
80
|
+
expireDate: string;
|
|
81
|
+
facilityId: number;
|
|
82
|
+
facilityReceiveMembershipRequests: boolean;
|
|
83
|
+
id: number;
|
|
84
|
+
maxDuration: number;
|
|
85
|
+
membersOnly: boolean;
|
|
86
|
+
name: string;
|
|
87
|
+
nrOfBookingsInPeriod: number;
|
|
88
|
+
nrOfDaysValid: number;
|
|
89
|
+
nrOfTickets: number;
|
|
90
|
+
price: string;
|
|
91
|
+
unlimited: boolean;
|
|
92
|
+
userHasActiveMembership: boolean;
|
|
93
|
+
};
|
|
94
|
+
type FacilityValueCardData = {
|
|
95
|
+
amount: string;
|
|
96
|
+
description: string | null;
|
|
97
|
+
expireDate: string;
|
|
98
|
+
facilityId: number;
|
|
99
|
+
facilityReceiveMembershipRequests: boolean;
|
|
100
|
+
id: number;
|
|
101
|
+
membersOnly: boolean;
|
|
102
|
+
name: string;
|
|
103
|
+
nrOfDaysValid: number;
|
|
104
|
+
price: string;
|
|
105
|
+
userHasActiveMembership: boolean;
|
|
106
|
+
};
|
|
29
107
|
type Guest = {
|
|
30
108
|
email: string;
|
|
31
109
|
};
|
|
@@ -44,6 +122,24 @@ type UpdateBooking = {
|
|
|
44
122
|
paymentReference: string;
|
|
45
123
|
startTime: string;
|
|
46
124
|
};
|
|
125
|
+
/**
|
|
126
|
+
* 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.
|
|
127
|
+
*
|
|
128
|
+
*/
|
|
129
|
+
type PkgOpenapiSharedCursorPaginatedResultSet = {
|
|
130
|
+
/**
|
|
131
|
+
* Cursor used to retrieve the current page of results.
|
|
132
|
+
*/
|
|
133
|
+
currentCursor: string;
|
|
134
|
+
/**
|
|
135
|
+
* Indicates if there are more results available.
|
|
136
|
+
*/
|
|
137
|
+
moreResults: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* Cursor to retrieve the next page of results.
|
|
140
|
+
*/
|
|
141
|
+
nextCursor?: string;
|
|
142
|
+
};
|
|
47
143
|
type PkgOpenapiSharedError = {
|
|
48
144
|
/**
|
|
49
145
|
* The error message
|
|
@@ -86,6 +182,17 @@ type PkgOpenapiSharedProblemDetails = {
|
|
|
86
182
|
*/
|
|
87
183
|
type?: string;
|
|
88
184
|
};
|
|
185
|
+
type FacilityIdPath = string;
|
|
186
|
+
type OfferIdPath = string;
|
|
187
|
+
/**
|
|
188
|
+
* Maximum number of items to return per page.
|
|
189
|
+
*/
|
|
190
|
+
type PkgOpenapiSharedCursorLimitParam = number;
|
|
191
|
+
/**
|
|
192
|
+
* Cursor for pagination. An opaque value to request the next page. Should not be set for the first call to the resource. Subsequent should use the value from `meta.next_cursor` in the response, until `meta.more_results` is false.
|
|
193
|
+
*
|
|
194
|
+
*/
|
|
195
|
+
type PkgOpenapiSharedCursorParam = string;
|
|
89
196
|
/**
|
|
90
197
|
* Maximum number of items to return.
|
|
91
198
|
*/
|
|
@@ -312,5 +419,88 @@ type UpdateBookingResponses = {
|
|
|
312
419
|
200: Booking;
|
|
313
420
|
};
|
|
314
421
|
type UpdateBookingResponse = UpdateBookingResponses[keyof UpdateBookingResponses];
|
|
422
|
+
type ListFacilityOffersData = {
|
|
423
|
+
body?: never;
|
|
424
|
+
path: {
|
|
425
|
+
facilityId: string;
|
|
426
|
+
};
|
|
427
|
+
query?: {
|
|
428
|
+
/**
|
|
429
|
+
* Cursor for pagination. An opaque value to request the next page. Should not be set for the first call to the resource. Subsequent should use the value from `meta.next_cursor` in the response, until `meta.more_results` is false.
|
|
430
|
+
*
|
|
431
|
+
*/
|
|
432
|
+
cursor?: string;
|
|
433
|
+
/**
|
|
434
|
+
* Maximum number of items to return per page.
|
|
435
|
+
*/
|
|
436
|
+
limit?: number;
|
|
437
|
+
};
|
|
438
|
+
url: '/facilities/{facility_id}/offers';
|
|
439
|
+
};
|
|
440
|
+
type ListFacilityOffersErrors = {
|
|
441
|
+
/**
|
|
442
|
+
* Access token is not set or invalid.
|
|
443
|
+
*/
|
|
444
|
+
401: PkgOpenapiSharedProblemDetails;
|
|
445
|
+
/**
|
|
446
|
+
* The requestor is not authorized to perform this operation on the resource.
|
|
447
|
+
*/
|
|
448
|
+
403: PkgOpenapiSharedProblemDetails;
|
|
449
|
+
/**
|
|
450
|
+
* The server encountered an unexpected error
|
|
451
|
+
*/
|
|
452
|
+
500: PkgOpenapiSharedProblemDetails;
|
|
453
|
+
/**
|
|
454
|
+
* The requested operation is not implemented.
|
|
455
|
+
*/
|
|
456
|
+
501: PkgOpenapiSharedProblemDetails;
|
|
457
|
+
};
|
|
458
|
+
type ListFacilityOffersError = ListFacilityOffersErrors[keyof ListFacilityOffersErrors];
|
|
459
|
+
type ListFacilityOffersResponses = {
|
|
460
|
+
/**
|
|
461
|
+
* OK
|
|
462
|
+
*/
|
|
463
|
+
200: FacilityOfferList;
|
|
464
|
+
};
|
|
465
|
+
type ListFacilityOffersResponse = ListFacilityOffersResponses[keyof ListFacilityOffersResponses];
|
|
466
|
+
type CreateFacilityOfferOrderData = {
|
|
467
|
+
body?: never;
|
|
468
|
+
path: {
|
|
469
|
+
facilityId: string;
|
|
470
|
+
offerId: string;
|
|
471
|
+
};
|
|
472
|
+
query?: never;
|
|
473
|
+
url: '/facilities/{facility_id}/offers/{offer_id}';
|
|
474
|
+
};
|
|
475
|
+
type CreateFacilityOfferOrderErrors = {
|
|
476
|
+
/**
|
|
477
|
+
* Access token is not set or invalid.
|
|
478
|
+
*/
|
|
479
|
+
401: PkgOpenapiSharedProblemDetails;
|
|
480
|
+
/**
|
|
481
|
+
* The requestor is not authorized to perform this operation on the resource.
|
|
482
|
+
*/
|
|
483
|
+
403: PkgOpenapiSharedProblemDetails;
|
|
484
|
+
/**
|
|
485
|
+
* The requested resource was not found.
|
|
486
|
+
*/
|
|
487
|
+
404: PkgOpenapiSharedProblemDetails;
|
|
488
|
+
/**
|
|
489
|
+
* The server encountered an unexpected error
|
|
490
|
+
*/
|
|
491
|
+
500: PkgOpenapiSharedProblemDetails;
|
|
492
|
+
/**
|
|
493
|
+
* The requested operation is not implemented.
|
|
494
|
+
*/
|
|
495
|
+
501: PkgOpenapiSharedProblemDetails;
|
|
496
|
+
};
|
|
497
|
+
type CreateFacilityOfferOrderError = CreateFacilityOfferOrderErrors[keyof CreateFacilityOfferOrderErrors];
|
|
498
|
+
type CreateFacilityOfferOrderResponses = {
|
|
499
|
+
/**
|
|
500
|
+
* OK
|
|
501
|
+
*/
|
|
502
|
+
200: FacilityOfferOrder;
|
|
503
|
+
};
|
|
504
|
+
type CreateFacilityOfferOrderResponse = CreateFacilityOfferOrderResponses[keyof CreateFacilityOfferOrderResponses];
|
|
315
505
|
|
|
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 };
|
|
506
|
+
export type { AddBookingData, AddBookingError, AddBookingErrors, AddBookingResponse, AddBookingResponses, Booking, CreateBooking, CreateFacilityOfferOrderData, CreateFacilityOfferOrderError, CreateFacilityOfferOrderErrors, CreateFacilityOfferOrderResponse, CreateFacilityOfferOrderResponses, DeleteBookingData, DeleteBookingError, DeleteBookingErrors, DeleteBookingResponse, DeleteBookingResponses, FacilityIdPath, FacilityOffer, FacilityOfferCondition, FacilityOfferConditionActivities, FacilityOfferConditionCourts, FacilityOfferConditionDate, FacilityOfferConditionHoursinadvance, FacilityOfferConditionNotImplemented, FacilityOfferConditionTime, FacilityOfferConditionWeekdays, FacilityOfferList, FacilityOfferOrder, FacilityPunchCardData, FacilityValueCardData, FindBookingByIdData, FindBookingByIdError, FindBookingByIdErrors, FindBookingByIdResponse, FindBookingByIdResponses, FindBookingsData, FindBookingsError, FindBookingsErrors, FindBookingsResponse, FindBookingsResponses, Guest, ListFacilityOffersData, ListFacilityOffersError, ListFacilityOffersErrors, ListFacilityOffersResponse, ListFacilityOffersResponses, OfferIdPath, PkgOpenapiSharedCursorLimitParam, PkgOpenapiSharedCursorPaginatedResultSet, PkgOpenapiSharedCursorParam, PkgOpenapiSharedError, PkgOpenapiSharedErrors, PkgOpenapiSharedOffsetLimitParam, PkgOpenapiSharedOffsetPaginatedResultSet, PkgOpenapiSharedOffsetParam, PkgOpenapiSharedProblemDetails, Player, UpdateBooking, UpdateBookingData, UpdateBookingError, UpdateBookingErrors, UpdateBookingResponse, UpdateBookingResponses };
|
package/dist/v1/types.gen.d.ts
CHANGED
|
@@ -26,6 +26,84 @@ type CreateBooking = {
|
|
|
26
26
|
paymentReference: string;
|
|
27
27
|
startTime: string;
|
|
28
28
|
};
|
|
29
|
+
type FacilityOffer = {
|
|
30
|
+
data: FacilityPunchCardData | FacilityValueCardData;
|
|
31
|
+
type: 'FACILITY_PUNCH_CARD' | 'FACILITY_VALUE_CARD';
|
|
32
|
+
};
|
|
33
|
+
type FacilityOfferCondition = (FacilityOfferConditionWeekdays | FacilityOfferConditionCourts | FacilityOfferConditionDate | FacilityOfferConditionTime | FacilityOfferConditionHoursinadvance | FacilityOfferConditionActivities | FacilityOfferConditionNotImplemented) & {
|
|
34
|
+
type?: 'WEEKDAYS' | 'COURTS' | 'DATE' | 'TIME' | 'HOURSINADVANCE' | 'ACTIVITIES' | 'NOT_IMPLEMENTED';
|
|
35
|
+
};
|
|
36
|
+
type FacilityOfferConditionActivities = {
|
|
37
|
+
allActivities: boolean;
|
|
38
|
+
notValidForActivities: boolean;
|
|
39
|
+
type: string;
|
|
40
|
+
};
|
|
41
|
+
type FacilityOfferConditionCourts = {
|
|
42
|
+
name?: string;
|
|
43
|
+
type: string;
|
|
44
|
+
};
|
|
45
|
+
type FacilityOfferConditionDate = {
|
|
46
|
+
endDate: string;
|
|
47
|
+
startDate: string;
|
|
48
|
+
type: string;
|
|
49
|
+
};
|
|
50
|
+
type FacilityOfferConditionHoursinadvance = {
|
|
51
|
+
nrOfHours: number;
|
|
52
|
+
type: string;
|
|
53
|
+
};
|
|
54
|
+
type FacilityOfferConditionNotImplemented = {
|
|
55
|
+
type: string;
|
|
56
|
+
};
|
|
57
|
+
type FacilityOfferConditionTime = {
|
|
58
|
+
endTime: string;
|
|
59
|
+
startTime: string;
|
|
60
|
+
type: string;
|
|
61
|
+
};
|
|
62
|
+
type FacilityOfferConditionWeekdays = {
|
|
63
|
+
type: string;
|
|
64
|
+
weekdays: Array<number>;
|
|
65
|
+
};
|
|
66
|
+
type FacilityOfferList = {
|
|
67
|
+
data: Array<FacilityOffer>;
|
|
68
|
+
meta: PkgOpenapiSharedCursorPaginatedResultSet;
|
|
69
|
+
};
|
|
70
|
+
type FacilityOfferOrder = {
|
|
71
|
+
/**
|
|
72
|
+
* The URL to the checkout page for the facility offer order
|
|
73
|
+
*/
|
|
74
|
+
checkoutUrl: string;
|
|
75
|
+
id: string;
|
|
76
|
+
};
|
|
77
|
+
type FacilityPunchCardData = {
|
|
78
|
+
conditions: Array<FacilityOfferCondition>;
|
|
79
|
+
description: string | null;
|
|
80
|
+
expireDate: string;
|
|
81
|
+
facilityId: number;
|
|
82
|
+
facilityReceiveMembershipRequests: boolean;
|
|
83
|
+
id: number;
|
|
84
|
+
maxDuration: number;
|
|
85
|
+
membersOnly: boolean;
|
|
86
|
+
name: string;
|
|
87
|
+
nrOfBookingsInPeriod: number;
|
|
88
|
+
nrOfDaysValid: number;
|
|
89
|
+
nrOfTickets: number;
|
|
90
|
+
price: string;
|
|
91
|
+
unlimited: boolean;
|
|
92
|
+
userHasActiveMembership: boolean;
|
|
93
|
+
};
|
|
94
|
+
type FacilityValueCardData = {
|
|
95
|
+
amount: string;
|
|
96
|
+
description: string | null;
|
|
97
|
+
expireDate: string;
|
|
98
|
+
facilityId: number;
|
|
99
|
+
facilityReceiveMembershipRequests: boolean;
|
|
100
|
+
id: number;
|
|
101
|
+
membersOnly: boolean;
|
|
102
|
+
name: string;
|
|
103
|
+
nrOfDaysValid: number;
|
|
104
|
+
price: string;
|
|
105
|
+
userHasActiveMembership: boolean;
|
|
106
|
+
};
|
|
29
107
|
type Guest = {
|
|
30
108
|
email: string;
|
|
31
109
|
};
|
|
@@ -44,6 +122,24 @@ type UpdateBooking = {
|
|
|
44
122
|
paymentReference: string;
|
|
45
123
|
startTime: string;
|
|
46
124
|
};
|
|
125
|
+
/**
|
|
126
|
+
* 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.
|
|
127
|
+
*
|
|
128
|
+
*/
|
|
129
|
+
type PkgOpenapiSharedCursorPaginatedResultSet = {
|
|
130
|
+
/**
|
|
131
|
+
* Cursor used to retrieve the current page of results.
|
|
132
|
+
*/
|
|
133
|
+
currentCursor: string;
|
|
134
|
+
/**
|
|
135
|
+
* Indicates if there are more results available.
|
|
136
|
+
*/
|
|
137
|
+
moreResults: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* Cursor to retrieve the next page of results.
|
|
140
|
+
*/
|
|
141
|
+
nextCursor?: string;
|
|
142
|
+
};
|
|
47
143
|
type PkgOpenapiSharedError = {
|
|
48
144
|
/**
|
|
49
145
|
* The error message
|
|
@@ -86,6 +182,17 @@ type PkgOpenapiSharedProblemDetails = {
|
|
|
86
182
|
*/
|
|
87
183
|
type?: string;
|
|
88
184
|
};
|
|
185
|
+
type FacilityIdPath = string;
|
|
186
|
+
type OfferIdPath = string;
|
|
187
|
+
/**
|
|
188
|
+
* Maximum number of items to return per page.
|
|
189
|
+
*/
|
|
190
|
+
type PkgOpenapiSharedCursorLimitParam = number;
|
|
191
|
+
/**
|
|
192
|
+
* Cursor for pagination. An opaque value to request the next page. Should not be set for the first call to the resource. Subsequent should use the value from `meta.next_cursor` in the response, until `meta.more_results` is false.
|
|
193
|
+
*
|
|
194
|
+
*/
|
|
195
|
+
type PkgOpenapiSharedCursorParam = string;
|
|
89
196
|
/**
|
|
90
197
|
* Maximum number of items to return.
|
|
91
198
|
*/
|
|
@@ -312,5 +419,88 @@ type UpdateBookingResponses = {
|
|
|
312
419
|
200: Booking;
|
|
313
420
|
};
|
|
314
421
|
type UpdateBookingResponse = UpdateBookingResponses[keyof UpdateBookingResponses];
|
|
422
|
+
type ListFacilityOffersData = {
|
|
423
|
+
body?: never;
|
|
424
|
+
path: {
|
|
425
|
+
facilityId: string;
|
|
426
|
+
};
|
|
427
|
+
query?: {
|
|
428
|
+
/**
|
|
429
|
+
* Cursor for pagination. An opaque value to request the next page. Should not be set for the first call to the resource. Subsequent should use the value from `meta.next_cursor` in the response, until `meta.more_results` is false.
|
|
430
|
+
*
|
|
431
|
+
*/
|
|
432
|
+
cursor?: string;
|
|
433
|
+
/**
|
|
434
|
+
* Maximum number of items to return per page.
|
|
435
|
+
*/
|
|
436
|
+
limit?: number;
|
|
437
|
+
};
|
|
438
|
+
url: '/facilities/{facility_id}/offers';
|
|
439
|
+
};
|
|
440
|
+
type ListFacilityOffersErrors = {
|
|
441
|
+
/**
|
|
442
|
+
* Access token is not set or invalid.
|
|
443
|
+
*/
|
|
444
|
+
401: PkgOpenapiSharedProblemDetails;
|
|
445
|
+
/**
|
|
446
|
+
* The requestor is not authorized to perform this operation on the resource.
|
|
447
|
+
*/
|
|
448
|
+
403: PkgOpenapiSharedProblemDetails;
|
|
449
|
+
/**
|
|
450
|
+
* The server encountered an unexpected error
|
|
451
|
+
*/
|
|
452
|
+
500: PkgOpenapiSharedProblemDetails;
|
|
453
|
+
/**
|
|
454
|
+
* The requested operation is not implemented.
|
|
455
|
+
*/
|
|
456
|
+
501: PkgOpenapiSharedProblemDetails;
|
|
457
|
+
};
|
|
458
|
+
type ListFacilityOffersError = ListFacilityOffersErrors[keyof ListFacilityOffersErrors];
|
|
459
|
+
type ListFacilityOffersResponses = {
|
|
460
|
+
/**
|
|
461
|
+
* OK
|
|
462
|
+
*/
|
|
463
|
+
200: FacilityOfferList;
|
|
464
|
+
};
|
|
465
|
+
type ListFacilityOffersResponse = ListFacilityOffersResponses[keyof ListFacilityOffersResponses];
|
|
466
|
+
type CreateFacilityOfferOrderData = {
|
|
467
|
+
body?: never;
|
|
468
|
+
path: {
|
|
469
|
+
facilityId: string;
|
|
470
|
+
offerId: string;
|
|
471
|
+
};
|
|
472
|
+
query?: never;
|
|
473
|
+
url: '/facilities/{facility_id}/offers/{offer_id}';
|
|
474
|
+
};
|
|
475
|
+
type CreateFacilityOfferOrderErrors = {
|
|
476
|
+
/**
|
|
477
|
+
* Access token is not set or invalid.
|
|
478
|
+
*/
|
|
479
|
+
401: PkgOpenapiSharedProblemDetails;
|
|
480
|
+
/**
|
|
481
|
+
* The requestor is not authorized to perform this operation on the resource.
|
|
482
|
+
*/
|
|
483
|
+
403: PkgOpenapiSharedProblemDetails;
|
|
484
|
+
/**
|
|
485
|
+
* The requested resource was not found.
|
|
486
|
+
*/
|
|
487
|
+
404: PkgOpenapiSharedProblemDetails;
|
|
488
|
+
/**
|
|
489
|
+
* The server encountered an unexpected error
|
|
490
|
+
*/
|
|
491
|
+
500: PkgOpenapiSharedProblemDetails;
|
|
492
|
+
/**
|
|
493
|
+
* The requested operation is not implemented.
|
|
494
|
+
*/
|
|
495
|
+
501: PkgOpenapiSharedProblemDetails;
|
|
496
|
+
};
|
|
497
|
+
type CreateFacilityOfferOrderError = CreateFacilityOfferOrderErrors[keyof CreateFacilityOfferOrderErrors];
|
|
498
|
+
type CreateFacilityOfferOrderResponses = {
|
|
499
|
+
/**
|
|
500
|
+
* OK
|
|
501
|
+
*/
|
|
502
|
+
200: FacilityOfferOrder;
|
|
503
|
+
};
|
|
504
|
+
type CreateFacilityOfferOrderResponse = CreateFacilityOfferOrderResponses[keyof CreateFacilityOfferOrderResponses];
|
|
315
505
|
|
|
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 };
|
|
506
|
+
export type { AddBookingData, AddBookingError, AddBookingErrors, AddBookingResponse, AddBookingResponses, Booking, CreateBooking, CreateFacilityOfferOrderData, CreateFacilityOfferOrderError, CreateFacilityOfferOrderErrors, CreateFacilityOfferOrderResponse, CreateFacilityOfferOrderResponses, DeleteBookingData, DeleteBookingError, DeleteBookingErrors, DeleteBookingResponse, DeleteBookingResponses, FacilityIdPath, FacilityOffer, FacilityOfferCondition, FacilityOfferConditionActivities, FacilityOfferConditionCourts, FacilityOfferConditionDate, FacilityOfferConditionHoursinadvance, FacilityOfferConditionNotImplemented, FacilityOfferConditionTime, FacilityOfferConditionWeekdays, FacilityOfferList, FacilityOfferOrder, FacilityPunchCardData, FacilityValueCardData, FindBookingByIdData, FindBookingByIdError, FindBookingByIdErrors, FindBookingByIdResponse, FindBookingByIdResponses, FindBookingsData, FindBookingsError, FindBookingsErrors, FindBookingsResponse, FindBookingsResponses, Guest, ListFacilityOffersData, ListFacilityOffersError, ListFacilityOffersErrors, ListFacilityOffersResponse, ListFacilityOffersResponses, OfferIdPath, PkgOpenapiSharedCursorLimitParam, PkgOpenapiSharedCursorPaginatedResultSet, PkgOpenapiSharedCursorParam, PkgOpenapiSharedError, PkgOpenapiSharedErrors, PkgOpenapiSharedOffsetLimitParam, PkgOpenapiSharedOffsetPaginatedResultSet, PkgOpenapiSharedOffsetParam, PkgOpenapiSharedProblemDetails, Player, UpdateBooking, UpdateBookingData, UpdateBookingError, UpdateBookingErrors, UpdateBookingResponse, UpdateBookingResponses };
|
package/dist/v1/types.gen.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var o=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var d=(r,e,a,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of s(e))!p.call(r,t)&&t!==a&&o(r,t,{get:()=>e[t],enumerable:!(i=n(e,t))||i.enumerable});return r};var l=r=>d(o({},"__esModule",{value:!0}),r);var y={};module.exports=l(y);
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var D=/\{[^{}]+\}/g,m=({allowReserved:e,name:n,value:t})=>{if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${n}=${e?t:encodeURIComponent(t)}`},v=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},A=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},U=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},E=({allowReserved:e,explode:n,name:t,style:s,value:a})=>{if(!n){let o=(e?a:a.map(l=>encodeURIComponent(l))).join(A(s));switch(s){case"label":return`.${o}`;case"matrix":return`;${t}=${o}`;case"simple":return o;default:return`${t}=${o}`}}let i=v(s),r=a.map(o=>s==="label"||s==="simple"?e?o:encodeURIComponent(o):m({allowReserved:e,name:t,value:o})).join(i);return s==="label"||s==="matrix"?i+r:r},x=({allowReserved:e,explode:n,name:t,style:s,value:a})=>{if(a instanceof Date)return`${t}=${a.toISOString()}`;if(s!=="deepObject"&&!n){let o=[];Object.entries(a).forEach(([f,u])=>{o=[...o,f,e?u:encodeURIComponent(u)]});let l=o.join(",");switch(s){case"form":return`${t}=${l}`;case"label":return`.${l}`;case"matrix":return`;${t}=${l}`;default:return l}}let i=U(s),r=Object.entries(a).map(([o,l])=>m({allowReserved:e,name:s==="deepObject"?`${t}[${o}]`:o,value:l})).join(i);return s==="label"||s==="matrix"?i+r:r},$=({path:e,url:n})=>{let t=n,s=n.match(D);if(s)for(let a of s){let i=!1,r=a.substring(1,a.length-1),o="simple";r.endsWith("*")&&(i=!0,r=r.substring(0,r.length-1)),r.startsWith(".")?(r=r.substring(1),o="label"):r.startsWith(";")&&(r=r.substring(1),o="matrix");let l=e[r];if(l==null)continue;if(Array.isArray(l)){t=t.replace(a,E({explode:i,name:r,style:o,value:l}));continue}if(typeof l=="object"){t=t.replace(a,x({explode:i,name:r,style:o,value:l}));continue}if(o==="matrix"){t=t.replace(a,`;${m({name:r,value:l})}`);continue}let f=encodeURIComponent(o==="label"?`.${l}`:l);t=t.replace(a,f)}return t},j=({allowReserved:e,array:n,object:t}={})=>s=>{let a=[];if(s&&typeof s=="object")for(let i in s){let r=s[i];if(r!=null){if(Array.isArray(r)){a=[...a,E({allowReserved:e,explode:!0,name:i,style:"form",value:r,...n})];continue}if(typeof r=="object"){a=[...a,x({allowReserved:e,explode:!0,name:i,style:"deepObject",value:r,...t})];continue}a=[...a,m({allowReserved:e,name:i,value:r})]}}return a.join("&")},C=e=>{if(!e)return"stream";let n=e.split(";")[0]?.trim();if(n){if(n.startsWith("application/json")||n.endsWith("+json"))return"json";if(n==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(t=>n.startsWith(t)))return"blob";if(n.startsWith("text/"))return"text"}},q=async(e,n)=>{let t=typeof n=="function"?await n(e):n;if(t)return e.scheme==="bearer"?`Bearer ${t}`:e.scheme==="basic"?`Basic ${btoa(t)}`:t},I=async({security:e,...n})=>{for(let t of e){let s=await q(t,n.auth);if(!s)continue;let a=t.name??"Authorization";switch(t.in){case"query":n.query||(n.query={}),n.query[a]=s;break;case"header":default:n.headers.set(a,s);break}return}},k=e=>z({baseUrl:e.baseUrl??"",path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:j(e.querySerializer),url:e.url}),z=({baseUrl:e,path:n,query:t,querySerializer:s,url:a})=>{let i=a.startsWith("/")?a:`/${a}`,r=e+i;n&&(r=$({path:n,url:r}));let o=t?s(t):"";return o.startsWith("?")&&(o=o.substring(1)),o&&(r+=`?${o}`),r},O=(e,n)=>{let t={...e,...n};return t.baseUrl?.endsWith("/")&&(t.baseUrl=t.baseUrl.substring(0,t.baseUrl.length-1)),t.headers=T(e.headers,n.headers),t},T=(...e)=>{let n=new Headers;for(let t of e){if(!t||typeof t!="object")continue;let s=t instanceof Headers?t.entries():Object.entries(t);for(let[a,i]of s)if(i===null)n.delete(a);else if(Array.isArray(i))for(let r of i)n.append(a,r);else i!==void 0&&n.set(a,typeof i=="object"?JSON.stringify(i):i)}return n},w=class{_fns;constructor(){this._fns=[]}clear(){this._fns=[]}exists(e){return this._fns.indexOf(e)!==-1}eject(e){let n=this._fns.indexOf(e);n!==-1&&(this._fns=[...this._fns.slice(0,n),...this._fns.slice(n+1)])}use(e){this._fns=[...this._fns,e]}},_=()=>({error:new w,request:new w,response:new w});var F={bodySerializer:e=>JSON.stringify(e)};var W=j({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),N={"Content-Type":"application/json"},B=(e={})=>({...F,baseUrl:"",headers:N,parseAs:"auto",querySerializer:W,...e}),R=(e={})=>{let n=O(B(),e),t=()=>({...n}),s=r=>(n=O(n,r),t()),a=_(),i=async r=>{let o={...n,...r,fetch:r.fetch??n.fetch??globalThis.fetch,headers:T(n.headers,r.headers)};o.security&&await I({...o,security:o.security}),o.body&&o.bodySerializer&&(o.body=o.bodySerializer(o.body)),o.body||o.headers.delete("Content-Type");let l=k(o),f={redirect:"follow",...o},u=new Request(l,f);for(let c of a.request._fns)u=await c(u,o);let S=o.fetch,d=await S(u);for(let c of a.response._fns)d=await c(d,u,o);let y={request:u,response:d};if(d.ok){if(d.status===204||d.headers.get("Content-Length")==="0")return{data:{},...y};let c=(o.parseAs==="auto"?C(d.headers.get("Content-Type")):o.parseAs)??"json";if(c==="stream")return{data:d.body,...y};let g=await d[c]();return c==="json"&&(o.responseValidator&&await o.responseValidator(g),o.responseTransformer&&(g=await o.responseTransformer(g))),{data:g,...y}}let b=await d.text();try{b=JSON.parse(b)}catch{}let p=b;for(let c of a.error._fns)p=await c(b,d,u,o);if(p=p||{},o.throwOnError)throw p;return{error:p,...y}};return{buildUrl:k,connect:r=>i({...r,method:"CONNECT"}),delete:r=>i({...r,method:"DELETE"}),get:r=>i({...r,method:"GET"}),getConfig:t,head:r=>i({...r,method:"HEAD"}),interceptors:a,options:r=>i({...r,method:"OPTIONS"}),patch:r=>i({...r,method:"PATCH"}),post:r=>i({...r,method:"POST"}),put:r=>i({...r,method:"PUT"}),request:i,setConfig:s,trace:r=>i({...r,method:"TRACE"})}};var h=R(B()),L=e=>(e?.client??h).get({...e,url:"/bookings"}),V=e=>(e?.client??h).post({...e,headers:{"Content-Type":"application/json",...e?.headers},url:"/bookings"}),G=e=>(e?.client??h).delete({...e,url:"/bookings/{bookingId}"}),M=e=>(e?.client??h).get({...e,url:"/bookings/{bookingId}"}),Q=e=>(e?.client??h).put({...e,headers:{"Content-Type":"application/json",...e?.headers},url:"/bookings/{bookingId}"});export{h as a,L as b,V as c,G as d,M as e,Q as f};
|