client

package
v0.1.694 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentCreateRequest

type AgentCreateRequest struct {
	Password string `json:"password,omitempty"`
}

type AgentRegisterRequest

type AgentRegisterRequest struct {
	ID       string `json:"id"`
	Password string `json:"password"`
}

type AgentRequest

type AgentRequest struct {
	ID              string  `json:"id"`
	Password        string  `json:"password"`
	ProjectID       int64   `json:"project_id,omitempty"`
	TicketID        *string `json:"ticket_id,omitempty"`
	DryRun          bool    `json:"dry_run,omitempty"`
	ConfigUpdatedAt string  `json:"config_updated_at,omitempty"`
}

type AgentTicketUpdateRequest

type AgentTicketUpdateRequest struct {
	ID       string `json:"id"`
	Password string `json:"password"`
	Result   string `json:"result"`
}

type AgentUpdateRequest

type AgentUpdateRequest struct {
	Password *string `json:"password,omitempty"`
}

type AgentWorkResponse

type AgentWorkResponse struct {
	Status          string                    `json:"status"`
	Project         *store.Project            `json:"project"`
	Ticket          *store.Ticket             `json:"ticket"`
	Parents         []store.Ticket            `json:"parents"`
	Workflow        *store.WorkflowWithStages `json:"workflow,omitempty"`
	Role            *store.Role               `json:"role,omitempty"`
	Config          map[string]string         `json:"config,omitempty"`
	ConfigUpdatedAt string                    `json:"config_updated_at,omitempty"`
}

type AuthResponse

