import type { SWRMutationConfiguration, SWRMutationResponse, } from "swr/mutation"; import useSWRMutation from "swr/mutation"; import client from "../../client"; import type { PostUsersLoginMutationRequest, PostUsersLoginMutationResponse, } from "../models/PostUsersLogin"; /** * @description Provides the user with a nonce to be included in the next signature. Consumed by /verify endpoint. * @summary Get nonce * @link /users/login */ export function usePostUsersLogin< TData = PostUsersLoginMutationResponse, TError = unknown, TVariables = PostUsersLoginMutationRequest, >(options?: { mutation?: SWRMutationConfiguration; client?: Partial>[0]>; }): SWRMutationResponse { const { mutation: mutationOptions, client: clientOptions = {} } = options ?? {}; return useSWRMutation( `/users/login`, (url, { arg: data }) => { return client({ method: "post", url, data, ...clientOptions, }); }, mutationOptions ); }