@matchi/api 0.20241220.1 → 0.20250110.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/dist/{index.d.mts → main/index.d.mts} +8 -0
- package/dist/{index.d.ts → main/index.d.ts} +8 -0
- package/dist/main/index.js +1 -0
- package/dist/main/index.mjs +1 -0
- package/dist/v1/@tanstack/react-query.gen.d.mts +128 -0
- package/dist/v1/@tanstack/react-query.gen.d.ts +128 -0
- package/dist/v1/@tanstack/react-query.gen.js +1 -0
- package/dist/v1/@tanstack/react-query.gen.mjs +1 -0
- package/dist/v1/chunk-PT2OYMNL.mjs +0 -0
- package/dist/v1/chunk-SNGJPP3Q.mjs +1 -0
- package/dist/v1/index.d.mts +3 -0
- package/dist/v1/index.d.ts +3 -0
- package/dist/v1/index.js +1 -0
- package/dist/v1/index.mjs +1 -0
- package/dist/v1/schemas.gen.d.mts +239 -0
- package/dist/v1/schemas.gen.d.ts +239 -0
- package/dist/v1/schemas.gen.js +1 -0
- package/dist/v1/schemas.gen.mjs +1 -0
- package/dist/v1/sdk.gen.d.mts +35 -0
- package/dist/v1/sdk.gen.d.ts +35 -0
- package/dist/v1/sdk.gen.js +1 -0
- package/dist/v1/sdk.gen.mjs +1 -0
- package/dist/v1/types.gen.d.mts +316 -0
- package/dist/v1/types.gen.d.ts +316 -0
- package/dist/v1/types.gen.js +1 -0
- package/dist/v1/types.gen.mjs +1 -0
- package/package.json +58 -11
- package/dist/index.js +0 -1
- package/dist/index.mjs +0 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { FindBookingsData, Booking, PkgOpenapiSharedOffsetPaginatedResultSet, PkgOpenapiSharedProblemDetails, AddBookingData, DeleteBookingData, FindBookingByIdData, UpdateBookingData } from './types.gen.js';
|
|
2
|
+
import * as _hey_api_client_fetch from '@hey-api/client-fetch';
|
|
3
|
+
import { Options } from '@hey-api/client-fetch';
|
|
4
|
+
|
|
5
|
+
declare const client: _hey_api_client_fetch.Client<Request, Response, unknown, _hey_api_client_fetch.RequestOptions<boolean, string>>;
|
|
6
|
+
/**
|
|
7
|
+
* Get all bookings
|
|
8
|
+
* Retrieve a list of all bookings
|
|
9
|
+
*/
|
|
10
|
+
declare const findBookings: <ThrowOnError extends boolean = false>(options?: Options<FindBookingsData, ThrowOnError> | undefined) => _hey_api_client_fetch.RequestResult<{
|
|
11
|
+
data?: Booking[] | undefined;
|
|
12
|
+
meta?: PkgOpenapiSharedOffsetPaginatedResultSet | undefined;
|
|
13
|
+
}, PkgOpenapiSharedProblemDetails, ThrowOnError>;
|
|
14
|
+
/**
|
|
15
|
+
* Create a new booking
|
|
16
|
+
* Create a new booking with the provided details
|
|
17
|
+
*/
|
|
18
|
+
declare const addBooking: <ThrowOnError extends boolean = false>(options: Options<AddBookingData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<Booking, PkgOpenapiSharedProblemDetails, ThrowOnError>;
|
|
19
|
+
/**
|
|
20
|
+
* Delete a booking by ID
|
|
21
|
+
* Delete a booking with the specified ID
|
|
22
|
+
*/
|
|
23
|
+
declare const deleteBooking: <ThrowOnError extends boolean = false>(options: Options<DeleteBookingData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<void, PkgOpenapiSharedProblemDetails, ThrowOnError>;
|
|
24
|
+
/**
|
|
25
|
+
* Get a booking by ID
|
|
26
|
+
* Retrieve a booking with the specified ID
|
|
27
|
+
*/
|
|
28
|
+
declare const findBookingById: <ThrowOnError extends boolean = false>(options: Options<FindBookingByIdData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<Booking, PkgOpenapiSharedProblemDetails, ThrowOnError>;
|
|
29
|
+
/**
|
|
30
|
+
* Update a booking by ID
|
|
31
|
+
* Update a booking with the specified ID using the provided details
|
|
32
|
+
*/
|
|
33
|
+
declare const updateBooking: <ThrowOnError extends boolean = false>(options: Options<UpdateBookingData, ThrowOnError>) => _hey_api_client_fetch.RequestResult<Booking, PkgOpenapiSharedProblemDetails, ThrowOnError>;
|
|
34
|
+
|
|
35
|
+
export { addBooking, client, deleteBooking, findBookingById, findBookings, updateBooking };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var w=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var A=Object.getOwnPropertyNames;var U=Object.prototype.hasOwnProperty;var $=(e,t)=>{for(var r in t)w(e,r,{get:t[r],enumerable:!0})},C=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of A(t))!U.call(e,a)&&a!==r&&w(e,a,{get:()=>t[a],enumerable:!(i=v(t,a))||i.enumerable});return e};var q=e=>C(w({},"__esModule",{value:!0}),e);var ee={};$(ee,{addBooking:()=>K,client:()=>f,deleteBooking:()=>X,findBookingById:()=>Y,findBookings:()=>Q,updateBooking:()=>Z});module.exports=q(ee);var I=/\{[^{}]+\}/g,m=({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)}`},z=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},_=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},F=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(_(i));switch(i){case"label":return`.${n}`;case"matrix":return`;${r}=${n}`;case"simple":return n;default:return`${r}=${n}`}}let s=z(i),o=a.map(n=>i==="label"||i==="simple"?e?n:encodeURIComponent(n):m({allowReserved:e,name:r,value:n})).join(s);return i==="label"||i==="matrix"?s+o:o},j=({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,u])=>{n=[...n,p,e?u:encodeURIComponent(u)]});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=F(i),o=Object.entries(a).map(([n,l])=>m({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(I);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,j({explode:s,name:o,style:n,value:l}));continue}if(n==="matrix"){r=r.replace(a,`;${m({name:o,value:l})}`);continue}let p=encodeURIComponent(n==="label"?`.${l}`:l);r=r.replace(a,p)}return r},T=({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,j({allowReserved:e,explode:!0,name:s,style:"deepObject",value:o,...r})];continue}a=[...a,m({allowReserved:e,name:s,value:o})]}}return a.join("&")},N=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"}},P=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},H=async({security:e,...t})=>{for(let r of e){let i=await P(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}},O=e=>J({baseUrl:e.baseUrl??"",path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:T(e.querySerializer),url:e.url}),J=({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},E=(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},B=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]}},L=()=>({error:new B,request:new B,response:new B});var V={bodySerializer:e=>JSON.stringify(e)};var G=T({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),M={"Content-Type":"application/json"},k=(e={})=>({...V,baseUrl:"",headers:M,parseAs:"auto",querySerializer:G,...e}),S=(e={})=>{let t=E(k(),e),r=()=>({...t}),i=o=>(t=E(t,o),r()),a=L(),s=async o=>{let n={...t,...o,fetch:o.fetch??t.fetch??globalThis.fetch,headers:R(t.headers,o.headers)};n.security&&await H({...n,security:n.security}),n.body&&n.bodySerializer&&(n.body=n.bodySerializer(n.body)),n.body||n.headers.delete("Content-Type");let l=O(n),p={redirect:"follow",...n},u=new Request(l,p);for(let c of a.request._fns)u=await c(u,n);let D=n.fetch,d=await D(u);for(let c of a.response._fns)d=await c(d,u,n);let y={request:u,response:d};if(d.ok){if(d.status===204||d.headers.get("Content-Length")==="0")return{data:{},...y};let c=(n.parseAs==="auto"?N(d.headers.get("Content-Type")):n.parseAs)??"json";if(c==="stream")return{data:d.body,...y};let g=await d[c]();return c==="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 c of a.error._fns)h=await c(b,d,u,n);if(h=h||{},n.throwOnError)throw h;return{error:h,...y}};return{buildUrl:O,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 f=S(k()),Q=e=>(e?.client??f).get({...e,url:"/bookings"}),K=e=>(e?.client??f).post({...e,headers:{"Content-Type":"application/json",...e?.headers},url:"/bookings"}),X=e=>(e?.client??f).delete({...e,url:"/bookings/{bookingId}"}),Y=e=>(e?.client??f).get({...e,url:"/bookings/{bookingId}"}),Z=e=>(e?.client??f).put({...e,headers:{"Content-Type":"application/json",...e?.headers},url:"/bookings/{bookingId}"});0&&(module.exports={addBooking,client,deleteBooking,findBookingById,findBookings,updateBooking});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f}from"./chunk-SNGJPP3Q.mjs";export{c as addBooking,a as client,d as deleteBooking,e as findBookingById,b as findBookings,f as updateBooking};
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
type Booking = {
|
|
2
|
+
booker: string;
|
|
3
|
+
createdAt: string;
|
|
4
|
+
createdBy: string;
|
|
5
|
+
endTime: string;
|
|
6
|
+
id: string;
|
|
7
|
+
location: string;
|
|
8
|
+
participants: {
|
|
9
|
+
guests: Array<Guest>;
|
|
10
|
+
players: Array<Player>;
|
|
11
|
+
};
|
|
12
|
+
paymentReference: string;
|
|
13
|
+
startTime: string;
|
|
14
|
+
updatedAt: string;
|
|
15
|
+
updatedBy: string;
|
|
16
|
+
};
|
|
17
|
+
type CreateBooking = {
|
|
18
|
+
booker: string;
|
|
19
|
+
createdBy?: string;
|
|
20
|
+
endTime: string;
|
|
21
|
+
location: string;
|
|
22
|
+
participants: {
|
|
23
|
+
guests?: Array<Guest>;
|
|
24
|
+
players?: Array<Player>;
|
|
25
|
+
};
|
|
26
|
+
paymentReference: string;
|
|
27
|
+
startTime: string;
|
|
28
|
+
};
|
|
29
|
+
type Guest = {
|
|
30
|
+
email: string;
|
|
31
|
+
};
|
|
32
|
+
type Player = {
|
|
33
|
+
email: string;
|
|
34
|
+
id: string;
|
|
35
|
+
};
|
|
36
|
+
type UpdateBooking = {
|
|
37
|
+
booker: string;
|
|
38
|
+
endTime: string;
|
|
39
|
+
location: string;
|
|
40
|
+
participants: {
|
|
41
|
+
guests?: Array<Guest>;
|
|
42
|
+
players?: Array<Player>;
|
|
43
|
+
};
|
|
44
|
+
paymentReference: string;
|
|
45
|
+
startTime: string;
|
|
46
|
+
};
|
|
47
|
+
type PkgOpenapiSharedError = {
|
|
48
|
+
/**
|
|
49
|
+
* The error message
|
|
50
|
+
*/
|
|
51
|
+
message?: string;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* An array of error details to accompany a problem details response.
|
|
55
|
+
*/
|
|
56
|
+
type PkgOpenapiSharedErrors = Array<PkgOpenapiSharedError>;
|
|
57
|
+
/**
|
|
58
|
+
* Metadata about the offset based pagination for the result. This information is coupled with the OffsetParam and OffsetLimitParam. Intended to be used as the `meta` field in a list response, next to an `items` array field containing the data.
|
|
59
|
+
*
|
|
60
|
+
*/
|
|
61
|
+
type PkgOpenapiSharedOffsetPaginatedResultSet = {
|
|
62
|
+
limit: number;
|
|
63
|
+
moreResults: boolean;
|
|
64
|
+
offset: number;
|
|
65
|
+
};
|
|
66
|
+
type PkgOpenapiSharedProblemDetails = {
|
|
67
|
+
/**
|
|
68
|
+
* A human-readable explanation specific to this occurrence of the problem.
|
|
69
|
+
*/
|
|
70
|
+
detail?: string;
|
|
71
|
+
errors?: PkgOpenapiSharedErrors;
|
|
72
|
+
/**
|
|
73
|
+
* A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
|
|
74
|
+
*/
|
|
75
|
+
instance?: string;
|
|
76
|
+
/**
|
|
77
|
+
* The HTTP status code generated by the origin server for this occurrence of the problem.
|
|
78
|
+
*/
|
|
79
|
+
status?: number;
|
|
80
|
+
/**
|
|
81
|
+
* A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization.
|
|
82
|
+
*/
|
|
83
|
+
title: string;
|
|
84
|
+
/**
|
|
85
|
+
* A URI reference that identifies the problem type.
|
|
86
|
+
*/
|
|
87
|
+
type?: string;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Maximum number of items to return.
|
|
91
|
+
*/
|
|
92
|
+
type PkgOpenapiSharedOffsetLimitParam = number;
|
|
93
|
+
/**
|
|
94
|
+
* Number of items to skip before returning the results.
|
|
95
|
+
*/
|
|
96
|
+
type PkgOpenapiSharedOffsetParam = number;
|
|
97
|
+
type FindBookingsData = {
|
|
98
|
+
body?: never;
|
|
99
|
+
path?: never;
|
|
100
|
+
query?: {
|
|
101
|
+
/**
|
|
102
|
+
* Number of items to skip before returning the results.
|
|
103
|
+
*/
|
|
104
|
+
offset?: number;
|
|
105
|
+
/**
|
|
106
|
+
* Maximum number of items to return.
|
|
107
|
+
*/
|
|
108
|
+
limit?: number;
|
|
109
|
+
/**
|
|
110
|
+
* The location to filter the bookings by.
|
|
111
|
+
*/
|
|
112
|
+
location?: string;
|
|
113
|
+
};
|
|
114
|
+
url: '/bookings';
|
|
115
|
+
};
|
|
116
|
+
type FindBookingsErrors = {
|
|
117
|
+
/**
|
|
118
|
+
* Access token is not set or invalid.
|
|
119
|
+
*/
|
|
120
|
+
401: PkgOpenapiSharedProblemDetails;
|
|
121
|
+
/**
|
|
122
|
+
* The requestor is not authorized to perform this operation on the resource.
|
|
123
|
+
*/
|
|
124
|
+
403: PkgOpenapiSharedProblemDetails;
|
|
125
|
+
/**
|
|
126
|
+
* The server encountered an unexpected error
|
|
127
|
+
*/
|
|
128
|
+
500: PkgOpenapiSharedProblemDetails;
|
|
129
|
+
/**
|
|
130
|
+
* The requested operation is not implemented.
|
|
131
|
+
*/
|
|
132
|
+
501: PkgOpenapiSharedProblemDetails;
|
|
133
|
+
};
|
|
134
|
+
type FindBookingsError = FindBookingsErrors[keyof FindBookingsErrors];
|
|
135
|
+
type FindBookingsResponses = {
|
|
136
|
+
/**
|
|
137
|
+
* OK
|
|
138
|
+
*/
|
|
139
|
+
200: {
|
|
140
|
+
data?: Array<Booking>;
|
|
141
|
+
meta?: PkgOpenapiSharedOffsetPaginatedResultSet;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
type FindBookingsResponse = FindBookingsResponses[keyof FindBookingsResponses];
|
|
145
|
+
type AddBookingData = {
|
|
146
|
+
body: CreateBooking;
|
|
147
|
+
path?: never;
|
|
148
|
+
query?: never;
|
|
149
|
+
url: '/bookings';
|
|
150
|
+
};
|
|
151
|
+
type AddBookingErrors = {
|
|
152
|
+
/**
|
|
153
|
+
* The request was malformed or could not be processed.
|
|
154
|
+
*/
|
|
155
|
+
400: PkgOpenapiSharedProblemDetails;
|
|
156
|
+
/**
|
|
157
|
+
* Access token is not set or invalid.
|
|
158
|
+
*/
|
|
159
|
+
401: PkgOpenapiSharedProblemDetails;
|
|
160
|
+
/**
|
|
161
|
+
* The requestor is not authorized to perform this operation on the resource.
|
|
162
|
+
*/
|
|
163
|
+
403: PkgOpenapiSharedProblemDetails;
|
|
164
|
+
/**
|
|
165
|
+
* The resource being created is found to already exist on the server.
|
|
166
|
+
*/
|
|
167
|
+
409: PkgOpenapiSharedProblemDetails;
|
|
168
|
+
/**
|
|
169
|
+
* The server encountered an unexpected error
|
|
170
|
+
*/
|
|
171
|
+
500: PkgOpenapiSharedProblemDetails;
|
|
172
|
+
/**
|
|
173
|
+
* The service requested is unavailable
|
|
174
|
+
*/
|
|
175
|
+
503: PkgOpenapiSharedProblemDetails;
|
|
176
|
+
};
|
|
177
|
+
type AddBookingError = AddBookingErrors[keyof AddBookingErrors];
|
|
178
|
+
type AddBookingResponses = {
|
|
179
|
+
/**
|
|
180
|
+
* Created
|
|
181
|
+
*/
|
|
182
|
+
201: Booking;
|
|
183
|
+
};
|
|
184
|
+
type AddBookingResponse = AddBookingResponses[keyof AddBookingResponses];
|
|
185
|
+
type DeleteBookingData = {
|
|
186
|
+
body?: never;
|
|
187
|
+
path: {
|
|
188
|
+
bookingId: string;
|
|
189
|
+
};
|
|
190
|
+
query?: never;
|
|
191
|
+
url: '/bookings/{bookingId}';
|
|
192
|
+
};
|
|
193
|
+
type DeleteBookingErrors = {
|
|
194
|
+
/**
|
|
195
|
+
* Access token is not set or invalid.
|
|
196
|
+
*/
|
|
197
|
+
401: PkgOpenapiSharedProblemDetails;
|
|
198
|
+
/**
|
|
199
|
+
* The requestor is not authorized to perform this operation on the resource.
|
|
200
|
+
*/
|
|
201
|
+
403: PkgOpenapiSharedProblemDetails;
|
|
202
|
+
/**
|
|
203
|
+
* The requested resource was not found.
|
|
204
|
+
*/
|
|
205
|
+
404: PkgOpenapiSharedProblemDetails;
|
|
206
|
+
/**
|
|
207
|
+
* The server encountered an unexpected error
|
|
208
|
+
*/
|
|
209
|
+
500: PkgOpenapiSharedProblemDetails;
|
|
210
|
+
/**
|
|
211
|
+
* The requested operation is not implemented.
|
|
212
|
+
*/
|
|
213
|
+
501: PkgOpenapiSharedProblemDetails;
|
|
214
|
+
/**
|
|
215
|
+
* The service requested is unavailable
|
|
216
|
+
*/
|
|
217
|
+
503: PkgOpenapiSharedProblemDetails;
|
|
218
|
+
};
|
|
219
|
+
type DeleteBookingError = DeleteBookingErrors[keyof DeleteBookingErrors];
|
|
220
|
+
type DeleteBookingResponses = {
|
|
221
|
+
/**
|
|
222
|
+
* No Content
|
|
223
|
+
*/
|
|
224
|
+
204: void;
|
|
225
|
+
};
|
|
226
|
+
type DeleteBookingResponse = DeleteBookingResponses[keyof DeleteBookingResponses];
|
|
227
|
+
type FindBookingByIdData = {
|
|
228
|
+
body?: never;
|
|
229
|
+
path: {
|
|
230
|
+
bookingId: string;
|
|
231
|
+
};
|
|
232
|
+
query?: never;
|
|
233
|
+
url: '/bookings/{bookingId}';
|
|
234
|
+
};
|
|
235
|
+
type FindBookingByIdErrors = {
|
|
236
|
+
/**
|
|
237
|
+
* Access token is not set or invalid.
|
|
238
|
+
*/
|
|
239
|
+
401: PkgOpenapiSharedProblemDetails;
|
|
240
|
+
/**
|
|
241
|
+
* The requestor is not authorized to perform this operation on the resource.
|
|
242
|
+
*/
|
|
243
|
+
403: PkgOpenapiSharedProblemDetails;
|
|
244
|
+
/**
|
|
245
|
+
* The requested resource was not found.
|
|
246
|
+
*/
|
|
247
|
+
404: PkgOpenapiSharedProblemDetails;
|
|
248
|
+
/**
|
|
249
|
+
* The server encountered an unexpected error
|
|
250
|
+
*/
|
|
251
|
+
500: PkgOpenapiSharedProblemDetails;
|
|
252
|
+
/**
|
|
253
|
+
* The requested operation is not implemented.
|
|
254
|
+
*/
|
|
255
|
+
501: PkgOpenapiSharedProblemDetails;
|
|
256
|
+
/**
|
|
257
|
+
* The service requested is unavailable
|
|
258
|
+
*/
|
|
259
|
+
503: PkgOpenapiSharedProblemDetails;
|
|
260
|
+
};
|
|
261
|
+
type FindBookingByIdError = FindBookingByIdErrors[keyof FindBookingByIdErrors];
|
|
262
|
+
type FindBookingByIdResponses = {
|
|
263
|
+
/**
|
|
264
|
+
* OK
|
|
265
|
+
*/
|
|
266
|
+
200: Booking;
|
|
267
|
+
};
|
|
268
|
+
type FindBookingByIdResponse = FindBookingByIdResponses[keyof FindBookingByIdResponses];
|
|
269
|
+
type UpdateBookingData = {
|
|
270
|
+
body: UpdateBooking;
|
|
271
|
+
path: {
|
|
272
|
+
bookingId: string;
|
|
273
|
+
};
|
|
274
|
+
query?: never;
|
|
275
|
+
url: '/bookings/{bookingId}';
|
|
276
|
+
};
|
|
277
|
+
type UpdateBookingErrors = {
|
|
278
|
+
/**
|
|
279
|
+
* The request was malformed or could not be processed.
|
|
280
|
+
*/
|
|
281
|
+
400: PkgOpenapiSharedProblemDetails;
|
|
282
|
+
/**
|
|
283
|
+
* Access token is not set or invalid.
|
|
284
|
+
*/
|
|
285
|
+
401: PkgOpenapiSharedProblemDetails;
|
|
286
|
+
/**
|
|
287
|
+
* The requestor is not authorized to perform this operation on the resource.
|
|
288
|
+
*/
|
|
289
|
+
403: PkgOpenapiSharedProblemDetails;
|
|
290
|
+
/**
|
|
291
|
+
* The requested resource was not found.
|
|
292
|
+
*/
|
|
293
|
+
404: PkgOpenapiSharedProblemDetails;
|
|
294
|
+
/**
|
|
295
|
+
* The server encountered an unexpected error
|
|
296
|
+
*/
|
|
297
|
+
500: PkgOpenapiSharedProblemDetails;
|
|
298
|
+
/**
|
|
299
|
+
* The requested operation is not implemented.
|
|
300
|
+
*/
|
|
301
|
+
501: PkgOpenapiSharedProblemDetails;
|
|
302
|
+
/**
|
|
303
|
+
* The service requested is unavailable
|
|
304
|
+
*/
|
|
305
|
+
503: PkgOpenapiSharedProblemDetails;
|
|
306
|
+
};
|
|
307
|
+
type UpdateBookingError = UpdateBookingErrors[keyof UpdateBookingErrors];
|
|
308
|
+
type UpdateBookingResponses = {
|
|
309
|
+
/**
|
|
310
|
+
* OK
|
|
311
|
+
*/
|
|
312
|
+
200: Booking;
|
|
313
|
+
};
|
|
314
|
+
type UpdateBookingResponse = UpdateBookingResponses[keyof UpdateBookingResponses];
|
|
315
|
+
|
|
316
|
+
export type { AddBookingData, AddBookingError, AddBookingErrors, AddBookingResponse, AddBookingResponses, Booking, CreateBooking, DeleteBookingData, DeleteBookingError, DeleteBookingErrors, DeleteBookingResponse, DeleteBookingResponses, FindBookingByIdData, FindBookingByIdError, FindBookingByIdErrors, FindBookingByIdResponse, FindBookingByIdResponses, FindBookingsData, FindBookingsError, FindBookingsErrors, FindBookingsResponse, FindBookingsResponses, Guest, PkgOpenapiSharedError, PkgOpenapiSharedErrors, PkgOpenapiSharedOffsetLimitParam, PkgOpenapiSharedOffsetPaginatedResultSet, PkgOpenapiSharedOffsetParam, PkgOpenapiSharedProblemDetails, Player, UpdateBooking, UpdateBookingData, UpdateBookingError, UpdateBookingErrors, UpdateBookingResponse, UpdateBookingResponses };
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
type Booking = {
|
|
2
|
+
booker: string;
|
|
3
|
+
createdAt: string;
|
|
4
|
+
createdBy: string;
|
|
5
|
+
endTime: string;
|
|
6
|
+
id: string;
|
|
7
|
+
location: string;
|
|
8
|
+
participants: {
|
|
9
|
+
guests: Array<Guest>;
|
|
10
|
+
players: Array<Player>;
|
|
11
|
+
};
|
|
12
|
+
paymentReference: string;
|
|
13
|
+
startTime: string;
|
|
14
|
+
updatedAt: string;
|
|
15
|
+
updatedBy: string;
|
|
16
|
+
};
|
|
17
|
+
type CreateBooking = {
|
|
18
|
+
booker: string;
|
|
19
|
+
createdBy?: string;
|
|
20
|
+
endTime: string;
|
|
21
|
+
location: string;
|
|
22
|
+
participants: {
|
|
23
|
+
guests?: Array<Guest>;
|
|
24
|
+
players?: Array<Player>;
|
|
25
|
+
};
|
|
26
|
+
paymentReference: string;
|
|
27
|
+
startTime: string;
|
|
28
|
+
};
|
|
29
|
+
type Guest = {
|
|
30
|
+
email: string;
|
|
31
|
+
};
|
|
32
|
+
type Player = {
|
|
33
|
+
email: string;
|
|
34
|
+
id: string;
|
|
35
|
+
};
|
|
36
|
+
type UpdateBooking = {
|
|
37
|
+
booker: string;
|
|
38
|
+
endTime: string;
|
|
39
|
+
location: string;
|
|
40
|
+
participants: {
|
|
41
|
+
guests?: Array<Guest>;
|
|
42
|
+
players?: Array<Player>;
|
|
43
|
+
};
|
|
44
|
+
paymentReference: string;
|
|
45
|
+
startTime: string;
|
|
46
|
+
};
|
|
47
|
+
type PkgOpenapiSharedError = {
|
|
48
|
+
/**
|
|
49
|
+
* The error message
|
|
50
|
+
*/
|
|
51
|
+
message?: string;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* An array of error details to accompany a problem details response.
|
|
55
|
+
*/
|
|
56
|
+
type PkgOpenapiSharedErrors = Array<PkgOpenapiSharedError>;
|
|
57
|
+
/**
|
|
58
|
+
* Metadata about the offset based pagination for the result. This information is coupled with the OffsetParam and OffsetLimitParam. Intended to be used as the `meta` field in a list response, next to an `items` array field containing the data.
|
|
59
|
+
*
|
|
60
|
+
*/
|
|
61
|
+
type PkgOpenapiSharedOffsetPaginatedResultSet = {
|
|
62
|
+
limit: number;
|
|
63
|
+
moreResults: boolean;
|
|
64
|
+
offset: number;
|
|
65
|
+
};
|
|
66
|
+
type PkgOpenapiSharedProblemDetails = {
|
|
67
|
+
/**
|
|
68
|
+
* A human-readable explanation specific to this occurrence of the problem.
|
|
69
|
+
*/
|
|
70
|
+
detail?: string;
|
|
71
|
+
errors?: PkgOpenapiSharedErrors;
|
|
72
|
+
/**
|
|
73
|
+
* A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
|
|
74
|
+
*/
|
|
75
|
+
instance?: string;
|
|
76
|
+
/**
|
|
77
|
+
* The HTTP status code generated by the origin server for this occurrence of the problem.
|
|
78
|
+
*/
|
|
79
|
+
status?: number;
|
|
80
|
+
/**
|
|
81
|
+
* A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization.
|
|
82
|
+
*/
|
|
83
|
+
title: string;
|
|
84
|
+
/**
|
|
85
|
+
* A URI reference that identifies the problem type.
|
|
86
|
+
*/
|
|
87
|
+
type?: string;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Maximum number of items to return.
|
|
91
|
+
*/
|
|
92
|
+
type PkgOpenapiSharedOffsetLimitParam = number;
|
|
93
|
+
/**
|
|
94
|
+
* Number of items to skip before returning the results.
|
|
95
|
+
*/
|
|
96
|
+
type PkgOpenapiSharedOffsetParam = number;
|
|
97
|
+
type FindBookingsData = {
|
|
98
|
+
body?: never;
|
|
99
|
+
path?: never;
|
|
100
|
+
query?: {
|
|
101
|
+
/**
|
|
102
|
+
* Number of items to skip before returning the results.
|
|
103
|
+
*/
|
|
104
|
+
offset?: number;
|
|
105
|
+
/**
|
|
106
|
+
* Maximum number of items to return.
|
|
107
|
+
*/
|
|
108
|
+
limit?: number;
|
|
109
|
+
/**
|
|
110
|
+
* The location to filter the bookings by.
|
|
111
|
+
*/
|
|
112
|
+
location?: string;
|
|
113
|
+
};
|
|
114
|
+
url: '/bookings';
|
|
115
|
+
};
|
|
116
|
+
type FindBookingsErrors = {
|
|
117
|
+
/**
|
|
118
|
+
* Access token is not set or invalid.
|
|
119
|
+
*/
|
|
120
|
+
401: PkgOpenapiSharedProblemDetails;
|
|
121
|
+
/**
|
|
122
|
+
* The requestor is not authorized to perform this operation on the resource.
|
|
123
|
+
*/
|
|
124
|
+
403: PkgOpenapiSharedProblemDetails;
|
|
125
|
+
/**
|
|
126
|
+
* The server encountered an unexpected error
|
|
127
|
+
*/
|
|
128
|
+
500: PkgOpenapiSharedProblemDetails;
|
|
129
|
+
/**
|
|
130
|
+
* The requested operation is not implemented.
|
|
131
|
+
*/
|
|
132
|
+
501: PkgOpenapiSharedProblemDetails;
|
|
133
|
+
};
|
|
134
|
+
type FindBookingsError = FindBookingsErrors[keyof FindBookingsErrors];
|
|
135
|
+
type FindBookingsResponses = {
|
|
136
|
+
/**
|
|
137
|
+
* OK
|
|
138
|
+
*/
|
|
139
|
+
200: {
|
|
140
|
+
data?: Array<Booking>;
|
|
141
|
+
meta?: PkgOpenapiSharedOffsetPaginatedResultSet;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
type FindBookingsResponse = FindBookingsResponses[keyof FindBookingsResponses];
|
|
145
|
+
type AddBookingData = {
|
|
146
|
+
body: CreateBooking;
|
|
147
|
+
path?: never;
|
|
148
|
+
query?: never;
|
|
149
|
+
url: '/bookings';
|
|
150
|
+
};
|
|
151
|
+
type AddBookingErrors = {
|
|
152
|
+
/**
|
|
153
|
+
* The request was malformed or could not be processed.
|
|
154
|
+
*/
|
|
155
|
+
400: PkgOpenapiSharedProblemDetails;
|
|
156
|
+
/**
|
|
157
|
+
* Access token is not set or invalid.
|
|
158
|
+
*/
|
|
159
|
+
401: PkgOpenapiSharedProblemDetails;
|
|
160
|
+
/**
|
|
161
|
+
* The requestor is not authorized to perform this operation on the resource.
|
|
162
|
+
*/
|
|
163
|
+
403: PkgOpenapiSharedProblemDetails;
|
|
164
|
+
/**
|
|
165
|
+
* The resource being created is found to already exist on the server.
|
|
166
|
+
*/
|
|
167
|
+
409: PkgOpenapiSharedProblemDetails;
|
|
168
|
+
/**
|
|
169
|
+
* The server encountered an unexpected error
|
|
170
|
+
*/
|
|
171
|
+
500: PkgOpenapiSharedProblemDetails;
|
|
172
|
+
/**
|
|
173
|
+
* The service requested is unavailable
|
|
174
|
+
*/
|
|
175
|
+
503: PkgOpenapiSharedProblemDetails;
|
|
176
|
+
};
|
|
177
|
+
type AddBookingError = AddBookingErrors[keyof AddBookingErrors];
|
|
178
|
+
type AddBookingResponses = {
|
|
179
|
+
/**
|
|
180
|
+
* Created
|
|
181
|
+
*/
|
|
182
|
+
201: Booking;
|
|
183
|
+
};
|
|
184
|
+
type AddBookingResponse = AddBookingResponses[keyof AddBookingResponses];
|
|
185
|
+
type DeleteBookingData = {
|
|
186
|
+
body?: never;
|
|
187
|
+
path: {
|
|
188
|
+
bookingId: string;
|
|
189
|
+
};
|
|
190
|
+
query?: never;
|
|
191
|
+
url: '/bookings/{bookingId}';
|
|
192
|
+
};
|
|
193
|
+
type DeleteBookingErrors = {
|
|
194
|
+
/**
|
|
195
|
+
* Access token is not set or invalid.
|
|
196
|
+
*/
|
|
197
|
+
401: PkgOpenapiSharedProblemDetails;
|
|
198
|
+
/**
|
|
199
|
+
* The requestor is not authorized to perform this operation on the resource.
|
|
200
|
+
*/
|
|
201
|
+
403: PkgOpenapiSharedProblemDetails;
|
|
202
|
+
/**
|
|
203
|
+
* The requested resource was not found.
|
|
204
|
+
*/
|
|
205
|
+
404: PkgOpenapiSharedProblemDetails;
|
|
206
|
+
/**
|
|
207
|
+
* The server encountered an unexpected error
|
|
208
|
+
*/
|
|
209
|
+
500: PkgOpenapiSharedProblemDetails;
|
|
210
|
+
/**
|
|
211
|
+
* The requested operation is not implemented.
|
|
212
|
+
*/
|
|
213
|
+
501: PkgOpenapiSharedProblemDetails;
|
|
214
|
+
/**
|
|
215
|
+
* The service requested is unavailable
|
|
216
|
+
*/
|
|
217
|
+
503: PkgOpenapiSharedProblemDetails;
|
|
218
|
+
};
|
|
219
|
+
type DeleteBookingError = DeleteBookingErrors[keyof DeleteBookingErrors];
|
|
220
|
+
type DeleteBookingResponses = {
|
|
221
|
+
/**
|
|
222
|
+
* No Content
|
|
223
|
+
*/
|
|
224
|
+
204: void;
|
|
225
|
+
};
|
|
226
|
+
type DeleteBookingResponse = DeleteBookingResponses[keyof DeleteBookingResponses];
|
|
227
|
+
type FindBookingByIdData = {
|
|
228
|
+
body?: never;
|
|
229
|
+
path: {
|
|
230
|
+
bookingId: string;
|
|
231
|
+
};
|
|
232
|
+
query?: never;
|
|
233
|
+
url: '/bookings/{bookingId}';
|
|
234
|
+
};
|
|
235
|
+
type FindBookingByIdErrors = {
|
|
236
|
+
/**
|
|
237
|
+
* Access token is not set or invalid.
|
|
238
|
+
*/
|
|
239
|
+
401: PkgOpenapiSharedProblemDetails;
|
|
240
|
+
/**
|
|
241
|
+
* The requestor is not authorized to perform this operation on the resource.
|
|
242
|
+
*/
|
|
243
|
+
403: PkgOpenapiSharedProblemDetails;
|
|
244
|
+
/**
|
|
245
|
+
* The requested resource was not found.
|
|
246
|
+
*/
|
|
247
|
+
404: PkgOpenapiSharedProblemDetails;
|
|
248
|
+
/**
|
|
249
|
+
* The server encountered an unexpected error
|
|
250
|
+
*/
|
|
251
|
+
500: PkgOpenapiSharedProblemDetails;
|
|
252
|
+
/**
|
|
253
|
+
* The requested operation is not implemented.
|
|
254
|
+
*/
|
|
255
|
+
501: PkgOpenapiSharedProblemDetails;
|
|
256
|
+
/**
|
|
257
|
+
* The service requested is unavailable
|
|
258
|
+
*/
|
|
259
|
+
503: PkgOpenapiSharedProblemDetails;
|
|
260
|
+
};
|
|
261
|
+
type FindBookingByIdError = FindBookingByIdErrors[keyof FindBookingByIdErrors];
|
|
262
|
+
type FindBookingByIdResponses = {
|
|
263
|
+
/**
|
|
264
|
+
* OK
|
|
265
|
+
*/
|
|
266
|
+
200: Booking;
|
|
267
|
+
};
|
|
268
|
+
type FindBookingByIdResponse = FindBookingByIdResponses[keyof FindBookingByIdResponses];
|
|
269
|
+
type UpdateBookingData = {
|
|
270
|
+
body: UpdateBooking;
|
|
271
|
+
path: {
|
|
272
|
+
bookingId: string;
|
|
273
|
+
};
|
|
274
|
+
query?: never;
|
|
275
|
+
url: '/bookings/{bookingId}';
|
|
276
|
+
};
|
|
277
|
+
type UpdateBookingErrors = {
|
|
278
|
+
/**
|
|
279
|
+
* The request was malformed or could not be processed.
|
|
280
|
+
*/
|
|
281
|
+
400: PkgOpenapiSharedProblemDetails;
|
|
282
|
+
/**
|
|
283
|
+
* Access token is not set or invalid.
|
|
284
|
+
*/
|
|
285
|
+
401: PkgOpenapiSharedProblemDetails;
|
|
286
|
+
/**
|
|
287
|
+
* The requestor is not authorized to perform this operation on the resource.
|
|
288
|
+
*/
|
|
289
|
+
403: PkgOpenapiSharedProblemDetails;
|
|
290
|
+
/**
|
|
291
|
+
* The requested resource was not found.
|
|
292
|
+
*/
|
|
293
|
+
404: PkgOpenapiSharedProblemDetails;
|
|
294
|
+
/**
|
|
295
|
+
* The server encountered an unexpected error
|
|
296
|
+
*/
|
|
297
|
+
500: PkgOpenapiSharedProblemDetails;
|
|
298
|
+
/**
|
|
299
|
+
* The requested operation is not implemented.
|
|
300
|
+
*/
|
|
301
|
+
501: PkgOpenapiSharedProblemDetails;
|
|
302
|
+
/**
|
|
303
|
+
* The service requested is unavailable
|
|
304
|
+
*/
|
|
305
|
+
503: PkgOpenapiSharedProblemDetails;
|
|
306
|
+
};
|
|
307
|
+
type UpdateBookingError = UpdateBookingErrors[keyof UpdateBookingErrors];
|
|
308
|
+
type UpdateBookingResponses = {
|
|
309
|
+
/**
|
|
310
|
+
* OK
|
|
311
|
+
*/
|
|
312
|
+
200: Booking;
|
|
313
|
+
};
|
|
314
|
+
type UpdateBookingResponse = UpdateBookingResponses[keyof UpdateBookingResponses];
|
|
315
|
+
|
|
316
|
+
export type { AddBookingData, AddBookingError, AddBookingErrors, AddBookingResponse, AddBookingResponses, Booking, CreateBooking, DeleteBookingData, DeleteBookingError, DeleteBookingErrors, DeleteBookingResponse, DeleteBookingResponses, FindBookingByIdData, FindBookingByIdError, FindBookingByIdErrors, FindBookingByIdResponse, FindBookingByIdResponses, FindBookingsData, FindBookingsError, FindBookingsErrors, FindBookingsResponse, FindBookingsResponses, Guest, PkgOpenapiSharedError, PkgOpenapiSharedErrors, PkgOpenapiSharedOffsetLimitParam, PkgOpenapiSharedOffsetPaginatedResultSet, PkgOpenapiSharedOffsetParam, PkgOpenapiSharedProblemDetails, Player, UpdateBooking, UpdateBookingData, UpdateBookingError, UpdateBookingErrors, UpdateBookingResponse, UpdateBookingResponses };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var i=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var g=(r,e,n,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of a(e))!s.call(r,o)&&o!==n&&i(r,o,{get:()=>e[o],enumerable:!(t=p(e,o))||t.enumerable});return r};var d=r=>g(i({},"__esModule",{value:!0}),r);var k={};module.exports=d(k);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-PT2OYMNL.mjs";
|