mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-07 08:27:12 +00:00
Clean up API spec: remove redundant response types, add pagination, fix naming
- Delete StartRunResponse, CancelRunResponse, SteerRunResponse, SubmitAnswerResponse; reuse RunStatusResponse for startRun/cancelRun, empty 202 for steerRun, 204/409 for submitRunAnswer - Make SubmitAnswerRequest.value and SteerRequest file/line optional - Type untyped schemas (checkpoint, retro, context) with oneOf/additionalProperties - Add pagination params to listRunQuestions, listRunStages, listRunVerifications - Rename retrieveRunSvg→retrieveRunGraph, listRunCompare→retrieveRunDiff, RunListItemStatus→BoardColumn - Preview URL response: 200→201 - Regenerate Rust types and TypeScript client Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
83a358c727
commit
566bef0220
31 changed files with 321 additions and 774 deletions
|
|
@ -51,8 +51,9 @@ pub async fn get_run_stages(
|
|||
_auth: AuthenticatedService,
|
||||
State(_state): State<Arc<AppState>>,
|
||||
Path(_id): Path<String>,
|
||||
Query(pagination): Query<PaginationParams>,
|
||||
) -> Response {
|
||||
list_response(runs::stages())
|
||||
paginated_response(runs::stages(), &pagination)
|
||||
}
|
||||
|
||||
pub async fn get_stage_turns(
|
||||
|
|
@ -91,8 +92,9 @@ pub async fn get_run_verifications(
|
|||
_auth: AuthenticatedService,
|
||||
State(_state): State<Arc<AppState>>,
|
||||
Path(_id): Path<String>,
|
||||
Query(pagination): Query<PaginationParams>,
|
||||
) -> Response {
|
||||
list_response(runs::verifications())
|
||||
paginated_response(runs::verifications(), &pagination)
|
||||
}
|
||||
|
||||
pub async fn get_run_configuration(
|
||||
|
|
@ -113,7 +115,7 @@ pub async fn steer_run_stub(
|
|||
State(_state): State<Arc<AppState>>,
|
||||
Path(_id): Path<String>,
|
||||
) -> Response {
|
||||
(StatusCode::ACCEPTED, Json(serde_json::json!({"accepted": true}))).into_response()
|
||||
StatusCode::ACCEPTED.into_response()
|
||||
}
|
||||
|
||||
pub async fn generate_preview_url_stub(
|
||||
|
|
@ -122,7 +124,7 @@ pub async fn generate_preview_url_stub(
|
|||
Path(_id): Path<String>,
|
||||
) -> Response {
|
||||
(
|
||||
StatusCode::OK,
|
||||
StatusCode::CREATED,
|
||||
Json(serde_json::json!({"url": "https://google.com"})),
|
||||
)
|
||||
.into_response()
|
||||
|
|
@ -153,9 +155,9 @@ pub async fn get_questions_stub(
|
|||
_auth: AuthenticatedService,
|
||||
State(_state): State<Arc<AppState>>,
|
||||
Path(_id): Path<String>,
|
||||
Query(pagination): Query<PaginationParams>,
|
||||
) -> Response {
|
||||
let empty: Vec<arc_types::ApiQuestion> = vec![];
|
||||
list_response(empty)
|
||||
paginated_response(runs::questions(), &pagination)
|
||||
}
|
||||
|
||||
pub async fn answer_stub(
|
||||
|
|
@ -163,7 +165,7 @@ pub async fn answer_stub(
|
|||
State(_state): State<Arc<AppState>>,
|
||||
Path((_id, _qid)): Path<(String, String)>,
|
||||
) -> Response {
|
||||
(StatusCode::OK, Json(serde_json::json!({"accepted": true}))).into_response()
|
||||
StatusCode::NO_CONTENT.into_response()
|
||||
}
|
||||
|
||||
pub async fn run_events_stub(
|
||||
|
|
@ -195,7 +197,7 @@ pub async fn cancel_stub(
|
|||
State(_state): State<Arc<AppState>>,
|
||||
Path(_id): Path<String>,
|
||||
) -> Response {
|
||||
(StatusCode::OK, Json(serde_json::json!({"cancelled": true}))).into_response()
|
||||
(StatusCode::OK, Json(serde_json::json!({"id": _id, "status": "cancelled", "created_at": "2026-03-06T14:30:00Z"}))).into_response()
|
||||
}
|
||||
|
||||
pub async fn get_run_graph(
|
||||
|
|
@ -703,7 +705,7 @@ mod runs {
|
|||
repo: "api-server".into(),
|
||||
title: "Add rate limiting to auth endpoints".into(),
|
||||
workflow: "implement".into(),
|
||||
status: RunListItemStatus::Working,
|
||||
status: BoardColumn::Working,
|
||||
number: None,
|
||||
additions: None,
|
||||
deletions: None,
|
||||
|
|
@ -721,7 +723,7 @@ mod runs {
|
|||
repo: "web-dashboard".into(),
|
||||
title: "Migrate to React Router v7".into(),
|
||||
workflow: "implement".into(),
|
||||
status: RunListItemStatus::Working,
|
||||
status: BoardColumn::Working,
|
||||
number: None,
|
||||
additions: None,
|
||||
deletions: None,
|
||||
|
|
@ -739,7 +741,7 @@ mod runs {
|
|||
repo: "cli-tools".into(),
|
||||
title: "Fix config parsing for nested values".into(),
|
||||
workflow: "fix_build".into(),
|
||||
status: RunListItemStatus::Working,
|
||||
status: BoardColumn::Working,
|
||||
number: None,
|
||||
additions: None,
|
||||
deletions: None,
|
||||
|
|
@ -757,7 +759,7 @@ mod runs {
|
|||
repo: "api-server".into(),
|
||||
title: "Update OpenAPI spec for v3".into(),
|
||||
workflow: "expand".into(),
|
||||
status: RunListItemStatus::Pending,
|
||||
status: BoardColumn::Pending,
|
||||
number: None,
|
||||
additions: Some(567),
|
||||
deletions: Some(234),
|
||||
|
|
@ -775,7 +777,7 @@ mod runs {
|
|||
repo: "shared-types".into(),
|
||||
title: "Add pipeline event types".into(),
|
||||
workflow: "implement".into(),
|
||||
status: RunListItemStatus::Pending,
|
||||
status: BoardColumn::Pending,
|
||||
number: None,
|
||||
additions: Some(145),
|
||||
deletions: Some(23),
|
||||
|
|
@ -793,7 +795,7 @@ mod runs {
|
|||
repo: "web-dashboard".into(),
|
||||
title: "Add dark mode toggle".into(),
|
||||
workflow: "implement".into(),
|
||||
status: RunListItemStatus::Review,
|
||||
status: BoardColumn::Review,
|
||||
number: Some(889),
|
||||
additions: Some(234),
|
||||
deletions: Some(67),
|
||||
|
|
@ -847,7 +849,7 @@ mod runs {
|
|||
repo: "infrastructure".into(),
|
||||
title: "Terraform module for Redis cluster".into(),
|
||||
workflow: "implement".into(),
|
||||
status: RunListItemStatus::Review,
|
||||
status: BoardColumn::Review,
|
||||
number: Some(156),
|
||||
additions: Some(412),
|
||||
deletions: Some(0),
|
||||
|
|
@ -891,7 +893,7 @@ mod runs {
|
|||
repo: "api-server".into(),
|
||||
title: "Implement webhook retry logic".into(),
|
||||
workflow: "implement".into(),
|
||||
status: RunListItemStatus::Merge,
|
||||
status: BoardColumn::Merge,
|
||||
number: Some(1249),
|
||||
additions: Some(189),
|
||||
deletions: Some(45),
|
||||
|
|
@ -970,7 +972,7 @@ mod runs {
|
|||
repo: "cli-tools".into(),
|
||||
title: "Add --verbose flag to run command".into(),
|
||||
workflow: "expand".into(),
|
||||
status: RunListItemStatus::Merge,
|
||||
status: BoardColumn::Merge,
|
||||
number: Some(430),
|
||||
additions: Some(56),
|
||||
deletions: Some(12),
|
||||
|
|
@ -1019,7 +1021,7 @@ mod runs {
|
|||
repo: "shared-types".into(),
|
||||
title: "Export utility type helpers".into(),
|
||||
workflow: "sync_drift".into(),
|
||||
status: RunListItemStatus::Merge,
|
||||
status: BoardColumn::Merge,
|
||||
number: Some(76),
|
||||
additions: Some(34),
|
||||
deletions: Some(8),
|
||||
|
|
@ -1203,6 +1205,31 @@ mod runs {
|
|||
super::verifications::run_verifications()
|
||||
}
|
||||
|
||||
pub fn questions() -> Vec<ApiQuestion> {
|
||||
vec![
|
||||
ApiQuestion {
|
||||
id: "q-001".into(),
|
||||
text: "Should we proceed with the proposed changes?".into(),
|
||||
question_type: QuestionType::YesNo,
|
||||
options: vec![
|
||||
ApiQuestionOption { key: "yes".into(), label: "Yes".into() },
|
||||
ApiQuestionOption { key: "no".into(), label: "No".into() },
|
||||
],
|
||||
allow_freeform: false,
|
||||
},
|
||||
ApiQuestion {
|
||||
id: "q-002".into(),
|
||||
text: "Which approach do you prefer for the migration?".into(),
|
||||
question_type: QuestionType::MultipleChoice,
|
||||
options: vec![
|
||||
ApiQuestionOption { key: "incremental".into(), label: "Incremental migration".into() },
|
||||
ApiQuestionOption { key: "big_bang".into(), label: "Big-bang rewrite".into() },
|
||||
],
|
||||
allow_freeform: true,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
pub fn configuration() -> String {
|
||||
r#"version = 1
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ use arc_workflows::interviewer::{Answer, Interviewer, QuestionType};
|
|||
pub use arc_types::{
|
||||
ApiQuestion, ApiQuestionOption, PaginatedRunList, PaginationMeta,
|
||||
QuestionType as ApiQuestionType, RunStatus, RunStatusResponse, StartRunRequest,
|
||||
StartRunResponse, SubmitAnswerRequest, SubmitAnswerResponse,
|
||||
SubmitAnswerRequest,
|
||||
};
|
||||
|
||||
fn default_page_limit() -> u32 {
|
||||
|
|
@ -451,9 +451,11 @@ async fn start_run(
|
|||
|
||||
(
|
||||
StatusCode::CREATED,
|
||||
Json(StartRunResponse {
|
||||
Json(RunStatusResponse {
|
||||
id: run_id,
|
||||
status: RunStatus::Queued,
|
||||
error: None,
|
||||
queue_position: None,
|
||||
created_at,
|
||||
}),
|
||||
)
|
||||
|
|
@ -773,10 +775,26 @@ async fn submit_answer(
|
|||
}
|
||||
}
|
||||
}
|
||||
None => Answer::text(req.value),
|
||||
None => match req.value {
|
||||
Some(v) => Answer::text(v),
|
||||
None => {
|
||||
return ApiError::bad_request(
|
||||
"Either value or selected_option_key is required.",
|
||||
)
|
||||
.into_response();
|
||||
}
|
||||
},
|
||||
};
|
||||
let accepted = interviewer.submit_answer(&qid, answer);
|
||||
(StatusCode::OK, Json(SubmitAnswerResponse { accepted })).into_response()
|
||||
if accepted {
|
||||
StatusCode::NO_CONTENT.into_response()
|
||||
} else {
|
||||
ApiError::new(
|
||||
StatusCode::CONFLICT,
|
||||
"Question no longer exists or was already answered.",
|
||||
)
|
||||
.into_response()
|
||||
}
|
||||
}
|
||||
None => ApiError::not_found("Run not found.").into_response(),
|
||||
}
|
||||
|
|
@ -852,7 +870,18 @@ async fn cancel_run(
|
|||
Some(managed_run) => match managed_run.status {
|
||||
RunStatus::Queued => {
|
||||
managed_run.status = RunStatus::Cancelled;
|
||||
(StatusCode::OK, Json(serde_json::json!({"cancelled": true}))).into_response()
|
||||
let created_at = managed_run.created_at;
|
||||
(
|
||||
StatusCode::OK,
|
||||
Json(RunStatusResponse {
|
||||
id: id.clone(),
|
||||
status: RunStatus::Cancelled,
|
||||
error: None,
|
||||
queue_position: None,
|
||||
created_at,
|
||||
}),
|
||||
)
|
||||
.into_response()
|
||||
}
|
||||
RunStatus::Starting | RunStatus::Running => {
|
||||
if let Some(token) = &managed_run.cancel_token {
|
||||
|
|
@ -862,7 +891,18 @@ async fn cancel_run(
|
|||
let _ = cancel_tx.send(());
|
||||
}
|
||||
managed_run.status = RunStatus::Cancelled;
|
||||
(StatusCode::OK, Json(serde_json::json!({"cancelled": true}))).into_response()
|
||||
let created_at = managed_run.created_at;
|
||||
(
|
||||
StatusCode::OK,
|
||||
Json(RunStatusResponse {
|
||||
id: id.clone(),
|
||||
status: RunStatus::Cancelled,
|
||||
error: None,
|
||||
queue_position: None,
|
||||
created_at,
|
||||
}),
|
||||
)
|
||||
.into_response()
|
||||
}
|
||||
_ => ApiError::new(StatusCode::CONFLICT, "Run is not cancellable.").into_response(),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -514,9 +514,7 @@ mod server_lifecycle {
|
|||
))
|
||||
.unwrap();
|
||||
let response = app.clone().oneshot(req).await.unwrap();
|
||||
assert_eq!(response.status(), StatusCode::OK);
|
||||
let body = body_json(response.into_body()).await;
|
||||
assert_eq!(body["accepted"], true);
|
||||
assert_eq!(response.status(), StatusCode::NO_CONTENT);
|
||||
|
||||
// 4. Poll until completed
|
||||
let mut final_status = String::new();
|
||||
|
|
@ -593,7 +591,7 @@ mod server_lifecycle {
|
|||
let response = app.clone().oneshot(req).await.unwrap();
|
||||
assert_eq!(response.status(), StatusCode::OK);
|
||||
let body = body_json(response.into_body()).await;
|
||||
assert_eq!(body["cancelled"], true);
|
||||
assert_eq!(body["status"], "cancelled");
|
||||
|
||||
// Verify status is cancelled
|
||||
let req = Request::builder()
|
||||
|
|
|
|||
|
|
@ -100,6 +100,18 @@ const ENDPOINTS: &[PaginatedEndpoint] = &[
|
|||
path: "/runs/run-1/stages/detect-drift/turns",
|
||||
name: "listStageTurns",
|
||||
},
|
||||
PaginatedEndpoint {
|
||||
path: "/runs/run-1/questions",
|
||||
name: "listRunQuestions",
|
||||
},
|
||||
PaginatedEndpoint {
|
||||
path: "/runs/run-1/stages",
|
||||
name: "listRunStages",
|
||||
},
|
||||
PaginatedEndpoint {
|
||||
path: "/runs/run-1/verifications",
|
||||
name: "listRunVerifications",
|
||||
},
|
||||
];
|
||||
|
||||
#[tokio::test]
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/StartRunResponse"
|
||||
$ref: "#/components/schemas/RunStatusResponse"
|
||||
"400":
|
||||
description: Invalid DOT source
|
||||
content:
|
||||
|
|
@ -183,7 +183,7 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/CancelRunResponse"
|
||||
$ref: "#/components/schemas/RunStatusResponse"
|
||||
"404":
|
||||
description: Run not found
|
||||
content:
|
||||
|
|
@ -199,7 +199,7 @@ paths:
|
|||
|
||||
/runs/{id}/graph:
|
||||
get:
|
||||
operationId: retrieveRunSvg
|
||||
operationId: retrieveRunGraph
|
||||
tags: [Runs]
|
||||
summary: Render SVG
|
||||
description: Renders the workflow graph as an SVG image using Graphviz.
|
||||
|
|
@ -238,7 +238,11 @@ paths:
|
|||
description: Checkpoint data (null if not yet available)
|
||||
content:
|
||||
application/json:
|
||||
schema: {}
|
||||
schema:
|
||||
oneOf:
|
||||
- type: object
|
||||
additionalProperties: true
|
||||
- type: "null"
|
||||
"404":
|
||||
description: Run not found
|
||||
content:
|
||||
|
|
@ -261,6 +265,7 @@ paths:
|
|||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
additionalProperties: true
|
||||
"404":
|
||||
description: Run not found
|
||||
content:
|
||||
|
|
@ -304,6 +309,8 @@ paths:
|
|||
description: Returns pending human-in-the-loop questions for a run. Questions are generated when the workflow needs user input to proceed.
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/RunId"
|
||||
- $ref: "#/components/parameters/PageLimit"
|
||||
- $ref: "#/components/parameters/PageOffset"
|
||||
responses:
|
||||
"200":
|
||||
description: Array of pending questions
|
||||
|
|
@ -334,12 +341,8 @@ paths:
|
|||
schema:
|
||||
$ref: "#/components/schemas/SubmitAnswerRequest"
|
||||
responses:
|
||||
"200":
|
||||
description: Answer accepted or rejected
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/SubmitAnswerResponse"
|
||||
"204":
|
||||
description: Answer accepted
|
||||
"400":
|
||||
description: Invalid option key
|
||||
content:
|
||||
|
|
@ -352,6 +355,12 @@ paths:
|
|||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
"409":
|
||||
description: Question no longer exists or already answered
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ErrorResponse"
|
||||
|
||||
/runs/{id}/retro:
|
||||
get:
|
||||
|
|
@ -366,7 +375,11 @@ paths:
|
|||
description: Retro data (null if not yet available)
|
||||
content:
|
||||
application/json:
|
||||
schema: {}
|
||||
schema:
|
||||
oneOf:
|
||||
- type: object
|
||||
additionalProperties: true
|
||||
- type: "null"
|
||||
"404":
|
||||
description: Run not found
|
||||
content:
|
||||
|
|
@ -382,6 +395,8 @@ paths:
|
|||
description: Returns the ordered list of stages in a run's workflow graph with their current status and timing.
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/RunId"
|
||||
- $ref: "#/components/parameters/PageLimit"
|
||||
- $ref: "#/components/parameters/PageOffset"
|
||||
responses:
|
||||
"200":
|
||||
description: Array of run stages
|
||||
|
|
@ -423,7 +438,7 @@ paths:
|
|||
|
||||
/runs/{id}/compare:
|
||||
get:
|
||||
operationId: listRunCompare
|
||||
operationId: retrieveRunDiff
|
||||
tags: [Run Outputs]
|
||||
summary: List Run Compare
|
||||
description: Returns file-level diffs produced by the run, optionally filtered to a specific checkpoint.
|
||||
|
|
@ -474,6 +489,8 @@ paths:
|
|||
description: Returns verification results for a run, organized by category with individual control statuses.
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/RunId"
|
||||
- $ref: "#/components/parameters/PageLimit"
|
||||
- $ref: "#/components/parameters/PageOffset"
|
||||
responses:
|
||||
"200":
|
||||
description: Array of verification categories with controls
|
||||
|
|
@ -527,10 +544,6 @@ paths:
|
|||
responses:
|
||||
"202":
|
||||
description: Steering accepted for processing
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/SteerRunResponse"
|
||||
"404":
|
||||
description: Run not found
|
||||
content:
|
||||
|
|
@ -553,8 +566,8 @@ paths:
|
|||
schema:
|
||||
$ref: "#/components/schemas/PreviewUrlRequest"
|
||||
responses:
|
||||
"200":
|
||||
description: Preview URL generated
|
||||
"201":
|
||||
description: Preview URL created
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
|
|
@ -643,7 +656,7 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/StartRunResponse"
|
||||
$ref: "#/components/schemas/RunStatusResponse"
|
||||
"404":
|
||||
description: Workflow not found
|
||||
content:
|
||||
|
|
@ -1383,26 +1396,6 @@ components:
|
|||
description: DOT language source defining the workflow graph.
|
||||
example: 'digraph { start [shape=Mdiamond]; exit [shape=Msquare]; start -> exit }'
|
||||
|
||||
StartRunResponse:
|
||||
description: Response returned after successfully queuing a new run.
|
||||
type: object
|
||||
required:
|
||||
- id
|
||||
- status
|
||||
- created_at
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: Unique run identifier (ULID).
|
||||
example: 01JNQVR7M0EJ5GKAT2SC4ERS1Z
|
||||
status:
|
||||
$ref: "#/components/schemas/RunStatus"
|
||||
created_at:
|
||||
type: string
|
||||
format: date-time
|
||||
description: Timestamp when the run was created.
|
||||
example: "2026-03-06T14:30:00Z"
|
||||
|
||||
RunStatusResponse:
|
||||
description: Current status of a run with optional error and queue position.
|
||||
type: object
|
||||
|
|
@ -1431,28 +1424,6 @@ components:
|
|||
description: Timestamp when the run was created.
|
||||
example: "2026-03-06T14:30:00Z"
|
||||
|
||||
CancelRunResponse:
|
||||
description: Response returned after cancelling a run.
|
||||
type: object
|
||||
required:
|
||||
- cancelled
|
||||
properties:
|
||||
cancelled:
|
||||
type: boolean
|
||||
description: Whether the cancellation was successful.
|
||||
example: true
|
||||
|
||||
SteerRunResponse:
|
||||
description: Acknowledgement that the steering guidance was accepted for delivery.
|
||||
type: object
|
||||
required:
|
||||
- accepted
|
||||
properties:
|
||||
accepted:
|
||||
type: boolean
|
||||
description: Whether the steering guidance was accepted.
|
||||
example: true
|
||||
|
||||
ApiQuestionOption:
|
||||
description: A selectable option for a multiple-choice or multi-select question.
|
||||
type: object
|
||||
|
|
@ -1512,8 +1483,6 @@ components:
|
|||
SubmitAnswerRequest:
|
||||
description: Request body for submitting an answer to a pending question.
|
||||
type: object
|
||||
required:
|
||||
- value
|
||||
properties:
|
||||
value:
|
||||
type: string
|
||||
|
|
@ -1524,17 +1493,6 @@ components:
|
|||
description: Key of the selected option (for multiple-choice questions).
|
||||
example: option_a
|
||||
|
||||
SubmitAnswerResponse:
|
||||
description: Response indicating whether the submitted answer was accepted.
|
||||
type: object
|
||||
required:
|
||||
- accepted
|
||||
properties:
|
||||
accepted:
|
||||
type: boolean
|
||||
description: Whether the answer was accepted. Returns false if the question no longer exists.
|
||||
example: true
|
||||
|
||||
ErrorResponseEntry:
|
||||
description: A single error entry in an error response.
|
||||
type: object
|
||||
|
|
@ -1570,7 +1528,7 @@ components:
|
|||
|
||||
# ── Run Board Schemas ────────────────────────────────────────────────
|
||||
|
||||
RunListItemStatus:
|
||||
BoardColumn:
|
||||
description: Board column status for a run in the list view.
|
||||
type: string
|
||||
enum:
|
||||
|
|
@ -1635,7 +1593,7 @@ components:
|
|||
description: Slug of the workflow that produced this run.
|
||||
example: implement
|
||||
status:
|
||||
$ref: "#/components/schemas/RunListItemStatus"
|
||||
$ref: "#/components/schemas/BoardColumn"
|
||||
number:
|
||||
type: integer
|
||||
description: Pull request number, if the run has opened a PR.
|
||||
|
|
@ -2133,8 +2091,6 @@ components:
|
|||
description: Request body for sending inline steering guidance to a running agent.
|
||||
type: object
|
||||
required:
|
||||
- file
|
||||
- line
|
||||
- guidance
|
||||
properties:
|
||||
file:
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ models/api-question-option.ts
|
|||
models/api-question.ts
|
||||
models/assistant-stage-turn.ts
|
||||
models/assistant-turn.ts
|
||||
models/board-column.ts
|
||||
models/branch.ts
|
||||
models/cancel-run-response.ts
|
||||
models/check-run-status.ts
|
||||
models/check-run.ts
|
||||
models/control-detail.ts
|
||||
|
|
@ -66,7 +66,6 @@ models/retro-stats.ts
|
|||
models/root-response-urls.ts
|
||||
models/root-response.ts
|
||||
models/run-compare.ts
|
||||
models/run-list-item-status.ts
|
||||
models/run-list-item.ts
|
||||
models/run-stage.ts
|
||||
models/run-status-response.ts
|
||||
|
|
@ -89,11 +88,8 @@ models/smoothness-rating.ts
|
|||
models/stage-status.ts
|
||||
models/stage-turn.ts
|
||||
models/start-run-request.ts
|
||||
models/start-run-response.ts
|
||||
models/steer-request.ts
|
||||
models/steer-run-response.ts
|
||||
models/submit-answer-request.ts
|
||||
models/submit-answer-response.ts
|
||||
models/system-stage-turn.ts
|
||||
models/tool-stage-turn.ts
|
||||
models/tool-turn.ts
|
||||
|
|
|
|||
|
|
@ -32,11 +32,7 @@ import type { PreviewUrlResponse } from '../models';
|
|||
// @ts-ignore
|
||||
import type { SteerRequest } from '../models';
|
||||
// @ts-ignore
|
||||
import type { SteerRunResponse } from '../models';
|
||||
// @ts-ignore
|
||||
import type { SubmitAnswerRequest } from '../models';
|
||||
// @ts-ignore
|
||||
import type { SubmitAnswerResponse } from '../models';
|
||||
/**
|
||||
* HumanInTheLoopApi - axios parameter creator
|
||||
*/
|
||||
|
|
@ -92,10 +88,12 @@ export const HumanInTheLoopApiAxiosParamCreator = function (configuration?: Conf
|
|||
* Returns pending human-in-the-loop questions for a run. Questions are generated when the workflow needs user input to proceed.
|
||||
* @summary List Run Questions
|
||||
* @param {string} id Unique run identifier (ULID).
|
||||
* @param {number} [pageLimit] Maximum number of items to return per page.
|
||||
* @param {number} [pageOffset] Number of items to skip before returning results.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listRunQuestions: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
listRunQuestions: async (id: string, pageLimit?: number, pageOffset?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('listRunQuestions', 'id', id)
|
||||
const localVarPath = `/runs/{id}/questions`
|
||||
|
|
@ -118,6 +116,14 @@ export const HumanInTheLoopApiAxiosParamCreator = function (configuration?: Conf
|
|||
// http bearer authentication required
|
||||
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
||||
|
||||
if (pageLimit !== undefined) {
|
||||
localVarQueryParameter['page[limit]'] = pageLimit;
|
||||
}
|
||||
|
||||
if (pageOffset !== undefined) {
|
||||
localVarQueryParameter['page[offset]'] = pageOffset;
|
||||
}
|
||||
|
||||
localVarHeaderParameter['Accept'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
|
|
@ -252,11 +258,13 @@ export const HumanInTheLoopApiFp = function(configuration?: Configuration) {
|
|||
* Returns pending human-in-the-loop questions for a run. Questions are generated when the workflow needs user input to proceed.
|
||||
* @summary List Run Questions
|
||||
* @param {string} id Unique run identifier (ULID).
|
||||
* @param {number} [pageLimit] Maximum number of items to return per page.
|
||||
* @param {number} [pageOffset] Number of items to skip before returning results.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listRunQuestions(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaginatedApiQuestionList>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.listRunQuestions(id, options);
|
||||
async listRunQuestions(id: string, pageLimit?: number, pageOffset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaginatedApiQuestionList>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.listRunQuestions(id, pageLimit, pageOffset, 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);
|
||||
|
|
@ -269,7 +277,7 @@ export const HumanInTheLoopApiFp = function(configuration?: Configuration) {
|
|||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async steerRun(id: string, steerRequest: SteerRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SteerRunResponse>> {
|
||||
async steerRun(id: string, steerRequest: SteerRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.steerRun(id, steerRequest, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['HumanInTheLoopApi.steerRun']?.[localVarOperationServerIndex]?.url;
|
||||
|
|
@ -284,7 +292,7 @@ export const HumanInTheLoopApiFp = function(configuration?: Configuration) {
|
|||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async submitRunAnswer(id: string, qid: string, submitAnswerRequest: SubmitAnswerRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SubmitAnswerResponse>> {
|
||||
async submitRunAnswer(id: string, qid: string, submitAnswerRequest: SubmitAnswerRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.submitRunAnswer(id, qid, submitAnswerRequest, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['HumanInTheLoopApi.submitRunAnswer']?.[localVarOperationServerIndex]?.url;
|
||||
|
|
@ -314,11 +322,13 @@ export const HumanInTheLoopApiFactory = function (configuration?: Configuration,
|
|||
* Returns pending human-in-the-loop questions for a run. Questions are generated when the workflow needs user input to proceed.
|
||||
* @summary List Run Questions
|
||||
* @param {string} id Unique run identifier (ULID).
|
||||
* @param {number} [pageLimit] Maximum number of items to return per page.
|
||||
* @param {number} [pageOffset] Number of items to skip before returning results.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listRunQuestions(id: string, options?: RawAxiosRequestConfig): AxiosPromise<PaginatedApiQuestionList> {
|
||||
return localVarFp.listRunQuestions(id, options).then((request) => request(axios, basePath));
|
||||
listRunQuestions(id: string, pageLimit?: number, pageOffset?: number, options?: RawAxiosRequestConfig): AxiosPromise<PaginatedApiQuestionList> {
|
||||
return localVarFp.listRunQuestions(id, pageLimit, pageOffset, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Sends inline guidance to a running agent, targeting a specific file and line. The guidance is delivered asynchronously.
|
||||
|
|
@ -328,7 +338,7 @@ export const HumanInTheLoopApiFactory = function (configuration?: Configuration,
|
|||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
steerRun(id: string, steerRequest: SteerRequest, options?: RawAxiosRequestConfig): AxiosPromise<SteerRunResponse> {
|
||||
steerRun(id: string, steerRequest: SteerRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
||||
return localVarFp.steerRun(id, steerRequest, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
|
|
@ -340,7 +350,7 @@ export const HumanInTheLoopApiFactory = function (configuration?: Configuration,
|
|||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
submitRunAnswer(id: string, qid: string, submitAnswerRequest: SubmitAnswerRequest, options?: RawAxiosRequestConfig): AxiosPromise<SubmitAnswerResponse> {
|
||||
submitRunAnswer(id: string, qid: string, submitAnswerRequest: SubmitAnswerRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
|
||||
return localVarFp.submitRunAnswer(id, qid, submitAnswerRequest, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
|
|
@ -366,11 +376,13 @@ export class HumanInTheLoopApi extends BaseAPI {
|
|||
* Returns pending human-in-the-loop questions for a run. Questions are generated when the workflow needs user input to proceed.
|
||||
* @summary List Run Questions
|
||||
* @param {string} id Unique run identifier (ULID).
|
||||
* @param {number} [pageLimit] Maximum number of items to return per page.
|
||||
* @param {number} [pageOffset] Number of items to skip before returning results.
|
||||
* @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));
|
||||
public listRunQuestions(id: string, pageLimit?: number, pageOffset?: number, options?: RawAxiosRequestConfig) {
|
||||
return HumanInTheLoopApiFp(this.configuration).listRunQuestions(id, pageLimit, pageOffset, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ export const RetrosApiFp = function(configuration?: Configuration) {
|
|||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async retrieveRetro(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
|
||||
async retrieveRetro(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: any; }>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveRetro(id, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['RetrosApi.retrieveRetro']?.[localVarOperationServerIndex]?.url;
|
||||
|
|
@ -181,7 +181,7 @@ export const RetrosApiFactory = function (configuration?: Configuration, basePat
|
|||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
retrieveRetro(id: string, options?: RawAxiosRequestConfig): AxiosPromise<any> {
|
||||
retrieveRetro(id: string, options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: any; }> {
|
||||
return localVarFp.retrieveRetro(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -36,10 +36,12 @@ export const RunInternalsApiAxiosParamCreator = function (configuration?: Config
|
|||
* Returns the ordered list of stages in a run\'s workflow graph with their current status and timing.
|
||||
* @summary List Run Stages
|
||||
* @param {string} id Unique run identifier (ULID).
|
||||
* @param {number} [pageLimit] Maximum number of items to return per page.
|
||||
* @param {number} [pageOffset] Number of items to skip before returning results.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listRunStages: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
listRunStages: async (id: string, pageLimit?: number, pageOffset?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('listRunStages', 'id', id)
|
||||
const localVarPath = `/runs/{id}/stages`
|
||||
|
|
@ -62,6 +64,14 @@ export const RunInternalsApiAxiosParamCreator = function (configuration?: Config
|
|||
// http bearer authentication required
|
||||
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
||||
|
||||
if (pageLimit !== undefined) {
|
||||
localVarQueryParameter['page[limit]'] = pageLimit;
|
||||
}
|
||||
|
||||
if (pageOffset !== undefined) {
|
||||
localVarQueryParameter['page[offset]'] = pageOffset;
|
||||
}
|
||||
|
||||
localVarHeaderParameter['Accept'] = 'application/json';
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
|
|
@ -264,11 +274,13 @@ export const RunInternalsApiFp = function(configuration?: Configuration) {
|
|||
* Returns the ordered list of stages in a run\'s workflow graph with their current status and timing.
|
||||
* @summary List Run Stages
|
||||
* @param {string} id Unique run identifier (ULID).
|
||||
* @param {number} [pageLimit] Maximum number of items to return per page.
|
||||
* @param {number} [pageOffset] Number of items to skip before returning results.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listRunStages(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaginatedRunStageList>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.listRunStages(id, options);
|
||||
async listRunStages(id: string, pageLimit?: number, pageOffset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaginatedRunStageList>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.listRunStages(id, pageLimit, pageOffset, 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);
|
||||
|
|
@ -296,7 +308,7 @@ export const RunInternalsApiFp = function(configuration?: Configuration) {
|
|||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async retrieveRunCheckpoint(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
|
||||
async retrieveRunCheckpoint(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: any; }>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveRunCheckpoint(id, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['RunInternalsApi.retrieveRunCheckpoint']?.[localVarOperationServerIndex]?.url;
|
||||
|
|
@ -322,7 +334,7 @@ export const RunInternalsApiFp = function(configuration?: Configuration) {
|
|||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async retrieveRunContext(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
|
||||
async retrieveRunContext(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: any; }>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveRunContext(id, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['RunInternalsApi.retrieveRunContext']?.[localVarOperationServerIndex]?.url;
|
||||
|
|
@ -341,11 +353,13 @@ export const RunInternalsApiFactory = function (configuration?: Configuration, b
|
|||
* Returns the ordered list of stages in a run\'s workflow graph with their current status and timing.
|
||||
* @summary List Run Stages
|
||||
* @param {string} id Unique run identifier (ULID).
|
||||
* @param {number} [pageLimit] Maximum number of items to return per page.
|
||||
* @param {number} [pageOffset] Number of items to skip before returning results.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listRunStages(id: string, options?: RawAxiosRequestConfig): AxiosPromise<PaginatedRunStageList> {
|
||||
return localVarFp.listRunStages(id, options).then((request) => request(axios, basePath));
|
||||
listRunStages(id: string, pageLimit?: number, pageOffset?: number, options?: RawAxiosRequestConfig): AxiosPromise<PaginatedRunStageList> {
|
||||
return localVarFp.listRunStages(id, pageLimit, pageOffset, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Returns a paginated list of conversation turns within a specific stage, including system prompts, assistant responses, and tool invocations.
|
||||
|
|
@ -367,7 +381,7 @@ export const RunInternalsApiFactory = function (configuration?: Configuration, b
|
|||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
retrieveRunCheckpoint(id: string, options?: RawAxiosRequestConfig): AxiosPromise<any> {
|
||||
retrieveRunCheckpoint(id: string, options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: any; }> {
|
||||
return localVarFp.retrieveRunCheckpoint(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
|
|
@ -387,7 +401,7 @@ export const RunInternalsApiFactory = function (configuration?: Configuration, b
|
|||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
retrieveRunContext(id: string, options?: RawAxiosRequestConfig): AxiosPromise<object> {
|
||||
retrieveRunContext(id: string, options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: any; }> {
|
||||
return localVarFp.retrieveRunContext(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
|
|
@ -401,11 +415,13 @@ export class RunInternalsApi extends BaseAPI {
|
|||
* Returns the ordered list of stages in a run\'s workflow graph with their current status and timing.
|
||||
* @summary List Run Stages
|
||||
* @param {string} id Unique run identifier (ULID).
|
||||
* @param {number} [pageLimit] Maximum number of items to return per page.
|
||||
* @param {number} [pageOffset] Number of items to skip before returning results.
|
||||
* @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));
|
||||
public listRunStages(id: string, pageLimit?: number, pageOffset?: number, options?: RawAxiosRequestConfig) {
|
||||
return RunInternalsApiFp(this.configuration).listRunStages(id, pageLimit, pageOffset, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -34,6 +34,57 @@ import type { RunUsage } from '../models';
|
|||
*/
|
||||
export const RunOutputsApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
* Returns verification results for a run, organized by category with individual control statuses.
|
||||
* @summary List Run Verifications
|
||||
* @param {string} id Unique run identifier (ULID).
|
||||
* @param {number} [pageLimit] Maximum number of items to return per page.
|
||||
* @param {number} [pageOffset] Number of items to skip before returning results.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listRunVerifications: async (id: string, pageLimit?: number, pageOffset?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
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.
|
||||
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;
|
||||
|
||||
// authentication mTLS required
|
||||
await setApiKeyToObject(localVarHeaderParameter, "X-mTLS-Client-CN", configuration)
|
||||
|
||||
// authentication BearerAuth required
|
||||
// http bearer authentication required
|
||||
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
||||
|
||||
if (pageLimit !== undefined) {
|
||||
localVarQueryParameter['page[limit]'] = pageLimit;
|
||||
}
|
||||
|
||||
if (pageOffset !== undefined) {
|
||||
localVarQueryParameter['page[offset]'] = pageOffset;
|
||||
}
|
||||
|
||||
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,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Returns file-level diffs produced by the run, optionally filtered to a specific checkpoint.
|
||||
* @summary List Run Compare
|
||||
|
|
@ -42,9 +93,9 @@ export const RunOutputsApiAxiosParamCreator = function (configuration?: Configur
|
|||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listRunCompare: async (id: string, checkpoint?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
retrieveRunDiff: async (id: string, checkpoint?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('listRunCompare', 'id', id)
|
||||
assertParamExists('retrieveRunDiff', 'id', id)
|
||||
const localVarPath = `/runs/{id}/compare`
|
||||
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
|
|
@ -80,47 +131,6 @@ export const RunOutputsApiAxiosParamCreator = function (configuration?: Configur
|
|||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Returns verification results for a run, organized by category with individual control statuses.
|
||||
* @summary List Run Verifications
|
||||
* @param {string} id Unique run identifier (ULID).
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listRunVerifications: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
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.
|
||||
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;
|
||||
|
||||
// authentication mTLS required
|
||||
await setApiKeyToObject(localVarHeaderParameter, "X-mTLS-Client-CN", configuration)
|
||||
|
||||
// authentication BearerAuth required
|
||||
// http bearer authentication required
|
||||
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
||||
|
||||
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,
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Returns token and cost usage broken down by stage and model for a specific run.
|
||||
* @summary Retrieve Run Usage
|
||||
|
|
@ -171,6 +181,21 @@ export const RunOutputsApiAxiosParamCreator = function (configuration?: Configur
|
|||
export const RunOutputsApiFp = function(configuration?: Configuration) {
|
||||
const localVarAxiosParamCreator = RunOutputsApiAxiosParamCreator(configuration)
|
||||
return {
|
||||
/**
|
||||
* Returns verification results for a run, organized by category with individual control statuses.
|
||||
* @summary List Run Verifications
|
||||
* @param {string} id Unique run identifier (ULID).
|
||||
* @param {number} [pageLimit] Maximum number of items to return per page.
|
||||
* @param {number} [pageOffset] Number of items to skip before returning results.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listRunVerifications(id: string, pageLimit?: number, pageOffset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaginatedRunVerificationList>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.listRunVerifications(id, pageLimit, pageOffset, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['RunOutputsApi.listRunVerifications']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
* Returns file-level diffs produced by the run, optionally filtered to a specific checkpoint.
|
||||
* @summary List Run Compare
|
||||
|
|
@ -179,23 +204,10 @@ export const RunOutputsApiFp = function(configuration?: Configuration) {
|
|||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listRunCompare(id: string, checkpoint?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RunCompare>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.listRunCompare(id, checkpoint, options);
|
||||
async retrieveRunDiff(id: string, checkpoint?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RunCompare>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveRunDiff(id, checkpoint, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['RunOutputsApi.listRunCompare']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
* Returns verification results for a run, organized by category with individual control statuses.
|
||||
* @summary List Run Verifications
|
||||
* @param {string} id Unique run identifier (ULID).
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async listRunVerifications(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PaginatedRunVerificationList>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.listRunVerifications(id, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['RunOutputsApi.listRunVerifications']?.[localVarOperationServerIndex]?.url;
|
||||
const localVarOperationServerBasePath = operationServerMap['RunOutputsApi.retrieveRunDiff']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
|
|
@ -220,6 +232,18 @@ export const RunOutputsApiFp = function(configuration?: Configuration) {
|
|||
export const RunOutputsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
const localVarFp = RunOutputsApiFp(configuration)
|
||||
return {
|
||||
/**
|
||||
* Returns verification results for a run, organized by category with individual control statuses.
|
||||
* @summary List Run Verifications
|
||||
* @param {string} id Unique run identifier (ULID).
|
||||
* @param {number} [pageLimit] Maximum number of items to return per page.
|
||||
* @param {number} [pageOffset] Number of items to skip before returning results.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listRunVerifications(id: string, pageLimit?: number, pageOffset?: number, options?: RawAxiosRequestConfig): AxiosPromise<PaginatedRunVerificationList> {
|
||||
return localVarFp.listRunVerifications(id, pageLimit, pageOffset, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Returns file-level diffs produced by the run, optionally filtered to a specific checkpoint.
|
||||
* @summary List Run Compare
|
||||
|
|
@ -228,18 +252,8 @@ export const RunOutputsApiFactory = function (configuration?: Configuration, bas
|
|||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listRunCompare(id: string, checkpoint?: string, options?: RawAxiosRequestConfig): AxiosPromise<RunCompare> {
|
||||
return localVarFp.listRunCompare(id, checkpoint, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Returns verification results for a run, organized by category with individual control statuses.
|
||||
* @summary List Run Verifications
|
||||
* @param {string} id Unique run identifier (ULID).
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
listRunVerifications(id: string, options?: RawAxiosRequestConfig): AxiosPromise<PaginatedRunVerificationList> {
|
||||
return localVarFp.listRunVerifications(id, options).then((request) => request(axios, basePath));
|
||||
retrieveRunDiff(id: string, checkpoint?: string, options?: RawAxiosRequestConfig): AxiosPromise<RunCompare> {
|
||||
return localVarFp.retrieveRunDiff(id, checkpoint, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Returns token and cost usage broken down by stage and model for a specific run.
|
||||
|
|
@ -258,6 +272,19 @@ export const RunOutputsApiFactory = function (configuration?: Configuration, bas
|
|||
* RunOutputsApi - object-oriented interface
|
||||
*/
|
||||
export class RunOutputsApi extends BaseAPI {
|
||||
/**
|
||||
* Returns verification results for a run, organized by category with individual control statuses.
|
||||
* @summary List Run Verifications
|
||||
* @param {string} id Unique run identifier (ULID).
|
||||
* @param {number} [pageLimit] Maximum number of items to return per page.
|
||||
* @param {number} [pageOffset] Number of items to skip before returning results.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public listRunVerifications(id: string, pageLimit?: number, pageOffset?: number, options?: RawAxiosRequestConfig) {
|
||||
return RunOutputsApiFp(this.configuration).listRunVerifications(id, pageLimit, pageOffset, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns file-level diffs produced by the run, optionally filtered to a specific checkpoint.
|
||||
* @summary List Run Compare
|
||||
|
|
@ -266,19 +293,8 @@ export class RunOutputsApi extends BaseAPI {
|
|||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public listRunCompare(id: string, checkpoint?: string, options?: RawAxiosRequestConfig) {
|
||||
return RunOutputsApiFp(this.configuration).listRunCompare(id, checkpoint, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns verification results for a run, organized by category with individual control statuses.
|
||||
* @summary List Run Verifications
|
||||
* @param {string} id Unique run identifier (ULID).
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public listRunVerifications(id: string, options?: RawAxiosRequestConfig) {
|
||||
return RunOutputsApiFp(this.configuration).listRunVerifications(id, options).then((request) => request(this.axios, this.basePath));
|
||||
public retrieveRunDiff(id: string, checkpoint?: string, options?: RawAxiosRequestConfig) {
|
||||
return RunOutputsApiFp(this.configuration).retrieveRunDiff(id, checkpoint, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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 { CancelRunResponse } from '../models';
|
||||
// @ts-ignore
|
||||
import type { ErrorResponse } from '../models';
|
||||
// @ts-ignore
|
||||
import type { PaginatedRunList } from '../models';
|
||||
|
|
@ -31,8 +29,6 @@ import type { PaginatedRunList } from '../models';
|
|||
import type { RunStatusResponse } from '../models';
|
||||
// @ts-ignore
|
||||
import type { StartRunRequest } from '../models';
|
||||
// @ts-ignore
|
||||
import type { StartRunResponse } from '../models';
|
||||
/**
|
||||
* RunsApi - axios parameter creator
|
||||
*/
|
||||
|
|
@ -174,9 +170,9 @@ export const RunsApiAxiosParamCreator = function (configuration?: Configuration)
|
|||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
retrieveRunSvg: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
retrieveRunGraph: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('retrieveRunSvg', 'id', id)
|
||||
assertParamExists('retrieveRunGraph', '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.
|
||||
|
|
@ -307,7 +303,7 @@ export const RunsApiFp = function(configuration?: Configuration) {
|
|||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async cancelRun(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CancelRunResponse>> {
|
||||
async cancelRun(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RunStatusResponse>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.cancelRun(id, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['RunsApi.cancelRun']?.[localVarOperationServerIndex]?.url;
|
||||
|
|
@ -347,10 +343,10 @@ export const RunsApiFp = function(configuration?: Configuration) {
|
|||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async retrieveRunSvg(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveRunSvg(id, options);
|
||||
async retrieveRunGraph(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveRunGraph(id, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['RunsApi.retrieveRunSvg']?.[localVarOperationServerIndex]?.url;
|
||||
const localVarOperationServerBasePath = operationServerMap['RunsApi.retrieveRunGraph']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
/**
|
||||
|
|
@ -360,7 +356,7 @@ export const RunsApiFp = function(configuration?: Configuration) {
|
|||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async startRun(startRunRequest: StartRunRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<StartRunResponse>> {
|
||||
async startRun(startRunRequest: StartRunRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RunStatusResponse>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.startRun(startRunRequest, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['RunsApi.startRun']?.[localVarOperationServerIndex]?.url;
|
||||
|
|
@ -395,7 +391,7 @@ export const RunsApiFactory = function (configuration?: Configuration, basePath?
|
|||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
cancelRun(id: string, options?: RawAxiosRequestConfig): AxiosPromise<CancelRunResponse> {
|
||||
cancelRun(id: string, options?: RawAxiosRequestConfig): AxiosPromise<RunStatusResponse> {
|
||||
return localVarFp.cancelRun(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
|
|
@ -426,8 +422,8 @@ export const RunsApiFactory = function (configuration?: Configuration, basePath?
|
|||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
retrieveRunSvg(id: string, options?: RawAxiosRequestConfig): AxiosPromise<string> {
|
||||
return localVarFp.retrieveRunSvg(id, options).then((request) => request(axios, basePath));
|
||||
retrieveRunGraph(id: string, options?: RawAxiosRequestConfig): AxiosPromise<string> {
|
||||
return localVarFp.retrieveRunGraph(id, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
* Queues a new workflow run from a DOT graph source. The run is created in `queued` status and will be picked up by the scheduler.
|
||||
|
|
@ -436,7 +432,7 @@ export const RunsApiFactory = function (configuration?: Configuration, basePath?
|
|||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
startRun(startRunRequest: StartRunRequest, options?: RawAxiosRequestConfig): AxiosPromise<StartRunResponse> {
|
||||
startRun(startRunRequest: StartRunRequest, options?: RawAxiosRequestConfig): AxiosPromise<RunStatusResponse> {
|
||||
return localVarFp.startRun(startRunRequest, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
|
|
@ -497,8 +493,8 @@ export class RunsApi extends BaseAPI {
|
|||
* @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));
|
||||
public retrieveRunGraph(id: string, options?: RawAxiosRequestConfig) {
|
||||
return RunsApiFp(this.configuration).retrieveRunGraph(id, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,134 +0,0 @@
|
|||
/* 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 { PreviewUrlRequest } from '../models';
|
||||
// @ts-ignore
|
||||
import type { PreviewUrlResponse } from '../models';
|
||||
/**
|
||||
* SandboxApi - axios parameter creator
|
||||
*/
|
||||
export const SandboxApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Preview URL
|
||||
* @param {string} id
|
||||
* @param {PreviewUrlRequest} previewUrlRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
generatePreviewUrl: async (id: string, previewUrlRequest: PreviewUrlRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
assertParamExists('generatePreviewUrl', 'id', id)
|
||||
// verify required parameter 'previewUrlRequest' is not null or undefined
|
||||
assertParamExists('generatePreviewUrl', 'previewUrlRequest', previewUrlRequest)
|
||||
const localVarPath = `/runs/{id}/preview`
|
||||
.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(previewUrlRequest, localVarRequestOptions, configuration)
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* SandboxApi - functional programming interface
|
||||
*/
|
||||
export const SandboxApiFp = function(configuration?: Configuration) {
|
||||
const localVarAxiosParamCreator = SandboxApiAxiosParamCreator(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Preview URL
|
||||
* @param {string} id
|
||||
* @param {PreviewUrlRequest} previewUrlRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async generatePreviewUrl(id: string, previewUrlRequest: PreviewUrlRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PreviewUrlResponse>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.generatePreviewUrl(id, previewUrlRequest, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['SandboxApi.generatePreviewUrl']?.[localVarOperationServerIndex]?.url;
|
||||
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* SandboxApi - factory interface
|
||||
*/
|
||||
export const SandboxApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||
const localVarFp = SandboxApiFp(configuration)
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary Preview URL
|
||||
* @param {string} id
|
||||
* @param {PreviewUrlRequest} previewUrlRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
generatePreviewUrl(id: string, previewUrlRequest: PreviewUrlRequest, options?: RawAxiosRequestConfig): AxiosPromise<PreviewUrlResponse> {
|
||||
return localVarFp.generatePreviewUrl(id, previewUrlRequest, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* SandboxApi - object-oriented interface
|
||||
*/
|
||||
export class SandboxApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @summary Preview URL
|
||||
* @param {string} id
|
||||
* @param {PreviewUrlRequest} previewUrlRequest
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
public generatePreviewUrl(id: string, previewUrlRequest: PreviewUrlRequest, options?: RawAxiosRequestConfig) {
|
||||
return SandboxApiFp(this.configuration).generatePreviewUrl(id, previewUrlRequest, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ import type { PaginatedRunList } from '../models';
|
|||
// @ts-ignore
|
||||
import type { PaginatedWorkflowList } from '../models';
|
||||
// @ts-ignore
|
||||
import type { StartRunResponse } from '../models';
|
||||
import type { RunStatusResponse } from '../models';
|
||||
// @ts-ignore
|
||||
import type { WorkflowDetail } from '../models';
|
||||
/**
|
||||
|
|
@ -274,7 +274,7 @@ export const WorkflowsApiFp = function(configuration?: Configuration) {
|
|||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async startWorkflowRun(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<StartRunResponse>> {
|
||||
async startWorkflowRun(name: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RunStatusResponse>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.startWorkflowRun(name, options);
|
||||
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
||||
const localVarOperationServerBasePath = operationServerMap['WorkflowsApi.startWorkflowRun']?.[localVarOperationServerIndex]?.url;
|
||||
|
|
@ -329,7 +329,7 @@ export const WorkflowsApiFactory = function (configuration?: Configuration, base
|
|||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
startWorkflowRun(name: string, options?: RawAxiosRequestConfig): AxiosPromise<StartRunResponse> {
|
||||
startWorkflowRun(name: string, options?: RawAxiosRequestConfig): AxiosPromise<RunStatusResponse> {
|
||||
return localVarFp.startWorkflowRun(name, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -18,14 +18,14 @@
|
|||
* Board column status for a run in the list view.
|
||||
*/
|
||||
|
||||
export const RunListItemStatus = {
|
||||
export const BoardColumn = {
|
||||
WORKING: 'working',
|
||||
PENDING: 'pending',
|
||||
REVIEW: 'review',
|
||||
MERGE: 'merge'
|
||||
} as const;
|
||||
|
||||
export type RunListItemStatus = typeof RunListItemStatus[keyof typeof RunListItemStatus];
|
||||
export type BoardColumn = typeof BoardColumn[keyof typeof BoardColumn];
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
/* 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.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Response returned after cancelling a run.
|
||||
*/
|
||||
export interface CancelRunResponse {
|
||||
/**
|
||||
* Whether the cancellation was successful.
|
||||
*/
|
||||
'cancelled': boolean;
|
||||
}
|
||||
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
/* 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.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface CancelRun200Response {
|
||||
'cancelled': boolean;
|
||||
}
|
||||
|
||||
|
|
@ -3,8 +3,8 @@ export * from './api-question';
|
|||
export * from './api-question-option';
|
||||
export * from './assistant-stage-turn';
|
||||
export * from './assistant-turn';
|
||||
export * from './board-column';
|
||||
export * from './branch';
|
||||
export * from './cancel-run-response';
|
||||
export * from './check-run';
|
||||
export * from './check-run-status';
|
||||
export * from './control-detail';
|
||||
|
|
@ -48,7 +48,6 @@ export * from './root-response';
|
|||
export * from './root-response-urls';
|
||||
export * from './run-compare';
|
||||
export * from './run-list-item';
|
||||
export * from './run-list-item-status';
|
||||
export * from './run-stage';
|
||||
export * from './run-status';
|
||||
export * from './run-status-response';
|
||||
|
|
@ -70,11 +69,8 @@ export * from './smoothness-rating';
|
|||
export * from './stage-status';
|
||||
export * from './stage-turn';
|
||||
export * from './start-run-request';
|
||||
export * from './start-run-response';
|
||||
export * from './steer-request';
|
||||
export * from './steer-run-response';
|
||||
export * from './submit-answer-request';
|
||||
export * from './submit-answer-response';
|
||||
export * from './system-stage-turn';
|
||||
export * from './tool-stage-turn';
|
||||
export * from './tool-turn';
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
/* 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.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { PaginationMeta } from './pagination-meta';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { SessionGroup } from './session-group';
|
||||
|
||||
export interface PaginatedSessionGroupList {
|
||||
'data': Array<SessionGroup>;
|
||||
'meta': PaginationMeta;
|
||||
}
|
||||
|
||||
|
|
@ -15,10 +15,10 @@
|
|||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { CheckRun } from './check-run';
|
||||
import type { BoardColumn } from './board-column';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { RunListItemStatus } from './run-list-item-status';
|
||||
import type { CheckRun } from './check-run';
|
||||
|
||||
/**
|
||||
* Summary of a run shown in the board view.
|
||||
|
|
@ -40,7 +40,7 @@ export interface RunListItem {
|
|||
* Slug of the workflow that produced this run.
|
||||
*/
|
||||
'workflow': string;
|
||||
'status': RunListItemStatus;
|
||||
'status': BoardColumn;
|
||||
/**
|
||||
* Pull request number, if the run has opened a PR.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,34 +0,0 @@
|
|||
/* 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.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { AssistantTurn } from './assistant-turn';
|
||||
|
||||
/**
|
||||
* An assistant turn event.
|
||||
*/
|
||||
export interface SessionEventAssistantTurn {
|
||||
'event': SessionEventAssistantTurnEventEnum;
|
||||
'data': AssistantTurn;
|
||||
}
|
||||
|
||||
export const SessionEventAssistantTurnEventEnum = {
|
||||
ASSISTANT_TURN: 'assistant_turn'
|
||||
} as const;
|
||||
|
||||
export type SessionEventAssistantTurnEventEnum = typeof SessionEventAssistantTurnEventEnum[keyof typeof SessionEventAssistantTurnEventEnum];
|
||||
|
||||
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
/* 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.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Stream completion event.
|
||||
*/
|
||||
export interface SessionEventDone {
|
||||
'event': SessionEventDoneEventEnum;
|
||||
}
|
||||
|
||||
export const SessionEventDoneEventEnum = {
|
||||
DONE: 'done'
|
||||
} as const;
|
||||
|
||||
export type SessionEventDoneEventEnum = typeof SessionEventDoneEventEnum[keyof typeof SessionEventDoneEventEnum];
|
||||
|
||||
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
/* 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.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Error event.
|
||||
*/
|
||||
export interface SessionEventError {
|
||||
'event': SessionEventErrorEventEnum;
|
||||
/**
|
||||
* Human-readable error message.
|
||||
*/
|
||||
'message': string;
|
||||
}
|
||||
|
||||
export const SessionEventErrorEventEnum = {
|
||||
ERROR: 'error'
|
||||
} as const;
|
||||
|
||||
export type SessionEventErrorEventEnum = typeof SessionEventErrorEventEnum[keyof typeof SessionEventErrorEventEnum];
|
||||
|
||||
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
/* 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.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { ToolTurn } from './tool-turn';
|
||||
|
||||
/**
|
||||
* A tool turn event.
|
||||
*/
|
||||
export interface SessionEventToolTurn {
|
||||
'event': SessionEventToolTurnEventEnum;
|
||||
'data': ToolTurn;
|
||||
}
|
||||
|
||||
export const SessionEventToolTurnEventEnum = {
|
||||
TOOL_TURN: 'tool_turn'
|
||||
} as const;
|
||||
|
||||
export type SessionEventToolTurnEventEnum = typeof SessionEventToolTurnEventEnum[keyof typeof SessionEventToolTurnEventEnum];
|
||||
|
||||
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
/* 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.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { SessionEventAssistantTurn } from './session-event-assistant-turn';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { SessionEventDone } from './session-event-done';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { SessionEventError } from './session-event-error';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { SessionEventToolTurn } from './session-event-tool-turn';
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { ToolTurn } from './tool-turn';
|
||||
|
||||
/**
|
||||
* @type SessionEvent
|
||||
* Discriminated union of all SSE event payloads.
|
||||
*/
|
||||
export type SessionEvent = { event: 'assistant_turn' } & SessionEventAssistantTurn | { event: 'done' } & SessionEventDone | { event: 'error' } & SessionEventError | { event: 'tool_turn' } & SessionEventToolTurn;
|
||||
|
||||
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
/* 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.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { SessionListItem } from './session-list-item';
|
||||
|
||||
/**
|
||||
* A group of sessions sharing a time-based label (e.g. \"Today\", \"Yesterday\").
|
||||
*/
|
||||
export interface SessionGroup {
|
||||
/**
|
||||
* Human-readable group heading.
|
||||
*/
|
||||
'label': string;
|
||||
/**
|
||||
* Sessions belonging to this group, ordered by recency.
|
||||
*/
|
||||
'sessions': Array<SessionListItem>;
|
||||
}
|
||||
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
/* 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.
|
||||
*/
|
||||
|
||||
|
||||
// May contain unused imports in some cases
|
||||
// @ts-ignore
|
||||
import type { RunStatus } from './run-status';
|
||||
|
||||
/**
|
||||
* Response returned after successfully queuing a new run.
|
||||
*/
|
||||
export interface StartRunResponse {
|
||||
/**
|
||||
* Unique run identifier (ULID).
|
||||
*/
|
||||
'id': string;
|
||||
'status': RunStatus;
|
||||
/**
|
||||
* Timestamp when the run was created.
|
||||
*/
|
||||
'created_at': string;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -21,11 +21,11 @@ export interface SteerRequest {
|
|||
/**
|
||||
* File path to target with the guidance.
|
||||
*/
|
||||
'file': string;
|
||||
'file'?: string;
|
||||
/**
|
||||
* Line number in the file to annotate.
|
||||
*/
|
||||
'line': number;
|
||||
'line'?: number;
|
||||
/**
|
||||
* Guidance text for the agent.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
/* 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.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Acknowledgement that the steering guidance was accepted for delivery.
|
||||
*/
|
||||
export interface SteerRunResponse {
|
||||
/**
|
||||
* Whether the steering guidance was accepted.
|
||||
*/
|
||||
'accepted': boolean;
|
||||
}
|
||||
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
/* 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.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
export interface SteerRun200Response {
|
||||
'accepted': boolean;
|
||||
}
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ export interface SubmitAnswerRequest {
|
|||
/**
|
||||
* Freeform answer text.
|
||||
*/
|
||||
'value': string;
|
||||
'value'?: string;
|
||||
/**
|
||||
* Key of the selected option (for multiple-choice questions).
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
/* 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.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Response indicating whether the submitted answer was accepted.
|
||||
*/
|
||||
export interface SubmitAnswerResponse {
|
||||
/**
|
||||
* Whether the answer was accepted. Returns false if the question no longer exists.
|
||||
*/
|
||||
'accepted': boolean;
|
||||
}
|
||||
|
||||
Loading…
Add table
Reference in a new issue