···1+// This file is auto-generated by @hey-api/openapi-ts
2+export * from './schemas.gen';
3+export * from './services.gen';
4+export * from './types.gen';
···1+// This file is auto-generated by @hey-api/openapi-ts
2+3+import type { CancelablePromise } from '@hey-api/client-axios';
4+import { OpenAPI } from '@hey-api/client-axios';
5+import { request as __request } from '@hey-api/client-axios';
6+7+import type { $OpenApiTs } from './types.gen';
8+9+export class PetService {
10+ /**
11+ * Add a new pet to the store
12+ * Add a new pet to the store
13+ * @param data The data for the request.
14+ * @param data.requestBody Create a new pet in the store
15+ * @returns Pet Successful operation
16+ * @throws ApiError
17+ */
18+ public static addPet(
19+ data: $OpenApiTs['/pet']['post']['req'],
20+ ): CancelablePromise<$OpenApiTs['/pet']['post']['res'][200]> {
21+ return __request(OpenAPI, {
22+ body: data.requestBody,
23+ errors: {
24+ 405: 'Invalid input',
25+ },
26+ mediaType: 'application/json',
27+ method: 'POST',
28+ url: '/pet',
29+ });
30+ }
31+32+ /**
33+ * Update an existing pet
34+ * Update an existing pet by Id
35+ * @param data The data for the request.
36+ * @param data.requestBody Update an existent pet in the store
37+ * @returns Pet Successful operation
38+ * @throws ApiError
39+ */
40+ public static updatePet(
41+ data: $OpenApiTs['/pet']['put']['req'],
42+ ): CancelablePromise<$OpenApiTs['/pet']['put']['res'][200]> {
43+ return __request(OpenAPI, {
44+ body: data.requestBody,
45+ errors: {
46+ 400: 'Invalid ID supplied',
47+ 404: 'Pet not found',
48+ 405: 'Validation exception',
49+ },
50+ mediaType: 'application/json',
51+ method: 'PUT',
52+ url: '/pet',
53+ });
54+ }
55+56+ /**
57+ * Finds Pets by status
58+ * Multiple status values can be provided with comma separated strings
59+ * @param data The data for the request.
60+ * @param data.status Status values that need to be considered for filter
61+ * @returns Pet successful operation
62+ * @throws ApiError
63+ */
64+ public static findPetsByStatus(
65+ data: $OpenApiTs['/pet/findByStatus']['get']['req'] = {},
66+ ): CancelablePromise<$OpenApiTs['/pet/findByStatus']['get']['res'][200]> {
67+ return __request(OpenAPI, {
68+ errors: {
69+ 400: 'Invalid status value',
70+ },
71+ method: 'GET',
72+ query: {
73+ status: data.status,
74+ },
75+ url: '/pet/findByStatus',
76+ });
77+ }
78+79+ /**
80+ * Finds Pets by tags
81+ * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
82+ * @param data The data for the request.
83+ * @param data.tags Tags to filter by
84+ * @returns Pet successful operation
85+ * @throws ApiError
86+ */
87+ public static findPetsByTags(
88+ data: $OpenApiTs['/pet/findByTags']['get']['req'] = {},
89+ ): CancelablePromise<$OpenApiTs['/pet/findByTags']['get']['res'][200]> {
90+ return __request(OpenAPI, {
91+ errors: {
92+ 400: 'Invalid tag value',
93+ },
94+ method: 'GET',
95+ query: {
96+ tags: data.tags,
97+ },
98+ url: '/pet/findByTags',
99+ });
100+ }
101+102+ /**
103+ * Find pet by ID
104+ * Returns a single pet
105+ * @param data The data for the request.
106+ * @param data.petId ID of pet to return
107+ * @returns Pet successful operation
108+ * @throws ApiError
109+ */
110+ public static getPetById(
111+ data: $OpenApiTs['/pet/{petId}']['get']['req'],
112+ ): CancelablePromise<$OpenApiTs['/pet/{petId}']['get']['res'][200]> {
113+ return __request(OpenAPI, {
114+ errors: {
115+ 400: 'Invalid ID supplied',
116+ 404: 'Pet not found',
117+ },
118+ method: 'GET',
119+ path: {
120+ petId: data.petId,
121+ },
122+ url: '/pet/{petId}',
123+ });
124+ }
125+126+ /**
127+ * Updates a pet in the store with form data
128+ * @param data The data for the request.
129+ * @param data.petId ID of pet that needs to be updated
130+ * @param data.name Name of pet that needs to be updated
131+ * @param data.status Status of pet that needs to be updated
132+ * @throws ApiError
133+ */
134+ public static updatePetWithForm(
135+ data: $OpenApiTs['/pet/{petId}']['post']['req'],
136+ ): CancelablePromise<void> {
137+ return __request(OpenAPI, {
138+ errors: {
139+ 405: 'Invalid input',
140+ },
141+ method: 'POST',
142+ path: {
143+ petId: data.petId,
144+ },
145+ query: {
146+ name: data.name,
147+ status: data.status,
148+ },
149+ url: '/pet/{petId}',
150+ });
151+ }
152+153+ /**
154+ * Deletes a pet
155+ * @param data The data for the request.
156+ * @param data.petId Pet id to delete
157+ * @param data.apiKey
158+ * @throws ApiError
159+ */
160+ public static deletePet(
161+ data: $OpenApiTs['/pet/{petId}']['delete']['req'],
162+ ): CancelablePromise<void> {
163+ return __request(OpenAPI, {
164+ errors: {
165+ 400: 'Invalid pet value',
166+ },
167+ headers: {
168+ api_key: data.apiKey,
169+ },
170+ method: 'DELETE',
171+ path: {
172+ petId: data.petId,
173+ },
174+ url: '/pet/{petId}',
175+ });
176+ }
177+178+ /**
179+ * uploads an image
180+ * @param data The data for the request.
181+ * @param data.petId ID of pet to update
182+ * @param data.additionalMetadata Additional Metadata
183+ * @param data.requestBody
184+ * @returns ApiResponse successful operation
185+ * @throws ApiError
186+ */
187+ public static uploadFile(
188+ data: $OpenApiTs['/pet/{petId}/uploadImage']['post']['req'],
189+ ): CancelablePromise<
190+ $OpenApiTs['/pet/{petId}/uploadImage']['post']['res'][200]
191+ > {
192+ return __request(OpenAPI, {
193+ body: data.requestBody,
194+ mediaType: 'application/octet-stream',
195+ method: 'POST',
196+ path: {
197+ petId: data.petId,
198+ },
199+ query: {
200+ additionalMetadata: data.additionalMetadata,
201+ },
202+ url: '/pet/{petId}/uploadImage',
203+ });
204+ }
205+}
206+207+export class StoreService {
208+ /**
209+ * Returns pet inventories by status
210+ * Returns a map of status codes to quantities
211+ * @returns number successful operation
212+ * @throws ApiError
213+ */
214+ public static getInventory(): CancelablePromise<
215+ $OpenApiTs['/store/inventory']['get']['res'][200]
216+ > {
217+ return __request(OpenAPI, {
218+ method: 'GET',
219+ url: '/store/inventory',
220+ });
221+ }
222+223+ /**
224+ * Place an order for a pet
225+ * Place a new order in the store
226+ * @param data The data for the request.
227+ * @param data.requestBody
228+ * @returns Order successful operation
229+ * @throws ApiError
230+ */
231+ public static placeOrder(
232+ data: $OpenApiTs['/store/order']['post']['req'] = {},
233+ ): CancelablePromise<$OpenApiTs['/store/order']['post']['res'][200]> {
234+ return __request(OpenAPI, {
235+ body: data.requestBody,
236+ errors: {
237+ 405: 'Invalid input',
238+ },
239+ mediaType: 'application/json',
240+ method: 'POST',
241+ url: '/store/order',
242+ });
243+ }
244+245+ /**
246+ * Find purchase order by ID
247+ * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions.
248+ * @param data The data for the request.
249+ * @param data.orderId ID of order that needs to be fetched
250+ * @returns Order successful operation
251+ * @throws ApiError
252+ */
253+ public static getOrderById(
254+ data: $OpenApiTs['/store/order/{orderId}']['get']['req'],
255+ ): CancelablePromise<
256+ $OpenApiTs['/store/order/{orderId}']['get']['res'][200]
257+ > {
258+ return __request(OpenAPI, {
259+ errors: {
260+ 400: 'Invalid ID supplied',
261+ 404: 'Order not found',
262+ },
263+ method: 'GET',
264+ path: {
265+ orderId: data.orderId,
266+ },
267+ url: '/store/order/{orderId}',
268+ });
269+ }
270+271+ /**
272+ * Delete purchase order by ID
273+ * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
274+ * @param data The data for the request.
275+ * @param data.orderId ID of the order that needs to be deleted
276+ * @throws ApiError
277+ */
278+ public static deleteOrder(
279+ data: $OpenApiTs['/store/order/{orderId}']['delete']['req'],
280+ ): CancelablePromise<void> {
281+ return __request(OpenAPI, {
282+ errors: {
283+ 400: 'Invalid ID supplied',
284+ 404: 'Order not found',
285+ },
286+ method: 'DELETE',
287+ path: {
288+ orderId: data.orderId,
289+ },
290+ url: '/store/order/{orderId}',
291+ });
292+ }
293+}
294+295+export class UserService {
296+ /**
297+ * Create user
298+ * This can only be done by the logged in user.
299+ * @param data The data for the request.
300+ * @param data.requestBody Created user object
301+ * @returns User successful operation
302+ * @throws ApiError
303+ */
304+ public static createUser(
305+ data: $OpenApiTs['/user']['post']['req'] = {},
306+ ): CancelablePromise<$OpenApiTs['/user']['post']['res'][200]> {
307+ return __request(OpenAPI, {
308+ body: data.requestBody,
309+ mediaType: 'application/json',
310+ method: 'POST',
311+ url: '/user',
312+ });
313+ }
314+315+ /**
316+ * Creates list of users with given input array
317+ * Creates list of users with given input array
318+ * @param data The data for the request.
319+ * @param data.requestBody
320+ * @returns User Successful operation
321+ * @returns unknown successful operation
322+ * @throws ApiError
323+ */
324+ public static createUsersWithListInput(
325+ data: $OpenApiTs['/user/createWithList']['post']['req'] = {},
326+ ): CancelablePromise<
327+ | $OpenApiTs['/user/createWithList']['post']['res'][200]
328+ | $OpenApiTs['/user/createWithList']['post']['res'][200]
329+ > {
330+ return __request(OpenAPI, {
331+ body: data.requestBody,
332+ mediaType: 'application/json',
333+ method: 'POST',
334+ url: '/user/createWithList',
335+ });
336+ }
337+338+ /**
339+ * Logs user into the system
340+ * @param data The data for the request.
341+ * @param data.username The user name for login
342+ * @param data.password The password for login in clear text
343+ * @returns string successful operation
344+ * @throws ApiError
345+ */
346+ public static loginUser(
347+ data: $OpenApiTs['/user/login']['get']['req'] = {},
348+ ): CancelablePromise<$OpenApiTs['/user/login']['get']['res'][200]> {
349+ return __request(OpenAPI, {
350+ errors: {
351+ 400: 'Invalid username/password supplied',
352+ },
353+ method: 'GET',
354+ query: {
355+ password: data.password,
356+ username: data.username,
357+ },
358+ url: '/user/login',
359+ });
360+ }
361+362+ /**
363+ * Logs out current logged in user session
364+ * @returns unknown successful operation
365+ * @throws ApiError
366+ */
367+ public static logoutUser(): CancelablePromise<
368+ $OpenApiTs['/user/logout']['get']['res'][200]
369+ > {
370+ return __request(OpenAPI, {
371+ method: 'GET',
372+ url: '/user/logout',
373+ });
374+ }
375+376+ /**
377+ * Get user by user name
378+ * @param data The data for the request.
379+ * @param data.username The name that needs to be fetched. Use user1 for testing.
380+ * @returns User successful operation
381+ * @throws ApiError
382+ */
383+ public static getUserByName(
384+ data: $OpenApiTs['/user/{username}']['get']['req'],
385+ ): CancelablePromise<$OpenApiTs['/user/{username}']['get']['res'][200]> {
386+ return __request(OpenAPI, {
387+ errors: {
388+ 400: 'Invalid username supplied',
389+ 404: 'User not found',
390+ },
391+ method: 'GET',
392+ path: {
393+ username: data.username,
394+ },
395+ url: '/user/{username}',
396+ });
397+ }
398+399+ /**
400+ * Update user
401+ * This can only be done by the logged in user.
402+ * @param data The data for the request.
403+ * @param data.username name that needs to be updated
404+ * @param data.requestBody Update an existent user in the store
405+ * @returns unknown successful operation
406+ * @throws ApiError
407+ */
408+ public static updateUser(
409+ data: $OpenApiTs['/user/{username}']['put']['req'],
410+ ): CancelablePromise<$OpenApiTs['/user/{username}']['put']['res'][200]> {
411+ return __request(OpenAPI, {
412+ body: data.requestBody,
413+ mediaType: 'application/json',
414+ method: 'PUT',
415+ path: {
416+ username: data.username,
417+ },
418+ url: '/user/{username}',
419+ });
420+ }
421+422+ /**
423+ * Delete user
424+ * This can only be done by the logged in user.
425+ * @param data The data for the request.
426+ * @param data.username The name that needs to be deleted
427+ * @throws ApiError
428+ */
429+ public static deleteUser(
430+ data: $OpenApiTs['/user/{username}']['delete']['req'],
431+ ): CancelablePromise<void> {
432+ return __request(OpenAPI, {
433+ errors: {
434+ 400: 'Invalid username supplied',
435+ 404: 'User not found',
436+ },
437+ method: 'DELETE',
438+ path: {
439+ username: data.username,
440+ },
441+ url: '/user/{username}',
442+ });
443+ }
444+}