export type GetApiAccountRegisterAccountIdArgs = {account_id: string}; export type GetApiAccountRegisterAccountIdOptions = {baseUrl?: string | undefined, jwt?: string | undefined, fetch?: typeof fetch | undefined}; /** * Once a new user is registered they must confirm their registration via an email * * GET /account/register/{account_id} */ export const getApiAccountRegisterAccountId = async (args: GetApiAccountRegisterAccountIdArgs, options?: GetApiAccountRegisterAccountIdOptions) => { const {baseUrl = "https://api.anaconda.cloud/api", fetch: fetchFn = fetch, jwt} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (jwt !== undefined) headers.set('authorization', `Bearer ${jwt}`) const url = `${baseUrl.replace(/\/+$/, '')}/account/register/${encodeURIComponent(String(args.account_id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };