import type { SWRMutationConfiguration, SWRMutationResponse, } from "swr/mutation"; import useSWRMutation from "swr/mutation"; import client from "../../client"; import type { PutUsersWalletMutationRequest, PutUsersWalletMutationResponse, PutUsersWalletPathParams, } from "../models/PutUsersWallet"; /** * @summary Update user profile * @link /users/:wallet */ export function usePutUsersWallet< TData = PutUsersWalletMutationResponse, TError = unknown, TVariables = PutUsersWalletMutationRequest, >( wallet: PutUsersWalletPathParams["wallet"], options?: { mutation?: SWRMutationConfiguration; client?: Partial>[0]>; } ): SWRMutationResponse { const { mutation: mutationOptions, client: clientOptions = {} } = options ?? {}; return useSWRMutation( `/users/${wallet}`, (url, { arg: data }) => { return client({ method: "put", url, data, ...clientOptions, }); }, mutationOptions ); }