export type CreateApiV2UserCustomerAccountActivateArgs = {body: unknown}; export type CreateApiV2UserCustomerAccountActivateOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Activate the user account * * POST /v2/user/customer/account/activate */ export const createApiV2UserCustomerAccountActivate = async (args: CreateApiV2UserCustomerAccountActivateArgs, options?: CreateApiV2UserCustomerAccountActivateOptions) => { 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/user/customer/account/activate${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 };