blob: b9c689a6abfff2a8bcaee9e424f46f1ac918947b [file] [log] [blame]
86133aaa3f5d2025-04-20 21:33:29 +08001// @ts-ignore
2/* eslint-disable */
3import { request } from '@umijs/max';
4
5/** Returns pet inventories by status Returns a map of status codes to quantities GET /store/inventory */
6export 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 */
14export 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} */
23export 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} */
37export 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}