ops

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultListLimit = 50

DefaultListLimit caps list-style operations when the caller omits a limit so MCP clients do not accidentally pull large result sets into context.

View Source
const NoLimit = -1

NoLimit is the sentinel callers pass when they want to bypass the safety cap and fetch every result. The CLI translates `--limit 0` into this value before invoking ops; MCP callers should never use it.

Variables

This section is empty.

Functions

func CreateGroup

func CreateGroup(ctx context.Context, client *api.Client, input CreateGroupInput) (*models.Group, error)

func CreateIssue

func CreateIssue(ctx context.Context, client *api.Client, input CreateIssueInput) (*models.Issue, error)

func CreateMembership

func CreateMembership(ctx context.Context, client *api.Client, input CreateMembershipInput) (*models.Membership, error)

func CreateProject

func CreateProject(ctx context.Context, client *api.Client, input CreateProjectInput) (*models.Project, error)

func CreateTimeEntry

func CreateTimeEntry(ctx context.Context, client *api.Client, input CreateTimeEntryInput) (*models.TimeEntry, error)

func CreateUser

func CreateUser(ctx context.Context, client *api.Client, input CreateUserInput) (*models.User, error)

func CreateVersion

func CreateVersion(ctx context.Context, client *api.Client, input CreateVersionInput) (*models.Version, error)

func CreateWikiPage

func CreateWikiPage(ctx context.Context, client *api.Client, input CreateWikiPageInput) (*models.WikiPage, error)

func GetCurrentUser

func GetCurrentUser(ctx context.Context, client *api.Client, _ struct{}) (*models.User, error)

func GetCurrentUserForResource

func GetCurrentUserForResource(ctx context.Context, client *api.Client) (*models.User, error)

func GetGroup

func GetGroup(ctx context.Context, client *api.Client, input GetGroupInput) (*models.Group, error)

func GetIssue

func GetIssue(ctx context.Context, client *api.Client, input GetIssueInput) (*models.Issue, error)

func GetIssueForResource

func GetIssueForResource(ctx context.Context, client *api.Client, id int) (*models.Issue, error)

func GetMembership

func GetMembership(ctx context.Context, client *api.Client, input GetMembershipInput) (*models.Membership, error)

func GetProject

func GetProject(ctx context.Context, client *api.Client, input GetProjectInput) (*models.Project, error)

func GetProjectForResource

func GetProjectForResource(ctx context.Context, client *api.Client, identifier string) (*models.Project, error)

func GetTimeEntry

func GetTimeEntry(ctx context.Context, client *api.Client, input GetTimeEntryInput) (*models.TimeEntry, error)

func GetTimeEntryForResource

func GetTimeEntryForResource(ctx context.Context, client *api.Client, id int) (*models.TimeEntry, error)

func GetUser

func GetUser(ctx context.Context, client *api.Client, input GetUserInput) (*models.User, error)

func GetUserForResource

func GetUserForResource(ctx context.Context, client *api.Client, id int) (*models.User, error)

func GetVersion

func GetVersion(ctx context.Context, client *api.Client, input GetVersionInput) (*models.Version, error)

func GetVersionForResource

func GetVersionForResource(ctx context.Context, client *api.Client, id int) (*models.Version, error)

func GetWikiPage

func GetWikiPage(ctx context.Context, client *api.Client, input GetWikiPageInput) (*models.WikiPage, error)

func GetWikiPageForResource

func GetWikiPageForResource(ctx context.Context, client *api.Client, projectID, page string) (*models.WikiPage, error)

func ListLimit

func ListLimit(requested int) int

ListLimit returns the effective limit for a list operation.

The exact NoLimit sentinel is translated to the API client's "0 = unlimited" convention. Zero applies the MCP-safety default. Other negatives also clamp to the safety default so a stray negative value cannot quietly bypass the cap (the MCP wrapper additionally clamps before reaching this function). Positive values pass through unchanged.

Types

type AddIssueCommentInput

type AddIssueCommentInput struct {
	ID           int    `json:"id" jsonschema:"Issue ID to comment on."`
	Notes        string `json:"notes" jsonschema:"Comment body (journal note)."`
	PrivateNotes bool   `json:"private_notes,omitempty" jsonschema:"Mark the note as private."`
}

