export type GetApiApiV1WorkflowsExecutionsIdHitlStatusArgs = {id: string, 'X-Org-ID': string, 'X-Tenant-ID': string}; export type GetApiApiV1WorkflowsExecutionsIdHitlStatusOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Human-in-the-loop status for a workflow execution * * GET /api/v1/workflows/executions/{id}/hitl-status */ export const getApiApiV1WorkflowsExecutionsIdHitlStatus = async (args: GetApiApiV1WorkflowsExecutionsIdHitlStatusArgs, options?: GetApiApiV1WorkflowsExecutionsIdHitlStatusOptions) => { const {baseUrl = "https://orchestrator.getaxonflow.com", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args['X-Org-ID'] != null) headers.set("X-Org-ID", String(args['X-Org-ID'])) if (args['X-Tenant-ID'] != null) headers.set("X-Tenant-ID", String(args['X-Tenant-ID'])) const url = `${baseUrl.replace(/\/+$/, '')}/api/v1/workflows/executions/${encodeURIComponent(String(args.id))}/hitl-status${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };