export type DeleteApiV2AuthnSsoConfigAccountsAccountIdSsoNameArgs = {accountId: string, ssoName: string}; export type DeleteApiV2AuthnSsoConfigAccountsAccountIdSsoNameOptions = {baseUrl?: string | undefined, XAuthToken?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete SSO configuration * * DELETE /v2/authn/sso-config/accounts/{accountId}/{ssoName} */ export const deleteApiV2AuthnSsoConfigAccountsAccountIdSsoName = async (args: DeleteApiV2AuthnSsoConfigAccountsAccountIdSsoNameArgs, options?: DeleteApiV2AuthnSsoConfigAccountsAccountIdSsoNameOptions) => { const {baseUrl = "https://api.alianza.com", fetch: fetchFn = fetch, XAuthToken} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (XAuthToken !== undefined) headers.set("X-AUTH-TOKEN", XAuthToken) const url = `${baseUrl.replace(/\/+$/, '')}/v2/authn/sso-config/accounts/${encodeURIComponent(String(args.accountId))}/${encodeURIComponent(String(args.ssoName))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };