You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
() => import { ExtraFetchOptions } from '@/types';
返回 导入 ExtraFetchOptions 的字符串
部分生成的文件内容
import { stringify } from '../../utils';
import { request } from '../../utils';
import { ExtraFetchOptions } from '../../utils';
import { Pet } from './interfaces';
export interface PostPetPayload extends ExtraFetchOptions {
/**
* Pet object that needs to be added to the store
*/
body: Pet;
}
/**
* Add a new pet to the store
*
*/
export async function postPet(payload: PostPetPayload) {
const { body, ...extraFetchOptions } = payload;
return request<undefined>(`/pet`,
{
...extraFetchOptions,
method: 'post',
body,
}
);
}
// ./interfaces
export interfacePet{id?: numbercategory?: Category
name: string// example: "doggie"photoUrls: Array<string>tags?: Array<Tag>status?: 'available'|'pending'|'sold'// pet status in the store}