export type DeleteApiV1AccountsAccountIdScimProvisioningArgs = {account_id: string}; export type DeleteApiV1AccountsAccountIdScimProvisioningOptions = {baseUrl?: string | undefined, HTTPBearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Scim Provisioning * * DELETE /v1/accounts/{account_id}/scim_provisioning */ export const deleteApiV1AccountsAccountIdScimProvisioning = async (args: DeleteApiV1AccountsAccountIdScimProvisioningArgs, options?: DeleteApiV1AccountsAccountIdScimProvisioningOptions) => { const {baseUrl = "https://api.rivery.io", fetch: fetchFn = fetch, HTTPBearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (HTTPBearer !== undefined) headers.set('authorization', `Bearer ${HTTPBearer}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/accounts/${encodeURIComponent(String(args.account_id))}/scim_provisioning${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 };