// This file is auto-generated by @hey-api/openapi-ts import type { Client, Options as Options2, TDataShape } from './client'; import { client } from './client.gen'; import type { CreatePetsData, CreatePetsErrors, CreatePetsResponses, ListPetsData, ListPetsErrors, ListPetsResponses, ShowPetByIdData, ShowPetByIdErrors, ShowPetByIdResponses, } from './types.gen'; export type Options< TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, > = Options2 & { /** * You can provide a client instance returned by `createClient()` instead of * individual options. This might be also useful if you want to implement a * custom client. */ client?: Client; /** * You can pass arbitrary values through the `meta` object. This can be * used to access values that aren't defined as part of the SDK function. */ meta?: Record; }; /** * List all pets */ export const listPets = ( options?: Options, ) => (options?.client ?? client).get< ListPetsResponses, ListPetsErrors, ThrowOnError >({ url: '/pets', ...options }); /** * Create a pet */ export const createPets = ( options?: Options, ) => (options?.client ?? client).post< CreatePetsResponses, CreatePetsErrors, ThrowOnError >({ url: '/pets', ...options }); /** * Info for a specific pet */ export const showPetById = ( options: Options, ) => (options.client ?? client).get< ShowPetByIdResponses, ShowPetByIdErrors, ThrowOnError >({ url: '/pets/{petId}', ...options });