type AssignIssueInput

type AssignIssueInput struct {
	ID         int `json:"id" jsonschema:"Issue ID to assign."`
	AssigneeID int `json:"assignee_id" jsonschema:"User ID to assign. Must be > 0 (use update_issue to unassign)."`
}

type CategoriesListResult

type CategoriesListResult struct {
	Categories []models.IssueCategory `json:"issue_categories"`
	Count      int                    `json:"count"`
	TotalCount int                    `json:"total_count"`
}

func ListCategories

func ListCategories(ctx context.Context, client *api.Client, input ListCategoriesInput) (CategoriesListResult, error)

type CloseIssueInput

type CloseIssueInput struct {
	ID    int    `json:"id" jsonschema:"Issue ID to close."`
	Notes string `json:"notes,omitempty" jsonschema:"Optional journal note to attach."`
}

type CreateGroupInput

type CreateGroupInput struct {
	Name    string `json:"name" jsonschema:"Group name."`
	UserIDs []int  `json:"user_ids,omitempty" jsonschema:"Optional list of user IDs to add as group members."`
}

type CreateIssueInput

type CreateIssueInput struct {
	ProjectID      int             `json:"project_id" jsonschema:"Numeric project ID to create the issue in."`
	Subject        string          `json:"subject" jsonschema:"Issue subject (title)."`
	Description    string          `json:"description,omitempty" jsonschema:"Issue body (Textile or Markdown depending on the Redmine configuration)."`
	TrackerID      int             `json:"tracker_id,omitempty" jsonschema:"Tracker ID (Bug, Feature, ...). Use list_trackers to discover."`
	StatusID       int             `json:"status_id,omitempty" jsonschema:"Initial status ID. Use list_statuses to discover."`
	PriorityID     int             `json:"priority_id,omitempty" jsonschema:"Priority ID."`
	AssignedToID   int             `json:"assigned_to_id,omitempty" jsonschema:"User ID of the assignee."`
	CategoryID     int             `json:"category_id,omitempty" jsonschema:"Issue category ID. Use list_categories to discover."`
	FixedVersionID int             `json:"fixed_version_id,omitempty" jsonschema:"Fixed version (milestone) ID."`
	ParentIssueID  int             `json:"parent_issue_id,omitempty" jsonschema:"Parent issue ID for sub-tasks."`
	EstimatedHours float64         `json:"estimated_hours,omitempty" jsonschema:"Estimated effort in hours."`
	IsPrivate      *bool           `json:"is_private,omitempty" jsonschema:"Mark the issue as private."`
	Uploads        []models.Upload `json:"-"`
}

type CreateMembershipInput

type CreateMembershipInput struct {
	ProjectID string `json:"project_id" jsonschema:"Project identifier or numeric ID."`
	UserID    int    `json:"user_id" jsonschema:"Numeric user ID to add as a member."`
	RoleIDs   []int  `json:"role_ids" jsonschema:"One or more role IDs to grant."`
}

type CreateProjectInput

type CreateProjectInput struct {
	Name           string `json:"name" jsonschema:"Human-readable project name."`
	Identifier     string `json:"identifier" jsonschema:"URL-safe project identifier (slug)."`
	Description    string `json:"description,omitempty" jsonschema:"Project description."`
	IsPublic       *bool  `json:"is_public,omitempty" jsonschema:"Mark the project as public."`
	ParentID       int    `json:"parent_id,omitempty" jsonschema:"Parent project numeric ID."`
	InheritMembers bool   `json:"inherit_members,omitempty" jsonschema:"Inherit members from the parent project."`
}

type CreateTimeEntryInput

type CreateTimeEntryInput struct {
	IssueID    int     `json:"issue_id,omitempty" jsonschema:"Issue to log time against. Either issue_id or project_id is required."`
	ProjectID  string  `json:"project_id,omitempty" jsonschema:"Project identifier or numeric ID. Either issue_id or project_id is required."`
	Hours      float64 `json:"hours" jsonschema:"Hours worked (decimal, e.g. 1.5)."`
	ActivityID int     `json:"activity_id,omitempty" jsonschema:"Activity enumeration ID."`
	SpentOn    string  `json:"spent_on,omitempty" jsonschema:"Date the work was done (YYYY-MM-DD). Defaults to today."`
	Comments   string  `json:"comments,omitempty" jsonschema:"Free-text comment."`
}

