export type DeleteApiV1AuthSamlIdpIdentityProviderIdArgs = {'App-ID': string, 'Auth-Token': string, identity_provider_id: string}; export type DeleteApiV1AuthSamlIdpIdentityProviderIdOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * Delete a particular identity provider by id * * DELETE /v1/auth/saml/idp/{identity_provider_id}/ */ export const deleteApiV1AuthSamlIdpIdentityProviderId = async (args: DeleteApiV1AuthSamlIdpIdentityProviderIdArgs, options: DeleteApiV1AuthSamlIdpIdentityProviderIdOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args['App-ID'] != null) headers.set("App-ID", String(args['App-ID'])) if (args['Auth-Token'] != null) headers.set("Auth-Token", String(args['Auth-Token'])) const url = `${baseUrl.replace(/\/+$/, '')}/v1/auth/saml/idp/${encodeURIComponent(String(args.identity_provider_id))}/${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 };