4444 lines
164 KiB
Go
4444 lines
164 KiB
Go
//go:build go1.22
|
|
|
|
// Package api provides primitives to interact with the openapi HTTP API.
|
|
//
|
|
// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.
|
|
package api
|
|
|
|
import (
|
|
"bytes"
|
|
"compress/flate"
|
|
"encoding/base64"
|
|
"errors"
|
|
"fmt"
|
|
"net/http"
|
|
"net/url"
|
|
"path"
|
|
"strings"
|
|
"time"
|
|
|
|
"github.com/getkin/kin-openapi/openapi3"
|
|
"github.com/oapi-codegen/runtime"
|
|
)
|
|
|
|
// Defines values for AgentProcessHealth.
|
|
const (
|
|
HealthExited AgentProcessHealth = "exited"
|
|
HealthOk AgentProcessHealth = "ok"
|
|
HealthStuck AgentProcessHealth = "stuck"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the AgentProcessHealth enum.
|
|
func (e AgentProcessHealth) Valid() bool {
|
|
switch e {
|
|
case HealthExited:
|
|
return true
|
|
case HealthOk:
|
|
return true
|
|
case HealthStuck:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for AgentSessionRole.
|
|
const (
|
|
Implementer AgentSessionRole = "implementer"
|
|
Lead AgentSessionRole = "lead"
|
|
Reviewer AgentSessionRole = "reviewer"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the AgentSessionRole enum.
|
|
func (e AgentSessionRole) Valid() bool {
|
|
switch e {
|
|
case Implementer:
|
|
return true
|
|
case Lead:
|
|
return true
|
|
case Reviewer:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for AgentSessionState.
|
|
const (
|
|
AgentSessionStateCompleted AgentSessionState = "completed"
|
|
AgentSessionStateIdle AgentSessionState = "idle"
|
|
AgentSessionStateRunning AgentSessionState = "running"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the AgentSessionState enum.
|
|
func (e AgentSessionState) Valid() bool {
|
|
switch e {
|
|
case AgentSessionStateCompleted:
|
|
return true
|
|
case AgentSessionStateIdle:
|
|
return true
|
|
case AgentSessionStateRunning:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for AgentSessionVendor.
|
|
const (
|
|
Antigravity AgentSessionVendor = "antigravity"
|
|
Claude AgentSessionVendor = "claude"
|
|
Codex AgentSessionVendor = "codex"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the AgentSessionVendor enum.
|
|
func (e AgentSessionVendor) Valid() bool {
|
|
switch e {
|
|
case Antigravity:
|
|
return true
|
|
case Claude:
|
|
return true
|
|
case Codex:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for AttachmentKind.
|
|
const (
|
|
AttachmentKindDiagram AttachmentKind = "diagram"
|
|
AttachmentKindDiff AttachmentKind = "diff"
|
|
AttachmentKindFile AttachmentKind = "file"
|
|
AttachmentKindImage AttachmentKind = "image"
|
|
AttachmentKindSnapshot AttachmentKind = "snapshot"
|
|
AttachmentKindTask AttachmentKind = "task"
|
|
AttachmentKindUrl AttachmentKind = "url"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the AttachmentKind enum.
|
|
func (e AttachmentKind) Valid() bool {
|
|
switch e {
|
|
case AttachmentKindDiagram:
|
|
return true
|
|
case AttachmentKindDiff:
|
|
return true
|
|
case AttachmentKindFile:
|
|
return true
|
|
case AttachmentKindImage:
|
|
return true
|
|
case AttachmentKindSnapshot:
|
|
return true
|
|
case AttachmentKindTask:
|
|
return true
|
|
case AttachmentKindUrl:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for ClientRequestOp.
|
|
const (
|
|
Bash ClientRequestOp = "bash"
|
|
Download ClientRequestOp = "download"
|
|
Hands ClientRequestOp = "hands"
|
|
ReadFile ClientRequestOp = "read_file"
|
|
Sign ClientRequestOp = "sign"
|
|
Upload ClientRequestOp = "upload"
|
|
WriteFile ClientRequestOp = "write_file"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the ClientRequestOp enum.
|
|
func (e ClientRequestOp) Valid() bool {
|
|
switch e {
|
|
case Bash:
|
|
return true
|
|
case Download:
|
|
return true
|
|
case Hands:
|
|
return true
|
|
case ReadFile:
|
|
return true
|
|
case Sign:
|
|
return true
|
|
case Upload:
|
|
return true
|
|
case WriteFile:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for DirEntryType.
|
|
const (
|
|
DirEntryTypeDir DirEntryType = "dir"
|
|
DirEntryTypeFile DirEntryType = "file"
|
|
DirEntryTypeOther DirEntryType = "other"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the DirEntryType enum.
|
|
func (e DirEntryType) Valid() bool {
|
|
switch e {
|
|
case DirEntryTypeDir:
|
|
return true
|
|
case DirEntryTypeFile:
|
|
return true
|
|
case DirEntryTypeOther:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for FileChangeStatus.
|
|
const (
|
|
Added FileChangeStatus = "added"
|
|
Deleted FileChangeStatus = "deleted"
|
|
Modified FileChangeStatus = "modified"
|
|
Renamed FileChangeStatus = "renamed"
|
|
TypeChanged FileChangeStatus = "type_changed"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the FileChangeStatus enum.
|
|
func (e FileChangeStatus) Valid() bool {
|
|
switch e {
|
|
case Added:
|
|
return true
|
|
case Deleted:
|
|
return true
|
|
case Modified:
|
|
return true
|
|
case Renamed:
|
|
return true
|
|
case TypeChanged:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for FindingResponseResponse.
|
|
const (
|
|
FindingFixing FindingResponseResponse = "fixing"
|
|
FindingIgnoring FindingResponseResponse = "ignoring"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the FindingResponseResponse enum.
|
|
func (e FindingResponseResponse) Valid() bool {
|
|
switch e {
|
|
case FindingFixing:
|
|
return true
|
|
case FindingIgnoring:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for FindingState.
|
|
const (
|
|
FindingFixed FindingState = "fixed"
|
|
FindingIgnored FindingState = "ignored"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the FindingState enum.
|
|
func (e FindingState) Valid() bool {
|
|
switch e {
|
|
case FindingFixed:
|
|
return true
|
|
case FindingIgnored:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for InboxResponseType.
|
|
const (
|
|
Option InboxResponseType = "option"
|
|
Other InboxResponseType = "other"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the InboxResponseType enum.
|
|
func (e InboxResponseType) Valid() bool {
|
|
switch e {
|
|
case Option:
|
|
return true
|
|
case Other:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for InboxState.
|
|
const (
|
|
Answered InboxState = "answered"
|
|
Dismissed InboxState = "dismissed"
|
|
Open InboxState = "open"
|
|
Superseded InboxState = "superseded"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the InboxState enum.
|
|
func (e InboxState) Valid() bool {
|
|
switch e {
|
|
case Answered:
|
|
return true
|
|
case Dismissed:
|
|
return true
|
|
case Open:
|
|
return true
|
|
case Superseded:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for PermissionStatus.
|
|
const (
|
|
Granted PermissionStatus = "granted"
|
|
Missing PermissionStatus = "missing"
|
|
Unchecked PermissionStatus = "unchecked"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the PermissionStatus enum.
|
|
func (e PermissionStatus) Valid() bool {
|
|
switch e {
|
|
case Granted:
|
|
return true
|
|
case Missing:
|
|
return true
|
|
case Unchecked:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for ReviewState.
|
|
const (
|
|
ReviewStateDone ReviewState = "done"
|
|
ReviewStateFailed ReviewState = "failed"
|
|
ReviewStateRunning ReviewState = "running"
|
|
ReviewStateSkipped ReviewState = "skipped"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the ReviewState enum.
|
|
func (e ReviewState) Valid() bool {
|
|
switch e {
|
|
case ReviewStateDone:
|
|
return true
|
|
case ReviewStateFailed:
|
|
return true
|
|
case ReviewStateRunning:
|
|
return true
|
|
case ReviewStateSkipped:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for SnapshotTrigger.
|
|
const (
|
|
SnapshotTriggerAnswer SnapshotTrigger = "answer"
|
|
SnapshotTriggerAskHuman SnapshotTrigger = "ask_human"
|
|
SnapshotTriggerFork SnapshotTrigger = "fork"
|
|
SnapshotTriggerMessage SnapshotTrigger = "message"
|
|
SnapshotTriggerRequested SnapshotTrigger = "requested"
|
|
SnapshotTriggerTimer SnapshotTrigger = "timer"
|
|
SnapshotTriggerToolCall SnapshotTrigger = "tool_call"
|
|
SnapshotTriggerTurnEnd SnapshotTrigger = "turn_end"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the SnapshotTrigger enum.
|
|
func (e SnapshotTrigger) Valid() bool {
|
|
switch e {
|
|
case SnapshotTriggerAnswer:
|
|
return true
|
|
case SnapshotTriggerAskHuman:
|
|
return true
|
|
case SnapshotTriggerFork:
|
|
return true
|
|
case SnapshotTriggerMessage:
|
|
return true
|
|
case SnapshotTriggerRequested:
|
|
return true
|
|
case SnapshotTriggerTimer:
|
|
return true
|
|
case SnapshotTriggerToolCall:
|
|
return true
|
|
case SnapshotTriggerTurnEnd:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for StageBase.
|
|
const (
|
|
StageBaseMain StageBase = "main"
|
|
StageBaseParent StageBase = "parent"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the StageBase enum.
|
|
func (e StageBase) Valid() bool {
|
|
switch e {
|
|
case StageBaseMain:
|
|
return true
|
|
case StageBaseParent:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for StageAttemptState.
|
|
const (
|
|
AttemptStateCleanedUp StageAttemptState = "cleaned_up"
|
|
AttemptStateDiscarded StageAttemptState = "discarded"
|
|
AttemptStateFinished StageAttemptState = "finished"
|
|
AttemptStateIdle StageAttemptState = "idle"
|
|
AttemptStateMerged StageAttemptState = "merged"
|
|
AttemptStateRunning StageAttemptState = "running"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the StageAttemptState enum.
|
|
func (e StageAttemptState) Valid() bool {
|
|
switch e {
|
|
case AttemptStateCleanedUp:
|
|
return true
|
|
case AttemptStateDiscarded:
|
|
return true
|
|
case AttemptStateFinished:
|
|
return true
|
|
case AttemptStateIdle:
|
|
return true
|
|
case AttemptStateMerged:
|
|
return true
|
|
case AttemptStateRunning:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for TaskReady.
|
|
const (
|
|
TaskReadyDiscard TaskReady = "discard"
|
|
TaskReadyMerge TaskReady = "merge"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the TaskReady enum.
|
|
func (e TaskReady) Valid() bool {
|
|
switch e {
|
|
case TaskReadyDiscard:
|
|
return true
|
|
case TaskReadyMerge:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for TaskState.
|
|
const (
|
|
TaskStateDiscarded TaskState = "discarded"
|
|
TaskStateDiscarding TaskState = "discarding"
|
|
TaskStateIdle TaskState = "idle"
|
|
TaskStateMerged TaskState = "merged"
|
|
TaskStateMerging TaskState = "merging"
|
|
TaskStateNoAgent TaskState = "no_agent"
|
|
TaskStateReviewPending TaskState = "review_pending"
|
|
TaskStateReviewing TaskState = "reviewing"
|
|
TaskStateRunning TaskState = "running"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the TaskState enum.
|
|
func (e TaskState) Valid() bool {
|
|
switch e {
|
|
case TaskStateDiscarded:
|
|
return true
|
|
case TaskStateDiscarding:
|
|
return true
|
|
case TaskStateIdle:
|
|
return true
|
|
case TaskStateMerged:
|
|
return true
|
|
case TaskStateMerging:
|
|
return true
|
|
case TaskStateNoAgent:
|
|
return true
|
|
case TaskStateReviewPending:
|
|
return true
|
|
case TaskStateReviewing:
|
|
return true
|
|
case TaskStateRunning:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for TaskStatus.
|
|
const (
|
|
TaskStatusActive TaskStatus = "active"
|
|
TaskStatusDiscarded TaskStatus = "discarded"
|
|
TaskStatusMerged TaskStatus = "merged"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the TaskStatus enum.
|
|
func (e TaskStatus) Valid() bool {
|
|
switch e {
|
|
case TaskStatusActive:
|
|
return true
|
|
case TaskStatusDiscarded:
|
|
return true
|
|
case TaskStatusMerged:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for TaskTab.
|
|
const (
|
|
TabBoard TaskTab = "board"
|
|
TabChanges TaskTab = "changes"
|
|
TabFiles TaskTab = "files"
|
|
TabProject TaskTab = "project"
|
|
TabTerminal TaskTab = "terminal"
|
|
TabTranscript TaskTab = "transcript"
|
|
TabWorkflow TaskTab = "workflow"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the TaskTab enum.
|
|
func (e TaskTab) Valid() bool {
|
|
switch e {
|
|
case TabBoard:
|
|
return true
|
|
case TabChanges:
|
|
return true
|
|
case TabFiles:
|
|
return true
|
|
case TabProject:
|
|
return true
|
|
case TabTerminal:
|
|
return true
|
|
case TabTranscript:
|
|
return true
|
|
case TabWorkflow:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for WorkflowRunStageState.
|
|
const (
|
|
StageStateCleanedUp WorkflowRunStageState = "cleaned_up"
|
|
StageStateDiscarded WorkflowRunStageState = "discarded"
|
|
StageStateFinished WorkflowRunStageState = "finished"
|
|
StageStateIdle WorkflowRunStageState = "idle"
|
|
StageStateMerged WorkflowRunStageState = "merged"
|
|
StageStateRunning WorkflowRunStageState = "running"
|
|
StageStateWaiting WorkflowRunStageState = "waiting"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the WorkflowRunStageState enum.
|
|
func (e WorkflowRunStageState) Valid() bool {
|
|
switch e {
|
|
case StageStateCleanedUp:
|
|
return true
|
|
case StageStateDiscarded:
|
|
return true
|
|
case StageStateFinished:
|
|
return true
|
|
case StageStateIdle:
|
|
return true
|
|
case StageStateMerged:
|
|
return true
|
|
case StageStateRunning:
|
|
return true
|
|
case StageStateWaiting:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for ZombieKind.
|
|
const (
|
|
ProcessWithoutSession ZombieKind = "process_without_session"
|
|
RunningWithoutProcess ZombieKind = "running_without_process"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the ZombieKind enum.
|
|
func (e ZombieKind) Valid() bool {
|
|
switch e {
|
|
case ProcessWithoutSession:
|
|
return true
|
|
case RunningWithoutProcess:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for MergeTaskJSONBodyTarget.
|
|
const (
|
|
MergeTargetMain MergeTaskJSONBodyTarget = "main"
|
|
MergeTargetParent MergeTaskJSONBodyTarget = "parent"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the MergeTaskJSONBodyTarget enum.
|
|
func (e MergeTaskJSONBodyTarget) Valid() bool {
|
|
switch e {
|
|
case MergeTargetMain:
|
|
return true
|
|
case MergeTargetParent:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// AgentProcess defines model for AgentProcess.
|
|
type AgentProcess struct {
|
|
// Health stuck means a turn is running and no stream event has arrived for stuck_after_seconds; exited means the process is gone.
|
|
Health AgentProcessHealth `json:"health"`
|
|
|
|
// LastEventAt When the process last wrote a line to its stream
|
|
LastEventAt time.Time `json:"last_event_at"`
|
|
Pid int `json:"pid"`
|
|
SessionId string `json:"session_id"`
|
|
|
|
// State The session's state
|
|
State string `json:"state"`
|
|
TaskId string `json:"task_id"`
|
|
Vendor string `json:"vendor"`
|
|
}
|
|
|
|
// AgentProcessHealth stuck means a turn is running and no stream event has arrived for stuck_after_seconds; exited means the process is gone.
|
|
type AgentProcessHealth string
|
|
|
|
// AgentSession defines model for AgentSession.
|
|
type AgentSession struct {
|
|
CreatedAt time.Time `json:"created_at"`
|
|
CreatedBy string `json:"created_by"`
|
|
|
|
// ForkedAt With forked_from: the vendor's id of the last thing the fork keeps, a message for Claude Code, a turn for Codex.
|
|
ForkedAt *string `json:"forked_at,omitempty"`
|
|
|
|
// ForkedFrom A fork's first start resumes this vendor session, cut at forked_at, under a new vendor_session_id; absent for other sessions.
|
|
ForkedFrom *string `json:"forked_from,omitempty"`
|
|
Id string `json:"id"`
|
|
|
|
// Member The agent's name in its task's team; empty on a task with one agent, and for leads and reviewers.
|
|
Member string `json:"member"`
|
|
|
|
// Model Requested model; empty means the vendor's default. A session only switches between its own vendor's models.
|
|
Model string `json:"model"`
|
|
|
|
// Owner The login whose lead agent this is; empty for a task's session.
|
|
Owner string `json:"owner"`
|
|
|
|
// Role reviewer: a review's session (see Review); a task's sessions list leaves these out.
|
|
Role AgentSessionRole `json:"role"`
|
|
State AgentSessionState `json:"state"`
|
|
|
|
// Subagents How many of the agent's subagents are running, background ones included after the turn that started them has ended.
|
|
Subagents int `json:"subagents"`
|
|
|
|
// TaskId Empty for a lead session.
|
|
TaskId string `json:"task_id"`
|
|
|
|
// Vendor Follows from the model the session was created with: gpt-* models run on Codex, gemini-* models on Antigravity, every other model on Claude Code.
|
|
Vendor AgentSessionVendor `json:"vendor"`
|
|
|
|
// VendorSessionId Claude Code's session id, chosen by byre; or the Codex thread id or Antigravity conversation id, empty until the session first starts.
|
|
VendorSessionId string `json:"vendor_session_id"`
|
|
}
|
|
|
|
// AgentSessionRole reviewer: a review's session (see Review); a task's sessions list leaves these out.
|
|
type AgentSessionRole string
|
|
|
|
// AgentSessionState defines model for AgentSession.State.
|
|
type AgentSessionState string
|
|
|
|
// AgentSessionVendor Follows from the model the session was created with: gpt-* models run on Codex, gemini-* models on Antigravity, every other model on Claude Code.
|
|
type AgentSessionVendor string
|
|
|
|
// Attachment defines model for Attachment.
|
|
type Attachment struct {
|
|
Caption *string `json:"caption,omitempty"`
|
|
EndLine *int `json:"end_line,omitempty"`
|
|
|
|
// Image image: data URL.
|
|
Image *string `json:"image,omitempty"`
|
|
Kind AttachmentKind `json:"kind"`
|
|
|
|
// Mermaid diagram: Mermaid source.
|
|
Mermaid *string `json:"mermaid,omitempty"`
|
|
|
|
// Path file: repo-relative path. image: an image file in the task's worktree, absolute or relative to it.
|
|
Path *string `json:"path,omitempty"`
|
|
|
|
// Ref diff: git revision range.
|
|
Ref *string `json:"ref,omitempty"`
|
|
SnapshotId *string `json:"snapshot_id,omitempty"`
|
|
StartLine *int `json:"start_line,omitempty"`
|
|
TaskId *string `json:"task_id,omitempty"`
|
|
Url *string `json:"url,omitempty"`
|
|
}
|
|
|
|
// AttachmentKind defines model for Attachment.Kind.
|
|
type AttachmentKind string
|
|
|
|
// Away defines model for Away.
|
|
type Away struct {
|
|
Away bool `json:"away"`
|
|
}
|
|
|
|
// Blob defines model for Blob.
|
|
type Blob struct {
|
|
ContentType string `json:"content_type"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
CreatedBy string `json:"created_by"`
|
|
Id string `json:"id"`
|
|
}
|
|
|
|
// BoardPostCreate defines model for BoardPostCreate.
|
|
type BoardPostCreate struct {
|
|
Text string `json:"text"`
|
|
}
|
|
|
|
// ClientReply defines model for ClientReply.
|
|
type ClientReply struct {
|
|
// Data read_file: the file's contents. sign: the detached signature.
|
|
Data *[]byte `json:"data,omitempty"`
|
|
|
|
// Error Set when the request couldn't be carried out.
|
|
Error *string `json:"error,omitempty"`
|
|
|
|
// ExitCode bash, sign: the exit status, -1 when it was killed by its timeout.
|
|
ExitCode *int `json:"exit_code,omitempty"`
|
|
|
|
// Id The request's id.
|
|
Id string `json:"id"`
|
|
|
|
// Output bash: stdout and stderr together, at most their last 64 KiB. sign: the signing program's stderr, where it writes its GnuPG status lines, and the login shell's output.
|
|
Output *string `json:"output,omitempty"`
|
|
|
|
// Result hands: the tool's MCP CallToolResult.
|
|
Result *map[string]interface{} `json:"result,omitempty"`
|
|
}
|
|
|
|
// ClientRequest Work a task agent, or a merge, asks a connected Mac to do, sent over /api/clients/connect.
|
|
type ClientRequest struct {
|
|
// Arguments hands: the tool's arguments.
|
|
Arguments *map[string]interface{} `json:"arguments,omitempty"`
|
|
|
|
// Command bash: run with zsh as a login shell in the home directory, in its own process group.
|
|
Command *string `json:"command,omitempty"`
|
|
|
|
// Data write_file: the file's new contents; parent directories are created. sign: the unsigned commit object, which the Mac signs with the program its git config names for its gpg.format (openpgp or x509), called as git calls it.
|
|
Data *[]byte `json:"data,omitempty"`
|
|
|
|
// Dest upload: where the archive's one entry ends up, absolute or starting with ~/; whatever is there is replaced.
|
|
Dest *string `json:"dest,omitempty"`
|
|
Id string `json:"id"`
|
|
|
|
// Ident sign: the committer, as "Name <email>", to sign as when the Mac's git config has no user.signingkey.
|
|
Ident *string `json:"ident,omitempty"`
|
|
Op ClientRequestOp `json:"op"`
|
|
|
|
// Path download, read_file, write_file: the file (or, for download, file or directory) on the client, absolute or starting with ~/.
|
|
Path *string `json:"path,omitempty"`
|
|
|
|
// TimeoutMs bash, sign: kill the process group after this long.
|
|
TimeoutMs *int `json:"timeout_ms,omitempty"`
|
|
|
|
// Tool hands: the byre-hands tool to call.
|
|
Tool *string `json:"tool,omitempty"`
|
|
|
|
// Transfer upload: the transfer id to get from /api/clients/transfers/{transferId}. download: the transfer id to put the archive to.
|
|
Transfer *string `json:"transfer,omitempty"`
|
|
}
|
|
|
|
// ClientRequestOp defines model for ClientRequest.Op.
|
|
type ClientRequestOp string
|
|
|
|
// CompactCreate defines model for CompactCreate.
|
|
type CompactCreate struct {
|
|
// Model Model for the new session, on either vendor. The old session still writes the handoff. Defaults to the old session's model.
|
|
Model *string `json:"model,omitempty"`
|
|
}
|
|
|
|
// ConnectedClient defines model for ConnectedClient.
|
|
type ConnectedClient struct {
|
|
// Commit The git commit the app was built from
|
|
Commit string `json:"commit"`
|
|
|
|
// ConnectedAt When the client's WebSocket connected.
|
|
ConnectedAt time.Time `json:"connected_at"`
|
|
|
|
// Host The Mac's name from its Byre-Host header.
|
|
Host string `json:"host"`
|
|
|
|
// Id The ID the app made up when it started
|
|
Id string `json:"id"`
|
|
|
|
// LastActionAt When byre last received a request the human made from this client since byre started; absent when none.
|
|
LastActionAt *time.Time `json:"last_action_at,omitempty"`
|
|
Login string `json:"login"`
|
|
}
|
|
|
|
// DefaultModel defines model for DefaultModel.
|
|
type DefaultModel struct {
|
|
Model string `json:"model"`
|
|
}
|
|
|
|
// DirEntry defines model for DirEntry.
|
|
type DirEntry struct {
|
|
// Ignored git ignores the entry: .gitignore and the other exclude files match it or a directory above it.
|
|
Ignored bool `json:"ignored"`
|
|
Name string `json:"name"`
|
|
|
|
// Size file: its size in bytes.
|
|
Size int64 `json:"size"`
|
|
Symlink bool `json:"symlink"`
|
|
|
|
// Type What the entry is, following a symlink that stays in the worktree. other: a symlink that leaves the worktree or points nowhere, or a device, socket or pipe.
|
|
Type DirEntryType `json:"type"`
|
|
}
|
|
|
|
// DirEntryType What the entry is, following a symlink that stays in the worktree. other: a symlink that leaves the worktree or points nowhere, or a device, socket or pipe.
|
|
type DirEntryType string
|
|
|
|
// DirListing defines model for DirListing.
|
|
type DirListing struct {
|
|
Entries []DirEntry `json:"entries"`
|
|
|
|
// Path The directory, relative to the worktree root; empty for the root.
|
|
Path string `json:"path"`
|
|
|
|
// Truncated The directory has more entries than were returned.
|
|
Truncated bool `json:"truncated"`
|
|
}
|
|
|
|
// Error defines model for Error.
|
|
type Error struct {
|
|
Message string `json:"message"`
|
|
}
|
|
|
|
// Event defines model for Event.
|
|
type Event struct {
|
|
Actor string `json:"actor"`
|
|
AgentSessionId *string `json:"agent_session_id,omitempty"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
Kind string `json:"kind"`
|
|
|
|
// Owner Set on a lead agent's events and a user's focus.updated: the login they belong to. Only that user is sent them.
|
|
Owner *string `json:"owner,omitempty"`
|
|
Payload map[string]interface{} `json:"payload"`
|
|
ProjectId *string `json:"project_id,omitempty"`
|
|
Seq int64 `json:"seq"`
|
|
TaskId *string `json:"task_id,omitempty"`
|
|
}
|
|
|
|
// EventPage defines model for EventPage.
|
|
type EventPage struct {
|
|
Events []Event `json:"events"`
|
|
|
|
// More Whether there are earlier events than this page.
|
|
More bool `json:"more"`
|
|
}
|
|
|
|
// FileChange defines model for FileChange.
|
|
type FileChange struct {
|
|
Additions int `json:"additions"`
|
|
Binary bool `json:"binary"`
|
|
Deletions int `json:"deletions"`
|
|
|
|
// OldPath renamed: the path before the rename.
|
|
OldPath *string `json:"old_path,omitempty"`
|
|
Path string `json:"path"`
|
|
Status FileChangeStatus `json:"status"`
|
|
}
|
|
|
|
// FileChangeStatus defines model for FileChange.Status.
|
|
type FileChangeStatus string
|
|
|
|
// FileContent defines model for FileContent.
|
|
type FileContent struct {
|
|
// Binary The file isn't UTF-8 text; text is empty.
|
|
Binary bool `json:"binary"`
|
|
Path string `json:"path"`
|
|
Size int64 `json:"size"`
|
|
Text string `json:"text"`
|
|
|
|
// Truncated text holds only the start of the file.
|
|
Truncated bool `json:"truncated"`
|
|
}
|
|
|
|
// FileDiff defines model for FileDiff.
|
|
type FileDiff struct {
|
|
Patch string `json:"patch"`
|
|
Path string `json:"path"`
|
|
}
|
|
|
|
// FindingResponse defines model for FindingResponse.
|
|
type FindingResponse struct {
|
|
// Reason What the agent is doing about it, or why it leaves it.
|
|
Reason string `json:"reason"`
|
|
Response FindingResponseResponse `json:"response"`
|
|
}
|
|
|
|
// FindingResponseResponse defines model for FindingResponse.Response.
|
|
type FindingResponseResponse string
|
|
|
|
// FindingState fixed: sent to the task's agent to fix. ignored: dismissed, and left out of the Merge warning.
|
|
type FindingState string
|
|
|
|
// FindingStateUpdate defines model for FindingStateUpdate.
|
|
type FindingStateUpdate struct {
|
|
// State fixed: sent to the task's agent to fix. ignored: dismissed, and left out of the Merge warning.
|
|
State FindingState `json:"state"`
|
|
}
|
|
|
|
// Focus defines model for Focus.
|
|
type Focus struct {
|
|
// ProjectId The project the right pane shows; the task's project when task_id is set
|
|
ProjectId *string `json:"project_id,omitempty"`
|
|
Tab TaskTab `json:"tab"`
|
|
|
|
// TaskId The task the right pane shows; absent for none.
|
|
TaskId *string `json:"task_id,omitempty"`
|
|
}
|
|
|
|
// InboxItem A question an agent asked the human with ask_human.
|
|
type InboxItem struct {
|
|
AgentSessionId string `json:"agent_session_id"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
Id string `json:"id"`
|
|
|
|
// Payload context (Markdown with the choices inline as `- ( ) text` / `- (*) text` pick-one or `- [ ] text` / `- [x] text` pick-any list items), question, why_blocked, options (each choice's text, in order), multiple (true for pick-any), recommended (the marked choices' text), attachments.
|
|
Payload map[string]interface{} `json:"payload"`
|
|
ProjectId string `json:"project_id"`
|
|
ResolvedAt *time.Time `json:"resolved_at,omitempty"`
|
|
ResolvedBy *string `json:"resolved_by,omitempty"`
|
|
Responses []InboxResponse `json:"responses"`
|
|
State InboxState `json:"state"`
|
|
TaskId string `json:"task_id"`
|
|
ThreadId string `json:"thread_id"`
|
|
}
|
|
|
|
// InboxRespond defines model for InboxRespond.
|
|
type InboxRespond struct {
|
|
Responses []InboxResponseCreate `json:"responses"`
|
|
}
|
|
|
|
// InboxResponse defines model for InboxResponse.
|
|
type InboxResponse struct {
|
|
Attachments []Attachment `json:"attachments"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
DeliveredAt *time.Time `json:"delivered_at,omitempty"`
|
|
Id string `json:"id"`
|
|
|
|
// Images Blob ids sent to the agent as images alongside the response.
|
|
Images []string `json:"images"`
|
|
ItemId string `json:"item_id"`
|
|
Options *[]string `json:"options,omitempty"`
|
|
|
|
// SnapshotN The task's snapshot of the worktree as it stood just before the response was handed to the agent; absent until delivered, and when no snapshot could be taken.
|
|
SnapshotN *int `json:"snapshot_n,omitempty"`
|
|
Text *string `json:"text,omitempty"`
|
|
Type InboxResponseType `json:"type"`
|
|
User string `json:"user"`
|
|
}
|
|
|
|
// InboxResponseCreate defines model for InboxResponseCreate.
|
|
type InboxResponseCreate struct {
|
|
Attachments *[]Attachment `json:"attachments,omitempty"`
|
|
|
|
// Images other, or option on a pick-any question: blob ids from uploadBlob, sent to the agent as images alongside the response.
|
|
Images *[]string `json:"images,omitempty"`
|
|
ItemId string `json:"item_id"`
|
|
|
|
// Options option: the chosen options; exactly one for a pick-one question, one or more for a pick-any question.
|
|
Options *[]string `json:"options,omitempty"`
|
|
|
|
// Text other: the text sent to the agent, which may be empty when images are given. option: optional notes sent along with the chosen options.
|
|
Text *string `json:"text,omitempty"`
|
|
Type InboxResponseType `json:"type"`
|
|
}
|
|
|
|
// InboxResponseType defines model for InboxResponseType.
|
|
type InboxResponseType string
|
|
|
|
// InboxState defines model for InboxState.
|
|
type InboxState string
|
|
|
|
// LeadNote defines model for LeadNote.
|
|
type LeadNote struct {
|
|
CreatedAt time.Time `json:"created_at"`
|
|
Id string `json:"id"`
|
|
|
|
// ProjectId The project the note applies to; absent for a note that applies to every project.
|
|
ProjectId *string `json:"project_id,omitempty"`
|
|
Text string `json:"text"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
// MessageCreate defines model for MessageCreate.
|
|
type MessageCreate struct {
|
|
// Images Blob ids from uploadBlob, sent to the agent as images alongside the text.
|
|
Images *[]string `json:"images,omitempty"`
|
|
|
|
// Model Model for this turn and later ones. When it differs from the session's model, the session switches before the message is sent.
|
|
Model *string `json:"model,omitempty"`
|
|
|
|
// Text May be empty when images are given.
|
|
Text string `json:"text"`
|
|
}
|
|
|
|
// NotificationPrefs Which task events notify this user in the macOS app.
|
|
type NotificationPrefs struct {
|
|
// Discard task.discard_suggested events.
|
|
Discard bool `json:"discard"`
|
|
|
|
// Errors session.error events on tasks.
|
|
Errors bool `json:"errors"`
|
|
|
|
// MergeProblems task.merge_stopped and task.merge_after_review_dropped events.
|
|
MergeProblems bool `json:"merge_problems"`
|
|
|
|
// Questions Questions. On by default.
|
|
Questions bool `json:"questions"`
|
|
|
|
// RateLimits session.rate_limited events on tasks.
|
|
RateLimits bool `json:"rate_limits"`
|
|
|
|
// Ready task.ready events.
|
|
Ready bool `json:"ready"`
|
|
|
|
// Reports Task turns that end with a summary (turn.ended with summary: true).
|
|
Reports bool `json:"reports"`
|
|
|
|
// Workflows task.workflow_finished events.
|
|
Workflows bool `json:"workflows"`
|
|
}
|
|
|
|
// PaneFocus defines model for PaneFocus.
|
|
type PaneFocus struct {
|
|
// Drafting True while a text box in the right pane holds unsent text.
|
|
Drafting bool `json:"drafting"`
|
|
|
|
// Focused True while the app's window has focus and the focused element is inside the right pane.
|
|
Focused bool `json:"focused"`
|
|
}
|
|
|
|
// Participant defines model for Participant.
|
|
type Participant struct {
|
|
DisplayName string `json:"display_name"`
|
|
GitEmail string `json:"git_email"`
|
|
|
|
// GitName Empty when the user hasn't set a git identity; they then get no trailer.
|
|
GitName string `json:"git_name"`
|
|
Login string `json:"login"`
|
|
}
|
|
|
|
// Permission defines model for Permission.
|
|
type Permission struct {
|
|
// Detail What the test did or why it failed, and what to switch on.
|
|
Detail string `json:"detail"`
|
|
|
|
// Name The privacy grant, such as Screen Recording.
|
|
Name string `json:"name"`
|
|
|
|
// Settings The x-apple.systempreferences URL of the grant's System Settings pane.
|
|
Settings string `json:"settings"`
|
|
|
|
// Status unchecked when the test couldn't run, such as Automation of Orion while Orion isn't running.
|
|
Status PermissionStatus `json:"status"`
|
|
}
|
|
|
|
// PermissionStatus unchecked when the test couldn't run, such as Automation of Orion while Orion isn't running.
|
|
type PermissionStatus string
|
|
|
|
// Preview defines model for Preview.
|
|
type Preview struct {
|
|
CreatedAt time.Time `json:"created_at"`
|
|
Name string `json:"name"`
|
|
|
|
// Port A port in the task's block, served at https://<byre's host>:<port>/.
|
|
Port int `json:"port"`
|
|
TaskId string `json:"task_id"`
|
|
}
|
|
|
|
// Project defines model for Project.
|
|
type Project struct {
|
|
CreatedAt time.Time `json:"created_at"`
|
|
CreatedBy string `json:"created_by"`
|
|
DefaultBranch string `json:"default_branch"`
|
|
Id string `json:"id"`
|
|
Name string `json:"name"`
|
|
Remote string `json:"remote"`
|
|
RepoPath string `json:"repo_path"`
|
|
}
|
|
|
|
// ProjectCreate defines model for ProjectCreate.
|
|
type ProjectCreate struct {
|
|
Name string `json:"name"`
|
|
RepoPath string `json:"repo_path"`
|
|
}
|
|
|
|
// ProtocolError defines model for ProtocolError.
|
|
type ProtocolError struct {
|
|
At time.Time `json:"at"`
|
|
|
|
// Raw The line as received
|
|
Raw string `json:"raw"`
|
|
Reason string `json:"reason"`
|
|
SessionId string `json:"session_id"`
|
|
|
|
// Size The line's full length in bytes.
|
|
Size int `json:"size"`
|
|
Vendor string `json:"vendor"`
|
|
}
|
|
|
|
// ProtocolErrors defines model for ProtocolErrors.
|
|
type ProtocolErrors struct {
|
|
// Counts Stream lines the adapter couldn't parse or didn't recognise since byre started, keyed by vendor.
|
|
Counts map[string]int `json:"counts"`
|
|
|
|
// Recent The most recent ones, newest first.
|
|
Recent []ProtocolError `json:"recent"`
|
|
}
|
|
|
|
// Review An agent session on the vendor the task's agent doesn't use, reviewing one snapshot's change.
|
|
type Review struct {
|
|
// AgentSessionId The reviewer's session; empty when skipped.
|
|
AgentSessionId string `json:"agent_session_id"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
|
|
// Error failed: why.
|
|
Error string `json:"error"`
|
|
|
|
// FindingResponses How the task's agent answered each finding with respond_to_finding, keyed by its index in result.findings; its latest answer wins.
|
|
FindingResponses map[string]FindingResponse `json:"finding_responses"`
|
|
|
|
// FindingStates How the human addressed each finding, keyed by its index in result.findings; a finding not listed is open.
|
|
FindingStates map[string]FindingState `json:"finding_states"`
|
|
FinishedAt *time.Time `json:"finished_at,omitempty"`
|
|
Id string `json:"id"`
|
|
|
|
// Model Empty when skipped.
|
|
Model string `json:"model"`
|
|
|
|
// Result done: the reviewer's submit_review arguments: summary (Markdown) and findings, each with severity, category, title, detail, path and line.
|
|
Result *map[string]interface{} `json:"result,omitempty"`
|
|
SnapshotN int `json:"snapshot_n"`
|
|
|
|
// State skipped: the snapshot's step changed no files, so no reviewer ran.
|
|
State ReviewState `json:"state"`
|
|
TaskId string `json:"task_id"`
|
|
|
|
// Vendor Empty when skipped.
|
|
Vendor string `json:"vendor"`
|
|
}
|
|
|
|
// ReviewState skipped: the snapshot's step changed no files, so no reviewer ran.
|
|
type ReviewState string
|
|
|
|
// ReviewModels defines model for ReviewModels.
|
|
type ReviewModels struct {
|
|
ReviewModel string `json:"review_model"`
|
|
SecondReviewModel string `json:"second_review_model"`
|
|
}
|
|
|
|
// SessionCreate defines model for SessionCreate.
|
|
type SessionCreate struct {
|
|
// Images Blob ids from uploadBlob, sent to the agent as images alongside the prompt.
|
|
Images *[]string `json:"images,omitempty"`
|
|
Model *string `json:"model,omitempty"`
|
|
Prompt string `json:"prompt"`
|
|
}
|
|
|
|
// Snapshot defines model for Snapshot.
|
|
type Snapshot struct {
|
|
AgentSessionId string `json:"agent_session_id"`
|
|
|
|
// CommitSha A commit of tree_sha whose parent is the worktree's HEAD when it was taken.
|
|
CommitSha string `json:"commit_sha"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
|
|
// EventSeq The task's latest event when the snapshot was started: the tree holds at least the work up to it.
|
|
EventSeq int64 `json:"event_seq"`
|
|
Id string `json:"id"`
|
|
|
|
// N Position in the task's snapshots, from 1; the ref is refs/byre/tasks/{task_id}/snap/{n}.
|
|
N int `json:"n"`
|
|
TaskId string `json:"task_id"`
|
|
TreeSha string `json:"tree_sha"`
|
|
|
|
// Trigger turn_end: after byre's end-of-turn commit. requested: a task's agent or the lead asked for it with take_snapshot. answer: just before answers from the human were handed to the agent. fork: when the task's agent forked the task with its fork tool. answer and fork snapshots are never reviewed. message (the agent wrote text after one or more tool calls), tool_call, ask_human and timer appear only on snapshots taken by earlier builds.
|
|
Trigger SnapshotTrigger `json:"trigger"`
|
|
}
|
|
|
|
// SnapshotTrigger turn_end: after byre's end-of-turn commit. requested: a task's agent or the lead asked for it with take_snapshot. answer: just before answers from the human were handed to the agent. fork: when the task's agent forked the task with its fork tool. answer and fork snapshots are never reviewed. message (the agent wrote text after one or more tool calls), tool_call, ask_human and timer appear only on snapshots taken by earlier builds.
|
|
type SnapshotTrigger string
|
|
|
|
// Stage defines model for Stage.
|
|
type Stage struct {
|
|
// After The stages whose outputs this stage gets, by name; it starts once all of them have finished. Absent means the previous stage in the list (for the first stage, none); empty means it starts from the brief.
|
|
After *[]string `json:"after,omitempty"`
|
|
|
|
// Agents Runs the stage as a team: several agents in the stage's one task and worktree, each on its own model, sharing a board. The first agent finishes the stage.
|
|
Agents *[]TeamMember `json:"agents,omitempty"`
|
|
|
|
// Base Where the stage's task branches from. parent (the default): the commit its one after stage finished at, or for a stage with none, where the workflow was started from. main: the project's default branch. Refused on a stage with more than one after stage, which always branches from the default branch.
|
|
Base *StageBase `json:"base,omitempty"`
|
|
|
|
// Model The stage agent's model, which also picks its vendor: gpt-* models run on Codex, gemini-* models on Antigravity, every other model on Claude Code. Required without agents, refused with them.
|
|
Model string `json:"model,omitempty"`
|
|
|
|
// Name One line of 1 to 100 characters, unique within the workflow.
|
|
Name string `json:"name"`
|
|
|
|
// Prompt The stage agent's instructions; with agents, the instructions every agent of the team gets before its own.
|
|
Prompt string `json:"prompt"`
|
|
}
|
|
|
|
// StageBase Where the stage's task branches from. parent (the default): the commit its one after stage finished at, or for a stage with none, where the workflow was started from. main: the project's default branch. Refused on a stage with more than one after stage, which always branches from the default branch.
|
|
type StageBase string
|
|
|
|
// StageAttempt defines model for StageAttempt.
|
|
type StageAttempt struct {
|
|
// Commit With output: the commit the stage finished at.
|
|
Commit *string `json:"commit,omitempty"`
|
|
|
|
// DiscardedBy discarded and cleaned_up: who discarded it; byre for the cleanup.
|
|
DiscardedBy *string `json:"discarded_by,omitempty"`
|
|
|
|
// Discarding Whether a Discard was started and the task isn't closed yet.
|
|
Discarding bool `json:"discarding"`
|
|
|
|
// ForkedFrom The task this attempt was forked from; absent for the stage's first attempt.
|
|
ForkedFrom *string `json:"forked_from,omitempty"`
|
|
|
|
// Inputs The attempts whose outputs it started from, one per after stage; a fork has its source's.
|
|
Inputs []StageInput `json:"inputs"`
|
|
|
|
// Output The finish_stage output the stages after it get; absent until it finishes.
|
|
Output *string `json:"output,omitempty"`
|
|
|
|
// State running: its agent is mid-turn. idle: active, and finish_stage hasn't taken. finished: active, its output recorded. merged. discarded: discarded before finishing. cleaned_up: discarded after finishing, as byre does to the run's other tasks when the final stage finishes.
|
|
State StageAttemptState `json:"state"`
|
|
TaskId string `json:"task_id"`
|
|
Title string `json:"title"`
|
|
}
|
|
|
|
// StageAttemptState running: its agent is mid-turn. idle: active, and finish_stage hasn't taken. finished: active, its output recorded. merged. discarded: discarded before finishing. cleaned_up: discarded after finishing, as byre does to the run's other tasks when the final stage finishes.
|
|
type StageAttemptState string
|
|
|
|
// StageInput defines model for StageInput.
|
|
type StageInput struct {
|
|
Stage string `json:"stage"`
|
|
TaskId string `json:"task_id"`
|
|
}
|
|
|
|
// Status defines model for Status.
|
|
type Status struct {
|
|
ActiveTasks int `json:"active_tasks"`
|
|
|
|
// AgentProcesses Every agent process byre is tracking, idle sessions included.
|
|
AgentProcesses []AgentProcess `json:"agent_processes"`
|
|
|
|
// Clients Each running app that holds its /api/clients/connect WebSocket, oldest connection first.
|
|
Clients []ConnectedClient `json:"clients"`
|
|
DbBytes int64 `json:"db_bytes"`
|
|
LastEventSeq int64 `json:"last_event_seq"`
|
|
|
|
// LiveAgents Agent processes currently running.
|
|
LiveAgents int `json:"live_agents"`
|
|
Projects int `json:"projects"`
|
|
ProtocolErrors ProtocolErrors `json:"protocol_errors"`
|
|
|
|
// RateLimits Each vendor's latest usage, keyed by vendor, from its usage command or, without one, what the vendor itself reported.
|
|
RateLimits map[string]Usage `json:"rate_limits"`
|
|
|
|
// RunningTurns Turns running now, oldest session first.
|
|
RunningTurns []TurnRef `json:"running_turns"`
|
|
SseClients int `json:"sse_clients"`
|
|
StartedAt time.Time `json:"started_at"`
|
|
|
|
// StuckAfterSeconds How long a running turn may go without a stream event before it counts as stuck.
|
|
StuckAfterSeconds int `json:"stuck_after_seconds"`
|
|
|
|
// Zombies Sessions marked running with no live process, and agent processes byre has no session for.
|
|
Zombies []Zombie `json:"zombies"`
|
|
}
|
|
|
|
// SummaryRead defines model for SummaryRead.
|
|
type SummaryRead struct {
|
|
// Seq The seq of the turn.ended event whose summary was shown.
|
|
Seq int64 `json:"seq"`
|
|
}
|
|
|
|
// Task defines model for Task.
|
|
type Task struct {
|
|
BaseRef string `json:"base_ref"`
|
|
Branch string `json:"branch"`
|
|
|
|
// ClosedAt When the task was merged or discarded.
|
|
ClosedAt *time.Time `json:"closed_at,omitempty"`
|
|
|
|
// Color Index into the UI's task palette, assigned at creation: a colour no active task holds, the one given out longest ago.
|
|
Color int `json:"color"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
CreatedBy string `json:"created_by"`
|
|
|
|
// Discarding Whether a Discard was started and the task isn't closed yet: its summary turn is waiting for the running turn, running, or done and the task is being removed.
|
|
Discarding bool `json:"discarding"`
|
|
|
|
// ForkedAt With forked_from: the n of the snapshot it was forked at.
|
|
ForkedAt *int `json:"forked_at,omitempty"`
|
|
|
|
// ForkedFrom The task this one was forked from; absent for other tasks.
|
|
ForkedFrom *string `json:"forked_from,omitempty"`
|
|
Id string `json:"id"`
|
|
|
|
// MergeAfterReview Whether a Merge with after_review is waiting for the running review of the latest snapshot to finish.
|
|
MergeAfterReview bool `json:"merge_after_review"`
|
|
|
|
// MergeCommit merged: the squash commit on the default branch; empty when there was nothing to merge.
|
|
MergeCommit *string `json:"merge_commit,omitempty"`
|
|
|
|
// MergeQueuedAt When Merge was requested while another task in the project was merging; absent once the merge starts or when none is held.
|
|
MergeQueuedAt *time.Time `json:"merge_queued_at,omitempty"`
|
|
|
|
// MergeTitle The title of the squash commit Merge makes: the task title until the agent sets another with set_merge_title.
|
|
MergeTitle string `json:"merge_title"`
|
|
|
|
// Merging Whether a Merge was started and hasn't finished: its turn is running, or the turn ended and byre is squashing, pushing and closing the task.
|
|
Merging bool `json:"merging"`
|
|
|
|
// MergingIntoParent Whether a merge of this subtask into its parent was requested and the parent hasn't merged it yet.
|
|
MergingIntoParent bool `json:"merging_into_parent"`
|
|
|
|
// ParentTaskId The task whose agent created this one as its subtask; absent for other tasks.
|
|
ParentTaskId *string `json:"parent_task_id,omitempty"`
|
|
|
|
// PortBase The first of the task's block of ports (port_base to port_base+9), passed to its agent and terminal as PORT.
|
|
PortBase int `json:"port_base"`
|
|
ProjectId string `json:"project_id"`
|
|
|
|
// Ready What the agent last told the human to do with the task: merge (ready_for_merge) or discard (suggest_discard); absent when it hasn't, or when a snapshot other than an answer's or a new question came after.
|
|
Ready *TaskReady `json:"ready,omitempty"`
|
|
|
|
// State What the task is doing, kept by the store in the same transaction as every change to it (a task.state event carries each change): merged or discarded once closed, else discarding, merging, the state of its agent's latest live session when that isn't idle, reviewing while a review runs, review_pending between a turn's end and its snapshot's review starting or being skipped, idle, or no_agent.
|
|
State TaskState `json:"state"`
|
|
Status TaskStatus `json:"status"`
|
|
|
|
// SummarySeq The seq of the task's latest turn.ended event with summary: true; 0 when it has none.
|
|
SummarySeq int64 `json:"summary_seq"`
|
|
Title string `json:"title"`
|
|
|
|
// TodoItem The title of the TODO.md item the task was started from; absent for other tasks.
|
|
TodoItem *string `json:"todo_item,omitempty"`
|
|
|
|
// Workflow The name of the workflow the task froze at creation (getTaskWorkflow has its copy); absent for a task without one.
|
|
Workflow *string `json:"workflow,omitempty"`
|
|
|
|
// WorkflowRun With workflow: the id every task of one run of the workflow shares.
|
|
WorkflowRun *string `json:"workflow_run,omitempty"`
|
|
|
|
// WorkflowStage With workflow: the name of the stage this task runs.
|
|
WorkflowStage *string `json:"workflow_stage,omitempty"`
|
|
WorktreePath string `json:"worktree_path"`
|
|
}
|
|
|
|
// TaskReady What the agent last told the human to do with the task: merge (ready_for_merge) or discard (suggest_discard); absent when it hasn't, or when a snapshot other than an answer's or a new question came after.
|
|
type TaskReady string
|
|
|
|
// TaskState What the task is doing, kept by the store in the same transaction as every change to it (a task.state event carries each change): merged or discarded once closed, else discarding, merging, the state of its agent's latest live session when that isn't idle, reviewing while a review runs, review_pending between a turn's end and its snapshot's review starting or being skipped, idle, or no_agent.
|
|
type TaskState string
|
|
|
|
// TaskStatus defines model for Task.Status.
|
|
type TaskStatus string
|
|
|
|
// TaskChanges defines model for TaskChanges.
|
|
type TaskChanges struct {
|
|
// Base The commit or tree compared with: the merge-base of the task branch and the default branch, since, or the previous snapshot's tree.
|
|
Base string `json:"base"`
|
|
Files []FileChange `json:"files"`
|
|
|
|
// Tree Tree of the worktree as if everything were staged, or the snapshot's tree.
|
|
Tree string `json:"tree"`
|
|
}
|
|
|
|
// TaskCreate defines model for TaskCreate.
|
|
type TaskCreate struct {
|
|
// Model The agent's model when prompt is given.
|
|
Model *string `json:"model,omitempty"`
|
|
|
|
// Prompt Starts the task's agent with this as its first message, in the same request. Not with workflow.
|
|
Prompt *string `json:"prompt,omitempty"`
|
|
Title string `json:"title"`
|
|
|
|
// Workflow The name of a saved workflow to run instead of creating one task with no agent: each stage with no after stages becomes its own task, titled "<title>: <stage>", with the title as the run's brief. The response is the first of those tasks.
|
|
Workflow *string `json:"workflow,omitempty"`
|
|
}
|
|
|
|
// TaskTab defines model for TaskTab.
|
|
type TaskTab string
|
|
|
|
// TaskWorkflow The workflow a task froze when it was created, as it was then.
|
|
type TaskWorkflow struct {
|
|
// Definition The WorkflowDefinition as YAML.
|
|
Definition string `json:"definition"`
|
|
Name string `json:"name"`
|
|
}
|
|
|
|
// TeamMember defines model for TeamMember.
|
|
type TeamMember struct {
|
|
// Model The agent's model, which also picks its vendor.
|
|
Model string `json:"model"`
|
|
|
|
// Name The agent's name in the team, one line of 1 to 100 characters, unique within the team.
|
|
Name string `json:"name"`
|
|
|
|
// Prompt This agent's own instructions: its role in the team.
|
|
Prompt string `json:"prompt"`
|
|
}
|
|
|
|
// TerminalSize defines model for TerminalSize.
|
|
type TerminalSize struct {
|
|
Cols int `json:"cols"`
|
|
Rows int `json:"rows"`
|
|
}
|
|
|
|
// Todo defines model for Todo.
|
|
type Todo struct {
|
|
// Exists Whether the default branch has a TODO.md at its root.
|
|
Exists bool `json:"exists"`
|
|
Items []TodoItem `json:"items"`
|
|
}
|
|
|
|
// TodoItem defines model for TodoItem.
|
|
type TodoItem struct {
|
|
// Body The item's further lines
|
|
Body string `json:"body"`
|
|
|
|
// Section The text of the nearest heading above the item; empty when there is none.
|
|
Section string `json:"section"`
|
|
|
|
// Title The item's first line, without its list marker: the item's identity.
|
|
Title string `json:"title"`
|
|
}
|
|
|
|
// TodoStart defines model for TodoStart.
|
|
type TodoStart struct {
|
|
// Discuss Tell the agent the human wants to discuss the item in chat before anything is built.
|
|
Discuss *bool `json:"discuss,omitempty"`
|
|
Model *string `json:"model,omitempty"`
|
|
|
|
// Title The title of the item to start.
|
|
Title string `json:"title"`
|
|
}
|
|
|
|
// TurnRef defines model for TurnRef.
|
|
type TurnRef struct {
|
|
SessionId string `json:"session_id"`
|
|
TaskId string `json:"task_id"`
|
|
Vendor string `json:"vendor"`
|
|
}
|
|
|
|
// Unmerged defines model for Unmerged.
|
|
type Unmerged struct {
|
|
// Commits Commits on the task branch that aren't on the default branch.
|
|
Commits int `json:"commits"`
|
|
Deletions int `json:"deletions"`
|
|
|
|
// Files Files that differ from the merge base
|
|
Files int `json:"files"`
|
|
Insertions int `json:"insertions"`
|
|
|
|
// Uncommitted Paths with uncommitted changes in the worktree.
|
|
Uncommitted int `json:"uncommitted"`
|
|
}
|
|
|
|
// Usage defines model for Usage.
|
|
type Usage struct {
|
|
// Rejected Why the vendor is refusing work, such as a usage cap or depleted credits; absent while it isn't. A window at its limit also counts as rejected.
|
|
Rejected *string `json:"rejected,omitempty"`
|
|
|
|
// UpdatedAt When the numbers were current.
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
|
|
// Windows Independent meters, in the order to show them.
|
|
Windows []UsageWindow `json:"windows"`
|
|
}
|
|
|
|
// UsageCommands The shell command that reports each vendor's usage, keyed by vendor; empty uses what the vendor itself reports.
|
|
type UsageCommands struct {
|
|
Antigravity string `json:"antigravity"`
|
|
Claude string `json:"claude"`
|
|
Codex string `json:"codex"`
|
|
}
|
|
|
|
// UsageWindow defines model for UsageWindow.
|
|
type UsageWindow struct {
|
|
// Label Short name for the meter.
|
|
Label string `json:"label"`
|
|
|
|
// Limit The window's limit
|
|
Limit *float64 `json:"limit,omitempty"`
|
|
|
|
// ResetsAt When the meter resets.
|
|
ResetsAt *time.Time `json:"resets_at,omitempty"`
|
|
|
|
// Unit usd, tokens, requests or percent; selects formatting.
|
|
Unit string `json:"unit"`
|
|
|
|
// Used Amount used
|
|
Used float64 `json:"used"`
|
|
|
|
// WindowSeconds The window's length
|
|
WindowSeconds *int64 `json:"window_seconds,omitempty"`
|
|
}
|
|
|
|
// User defines model for User.
|
|
type User struct {
|
|
// Away While true, byre answers the questions agents ask in this user's tasks at once.
|
|
Away bool `json:"away"`
|
|
|
|
// DefaultModel The model the app starts new tasks on.
|
|
DefaultModel string `json:"default_model"`
|
|
DisplayName string `json:"display_name"`
|
|
GitEmail string `json:"git_email"`
|
|
GitName string `json:"git_name"`
|
|
Login string `json:"login"`
|
|
|
|
// NotificationPrefs Which task events notify this user in the macOS app.
|
|
NotificationPrefs NotificationPrefs `json:"notification_prefs"`
|
|
|
|
// ReviewModel The model that reviews this user's tasks
|
|
ReviewModel string `json:"review_model"`
|
|
|
|
// SecondReviewModel The model that reviews this user's tasks when review_model wrote the work under review.
|
|
SecondReviewModel string `json:"second_review_model"`
|
|
}
|
|
|
|
// UserUpdate defines model for UserUpdate.
|
|
type UserUpdate struct {
|
|
GitEmail string `json:"git_email"`
|
|
GitName string `json:"git_name"`
|
|
}
|
|
|
|
// WorkflowDefinition A workflow's file, which holds everything but its name: its stages, each run as its own task once the stages it comes after have finished. Sent and returned as YAML.
|
|
type WorkflowDefinition struct {
|
|
Description string `json:"description,omitempty"`
|
|
Stages []Stage `json:"stages"`
|
|
}
|
|
|
|
// WorkflowRun defines model for WorkflowRun.
|
|
type WorkflowRun struct {
|
|
Brief string `json:"brief"`
|
|
|
|
// Definition A workflow's file, which holds everything but its name: its stages, each run as its own task once the stages it comes after have finished. Sent and returned as YAML.
|
|
Definition WorkflowDefinition `json:"definition"`
|
|
|
|
// Finished Whether the final stage finished, which ends the run.
|
|
Finished bool `json:"finished"`
|
|
Name string `json:"name"`
|
|
Run string `json:"run"`
|
|
|
|
// Stages In the definition's order.
|
|
Stages []WorkflowRunStage `json:"stages"`
|
|
Title string `json:"title"`
|
|
}
|
|
|
|
// WorkflowRunStage defines model for WorkflowRunStage.
|
|
type WorkflowRunStage struct {
|
|
// After The stages it comes after, with the definition's defaults applied.
|
|
After []string `json:"after"`
|
|
|
|
// Attempts The tasks that ran the stage (the first, and forks of it), oldest first.
|
|
Attempts []StageAttempt `json:"attempts"`
|
|
Name string `json:"name"`
|
|
|
|
// State waiting: no task yet. Otherwise the state of its latest finished attempt, or of its latest attempt when none has finished.
|
|
State WorkflowRunStageState `json:"state"`
|
|
|
|
// WaitingOn The after stages with no finished attempt yet.
|
|
WaitingOn []string `json:"waiting_on"`
|
|
}
|
|
|
|
// WorkflowRunStageState waiting: no task yet. Otherwise the state of its latest finished attempt, or of its latest attempt when none has finished.
|
|
type WorkflowRunStageState string
|
|
|
|
// WorkflowSummary defines model for WorkflowSummary.
|
|
type WorkflowSummary struct {
|
|
Description string `json:"description"`
|
|
Name string `json:"name"`
|
|
}
|
|
|
|
// Zombie defines model for Zombie.
|
|
type Zombie struct {
|
|
Detail string `json:"detail"`
|
|
Kind ZombieKind `json:"kind"`
|
|
Pid *int `json:"pid,omitempty"`
|
|
SessionId *string `json:"session_id,omitempty"`
|
|
TaskId *string `json:"task_id,omitempty"`
|
|
}
|
|
|
|
// ZombieKind defines model for Zombie.Kind.
|
|
type ZombieKind string
|
|
|
|
// StreamEventsParams defines parameters for StreamEvents.
|
|
type StreamEventsParams struct {
|
|
After *int64 `form:"after,omitempty" json:"after,omitempty"`
|
|
TaskId *string `form:"task_id,omitempty" json:"task_id,omitempty"`
|
|
Lead *bool `form:"lead,omitempty" json:"lead,omitempty"`
|
|
LastEventID *int64 `json:"Last-Event-ID,omitempty"`
|
|
}
|
|
|
|
// ListInboxParams defines parameters for ListInbox.
|
|
type ListInboxParams struct {
|
|
ProjectId *string `form:"project_id,omitempty" json:"project_id,omitempty"`
|
|
TaskId *string `form:"task_id,omitempty" json:"task_id,omitempty"`
|
|
State *InboxState `form:"state,omitempty" json:"state,omitempty"`
|
|
}
|
|
|
|
// ListLeadEventsParams defines parameters for ListLeadEvents.
|
|
type ListLeadEventsParams struct {
|
|
Before *int64 `form:"before,omitempty" json:"before,omitempty"`
|
|
Turns *int `form:"turns,omitempty" json:"turns,omitempty"`
|
|
}
|
|
|
|
// GetTaskChangesParams defines parameters for GetTaskChanges.
|
|
type GetTaskChangesParams struct {
|
|
// Since A commit to compare with instead of the merge-base, such as a user.message event's head. Not allowed with snapshot.
|
|
Since *string `form:"since,omitempty" json:"since,omitempty"`
|
|
|
|
// Snapshot A snapshot's n: show the task as it was in that snapshot rather than the live worktree.
|
|
Snapshot *int `form:"snapshot,omitempty" json:"snapshot,omitempty"`
|
|
|
|
// Step With snapshot: compare with the previous snapshot (the snapshot commit's parent for the first one).
|
|
Step *bool `form:"step,omitempty" json:"step,omitempty"`
|
|
}
|
|
|
|
// GetTaskDiffParams defines parameters for GetTaskDiff.
|
|
type GetTaskDiffParams struct {
|
|
Base string `form:"base" json:"base"`
|
|
Tree string `form:"tree" json:"tree"`
|
|
Path string `form:"path" json:"path"`
|
|
OldPath *string `form:"old_path,omitempty" json:"old_path,omitempty"`
|
|
}
|
|
|
|
// GetTaskDirParams defines parameters for GetTaskDir.
|
|
type GetTaskDirParams struct {
|
|
// Path Slash-separated, relative to the worktree root; empty or absent for the root.
|
|
Path *string `form:"path,omitempty" json:"path,omitempty"`
|
|
}
|
|
|
|
// ListTaskEventsParams defines parameters for ListTaskEvents.
|
|
type ListTaskEventsParams struct {
|
|
After *int64 `form:"after,omitempty" json:"after,omitempty"`
|
|
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
|
|
}
|
|
|
|
// GetTaskFileParams defines parameters for GetTaskFile.
|
|
type GetTaskFileParams struct {
|
|
// Path Slash-separated, relative to the worktree root.
|
|
Path string `form:"path" json:"path"`
|
|
}
|
|
|
|
// GetTaskImageParams defines parameters for GetTaskImage.
|
|
type GetTaskImageParams struct {
|
|
Path string `form:"path" json:"path"`
|
|
}
|
|
|
|
// MergeTaskJSONBody defines parameters for MergeTask.
|
|
type MergeTaskJSONBody struct {
|
|
// AfterReview Merge once the running review of the latest snapshot finishes with no findings, instead of now.
|
|
AfterReview *bool `json:"after_review,omitempty"`
|
|
|
|
// MergeTitle The squash commit's title: one line, at most 72 characters. Required for target main.
|
|
MergeTitle *string `json:"merge_title,omitempty"`
|
|
|
|
// Target main (the default): squash onto the project's default branch. parent: merge into the parent task's branch; only for a subtask.
|
|
Target *MergeTaskJSONBodyTarget `json:"target,omitempty"`
|
|
}
|
|
|
|
// MergeTaskJSONBodyTarget defines parameters for MergeTask.
|
|
type MergeTaskJSONBodyTarget string
|
|
|
|
// GetTaskTerminalParams defines parameters for GetTaskTerminal.
|
|
type GetTaskTerminalParams struct {
|
|
Cols int `form:"cols" json:"cols"`
|
|
Rows int `form:"rows" json:"rows"`
|
|
}
|
|
|
|
// UpdateUsageCommandsJSONRequestBody defines body for UpdateUsageCommands for application/json ContentType.
|
|
type UpdateUsageCommandsJSONRequestBody = UsageCommands
|
|
|
|
// AnswerAgainJSONRequestBody defines body for AnswerAgain for application/json ContentType.
|
|
type AnswerAgainJSONRequestBody = InboxResponseCreate
|
|
|
|
// RespondInboxJSONRequestBody defines body for RespondInbox for application/json ContentType.
|
|
type RespondInboxJSONRequestBody = InboxRespond
|
|
|
|
// UpdateMeJSONRequestBody defines body for UpdateMe for application/json ContentType.
|
|
type UpdateMeJSONRequestBody = UserUpdate
|
|
|
|
// UpdateAwayJSONRequestBody defines body for UpdateAway for application/json ContentType.
|
|
type UpdateAwayJSONRequestBody = Away
|
|
|
|
// UpdateDefaultModelJSONRequestBody defines body for UpdateDefaultModel for application/json ContentType.
|
|
type UpdateDefaultModelJSONRequestBody = DefaultModel
|
|
|
|
// SetFocusJSONRequestBody defines body for SetFocus for application/json ContentType.
|
|
type SetFocusJSONRequestBody = Focus
|
|
|
|
// MessageLeadJSONRequestBody defines body for MessageLead for application/json ContentType.
|
|
type MessageLeadJSONRequestBody = MessageCreate
|
|
|
|
// UpdateNotificationPrefsJSONRequestBody defines body for UpdateNotificationPrefs for application/json ContentType.
|
|
type UpdateNotificationPrefsJSONRequestBody = NotificationPrefs
|
|
|
|
// SetPaneFocusJSONRequestBody defines body for SetPaneFocus for application/json ContentType.
|
|
type SetPaneFocusJSONRequestBody = PaneFocus
|
|
|
|
// UpdateReviewModelsJSONRequestBody defines body for UpdateReviewModels for application/json ContentType.
|
|
type UpdateReviewModelsJSONRequestBody = ReviewModels
|
|
|
|
// CreateProjectJSONRequestBody defines body for CreateProject for application/json ContentType.
|
|
type CreateProjectJSONRequestBody = ProjectCreate
|
|
|
|
// CreateTaskJSONRequestBody defines body for CreateTask for application/json ContentType.
|
|
type CreateTaskJSONRequestBody = TaskCreate
|
|
|
|
// StartTodoItemJSONRequestBody defines body for StartTodoItem for application/json ContentType.
|
|
type StartTodoItemJSONRequestBody = TodoStart
|
|
|
|
// SetFindingStateJSONRequestBody defines body for SetFindingState for application/json ContentType.
|
|
type SetFindingStateJSONRequestBody = FindingStateUpdate
|
|
|
|
// CompactSessionJSONRequestBody defines body for CompactSession for application/json ContentType.
|
|
type CompactSessionJSONRequestBody = CompactCreate
|
|
|
|
// SendMessageJSONRequestBody defines body for SendMessage for application/json ContentType.
|
|
type SendMessageJSONRequestBody = MessageCreate
|
|
|
|
// PostToBoardJSONRequestBody defines body for PostToBoard for application/json ContentType.
|
|
type PostToBoardJSONRequestBody = BoardPostCreate
|
|
|
|
// MergeTaskJSONRequestBody defines body for MergeTask for application/json ContentType.
|
|
type MergeTaskJSONRequestBody MergeTaskJSONBody
|
|
|
|
// CreateSessionJSONRequestBody defines body for CreateSession for application/json ContentType.
|
|
type CreateSessionJSONRequestBody = SessionCreate
|
|
|
|
// MarkSummaryReadJSONRequestBody defines body for MarkSummaryRead for application/json ContentType.
|
|
type MarkSummaryReadJSONRequestBody = SummaryRead
|
|
|
|
// ServerInterface represents all server handlers.
|
|
type ServerInterface interface {
|
|
|
|
// (POST /api/admin/permissions)
|
|
CheckPermissions(w http.ResponseWriter, r *http.Request)
|
|
|
|
// (GET /api/admin/status)
|
|
GetStatus(w http.ResponseWriter, r *http.Request)
|
|
|
|
// (GET /api/admin/usage-commands)
|
|
GetUsageCommands(w http.ResponseWriter, r *http.Request)
|
|
|
|
// (PUT /api/admin/usage-commands)
|
|
UpdateUsageCommands(w http.ResponseWriter, r *http.Request)
|
|
|
|
// (POST /api/blobs)
|
|
UploadBlob(w http.ResponseWriter, r *http.Request)
|
|
|
|
// (GET /api/blobs/{blobId})
|
|
GetBlob(w http.ResponseWriter, r *http.Request, blobId string)
|
|
|
|
// (GET /api/clients/connect)
|
|
ConnectClient(w http.ResponseWriter, r *http.Request)
|
|
|
|
// (GET /api/clients/transfers/{transferId})
|
|
GetClientTransfer(w http.ResponseWriter, r *http.Request, transferId string)
|
|
|
|
// (PUT /api/clients/transfers/{transferId})
|
|
PutClientTransfer(w http.ResponseWriter, r *http.Request, transferId string)
|
|
|
|
// (GET /api/events)
|
|
StreamEvents(w http.ResponseWriter, r *http.Request, params StreamEventsParams)
|
|
|
|
// (GET /api/inbox)
|
|
ListInbox(w http.ResponseWriter, r *http.Request, params ListInboxParams)
|
|
|
|
// (POST /api/inbox/answer-again)
|
|
AnswerAgain(w http.ResponseWriter, r *http.Request)
|
|
|
|
// (POST /api/inbox/responses)
|
|
RespondInbox(w http.ResponseWriter, r *http.Request)
|
|
|
|
// (GET /api/inbox/{itemId})
|
|
GetInboxItem(w http.ResponseWriter, r *http.Request, itemId string)
|
|
|
|
// (POST /api/inbox/{itemId}/dismiss)
|
|
DismissInbox(w http.ResponseWriter, r *http.Request, itemId string)
|
|
|
|
// (GET /api/me)
|
|
GetMe(w http.ResponseWriter, r *http.Request)
|
|
|
|
// (PUT /api/me)
|
|
UpdateMe(w http.ResponseWriter, r *http.Request)
|
|
|
|
// (PUT /api/me/away)
|
|
UpdateAway(w http.ResponseWriter, r *http.Request)
|
|
|
|
// (PUT /api/me/default-model)
|
|
UpdateDefaultModel(w http.ResponseWriter, r *http.Request)
|
|
|
|
// (GET /api/me/focus)
|
|
GetFocus(w http.ResponseWriter, r *http.Request)
|
|
|
|
// (PUT /api/me/focus)
|
|
SetFocus(w http.ResponseWriter, r *http.Request)
|
|
|
|
// (GET /api/me/lead/events)
|
|
ListLeadEvents(w http.ResponseWriter, r *http.Request, params ListLeadEventsParams)
|
|
|
|
// (POST /api/me/lead/messages)
|
|
MessageLead(w http.ResponseWriter, r *http.Request)
|
|
|
|
// (GET /api/me/lead/notes)
|
|
ListLeadNotes(w http.ResponseWriter, r *http.Request)
|
|
|
|
// (DELETE /api/me/lead/notes/{noteId})
|
|
DeleteLeadNote(w http.ResponseWriter, r *http.Request, noteId string)
|
|
|
|
// (GET /api/me/lead/sessions)
|
|
ListLeadSessions(w http.ResponseWriter, r *http.Request)
|
|
|
|
// (PUT /api/me/notifications)
|
|
UpdateNotificationPrefs(w http.ResponseWriter, r *http.Request)
|
|
|
|
// (PUT /api/me/pane-focus)
|
|
SetPaneFocus(w http.ResponseWriter, r *http.Request)
|
|
|
|
// (PUT /api/me/review-models)
|
|
UpdateReviewModels(w http.ResponseWriter, r *http.Request)
|
|
|
|
// (GET /api/me/summary-reads)
|
|
GetSummaryReads(w http.ResponseWriter, r *http.Request)
|
|
|
|
// (GET /api/projects)
|
|
ListProjects(w http.ResponseWriter, r *http.Request)
|
|
|
|
// (POST /api/projects)
|
|
CreateProject(w http.ResponseWriter, r *http.Request)
|
|
|
|
// (GET /api/projects/{projectId})
|
|
GetProject(w http.ResponseWriter, r *http.Request, projectId string)
|
|
|
|
// (GET /api/projects/{projectId}/tasks)
|
|
ListTasks(w http.ResponseWriter, r *http.Request, projectId string)
|
|
|
|
// (POST /api/projects/{projectId}/tasks)
|
|
CreateTask(w http.ResponseWriter, r *http.Request, projectId string)
|
|
|
|
// (GET /api/projects/{projectId}/todo)
|
|
GetTodo(w http.ResponseWriter, r *http.Request, projectId string)
|
|
|
|
// (POST /api/projects/{projectId}/todo/tasks)
|
|
StartTodoItem(w http.ResponseWriter, r *http.Request, projectId string)
|
|
|
|
// (PUT /api/reviews/{reviewId}/findings/{index})
|
|
SetFindingState(w http.ResponseWriter, r *http.Request, reviewId string, index int)
|
|
|
|
// (GET /api/sessions/{sessionId})
|
|
GetSession(w http.ResponseWriter, r *http.Request, sessionId string)
|
|
|
|
// (POST /api/sessions/{sessionId}/compact)
|
|
CompactSession(w http.ResponseWriter, r *http.Request, sessionId string)
|
|
|
|
// (POST /api/sessions/{sessionId}/interrupt)
|
|
InterruptSession(w http.ResponseWriter, r *http.Request, sessionId string)
|
|
|
|
// (POST /api/sessions/{sessionId}/messages)
|
|
SendMessage(w http.ResponseWriter, r *http.Request, sessionId string)
|
|
|
|
// (GET /api/tasks/{taskId})
|
|
GetTask(w http.ResponseWriter, r *http.Request, taskId string)
|
|
|
|
// (POST /api/tasks/{taskId}/board)
|
|
PostToBoard(w http.ResponseWriter, r *http.Request, taskId string)
|
|
|
|
// (GET /api/tasks/{taskId}/changes)
|
|
GetTaskChanges(w http.ResponseWriter, r *http.Request, taskId string, params GetTaskChangesParams)
|
|
|
|
// (GET /api/tasks/{taskId}/co-authors)
|
|
GetCoAuthors(w http.ResponseWriter, r *http.Request, taskId string)
|
|
|
|
// (GET /api/tasks/{taskId}/diff)
|
|
GetTaskDiff(w http.ResponseWriter, r *http.Request, taskId string, params GetTaskDiffParams)
|
|
|
|
// (GET /api/tasks/{taskId}/dir)
|
|
GetTaskDir(w http.ResponseWriter, r *http.Request, taskId string, params GetTaskDirParams)
|
|
|
|
// (POST /api/tasks/{taskId}/discard)
|
|
DiscardTask(w http.ResponseWriter, r *http.Request, taskId string)
|
|
|
|
// (GET /api/tasks/{taskId}/events)
|
|
ListTaskEvents(w http.ResponseWriter, r *http.Request, taskId string, params ListTaskEventsParams)
|
|
|
|
// (GET /api/tasks/{taskId}/file)
|
|
GetTaskFile(w http.ResponseWriter, r *http.Request, taskId string, params GetTaskFileParams)
|
|
|
|
// (GET /api/tasks/{taskId}/image)
|
|
GetTaskImage(w http.ResponseWriter, r *http.Request, taskId string, params GetTaskImageParams)
|
|
|
|
// (POST /api/tasks/{taskId}/merge)
|
|
MergeTask(w http.ResponseWriter, r *http.Request, taskId string)
|
|
|
|
// (DELETE /api/tasks/{taskId}/merge-after-review)
|
|
CancelMergeAfterReview(w http.ResponseWriter, r *http.Request, taskId string)
|
|
|
|
// (POST /api/tasks/{taskId}/merge-in)
|
|
MergeIn(w http.ResponseWriter, r *http.Request, taskId string)
|
|
|
|
// (GET /api/tasks/{taskId}/previews)
|
|
ListPreviews(w http.ResponseWriter, r *http.Request, taskId string)
|
|
|
|
// (DELETE /api/tasks/{taskId}/queue/{inputId})
|
|
WithdrawMessage(w http.ResponseWriter, r *http.Request, taskId string, inputId int64)
|
|
|
|
// (GET /api/tasks/{taskId}/reviews)
|
|
ListReviews(w http.ResponseWriter, r *http.Request, taskId string)
|
|
|
|
// (GET /api/tasks/{taskId}/sessions)
|
|
ListSessions(w http.ResponseWriter, r *http.Request, taskId string)
|
|
|
|
// (POST /api/tasks/{taskId}/sessions)
|
|
CreateSession(w http.ResponseWriter, r *http.Request, taskId string)
|
|
|
|
// (GET /api/tasks/{taskId}/snapshots)
|
|
ListSnapshots(w http.ResponseWriter, r *http.Request, taskId string)
|
|
|
|
// (POST /api/tasks/{taskId}/snapshots/{n}/fork)
|
|
ForkSnapshot(w http.ResponseWriter, r *http.Request, taskId string, n int)
|
|
|
|
// (PUT /api/tasks/{taskId}/summary-read)
|
|
MarkSummaryRead(w http.ResponseWriter, r *http.Request, taskId string)
|
|
|
|
// (GET /api/tasks/{taskId}/terminal)
|
|
GetTaskTerminal(w http.ResponseWriter, r *http.Request, taskId string, params GetTaskTerminalParams)
|
|
|
|
// (GET /api/tasks/{taskId}/unmerged)
|
|
GetUnmerged(w http.ResponseWriter, r *http.Request, taskId string)
|
|
|
|
// (GET /api/tasks/{taskId}/workflow)
|
|
GetTaskWorkflow(w http.ResponseWriter, r *http.Request, taskId string)
|
|
|
|
// (GET /api/tasks/{taskId}/workflow/run)
|
|
GetWorkflowRun(w http.ResponseWriter, r *http.Request, taskId string)
|
|
|
|
// (GET /api/workflows)
|
|
ListWorkflows(w http.ResponseWriter, r *http.Request)
|
|
|
|
// (DELETE /api/workflows/{name})
|
|
DeleteWorkflow(w http.ResponseWriter, r *http.Request, name string)
|
|
|
|
// (GET /api/workflows/{name})
|
|
GetWorkflow(w http.ResponseWriter, r *http.Request, name string)
|
|
|
|
// (PUT /api/workflows/{name})
|
|
PutWorkflow(w http.ResponseWriter, r *http.Request, name string)
|
|
}
|
|
|
|
// ServerInterfaceWrapper converts contexts to parameters.
|
|
type ServerInterfaceWrapper struct {
|
|
Handler ServerInterface
|
|
HandlerMiddlewares []MiddlewareFunc
|
|
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
|
|
}
|
|
|
|
type MiddlewareFunc func(http.Handler) http.Handler
|
|
|
|
// CheckPermissions operation middleware
|
|
func (siw *ServerInterfaceWrapper) CheckPermissions(w http.ResponseWriter, r *http.Request) {
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.CheckPermissions(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetStatus operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetStatus(w http.ResponseWriter, r *http.Request) {
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetStatus(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetUsageCommands operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetUsageCommands(w http.ResponseWriter, r *http.Request) {
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetUsageCommands(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// UpdateUsageCommands operation middleware
|
|
func (siw *ServerInterfaceWrapper) UpdateUsageCommands(w http.ResponseWriter, r *http.Request) {
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.UpdateUsageCommands(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// UploadBlob operation middleware
|
|
func (siw *ServerInterfaceWrapper) UploadBlob(w http.ResponseWriter, r *http.Request) {
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.UploadBlob(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetBlob operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetBlob(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "blobId" -------------
|
|
var blobId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "blobId", r.PathValue("blobId"), &blobId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "blobId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetBlob(w, r, blobId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ConnectClient operation middleware
|
|
func (siw *ServerInterfaceWrapper) ConnectClient(w http.ResponseWriter, r *http.Request) {
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ConnectClient(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetClientTransfer operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetClientTransfer(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "transferId" -------------
|
|
var transferId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "transferId", r.PathValue("transferId"), &transferId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "transferId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetClientTransfer(w, r, transferId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// PutClientTransfer operation middleware
|
|
func (siw *ServerInterfaceWrapper) PutClientTransfer(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "transferId" -------------
|
|
var transferId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "transferId", r.PathValue("transferId"), &transferId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "transferId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.PutClientTransfer(w, r, transferId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// StreamEvents operation middleware
|
|
func (siw *ServerInterfaceWrapper) StreamEvents(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params StreamEventsParams
|
|
|
|
// ------------- Optional query parameter "after" -------------
|
|
|
|
err = runtime.BindQueryParameterWithOptions("form", true, false, "after", r.URL.Query(), ¶ms.After, runtime.BindQueryParameterOptions{Type: "integer", Format: "int64"})
|
|
if err != nil {
|
|
var requiredError *runtime.RequiredParameterError
|
|
if errors.As(err, &requiredError) {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "after"})
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "after", Err: err})
|
|
}
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "task_id" -------------
|
|
|
|
err = runtime.BindQueryParameterWithOptions("form", true, false, "task_id", r.URL.Query(), ¶ms.TaskId, runtime.BindQueryParameterOptions{Type: "string", Format: ""})
|
|
if err != nil {
|
|
var requiredError *runtime.RequiredParameterError
|
|
if errors.As(err, &requiredError) {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "task_id"})
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "task_id", Err: err})
|
|
}
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "lead" -------------
|
|
|
|
err = runtime.BindQueryParameterWithOptions("form", true, false, "lead", r.URL.Query(), ¶ms.Lead, runtime.BindQueryParameterOptions{Type: "boolean", Format: ""})
|
|
if err != nil {
|
|
var requiredError *runtime.RequiredParameterError
|
|
if errors.As(err, &requiredError) {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "lead"})
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "lead", Err: err})
|
|
}
|
|
return
|
|
}
|
|
|
|
headers := r.Header
|
|
|
|
// ------------- Optional header parameter "Last-Event-ID" -------------
|
|
if valueList, found := headers[http.CanonicalHeaderKey("Last-Event-ID")]; found {
|
|
var LastEventID int64
|
|
n := len(valueList)
|
|
if n != 1 {
|
|
siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "Last-Event-ID", Count: n})
|
|
return
|
|
}
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "Last-Event-ID", valueList[0], &LastEventID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false, Type: "integer", Format: "int64"})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "Last-Event-ID", Err: err})
|
|
return
|
|
}
|
|
|
|
params.LastEventID = &LastEventID
|
|
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.StreamEvents(w, r, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ListInbox operation middleware
|
|
func (siw *ServerInterfaceWrapper) ListInbox(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params ListInboxParams
|
|
|
|
// ------------- Optional query parameter "project_id" -------------
|
|
|
|
err = runtime.BindQueryParameterWithOptions("form", true, false, "project_id", r.URL.Query(), ¶ms.ProjectId, runtime.BindQueryParameterOptions{Type: "string", Format: ""})
|
|
if err != nil {
|
|
var requiredError *runtime.RequiredParameterError
|
|
if errors.As(err, &requiredError) {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "project_id"})
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "project_id", Err: err})
|
|
}
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "task_id" -------------
|
|
|
|
err = runtime.BindQueryParameterWithOptions("form", true, false, "task_id", r.URL.Query(), ¶ms.TaskId, runtime.BindQueryParameterOptions{Type: "string", Format: ""})
|
|
if err != nil {
|
|
var requiredError *runtime.RequiredParameterError
|
|
if errors.As(err, &requiredError) {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "task_id"})
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "task_id", Err: err})
|
|
}
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "state" -------------
|
|
|
|
err = runtime.BindQueryParameterWithOptions("form", true, false, "state", r.URL.Query(), ¶ms.State, runtime.BindQueryParameterOptions{Type: "string", Format: ""})
|
|
if err != nil {
|
|
var requiredError *runtime.RequiredParameterError
|
|
if errors.As(err, &requiredError) {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "state"})
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "state", Err: err})
|
|
}
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ListInbox(w, r, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// AnswerAgain operation middleware
|
|
func (siw *ServerInterfaceWrapper) AnswerAgain(w http.ResponseWriter, r *http.Request) {
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.AnswerAgain(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// RespondInbox operation middleware
|
|
func (siw *ServerInterfaceWrapper) RespondInbox(w http.ResponseWriter, r *http.Request) {
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.RespondInbox(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetInboxItem operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetInboxItem(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "itemId" -------------
|
|
var itemId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "itemId", r.PathValue("itemId"), &itemId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "itemId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetInboxItem(w, r, itemId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// DismissInbox operation middleware
|
|
func (siw *ServerInterfaceWrapper) DismissInbox(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "itemId" -------------
|
|
var itemId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "itemId", r.PathValue("itemId"), &itemId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "itemId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.DismissInbox(w, r, itemId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetMe operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetMe(w http.ResponseWriter, r *http.Request) {
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetMe(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// UpdateMe operation middleware
|
|
func (siw *ServerInterfaceWrapper) UpdateMe(w http.ResponseWriter, r *http.Request) {
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.UpdateMe(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// UpdateAway operation middleware
|
|
func (siw *ServerInterfaceWrapper) UpdateAway(w http.ResponseWriter, r *http.Request) {
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.UpdateAway(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// UpdateDefaultModel operation middleware
|
|
func (siw *ServerInterfaceWrapper) UpdateDefaultModel(w http.ResponseWriter, r *http.Request) {
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.UpdateDefaultModel(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetFocus operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetFocus(w http.ResponseWriter, r *http.Request) {
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetFocus(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// SetFocus operation middleware
|
|
func (siw *ServerInterfaceWrapper) SetFocus(w http.ResponseWriter, r *http.Request) {
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.SetFocus(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ListLeadEvents operation middleware
|
|
func (siw *ServerInterfaceWrapper) ListLeadEvents(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params ListLeadEventsParams
|
|
|
|
// ------------- Optional query parameter "before" -------------
|
|
|
|
err = runtime.BindQueryParameterWithOptions("form", true, false, "before", r.URL.Query(), ¶ms.Before, runtime.BindQueryParameterOptions{Type: "integer", Format: "int64"})
|
|
if err != nil {
|
|
var requiredError *runtime.RequiredParameterError
|
|
if errors.As(err, &requiredError) {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "before"})
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "before", Err: err})
|
|
}
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "turns" -------------
|
|
|
|
err = runtime.BindQueryParameterWithOptions("form", true, false, "turns", r.URL.Query(), ¶ms.Turns, runtime.BindQueryParameterOptions{Type: "integer", Format: ""})
|
|
if err != nil {
|
|
var requiredError *runtime.RequiredParameterError
|
|
if errors.As(err, &requiredError) {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "turns"})
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "turns", Err: err})
|
|
}
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ListLeadEvents(w, r, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// MessageLead operation middleware
|
|
func (siw *ServerInterfaceWrapper) MessageLead(w http.ResponseWriter, r *http.Request) {
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.MessageLead(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ListLeadNotes operation middleware
|
|
func (siw *ServerInterfaceWrapper) ListLeadNotes(w http.ResponseWriter, r *http.Request) {
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ListLeadNotes(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// DeleteLeadNote operation middleware
|
|
func (siw *ServerInterfaceWrapper) DeleteLeadNote(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "noteId" -------------
|
|
var noteId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "noteId", r.PathValue("noteId"), ¬eId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "noteId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.DeleteLeadNote(w, r, noteId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ListLeadSessions operation middleware
|
|
func (siw *ServerInterfaceWrapper) ListLeadSessions(w http.ResponseWriter, r *http.Request) {
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ListLeadSessions(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// UpdateNotificationPrefs operation middleware
|
|
func (siw *ServerInterfaceWrapper) UpdateNotificationPrefs(w http.ResponseWriter, r *http.Request) {
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.UpdateNotificationPrefs(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// SetPaneFocus operation middleware
|
|
func (siw *ServerInterfaceWrapper) SetPaneFocus(w http.ResponseWriter, r *http.Request) {
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.SetPaneFocus(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// UpdateReviewModels operation middleware
|
|
func (siw *ServerInterfaceWrapper) UpdateReviewModels(w http.ResponseWriter, r *http.Request) {
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.UpdateReviewModels(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetSummaryReads operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetSummaryReads(w http.ResponseWriter, r *http.Request) {
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetSummaryReads(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ListProjects operation middleware
|
|
func (siw *ServerInterfaceWrapper) ListProjects(w http.ResponseWriter, r *http.Request) {
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ListProjects(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// CreateProject operation middleware
|
|
func (siw *ServerInterfaceWrapper) CreateProject(w http.ResponseWriter, r *http.Request) {
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.CreateProject(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetProject operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetProject(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "projectId" -------------
|
|
var projectId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "projectId", r.PathValue("projectId"), &projectId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetProject(w, r, projectId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ListTasks operation middleware
|
|
func (siw *ServerInterfaceWrapper) ListTasks(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "projectId" -------------
|
|
var projectId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "projectId", r.PathValue("projectId"), &projectId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ListTasks(w, r, projectId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// CreateTask operation middleware
|
|
func (siw *ServerInterfaceWrapper) CreateTask(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "projectId" -------------
|
|
var projectId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "projectId", r.PathValue("projectId"), &projectId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.CreateTask(w, r, projectId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetTodo operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetTodo(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "projectId" -------------
|
|
var projectId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "projectId", r.PathValue("projectId"), &projectId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetTodo(w, r, projectId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// StartTodoItem operation middleware
|
|
func (siw *ServerInterfaceWrapper) StartTodoItem(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "projectId" -------------
|
|
var projectId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "projectId", r.PathValue("projectId"), &projectId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "projectId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.StartTodoItem(w, r, projectId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// SetFindingState operation middleware
|
|
func (siw *ServerInterfaceWrapper) SetFindingState(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "reviewId" -------------
|
|
var reviewId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "reviewId", r.PathValue("reviewId"), &reviewId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "reviewId", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "index" -------------
|
|
var index int
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "index", r.PathValue("index"), &index, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "integer", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "index", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.SetFindingState(w, r, reviewId, index)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetSession operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetSession(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "sessionId" -------------
|
|
var sessionId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "sessionId", r.PathValue("sessionId"), &sessionId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "sessionId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetSession(w, r, sessionId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// CompactSession operation middleware
|
|
func (siw *ServerInterfaceWrapper) CompactSession(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "sessionId" -------------
|
|
var sessionId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "sessionId", r.PathValue("sessionId"), &sessionId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "sessionId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.CompactSession(w, r, sessionId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// InterruptSession operation middleware
|
|
func (siw *ServerInterfaceWrapper) InterruptSession(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "sessionId" -------------
|
|
var sessionId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "sessionId", r.PathValue("sessionId"), &sessionId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "sessionId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.InterruptSession(w, r, sessionId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// SendMessage operation middleware
|
|
func (siw *ServerInterfaceWrapper) SendMessage(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "sessionId" -------------
|
|
var sessionId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "sessionId", r.PathValue("sessionId"), &sessionId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "sessionId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.SendMessage(w, r, sessionId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetTask operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetTask(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "taskId" -------------
|
|
var taskId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetTask(w, r, taskId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// PostToBoard operation middleware
|
|
func (siw *ServerInterfaceWrapper) PostToBoard(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "taskId" -------------
|
|
var taskId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.PostToBoard(w, r, taskId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetTaskChanges operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetTaskChanges(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "taskId" -------------
|
|
var taskId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
|
|
return
|
|
}
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params GetTaskChangesParams
|
|
|
|
// ------------- Optional query parameter "since" -------------
|
|
|
|
err = runtime.BindQueryParameterWithOptions("form", true, false, "since", r.URL.Query(), ¶ms.Since, runtime.BindQueryParameterOptions{Type: "string", Format: ""})
|
|
if err != nil {
|
|
var requiredError *runtime.RequiredParameterError
|
|
if errors.As(err, &requiredError) {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "since"})
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "since", Err: err})
|
|
}
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "snapshot" -------------
|
|
|
|
err = runtime.BindQueryParameterWithOptions("form", true, false, "snapshot", r.URL.Query(), ¶ms.Snapshot, runtime.BindQueryParameterOptions{Type: "integer", Format: ""})
|
|
if err != nil {
|
|
var requiredError *runtime.RequiredParameterError
|
|
if errors.As(err, &requiredError) {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "snapshot"})
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "snapshot", Err: err})
|
|
}
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "step" -------------
|
|
|
|
err = runtime.BindQueryParameterWithOptions("form", true, false, "step", r.URL.Query(), ¶ms.Step, runtime.BindQueryParameterOptions{Type: "boolean", Format: ""})
|
|
if err != nil {
|
|
var requiredError *runtime.RequiredParameterError
|
|
if errors.As(err, &requiredError) {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "step"})
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "step", Err: err})
|
|
}
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetTaskChanges(w, r, taskId, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetCoAuthors operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetCoAuthors(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "taskId" -------------
|
|
var taskId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetCoAuthors(w, r, taskId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetTaskDiff operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetTaskDiff(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "taskId" -------------
|
|
var taskId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
|
|
return
|
|
}
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params GetTaskDiffParams
|
|
|
|
// ------------- Required query parameter "base" -------------
|
|
|
|
err = runtime.BindQueryParameterWithOptions("form", true, true, "base", r.URL.Query(), ¶ms.Base, runtime.BindQueryParameterOptions{Type: "string", Format: ""})
|
|
if err != nil {
|
|
var requiredError *runtime.RequiredParameterError
|
|
if errors.As(err, &requiredError) {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "base"})
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "base", Err: err})
|
|
}
|
|
return
|
|
}
|
|
|
|
// ------------- Required query parameter "tree" -------------
|
|
|
|
err = runtime.BindQueryParameterWithOptions("form", true, true, "tree", r.URL.Query(), ¶ms.Tree, runtime.BindQueryParameterOptions{Type: "string", Format: ""})
|
|
if err != nil {
|
|
var requiredError *runtime.RequiredParameterError
|
|
if errors.As(err, &requiredError) {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "tree"})
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "tree", Err: err})
|
|
}
|
|
return
|
|
}
|
|
|
|
// ------------- Required query parameter "path" -------------
|
|
|
|
err = runtime.BindQueryParameterWithOptions("form", true, true, "path", r.URL.Query(), ¶ms.Path, runtime.BindQueryParameterOptions{Type: "string", Format: ""})
|
|
if err != nil {
|
|
var requiredError *runtime.RequiredParameterError
|
|
if errors.As(err, &requiredError) {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "path"})
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "path", Err: err})
|
|
}
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "old_path" -------------
|
|
|
|
err = runtime.BindQueryParameterWithOptions("form", true, false, "old_path", r.URL.Query(), ¶ms.OldPath, runtime.BindQueryParameterOptions{Type: "string", Format: ""})
|
|
if err != nil {
|
|
var requiredError *runtime.RequiredParameterError
|
|
if errors.As(err, &requiredError) {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "old_path"})
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "old_path", Err: err})
|
|
}
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetTaskDiff(w, r, taskId, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetTaskDir operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetTaskDir(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "taskId" -------------
|
|
var taskId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
|
|
return
|
|
}
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params GetTaskDirParams
|
|
|
|
// ------------- Optional query parameter "path" -------------
|
|
|
|
err = runtime.BindQueryParameterWithOptions("form", true, false, "path", r.URL.Query(), ¶ms.Path, runtime.BindQueryParameterOptions{Type: "string", Format: ""})
|
|
if err != nil {
|
|
var requiredError *runtime.RequiredParameterError
|
|
if errors.As(err, &requiredError) {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "path"})
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "path", Err: err})
|
|
}
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetTaskDir(w, r, taskId, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// DiscardTask operation middleware
|
|
func (siw *ServerInterfaceWrapper) DiscardTask(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "taskId" -------------
|
|
var taskId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.DiscardTask(w, r, taskId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ListTaskEvents operation middleware
|
|
func (siw *ServerInterfaceWrapper) ListTaskEvents(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "taskId" -------------
|
|
var taskId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
|
|
return
|
|
}
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params ListTaskEventsParams
|
|
|
|
// ------------- Optional query parameter "after" -------------
|
|
|
|
err = runtime.BindQueryParameterWithOptions("form", true, false, "after", r.URL.Query(), ¶ms.After, runtime.BindQueryParameterOptions{Type: "integer", Format: "int64"})
|
|
if err != nil {
|
|
var requiredError *runtime.RequiredParameterError
|
|
if errors.As(err, &requiredError) {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "after"})
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "after", Err: err})
|
|
}
|
|
return
|
|
}
|
|
|
|
// ------------- Optional query parameter "limit" -------------
|
|
|
|
err = runtime.BindQueryParameterWithOptions("form", true, false, "limit", r.URL.Query(), ¶ms.Limit, runtime.BindQueryParameterOptions{Type: "integer", Format: ""})
|
|
if err != nil {
|
|
var requiredError *runtime.RequiredParameterError
|
|
if errors.As(err, &requiredError) {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "limit"})
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err})
|
|
}
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ListTaskEvents(w, r, taskId, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetTaskFile operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetTaskFile(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "taskId" -------------
|
|
var taskId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
|
|
return
|
|
}
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params GetTaskFileParams
|
|
|
|
// ------------- Required query parameter "path" -------------
|
|
|
|
err = runtime.BindQueryParameterWithOptions("form", true, true, "path", r.URL.Query(), ¶ms.Path, runtime.BindQueryParameterOptions{Type: "string", Format: ""})
|
|
if err != nil {
|
|
var requiredError *runtime.RequiredParameterError
|
|
if errors.As(err, &requiredError) {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "path"})
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "path", Err: err})
|
|
}
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetTaskFile(w, r, taskId, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetTaskImage operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetTaskImage(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "taskId" -------------
|
|
var taskId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
|
|
return
|
|
}
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params GetTaskImageParams
|
|
|
|
// ------------- Required query parameter "path" -------------
|
|
|
|
err = runtime.BindQueryParameterWithOptions("form", true, true, "path", r.URL.Query(), ¶ms.Path, runtime.BindQueryParameterOptions{Type: "string", Format: ""})
|
|
if err != nil {
|
|
var requiredError *runtime.RequiredParameterError
|
|
if errors.As(err, &requiredError) {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "path"})
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "path", Err: err})
|
|
}
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetTaskImage(w, r, taskId, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// MergeTask operation middleware
|
|
func (siw *ServerInterfaceWrapper) MergeTask(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "taskId" -------------
|
|
var taskId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.MergeTask(w, r, taskId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// CancelMergeAfterReview operation middleware
|
|
func (siw *ServerInterfaceWrapper) CancelMergeAfterReview(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "taskId" -------------
|
|
var taskId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.CancelMergeAfterReview(w, r, taskId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// MergeIn operation middleware
|
|
func (siw *ServerInterfaceWrapper) MergeIn(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "taskId" -------------
|
|
var taskId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.MergeIn(w, r, taskId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ListPreviews operation middleware
|
|
func (siw *ServerInterfaceWrapper) ListPreviews(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "taskId" -------------
|
|
var taskId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ListPreviews(w, r, taskId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// WithdrawMessage operation middleware
|
|
func (siw *ServerInterfaceWrapper) WithdrawMessage(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "taskId" -------------
|
|
var taskId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "inputId" -------------
|
|
var inputId int64
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "inputId", r.PathValue("inputId"), &inputId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "integer", Format: "int64", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "inputId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.WithdrawMessage(w, r, taskId, inputId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ListReviews operation middleware
|
|
func (siw *ServerInterfaceWrapper) ListReviews(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "taskId" -------------
|
|
var taskId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ListReviews(w, r, taskId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ListSessions operation middleware
|
|
func (siw *ServerInterfaceWrapper) ListSessions(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "taskId" -------------
|
|
var taskId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ListSessions(w, r, taskId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// CreateSession operation middleware
|
|
func (siw *ServerInterfaceWrapper) CreateSession(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "taskId" -------------
|
|
var taskId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.CreateSession(w, r, taskId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ListSnapshots operation middleware
|
|
func (siw *ServerInterfaceWrapper) ListSnapshots(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "taskId" -------------
|
|
var taskId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ListSnapshots(w, r, taskId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ForkSnapshot operation middleware
|
|
func (siw *ServerInterfaceWrapper) ForkSnapshot(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "taskId" -------------
|
|
var taskId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
|
|
return
|
|
}
|
|
|
|
// ------------- Path parameter "n" -------------
|
|
var n int
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "n", r.PathValue("n"), &n, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "integer", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "n", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ForkSnapshot(w, r, taskId, n)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// MarkSummaryRead operation middleware
|
|
func (siw *ServerInterfaceWrapper) MarkSummaryRead(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "taskId" -------------
|
|
var taskId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.MarkSummaryRead(w, r, taskId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetTaskTerminal operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetTaskTerminal(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "taskId" -------------
|
|
var taskId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
|
|
return
|
|
}
|
|
|
|
// Parameter object where we will unmarshal all parameters from the context
|
|
var params GetTaskTerminalParams
|
|
|
|
// ------------- Required query parameter "cols" -------------
|
|
|
|
err = runtime.BindQueryParameterWithOptions("form", true, true, "cols", r.URL.Query(), ¶ms.Cols, runtime.BindQueryParameterOptions{Type: "integer", Format: ""})
|
|
if err != nil {
|
|
var requiredError *runtime.RequiredParameterError
|
|
if errors.As(err, &requiredError) {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "cols"})
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "cols", Err: err})
|
|
}
|
|
return
|
|
}
|
|
|
|
// ------------- Required query parameter "rows" -------------
|
|
|
|
err = runtime.BindQueryParameterWithOptions("form", true, true, "rows", r.URL.Query(), ¶ms.Rows, runtime.BindQueryParameterOptions{Type: "integer", Format: ""})
|
|
if err != nil {
|
|
var requiredError *runtime.RequiredParameterError
|
|
if errors.As(err, &requiredError) {
|
|
siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "rows"})
|
|
} else {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "rows", Err: err})
|
|
}
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetTaskTerminal(w, r, taskId, params)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetUnmerged operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetUnmerged(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "taskId" -------------
|
|
var taskId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetUnmerged(w, r, taskId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetTaskWorkflow operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetTaskWorkflow(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "taskId" -------------
|
|
var taskId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetTaskWorkflow(w, r, taskId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetWorkflowRun operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetWorkflowRun(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "taskId" -------------
|
|
var taskId string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "taskId", r.PathValue("taskId"), &taskId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "taskId", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetWorkflowRun(w, r, taskId)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// ListWorkflows operation middleware
|
|
func (siw *ServerInterfaceWrapper) ListWorkflows(w http.ResponseWriter, r *http.Request) {
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.ListWorkflows(w, r)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// DeleteWorkflow operation middleware
|
|
func (siw *ServerInterfaceWrapper) DeleteWorkflow(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "name" -------------
|
|
var name string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "name", r.PathValue("name"), &name, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "name", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.DeleteWorkflow(w, r, name)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// GetWorkflow operation middleware
|
|
func (siw *ServerInterfaceWrapper) GetWorkflow(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "name" -------------
|
|
var name string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "name", r.PathValue("name"), &name, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "name", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.GetWorkflow(w, r, name)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
// PutWorkflow operation middleware
|
|
func (siw *ServerInterfaceWrapper) PutWorkflow(w http.ResponseWriter, r *http.Request) {
|
|
|
|
var err error
|
|
_ = err
|
|
|
|
// ------------- Path parameter "name" -------------
|
|
var name string
|
|
|
|
err = runtime.BindStyledParameterWithOptions("simple", "name", r.PathValue("name"), &name, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true, Type: "string", Format: "", ValueIsUnescaped: true})
|
|
if err != nil {
|
|
siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "name", Err: err})
|
|
return
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.PutWorkflow(w, r, name)
|
|
}))
|
|
|
|
for _, middleware := range siw.HandlerMiddlewares {
|
|
handler = middleware(handler)
|
|
}
|
|
|
|
handler.ServeHTTP(w, r)
|
|
}
|
|
|
|
type UnescapedCookieParamError struct {
|
|
ParamName string
|
|
Err error
|
|
}
|
|
|
|
func (e *UnescapedCookieParamError) Error() string {
|
|
return fmt.Sprintf("error unescaping cookie parameter '%s'", e.ParamName)
|
|
}
|
|
|
|
func (e *UnescapedCookieParamError) Unwrap() error {
|
|
return e.Err
|
|
}
|
|
|
|
type UnmarshalingParamError struct {
|
|
ParamName string
|
|
Err error
|
|
}
|
|
|
|
func (e *UnmarshalingParamError) Error() string {
|
|
return fmt.Sprintf("Error unmarshaling parameter %s as JSON: %s", e.ParamName, e.Err.Error())
|
|
}
|
|
|
|
func (e *UnmarshalingParamError) Unwrap() error {
|
|
return e.Err
|
|
}
|
|
|
|
type RequiredParamError struct {
|
|
ParamName string
|
|
}
|
|
|
|
func (e *RequiredParamError) Error() string {
|
|
return fmt.Sprintf("Query argument %s is required, but not found", e.ParamName)
|
|
}
|
|
|
|
type RequiredHeaderError struct {
|
|
ParamName string
|
|
Err error
|
|
}
|
|
|
|
func (e *RequiredHeaderError) Error() string {
|
|
return fmt.Sprintf("Header parameter %s is required, but not found", e.ParamName)
|
|
}
|
|
|
|
func (e *RequiredHeaderError) Unwrap() error {
|
|
return e.Err
|
|
}
|
|
|
|
type InvalidParamFormatError struct {
|
|
ParamName string
|
|
Err error
|
|
}
|
|
|
|
func (e *InvalidParamFormatError) Error() string {
|
|
return fmt.Sprintf("Invalid format for parameter %s: %s", e.ParamName, e.Err.Error())
|
|
}
|
|
|
|
func (e *InvalidParamFormatError) Unwrap() error {
|
|
return e.Err
|
|
}
|
|
|
|
type TooManyValuesForParamError struct {
|
|
ParamName string
|
|
Count int
|
|
}
|
|
|
|
func (e *TooManyValuesForParamError) Error() string {
|
|
return fmt.Sprintf("Expected one value for %s, got %d", e.ParamName, e.Count)
|
|
}
|
|
|
|
// Handler creates http.Handler with routing matching OpenAPI spec.
|
|
func Handler(si ServerInterface) http.Handler {
|
|
return HandlerWithOptions(si, StdHTTPServerOptions{})
|
|
}
|
|
|
|
// ServeMux is an abstraction of [http.ServeMux].
|
|
type ServeMux interface {
|
|
HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request))
|
|
http.Handler
|
|
}
|
|
|
|
type StdHTTPServerOptions struct {
|
|
BaseURL string
|
|
BaseRouter ServeMux
|
|
Middlewares []MiddlewareFunc
|
|
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
|
|
}
|
|
|
|
// HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
|
|
func HandlerFromMux(si ServerInterface, m ServeMux) http.Handler {
|
|
return HandlerWithOptions(si, StdHTTPServerOptions{
|
|
BaseRouter: m,
|
|
})
|
|
}
|
|
|
|
func HandlerFromMuxWithBaseURL(si ServerInterface, m ServeMux, baseURL string) http.Handler {
|
|
return HandlerWithOptions(si, StdHTTPServerOptions{
|
|
BaseURL: baseURL,
|
|
BaseRouter: m,
|
|
})
|
|
}
|
|
|
|
// HandlerWithOptions creates http.Handler with additional options
|
|
func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler {
|
|
m := options.BaseRouter
|
|
|
|
if m == nil {
|
|
m = http.NewServeMux()
|
|
}
|
|
if options.ErrorHandlerFunc == nil {
|
|
options.ErrorHandlerFunc = func(w http.ResponseWriter, r *http.Request, err error) {
|
|
http.Error(w, err.Error(), http.StatusBadRequest)
|
|
}
|
|
}
|
|
|
|
wrapper := ServerInterfaceWrapper{
|
|
Handler: si,
|
|
HandlerMiddlewares: options.Middlewares,
|
|
ErrorHandlerFunc: options.ErrorHandlerFunc,
|
|
}
|
|
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/me", wrapper.GetMe)
|
|
m.HandleFunc(http.MethodPut+" "+options.BaseURL+"/api/me", wrapper.UpdateMe)
|
|
m.HandleFunc(http.MethodPut+" "+options.BaseURL+"/api/me/notifications", wrapper.UpdateNotificationPrefs)
|
|
m.HandleFunc(http.MethodPut+" "+options.BaseURL+"/api/me/default-model", wrapper.UpdateDefaultModel)
|
|
m.HandleFunc(http.MethodPut+" "+options.BaseURL+"/api/me/away", wrapper.UpdateAway)
|
|
m.HandleFunc(http.MethodPut+" "+options.BaseURL+"/api/me/review-models", wrapper.UpdateReviewModels)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/me/lead/sessions", wrapper.ListLeadSessions)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/me/lead/events", wrapper.ListLeadEvents)
|
|
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/me/lead/messages", wrapper.MessageLead)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/me/lead/notes", wrapper.ListLeadNotes)
|
|
m.HandleFunc(http.MethodDelete+" "+options.BaseURL+"/api/me/lead/notes/{noteId}", wrapper.DeleteLeadNote)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/me/focus", wrapper.GetFocus)
|
|
m.HandleFunc(http.MethodPut+" "+options.BaseURL+"/api/me/focus", wrapper.SetFocus)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/me/summary-reads", wrapper.GetSummaryReads)
|
|
m.HandleFunc(http.MethodPut+" "+options.BaseURL+"/api/me/pane-focus", wrapper.SetPaneFocus)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/projects", wrapper.ListProjects)
|
|
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/projects", wrapper.CreateProject)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/projects/{projectId}", wrapper.GetProject)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/projects/{projectId}/tasks", wrapper.ListTasks)
|
|
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/projects/{projectId}/tasks", wrapper.CreateTask)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/projects/{projectId}/todo", wrapper.GetTodo)
|
|
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/projects/{projectId}/todo/tasks", wrapper.StartTodoItem)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}", wrapper.GetTask)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/workflow", wrapper.GetTaskWorkflow)
|
|
m.HandleFunc(http.MethodPut+" "+options.BaseURL+"/api/tasks/{taskId}/summary-read", wrapper.MarkSummaryRead)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/workflow/run", wrapper.GetWorkflowRun)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/unmerged", wrapper.GetUnmerged)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/co-authors", wrapper.GetCoAuthors)
|
|
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/tasks/{taskId}/merge", wrapper.MergeTask)
|
|
m.HandleFunc(http.MethodDelete+" "+options.BaseURL+"/api/tasks/{taskId}/merge-after-review", wrapper.CancelMergeAfterReview)
|
|
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/tasks/{taskId}/merge-in", wrapper.MergeIn)
|
|
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/tasks/{taskId}/discard", wrapper.DiscardTask)
|
|
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/tasks/{taskId}/board", wrapper.PostToBoard)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/events", wrapper.ListTaskEvents)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/changes", wrapper.GetTaskChanges)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/image", wrapper.GetTaskImage)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/diff", wrapper.GetTaskDiff)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/dir", wrapper.GetTaskDir)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/file", wrapper.GetTaskFile)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/terminal", wrapper.GetTaskTerminal)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/previews", wrapper.ListPreviews)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/snapshots", wrapper.ListSnapshots)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/reviews", wrapper.ListReviews)
|
|
m.HandleFunc(http.MethodPut+" "+options.BaseURL+"/api/reviews/{reviewId}/findings/{index}", wrapper.SetFindingState)
|
|
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/tasks/{taskId}/snapshots/{n}/fork", wrapper.ForkSnapshot)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/tasks/{taskId}/sessions", wrapper.ListSessions)
|
|
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/tasks/{taskId}/sessions", wrapper.CreateSession)
|
|
m.HandleFunc(http.MethodDelete+" "+options.BaseURL+"/api/tasks/{taskId}/queue/{inputId}", wrapper.WithdrawMessage)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/sessions/{sessionId}", wrapper.GetSession)
|
|
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/sessions/{sessionId}/messages", wrapper.SendMessage)
|
|
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/sessions/{sessionId}/compact", wrapper.CompactSession)
|
|
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/sessions/{sessionId}/interrupt", wrapper.InterruptSession)
|
|
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/blobs", wrapper.UploadBlob)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/blobs/{blobId}", wrapper.GetBlob)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/inbox", wrapper.ListInbox)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/inbox/{itemId}", wrapper.GetInboxItem)
|
|
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/inbox/{itemId}/dismiss", wrapper.DismissInbox)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/clients/connect", wrapper.ConnectClient)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/clients/transfers/{transferId}", wrapper.GetClientTransfer)
|
|
m.HandleFunc(http.MethodPut+" "+options.BaseURL+"/api/clients/transfers/{transferId}", wrapper.PutClientTransfer)
|
|
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/inbox/responses", wrapper.RespondInbox)
|
|
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/inbox/answer-again", wrapper.AnswerAgain)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/events", wrapper.StreamEvents)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/admin/status", wrapper.GetStatus)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/admin/usage-commands", wrapper.GetUsageCommands)
|
|
m.HandleFunc(http.MethodPut+" "+options.BaseURL+"/api/admin/usage-commands", wrapper.UpdateUsageCommands)
|
|
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/admin/permissions", wrapper.CheckPermissions)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/workflows", wrapper.ListWorkflows)
|
|
m.HandleFunc(http.MethodDelete+" "+options.BaseURL+"/api/workflows/{name}", wrapper.DeleteWorkflow)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/workflows/{name}", wrapper.GetWorkflow)
|
|
m.HandleFunc(http.MethodPut+" "+options.BaseURL+"/api/workflows/{name}", wrapper.PutWorkflow)
|
|
|
|
return m
|
|
}
|
|
|
|
// Base64 encoded, compressed with deflate, json marshaled OpenAPI spec.
|
|
// Stored as a slice of fixed-width chunks rather than one concatenated
|
|
// const string: with thousands of chunks the chained `+` fold is several
|
|
// times slower for the Go compiler than parsing a slice literal.
|
|
var swaggerSpec = []string{
|
|
"7L39cxs3lij6r6D4XpWs3RblzGT2vZXq/eDE+fC+OPG1lJvaO5PiQmyQxKgJ0ABasuLy/dtvnQ+g0U00",
|
|
"ScmW45nsLzbVjcbHwcHB+T7vJnO73lijTPCTs3cTp/zGGq/wj2+csw5+zK0JygT4KTebRs9l0Nac/t1b",
|
|
"A8/8fKXWEn79304tJmeT/+u06/WU3vpT6u39+/fVpFZ+7vQGOpmc0TDTCbzgttDVs6Uy4ZWzc+Xx742z",
|
|
"G+WCpqmtlGzCCn71+/KhnV+LtZLGCylC64zQXrjWGG2WQppaGCt8cEquhbpRJoiV9EI6p29ULRbWCexh",
|
|
"JhdBuZlXc2tqfy7UWx1Uzf2GlRIbmhh0vrRGTSfVRJl2PTn768ReTyqaBzzEDye/VpNwt1E4QafNclJN",
|
|
"3p7AByc30hm5hkX9dfI9Luon+I5+XnAv9Nc33Nf7atJIH2Y4/5kM21D4ZaVMb5rQXtw6G5SQotFGiWCF",
|
|
"Dp5BMakmC+vW0NWklkGdBL1Wk2pinbiFrnQQPkgXVD2dnJm2aYbLeV9NNrqGifBzbYJaKgcvvPJeWzPr",
|
|
"ve++80EGBW+kF9YI3PYL+iQN1l/d5UoJ7vTIC/q+MKEg/fXYoDfK1NYVXr2vJk69abVTNexINveuw/Q5",
|
|
"LTouYbgrVUTSbvPt1d/VPMAE8mVuY/fcKRlUzXtb3JqtJcVvru6KK15Yd516HGCLDivB7xfOrs8QdWiN",
|
|
"R17oWtgFPkIsCis4SfAnfCKuldr4SkixVt7LJT4VXzeyrZX42taqiscQn9tavZ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pn30zmSS",
|
|
"5mnMeaOViaOheFxoymoLcPVE4zVWFkgvYwVWKS55khf6t86pRDF41Fsd3VZonWwMR8o7t7USXz59+jSZ",
|
|
"zKE5QDC0PsUGKOl3OrDF8Q/zYYM92UlKdjopj3g+wwY/vNOhl9wXT7/YRtELLGfXoWWHsBtng53b5o/t",
|
|
"6tkaYrj3V04aipaAyXwjoFfDmD2itgrq7hdjO3+Ooz9mdYQ4xliFBH4fb5vpP9kOxyzXOwXC2KjjABfO",
|
|
"/pbCl1DNOUcGuq6yNApASafiBxmUE6rWbE8iTbHPhUbsu7bmKDCYR/hCpk2/xDk/ssEyjTPmJgpAMGkF",
|
|
"n7+0Fmd66lqz2+YT/dqGm+Rak1kPFRQe9yLYs5ijRBvKGNtHlE5MQIdCVARQ2FuQQcX4LXdHnyDRkCGo",
|
|
"9YYK9Fed9yM/9iyc0RWdJQaIfALIZiMYFHf1dfuoeULzYcZUvK058gnWnyH6xG3frdv9JbX6FMqUOBqz",
|
|
"0IfoVDBPUcLhI4qPZlqU2nV2y5znTRA4fQfvDqhjN06cdtSxE0Bu+Lok0qoDFg/kHBlzu7l7EH6MJXB7",
|
|
"GAm9k0Pn/IPc6TPIg9fAGR79OIPnHdGQXvzns5c/4BUiTRYDwgHtMVPYI50U/O9jyMNRl4RhKptGzjPn",
|
|
"5ryiBIEDZJ9xYGAk8H9c/PRj1OUA6mqfPOSAQn8hghVfPH3a85DLMCpKzoRZvZkMcayUc63tY8sh0vBB",
|
|
"iPLpclpv0YydpZoH9/m9qvW8f/9/BgA=",
|
|
}
|
|
|
|
// decodeSpec returns the embedded OpenAPI spec as raw JSON bytes,
|
|
// after base64-decoding and flate-decompressing the embedded blob.
|
|
func decodeSpec() ([]byte, error) {
|
|
encoded := strings.Join(swaggerSpec, "")
|
|
compressed, err := base64.StdEncoding.DecodeString(encoded)
|
|
if err != nil {
|
|
return nil, fmt.Errorf("error base64 decoding spec: %w", err)
|
|
}
|
|
zr := flate.NewReader(bytes.NewReader(compressed))
|
|
var buf bytes.Buffer
|
|
if _, err := buf.ReadFrom(zr); err != nil {
|
|
return nil, fmt.Errorf("read flate: %w", err)
|
|
}
|
|
if err := zr.Close(); err != nil {
|
|
return nil, fmt.Errorf("close flate reader: %w", err)
|
|
}
|
|
|
|
return buf.Bytes(), nil
|
|
}
|
|
|
|
var rawSpec = decodeSpecCached()
|
|
|
|
// a naive cache of the decoded OpenAPI spec
|
|
func decodeSpecCached() func() ([]byte, error) {
|
|
data, err := decodeSpec()
|
|
return func() ([]byte, error) {
|
|
return data, err
|
|
}
|
|
}
|
|
|
|
// Constructs a synthetic filesystem for resolving external references when loading openapi specifications.
|
|
func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error) {
|
|
res := make(map[string]func() ([]byte, error))
|
|
if len(pathToFile) > 0 {
|
|
res[pathToFile] = rawSpec
|
|
}
|
|
|
|
return res
|
|
}
|
|
|
|
// GetSpec returns the OpenAPI specification corresponding to the generated
|
|
// code in this file. External references in the spec are resolved through
|
|
// PathToRawSpec; externally-referenced files must be embedded in their
|
|
// corresponding Go packages (via the import-mapping feature). URL-based
|
|
// external refs are not supported.
|
|
func GetSpec() (swagger *openapi3.T, err error) {
|
|
resolvePath := PathToRawSpec("")
|
|
|
|
loader := openapi3.NewLoader()
|
|
loader.IsExternalRefsAllowed = true
|
|
loader.ReadFromURIFunc = func(loader *openapi3.Loader, url *url.URL) ([]byte, error) {
|
|
pathToFile := url.String()
|
|
pathToFile = path.Clean(pathToFile)
|
|
getSpec, ok := resolvePath[pathToFile]
|
|
if !ok {
|
|
err1 := fmt.Errorf("path not found: %s", pathToFile)
|
|
return nil, err1
|
|
}
|
|
return getSpec()
|
|
}
|
|
var specData []byte
|
|
specData, err = rawSpec()
|
|
if err != nil {
|
|
return
|
|
}
|
|
swagger, err = loader.LoadFromData(specData)
|
|
if err != nil {
|
|
return
|
|
}
|
|
return
|
|
}
|
|
|
|
// GetSpecJSON returns the raw JSON bytes of the embedded OpenAPI
|
|
// specification: decompressed but not unmarshaled. External references
|
|
// are not resolved here; the bytes are the spec exactly as embedded by
|
|
// codegen. The result is cached at package init time, so repeated calls
|
|
// are cheap.
|
|
func GetSpecJSON() ([]byte, error) {
|
|
return rawSpec()
|
|
}
|
|
|
|
// GetSwagger returns the OpenAPI specification corresponding to the
|
|
// generated code in this file.
|
|
//
|
|
// Deprecated: GetSwagger predates kin-openapi renaming openapi3.Swagger
|
|
// to openapi3.T. Use [GetSpec] instead. This wrapper is retained for
|
|
// backwards compatibility.
|
|
func GetSwagger() (*openapi3.T, error) {
|
|
return GetSpec()
|
|
}
|