export type DeleteApiV1ExecutorsIdArgs = {id: string}; export type DeleteApiV1ExecutorsIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete an Executor Configuration * * DELETE /v1/executors/{id} */ export const deleteApiV1ExecutorsId = async (args: DeleteApiV1ExecutorsIdArgs, options?: DeleteApiV1ExecutorsIdOptions) => { const {baseUrl = "https://identity.sandbox.lerian.net", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/v1/executors/${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 };