type CreateUserInput

type CreateUserInput struct {
	Login     string `json:"login" jsonschema:"Unique login name."`
	Password  string `json:"password" jsonschema:"Initial password for the new account."`
	FirstName string `json:"firstname" jsonschema:"Given name."`
	LastName  string `json:"lastname" jsonschema:"Family name."`
	Mail      string `json:"mail" jsonschema:"Email address."`
	Admin     bool   `json:"admin,omitempty" jsonschema:"Grant admin privileges."`
}

type CreateVersionInput

type CreateVersionInput struct {
	ProjectID     string `json:"project_id" jsonschema:"Project identifier or numeric ID."`
	Name          string `json:"name" jsonschema:"Version name."`
	Status        string `json:"status,omitempty" jsonschema:"Version status: open, locked, or closed."`
	Sharing       string `json:"sharing,omitempty" jsonschema:"Version sharing: none, descendants, hierarchy, tree, or system."`
	DueDate       string `json:"due_date,omitempty" jsonschema:"Due date (YYYY-MM-DD)."`
	Description   string `json:"description,omitempty" jsonschema:"Version description."`
	WikiPageTitle string `json:"wiki_page_title,omitempty" jsonschema:"Associated wiki page title."`
}

type CreateWikiPageInput

type CreateWikiPageInput struct {
	ProjectID string          `json:"project_id" jsonschema:"Project identifier or numeric ID."`
	Page      string          `json:"page" jsonschema:"Wiki page title (slug) to create or overwrite."`
	Text      string          `json:"text" jsonschema:"Page body (Textile or Markdown depending on the Redmine configuration)."`
	Title     string          `json:"title,omitempty" jsonschema:"Optional display title; may differ from the slug."`
	Comments  string          `json:"comments,omitempty" jsonschema:"Edit comment."`
	Uploads   []models.Upload `json:"-"`
}

type DeleteGroupInput

type DeleteGroupInput struct {
	ID int `json:"id" jsonschema:"Group ID to delete. Destructive."`
}

type DeleteIssueInput

type DeleteIssueInput struct {
	ID int `json:"id" jsonschema:"Issue ID to delete."`
}

type DeleteMembershipInput

type DeleteMembershipInput struct {
	ID int `json:"id" jsonschema:"Numeric membership ID to delete. Destructive."`
}

type DeleteProjectInput

type DeleteProjectInput struct {
	Identifier string `json:"identifier" jsonschema:"Project identifier or numeric ID to delete. Destructive."`
}

type DeleteTimeEntryInput

type DeleteTimeEntryInput struct {
	ID int `json:"id" jsonschema:"Time entry numeric ID."`
}

type DeleteUserInput

type DeleteUserInput struct {
	ID int `json:"id" jsonschema:"Numeric user ID to delete. Destructive."`
}

type DeleteVersionInput

type DeleteVersionInput struct {
	ID int `json:"id" jsonschema:"Numeric version (milestone) ID to delete. Destructive."`
}

type DeleteWikiPageInput

type DeleteWikiPageInput struct {
	ProjectID string `json:"project_id" jsonschema:"Project identifier or numeric ID."`
	Page      string `json:"page" jsonschema:"Wiki page title (slug) to delete. Destructive."`
}

type GetGroupInput

type GetGroupInput struct {
	ID       int      `json:"id" jsonschema:"Numeric group ID."`
	Includes []string `json:"includes,omitempty" jsonschema:"Extra sections to include: 'users', 'memberships'."`
}

type GetIssueInput

type GetIssueInput struct {
	ID       int      `json:"id" jsonschema:"Numeric issue ID."`
	Includes []string `json:"includes,omitempty" jsonschema:"Extra sections to include: journals, attachments, relations, children, watchers."`
}

type GetMembershipInput

type GetMembershipInput struct {
	ID int `json:"id" jsonschema:"Numeric membership ID."`
}

type GetProjectInput

