export type BeezUPCommonEmail = string; export type CreateApiV2PublicSecurityLostpasswordArgs = {body: BeezUPCommonEmail}; export type CreateApiV2PublicSecurityLostpasswordOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Lost password * * POST /v2/public/security/lostpassword */ export const createApiV2PublicSecurityLostpassword = async (args: CreateApiV2PublicSecurityLostpasswordArgs, options?: CreateApiV2PublicSecurityLostpasswordOptions) => { const {baseUrl = "https://api.beezup.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/v2/public/security/lostpassword${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };