store.ts 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /* eslint-disable */
  2. // @ts-ignore
  3. import request from '@/http/vue-query';
  4. import { CustomRequestOptions } from '@/http/types';
  5. import * as API from './types';
  6. /** Returns pet inventories by status Returns a map of status codes to quantities GET /store/inventory */
  7. export async function storeInventoryUsingGet({
  8. options,
  9. }: {
  10. options?: CustomRequestOptions;
  11. }) {
  12. return request<Record<string, number>>('/store/inventory', {
  13. method: 'GET',
  14. ...(options || {}),
  15. });
  16. }
  17. /** Place an order for a pet POST /store/order */
  18. export async function storeOrderUsingPost({
  19. body,
  20. options,
  21. }: {
  22. body: API.Order;
  23. options?: CustomRequestOptions;
  24. }) {
  25. return request<API.Order>('/store/order', {
  26. method: 'POST',
  27. headers: {
  28. 'Content-Type': 'application/json',
  29. },
  30. data: body,
  31. ...(options || {}),
  32. });
  33. }
  34. /** 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} */
  35. export async function storeOrderOrderIdUsingGet({
  36. params,
  37. options,
  38. }: {
  39. // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  40. params: API.StoreOrderOrderIdUsingGetParams;
  41. options?: CustomRequestOptions;
  42. }) {
  43. const { orderId: param0, ...queryParams } = params;
  44. return request<API.Order>(`/store/order/${param0}`, {
  45. method: 'GET',
  46. params: { ...queryParams },
  47. ...(options || {}),
  48. });
  49. }
  50. /** 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} */
  51. export async function storeOrderOrderIdUsingDelete({
  52. params,
  53. options,
  54. }: {
  55. // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  56. params: API.StoreOrderOrderIdUsingDeleteParams;
  57. options?: CustomRequestOptions;
  58. }) {
  59. const { orderId: param0, ...queryParams } = params;
  60. return request<unknown>(`/store/order/${param0}`, {
  61. method: 'DELETE',
  62. params: { ...queryParams },
  63. ...(options || {}),
  64. });
  65. }