type GetProjectInput struct {
	Identifier string   `json:"identifier" jsonschema:"Project identifier (slug) or numeric ID."`
	Includes   []string `json:"includes,omitempty" jsonschema:"Extra sections to include: trackers, issue_categories, enabled_modules."`
}

type GetTimeEntryInput

type GetTimeEntryInput struct {
	ID int `json:"id" jsonschema:"Time entry numeric ID."`
}

type GetUserInput

type GetUserInput struct {
	ID int `json:"id" jsonschema:"Numeric user ID."`
}

type GetVersionInput

type GetVersionInput struct {
	ID int `json:"id" jsonschema:"Numeric version (milestone) ID."`
}

type GetWikiPageInput

type GetWikiPageInput struct {
	ProjectID string   `json:"project_id" jsonschema:"Project identifier or numeric ID."`
	Page      string   `json:"page" jsonschema:"Wiki page title (slug)."`
	Includes  []string `json:"includes,omitempty" jsonschema:"Extra sections to include, e.g. 'attachments'."`
}

type GroupUserInput

type GroupUserInput struct {
	GroupID int `json:"group_id" jsonschema:"Group ID."`
	UserID  int `json:"user_id" jsonschema:"User ID."`
}

type GroupsListResult

type GroupsListResult struct {
	Groups     []models.Group `json:"groups"`
	Count      int            `json:"count"`
	TotalCount int            `json:"total_count"`
}

func ListGroups

func ListGroups(ctx context.Context, client *api.Client, input ListGroupsInput) (GroupsListResult, error)

type IssuesListResult

type IssuesListResult struct {
	Issues     []models.Issue `json:"issues"`
	Count      int            `json:"count"`
	TotalCount int            `json:"total_count"`
}

func ListIssues

func ListIssues(ctx context.Context, client *api.Client, input ListIssuesInput) (IssuesListResult, error)

type ListCategoriesInput

type ListCategoriesInput struct {
	ProjectID string `json:"project_id" jsonschema:"Project identifier or numeric ID."`
}

type ListGroupsInput

type ListGroupsInput struct {
	Limit  int `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
	Offset int `json:"offset,omitempty" jsonschema:"Number of leading results to skip (pagination)."`
}

type ListIssuesInput

type ListIssuesInput struct {
	ProjectID      string   `json:"project_id,omitempty" jsonschema:"Project identifier or numeric ID to filter by."`
	TrackerID      int      `json:"tracker_id,omitempty" jsonschema:"Tracker ID (use list_trackers to discover)."`
	StatusID       string   `json:"status_id,omitempty" jsonschema:"Status filter: 'open', 'closed', '*', or a numeric status ID."`
	AssignedToID   string   `json:"assigned_to_id,omitempty" jsonschema:"Assignee: numeric user ID or 'me'."`
	FixedVersionID int      `json:"fixed_version_id,omitempty" jsonschema:"Fixed version (milestone) ID."`
	Sort           string   `json:"sort,omitempty" jsonschema:"Sort expression, e.g. 'updated_on:desc'."`
	Includes       []string `json:"includes,omitempty" jsonschema:"Extra fields to include: attachments, relations, children, watchers."`
	Limit          int      `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
	Offset         int      `json:"offset,omitempty" jsonschema:"Number of leading results to skip (pagination)."`
}

type ListMembershipsInput

type ListMembershipsInput struct {
	ProjectID string `json:"project_id" jsonschema:"Project identifier or numeric ID."`
	Limit     int    `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
	Offset    int    `json:"offset,omitempty" jsonschema:"Number of leading results to skip."`
}

type ListProjectMembersInput

type ListProjectMembersInput struct {
	Identifier string `json:"identifier" jsonschema:"Project identifier or numeric ID."`
	Limit      int    `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
	Offset     int    `json:"offset,omitempty" jsonschema:"Number of leading results to skip."`
}

type ListProjectsInput

