export type DeleteApiResourcesV1ConfigurationsScim2IdArgs = {id: string, 'frontegg-tenant-id'?: string | undefined}; export type DeleteApiResourcesV1ConfigurationsScim2IdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a SCIM configuration * * DELETE /resources/v1/configurations/scim2/{id} */ export const deleteApiResourcesV1ConfigurationsScim2Id = async (args: DeleteApiResourcesV1ConfigurationsScim2IdArgs, options?: DeleteApiResourcesV1ConfigurationsScim2IdOptions) => { const {baseUrl = "http://localhost:8181", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args['frontegg-tenant-id'] != null) headers.set("frontegg-tenant-id", String(args['frontegg-tenant-id'])) const url = `${baseUrl.replace(/\/+$/, '')}/resources/v1/configurations/scim2/${encodeURIComponent(String(args.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 };