From 1fa26aa1ecd06ed7183fda6bef70908c1bbac016 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Mon, 2 Mar 2026 12:24:32 -0500 Subject: [PATCH] Rename API operationIds and summaries to follow consistent conventions Use List/Retrieve/Start/Stream/Cancel naming. Add new tags: Run Internals, Human-in-the-Loop, Usage. Regenerate TypeScript client. Co-Authored-By: Claude Opus 4.6 (1M context) --- docs/api-reference/arc-api.yaml | 146 +- openapi/arc-api.yaml | 146 +- .../src/.openapi-generator/FILES | 3 + packages/arc-api-client/src/api.ts | 3 + .../src/api/human-in-the-loop-api.ts | 293 ++++ .../arc-api-client/src/api/insights-api.ts | 178 +-- .../arc-api-client/src/api/projects-api.ts | 16 +- packages/arc-api-client/src/api/retros-api.ts | 76 +- .../src/api/run-internals-api.ts | 337 +++++ packages/arc-api-client/src/api/runs-api.ts | 1174 ++++------------- .../arc-api-client/src/api/sessions-api.ts | 316 ++--- .../arc-api-client/src/api/settings-api.ts | 24 +- packages/arc-api-client/src/api/usage-api.ts | 124 ++ .../src/api/verifications-api.ts | 94 +- .../arc-api-client/src/api/workflows-api.ts | 178 +-- 15 files changed, 1645 insertions(+), 1463 deletions(-) create mode 100644 packages/arc-api-client/src/api/human-in-the-loop-api.ts create mode 100644 packages/arc-api-client/src/api/run-internals-api.ts create mode 100644 packages/arc-api-client/src/api/usage-api.ts diff --git a/docs/api-reference/arc-api.yaml b/docs/api-reference/arc-api.yaml index 3fc3224df..5b1bbc5a7 100644 --- a/docs/api-reference/arc-api.yaml +++ b/docs/api-reference/arc-api.yaml @@ -7,6 +7,12 @@ info: tags: - name: Runs description: Run management operations + - name: Run Internals + description: Internal run details (stages, turns, context, configuration) + - name: Human-in-the-Loop + description: Questions, answers, and steering for runs + - name: Usage + description: Token and cost usage - name: Workflows description: Workflow definitions and execution - name: Verifications @@ -29,7 +35,7 @@ paths: get: operationId: listRuns tags: [Runs] - summary: List all runs (board view) + summary: List Runs responses: "200": description: Array of runs for the board view @@ -42,7 +48,7 @@ paths: post: operationId: startRun tags: [Runs] - summary: Start a new run + summary: Start Run requestBody: required: true content: @@ -65,9 +71,9 @@ paths: /runs/{id}: get: - operationId: getRunStatus + operationId: retrieveRun tags: [Runs] - summary: Get run status + summary: Retrieve Run parameters: - $ref: "#/components/parameters/RunId" responses: @@ -84,7 +90,7 @@ paths: post: operationId: cancelRun tags: [Runs] - summary: Cancel a running run + summary: Cancel Run parameters: - $ref: "#/components/parameters/RunId" responses: @@ -110,9 +116,9 @@ paths: /runs/{id}/graph: get: - operationId: getGraph + operationId: retrieveRunSvg tags: [Runs] - summary: Get run graph as SVG + summary: Retrieve Run SVG parameters: - $ref: "#/components/parameters/RunId" responses: @@ -133,9 +139,9 @@ paths: /runs/{id}/checkpoint: get: - operationId: getCheckpoint + operationId: retrieveRunCheckpoint tags: [Runs] - summary: Get run checkpoint + summary: Retrieve Run Checkpoint parameters: - $ref: "#/components/parameters/RunId" responses: @@ -149,9 +155,9 @@ paths: /runs/{id}/context: get: - operationId: getContext - tags: [Runs] - summary: Get run context + operationId: retrieveRunContext + tags: [Run Internals] + summary: Retrieve Run Context parameters: - $ref: "#/components/parameters/RunId" responses: @@ -166,9 +172,9 @@ paths: /runs/{id}/events: get: - operationId: getEvents + operationId: streamRunEvents tags: [Runs] - summary: Subscribe to run events via SSE + summary: Stream Run Events parameters: - $ref: "#/components/parameters/RunId" responses: @@ -185,9 +191,9 @@ paths: /runs/{id}/questions: get: - operationId: getQuestions - tags: [Runs] - summary: Get pending questions for a run + operationId: listRunQuestions + tags: [Human-in-the-Loop] + summary: List Run Questions parameters: - $ref: "#/components/parameters/RunId" responses: @@ -204,9 +210,9 @@ paths: /runs/{id}/questions/{qid}/answer: post: - operationId: submitAnswer - tags: [Runs] - summary: Submit an answer to a question + operationId: submitRunAnswer + tags: [Human-in-the-Loop] + summary: Submit Run Answer parameters: - $ref: "#/components/parameters/RunId" - name: qid @@ -238,9 +244,9 @@ paths: /runs/{id}/retro: get: - operationId: getRetro - tags: [Runs] - summary: Get run retrospective + operationId: retrieveRetro + tags: [Retros] + summary: Retrieve Retro parameters: - $ref: "#/components/parameters/RunId" responses: @@ -254,9 +260,9 @@ paths: /runs/{id}/stages: get: - operationId: getRunStages - tags: [Runs] - summary: List stages with status and duration + operationId: listRunStages + tags: [Run Internals] + summary: List Run Stages parameters: - $ref: "#/components/parameters/RunId" responses: @@ -273,9 +279,9 @@ paths: /runs/{id}/stages/{stageId}/turns: get: - operationId: getStageTurns - tags: [Runs] - summary: Conversation transcript for a stage + operationId: listStageTurns + tags: [Run Internals] + summary: List Stage Turns parameters: - $ref: "#/components/parameters/RunId" - name: stageId @@ -297,9 +303,9 @@ paths: /runs/{id}/files: get: - operationId: getRunFiles + operationId: listRunFiles tags: [Runs] - summary: File diffs grouped by checkpoint + summary: List Run Files parameters: - $ref: "#/components/parameters/RunId" - name: checkpoint @@ -319,9 +325,9 @@ paths: /runs/{id}/usage: get: - operationId: getRunUsage - tags: [Runs] - summary: Token and cost breakdown by stage and model + operationId: retrieveRunUsage + tags: [Usage] + summary: Retrieve Run Usage parameters: - $ref: "#/components/parameters/RunId" responses: @@ -336,9 +342,9 @@ paths: /runs/{id}/verifications: get: - operationId: getRunVerifications + operationId: listRunVerifications tags: [Runs] - summary: Verification results for this run + summary: List Run Verifications parameters: - $ref: "#/components/parameters/RunId" responses: @@ -355,9 +361,9 @@ paths: /runs/{id}/configuration: get: - operationId: getRunConfiguration - tags: [Runs] - summary: Run configuration (TOML) + operationId: retrieveRunConfiguration + tags: [Run Internals] + summary: Retrieve Run Configuration parameters: - $ref: "#/components/parameters/RunId" responses: @@ -373,8 +379,8 @@ paths: /runs/{id}/steer: post: operationId: steerRun - tags: [Runs] - summary: Submit steering guidance on a file line + tags: [Human-in-the-Loop] + summary: Steer Run parameters: - $ref: "#/components/parameters/RunId" requestBody: @@ -404,7 +410,7 @@ paths: get: operationId: listWorkflows tags: [Workflows] - summary: List all workflows + summary: List Workflows responses: "200": description: Array of workflows @@ -417,9 +423,9 @@ paths: /workflows/{name}: get: - operationId: getWorkflow + operationId: retrieveWorkflow tags: [Workflows] - summary: Get workflow detail with config and graph + summary: Retrieve Workflow parameters: - name: name in: path @@ -440,7 +446,7 @@ paths: get: operationId: listWorkflowRuns tags: [Workflows] - summary: List runs for this workflow + summary: List Workflow Runs parameters: - name: name in: path @@ -459,9 +465,9 @@ paths: "404": description: Workflow not found post: - operationId: triggerWorkflowRun + operationId: startWorkflowRun tags: [Workflows] - summary: Trigger a run for this workflow + summary: Start Workflow Run parameters: - name: name in: path @@ -484,7 +490,7 @@ paths: get: operationId: listVerifications tags: [Verifications] - summary: List all verification categories with controls + summary: List Verifications responses: "200": description: Array of verification categories @@ -497,9 +503,9 @@ paths: /verifications/{slug}: get: - operationId: getVerificationDetail + operationId: retrieveVerification tags: [Verifications] - summary: Control detail with performance and recent results + summary: Retrieve Verification parameters: - name: slug in: path @@ -522,7 +528,7 @@ paths: get: operationId: listRetros tags: [Retros] - summary: List all retros across runs + summary: List Retros responses: "200": description: Array of retros @@ -539,7 +545,7 @@ paths: get: operationId: listSessions tags: [Sessions] - summary: List sessions grouped by recency + summary: List Sessions responses: "200": description: Array of session groups @@ -552,7 +558,7 @@ paths: post: operationId: createSession tags: [Sessions] - summary: Create a new session + summary: Create Session requestBody: required: true content: @@ -569,9 +575,9 @@ paths: /sessions/{id}: get: - operationId: getSession + operationId: retrieveSession tags: [Sessions] - summary: Session detail with full turn history + summary: Retrieve Session parameters: - name: id in: path @@ -590,9 +596,9 @@ paths: /sessions/{id}/messages: post: - operationId: sendMessage + operationId: sendSessionMessage tags: [Sessions] - summary: Send a user message + summary: Send Session Message parameters: - name: id in: path @@ -622,9 +628,9 @@ paths: /sessions/{id}/events: get: - operationId: getSessionEvents + operationId: streamSessionEvents tags: [Sessions] - summary: SSE stream for live assistant responses + summary: Stream Session Events parameters: - name: id in: path @@ -647,7 +653,7 @@ paths: get: operationId: listSavedQueries tags: [Insights] - summary: List saved queries + summary: List Saved Queries responses: "200": description: Array of saved queries @@ -658,9 +664,9 @@ paths: items: $ref: "#/components/schemas/SavedQuery" post: - operationId: saveQuery + operationId: createSavedQuery tags: [Insights] - summary: Save a query + summary: Create Saved Query requestBody: required: true content: @@ -679,7 +685,7 @@ paths: put: operationId: updateSavedQuery tags: [Insights] - summary: Update a saved query + summary: Update Saved Query parameters: - name: id in: path @@ -704,7 +710,7 @@ paths: delete: operationId: deleteSavedQuery tags: [Insights] - summary: Delete a saved query + summary: Delete Saved Query parameters: - name: id in: path @@ -721,7 +727,7 @@ paths: post: operationId: executeQuery tags: [Insights] - summary: Execute a SQL query + summary: Execute Query requestBody: required: true content: @@ -740,7 +746,7 @@ paths: get: operationId: listQueryHistory tags: [Insights] - summary: Query execution history + summary: List Query History responses: "200": description: Array of history entries @@ -755,9 +761,9 @@ paths: /settings: get: - operationId: getSettings + operationId: retrieveServerSettings tags: [Settings] - summary: Get all setting groups with current values + summary: Retrieve Server Settings responses: "200": description: Array of setting groups @@ -774,7 +780,7 @@ paths: get: operationId: listProjects tags: [Projects] - summary: List available projects + summary: List Projects responses: "200": description: Array of projects @@ -789,7 +795,7 @@ paths: get: operationId: listBranches tags: [Projects] - summary: List branches for a project + summary: List Branches parameters: - name: id in: path diff --git a/openapi/arc-api.yaml b/openapi/arc-api.yaml index 755c09260..95d8d677d 100644 --- a/openapi/arc-api.yaml +++ b/openapi/arc-api.yaml @@ -7,6 +7,12 @@ info: tags: - name: Runs description: Run management operations + - name: Run Internals + description: Internal run details (stages, turns, context, configuration) + - name: Human-in-the-Loop + description: Questions, answers, and steering for runs + - name: Usage + description: Token and cost usage - name: Workflows description: Workflow definitions and execution - name: Verifications @@ -29,7 +35,7 @@ paths: get: operationId: listRuns tags: [Runs] - summary: List all runs (board view) + summary: List Runs responses: "200": description: Array of runs for the board view @@ -42,7 +48,7 @@ paths: post: operationId: startRun tags: [Runs] - summary: Start a new run + summary: Start Run requestBody: required: true content: @@ -65,9 +71,9 @@ paths: /runs/{id}: get: - operationId: getRunStatus + operationId: retrieveRun tags: [Runs] - summary: Get run status + summary: Retrieve Run parameters: - $ref: "#/components/parameters/RunId" responses: @@ -84,7 +90,7 @@ paths: post: operationId: cancelRun tags: [Runs] - summary: Cancel a running run + summary: Cancel Run parameters: - $ref: "#/components/parameters/RunId" responses: @@ -110,9 +116,9 @@ paths: /runs/{id}/graph: get: - operationId: getGraph + operationId: retrieveRunSvg tags: [Runs] - summary: Get run graph as SVG + summary: Retrieve Run SVG parameters: - $ref: "#/components/parameters/RunId" responses: @@ -133,9 +139,9 @@ paths: /runs/{id}/checkpoint: get: - operationId: getCheckpoint + operationId: retrieveRunCheckpoint tags: [Runs] - summary: Get run checkpoint + summary: Retrieve Run Checkpoint parameters: - $ref: "#/components/parameters/RunId" responses: @@ -149,9 +155,9 @@ paths: /runs/{id}/context: get: - operationId: getContext - tags: [Runs] - summary: Get run context + operationId: retrieveRunContext + tags: [Run Internals] + summary: Retrieve Run Context parameters: - $ref: "#/components/parameters/RunId" responses: @@ -166,9 +172,9 @@ paths: /runs/{id}/events: get: - operationId: getEvents + operationId: streamRunEvents tags: [Runs] - summary: Subscribe to run events via SSE + summary: Stream Run Events parameters: - $ref: "#/components/parameters/RunId" responses: @@ -185,9 +191,9 @@ paths: /runs/{id}/questions: get: - operationId: getQuestions - tags: [Runs] - summary: Get pending questions for a run + operationId: listRunQuestions + tags: [Human-in-the-Loop] + summary: List Run Questions parameters: - $ref: "#/components/parameters/RunId" responses: @@ -204,9 +210,9 @@ paths: /runs/{id}/questions/{qid}/answer: post: - operationId: submitAnswer - tags: [Runs] - summary: Submit an answer to a question + operationId: submitRunAnswer + tags: [Human-in-the-Loop] + summary: Submit Run Answer parameters: - $ref: "#/components/parameters/RunId" - name: qid @@ -238,9 +244,9 @@ paths: /runs/{id}/retro: get: - operationId: getRetro - tags: [Runs] - summary: Get run retrospective + operationId: retrieveRetro + tags: [Retros] + summary: Retrieve Retro parameters: - $ref: "#/components/parameters/RunId" responses: @@ -254,9 +260,9 @@ paths: /runs/{id}/stages: get: - operationId: getRunStages - tags: [Runs] - summary: List stages with status and duration + operationId: listRunStages + tags: [Run Internals] + summary: List Run Stages parameters: - $ref: "#/components/parameters/RunId" responses: @@ -273,9 +279,9 @@ paths: /runs/{id}/stages/{stageId}/turns: get: - operationId: getStageTurns - tags: [Runs] - summary: Conversation transcript for a stage + operationId: listStageTurns + tags: [Run Internals] + summary: List Stage Turns parameters: - $ref: "#/components/parameters/RunId" - name: stageId @@ -297,9 +303,9 @@ paths: /runs/{id}/files: get: - operationId: getRunFiles + operationId: listRunFiles tags: [Runs] - summary: File diffs grouped by checkpoint + summary: List Run Files parameters: - $ref: "#/components/parameters/RunId" - name: checkpoint @@ -319,9 +325,9 @@ paths: /runs/{id}/usage: get: - operationId: getRunUsage - tags: [Runs] - summary: Token and cost breakdown by stage and model + operationId: retrieveRunUsage + tags: [Usage] + summary: Retrieve Run Usage parameters: - $ref: "#/components/parameters/RunId" responses: @@ -336,9 +342,9 @@ paths: /runs/{id}/verifications: get: - operationId: getRunVerifications + operationId: listRunVerifications tags: [Runs] - summary: Verification results for this run + summary: List Run Verifications parameters: - $ref: "#/components/parameters/RunId" responses: @@ -355,9 +361,9 @@ paths: /runs/{id}/configuration: get: - operationId: getRunConfiguration - tags: [Runs] - summary: Run configuration (TOML) + operationId: retrieveRunConfiguration + tags: [Run Internals] + summary: Retrieve Run Configuration parameters: - $ref: "#/components/parameters/RunId" responses: @@ -373,8 +379,8 @@ paths: /runs/{id}/steer: post: operationId: steerRun - tags: [Runs] - summary: Submit steering guidance on a file line + tags: [Human-in-the-Loop] + summary: Steer Run parameters: - $ref: "#/components/parameters/RunId" requestBody: @@ -427,7 +433,7 @@ paths: get: operationId: listWorkflows tags: [Workflows] - summary: List all workflows + summary: List Workflows responses: "200": description: Array of workflows @@ -440,9 +446,9 @@ paths: /workflows/{name}: get: - operationId: getWorkflow + operationId: retrieveWorkflow tags: [Workflows] - summary: Get workflow detail with config and graph + summary: Retrieve Workflow parameters: - name: name in: path @@ -463,7 +469,7 @@ paths: get: operationId: listWorkflowRuns tags: [Workflows] - summary: List runs for this workflow + summary: List Workflow Runs parameters: - name: name in: path @@ -482,9 +488,9 @@ paths: "404": description: Workflow not found post: - operationId: triggerWorkflowRun + operationId: startWorkflowRun tags: [Workflows] - summary: Trigger a run for this workflow + summary: Start Workflow Run parameters: - name: name in: path @@ -507,7 +513,7 @@ paths: get: operationId: listVerifications tags: [Verifications] - summary: List all verification categories with controls + summary: List Verifications responses: "200": description: Array of verification categories @@ -520,9 +526,9 @@ paths: /verifications/{slug}: get: - operationId: getVerificationDetail + operationId: retrieveVerification tags: [Verifications] - summary: Control detail with performance and recent results + summary: Retrieve Verification parameters: - name: slug in: path @@ -545,7 +551,7 @@ paths: get: operationId: listRetros tags: [Retros] - summary: List all retros across runs + summary: List Retros responses: "200": description: Array of retros @@ -562,7 +568,7 @@ paths: get: operationId: listSessions tags: [Sessions] - summary: List sessions grouped by recency + summary: List Sessions responses: "200": description: Array of session groups @@ -575,7 +581,7 @@ paths: post: operationId: createSession tags: [Sessions] - summary: Create a new session + summary: Create Session requestBody: required: true content: @@ -592,9 +598,9 @@ paths: /sessions/{id}: get: - operationId: getSession + operationId: retrieveSession tags: [Sessions] - summary: Session detail with full turn history + summary: Retrieve Session parameters: - name: id in: path @@ -613,9 +619,9 @@ paths: /sessions/{id}/messages: post: - operationId: sendMessage + operationId: sendSessionMessage tags: [Sessions] - summary: Send a user message + summary: Send Session Message parameters: - name: id in: path @@ -645,9 +651,9 @@ paths: /sessions/{id}/events: get: - operationId: getSessionEvents + operationId: streamSessionEvents tags: [Sessions] - summary: SSE stream for live assistant responses + summary: Stream Session Events parameters: - name: id in: path @@ -670,7 +676,7 @@ paths: get: operationId: listSavedQueries tags: [Insights] - summary: List saved queries + summary: List Saved Queries responses: "200": description: Array of saved queries @@ -681,9 +687,9 @@ paths: items: $ref: "#/components/schemas/SavedQuery" post: - operationId: saveQuery + operationId: createSavedQuery tags: [Insights] - summary: Save a query + summary: Create Saved Query requestBody: required: true content: @@ -702,7 +708,7 @@ paths: put: operationId: updateSavedQuery tags: [Insights] - summary: Update a saved query + summary: Update Saved Query parameters: - name: id in: path @@ -727,7 +733,7 @@ paths: delete: operationId: deleteSavedQuery tags: [Insights] - summary: Delete a saved query + summary: Delete Saved Query parameters: - name: id in: path @@ -744,7 +750,7 @@ paths: post: operationId: executeQuery tags: [Insights] - summary: Execute a SQL query + summary: Execute Query requestBody: required: true content: @@ -763,7 +769,7 @@ paths: get: operationId: listQueryHistory tags: [Insights] - summary: Query execution history + summary: List Query History responses: "200": description: Array of history entries @@ -778,9 +784,9 @@ paths: /settings: get: - operationId: getSettings + operationId: retrieveServerSettings tags: [Settings] - summary: Get all setting groups with current values + summary: Retrieve Server Settings responses: "200": description: Array of setting groups @@ -797,7 +803,7 @@ paths: get: operationId: listProjects tags: [Projects] - summary: List available projects + summary: List Projects responses: "200": description: Array of projects @@ -812,7 +818,7 @@ paths: get: operationId: listBranches tags: [Projects] - summary: List branches for a project + summary: List Branches parameters: - name: id in: path diff --git a/packages/arc-api-client/src/.openapi-generator/FILES b/packages/arc-api-client/src/.openapi-generator/FILES index cfa7e3dbc..28fcd5abd 100644 --- a/packages/arc-api-client/src/.openapi-generator/FILES +++ b/packages/arc-api-client/src/.openapi-generator/FILES @@ -1,10 +1,13 @@ api.ts +api/human-in-the-loop-api.ts api/insights-api.ts api/projects-api.ts api/retros-api.ts +api/run-internals-api.ts api/runs-api.ts api/sessions-api.ts api/settings-api.ts +api/usage-api.ts api/verifications-api.ts api/workflows-api.ts base.ts diff --git a/packages/arc-api-client/src/api.ts b/packages/arc-api-client/src/api.ts index 9af6b5daf..487353986 100644 --- a/packages/arc-api-client/src/api.ts +++ b/packages/arc-api-client/src/api.ts @@ -14,12 +14,15 @@ +export * from './api/human-in-the-loop-api'; export * from './api/insights-api'; export * from './api/projects-api'; export * from './api/retros-api'; +export * from './api/run-internals-api'; export * from './api/runs-api'; export * from './api/sessions-api'; export * from './api/settings-api'; +export * from './api/usage-api'; export * from './api/verifications-api'; export * from './api/workflows-api'; diff --git a/packages/arc-api-client/src/api/human-in-the-loop-api.ts b/packages/arc-api-client/src/api/human-in-the-loop-api.ts new file mode 100644 index 000000000..f7f0bb210 --- /dev/null +++ b/packages/arc-api-client/src/api/human-in-the-loop-api.ts @@ -0,0 +1,293 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Arc Run API + * HTTP API for managing Arc workflow run executions. + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { ApiQuestion } from '../models'; +// @ts-ignore +import type { ErrorResponse } from '../models'; +// @ts-ignore +import type { SteerRequest } from '../models'; +// @ts-ignore +import type { SteerRun200Response } from '../models'; +// @ts-ignore +import type { SubmitAnswerRequest } from '../models'; +// @ts-ignore +import type { SubmitAnswerResponse } from '../models'; +/** + * HumanInTheLoopApi - axios parameter creator + */ +export const HumanInTheLoopApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary List Run Questions + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listRunQuestions: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('listRunQuestions', 'id', id) + const localVarPath = `/runs/{id}/questions` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Steer Run + * @param {string} id + * @param {SteerRequest} steerRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + steerRun: async (id: string, steerRequest: SteerRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('steerRun', 'id', id) + // verify required parameter 'steerRequest' is not null or undefined + assertParamExists('steerRun', 'steerRequest', steerRequest) + const localVarPath = `/runs/{id}/steer` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(steerRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Submit Run Answer + * @param {string} id + * @param {string} qid + * @param {SubmitAnswerRequest} submitAnswerRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + submitRunAnswer: async (id: string, qid: string, submitAnswerRequest: SubmitAnswerRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('submitRunAnswer', 'id', id) + // verify required parameter 'qid' is not null or undefined + assertParamExists('submitRunAnswer', 'qid', qid) + // verify required parameter 'submitAnswerRequest' is not null or undefined + assertParamExists('submitRunAnswer', 'submitAnswerRequest', submitAnswerRequest) + const localVarPath = `/runs/{id}/questions/{qid}/answer` + .replace(`{${"id"}}`, encodeURIComponent(String(id))) + .replace(`{${"qid"}}`, encodeURIComponent(String(qid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(submitAnswerRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * HumanInTheLoopApi - functional programming interface + */ +export const HumanInTheLoopApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = HumanInTheLoopApiAxiosParamCreator(configuration) + return { + /** + * + * @summary List Run Questions + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listRunQuestions(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listRunQuestions(id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['HumanInTheLoopApi.listRunQuestions']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Steer Run + * @param {string} id + * @param {SteerRequest} steerRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async steerRun(id: string, steerRequest: SteerRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.steerRun(id, steerRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['HumanInTheLoopApi.steerRun']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Submit Run Answer + * @param {string} id + * @param {string} qid + * @param {SubmitAnswerRequest} submitAnswerRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async submitRunAnswer(id: string, qid: string, submitAnswerRequest: SubmitAnswerRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.submitRunAnswer(id, qid, submitAnswerRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['HumanInTheLoopApi.submitRunAnswer']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * HumanInTheLoopApi - factory interface + */ +export const HumanInTheLoopApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = HumanInTheLoopApiFp(configuration) + return { + /** + * + * @summary List Run Questions + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listRunQuestions(id: string, options?: RawAxiosRequestConfig): AxiosPromise> { + return localVarFp.listRunQuestions(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Steer Run + * @param {string} id + * @param {SteerRequest} steerRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + steerRun(id: string, steerRequest: SteerRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.steerRun(id, steerRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Submit Run Answer + * @param {string} id + * @param {string} qid + * @param {SubmitAnswerRequest} submitAnswerRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + submitRunAnswer(id: string, qid: string, submitAnswerRequest: SubmitAnswerRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.submitRunAnswer(id, qid, submitAnswerRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * HumanInTheLoopApi - object-oriented interface + */ +export class HumanInTheLoopApi extends BaseAPI { + /** + * + * @summary List Run Questions + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listRunQuestions(id: string, options?: RawAxiosRequestConfig) { + return HumanInTheLoopApiFp(this.configuration).listRunQuestions(id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Steer Run + * @param {string} id + * @param {SteerRequest} steerRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public steerRun(id: string, steerRequest: SteerRequest, options?: RawAxiosRequestConfig) { + return HumanInTheLoopApiFp(this.configuration).steerRun(id, steerRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Submit Run Answer + * @param {string} id + * @param {string} qid + * @param {SubmitAnswerRequest} submitAnswerRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public submitRunAnswer(id: string, qid: string, submitAnswerRequest: SubmitAnswerRequest, options?: RawAxiosRequestConfig) { + return HumanInTheLoopApiFp(this.configuration).submitRunAnswer(id, qid, submitAnswerRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/packages/arc-api-client/src/api/insights-api.ts b/packages/arc-api-client/src/api/insights-api.ts index e99c76508..a46027684 100644 --- a/packages/arc-api-client/src/api/insights-api.ts +++ b/packages/arc-api-client/src/api/insights-api.ts @@ -38,7 +38,42 @@ export const InsightsApiAxiosParamCreator = function (configuration?: Configurat return { /** * - * @summary Delete a saved query + * @summary Create Saved Query + * @param {SaveQueryRequest} saveQueryRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createSavedQuery: async (saveQueryRequest: SaveQueryRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'saveQueryRequest' is not null or undefined + assertParamExists('createSavedQuery', 'saveQueryRequest', saveQueryRequest) + const localVarPath = `/insights/queries`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(saveQueryRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Delete Saved Query * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -71,7 +106,7 @@ export const InsightsApiAxiosParamCreator = function (configuration?: Configurat }, /** * - * @summary Execute a SQL query + * @summary Execute Query * @param {ExecuteQueryRequest} executeQueryRequest * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -106,7 +141,7 @@ export const InsightsApiAxiosParamCreator = function (configuration?: Configurat }, /** * - * @summary Query execution history + * @summary List Query History * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -136,7 +171,7 @@ export const InsightsApiAxiosParamCreator = function (configuration?: Configurat }, /** * - * @summary List saved queries + * @summary List Saved Queries * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -166,42 +201,7 @@ export const InsightsApiAxiosParamCreator = function (configuration?: Configurat }, /** * - * @summary Save a query - * @param {SaveQueryRequest} saveQueryRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - saveQuery: async (saveQueryRequest: SaveQueryRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'saveQueryRequest' is not null or undefined - assertParamExists('saveQuery', 'saveQueryRequest', saveQueryRequest) - const localVarPath = `/insights/queries`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - localVarHeaderParameter['Content-Type'] = 'application/json'; - localVarHeaderParameter['Accept'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(saveQueryRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Update a saved query + * @summary Update Saved Query * @param {string} id * @param {SaveQueryRequest} saveQueryRequest * @param {*} [options] Override http request option. @@ -249,7 +249,20 @@ export const InsightsApiFp = function(configuration?: Configuration) { return { /** * - * @summary Delete a saved query + * @summary Create Saved Query + * @param {SaveQueryRequest} saveQueryRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createSavedQuery(saveQueryRequest: SaveQueryRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createSavedQuery(saveQueryRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['InsightsApi.createSavedQuery']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Delete Saved Query * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -262,7 +275,7 @@ export const InsightsApiFp = function(configuration?: Configuration) { }, /** * - * @summary Execute a SQL query + * @summary Execute Query * @param {ExecuteQueryRequest} executeQueryRequest * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -275,7 +288,7 @@ export const InsightsApiFp = function(configuration?: Configuration) { }, /** * - * @summary Query execution history + * @summary List Query History * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -287,7 +300,7 @@ export const InsightsApiFp = function(configuration?: Configuration) { }, /** * - * @summary List saved queries + * @summary List Saved Queries * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -299,20 +312,7 @@ export const InsightsApiFp = function(configuration?: Configuration) { }, /** * - * @summary Save a query - * @param {SaveQueryRequest} saveQueryRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async saveQuery(saveQueryRequest: SaveQueryRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.saveQuery(saveQueryRequest, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['InsightsApi.saveQuery']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @summary Update a saved query + * @summary Update Saved Query * @param {string} id * @param {SaveQueryRequest} saveQueryRequest * @param {*} [options] Override http request option. @@ -335,7 +335,17 @@ export const InsightsApiFactory = function (configuration?: Configuration, baseP return { /** * - * @summary Delete a saved query + * @summary Create Saved Query + * @param {SaveQueryRequest} saveQueryRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createSavedQuery(saveQueryRequest: SaveQueryRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createSavedQuery(saveQueryRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Delete Saved Query * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -345,7 +355,7 @@ export const InsightsApiFactory = function (configuration?: Configuration, baseP }, /** * - * @summary Execute a SQL query + * @summary Execute Query * @param {ExecuteQueryRequest} executeQueryRequest * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -355,7 +365,7 @@ export const InsightsApiFactory = function (configuration?: Configuration, baseP }, /** * - * @summary Query execution history + * @summary List Query History * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -364,7 +374,7 @@ export const InsightsApiFactory = function (configuration?: Configuration, baseP }, /** * - * @summary List saved queries + * @summary List Saved Queries * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -373,17 +383,7 @@ export const InsightsApiFactory = function (configuration?: Configuration, baseP }, /** * - * @summary Save a query - * @param {SaveQueryRequest} saveQueryRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - saveQuery(saveQueryRequest: SaveQueryRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.saveQuery(saveQueryRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Update a saved query + * @summary Update Saved Query * @param {string} id * @param {SaveQueryRequest} saveQueryRequest * @param {*} [options] Override http request option. @@ -401,7 +401,18 @@ export const InsightsApiFactory = function (configuration?: Configuration, baseP export class InsightsApi extends BaseAPI { /** * - * @summary Delete a saved query + * @summary Create Saved Query + * @param {SaveQueryRequest} saveQueryRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public createSavedQuery(saveQueryRequest: SaveQueryRequest, options?: RawAxiosRequestConfig) { + return InsightsApiFp(this.configuration).createSavedQuery(saveQueryRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Delete Saved Query * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -412,7 +423,7 @@ export class InsightsApi extends BaseAPI { /** * - * @summary Execute a SQL query + * @summary Execute Query * @param {ExecuteQueryRequest} executeQueryRequest * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -423,7 +434,7 @@ export class InsightsApi extends BaseAPI { /** * - * @summary Query execution history + * @summary List Query History * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -433,7 +444,7 @@ export class InsightsApi extends BaseAPI { /** * - * @summary List saved queries + * @summary List Saved Queries * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -443,18 +454,7 @@ export class InsightsApi extends BaseAPI { /** * - * @summary Save a query - * @param {SaveQueryRequest} saveQueryRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public saveQuery(saveQueryRequest: SaveQueryRequest, options?: RawAxiosRequestConfig) { - return InsightsApiFp(this.configuration).saveQuery(saveQueryRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Update a saved query + * @summary Update Saved Query * @param {string} id * @param {SaveQueryRequest} saveQueryRequest * @param {*} [options] Override http request option. diff --git a/packages/arc-api-client/src/api/projects-api.ts b/packages/arc-api-client/src/api/projects-api.ts index 2ffd614e8..02b634ad0 100644 --- a/packages/arc-api-client/src/api/projects-api.ts +++ b/packages/arc-api-client/src/api/projects-api.ts @@ -32,7 +32,7 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat return { /** * - * @summary List branches for a project + * @summary List Branches * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -66,7 +66,7 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat }, /** * - * @summary List available projects + * @summary List Projects * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -105,7 +105,7 @@ export const ProjectsApiFp = function(configuration?: Configuration) { return { /** * - * @summary List branches for a project + * @summary List Branches * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -118,7 +118,7 @@ export const ProjectsApiFp = function(configuration?: Configuration) { }, /** * - * @summary List available projects + * @summary List Projects * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -139,7 +139,7 @@ export const ProjectsApiFactory = function (configuration?: Configuration, baseP return { /** * - * @summary List branches for a project + * @summary List Branches * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -149,7 +149,7 @@ export const ProjectsApiFactory = function (configuration?: Configuration, baseP }, /** * - * @summary List available projects + * @summary List Projects * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -165,7 +165,7 @@ export const ProjectsApiFactory = function (configuration?: Configuration, baseP export class ProjectsApi extends BaseAPI { /** * - * @summary List branches for a project + * @summary List Branches * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -176,7 +176,7 @@ export class ProjectsApi extends BaseAPI { /** * - * @summary List available projects + * @summary List Projects * @param {*} [options] Override http request option. * @throws {RequiredError} */ diff --git a/packages/arc-api-client/src/api/retros-api.ts b/packages/arc-api-client/src/api/retros-api.ts index 84537187b..f8eceef1c 100644 --- a/packages/arc-api-client/src/api/retros-api.ts +++ b/packages/arc-api-client/src/api/retros-api.ts @@ -30,7 +30,7 @@ export const RetrosApiAxiosParamCreator = function (configuration?: Configuratio return { /** * - * @summary List all retros across runs + * @summary List Retros * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -53,6 +53,40 @@ export const RetrosApiAxiosParamCreator = function (configuration?: Configuratio let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Retrieve Retro + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + retrieveRetro: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('retrieveRetro', 'id', id) + const localVarPath = `/runs/{id}/retro` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, @@ -69,7 +103,7 @@ export const RetrosApiFp = function(configuration?: Configuration) { return { /** * - * @summary List all retros across runs + * @summary List Retros * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -79,6 +113,19 @@ export const RetrosApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['RetrosApi.listRetros']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + /** + * + * @summary Retrieve Retro + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async retrieveRetro(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveRetro(id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['RetrosApi.retrieveRetro']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, } }; @@ -90,13 +137,23 @@ export const RetrosApiFactory = function (configuration?: Configuration, basePat return { /** * - * @summary List all retros across runs + * @summary List Retros * @param {*} [options] Override http request option. * @throws {RequiredError} */ listRetros(options?: RawAxiosRequestConfig): AxiosPromise> { return localVarFp.listRetros(options).then((request) => request(axios, basePath)); }, + /** + * + * @summary Retrieve Retro + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + retrieveRetro(id: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.retrieveRetro(id, options).then((request) => request(axios, basePath)); + }, }; }; @@ -106,12 +163,23 @@ export const RetrosApiFactory = function (configuration?: Configuration, basePat export class RetrosApi extends BaseAPI { /** * - * @summary List all retros across runs + * @summary List Retros * @param {*} [options] Override http request option. * @throws {RequiredError} */ public listRetros(options?: RawAxiosRequestConfig) { return RetrosApiFp(this.configuration).listRetros(options).then((request) => request(this.axios, this.basePath)); } + + /** + * + * @summary Retrieve Retro + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public retrieveRetro(id: string, options?: RawAxiosRequestConfig) { + return RetrosApiFp(this.configuration).retrieveRetro(id, options).then((request) => request(this.axios, this.basePath)); + } } diff --git a/packages/arc-api-client/src/api/run-internals-api.ts b/packages/arc-api-client/src/api/run-internals-api.ts new file mode 100644 index 000000000..d1a54d2e5 --- /dev/null +++ b/packages/arc-api-client/src/api/run-internals-api.ts @@ -0,0 +1,337 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Arc Run API + * HTTP API for managing Arc workflow run executions. + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { RunStage } from '../models'; +// @ts-ignore +import type { StageTurn } from '../models'; +/** + * RunInternalsApi - axios parameter creator + */ +export const RunInternalsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary List Run Stages + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listRunStages: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('listRunStages', 'id', id) + const localVarPath = `/runs/{id}/stages` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary List Stage Turns + * @param {string} id + * @param {string} stageId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listStageTurns: async (id: string, stageId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('listStageTurns', 'id', id) + // verify required parameter 'stageId' is not null or undefined + assertParamExists('listStageTurns', 'stageId', stageId) + const localVarPath = `/runs/{id}/stages/{stageId}/turns` + .replace(`{${"id"}}`, encodeURIComponent(String(id))) + .replace(`{${"stageId"}}`, encodeURIComponent(String(stageId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Retrieve Run Configuration + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + retrieveRunConfiguration: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('retrieveRunConfiguration', 'id', id) + const localVarPath = `/runs/{id}/configuration` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Accept'] = 'text/plain'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Retrieve Run Context + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + retrieveRunContext: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('retrieveRunContext', 'id', id) + const localVarPath = `/runs/{id}/context` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * RunInternalsApi - functional programming interface + */ +export const RunInternalsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = RunInternalsApiAxiosParamCreator(configuration) + return { + /** + * + * @summary List Run Stages + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listRunStages(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listRunStages(id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['RunInternalsApi.listRunStages']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary List Stage Turns + * @param {string} id + * @param {string} stageId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listStageTurns(id: string, stageId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listStageTurns(id, stageId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['RunInternalsApi.listStageTurns']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Retrieve Run Configuration + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async retrieveRunConfiguration(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveRunConfiguration(id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['RunInternalsApi.retrieveRunConfiguration']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Retrieve Run Context + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async retrieveRunContext(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveRunContext(id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['RunInternalsApi.retrieveRunContext']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * RunInternalsApi - factory interface + */ +export const RunInternalsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = RunInternalsApiFp(configuration) + return { + /** + * + * @summary List Run Stages + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listRunStages(id: string, options?: RawAxiosRequestConfig): AxiosPromise> { + return localVarFp.listRunStages(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary List Stage Turns + * @param {string} id + * @param {string} stageId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listStageTurns(id: string, stageId: string, options?: RawAxiosRequestConfig): AxiosPromise> { + return localVarFp.listStageTurns(id, stageId, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Retrieve Run Configuration + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + retrieveRunConfiguration(id: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.retrieveRunConfiguration(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Retrieve Run Context + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + retrieveRunContext(id: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.retrieveRunContext(id, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * RunInternalsApi - object-oriented interface + */ +export class RunInternalsApi extends BaseAPI { + /** + * + * @summary List Run Stages + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listRunStages(id: string, options?: RawAxiosRequestConfig) { + return RunInternalsApiFp(this.configuration).listRunStages(id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary List Stage Turns + * @param {string} id + * @param {string} stageId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public listStageTurns(id: string, stageId: string, options?: RawAxiosRequestConfig) { + return RunInternalsApiFp(this.configuration).listStageTurns(id, stageId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Retrieve Run Configuration + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public retrieveRunConfiguration(id: string, options?: RawAxiosRequestConfig) { + return RunInternalsApiFp(this.configuration).retrieveRunConfiguration(id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Retrieve Run Context + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public retrieveRunContext(id: string, options?: RawAxiosRequestConfig) { + return RunInternalsApiFp(this.configuration).retrieveRunContext(id, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/packages/arc-api-client/src/api/runs-api.ts b/packages/arc-api-client/src/api/runs-api.ts index 49d816240..5262ab7c4 100644 --- a/packages/arc-api-client/src/api/runs-api.ts +++ b/packages/arc-api-client/src/api/runs-api.ts @@ -22,8 +22,6 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore -import type { ApiQuestion } from '../models'; -// @ts-ignore import type { CancelRun200Response } from '../models'; // @ts-ignore import type { ErrorResponse } from '../models'; @@ -36,27 +34,13 @@ import type { RunFiles } from '../models'; // @ts-ignore import type { RunListItem } from '../models'; // @ts-ignore -import type { RunStage } from '../models'; -// @ts-ignore import type { RunStatusResponse } from '../models'; // @ts-ignore -import type { RunUsage } from '../models'; -// @ts-ignore import type { RunVerification } from '../models'; // @ts-ignore -import type { StageTurn } from '../models'; -// @ts-ignore import type { StartRunRequest } from '../models'; // @ts-ignore import type { StartRunResponse } from '../models'; -// @ts-ignore -import type { SteerRequest } from '../models'; -// @ts-ignore -import type { SteerRun200Response } from '../models'; -// @ts-ignore -import type { SubmitAnswerRequest } from '../models'; -// @ts-ignore -import type { SubmitAnswerResponse } from '../models'; /** * RunsApi - axios parameter creator */ @@ -64,7 +48,7 @@ export const RunsApiAxiosParamCreator = function (configuration?: Configuration) return { /** * - * @summary Cancel a running run + * @summary Cancel Run * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -137,253 +121,15 @@ export const RunsApiAxiosParamCreator = function (configuration?: Configuration) }, /** * - * @summary Get run checkpoint - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCheckpoint: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('getCheckpoint', 'id', id) - const localVarPath = `/runs/{id}/checkpoint` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - localVarHeaderParameter['Accept'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get run context - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getContext: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('getContext', 'id', id) - const localVarPath = `/runs/{id}/context` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - localVarHeaderParameter['Accept'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Subscribe to run events via SSE - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getEvents: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('getEvents', 'id', id) - const localVarPath = `/runs/{id}/events` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - localVarHeaderParameter['Accept'] = 'text/event-stream'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get run graph as SVG - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getGraph: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('getGraph', 'id', id) - const localVarPath = `/runs/{id}/graph` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - localVarHeaderParameter['Accept'] = 'image/svg+xml,application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get pending questions for a run - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getQuestions: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('getQuestions', 'id', id) - const localVarPath = `/runs/{id}/questions` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - localVarHeaderParameter['Accept'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get run retrospective - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getRetro: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('getRetro', 'id', id) - const localVarPath = `/runs/{id}/retro` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - localVarHeaderParameter['Accept'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Run configuration (TOML) - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getRunConfiguration: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('getRunConfiguration', 'id', id) - const localVarPath = `/runs/{id}/configuration` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - localVarHeaderParameter['Accept'] = 'text/plain'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary File diffs grouped by checkpoint + * @summary List Run Files * @param {string} id * @param {string} [checkpoint] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getRunFiles: async (id: string, checkpoint?: string, options: RawAxiosRequestConfig = {}): Promise => { + listRunFiles: async (id: string, checkpoint?: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined - assertParamExists('getRunFiles', 'id', id) + assertParamExists('listRunFiles', 'id', id) const localVarPath = `/runs/{id}/files` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -414,116 +160,14 @@ export const RunsApiAxiosParamCreator = function (configuration?: Configuration) }, /** * - * @summary List stages with status and duration + * @summary List Run Verifications * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getRunStages: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + listRunVerifications: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined - assertParamExists('getRunStages', 'id', id) - const localVarPath = `/runs/{id}/stages` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - localVarHeaderParameter['Accept'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Get run status - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getRunStatus: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('getRunStatus', 'id', id) - const localVarPath = `/runs/{id}` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - localVarHeaderParameter['Accept'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Token and cost breakdown by stage and model - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getRunUsage: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('getRunUsage', 'id', id) - const localVarPath = `/runs/{id}/usage` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - localVarHeaderParameter['Accept'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Verification results for this run - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getRunVerifications: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('getRunVerifications', 'id', id) + assertParamExists('listRunVerifications', 'id', id) const localVarPath = `/runs/{id}/verifications` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -550,45 +194,7 @@ export const RunsApiAxiosParamCreator = function (configuration?: Configuration) }, /** * - * @summary Conversation transcript for a stage - * @param {string} id - * @param {string} stageId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStageTurns: async (id: string, stageId: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('getStageTurns', 'id', id) - // verify required parameter 'stageId' is not null or undefined - assertParamExists('getStageTurns', 'stageId', stageId) - const localVarPath = `/runs/{id}/stages/{stageId}/turns` - .replace(`{${"id"}}`, encodeURIComponent(String(id))) - .replace(`{${"stageId"}}`, encodeURIComponent(String(stageId))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - localVarHeaderParameter['Accept'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary List all runs (board view) + * @summary List Runs * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -618,7 +224,109 @@ export const RunsApiAxiosParamCreator = function (configuration?: Configuration) }, /** * - * @summary Start a new run + * @summary Retrieve Run + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + retrieveRun: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('retrieveRun', 'id', id) + const localVarPath = `/runs/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Retrieve Run Checkpoint + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + retrieveRunCheckpoint: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('retrieveRunCheckpoint', 'id', id) + const localVarPath = `/runs/{id}/checkpoint` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Retrieve Run SVG + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + retrieveRunSvg: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('retrieveRunSvg', 'id', id) + const localVarPath = `/runs/{id}/graph` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Accept'] = 'image/svg+xml,application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Start Run * @param {StartRunRequest} startRunRequest * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -653,18 +361,15 @@ export const RunsApiAxiosParamCreator = function (configuration?: Configuration) }, /** * - * @summary Submit steering guidance on a file line + * @summary Stream Run Events * @param {string} id - * @param {SteerRequest} steerRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - steerRun: async (id: string, steerRequest: SteerRequest, options: RawAxiosRequestConfig = {}): Promise => { + streamRunEvents: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined - assertParamExists('steerRun', 'id', id) - // verify required parameter 'steerRequest' is not null or undefined - assertParamExists('steerRun', 'steerRequest', steerRequest) - const localVarPath = `/runs/{id}/steer` + assertParamExists('streamRunEvents', 'id', id) + const localVarPath = `/runs/{id}/events` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -673,60 +378,15 @@ export const RunsApiAxiosParamCreator = function (configuration?: Configuration) baseOptions = configuration.baseOptions; } - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; - localVarHeaderParameter['Content-Type'] = 'application/json'; - localVarHeaderParameter['Accept'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'text/event-stream'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(steerRequest, localVarRequestOptions, configuration) - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary Submit an answer to a question - * @param {string} id - * @param {string} qid - * @param {SubmitAnswerRequest} submitAnswerRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - submitAnswer: async (id: string, qid: string, submitAnswerRequest: SubmitAnswerRequest, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('submitAnswer', 'id', id) - // verify required parameter 'qid' is not null or undefined - assertParamExists('submitAnswer', 'qid', qid) - // verify required parameter 'submitAnswerRequest' is not null or undefined - assertParamExists('submitAnswer', 'submitAnswerRequest', submitAnswerRequest) - const localVarPath = `/runs/{id}/questions/{qid}/answer` - .replace(`{${"id"}}`, encodeURIComponent(String(id))) - .replace(`{${"qid"}}`, encodeURIComponent(String(qid))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - localVarHeaderParameter['Content-Type'] = 'application/json'; - localVarHeaderParameter['Accept'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(submitAnswerRequest, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -744,7 +404,7 @@ export const RunsApiFp = function(configuration?: Configuration) { return { /** * - * @summary Cancel a running run + * @summary Cancel Run * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -771,178 +431,34 @@ export const RunsApiFp = function(configuration?: Configuration) { }, /** * - * @summary Get run checkpoint - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getCheckpoint(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getCheckpoint(id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['RunsApi.getCheckpoint']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @summary Get run context - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getContext(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getContext(id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['RunsApi.getContext']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @summary Subscribe to run events via SSE - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getEvents(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getEvents(id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['RunsApi.getEvents']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @summary Get run graph as SVG - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getGraph(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getGraph(id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['RunsApi.getGraph']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @summary Get pending questions for a run - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getQuestions(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getQuestions(id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['RunsApi.getQuestions']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @summary Get run retrospective - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getRetro(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getRetro(id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['RunsApi.getRetro']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @summary Run configuration (TOML) - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getRunConfiguration(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getRunConfiguration(id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['RunsApi.getRunConfiguration']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @summary File diffs grouped by checkpoint + * @summary List Run Files * @param {string} id * @param {string} [checkpoint] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getRunFiles(id: string, checkpoint?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getRunFiles(id, checkpoint, options); + async listRunFiles(id: string, checkpoint?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listRunFiles(id, checkpoint, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['RunsApi.getRunFiles']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['RunsApi.listRunFiles']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * - * @summary List stages with status and duration + * @summary List Run Verifications * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getRunStages(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getRunStages(id, options); + async listRunVerifications(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listRunVerifications(id, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['RunsApi.getRunStages']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['RunsApi.listRunVerifications']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * - * @summary Get run status - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getRunStatus(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getRunStatus(id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['RunsApi.getRunStatus']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @summary Token and cost breakdown by stage and model - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getRunUsage(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getRunUsage(id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['RunsApi.getRunUsage']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @summary Verification results for this run - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getRunVerifications(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getRunVerifications(id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['RunsApi.getRunVerifications']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @summary Conversation transcript for a stage - * @param {string} id - * @param {string} stageId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getStageTurns(id: string, stageId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getStageTurns(id, stageId, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['RunsApi.getStageTurns']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @summary List all runs (board view) + * @summary List Runs * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -954,7 +470,46 @@ export const RunsApiFp = function(configuration?: Configuration) { }, /** * - * @summary Start a new run + * @summary Retrieve Run + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async retrieveRun(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveRun(id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['RunsApi.retrieveRun']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Retrieve Run Checkpoint + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async retrieveRunCheckpoint(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveRunCheckpoint(id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['RunsApi.retrieveRunCheckpoint']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Retrieve Run SVG + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async retrieveRunSvg(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveRunSvg(id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['RunsApi.retrieveRunSvg']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Start Run * @param {StartRunRequest} startRunRequest * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -967,31 +522,15 @@ export const RunsApiFp = function(configuration?: Configuration) { }, /** * - * @summary Submit steering guidance on a file line + * @summary Stream Run Events * @param {string} id - * @param {SteerRequest} steerRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async steerRun(id: string, steerRequest: SteerRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.steerRun(id, steerRequest, options); + async streamRunEvents(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.streamRunEvents(id, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['RunsApi.steerRun']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @summary Submit an answer to a question - * @param {string} id - * @param {string} qid - * @param {SubmitAnswerRequest} submitAnswerRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async submitAnswer(id: string, qid: string, submitAnswerRequest: SubmitAnswerRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.submitAnswer(id, qid, submitAnswerRequest, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['RunsApi.submitAnswer']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['RunsApi.streamRunEvents']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } @@ -1005,7 +544,7 @@ export const RunsApiFactory = function (configuration?: Configuration, basePath? return { /** * - * @summary Cancel a running run + * @summary Cancel Run * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -1026,139 +565,28 @@ export const RunsApiFactory = function (configuration?: Configuration, basePath? }, /** * - * @summary Get run checkpoint - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getCheckpoint(id: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getCheckpoint(id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get run context - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getContext(id: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getContext(id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Subscribe to run events via SSE - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getEvents(id: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getEvents(id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get run graph as SVG - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getGraph(id: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getGraph(id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get pending questions for a run - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getQuestions(id: string, options?: RawAxiosRequestConfig): AxiosPromise> { - return localVarFp.getQuestions(id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Get run retrospective - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getRetro(id: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getRetro(id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Run configuration (TOML) - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getRunConfiguration(id: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getRunConfiguration(id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary File diffs grouped by checkpoint + * @summary List Run Files * @param {string} id * @param {string} [checkpoint] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getRunFiles(id: string, checkpoint?: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getRunFiles(id, checkpoint, options).then((request) => request(axios, basePath)); + listRunFiles(id: string, checkpoint?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listRunFiles(id, checkpoint, options).then((request) => request(axios, basePath)); }, /** * - * @summary List stages with status and duration + * @summary List Run Verifications * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getRunStages(id: string, options?: RawAxiosRequestConfig): AxiosPromise> { - return localVarFp.getRunStages(id, options).then((request) => request(axios, basePath)); + listRunVerifications(id: string, options?: RawAxiosRequestConfig): AxiosPromise> { + return localVarFp.listRunVerifications(id, options).then((request) => request(axios, basePath)); }, /** * - * @summary Get run status - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getRunStatus(id: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getRunStatus(id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Token and cost breakdown by stage and model - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getRunUsage(id: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getRunUsage(id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Verification results for this run - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getRunVerifications(id: string, options?: RawAxiosRequestConfig): AxiosPromise> { - return localVarFp.getRunVerifications(id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Conversation transcript for a stage - * @param {string} id - * @param {string} stageId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getStageTurns(id: string, stageId: string, options?: RawAxiosRequestConfig): AxiosPromise> { - return localVarFp.getStageTurns(id, stageId, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary List all runs (board view) + * @summary List Runs * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1167,7 +595,37 @@ export const RunsApiFactory = function (configuration?: Configuration, basePath? }, /** * - * @summary Start a new run + * @summary Retrieve Run + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + retrieveRun(id: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.retrieveRun(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Retrieve Run Checkpoint + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + retrieveRunCheckpoint(id: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.retrieveRunCheckpoint(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Retrieve Run SVG + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + retrieveRunSvg(id: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.retrieveRunSvg(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Start Run * @param {StartRunRequest} startRunRequest * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -1177,26 +635,13 @@ export const RunsApiFactory = function (configuration?: Configuration, basePath? }, /** * - * @summary Submit steering guidance on a file line + * @summary Stream Run Events * @param {string} id - * @param {SteerRequest} steerRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - steerRun(id: string, steerRequest: SteerRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.steerRun(id, steerRequest, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary Submit an answer to a question - * @param {string} id - * @param {string} qid - * @param {SubmitAnswerRequest} submitAnswerRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - submitAnswer(id: string, qid: string, submitAnswerRequest: SubmitAnswerRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.submitAnswer(id, qid, submitAnswerRequest, options).then((request) => request(axios, basePath)); + streamRunEvents(id: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.streamRunEvents(id, options).then((request) => request(axios, basePath)); }, }; }; @@ -1207,7 +652,7 @@ export const RunsApiFactory = function (configuration?: Configuration, basePath? export class RunsApi extends BaseAPI { /** * - * @summary Cancel a running run + * @summary Cancel Run * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -1230,152 +675,30 @@ export class RunsApi extends BaseAPI { /** * - * @summary Get run checkpoint - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getCheckpoint(id: string, options?: RawAxiosRequestConfig) { - return RunsApiFp(this.configuration).getCheckpoint(id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get run context - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getContext(id: string, options?: RawAxiosRequestConfig) { - return RunsApiFp(this.configuration).getContext(id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Subscribe to run events via SSE - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getEvents(id: string, options?: RawAxiosRequestConfig) { - return RunsApiFp(this.configuration).getEvents(id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get run graph as SVG - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getGraph(id: string, options?: RawAxiosRequestConfig) { - return RunsApiFp(this.configuration).getGraph(id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get pending questions for a run - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getQuestions(id: string, options?: RawAxiosRequestConfig) { - return RunsApiFp(this.configuration).getQuestions(id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Get run retrospective - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getRetro(id: string, options?: RawAxiosRequestConfig) { - return RunsApiFp(this.configuration).getRetro(id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Run configuration (TOML) - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getRunConfiguration(id: string, options?: RawAxiosRequestConfig) { - return RunsApiFp(this.configuration).getRunConfiguration(id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary File diffs grouped by checkpoint + * @summary List Run Files * @param {string} id * @param {string} [checkpoint] * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getRunFiles(id: string, checkpoint?: string, options?: RawAxiosRequestConfig) { - return RunsApiFp(this.configuration).getRunFiles(id, checkpoint, options).then((request) => request(this.axios, this.basePath)); + public listRunFiles(id: string, checkpoint?: string, options?: RawAxiosRequestConfig) { + return RunsApiFp(this.configuration).listRunFiles(id, checkpoint, options).then((request) => request(this.axios, this.basePath)); } /** * - * @summary List stages with status and duration + * @summary List Run Verifications * @param {string} id * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getRunStages(id: string, options?: RawAxiosRequestConfig) { - return RunsApiFp(this.configuration).getRunStages(id, options).then((request) => request(this.axios, this.basePath)); + public listRunVerifications(id: string, options?: RawAxiosRequestConfig) { + return RunsApiFp(this.configuration).listRunVerifications(id, options).then((request) => request(this.axios, this.basePath)); } /** * - * @summary Get run status - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getRunStatus(id: string, options?: RawAxiosRequestConfig) { - return RunsApiFp(this.configuration).getRunStatus(id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Token and cost breakdown by stage and model - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getRunUsage(id: string, options?: RawAxiosRequestConfig) { - return RunsApiFp(this.configuration).getRunUsage(id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Verification results for this run - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getRunVerifications(id: string, options?: RawAxiosRequestConfig) { - return RunsApiFp(this.configuration).getRunVerifications(id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Conversation transcript for a stage - * @param {string} id - * @param {string} stageId - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getStageTurns(id: string, stageId: string, options?: RawAxiosRequestConfig) { - return RunsApiFp(this.configuration).getStageTurns(id, stageId, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary List all runs (board view) + * @summary List Runs * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -1385,7 +708,40 @@ export class RunsApi extends BaseAPI { /** * - * @summary Start a new run + * @summary Retrieve Run + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public retrieveRun(id: string, options?: RawAxiosRequestConfig) { + return RunsApiFp(this.configuration).retrieveRun(id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Retrieve Run Checkpoint + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public retrieveRunCheckpoint(id: string, options?: RawAxiosRequestConfig) { + return RunsApiFp(this.configuration).retrieveRunCheckpoint(id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Retrieve Run SVG + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public retrieveRunSvg(id: string, options?: RawAxiosRequestConfig) { + return RunsApiFp(this.configuration).retrieveRunSvg(id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Start Run * @param {StartRunRequest} startRunRequest * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -1396,27 +752,13 @@ export class RunsApi extends BaseAPI { /** * - * @summary Submit steering guidance on a file line + * @summary Stream Run Events * @param {string} id - * @param {SteerRequest} steerRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public steerRun(id: string, steerRequest: SteerRequest, options?: RawAxiosRequestConfig) { - return RunsApiFp(this.configuration).steerRun(id, steerRequest, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary Submit an answer to a question - * @param {string} id - * @param {string} qid - * @param {SubmitAnswerRequest} submitAnswerRequest - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public submitAnswer(id: string, qid: string, submitAnswerRequest: SubmitAnswerRequest, options?: RawAxiosRequestConfig) { - return RunsApiFp(this.configuration).submitAnswer(id, qid, submitAnswerRequest, options).then((request) => request(this.axios, this.basePath)); + public streamRunEvents(id: string, options?: RawAxiosRequestConfig) { + return RunsApiFp(this.configuration).streamRunEvents(id, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/packages/arc-api-client/src/api/sessions-api.ts b/packages/arc-api-client/src/api/sessions-api.ts index d64d72a51..98f7f4034 100644 --- a/packages/arc-api-client/src/api/sessions-api.ts +++ b/packages/arc-api-client/src/api/sessions-api.ts @@ -40,7 +40,7 @@ export const SessionsApiAxiosParamCreator = function (configuration?: Configurat return { /** * - * @summary Create a new session + * @summary Create Session * @param {CreateSessionRequest} createSessionRequest * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -75,75 +75,7 @@ export const SessionsApiAxiosParamCreator = function (configuration?: Configurat }, /** * - * @summary Session detail with full turn history - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSession: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('getSession', 'id', id) - const localVarPath = `/sessions/{id}` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - localVarHeaderParameter['Accept'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary SSE stream for live assistant responses - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSessionEvents: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'id' is not null or undefined - assertParamExists('getSessionEvents', 'id', id) - const localVarPath = `/sessions/{id}/events` - .replace(`{${"id"}}`, encodeURIComponent(String(id))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - localVarHeaderParameter['Accept'] = 'text/event-stream'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary List sessions grouped by recency + * @summary List Sessions * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -173,17 +105,51 @@ export const SessionsApiAxiosParamCreator = function (configuration?: Configurat }, /** * - * @summary Send a user message + * @summary Retrieve Session + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + retrieveSession: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('retrieveSession', 'id', id) + const localVarPath = `/sessions/{id}` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Send Session Message * @param {string} id * @param {SendMessageRequest} sendMessageRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - sendMessage: async (id: string, sendMessageRequest: SendMessageRequest, options: RawAxiosRequestConfig = {}): Promise => { + sendSessionMessage: async (id: string, sendMessageRequest: SendMessageRequest, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined - assertParamExists('sendMessage', 'id', id) + assertParamExists('sendSessionMessage', 'id', id) // verify required parameter 'sendMessageRequest' is not null or undefined - assertParamExists('sendMessage', 'sendMessageRequest', sendMessageRequest) + assertParamExists('sendSessionMessage', 'sendMessageRequest', sendMessageRequest) const localVarPath = `/sessions/{id}/messages` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -205,6 +171,40 @@ export const SessionsApiAxiosParamCreator = function (configuration?: Configurat localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(sendMessageRequest, localVarRequestOptions, configuration) + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Stream Session Events + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + streamSessionEvents: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('streamSessionEvents', 'id', id) + const localVarPath = `/sessions/{id}/events` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Accept'] = 'text/event-stream'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, @@ -221,7 +221,7 @@ export const SessionsApiFp = function(configuration?: Configuration) { return { /** * - * @summary Create a new session + * @summary Create Session * @param {CreateSessionRequest} createSessionRequest * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -234,33 +234,7 @@ export const SessionsApiFp = function(configuration?: Configuration) { }, /** * - * @summary Session detail with full turn history - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSession(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSession(id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SessionsApi.getSession']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @summary SSE stream for live assistant responses - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getSessionEvents(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSessionEvents(id, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SessionsApi.getSessionEvents']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @summary List sessions grouped by recency + * @summary List Sessions * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -272,16 +246,42 @@ export const SessionsApiFp = function(configuration?: Configuration) { }, /** * - * @summary Send a user message + * @summary Retrieve Session + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async retrieveSession(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveSession(id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SessionsApi.retrieveSession']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Send Session Message * @param {string} id * @param {SendMessageRequest} sendMessageRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async sendMessage(id: string, sendMessageRequest: SendMessageRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.sendMessage(id, sendMessageRequest, options); + async sendSessionMessage(id: string, sendMessageRequest: SendMessageRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.sendSessionMessage(id, sendMessageRequest, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SessionsApi.sendMessage']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['SessionsApi.sendSessionMessage']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Stream Session Events + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async streamSessionEvents(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.streamSessionEvents(id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['SessionsApi.streamSessionEvents']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } @@ -295,7 +295,7 @@ export const SessionsApiFactory = function (configuration?: Configuration, baseP return { /** * - * @summary Create a new session + * @summary Create Session * @param {CreateSessionRequest} createSessionRequest * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -305,27 +305,7 @@ export const SessionsApiFactory = function (configuration?: Configuration, baseP }, /** * - * @summary Session detail with full turn history - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSession(id: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getSession(id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary SSE stream for live assistant responses - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getSessionEvents(id: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getSessionEvents(id, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary List sessions grouped by recency + * @summary List Sessions * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -334,14 +314,34 @@ export const SessionsApiFactory = function (configuration?: Configuration, baseP }, /** * - * @summary Send a user message + * @summary Retrieve Session + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + retrieveSession(id: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.retrieveSession(id, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Send Session Message * @param {string} id * @param {SendMessageRequest} sendMessageRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - sendMessage(id: string, sendMessageRequest: SendMessageRequest, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.sendMessage(id, sendMessageRequest, options).then((request) => request(axios, basePath)); + sendSessionMessage(id: string, sendMessageRequest: SendMessageRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.sendSessionMessage(id, sendMessageRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Stream Session Events + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + streamSessionEvents(id: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.streamSessionEvents(id, options).then((request) => request(axios, basePath)); }, }; }; @@ -352,7 +352,7 @@ export const SessionsApiFactory = function (configuration?: Configuration, baseP export class SessionsApi extends BaseAPI { /** * - * @summary Create a new session + * @summary Create Session * @param {CreateSessionRequest} createSessionRequest * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -363,29 +363,7 @@ export class SessionsApi extends BaseAPI { /** * - * @summary Session detail with full turn history - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getSession(id: string, options?: RawAxiosRequestConfig) { - return SessionsApiFp(this.configuration).getSession(id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary SSE stream for live assistant responses - * @param {string} id - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getSessionEvents(id: string, options?: RawAxiosRequestConfig) { - return SessionsApiFp(this.configuration).getSessionEvents(id, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary List sessions grouped by recency + * @summary List Sessions * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -395,14 +373,36 @@ export class SessionsApi extends BaseAPI { /** * - * @summary Send a user message + * @summary Retrieve Session + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public retrieveSession(id: string, options?: RawAxiosRequestConfig) { + return SessionsApiFp(this.configuration).retrieveSession(id, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Send Session Message * @param {string} id * @param {SendMessageRequest} sendMessageRequest * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public sendMessage(id: string, sendMessageRequest: SendMessageRequest, options?: RawAxiosRequestConfig) { - return SessionsApiFp(this.configuration).sendMessage(id, sendMessageRequest, options).then((request) => request(this.axios, this.basePath)); + public sendSessionMessage(id: string, sendMessageRequest: SendMessageRequest, options?: RawAxiosRequestConfig) { + return SessionsApiFp(this.configuration).sendSessionMessage(id, sendMessageRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Stream Session Events + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public streamSessionEvents(id: string, options?: RawAxiosRequestConfig) { + return SessionsApiFp(this.configuration).streamSessionEvents(id, options).then((request) => request(this.axios, this.basePath)); } } diff --git a/packages/arc-api-client/src/api/settings-api.ts b/packages/arc-api-client/src/api/settings-api.ts index 5eed4364e..d010f0c58 100644 --- a/packages/arc-api-client/src/api/settings-api.ts +++ b/packages/arc-api-client/src/api/settings-api.ts @@ -30,11 +30,11 @@ export const SettingsApiAxiosParamCreator = function (configuration?: Configurat return { /** * - * @summary Get all setting groups with current values + * @summary Retrieve Server Settings * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getSettings: async (options: RawAxiosRequestConfig = {}): Promise => { + retrieveServerSettings: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/settings`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -69,14 +69,14 @@ export const SettingsApiFp = function(configuration?: Configuration) { return { /** * - * @summary Get all setting groups with current values + * @summary Retrieve Server Settings * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getSettings(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getSettings(options); + async retrieveServerSettings(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveServerSettings(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['SettingsApi.getSettings']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['SettingsApi.retrieveServerSettings']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } @@ -90,12 +90,12 @@ export const SettingsApiFactory = function (configuration?: Configuration, baseP return { /** * - * @summary Get all setting groups with current values + * @summary Retrieve Server Settings * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getSettings(options?: RawAxiosRequestConfig): AxiosPromise> { - return localVarFp.getSettings(options).then((request) => request(axios, basePath)); + retrieveServerSettings(options?: RawAxiosRequestConfig): AxiosPromise> { + return localVarFp.retrieveServerSettings(options).then((request) => request(axios, basePath)); }, }; }; @@ -106,12 +106,12 @@ export const SettingsApiFactory = function (configuration?: Configuration, baseP export class SettingsApi extends BaseAPI { /** * - * @summary Get all setting groups with current values + * @summary Retrieve Server Settings * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public getSettings(options?: RawAxiosRequestConfig) { - return SettingsApiFp(this.configuration).getSettings(options).then((request) => request(this.axios, this.basePath)); + public retrieveServerSettings(options?: RawAxiosRequestConfig) { + return SettingsApiFp(this.configuration).retrieveServerSettings(options).then((request) => request(this.axios, this.basePath)); } } diff --git a/packages/arc-api-client/src/api/usage-api.ts b/packages/arc-api-client/src/api/usage-api.ts new file mode 100644 index 000000000..d077cdf7b --- /dev/null +++ b/packages/arc-api-client/src/api/usage-api.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Arc Run API + * HTTP API for managing Arc workflow run executions. + * + * The version of the OpenAPI document: 0.1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; +// @ts-ignore +import type { RunUsage } from '../models'; +/** + * UsageApi - axios parameter creator + */ +export const UsageApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Retrieve Run Usage + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + retrieveRunUsage: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('retrieveRunUsage', 'id', id) + const localVarPath = `/runs/{id}/usage` + .replace(`{${"id"}}`, encodeURIComponent(String(id))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * UsageApi - functional programming interface + */ +export const UsageApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = UsageApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Retrieve Run Usage + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async retrieveRunUsage(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveRunUsage(id, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['UsageApi.retrieveRunUsage']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * UsageApi - factory interface + */ +export const UsageApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = UsageApiFp(configuration) + return { + /** + * + * @summary Retrieve Run Usage + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + retrieveRunUsage(id: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.retrieveRunUsage(id, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * UsageApi - object-oriented interface + */ +export class UsageApi extends BaseAPI { + /** + * + * @summary Retrieve Run Usage + * @param {string} id + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public retrieveRunUsage(id: string, options?: RawAxiosRequestConfig) { + return UsageApiFp(this.configuration).retrieveRunUsage(id, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/packages/arc-api-client/src/api/verifications-api.ts b/packages/arc-api-client/src/api/verifications-api.ts index a7048f739..56f5805ed 100644 --- a/packages/arc-api-client/src/api/verifications-api.ts +++ b/packages/arc-api-client/src/api/verifications-api.ts @@ -32,16 +32,12 @@ export const VerificationsApiAxiosParamCreator = function (configuration?: Confi return { /** * - * @summary Control detail with performance and recent results - * @param {string} slug + * @summary List Verifications * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getVerificationDetail: async (slug: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'slug' is not null or undefined - assertParamExists('getVerificationDetail', 'slug', slug) - const localVarPath = `/verifications/{slug}` - .replace(`{${"slug"}}`, encodeURIComponent(String(slug))); + listVerifications: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/verifications`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -66,12 +62,16 @@ export const VerificationsApiAxiosParamCreator = function (configuration?: Confi }, /** * - * @summary List all verification categories with controls + * @summary Retrieve Verification + * @param {string} slug * @param {*} [options] Override http request option. * @throws {RequiredError} */ - listVerifications: async (options: RawAxiosRequestConfig = {}): Promise => { - const localVarPath = `/verifications`; + retrieveVerification: async (slug: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'slug' is not null or undefined + assertParamExists('retrieveVerification', 'slug', slug) + const localVarPath = `/verifications/{slug}` + .replace(`{${"slug"}}`, encodeURIComponent(String(slug))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -105,20 +105,7 @@ export const VerificationsApiFp = function(configuration?: Configuration) { return { /** * - * @summary Control detail with performance and recent results - * @param {string} slug - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getVerificationDetail(slug: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getVerificationDetail(slug, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['VerificationsApi.getVerificationDetail']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @summary List all verification categories with controls + * @summary List Verifications * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -128,6 +115,19 @@ export const VerificationsApiFp = function(configuration?: Configuration) { const localVarOperationServerBasePath = operationServerMap['VerificationsApi.listVerifications']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, + /** + * + * @summary Retrieve Verification + * @param {string} slug + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async retrieveVerification(slug: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveVerification(slug, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['VerificationsApi.retrieveVerification']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, } }; @@ -139,23 +139,23 @@ export const VerificationsApiFactory = function (configuration?: Configuration, return { /** * - * @summary Control detail with performance and recent results - * @param {string} slug - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getVerificationDetail(slug: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getVerificationDetail(slug, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary List all verification categories with controls + * @summary List Verifications * @param {*} [options] Override http request option. * @throws {RequiredError} */ listVerifications(options?: RawAxiosRequestConfig): AxiosPromise> { return localVarFp.listVerifications(options).then((request) => request(axios, basePath)); }, + /** + * + * @summary Retrieve Verification + * @param {string} slug + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + retrieveVerification(slug: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.retrieveVerification(slug, options).then((request) => request(axios, basePath)); + }, }; }; @@ -165,23 +165,23 @@ export const VerificationsApiFactory = function (configuration?: Configuration, export class VerificationsApi extends BaseAPI { /** * - * @summary Control detail with performance and recent results - * @param {string} slug - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getVerificationDetail(slug: string, options?: RawAxiosRequestConfig) { - return VerificationsApiFp(this.configuration).getVerificationDetail(slug, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary List all verification categories with controls + * @summary List Verifications * @param {*} [options] Override http request option. * @throws {RequiredError} */ public listVerifications(options?: RawAxiosRequestConfig) { return VerificationsApiFp(this.configuration).listVerifications(options).then((request) => request(this.axios, this.basePath)); } + + /** + * + * @summary Retrieve Verification + * @param {string} slug + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public retrieveVerification(slug: string, options?: RawAxiosRequestConfig) { + return VerificationsApiFp(this.configuration).retrieveVerification(slug, options).then((request) => request(this.axios, this.basePath)); + } } diff --git a/packages/arc-api-client/src/api/workflows-api.ts b/packages/arc-api-client/src/api/workflows-api.ts index 32cf23e2d..b360d3be8 100644 --- a/packages/arc-api-client/src/api/workflows-api.ts +++ b/packages/arc-api-client/src/api/workflows-api.ts @@ -36,41 +36,7 @@ export const WorkflowsApiAxiosParamCreator = function (configuration?: Configura return { /** * - * @summary Get workflow detail with config and graph - * @param {string} name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getWorkflow: async (name: string, options: RawAxiosRequestConfig = {}): Promise => { - // verify required parameter 'name' is not null or undefined - assertParamExists('getWorkflow', 'name', name) - const localVarPath = `/workflows/{name}` - .replace(`{${"name"}}`, encodeURIComponent(String(name))); - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - - const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - localVarHeaderParameter['Accept'] = 'application/json'; - - setSearchParams(localVarUrlObj, localVarQueryParameter); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - - return { - url: toPathString(localVarUrlObj), - options: localVarRequestOptions, - }; - }, - /** - * - * @summary List runs for this workflow + * @summary List Workflow Runs * @param {string} name * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -104,7 +70,7 @@ export const WorkflowsApiAxiosParamCreator = function (configuration?: Configura }, /** * - * @summary List all workflows + * @summary List Workflows * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -134,14 +100,48 @@ export const WorkflowsApiAxiosParamCreator = function (configuration?: Configura }, /** * - * @summary Trigger a run for this workflow + * @summary Retrieve Workflow * @param {string} name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - triggerWorkflowRun: async (name: string, options: RawAxiosRequestConfig = {}): Promise => { + retrieveWorkflow: async (name: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'name' is not null or undefined - assertParamExists('triggerWorkflowRun', 'name', name) + assertParamExists('retrieveWorkflow', 'name', name) + const localVarPath = `/workflows/{name}` + .replace(`{${"name"}}`, encodeURIComponent(String(name))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Start Workflow Run + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + startWorkflowRun: async (name: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'name' is not null or undefined + assertParamExists('startWorkflowRun', 'name', name) const localVarPath = `/workflows/{name}/runs` .replace(`{${"name"}}`, encodeURIComponent(String(name))); // use dummy base URL string because the URL constructor only accepts absolute URLs. @@ -177,20 +177,7 @@ export const WorkflowsApiFp = function(configuration?: Configuration) { return { /** * - * @summary Get workflow detail with config and graph - * @param {string} name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async getWorkflow(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getWorkflow(name, options); - const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['WorkflowsApi.getWorkflow']?.[localVarOperationServerIndex]?.url; - return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); - }, - /** - * - * @summary List runs for this workflow + * @summary List Workflow Runs * @param {string} name * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -203,7 +190,7 @@ export const WorkflowsApiFp = function(configuration?: Configuration) { }, /** * - * @summary List all workflows + * @summary List Workflows * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -215,15 +202,28 @@ export const WorkflowsApiFp = function(configuration?: Configuration) { }, /** * - * @summary Trigger a run for this workflow + * @summary Retrieve Workflow * @param {string} name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async triggerWorkflowRun(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.triggerWorkflowRun(name, options); + async retrieveWorkflow(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveWorkflow(name, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['WorkflowsApi.triggerWorkflowRun']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['WorkflowsApi.retrieveWorkflow']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Start Workflow Run + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async startWorkflowRun(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.startWorkflowRun(name, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['WorkflowsApi.startWorkflowRun']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } @@ -237,17 +237,7 @@ export const WorkflowsApiFactory = function (configuration?: Configuration, base return { /** * - * @summary Get workflow detail with config and graph - * @param {string} name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - getWorkflow(name: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.getWorkflow(name, options).then((request) => request(axios, basePath)); - }, - /** - * - * @summary List runs for this workflow + * @summary List Workflow Runs * @param {string} name * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -257,7 +247,7 @@ export const WorkflowsApiFactory = function (configuration?: Configuration, base }, /** * - * @summary List all workflows + * @summary List Workflows * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -266,13 +256,23 @@ export const WorkflowsApiFactory = function (configuration?: Configuration, base }, /** * - * @summary Trigger a run for this workflow + * @summary Retrieve Workflow * @param {string} name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - triggerWorkflowRun(name: string, options?: RawAxiosRequestConfig): AxiosPromise { - return localVarFp.triggerWorkflowRun(name, options).then((request) => request(axios, basePath)); + retrieveWorkflow(name: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.retrieveWorkflow(name, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Start Workflow Run + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + startWorkflowRun(name: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.startWorkflowRun(name, options).then((request) => request(axios, basePath)); }, }; }; @@ -283,18 +283,7 @@ export const WorkflowsApiFactory = function (configuration?: Configuration, base export class WorkflowsApi extends BaseAPI { /** * - * @summary Get workflow detail with config and graph - * @param {string} name - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - public getWorkflow(name: string, options?: RawAxiosRequestConfig) { - return WorkflowsApiFp(this.configuration).getWorkflow(name, options).then((request) => request(this.axios, this.basePath)); - } - - /** - * - * @summary List runs for this workflow + * @summary List Workflow Runs * @param {string} name * @param {*} [options] Override http request option. * @throws {RequiredError} @@ -305,7 +294,7 @@ export class WorkflowsApi extends BaseAPI { /** * - * @summary List all workflows + * @summary List Workflows * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -315,13 +304,24 @@ export class WorkflowsApi extends BaseAPI { /** * - * @summary Trigger a run for this workflow + * @summary Retrieve Workflow * @param {string} name * @param {*} [options] Override http request option. * @throws {RequiredError} */ - public triggerWorkflowRun(name: string, options?: RawAxiosRequestConfig) { - return WorkflowsApiFp(this.configuration).triggerWorkflowRun(name, options).then((request) => request(this.axios, this.basePath)); + public retrieveWorkflow(name: string, options?: RawAxiosRequestConfig) { + return WorkflowsApiFp(this.configuration).retrieveWorkflow(name, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Start Workflow Run + * @param {string} name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public startWorkflowRun(name: string, options?: RawAxiosRequestConfig) { + return WorkflowsApiFp(this.configuration).startWorkflowRun(name, options).then((request) => request(this.axios, this.basePath)); } }