type ListProjectsInput struct {
	Includes []string `json:"includes,omitempty" jsonschema:"Extra sections to include: trackers, issue_categories, enabled_modules."`
	Limit    int      `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
	Offset   int      `json:"offset,omitempty" jsonschema:"Number of leading results to skip."`
}

type ListTimeEntriesInput

type ListTimeEntriesInput struct {
	ProjectID  string `json:"project_id,omitempty" jsonschema:"Project identifier or numeric ID to filter by."`
	UserID     string `json:"user_id,omitempty" jsonschema:"User numeric ID or 'me'."`
	IssueID    int    `json:"issue_id,omitempty" jsonschema:"Issue numeric ID to filter by."`
	ActivityID int    `json:"activity_id,omitempty" jsonschema:"Activity enumeration ID."`
	From       string `json:"from,omitempty" jsonschema:"Inclusive start date (YYYY-MM-DD)."`
	To         string `json:"to,omitempty" jsonschema:"Inclusive end date (YYYY-MM-DD)."`
	Limit      int    `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
	Offset     int    `json:"offset,omitempty" jsonschema:"Number of leading results to skip."`
}

type ListUsersInput

type ListUsersInput struct {
	Status  string `json:"status,omitempty" jsonschema:"Filter by status: 'active', 'registered', 'locked', or a numeric code."`
	Name    string `json:"name,omitempty" jsonschema:"Filter by name substring."`
	GroupID int    `json:"group_id,omitempty" jsonschema:"Filter users that belong to the given group ID."`
	Limit   int    `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
	Offset  int    `json:"offset,omitempty" jsonschema:"Number of leading results to skip."`
}

type ListVersionsInput

type ListVersionsInput struct {
	ProjectID string `json:"project_id" jsonschema:"Project identifier or numeric ID."`
	Limit     int    `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
	Offset    int    `json:"offset,omitempty" jsonschema:"Number of leading results to skip."`
}

type ListWikiPagesInput

