server

package
v0.0.0-...-496f367 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchCompleteTasksInput

type BatchCompleteTasksInput struct {
	Tasks []CompleteTaskInput `json:"tasks" jsonschema:"List of tasks to complete (max 25)"`
}

type BatchCreateTasksInput

type BatchCreateTasksInput struct {
	Tasks []CreateTaskInput `json:"tasks" jsonschema:"List of tasks to create (max 25)"`
}

type BatchResult

type BatchResult struct {
	Requested int          `json:"requested"`
	Succeeded int          `json:"succeeded"`
	Failed    int          `json:"failed"`
	Results   []ItemResult `json:"results"`
}

type CompleteTaskInput

type CompleteTaskInput struct {
	ProjectID string `json:"project_id" jsonschema:"The project ID (24-char hex)"`
	TaskID    string `json:"task_id" jsonschema:"The task ID (24-char hex)"`
}

type Config

type Config struct {
	Client   *ticktick.Client
	Version  string
	Mode     Mode
	CacheTTL time.Duration
}

type CreateProjectInput

type CreateProjectInput struct {
	Name     string `json:"name" jsonschema:"Project name (max 64 chars)"`
	Color    string `json:"color,omitempty" jsonschema:"Hex color e.g. #F18181"`
	ViewMode string `json:"view_mode,omitempty" jsonschema:"View mode: list kanban or timeline"`
	Kind     string `json:"kind,omitempty" jsonschema:"Project kind: TASK or NOTE"`
}

type CreateTaskInput

type CreateTaskInput struct {
	Title      string   `json:"title" jsonschema:"Task title (max 256 chars)"`
	ProjectID  string   `json:"project_id,omitempty" jsonschema:"Project ID to create the task in. If omitted uses the inbox."`
	Content    string   `json:"content,omitempty" jsonschema:"Task notes/content (max 16384 chars)"`
	Desc       string   `json:"desc,omitempty" jsonschema:"Description of checklist"`
	IsAllDay   bool     `json:"is_all_day,omitempty" jsonschema:"Whether this is an all-day task"`
	StartDate  string   `json:"start_date,omitempty" jsonschema:"Start date in RFC3339 format"`
	DueDate    string   `json:"due_date,omitempty" jsonschema:"Due date in RFC3339 format"`
	TimeZone   string   `json:"time_zone,omitempty" jsonschema:"Timezone e.g. America/Los_Angeles"`
	Priority   int      `json:"priority,omitempty" jsonschema:"Priority: 0=None 1=Low 3=Medium 5=High"`
	Reminders  []string `json:"reminders,omitempty" jsonschema:"Reminder triggers e.g. TRIGGER:PT0S"`
	RepeatFlag string   `json:"repeat_flag,omitempty" jsonschema:"iCalendar RRULE e.g. RRULE:FREQ=DAILY;INTERVAL=1"`
}

type DeleteProjectInput

type DeleteProjectInput struct {
	ProjectID string `json:"project_id" jsonschema:"The project ID (24-char hex)"`
	Confirmed bool   `json:"confirmed" jsonschema:"Must be true to confirm deletion. This permanently deletes the project and all its tasks."`
}

type DeleteTaskInput

type DeleteTaskInput struct {
	ProjectID string `json:"project_id" jsonschema:"The project ID (24-char hex)"`
	TaskID    string `json:"task_id" jsonschema:"The task ID (24-char hex)"`
	Confirmed bool   `json:"confirmed" jsonschema:"Must be true to confirm deletion. This permanently deletes the task."`
}

type GetAllTasksInput

type GetAllTasksInput struct{}

type GetEngagedTasksInput

type GetEngagedTasksInput struct{}

type GetNextTasksInput

type GetNextTasksInput struct{}

type GetOverdueTasksInput

type GetOverdueTasksInput struct{}

type GetProjectInput

type GetProjectInput struct {
	ProjectID string `json:"project_id" jsonschema:"The project ID (24-char hex)"`
}

type GetProjectWithDataInput

type GetProjectWithDataInput struct {
	ProjectID string `json:"project_id" jsonschema:"The project ID (24-char hex)"`
}

type GetProjectsInput

type GetProjectsInput struct{}

type GetTaskInput

type GetTaskInput struct {
	ProjectID string `json:"project_id" jsonschema:"The project ID (24-char hex)"`
	TaskID    string `json:"task_id" jsonschema:"The task ID (24-char hex)"`
}

type GetTasksByPriorityInput

type GetTasksByPriorityInput struct {
	Priority int `json:"priority" jsonschema:"Priority level: 0=None 1=Low 3=Medium 5=High"`
}

type GetTasksDueThisWeekInput

type GetTasksDueThisWeekInput struct{}

type GetTasksDueTodayInput

type GetTasksDueTodayInput struct{}

type ItemResult

type ItemResult struct {
	Index  int    `json:"index"`
	Status string `json:"status"`
	ID     string `json:"id,omitempty"`
	Error  string `json:"error,omitempty"`
}

type Mode

type Mode int
const (
	ModeReadOnly Mode = iota
	ModeAllowWrites
	ModeAllowDestructive
)

func (Mode) String

func (m Mode) String() string

type MoveTaskInput

type MoveTaskInput struct {
	TaskID      string `json:"task_id" jsonschema:"The task ID to move (24-char hex)"`
	FromProject string `json:"from_project" jsonschema:"Source project ID (24-char hex)"`
	ToProject   string `json:"to_project" jsonschema:"Destination project ID (24-char hex)"`
}

type SearchTasksInput

type SearchTasksInput struct {
	Query string `json:"query" jsonschema:"Search string to match against task titles and content"`
}

type Server

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

func New

func New(cfg Config) (*Server, error)

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

type UpdateProjectInput

type UpdateProjectInput struct {
	ProjectID string `json:"project_id" jsonschema:"The project ID to update (24-char hex)"`
	Name      string `json:"name,omitempty" jsonschema:"New project name"`
	Color     string `json:"color,omitempty" jsonschema:"New hex color"`
	ViewMode  string `json:"view_mode,omitempty" jsonschema:"New view mode"`
}

type UpdateTaskInput

type UpdateTaskInput struct {
	TaskID     string   `json:"task_id" jsonschema:"The task ID to update (24-char hex)"`
	ProjectID  string   `json:"project_id" jsonschema:"The project ID the task belongs to (24-char hex)"`
	Title      string   `json:"title,omitempty" jsonschema:"New task title"`
	Content    string   `json:"content,omitempty" jsonschema:"New task content"`
	Desc       string   `json:"desc,omitempty" jsonschema:"New checklist description"`
	IsAllDay   *bool    `json:"is_all_day,omitempty" jsonschema:"Whether this is an all-day task"`
	StartDate  string   `json:"start_date,omitempty" jsonschema:"New start date in RFC3339 format"`
	DueDate    string   `json:"due_date,omitempty" jsonschema:"New due date in RFC3339 format"`
	TimeZone   string   `json:"time_zone,omitempty" jsonschema:"Timezone"`
	Priority   *int     `json:"priority,omitempty" jsonschema:"Priority: 0=None 1=Low 3=Medium 5=High"`
	Reminders  []string `json:"reminders,omitempty" jsonschema:"Reminder triggers"`
	RepeatFlag string   `json:"repeat_flag,omitempty" jsonschema:"iCalendar RRULE"`
}

Jump to

Keyboard shortcuts

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