export type CreateApiApiAgentExecutionsExecutionIdRetryArgs = {executionId: string, resumeSubworkflowTasks?: boolean | undefined}; export type CreateApiApiAgentExecutionsExecutionIdRetryOptions = {baseUrl?: string | undefined, apiKey?: string | undefined, fetch?: typeof fetch | undefined}; /** * POST /api/agent/executions/{executionId}/retry */ export const createApiApiAgentExecutionsExecutionIdRetry = async (args: CreateApiApiAgentExecutionsExecutionIdRetryArgs, options?: CreateApiApiAgentExecutionsExecutionIdRetryOptions) => { const {baseUrl = "https://developer.orkescloud.com", fetch: fetchFn = fetch, apiKey} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.resumeSubworkflowTasks != null) query.append("resumeSubworkflowTasks", String(args.resumeSubworkflowTasks)) if (apiKey !== undefined) headers.set("X-Authorization", apiKey) const url = `${baseUrl.replace(/\/+$/, '')}/api/agent/executions/${encodeURIComponent(String(args.executionId))}/retry${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };