export type DeleteApiRunnersRunnerPoolsPoolIdArgs = {poolId: string}; export type DeleteApiRunnersRunnerPoolsPoolIdOptions = {baseUrl?: string | undefined, JWTAuth?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete a runner pool * * DELETE /runners/runner-pools/{poolId} */ export const deleteApiRunnersRunnerPoolsPoolId = async (args: DeleteApiRunnersRunnerPoolsPoolIdArgs, options?: DeleteApiRunnersRunnerPoolsPoolIdOptions) => { const {baseUrl = "https://api.firefly.ai/v2", fetch: fetchFn = fetch, JWTAuth} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (JWTAuth !== undefined) headers.set('authorization', `Bearer ${JWTAuth}`) const url = `${baseUrl.replace(/\/+$/, '')}/runners/runner-pools/${encodeURIComponent(String(args.poolId))}${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 };