export type DeleteApiV2AuthnSsoConfigPartitionsEnforcedPartitionIdSsoNameArgs = {partitionId: string, ssoName: string}; export type DeleteApiV2AuthnSsoConfigPartitionsEnforcedPartitionIdSsoNameOptions = {baseUrl?: string | undefined, XAuthToken?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete SSO configuration * * DELETE /v2/authn/sso-config/partitions/enforced/{partitionId}/{ssoName} */ export const deleteApiV2AuthnSsoConfigPartitionsEnforcedPartitionIdSsoName = async (args: DeleteApiV2AuthnSsoConfigPartitionsEnforcedPartitionIdSsoNameArgs, options?: DeleteApiV2AuthnSsoConfigPartitionsEnforcedPartitionIdSsoNameOptions) => { 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/partitions/enforced/${encodeURIComponent(String(args.partitionId))}/${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 };