@matchi/api 0.20250304.2 → 0.20250305.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main/index.d.mts +851 -5
- package/dist/main/index.d.ts +851 -5
- package/dist/main/index.js +1 -1
- package/dist/main/index.mjs +1 -1
- package/package.json +3 -35
- package/dist/v1/@tanstack/react-query.gen.d.mts +0 -189
- package/dist/v1/@tanstack/react-query.gen.d.ts +0 -189
- package/dist/v1/@tanstack/react-query.gen.js +0 -1
- package/dist/v1/@tanstack/react-query.gen.mjs +0 -1
- package/dist/v1/chunk-M5A265XW.mjs +0 -1
- package/dist/v1/chunk-PT2OYMNL.mjs +0 -0
- package/dist/v1/index.d.mts +0 -3
- package/dist/v1/index.d.ts +0 -3
- package/dist/v1/index.js +0 -1
- package/dist/v1/index.mjs +0 -1
- package/dist/v1/schemas.gen.d.mts +0 -525
- package/dist/v1/schemas.gen.d.ts +0 -525
- package/dist/v1/schemas.gen.js +0 -1
- package/dist/v1/schemas.gen.mjs +0 -1
- package/dist/v1/sdk.gen.d.mts +0 -45
- package/dist/v1/sdk.gen.d.ts +0 -45
- package/dist/v1/sdk.gen.js +0 -1
- package/dist/v1/sdk.gen.mjs +0 -1
- package/dist/v1/types.gen.d.mts +0 -506
- package/dist/v1/types.gen.d.ts +0 -506
- package/dist/v1/types.gen.js +0 -1
- package/dist/v1/types.gen.mjs +0 -1
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import * as _tanstack_query_core_build_legacy_hydration_ClXcjjG9 from '@tanstack/query-core/build/legacy/hydration-ClXcjjG9';
|
|
2
|
-
import * as _tanstack_react_query_build_legacy_types from '@tanstack/react-query/build/legacy/types';
|
|
3
|
-
import { FindBookingsData, Booking, PkgOpenapiSharedOffsetPaginatedResultSet, PkgOpenapiSharedProblemDetails, AddBookingData, DeleteBookingData, FindBookingByIdData, UpdateBookingData, ListFacilityOffersData, FacilityOfferList, CreateFacilityOfferOrderData, FacilityOfferOrder } from '../types.gen.js';
|
|
4
|
-
import { Options } from '@hey-api/client-fetch';
|
|
5
|
-
import { InfiniteData, UseMutationOptions } from '@tanstack/react-query';
|
|
6
|
-
|
|
7
|
-
type QueryKey<TOptions extends Options> = [
|
|
8
|
-
Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
|
|
9
|
-
_id: string;
|
|
10
|
-
_infinite?: boolean;
|
|
11
|
-
}
|
|
12
|
-
];
|
|
13
|
-
declare const findBookingsQueryKey: (options?: Options<FindBookingsData>) => (Pick<Options<FindBookingsData>, "body" | "path" | "query" | "headers" | "baseUrl"> & {
|
|
14
|
-
_id: string;
|
|
15
|
-
_infinite?: boolean | undefined;
|
|
16
|
-
})[];
|
|
17
|
-
declare const findBookingsOptions: (options?: Options<FindBookingsData>) => _tanstack_query_core_build_legacy_hydration_ClXcjjG9.O<_tanstack_react_query_build_legacy_types.UseQueryOptions<{
|
|
18
|
-
data?: Booking[] | undefined;
|
|
19
|
-
meta?: PkgOpenapiSharedOffsetPaginatedResultSet | undefined;
|
|
20
|
-
}, Error, {
|
|
21
|
-
data?: Booking[] | undefined;
|
|
22
|
-
meta?: PkgOpenapiSharedOffsetPaginatedResultSet | undefined;
|
|
23
|
-
}, (Pick<Options<FindBookingsData>, "body" | "path" | "query" | "headers" | "baseUrl"> & {
|
|
24
|
-
_id: string;
|
|
25
|
-
_infinite?: boolean | undefined;
|
|
26
|
-
})[]>, "queryFn"> & {
|
|
27
|
-
queryFn?: _tanstack_query_core_build_legacy_hydration_ClXcjjG9.K<{
|
|
28
|
-
data?: Booking[] | undefined;
|
|
29
|
-
meta?: PkgOpenapiSharedOffsetPaginatedResultSet | undefined;
|
|
30
|
-
}, (Pick<Options<FindBookingsData>, "body" | "path" | "query" | "headers" | "baseUrl"> & {
|
|
31
|
-
_id: string;
|
|
32
|
-
_infinite?: boolean | undefined;
|
|
33
|
-
})[], never> | undefined;
|
|
34
|
-
} & {
|
|
35
|
-
queryKey: (Pick<Options<FindBookingsData>, "body" | "path" | "query" | "headers" | "baseUrl"> & {
|
|
36
|
-
_id: string;
|
|
37
|
-
_infinite?: boolean | undefined;
|
|
38
|
-
})[] & {
|
|
39
|
-
[dataTagSymbol]: {
|
|
40
|
-
data?: Booking[] | undefined;
|
|
41
|
-
meta?: PkgOpenapiSharedOffsetPaginatedResultSet | undefined;
|
|
42
|
-
};
|
|
43
|
-
[dataTagErrorSymbol]: Error;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
declare const findBookingsInfiniteQueryKey: (options?: Options<FindBookingsData>) => QueryKey<Options<FindBookingsData>>;
|
|
47
|
-
declare const findBookingsInfiniteOptions: (options?: Options<FindBookingsData>) => _tanstack_react_query_build_legacy_types.UseInfiniteQueryOptions<{
|
|
48
|
-
data?: Booking[] | undefined;
|
|
49
|
-
meta?: PkgOpenapiSharedOffsetPaginatedResultSet | undefined;
|
|
50
|
-
}, PkgOpenapiSharedProblemDetails, InfiniteData<{
|
|
51
|
-
data?: Booking[] | undefined;
|
|
52
|
-
meta?: PkgOpenapiSharedOffsetPaginatedResultSet | undefined;
|
|
53
|
-
}, unknown>, {
|
|
54
|
-
data?: Booking[] | undefined;
|
|
55
|
-
meta?: PkgOpenapiSharedOffsetPaginatedResultSet | undefined;
|
|
56
|
-
}, QueryKey<Options<FindBookingsData>>, number | Pick<Pick<Options<FindBookingsData>, "body" | "path" | "query" | "headers" | "baseUrl"> & {
|
|
57
|
-
_id: string;
|
|
58
|
-
_infinite?: boolean | undefined;
|
|
59
|
-
}, "body" | "path" | "query" | "headers">> & {
|
|
60
|
-
initialData: InfiniteData<{
|
|
61
|
-
data?: Booking[] | undefined;
|
|
62
|
-
meta?: PkgOpenapiSharedOffsetPaginatedResultSet | undefined;
|
|
63
|
-
}, number | Pick<Pick<Options<FindBookingsData>, "body" | "path" | "query" | "headers" | "baseUrl"> & {
|
|
64
|
-
_id: string;
|
|
65
|
-
_infinite?: boolean | undefined;
|
|
66
|
-
}, "body" | "path" | "query" | "headers">> | (() => InfiniteData<{
|
|
67
|
-
data?: Booking[] | undefined;
|
|
68
|
-
meta?: PkgOpenapiSharedOffsetPaginatedResultSet | undefined;
|
|
69
|
-
}, number | Pick<Pick<Options<FindBookingsData>, "body" | "path" | "query" | "headers" | "baseUrl"> & {
|
|
70
|
-
_id: string;
|
|
71
|
-
_infinite?: boolean | undefined;
|
|
72
|
-
}, "body" | "path" | "query" | "headers">>) | undefined;
|
|
73
|
-
} & {
|
|
74
|
-
queryKey: QueryKey<Options<FindBookingsData>> & {
|
|
75
|
-
[dataTagSymbol]: InfiniteData<{
|
|
76
|
-
data?: Booking[] | undefined;
|
|
77
|
-
meta?: PkgOpenapiSharedOffsetPaginatedResultSet | undefined;
|
|
78
|
-
}, unknown>;
|
|
79
|
-
[dataTagErrorSymbol]: PkgOpenapiSharedProblemDetails;
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
declare const addBookingQueryKey: (options: Options<AddBookingData>) => (Pick<Options<AddBookingData>, "body" | "path" | "query" | "headers" | "baseUrl"> & {
|
|
83
|
-
_id: string;
|
|
84
|
-
_infinite?: boolean | undefined;
|
|
85
|
-
})[];
|
|
86
|
-
declare const addBookingOptions: (options: Options<AddBookingData>) => _tanstack_query_core_build_legacy_hydration_ClXcjjG9.O<_tanstack_react_query_build_legacy_types.UseQueryOptions<Booking, Error, Booking, (Pick<Options<AddBookingData>, "body" | "path" | "query" | "headers" | "baseUrl"> & {
|
|
87
|
-
_id: string;
|
|
88
|
-
_infinite?: boolean | undefined;
|
|
89
|
-
})[]>, "queryFn"> & {
|
|
90
|
-
queryFn?: _tanstack_query_core_build_legacy_hydration_ClXcjjG9.K<Booking, (Pick<Options<AddBookingData>, "body" | "path" | "query" | "headers" | "baseUrl"> & {
|
|
91
|
-
_id: string;
|
|
92
|
-
_infinite?: boolean | undefined;
|
|
93
|
-
})[], never> | undefined;
|
|
94
|
-
} & {
|
|
95
|
-
queryKey: (Pick<Options<AddBookingData>, "body" | "path" | "query" | "headers" | "baseUrl"> & {
|
|
96
|
-
_id: string;
|
|
97
|
-
_infinite?: boolean | undefined;
|
|
98
|
-
})[] & {
|
|
99
|
-
[dataTagSymbol]: Booking;
|
|
100
|
-
[dataTagErrorSymbol]: Error;
|
|
101
|
-
};
|
|
102
|
-
};
|
|
103
|
-
declare const addBookingMutation: (options?: Partial<Options<AddBookingData>>) => UseMutationOptions<Booking, PkgOpenapiSharedProblemDetails, Options<AddBookingData>, unknown>;
|
|
104
|
-
declare const deleteBookingMutation: (options?: Partial<Options<DeleteBookingData>>) => UseMutationOptions<void, PkgOpenapiSharedProblemDetails, Options<DeleteBookingData>, unknown>;
|
|
105
|
-
declare const findBookingByIdQueryKey: (options: Options<FindBookingByIdData>) => (Pick<Options<FindBookingByIdData>, "body" | "path" | "query" | "headers" | "baseUrl"> & {
|
|
106
|
-
_id: string;
|
|
107
|
-
_infinite?: boolean | undefined;
|
|
108
|
-
})[];
|
|
109
|
-
declare const findBookingByIdOptions: (options: Options<FindBookingByIdData>) => _tanstack_query_core_build_legacy_hydration_ClXcjjG9.O<_tanstack_react_query_build_legacy_types.UseQueryOptions<Booking, Error, Booking, (Pick<Options<FindBookingByIdData>, "body" | "path" | "query" | "headers" | "baseUrl"> & {
|
|
110
|
-
_id: string;
|
|
111
|
-
_infinite?: boolean | undefined;
|
|
112
|
-
})[]>, "queryFn"> & {
|
|
113
|
-
queryFn?: _tanstack_query_core_build_legacy_hydration_ClXcjjG9.K<Booking, (Pick<Options<FindBookingByIdData>, "body" | "path" | "query" | "headers" | "baseUrl"> & {
|
|
114
|
-
_id: string;
|
|
115
|
-
_infinite?: boolean | undefined;
|
|
116
|
-
})[], never> | undefined;
|
|
117
|
-
} & {
|
|
118
|
-
queryKey: (Pick<Options<FindBookingByIdData>, "body" | "path" | "query" | "headers" | "baseUrl"> & {
|
|
119
|
-
_id: string;
|
|
120
|
-
_infinite?: boolean | undefined;
|
|
121
|
-
})[] & {
|
|
122
|
-
[dataTagSymbol]: Booking;
|
|
123
|
-
[dataTagErrorSymbol]: Error;
|
|
124
|
-
};
|
|
125
|
-
};
|
|
126
|
-
declare const updateBookingMutation: (options?: Partial<Options<UpdateBookingData>>) => UseMutationOptions<Booking, PkgOpenapiSharedProblemDetails, Options<UpdateBookingData>, unknown>;
|
|
127
|
-
declare const listFacilityOffersQueryKey: (options: Options<ListFacilityOffersData>) => (Pick<Options<ListFacilityOffersData>, "body" | "path" | "query" | "headers" | "baseUrl"> & {
|
|
128
|
-
_id: string;
|
|
129
|
-
_infinite?: boolean | undefined;
|
|
130
|
-
})[];
|
|
131
|
-
declare const listFacilityOffersOptions: (options: Options<ListFacilityOffersData>) => _tanstack_query_core_build_legacy_hydration_ClXcjjG9.O<_tanstack_react_query_build_legacy_types.UseQueryOptions<FacilityOfferList, Error, FacilityOfferList, (Pick<Options<ListFacilityOffersData>, "body" | "path" | "query" | "headers" | "baseUrl"> & {
|
|
132
|
-
_id: string;
|
|
133
|
-
_infinite?: boolean | undefined;
|
|
134
|
-
})[]>, "queryFn"> & {
|
|
135
|
-
queryFn?: _tanstack_query_core_build_legacy_hydration_ClXcjjG9.K<FacilityOfferList, (Pick<Options<ListFacilityOffersData>, "body" | "path" | "query" | "headers" | "baseUrl"> & {
|
|
136
|
-
_id: string;
|
|
137
|
-
_infinite?: boolean | undefined;
|
|
138
|
-
})[], never> | undefined;
|
|
139
|
-
} & {
|
|
140
|
-
queryKey: (Pick<Options<ListFacilityOffersData>, "body" | "path" | "query" | "headers" | "baseUrl"> & {
|
|
141
|
-
_id: string;
|
|
142
|
-
_infinite?: boolean | undefined;
|
|
143
|
-
})[] & {
|
|
144
|
-
[dataTagSymbol]: FacilityOfferList;
|
|
145
|
-
[dataTagErrorSymbol]: Error;
|
|
146
|
-
};
|
|
147
|
-
};
|
|
148
|
-
declare const listFacilityOffersInfiniteQueryKey: (options: Options<ListFacilityOffersData>) => QueryKey<Options<ListFacilityOffersData>>;
|
|
149
|
-
declare const listFacilityOffersInfiniteOptions: (options: Options<ListFacilityOffersData>) => _tanstack_react_query_build_legacy_types.UseInfiniteQueryOptions<FacilityOfferList, PkgOpenapiSharedProblemDetails, InfiniteData<FacilityOfferList, unknown>, FacilityOfferList, QueryKey<Options<ListFacilityOffersData>>, string | Pick<Pick<Options<ListFacilityOffersData>, "body" | "path" | "query" | "headers" | "baseUrl"> & {
|
|
150
|
-
_id: string;
|
|
151
|
-
_infinite?: boolean | undefined;
|
|
152
|
-
}, "body" | "path" | "query" | "headers">> & {
|
|
153
|
-
initialData: InfiniteData<FacilityOfferList, string | Pick<Pick<Options<ListFacilityOffersData>, "body" | "path" | "query" | "headers" | "baseUrl"> & {
|
|
154
|
-
_id: string;
|
|
155
|
-
_infinite?: boolean | undefined;
|
|
156
|
-
}, "body" | "path" | "query" | "headers">> | (() => InfiniteData<FacilityOfferList, string | Pick<Pick<Options<ListFacilityOffersData>, "body" | "path" | "query" | "headers" | "baseUrl"> & {
|
|
157
|
-
_id: string;
|
|
158
|
-
_infinite?: boolean | undefined;
|
|
159
|
-
}, "body" | "path" | "query" | "headers">>) | undefined;
|
|
160
|
-
} & {
|
|
161
|
-
queryKey: QueryKey<Options<ListFacilityOffersData>> & {
|
|
162
|
-
[dataTagSymbol]: InfiniteData<FacilityOfferList, unknown>;
|
|
163
|
-
[dataTagErrorSymbol]: PkgOpenapiSharedProblemDetails;
|
|
164
|
-
};
|
|
165
|
-
};
|
|
166
|
-
declare const createFacilityOfferOrderQueryKey: (options: Options<CreateFacilityOfferOrderData>) => (Pick<Options<CreateFacilityOfferOrderData>, "body" | "path" | "query" | "headers" | "baseUrl"> & {
|
|
167
|
-
_id: string;
|
|
168
|
-
_infinite?: boolean | undefined;
|
|
169
|
-
})[];
|
|
170
|
-
declare const createFacilityOfferOrderOptions: (options: Options<CreateFacilityOfferOrderData>) => _tanstack_query_core_build_legacy_hydration_ClXcjjG9.O<_tanstack_react_query_build_legacy_types.UseQueryOptions<FacilityOfferOrder, Error, FacilityOfferOrder, (Pick<Options<CreateFacilityOfferOrderData>, "body" | "path" | "query" | "headers" | "baseUrl"> & {
|
|
171
|
-
_id: string;
|
|
172
|
-
_infinite?: boolean | undefined;
|
|
173
|
-
})[]>, "queryFn"> & {
|
|
174
|
-
queryFn?: _tanstack_query_core_build_legacy_hydration_ClXcjjG9.K<FacilityOfferOrder, (Pick<Options<CreateFacilityOfferOrderData>, "body" | "path" | "query" | "headers" | "baseUrl"> & {
|
|
175
|
-
_id: string;
|
|
176
|
-
_infinite?: boolean | undefined;
|
|
177
|
-
})[], never> | undefined;
|
|
178
|
-
} & {
|
|
179
|
-
queryKey: (Pick<Options<CreateFacilityOfferOrderData>, "body" | "path" | "query" | "headers" | "baseUrl"> & {
|
|
180
|
-
_id: string;
|
|
181
|
-
_infinite?: boolean | undefined;
|
|
182
|
-
})[] & {
|
|
183
|
-
[dataTagSymbol]: FacilityOfferOrder;
|
|
184
|
-
[dataTagErrorSymbol]: Error;
|
|
185
|
-
};
|
|
186
|
-
};
|
|
187
|
-
declare const createFacilityOfferOrderMutation: (options?: Partial<Options<CreateFacilityOfferOrderData>>) => UseMutationOptions<FacilityOfferOrder, PkgOpenapiSharedProblemDetails, Options<CreateFacilityOfferOrderData>, unknown>;
|
|
188
|
-
|
|
189
|
-
export { addBookingMutation, addBookingOptions, addBookingQueryKey, createFacilityOfferOrderMutation, createFacilityOfferOrderOptions, createFacilityOfferOrderQueryKey, deleteBookingMutation, findBookingByIdOptions, findBookingByIdQueryKey, findBookingsInfiniteOptions, findBookingsInfiniteQueryKey, findBookingsOptions, findBookingsQueryKey, listFacilityOffersInfiniteOptions, listFacilityOffersInfiniteQueryKey, listFacilityOffersOptions, listFacilityOffersQueryKey, updateBookingMutation };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var b=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var H=Object.getOwnPropertyNames;var J=Object.prototype.hasOwnProperty;var V=(e,r)=>{for(var t in r)b(e,t,{get:r[t],enumerable:!0})},G=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of H(r))!J.call(e,a)&&a!==t&&b(e,a,{get:()=>r[a],enumerable:!(o=N(r,a))||o.enumerable});return e};var X=e=>G(b({},"__esModule",{value:!0}),e);var Fe={};V(Fe,{addBookingMutation:()=>pe,addBookingOptions:()=>ce,addBookingQueryKey:()=>$,createFacilityOfferOrderMutation:()=>me,createFacilityOfferOrderOptions:()=>be,createFacilityOfferOrderQueryKey:()=>W,deleteBookingMutation:()=>Oe,findBookingByIdOptions:()=>he,findBookingByIdQueryKey:()=>_,findBookingsInfiniteOptions:()=>ye,findBookingsInfiniteQueryKey:()=>L,findBookingsOptions:()=>ue,findBookingsQueryKey:()=>v,listFacilityOffersInfiniteOptions:()=>ke,listFacilityOffersInfiniteQueryKey:()=>P,listFacilityOffersOptions:()=>Be,listFacilityOffersQueryKey:()=>z,updateBookingMutation:()=>ge});module.exports=X(Fe);var Y=/\{[^{}]+\}/g,k=({allowReserved:e,name:r,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`${r}=${e?t:encodeURIComponent(t)}`},Z=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},ee=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},re=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},T=({allowReserved:e,explode:r,name:t,style:o,value:a})=>{if(!r){let i=(e?a:a.map(l=>encodeURIComponent(l))).join(ee(o));switch(o){case"label":return`.${i}`;case"matrix":return`;${t}=${i}`;case"simple":return i;default:return`${t}=${i}`}}let s=Z(o),n=a.map(i=>o==="label"||o==="simple"?e?i:encodeURIComponent(i):k({allowReserved:e,name:t,value:i})).join(s);return o==="label"||o==="matrix"?s+n:n},C=({allowReserved:e,explode:r,name:t,style:o,value:a})=>{if(a instanceof Date)return`${t}=${a.toISOString()}`;if(o!=="deepObject"&&!r){let i=[];Object.entries(a).forEach(([p,f])=>{i=[...i,p,e?f:encodeURIComponent(f)]});let l=i.join(",");switch(o){case"form":return`${t}=${l}`;case"label":return`.${l}`;case"matrix":return`;${t}=${l}`;default:return l}}let s=re(o),n=Object.entries(a).map(([i,l])=>k({allowReserved:e,name:o==="deepObject"?`${t}[${i}]`:i,value:l})).join(s);return o==="label"||o==="matrix"?s+n:n},te=({path:e,url:r})=>{let t=r,o=r.match(Y);if(o)for(let a of o){let s=!1,n=a.substring(1,a.length-1),i="simple";n.endsWith("*")&&(s=!0,n=n.substring(0,n.length-1)),n.startsWith(".")?(n=n.substring(1),i="label"):n.startsWith(";")&&(n=n.substring(1),i="matrix");let l=e[n];if(l==null)continue;if(Array.isArray(l)){t=t.replace(a,T({explode:s,name:n,style:i,value:l}));continue}if(typeof l=="object"){t=t.replace(a,C({explode:s,name:n,style:i,value:l}));continue}if(i==="matrix"){t=t.replace(a,`;${k({name:n,value:l})}`);continue}let p=encodeURIComponent(i==="label"?`.${l}`:l);t=t.replace(a,p)}return t},U=({allowReserved:e,array:r,object:t}={})=>o=>{let a=[];if(o&&typeof o=="object")for(let s in o){let n=o[s];if(n!=null){if(Array.isArray(n)){a=[...a,T({allowReserved:e,explode:!0,name:s,style:"form",value:n,...r})];continue}if(typeof n=="object"){a=[...a,C({allowReserved:e,explode:!0,name:s,style:"deepObject",value:n,...t})];continue}a=[...a,k({allowReserved:e,name:s,value:n})]}}return a.join("&")},oe=e=>{if(!e)return"stream";let r=e.split(";")[0]?.trim();if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(t=>r.startsWith(t)))return"blob";if(r.startsWith("text/"))return"text"}},ne=async(e,r)=>{let t=typeof r=="function"?await r(e):r;if(t)return e.scheme==="bearer"?`Bearer ${t}`:e.scheme==="basic"?`Basic ${btoa(t)}`:t},ie=async({security:e,...r})=>{for(let t of e){let o=await ne(t,r.auth);if(!o)continue;let a=t.name??"Authorization";switch(t.in){case"query":r.query||(r.query={}),r.query[a]=o;break;case"header":default:r.headers.set(a,o);break}return}},R=e=>ae({baseUrl:e.baseUrl??"",path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:U(e.querySerializer),url:e.url}),ae=({baseUrl:e,path:r,query:t,querySerializer:o,url:a})=>{let s=a.startsWith("/")?a:`/${a}`,n=e+s;r&&(n=te({path:r,url:n}));let i=t?o(t):"";return i.startsWith("?")&&(i=i.substring(1)),i&&(n+=`?${i}`),n},q=(e,r)=>{let t={...e,...r};return t.baseUrl?.endsWith("/")&&(t.baseUrl=t.baseUrl.substring(0,t.baseUrl.length-1)),t.headers=j(e.headers,r.headers),t},j=(...e)=>{let r=new Headers;for(let t of e){if(!t||typeof t!="object")continue;let o=t instanceof Headers?t.entries():Object.entries(t);for(let[a,s]of o)if(s===null)r.delete(a);else if(Array.isArray(s))for(let n of s)r.append(a,n);else s!==void 0&&r.set(a,typeof s=="object"?JSON.stringify(s):s)}return r},m=class{_fns;constructor(){this._fns=[]}clear(){this._fns=[]}exists(e){return this._fns.indexOf(e)!==-1}eject(e){let r=this._fns.indexOf(e);r!==-1&&(this._fns=[...this._fns.slice(0,r),...this._fns.slice(r+1)])}use(e){this._fns=[...this._fns,e]}},se=()=>({error:new m,request:new m,response:new m});var le={bodySerializer:e=>JSON.stringify(e)};var de=U({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),fe={"Content-Type":"application/json"},F=(e={})=>({...le,baseUrl:"",headers:fe,parseAs:"auto",querySerializer:de,...e}),A=(e={})=>{let r=q(F(),e),t=()=>({...r}),o=n=>(r=q(r,n),t()),a=se(),s=async n=>{let i={...r,...n,fetch:n.fetch??r.fetch??globalThis.fetch,headers:j(r.headers,n.headers)};i.security&&await ie({...i,security:i.security}),i.body&&i.bodySerializer&&(i.body=i.bodySerializer(i.body)),i.body||i.headers.delete("Content-Type");let l=R(i),p={redirect:"follow",...i},f=new Request(l,p);for(let u of a.request._fns)f=await u(f,i);let M=i.fetch,d=await M(f);for(let u of a.response._fns)d=await u(d,f,i);let h={request:f,response:d};if(d.ok){if(d.status===204||d.headers.get("Content-Length")==="0")return{data:{},...h};let u=(i.parseAs==="auto"?oe(d.headers.get("Content-Type")):i.parseAs)??"json";if(u==="stream")return{data:d.body,...h};let B=await d[u]();return u==="json"&&(i.responseValidator&&await i.responseValidator(B),i.responseTransformer&&(B=await i.responseTransformer(B))),{data:B,...h}}let g=await d.text();try{g=JSON.parse(g)}catch{}let O=g;for(let u of a.error._fns)O=await u(g,d,f,i);if(O=O||{},i.throwOnError)throw O;return{error:O,...h}};return{buildUrl:R,connect:n=>s({...n,method:"CONNECT"}),delete:n=>s({...n,method:"DELETE"}),get:n=>s({...n,method:"GET"}),getConfig:t,head:n=>s({...n,method:"HEAD"}),interceptors:a,options:n=>s({...n,method:"OPTIONS"}),patch:n=>s({...n,method:"PATCH"}),post:n=>s({...n,method:"POST"}),put:n=>s({...n,method:"PUT"}),request:s,setConfig:o,trace:n=>s({...n,method:"TRACE"})}};var y=A(F()),w=e=>(e?.client??y).get({...e,url:"/bookings"}),D=e=>(e?.client??y).post({...e,headers:{"Content-Type":"application/json",...e?.headers},url:"/bookings"}),I=e=>(e?.client??y).delete({...e,url:"/bookings/{bookingId}"}),K=e=>(e?.client??y).get({...e,url:"/bookings/{bookingId}"}),S=e=>(e?.client??y).put({...e,headers:{"Content-Type":"application/json",...e?.headers},url:"/bookings/{bookingId}"}),E=e=>(e?.client??y).get({...e,url:"/facilities/{facility_id}/offers"}),x=e=>(e?.client??y).post({...e,url:"/facilities/{facility_id}/offers/{offer_id}"});var c=(e,r,t)=>{let o={_id:e,baseUrl:(r?.client??y).getConfig().baseUrl};return t&&(o._infinite=t),r?.body&&(o.body=r.body),r?.headers&&(o.headers=r.headers),r?.path&&(o.path=r.path),r?.query&&(o.query=r.query),o},v=e=>[c("findBookings",e)],ue=e=>({queryFn:async({queryKey:r,signal:t})=>{let{data:o}=await w({...e,...r[0],signal:t,throwOnError:!0});return o},queryKey:v(e)}),Q=(e,r)=>{let t=e[0];return r.body&&(t.body={...e[0].body,...r.body}),r.headers&&(t.headers={...e[0].headers,...r.headers}),r.path&&(t.path={...e[0].path,...r.path}),r.query&&(t.query={...e[0].query,...r.query}),t},L=e=>[c("findBookings",e,!0)],ye=e=>({queryFn:async({pageParam:r,queryKey:t,signal:o})=>{let s=Q(t,typeof r=="object"?r:{query:{offset:r}}),{data:n}=await w({...e,...s,signal:o,throwOnError:!0});return n},queryKey:L(e)}),$=e=>[c("addBooking",e)],ce=e=>({queryFn:async({queryKey:r,signal:t})=>{let{data:o}=await D({...e,...r[0],signal:t,throwOnError:!0});return o},queryKey:$(e)}),pe=e=>({mutationFn:async t=>{let{data:o}=await D({...e,...t,throwOnError:!0});return o}}),Oe=e=>({mutationFn:async t=>{let{data:o}=await I({...e,...t,throwOnError:!0});return o}}),_=e=>[c("findBookingById",e)],he=e=>({queryFn:async({queryKey:r,signal:t})=>{let{data:o}=await K({...e,...r[0],signal:t,throwOnError:!0});return o},queryKey:_(e)}),ge=e=>({mutationFn:async t=>{let{data:o}=await S({...e,...t,throwOnError:!0});return o}}),z=e=>[c("listFacilityOffers",e)],Be=e=>({queryFn:async({queryKey:r,signal:t})=>{let{data:o}=await E({...e,...r[0],signal:t,throwOnError:!0});return o},queryKey:z(e)}),P=e=>[c("listFacilityOffers",e,!0)],ke=e=>({queryFn:async({pageParam:r,queryKey:t,signal:o})=>{let s=Q(t,typeof r=="object"?r:{query:{cursor:r}}),{data:n}=await E({...e,...s,signal:o,throwOnError:!0});return n},queryKey:P(e)}),W=e=>[c("createFacilityOfferOrder",e)],be=e=>({queryFn:async({queryKey:r,signal:t})=>{let{data:o}=await x({...e,...r[0],signal:t,throwOnError:!0});return o},queryKey:W(e)}),me=e=>({mutationFn:async t=>{let{data:o}=await x({...e,...t,throwOnError:!0});return o}});0&&(module.exports={addBookingMutation,addBookingOptions,addBookingQueryKey,createFacilityOfferOrderMutation,createFacilityOfferOrderOptions,createFacilityOfferOrderQueryKey,deleteBookingMutation,findBookingByIdOptions,findBookingByIdQueryKey,findBookingsInfiniteOptions,findBookingsInfiniteQueryKey,findBookingsOptions,findBookingsQueryKey,listFacilityOffersInfiniteOptions,listFacilityOffersInfiniteQueryKey,listFacilityOffersOptions,listFacilityOffersQueryKey,updateBookingMutation});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as p,b as s,c as y,d as u,e as f,f as c,g as d,h as O}from"../chunk-M5A265XW.mjs";var i=(t,e,r)=>{let o={_id:t,baseUrl:(e?.client??p).getConfig().baseUrl};return r&&(o._infinite=r),e?.body&&(o.body=e.body),e?.headers&&(o.headers=e.headers),e?.path&&(o.path=e.path),e?.query&&(o.query=e.query),o},l=t=>[i("findBookings",t)],E=t=>({queryFn:async({queryKey:e,signal:r})=>{let{data:o}=await s({...t,...e[0],signal:r,throwOnError:!0});return o},queryKey:l(t)}),k=(t,e)=>{let r=t[0];return e.body&&(r.body={...t[0].body,...e.body}),e.headers&&(r.headers={...t[0].headers,...e.headers}),e.path&&(r.path={...t[0].path,...e.path}),e.query&&(r.query={...t[0].query,...e.query}),r},F=t=>[i("findBookings",t,!0)],Q=t=>({queryFn:async({pageParam:e,queryKey:r,signal:o})=>{let n=k(r,typeof e=="object"?e:{query:{offset:e}}),{data:a}=await s({...t,...n,signal:o,throwOnError:!0});return a},queryKey:F(t)}),g=t=>[i("addBooking",t)],m=t=>({queryFn:async({queryKey:e,signal:r})=>{let{data:o}=await y({...t,...e[0],signal:r,throwOnError:!0});return o},queryKey:g(t)}),b=t=>({mutationFn:async r=>{let{data:o}=await y({...t,...r,throwOnError:!0});return o}}),x=t=>({mutationFn:async r=>{let{data:o}=await u({...t,...r,throwOnError:!0});return o}}),D=t=>[i("findBookingById",t)],I=t=>({queryFn:async({queryKey:e,signal:r})=>{let{data:o}=await f({...t,...e[0],signal:r,throwOnError:!0});return o},queryKey:D(t)}),U=t=>({mutationFn:async r=>{let{data:o}=await c({...t,...r,throwOnError:!0});return o}}),h=t=>[i("listFacilityOffers",t)],L=t=>({queryFn:async({queryKey:e,signal:r})=>{let{data:o}=await d({...t,...e[0],signal:r,throwOnError:!0});return o},queryKey:h(t)}),K=t=>[i("listFacilityOffers",t,!0)],R=t=>({queryFn:async({pageParam:e,queryKey:r,signal:o})=>{let n=k(r,typeof e=="object"?e:{query:{cursor:e}}),{data:a}=await d({...t,...n,signal:o,throwOnError:!0});return a},queryKey:K(t)}),q=t=>[i("createFacilityOfferOrder",t)],C=t=>({queryFn:async({queryKey:e,signal:r})=>{let{data:o}=await O({...t,...e[0],signal:r,throwOnError:!0});return o},queryKey:q(t)}),A=t=>({mutationFn:async r=>{let{data:o}=await O({...t,...r,throwOnError:!0});return o}});export{b as addBookingMutation,m as addBookingOptions,g as addBookingQueryKey,A as createFacilityOfferOrderMutation,C as createFacilityOfferOrderOptions,q as createFacilityOfferOrderQueryKey,x as deleteBookingMutation,I as findBookingByIdOptions,D as findBookingByIdQueryKey,Q as findBookingsInfiniteOptions,F as findBookingsInfiniteQueryKey,E as findBookingsOptions,l as findBookingsQueryKey,R as listFacilityOffersInfiniteOptions,K as listFacilityOffersInfiniteQueryKey,L as listFacilityOffersOptions,h as listFacilityOffersQueryKey,U as updateBookingMutation};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var C=/\{[^{}]+\}/g,O=({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)}`},F=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},S=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},v=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},k=({allowReserved:e,explode:n,name:t,style:s,value:a})=>{if(!n){let o=(e?a:a.map(l=>encodeURIComponent(l))).join(S(s));switch(s){case"label":return`.${o}`;case"matrix":return`;${t}=${o}`;case"simple":return o;default:return`${t}=${o}`}}let i=F(s),r=a.map(o=>s==="label"||s==="simple"?e?o:encodeURIComponent(o):O({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(([p,f])=>{o=[...o,p,e?f:encodeURIComponent(f)]});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=v(s),r=Object.entries(a).map(([o,l])=>O({allowReserved:e,name:s==="deepObject"?`${t}[${o}]`:o,value:l})).join(i);return s==="label"||s==="matrix"?i+r:r},A=({path:e,url:n})=>{let t=n,s=n.match(C);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,k({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,`;${O({name:r,value:l})}`);continue}let p=encodeURIComponent(o==="label"?`.${l}`:l);t=t.replace(a,p)}return t},T=({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,k({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,O({allowReserved:e,name:i,value:r})]}}return a.join("&")},U=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"}},$=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},q=async({security:e,...n})=>{for(let t of e){let s=await $(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}},E=e=>I({baseUrl:e.baseUrl??"",path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:T(e.querySerializer),url:e.url}),I=({baseUrl:e,path:n,query:t,querySerializer:s,url:a})=>{let i=a.startsWith("/")?a:`/${a}`,r=e+i;n&&(r=A({path:n,url:r}));let o=t?s(t):"";return o.startsWith("?")&&(o=o.substring(1)),o&&(r+=`?${o}`),r},B=(e,n)=>{let t={...e,...n};return t.baseUrl?.endsWith("/")&&(t.baseUrl=t.baseUrl.substring(0,t.baseUrl.length-1)),t.headers=j(e.headers,n.headers),t},j=(...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},m=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]}},z=()=>({error:new m,request:new m,response:new m});var _={bodySerializer:e=>JSON.stringify(e)};var W=T({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),L={"Content-Type":"application/json"},w=(e={})=>({..._,baseUrl:"",headers:L,parseAs:"auto",querySerializer:W,...e}),R=(e={})=>{let n=B(w(),e),t=()=>({...n}),s=r=>(n=B(n,r),t()),a=z(),i=async r=>{let o={...n,...r,fetch:r.fetch??n.fetch??globalThis.fetch,headers:j(n.headers,r.headers)};o.security&&await q({...o,security:o.security}),o.body&&o.bodySerializer&&(o.body=o.bodySerializer(o.body)),o.body||o.headers.delete("Content-Type");let l=E(o),p={redirect:"follow",...o},f=new Request(l,p);for(let u of a.request._fns)f=await u(f,o);let D=o.fetch,d=await D(f);for(let u of a.response._fns)d=await u(d,f,o);let y={request:f,response:d};if(d.ok){if(d.status===204||d.headers.get("Content-Length")==="0")return{data:{},...y};let u=(o.parseAs==="auto"?U(d.headers.get("Content-Type")):o.parseAs)??"json";if(u==="stream")return{data:d.body,...y};let g=await d[u]();return u==="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 h=b;for(let u of a.error._fns)h=await u(b,d,f,o);if(h=h||{},o.throwOnError)throw h;return{error:h,...y}};return{buildUrl:E,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 c=R(w()),J=e=>(e?.client??c).get({...e,url:"/bookings"}),V=e=>(e?.client??c).post({...e,headers:{"Content-Type":"application/json",...e?.headers},url:"/bookings"}),G=e=>(e?.client??c).delete({...e,url:"/bookings/{bookingId}"}),M=e=>(e?.client??c).get({...e,url:"/bookings/{bookingId}"}),Q=e=>(e?.client??c).put({...e,headers:{"Content-Type":"application/json",...e?.headers},url:"/bookings/{bookingId}"}),K=e=>(e?.client??c).get({...e,url:"/facilities/{facility_id}/offers"}),X=e=>(e?.client??c).post({...e,url:"/facilities/{facility_id}/offers/{offer_id}"});export{c as a,J as b,V as c,G as d,M as e,Q as f,K as g,X as h};
|
|
File without changes
|
package/dist/v1/index.d.mts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { 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 } from './types.gen.mjs';
|
|
2
|
-
export { addBooking, client, createFacilityOfferOrder, deleteBooking, findBookingById, findBookings, listFacilityOffers, updateBooking } from './sdk.gen.mjs';
|
|
3
|
-
import '@hey-api/client-fetch';
|
package/dist/v1/index.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { 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 } from './types.gen.js';
|
|
2
|
-
export { addBooking, client, createFacilityOfferOrder, deleteBooking, findBookingById, findBookings, listFacilityOffers, updateBooking } from './sdk.gen.js';
|
|
3
|
-
import '@hey-api/client-fetch';
|
package/dist/v1/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
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/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-PT2OYMNL.mjs";import{a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x}from"./chunk-M5A265XW.mjs";export{e as addBooking,o as client,x as createFacilityOfferOrder,f as deleteBooking,m as findBookingById,r as findBookings,t as listFacilityOffers,p as updateBooking};
|