export type DeleteApiV1OrgsOrgIdConfsConfIdArgs = {org_id: string, conf_id: string}; export type DeleteApiV1OrgsOrgIdConfsConfIdOptions = {baseUrl?: string | undefined, ApiKeyAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Deletes the config with given id * * DELETE /v1/orgs/{org_id}/confs/{conf_id} */ export const deleteApiV1OrgsOrgIdConfsConfId = async (args: DeleteApiV1OrgsOrgIdConfsConfIdArgs, options?: DeleteApiV1OrgsOrgIdConfsConfIdOptions) => { const {baseUrl = "https://api.edgedelta.com", fetch: fetchFn = fetch, ApiKeyAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (ApiKeyAuth !== undefined) headers.set("X-ED-API-Token", ApiKeyAuth) const url = `${baseUrl.replace(/\/+$/, '')}/v1/orgs/${encodeURIComponent(String(args.org_id))}/confs/${encodeURIComponent(String(args.conf_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 };