UNPKG

@kubb/plugin-client

Version:
32 lines (28 loc) 981 B
/* eslint-disable no-alert, no-console */ /** * Generated by Kubb (https://kubb.dev/). * Do not edit manually. */ import client from '@kubb/plugin-client/clients/axios' import type { RequestConfig, ResponseErrorConfig } from '@kubb/plugin-client/clients/axios' function getUpdatePetWithFormUrl(petId: UpdatePetWithFormPathParams['petId']) { return `/pet/${petId}` as const } /** * @summary Updates a pet in the store with form data * {@link /pet/:petId} */ export async function updatePetWithForm( petId: UpdatePetWithFormPathParams['petId'], params?: UpdatePetWithFormQueryParams, config: Partial<RequestConfig> & { client?: typeof client } = {}, ) { const { client: request = client, ...requestConfig } = config const res = await request<UpdatePetWithFormMutationResponse, ResponseErrorConfig<UpdatePetWithForm405>, unknown>({ method: 'POST', url: getUpdatePetWithFormUrl(petId).toString(), params, ...requestConfig, }) return res.data }