type ListWikiPagesInput struct {
	ProjectID string `json:"project_id" jsonschema:"Project identifier or numeric ID."`
	Limit     int    `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
	Offset    int    `json:"offset,omitempty" jsonschema:"Number of leading results to skip."`
}

type MembershipsListResult

type MembershipsListResult struct {
	Memberships []models.Membership `json:"memberships"`
	Count       int                 `json:"count"`
	TotalCount  int                 `json:"total_count"`
}

func ListMemberships

func ListMemberships(ctx context.Context, client *api.Client, input ListMembershipsInput) (MembershipsListResult, error)

type MessageResult

type MessageResult struct {
	Message string `json:"message"`
}

MessageResult is a simple acknowledgement payload for mutating operations.

func AddGroupUser

func AddGroupUser(ctx context.Context, client *api.Client, input GroupUserInput) (MessageResult, error)

func AddIssueComment

func AddIssueComment(ctx context.Context, client *api.Client, input AddIssueCommentInput) (MessageResult, error)

func AssignIssue

func AssignIssue(ctx context.Context, client *api.Client, input AssignIssueInput) (MessageResult, error)

func CloseIssue

func CloseIssue(ctx context.Context, client *api.Client, input CloseIssueInput) (MessageResult, error)

func DeleteGroup

func DeleteGroup(ctx context.Context, client *api.Client, input DeleteGroupInput) (MessageResult, error)

func DeleteIssue

func DeleteIssue(ctx context.Context, client *api.Client, input DeleteIssueInput) (MessageResult, error)

func DeleteMembership

func DeleteMembership(ctx context.Context, client *api.Client, input DeleteMembershipInput) (MessageResult, error)

func DeleteProject

func DeleteProject(ctx context.Context, client *api.Client, input DeleteProjectInput) (MessageResult, error)

func DeleteTimeEntry

func DeleteTimeEntry(ctx context.Context, client *api.Client, input DeleteTimeEntryInput) (MessageResult, error)

func DeleteUser

func DeleteUser(ctx context.Context, client *api.Client, input DeleteUserInput) (MessageResult, error)

func DeleteVersion

func DeleteVersion(ctx context.Context, client *api.Client, input DeleteVersionInput) (MessageResult, error)

func DeleteWikiPage

func DeleteWikiPage(ctx context.Context, client *api.Client, input DeleteWikiPageInput) (MessageResult, error)

func RemoveGroupUser

func RemoveGroupUser(ctx context.Context, client *api.Client, input GroupUserInput) (MessageResult, error)

func ReopenIssue

func ReopenIssue(ctx context.Context, client *api.Client, input ReopenIssueInput) (MessageResult, error)

func UpdateGroup

func UpdateGroup(ctx context.Context, client *api.Client, input UpdateGroupInput) (MessageResult, error)

func UpdateIssue

func UpdateIssue(ctx context.Context, client *api.Client, input UpdateIssueInput) (MessageResult, error)

func UpdateMembership

func UpdateMembership(ctx context.Context, client *api.Client, input UpdateMembershipInput) (MessageResult, error)

func UpdateProject

func UpdateProject(ctx context.Context, client *api.Client, input UpdateProjectInput) (MessageResult, error)

func UpdateTimeEntry

func UpdateTimeEntry(ctx context.Context, client *api.Client, input UpdateTimeEntryInput) (MessageResult, error)

func UpdateUser

func UpdateUser(ctx context.Context, client *api.Client, input UpdateUserInput) (MessageResult, error)

func UpdateVersion

func UpdateVersion(ctx context.Context, client *api.Client, input UpdateVersionInput) (MessageResult, error)

func UpdateWikiPage

func UpdateWikiPage(ctx context.Context, client *api.Client, input UpdateWikiPageInput) (MessageResult, error)

func (MessageResult) MCPMessage

func (m MessageResult) MCPMessage() string

MCPMessage exposes the human-readable message used by the MCP wrapper.

type ProjectMembersListResult

type ProjectMembersListResult struct {
	Members    []models.Membership `json:"members"`
	Count      int                 `json:"count"`
	TotalCount int                 `json:"total_count"`
}

type ProjectsListResult

type ProjectsListResult struct {
	Projects   []models.Project `json:"projects"`
	Count      int              `json:"count"`
	TotalCount int              `json:"total_count"`
}

func ListProjects

func ListProjects(ctx context.Context, client *api.Client, input ListProjectsInput) (ProjectsListResult, error)

type ReopenIssueInput

type ReopenIssueInput struct {
	ID    int    `json:"id" jsonschema:"Issue ID to reopen."`
	Notes string `json:"notes,omitempty" jsonschema:"Optional journal note to attach."`
}

type SearchInput

type SearchInput struct {
	Query      string `json:"query" jsonschema:"Full-text search query."`
	ProjectID  string `json:"project_id,omitempty" jsonschema:"Scope search to a single project (identifier or numeric ID)."`
	Scope      string `json:"scope,omitempty" jsonschema:"One of 'all', 'my_projects', 'subprojects'."`
	Issues     bool   `json:"issues,omitempty" jsonschema:"Include issues in results."`
	News       bool   `json:"news,omitempty" jsonschema:"Include news in results."`
	Documents  bool   `json:"documents,omitempty" jsonschema:"Include documents in results."`
	Changesets bool   `json:"changesets,omitempty" jsonschema:"Include changesets in results."`
	WikiPages  bool   `json:"wiki_pages,omitempty" jsonschema:"Include wiki pages in results."`
	Messages   bool   `json:"messages,omitempty" jsonschema:"Include forum messages in results."`
	Projects   bool   `json:"projects,omitempty" jsonschema:"Include projects in results."`
	AllWords   bool   `json:"all_words,omitempty" jsonschema:"Require all query words to match."`
	TitlesOnly bool   `json:"titles_only,omitempty" jsonschema:"Match query against titles only."`
	OpenIssues bool   `json:"open_issues,omitempty" jsonschema:"Limit issue results to open issues."`
	Limit      int    `json:"limit,omitempty" jsonschema:"Max results to return. Defaults to 50 when omitted."`
	Offset     int    `json:"offset,omitempty" jsonschema:"Number of leading results to skip."`
}

type SearchResultsListResult

type SearchResultsListResult struct {
	Results    []models.SearchResult `json:"results"`
	Count      int                   `json:"count"`
	TotalCount int                   `json:"total_count"`
}
func Search(ctx context.Context, client *api.Client, input SearchInput) (SearchResultsListResult, error)

type StatusesListResult

type StatusesListResult struct {
	Statuses []models.IssueStatus `json:"issue_statuses"`
	Count    int                  `json:"count"`
}

func ListStatuses

func ListStatuses(ctx context.Context, client *api.Client, _ struct{}) (StatusesListResult, error)

type SummaryTimeEntriesInput

type SummaryTimeEntriesInput struct {
	ProjectID string `json:"project_id,omitempty" jsonschema:"Project identifier or numeric ID to filter by."`
	UserID    string `json:"user_id,omitempty" jsonschema:"User numeric ID or 'me'."`
	From      string `json:"from,omitempty" jsonschema:"Inclusive start date (YYYY-MM-DD)."`
	To        string `json:"to,omitempty" jsonschema:"Inclusive end date (YYYY-MM-DD)."`
	GroupBy   string `json:"group_by,omitempty" jsonschema:"One of 'day' (default), 'project', 'activity'."`
}

type TimeEntriesListResult

type TimeEntriesListResult struct {
	TimeEntries []models.TimeEntry `json:"time_entries"`
	Count       int                `json:"count"`
	TotalCount  int                `json:"total_count"`
}

func ListTimeEntries

func ListTimeEntries(ctx context.Context, client *api.Client, input ListTimeEntriesInput) (TimeEntriesListResult, error)

type TimeSummaryResult

type TimeSummaryResult struct {
	GroupBy    string           `json:"group_by"`
	From       string           `json:"from,omitempty"`
	To         string           `json:"to,omitempty"`
	Rows       []TimeSummaryRow `json:"rows"`
	TotalHours float64          `json:"total_hours"`
}

func SummaryTimeEntries

func SummaryTimeEntries(ctx context.Context, client *api.Client, input SummaryTimeEntriesInput) (TimeSummaryResult, error)

type TimeSummaryRow

type TimeSummaryRow struct {
	Group string  `json:"group"`
	Hours float64 `json:"hours"`
}

type TrackersListResult

type TrackersListResult struct {
	Trackers []models.Tracker `json:"trackers"`
	Count    int              `json:"count"`
}

func ListTrackers

func ListTrackers(ctx context.Context, client *api.Client, _ struct{}) (TrackersListResult, error)

type UpdateGroupInput

type UpdateGroupInput struct {
	ID      int     `json:"id" jsonschema:"Group ID to update."`
	Name    *string `json:"name,omitempty" jsonschema:"New group name."`
	UserIDs *[]int  `json:"user_ids,omitempty" jsonschema:"Replacement set of user IDs. Pass an empty list to remove all members."`
}

type UpdateIssueInput

type UpdateIssueInput struct {
	ID             int             `json:"id" jsonschema:"Issue ID to update."`
	Subject        *string         `json:"subject,omitempty" jsonschema:"New subject (title)."`
	Description    *string         `json:"description,omitempty" jsonschema:"New description body."`
	TrackerID      *int            `json:"tracker_id,omitempty" jsonschema:"New tracker ID."`
	StatusID       *int            `json:"status_id,omitempty" jsonschema:"New status ID."`
	PriorityID     *int            `json:"priority_id,omitempty" jsonschema:"New priority ID."`
	AssignedToID   *int            `json:"assigned_to_id,omitempty" jsonschema:"Positive user ID to assign the issue to."`
	CategoryID     *int            `json:"category_id,omitempty" jsonschema:"Issue category ID."`
	FixedVersionID *int            `json:"fixed_version_id,omitempty" jsonschema:"Fixed version ID."`
	ParentIssueID  *int            `json:"parent_issue_id,omitempty" jsonschema:"Parent issue ID for sub-tasks. Set to 0 to remove the parent."`
	DoneRatio      *int            `json:"done_ratio,omitempty" jsonschema:"Completion percentage (0-100)."`
	EstimatedHours *float64        `json:"estimated_hours,omitempty" jsonschema:"Estimated effort in hours."`
	DueDate        *string         `json:"due_date,omitempty" jsonschema:"Due date (YYYY-MM-DD)."`
	Notes          *string         `json:"notes,omitempty" jsonschema:"Journal note to attach to the update."`
	IsPrivate      *bool           `json:"is_private,omitempty" jsonschema:"Toggle issue privacy."`
	Uploads        []models.Upload `json:"-"`
}

type UpdateMembershipInput

type UpdateMembershipInput struct {
	ID      int   `json:"id" jsonschema:"Numeric membership ID."`
	RoleIDs []int `json:"role_ids" jsonschema:"Replacement set of role IDs."`
}

type UpdateProjectInput

type UpdateProjectInput struct {
	Identifier  string  `json:"identifier" jsonschema:"Project identifier or numeric ID to update."`
	Name        *string `json:"name,omitempty" jsonschema:"New project name."`
	Description *string `json:"description,omitempty" jsonschema:"New project description."`
	IsPublic    *bool   `json:"is_public,omitempty" jsonschema:"Toggle public visibility."`
}

type UpdateTimeEntryInput

type UpdateTimeEntryInput struct {
	ID         int      `json:"id" jsonschema:"Time entry numeric ID."`
	Hours      *float64 `json:"hours,omitempty" jsonschema:"New hours worked."`
	ActivityID *int     `json:"activity_id,omitempty" jsonschema:"New activity enumeration ID."`
	SpentOn    *string  `json:"spent_on,omitempty" jsonschema:"New date (YYYY-MM-DD)."`
	Comments   *string  `json:"comments,omitempty" jsonschema:"New comment body."`
}

type UpdateUserInput

type UpdateUserInput struct {
	ID        int     `json:"id" jsonschema:"Numeric user ID to update."`
	FirstName *string `json:"firstname,omitempty" jsonschema:"New given name."`
	LastName  *string `json:"lastname,omitempty" jsonschema:"New family name."`
	Mail      *string `json:"mail,omitempty" jsonschema:"New email address."`
	Admin     *bool   `json:"admin,omitempty" jsonschema:"Toggle admin privileges."`
	Status    *int    `json:"status,omitempty" jsonschema:"Numeric status code (1 active, 2 registered, 3 locked)."`
}

type UpdateVersionInput

type UpdateVersionInput struct {
	ID            int     `json:"id" jsonschema:"Numeric version (milestone) ID."`
	Name          *string `json:"name,omitempty" jsonschema:"New version name."`
	Status        *string `json:"status,omitempty" jsonschema:"New status: open, locked, or closed."`
	Sharing       *string `json:"sharing,omitempty" jsonschema:"New sharing: none, descendants, hierarchy, tree, or system."`
	DueDate       *string `json:"due_date,omitempty" jsonschema:"New due date (YYYY-MM-DD)."`
	Description   *string `json:"description,omitempty" jsonschema:"New description."`
	WikiPageTitle *string `json:"wiki_page_title,omitempty" jsonschema:"New associated wiki page title."`
}

type UpdateWikiPageInput

type UpdateWikiPageInput struct {
	ProjectID string          `json:"project_id" jsonschema:"Project identifier or numeric ID."`
	Page      string          `json:"page" jsonschema:"Wiki page title (slug) to update."`
	Text      *string         `json:"text,omitempty" jsonschema:"New page body."`
	Title     *string         `json:"title,omitempty" jsonschema:"New display title."`
	Comments  *string         `json:"comments,omitempty" jsonschema:"Edit comment."`
	Uploads   []models.Upload `json:"-"`
}

type UsersListResult

type UsersListResult struct {
	Users      []models.User `json:"users"`
	Count      int           `json:"count"`
	TotalCount int           `json:"total_count"`
}

func ListUsers

func ListUsers(ctx context.Context, client *api.Client, input ListUsersInput) (UsersListResult, error)

type VersionsListResult

type VersionsListResult struct {
	Versions   []models.Version `json:"versions"`
	Count      int              `json:"count"`
	TotalCount int              `json:"total_count"`
}

func ListVersions

func ListVersions(ctx context.Context, client *api.Client, input ListVersionsInput) (VersionsListResult, error)

type WikiPagesListResult

type WikiPagesListResult struct {
	Pages      []models.WikiPageIndex `json:"pages"`
	Count      int                    `json:"count"`
	TotalCount int                    `json:"total_count"`
}

func ListWikiPages

func ListWikiPages(ctx context.Context, client *api.Client, input ListWikiPagesInput) (WikiPagesListResult, error)

Jump to

Keyboard shortcuts

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