3798 lines
138 KiB
Go
3798 lines
138 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 (
|
|
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 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 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 InboxItemKind.
|
|
const (
|
|
Question InboxItemKind = "question"
|
|
RateLimited InboxItemKind = "rate_limited"
|
|
SessionError InboxItemKind = "session_error"
|
|
)
|
|
|
|
// Valid indicates whether the value is a known member of the InboxItemKind enum.
|
|
func (e InboxItemKind) Valid() bool {
|
|
switch e {
|
|
case Question:
|
|
return true
|
|
case RateLimited:
|
|
return true
|
|
case SessionError:
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|
|
|
|
// Defines values for InboxResponseType.
|
|
const (
|
|
Dismiss InboxResponseType = "dismiss"
|
|
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 Dismiss:
|
|
return true
|
|
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 (
|
|
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 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 (
|
|
TabChanges TaskTab = "changes"
|
|
TabFiles TaskTab = "files"
|
|
TabInbox TaskTab = "inbox"
|
|
TabProject TaskTab = "project"
|
|
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 TabChanges:
|
|
return true
|
|
case TabFiles:
|
|
return true
|
|
case TabInbox:
|
|
return true
|
|
case TabProject:
|
|
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"`
|
|
|
|
// 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"`
|
|
|
|
// 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, every other model on Claude Code.
|
|
Vendor AgentSessionVendor `json:"vendor"`
|
|
|
|
// VendorSessionId Claude Code's session id, chosen by byre; or the Codex thread id, empty until the session's first turn starts its thread.
|
|
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, 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"`
|
|
}
|
|
|
|
// 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 defines model for InboxItem.
|
|
type InboxItem struct {
|
|
AgentSessionId string `json:"agent_session_id"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
Id string `json:"id"`
|
|
Kind InboxItemKind `json:"kind"`
|
|
|
|
// Payload question: 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. session_error: error. rate_limited: vendor, rate_limit (the vendor's rate-limit status), error.
|
|
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"`
|
|
}
|
|
|
|
// InboxItemKind defines model for InboxItem.Kind.
|
|
type InboxItemKind string
|
|
|
|
// 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"`
|
|
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 inbox items and finished turns notify this user in their open byre pages.
|
|
type NotificationPrefs struct {
|
|
// Errors session_error items.
|
|
Errors bool `json:"errors"`
|
|
|
|
// Questions Questions. On by default.
|
|
Questions bool `json:"questions"`
|
|
|
|
// RateLimits rate_limited items.
|
|
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 browser 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. 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. 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"`
|
|
|
|
// 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, every other model on Claude Code.
|
|
Model string `json:"model"`
|
|
|
|
// Name One line of 1 to 100 characters, unique within the workflow.
|
|
Name string `json:"name"`
|
|
|
|
// Prompt The stage agent's instructions.
|
|
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"`
|
|
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"`
|
|
}
|
|
|
|
// 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 {
|
|
DisplayName string `json:"display_name"`
|
|
GitEmail string `json:"git_email"`
|
|
GitName string `json:"git_name"`
|
|
Login string `json:"login"`
|
|
|
|
// NotificationPrefs Which new inbox items and finished turns 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
|
|
|
|
// 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
|
|
|
|
// SendMessageJSONRequestBody defines body for SendMessage for application/json ContentType.
|
|
type SendMessageJSONRequestBody = MessageCreate
|
|
|
|
// 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/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)
|
|
|
|
// (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)
|
|
|
|
// (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)
|
|
|
|
// (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)
|
|
}
|
|
|
|
// 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)
|
|
}
|
|
|
|
// 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)
|
|
}
|
|
|
|
// 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)
|
|
}
|
|
|
|
// 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.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.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.MethodGet+" "+options.BaseURL+"/api/sessions/{sessionId}", wrapper.GetSession)
|
|
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/sessions/{sessionId}/messages", wrapper.SendMessage)
|
|
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/sessions/{sessionId}/compact", wrapper.CompactSession)
|
|
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/sessions/{sessionId}/interrupt", wrapper.InterruptSession)
|
|
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/blobs", wrapper.UploadBlob)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/blobs/{blobId}", wrapper.GetBlob)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/inbox", wrapper.ListInbox)
|
|
m.HandleFunc(http.MethodGet+" "+options.BaseURL+"/api/inbox/{itemId}", wrapper.GetInboxItem)
|
|
m.HandleFunc(http.MethodPost+" "+options.BaseURL+"/api/inbox/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{
|
|
"7H1/cxu3kuBXQfGuStbuiLLfy97dSnV/6NlO4r048VnKufbeS2lBDkjiaQiMAYwoxuXvfoXuBgYzxJAj",
|
|
"2bL9NvdPIg9ngEaj0ejf/WEy1+taK6GcnZx9mBhha62sgH+8NEYb/8dcKyeU83/yuq7knDup1enfrVb+",
|
|
"mZ2vxJr7v/6rEYvJ2eS/nLajnuKv9hRH+/jxYzEphZ0bWftBJmc4zXTif6B3/VAXS6HcG6PnwsK/a6Nr",
|
|
"YZxE0FaCV27l/+qOZV0zv2FrwZVlnLnGKCYtM41SUi0ZVyVTmllnBF8zcSuUYytuGTdG3oqSLbRhMMI1",
|
|
"Xzhhrq2Ya1XacybupBMljetWgtUImB98qZWYToqJUM16cvbXib6ZFAiHfwgfTn4rJm5bCwDQSLWcFJO7",
|
|
"E//ByS03iq/9ov46+REW9Yv/Dv+8pFHwXy9prI/FpOLWXQP819ztYuHdSqgOmP59tjHaCcZZJZVgTjPp",
|
|
"LKFiUkwW2qz9UJOSO3Hi5FpMiok2bOOHko5Zx40T5XRyppqq6i/nYzGpZekBoedSObEUxv9ghbVSq+vO",
|
|
"7+131nEngLIs04rBtl/iJ3Gy7uquVoLRoEd+Bf77DECO25uhSW+FKpG0ez99LCZGvG+kEaXfkQT2dsD4",
|
|
"OS46LKG/K0Ug0nbz9ezvYu48AOkyd6l7bgR3oqS9zW7NzpLCN7NtdsULbW7iiD1qkW7F6PeF0eszIB1c",
|
|
"45FlsmR6AY+AitzKnyT/T/8JuxGitgXjbC2s5Ut4yp5XvCkFe65LUYRjCM91Ke6mOeiT6XcBvICpjixb",
|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ozxjb/vP3n1+r/YeHz/+vwAAAP//",
|
|
}
|
|
|
|
// 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()
|
|
}
|