type AuthResponse struct {
	Token string     `json:"token"`
	User  store.User `json:"user"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(cfg config.Config) *Client

func (*Client) AddComment

func (c *Client) AddComment(id string, comment string) (store.Comment, error)

func (*Client) AddDependency

func (c *Client) AddDependency(request DependencyRequest) (store.Dependency, error)

func (*Client) AddProjectMember

func (c *Client) AddProjectMember(projectID int64, request ProjectMemberRequest) (store.ProjectMember, error)

func (*Client) AddProjectTeamMember

func (c *Client) AddProjectTeamMember(projectID int64, request ProjectTeamMemberRequest) (store.ProjectTeamMember, error)

func (*Client) AddTeamAgent

func (c *Client) AddTeamAgent(teamID int64, agentID string) (store.TeamAgent, error)

func (*Client) AddTeamMember

func (c *Client) AddTeamMember(teamID int64, request TeamMemberRequest) (store.TeamMember, error)

func (*Client) AddTicketLabel

func (c *Client) AddTicketLabel(ticketID string, labelID int64) error

func (*Client) AddWorkflowStage

func (c *Client) AddWorkflowStage(workflowID int64, request WorkflowStageRequest) (store.WorkflowStage, error)

func (*Client) AgentUpdateTicket

func (c *Client) AgentUpdateTicket(id string, request AgentTicketUpdateRequest) (store.Ticket, error)

func (*Client) ArchiveTicket

func (c *Client) ArchiveTicket(id string) (store.Ticket, error)

func (*Client) CloneTicket

func (c *Client) CloneTicket(id string) (store.Ticket, error)

func (*Client) CloseTicket

func (c *Client) CloseTicket(id string) (store.Ticket, error)

func (*Client) Count

func (c *Client) Count(projectID *int64) (CountSummary, error)

func (*Client) CreateAgent

func (c *Client) CreateAgent(request AgentCreateRequest) (store.Agent, string, error)

func (*Client) CreateLabel

func (c *Client) CreateLabel(projectID int64, request libticket.LabelRequest) (store.Label, error)

func (*Client) CreateProject

func (c *Client) CreateProject(request ProjectCreateRequest) (store.Project, error)

func (*Client) CreateRole

func (c *Client) CreateRole(request RoleRequest) (store.Role, error)

func (*Client) CreateStory

func (c *Client) CreateStory(projectID int64, title, description string) (store.Story, error)

func (*Client) CreateTeam

func (c *Client) CreateTeam(request TeamRequest) (store.Team, error)

func (*Client) CreateTicket

func (c *Client) CreateTicket(request TicketCreateRequest) (store.Ticket, error)

func (*Client) CreateUser

func (c *Client) CreateUser(username, password string) (store.User, error)

func (*Client) CreateWorkflow

func (c *Client) CreateWorkflow(request WorkflowRequest) (store.Workflow, error)

func (*Client) DeleteAgent

func (c *Client) DeleteAgent(id string) error

func (*Client) DeleteAgentConfig

func (c *Client) DeleteAgentConfig(agentID string, key string) error

func (*Client) DeleteLabel

func (c *Client) DeleteLabel(id int64) error

func (*Client) DeleteProject

func (c *Client) DeleteProject(id int64) error

func (*Client) DeleteRole

func (c *Client) DeleteRole(id int64) error

func (*Client) DeleteStory

func (c *Client) DeleteStory(id int64) error

func (*Client) DeleteTeam

func (c *Client) DeleteTeam(id int64) error

func (*Client) DeleteTicket

func (c *Client) DeleteTicket(id string) error

func (*Client) DeleteTimeEntry

func (c *Client) DeleteTimeEntry(id int64) error

func (*Client) DeleteUser

func (c *Client) DeleteUser(username string) error

func (*Client) DeleteWorkflow

func (c *Client) DeleteWorkflow(id int64) error

func (*Client) ExportWorkflow

func (c *Client) ExportWorkflow(id int64) (store.WorkflowExport, error)

func (*Client) GetProject

func (c *Client) GetProject(id string) (store.Project, error)

func (*Client) GetStory

func (c *Client) GetStory(id int64) (store.Story, error)

func (*Client) GetTicket

func (c *Client) GetTicket(ref string) (store.Ticket, error)

func (*Client) GetTicketByID

func (c *Client) GetTicketByID(id string) (store.Ticket, error)

func (*Client) GetWorkflow

func (c *Client) GetWorkflow(id int64) (store.WorkflowWithStages, error)

func (*Client) HeartbeatAgent

func (c *Client) HeartbeatAgent(agentID, password, status string) error

func (*Client) ImportWorkflow

func (c *Client) ImportWorkflow(export store.WorkflowExport) (store.Workflow, error)

func (*Client) ListAgentConfig

func (c *Client) ListAgentConfig(agentID string) ([]store.AgentConfigEntry, error)

func (*Client) ListAgentStatuses

func (c *Client) ListAgentStatuses() ([]store.AgentStatus, error)

func (*Client) ListAgents

func (c *Client) ListAgents() ([]store.Agent, error)

func (*Client) ListComments

func (c *Client) ListComments(id string) ([]store.Comment, error)

func (*Client) ListDependencies

func (c *Client) ListDependencies(id string) ([]store.Dependency, error)

func (*Client) ListHistory

func (c *Client) ListHistory(id string) ([]store.HistoryEvent, error)

func (*Client) ListLabels

func (c *Client) ListLabels(projectID int64) ([]store.Label, error)

func (*Client) ListProjectHistory

func (c *Client) ListProjectHistory(projectID int64, limit int) ([]store.HistoryEvent, error)

func (*Client) ListProjectMembers

func (c *Client) ListProjectMembers(projectID int64) ([]store.ProjectMember, error)

func (*Client) ListProjectTeamMembers

func (c *Client) ListProjectTeamMembers(projectID int64) ([]store.ProjectTeamMember, error)

func (*Client) ListProjects

func (c *Client) ListProjects() ([]store.Project, error)

func (*Client) ListRoles

func (c *Client) ListRoles() ([]store.Role, error)

func (*Client) ListStories

func (c *Client) ListStories(projectID int64) ([]store.Story, error)

func (*Client) ListTeamAgents

func (c *Client) ListTeamAgents(teamID int64) ([]store.TeamAgent, error)

func (*Client) ListTeamMembers

func (c *Client) ListTeamMembers(teamID int64) ([]store.TeamMember, error)

func (*Client) ListTeams

func (c *Client) ListTeams() ([]store.Team, error)

func (*Client) ListTicketLabels

func (c *Client) ListTicketLabels(ticketID string) ([]store.Label, error)

func (*Client) ListTickets

func (c *Client) ListTickets(projectID int64) ([]store.Ticket, error)

func (*Client) ListTicketsFiltered

func (c *Client) ListTicketsFiltered(projectID int64, ticketType, stage, state, status, search, assignee string, limit int, includeArchived bool) ([]store.Ticket, error)

func (*Client) ListTimeEntries

func (c *Client) ListTimeEntries(ticketID string) ([]store.TimeEntry, error)

func (*Client) ListUsers

func (c *Client) ListUsers() ([]store.User, error)

func (*Client) ListWorkflows

func (c *Client) ListWorkflows() ([]store.Workflow, error)

func (*Client) LogTime

func (c *Client) LogTime(ticketID string, request libticket.TimeEntryRequest) (store.TimeEntry, error)

func (*Client) Login

func (c *Client) Login(username, password string) (AuthResponse, error)

func (*Client) Logout

func (c *Client) Logout() error

func (*Client) NotReadyTicket

func (c *Client) NotReadyTicket(id string) (store.Ticket, error)

func (*Client) OpenTicket

func (c *Client) OpenTicket(id string) (store.Ticket, error)

func (*Client) ReadyTicket

func (c *Client) ReadyTicket(id string) (store.Ticket, error)

func (*Client) Register

func (c *Client) Register(username, password string) (store.User, error)

func (*Client) RegisterAgent

func (c *Client) RegisterAgent(request AgentRegisterRequest) (store.Agent, error)

func (*Client) RemoveDependency

func (c *Client) RemoveDependency(request DependencyRequest) error

func (*Client) RemoveProjectMember

func (c *Client) RemoveProjectMember(projectID int64, userID string) error

func (*Client) RemoveProjectTeamMember

func (c *Client) RemoveProjectTeamMember(projectID, teamID int64) error

func (*Client) RemoveTeamAgent

func (c *Client) RemoveTeamAgent(teamID int64, agentID string) error

func (*Client) RemoveTeamMember

func (c *Client) RemoveTeamMember(teamID int64, userID string) error

func (*Client) RemoveTicketLabel

func (c *Client) RemoveTicketLabel(ticketID string, labelID int64) error

func (*Client) RemoveWorkflowStage

func (c *Client) RemoveWorkflowStage(stageID int64) error

func (*Client) ReorderWorkflowStages

func (c *Client) ReorderWorkflowStages(workflowID int64, stageIDs []int64) error

func (*Client) RequestAgentWork

func (c *Client) RequestAgentWork(request AgentRequest) (AgentWorkResponse, error)

func (*Client) RequestTicket

func (c *Client) RequestTicket(request TicketRequest) (TicketRequestResponse, error)

func (*Client) ResetUserPassword

func (c *Client) ResetUserPassword(username, newPassword string) (store.User, error)

func (*Client) SetAgentConfig

func (c *Client) SetAgentConfig(agentID string, key, value string) error

func (*Client) SetAgentEnabled

func (c *Client) SetAgentEnabled(id string, enabled bool) (store.Agent, error)

func (*Client) SetProjectEnabled

func (c *Client) SetProjectEnabled(id int64, enabled bool) (store.Project, error)

func (*Client) SetRegistrationEnabled

func (c *Client) SetRegistrationEnabled(enabled bool) error

func (*Client) SetTicketHealth

func (c *Client) SetTicketHealth(id string, score int) (store.Ticket, error)

func (*Client) SetTicketParent

func (c *Client) SetTicketParent(id, parentID string) (store.Ticket, error)

func (*Client) SetTicketWorkflow

func (c *Client) SetTicketWorkflow(id string, workflowID int64) (store.Ticket, error)

func (*Client) SetUserEnabled

func (c *Client) SetUserEnabled(username string, enabled bool) error

func (*Client) Status

func (c *Client) Status() (StatusResponse, error)

func (*Client) TotalTimeForTicket

func (c *Client) TotalTimeForTicket(ticketID string) (int, error)

func (*Client) UnarchiveTicket

func (c *Client) UnarchiveTicket(id string) (store.Ticket, error)

func (*Client) UnsetTicketParent

func (c *Client) UnsetTicketParent(id string) (store.Ticket, error)

func (*Client) UnsetTicketWorkflow

func (c *Client) UnsetTicketWorkflow(id string) (store.Ticket, error)

func (*Client) UpdateAgent

func (c *Client) UpdateAgent(id string, request AgentUpdateRequest) (store.Agent, error)

func (*Client) UpdateProject

func (c *Client) UpdateProject(id int64, request ProjectUpdateRequest) (store.Project, error)

func (*Client) UpdateRole

func (c *Client) UpdateRole(id int64, request RoleRequest) (store.Role, error)

func (*Client) UpdateStory

func (c *Client) UpdateStory(id int64, title, description string) (store.Story, error)

func (*Client) UpdateTeam

func (c *Client) UpdateTeam(id int64, request TeamRequest) (store.Team, error)

func (*Client) UpdateTicket

func (c *Client) UpdateTicket(id string, request TicketUpdateRequest) (store.Ticket, error)

type CommentCreateRequest

type CommentCreateRequest struct {
	Comment string `json:"comment"`
}

type CountSummary

type CountSummary = store.CountSummary

type DependencyRequest

type DependencyRequest struct {
	ProjectID int64  `json:"project_id"`
	TicketID  string `json:"ticket_id"`
	DependsOn string `json:"depends_on"`
}

type ProjectCreateRequest

type ProjectCreateRequest struct {
	Prefix             string `json:"prefix"`
	Title              string `json:"title"`
	Description        string `json:"description"`
	AcceptanceCriteria string `json:"acceptance_criteria"`
	GitRepository      string `json:"git_repository"`
	GitBranch          string `json:"git_branch"`
	Notes              string `json:"notes"`
	Visibility         string `json:"visibility"`
	WorkflowID         *int64 `json:"workflow_id,omitempty"`
}

type ProjectMemberRequest

type ProjectMemberRequest struct {
	UserID string `json:"user_id"`
	Role   string `json:"role"`
}

type ProjectTeamMemberRequest

type ProjectTeamMemberRequest struct {
	TeamID int64  `json:"team_id"`
	Role   string `json:"role"`
}

type ProjectUpdateRequest

type ProjectUpdateRequest struct {
	Title              string `json:"title"`
	Description        string `json:"description"`
	AcceptanceCriteria string `json:"acceptance_criteria"`
	GitRepository      string `json:"git_repository"`
	GitBranch          string `json:"git_branch"`
	Notes              string `json:"notes"`
	Status             string `json:"status"`
	Visibility         string `json:"visibility"`
	WorkflowID         *int64 `json:"workflow_id,omitempty"`
}

type RoleRequest

type RoleRequest struct {
	Title      string `json:"title"`
	Motivation string `json:"motivation"`
	Goals      string `json:"goals"`
}

type StatusResponse

type StatusResponse struct {
	Status              string      `json:"status"`
	Authenticated       bool        `json:"authenticated"`
	RegistrationEnabled bool        `json:"registration_enabled,omitempty"`
	ChatEnabled         bool        `json:"chat_enabled,omitempty"`
	ServerVersion       string      `json:"server_version"`
	User                *store.User `json:"user,omitempty"`
}

type TeamMemberRequest

type TeamMemberRequest struct {
	UserID   string `json:"user_id"`
	Role     string `json:"role"`
	JobTitle string `json:"job_title"`
}

type TeamRequest

type TeamRequest struct {
	Name         string `json:"name"`
	ParentTeamID *int64 `json:"parent_team_id,omitempty"`
}

type TicketCreateRequest

type TicketCreateRequest struct {
	ProjectID          int64   `json:"project_id"`
	ParentID           *string `json:"parent_id,omitempty"`
	CloneOf            *string `json:"clone_of,omitempty"`
	Type               string  `json:"type"`
	Title              string  `json:"title"`
	Description        string  `json:"description"`
	AcceptanceCriteria string  `json:"acceptance_criteria"`
	GitRepository      string  `json:"git_repository"`
	GitBranch          string  `json:"git_branch"`
	Priority           int     `json:"priority"`
	EstimateEffort     int     `json:"estimate_effort"`
	EstimateComplete   string  `json:"estimate_complete,omitempty"`
	Assignee           string  `json:"assignee"`
	Status             string  `json:"status,omitempty"`
	Stage              string  `json:"stage,omitempty"`
	State              string  `json:"state,omitempty"`
}

type TicketHealthRequest

type TicketHealthRequest struct {
	Score int `json:"score"`
}

type TicketRequest

type TicketRequest struct {
	ProjectID int64   `json:"project_id,omitempty"`
	TicketID  *string `json:"ticket_id,omitempty"`
	TicketRef string  `json:"ticket_ref,omitempty"`
	DryRun    bool    `json:"dry_run,omitempty"`
}

type TicketRequestResponse

type TicketRequestResponse struct {
	Status   string                    `json:"status"`
	Ticket   *store.Ticket             `json:"ticket,omitempty"`
	Project  *store.Project            `json:"project,omitempty"`
	Parents  []store.Ticket            `json:"parents,omitempty"`
	Workflow *store.WorkflowWithStages `json:"workflow,omitempty"`
	Role     *store.Role               `json:"role,omitempty"`
}

type TicketUpdateRequest

type TicketUpdateRequest struct {
	Title              string  `json:"title"`
	Description        string  `json:"description"`
	AcceptanceCriteria string  `json:"acceptance_criteria"`
	GitRepository      string  `json:"git_repository"`
	GitBranch          string  `json:"git_branch"`
	ParentID           *string `json:"parent_id,omitempty"`
	Assignee           string  `json:"assignee"`
	Status             string  `json:"status,omitempty"`
	Stage              string  `json:"stage,omitempty"`
	State              string  `json:"state,omitempty"`
	Priority           int     `json:"priority"`
	Order              int     `json:"order"`
	EstimateEffort     int     `json:"estimate_effort"`
	EstimateComplete   string  `json:"estimate_complete,omitempty"`
}

type WorkflowReorderRequest

type WorkflowReorderRequest struct {
	StageIDs []int64 `json:"stage_ids"`
}

type WorkflowRequest

type WorkflowRequest struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

type WorkflowStageRequest

type WorkflowStageRequest struct {
	StageName   string `json:"stage_name"`
	Description string `json:"description"`
	RoleID      *int64 `json:"role_id,omitempty"`
	SortOrder   int    `json:"sort_order"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL