export type PatchApiV1EeAuth2faDisableOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * PATCH /v1/ee/auth/2fa/disable */ export const patchApiV1EeAuth2faDisable = async (options: PatchApiV1EeAuth2faDisableOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/v1/ee/auth/2fa/disable${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PATCH", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };