export type CircuitBreakerResetRequest = {scope?: ('global' | 'tenant' | 'client' | 'policy') | undefined, scope_id?: string | undefined, comment?: string | undefined}; export type CreateApiApiV1EmergencyStopReleaseArgs = {Authorization: string, body: CircuitBreakerResetRequest}; export type CreateApiApiV1EmergencyStopReleaseOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Release emergency stop (alias of circuit-breaker reset) * * POST /api/v1/emergency-stop/release */ export const createApiApiV1EmergencyStopRelease = async (args: CreateApiApiV1EmergencyStopReleaseArgs, options?: CreateApiApiV1EmergencyStopReleaseOptions) => { const {baseUrl = "https://agent.getaxonflow.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") if (args.Authorization != null) headers.set("Authorization", String(args.Authorization)) const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/emergency-stop/release${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };