4128 lines
152 KiB
Go
4128 lines
152 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"
|
|
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 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 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 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"
|
|
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 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 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"
|
|
TabQuestions TaskTab = "questions"
|
|
TabReviews TaskTab = "reviews"
|
|
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 TabQuestions:
|
|
return true
|
|
case TabReviews:
|
|
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
|
|
|
|
// 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.
|
|
Data *[]byte `json:"data,omitempty"`
|
|
|
|
// Error Set when the request couldn't be carried out.
|
|
Error *string `json:"error,omitempty"`
|
|
|
|
// ExitCode bash: 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.
|
|
Output *string `json:"output,omitempty"`
|
|
|
|
// Result hands: the tool's MCP CallToolResult.
|
|
Result *map[string]interface{} `json:"result,omitempty"`
|
|
}
|
|
|
|
// ClientRequest Work a task agent 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.
|
|
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"`
|
|
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: 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"`
|
|
}
|
|
|
|
// 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"`
|
|
|
|
// Tabs The tabs the lead put first, in order. The other task tabs follow them.
|
|
Tabs []TaskTab `json:"tabs"`
|
|
|
|
// 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 on a pick-any question: optional text sent along with the checked 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 new questions, finished turns, errors and rate limits notify this user in their open byre pages.
|
|
type NotificationPrefs struct {
|
|
// Errors session.error events on tasks.
|
|
Errors bool `json:"errors"`
|
|
|
|
// Questions Questions. On by default.
|
|
Questions bool `json:"questions"`
|
|
|
|
// RateLimits session.rate_limited events on tasks.
|
|
RateLimits bool `json:"rate_limits"`
|
|
|
|
// Reports Task turns that end with a summary (turn.ended with summary: true).
|
|
Reports bool `json:"reports"`
|
|
}
|
|
|
|
// 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"`
|
|
}
|
|
|
|
// 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"`
|
|
|
|
// 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
|
|
|
|
// 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. 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. 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 The latest rate-limit status each vendor reported, keyed by vendor.
|
|
RateLimits map[string]map[string]interface{} `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"`
|
|
|
|
// 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"`
|
|
}
|
|
|
|
// 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"`
|
|
}
|
|
|
|
// User defines model for User.
|
|
type User struct {
|
|
// 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 new questions, finished turns, errors and rate limits notify this user in their open byre pages.
|
|
NotificationPrefs NotificationPrefs `json:"notification_prefs"`
|
|
}
|
|
|
|
// 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"`
|
|
}
|
|
|
|
// RespondInboxJSONRequestBody defines body for RespondInbox for application/json ContentType.
|
|
type RespondInboxJSONRequestBody = InboxRespond
|
|
|
|
// UpdateMeJSONRequestBody defines body for UpdateMe for application/json ContentType.
|
|
type UpdateMeJSONRequestBody = UserUpdate
|
|
|
|
// 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
|
|
|
|
// 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 {
|
|
|
|
// (GET /api/admin/status)
|
|
GetStatus(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/responses)
|
|
RespondInbox(w http.ResponseWriter, r *http.Request)
|
|
|
|
// (GET /api/inbox/{itemId})
|
|
GetInboxItem(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/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)
|
|
|
|
// (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)
|
|
|
|
// (POST /api/reviews/{reviewId}/stop)
|
|
StopReview(w http.ResponseWriter, r *http.Request, reviewId string)
|
|
|
|
// (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
|
|
|
|
// 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)
|
|
}
|
|
|
|
// 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)
|
|
}
|
|
|
|
// 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)
|
|
}
|
|
|
|
// 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)
|
|
}
|
|
|
|
// 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)
|
|
}
|
|
|
|
// 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)
|
|
}
|
|
|
|
// StopReview operation middleware
|
|
func (siw *ServerInterfaceWrapper) StopReview(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
|
|
}
|
|
|
|
handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
siw.Handler.StopReview(w, r, reviewId)
|
|
}))
|
|
|
|
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.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/reviews/{reviewId}/stop", wrapper.StopReview)
|
|
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.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.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/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{
|
|
"7L1rcxs5lij4VxDcjZA1k6Lk7prZHTn2g9t2VXu2XeWxVLdibneFBmKCJFpJgAWAklkO399+4zyARCaR",
|
|
"ZEq2XO6p+8WmMpF4HBwcnPf5MJnZ1doaZYKfnH+YOOXX1niFf7xyzjr4MbMmKBPgp1yvGz2TQVtz+ndv",
|
|
"DTzzs6VaSfj1fzs1n5xP/q/TttdTeutPqbePHz9Wk1r5mdNr6GRyTsNMJ/CC20JXzxfKhLfOzpTHv9fO",
|
|
"rpULmqa2VLIJS/jV7cuHzexGrJQ0XkgRNs4I7YXbGKPNQkhTC2OFD07JlVC3ygSxlF5I5/StqsXcOoE9",
|
|
"XMl5UO7Kq5k1tX8m1HsdVM39hqUSa5oYdL6wRk0n1USZzWpy/teJvZlUNA94iB9Ofq4mYbtWOEGnzWJS",
|
|
"Td6fwAcnt9IZuYJF/XXyZ1zUD/Ad/bzgXuivV9zXx2rSSB+ucP5XMuxC4aelMp1pQntx52xQQopGGyWC",
|
|
"FTp4BsWkmsytW0FXk1oGdRL0Sk2qiXXiDrrSQfggXVD1dHJuNk3TX87HarLWNUyEn2sT1EI5eOGV99qa",
|
|
"q8779jsfZFDwRnphjcBtv6BP0mDd1V0uleBOj7yg7wsTCtLfDA16q0xtXeHVx2ri1C8b7VQNO5LNve0w",
|
|
"fU6Ljkvo70oVkbTdfHv9dzULMIF8mbvYPXNKBlXz3ha3ZmdJ8ZvrbXHFc+tuUo89bNFhKfj93NnVOaIO",
|
|
"rfHIC10LO8dHiEVhCScJ/oRPxI1Sa18JKVbKe7nAp+JFIze1Ei9srap4DPG5rdX7aWn22fC7E3yOQx15",
|
|
"MdfOMyoKp/xmpeA0as+TjVhRidkmCBlEWnQlNqZWTkhh1B23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io5kWpXat3TLneRMETj/AuxF18IaJ0546eALIDV+XRFp1wOKDnCNjZtfb",
|
|
"B+HHUAK3h5HQrew7549yp88gD14D53j04wxetkRDevGfz9/8Ba8QabIYEA5oj5nCHumk4H+fQx6OuiQM",
|
|
"U1k3cpY5N+eFRAgcIPsMAwMjgf/94ofvoy4HUFf75CEHFPqpCFY8PTvreMhlGBUlZ8Kszkz6OFbKubbp",
|
|
"YssYaXgUony5VOY7NGNvqefefX6vIk0fP/7vAQA=",
|
|
}
|
|
|
|
// 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()
|
|
}
|