Jiarenxiang | 38dcb05 | 2025-03-13 16:40:09 +0800 | [diff] [blame] | 1 | // @ts-ignore |
| 2 | /* eslint-disable */ |
| 3 | import { request } from '@umijs/max'; |
| 4 | |
| 5 | /** Returns pet inventories by status Returns a map of status codes to quantities GET /store/inventory */ |
| 6 | export async function getInventory(options?: { [key: string]: any }) { |
| 7 | return request<Record<string, any>>('/store/inventory', { |
| 8 | method: 'GET', |
| 9 | ...(options || {}), |
| 10 | }); |
| 11 | } |
| 12 | |
| 13 | /** Place an order for a pet POST /store/order */ |
| 14 | export async function placeOrder(body: API.Order, options?: { [key: string]: any }) { |
| 15 | return request<API.Order>('/store/order', { |
| 16 | method: 'POST', |
| 17 | data: body, |
| 18 | ...(options || {}), |
| 19 | }); |
| 20 | } |
| 21 | |
| 22 | /** Find purchase order by ID For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions GET /store/order/${param0} */ |
| 23 | export async function getOrderById( |
| 24 | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| 25 | params: API.getOrderByIdParams, |
| 26 | options?: { [key: string]: any }, |
| 27 | ) { |
| 28 | const { orderId: param0, ...queryParams } = params; |
| 29 | return request<API.Order>(`/store/order/${param0}`, { |
| 30 | method: 'GET', |
| 31 | params: { ...queryParams }, |
| 32 | ...(options || {}), |
| 33 | }); |
| 34 | } |
| 35 | |
| 36 | /** Delete purchase order by ID For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors DELETE /store/order/${param0} */ |
| 37 | export async function deleteOrder( |
| 38 | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| 39 | params: API.deleteOrderParams, |
| 40 | options?: { [key: string]: any }, |
| 41 | ) { |
| 42 | const { orderId: param0, ...queryParams } = params; |
| 43 | return request<any>(`/store/order/${param0}`, { |
| 44 | method: 'DELETE', |
| 45 | params: { ...queryParams }, |
| 46 | ...(options || {}), |
| 47 | }); |
| 48 | } |