Sync the remaining ledger docs to the read_*/write_* namespace and finalized schemas: publish the MCP->wire parameter mapping appendix, record JWT-primary auth and season-mode/defaults decisions in the ledger and verification docs, and document notificationTemplates label translation. Add docs/schema/08-go-baseline.md and implement the compile-level type baseline: config loading/validation, AuthManager skeleton, upstream Client.Do contract, tool arg structs, and the shared result envelope.
112 lines
4.0 KiB
Go
112 lines
4.0 KiB
Go
package tools
|
|
|
|
// write_request_create
|
|
type RequestCreateArgs struct {
|
|
Action string `json:"action"` // movie|tv|album|collection
|
|
TmdbID *int `json:"tmdb_id,omitempty"`
|
|
Is4K bool `json:"is_4k"` // defaults false
|
|
Language string `json:"language,omitempty"`
|
|
Provider string `json:"provider,omitempty"` // tmdb|tvdb for tv
|
|
ID *int `json:"id,omitempty"`
|
|
Selection *TVSelect `json:"selection,omitempty"`
|
|
LanguageProfileID *int `json:"language_profile_id,omitempty"`
|
|
OnBehalfUserID string `json:"on_behalf_user_id,omitempty"`
|
|
Overrides *Overrides `json:"overrides,omitempty"`
|
|
MusicBrainzID string `json:"musicbrainz_id,omitempty"`
|
|
RequestedByAlias string `json:"requested_by_alias,omitempty"`
|
|
CollectionID *int `json:"collection_id,omitempty"`
|
|
}
|
|
|
|
type TVSelect struct {
|
|
Mode string `json:"mode"` // all|first_season|latest_season|season|episodes
|
|
SeasonNumbers []int `json:"season_numbers,omitempty"`
|
|
Seasons []Season `json:"seasons,omitempty"`
|
|
}
|
|
|
|
type Season struct {
|
|
SeasonNumber int `json:"season_number"`
|
|
Episodes []int `json:"episodes"`
|
|
}
|
|
|
|
type Overrides struct {
|
|
RootFolderID *int `json:"root_folder_id,omitempty"`
|
|
QualityProfileID *int `json:"quality_profile_id,omitempty"`
|
|
}
|
|
|
|
// write_request_moderate
|
|
type ModerateArgs struct {
|
|
Action string `json:"action"` // approve|deny|mark_available|mark_unavailable
|
|
Media string `json:"media"` // movie|tv|album
|
|
RequestID int `json:"request_id"`
|
|
Is4K bool `json:"is_4k"`
|
|
Reason string `json:"reason,omitempty"`
|
|
}
|
|
|
|
// write_request_options
|
|
type OptionsArgs struct {
|
|
Action string `json:"action"` // advanced|tv_root|tv_quality
|
|
Media string `json:"media,omitempty"`
|
|
RequestID *int `json:"request_id,omitempty"`
|
|
Options *AdvOptions `json:"options,omitempty"`
|
|
ParentRequestID *int `json:"parent_request_id,omitempty"`
|
|
RootFolderID *int `json:"root_folder_id,omitempty"`
|
|
QualityProfileID *int `json:"quality_profile_id,omitempty"`
|
|
}
|
|
|
|
type AdvOptions struct {
|
|
RootFolderID *int `json:"root_folder_id,omitempty"`
|
|
QualityProfileID *int `json:"quality_profile_id,omitempty"`
|
|
LanguageProfileID *int `json:"language_profile_id,omitempty"`
|
|
}
|
|
|
|
// write_request_reprocess
|
|
type ReprocessArgs struct {
|
|
RequestType string `json:"request_type"` // movie|tv|album
|
|
RequestID int `json:"request_id"`
|
|
Is4K bool `json:"is_4k"`
|
|
}
|
|
|
|
// write_issue_create
|
|
type IssueCreateArgs struct {
|
|
Title string `json:"title"`
|
|
Subject string `json:"subject,omitempty"`
|
|
Description string `json:"description"`
|
|
CategoryID int `json:"category_id"`
|
|
RequestType string `json:"request_type"` // movie|tv|album
|
|
RequestID *int `json:"request_id,omitempty"`
|
|
ProviderID string `json:"provider_id,omitempty"`
|
|
}
|
|
|
|
// write_issue_manage / read_issues shared status label
|
|
type IssueStatus = string // "pending"|"in_progress"|"resolved"|"closed"
|
|
|
|
// read_requests
|
|
type RequestsListArgs struct {
|
|
Action string `json:"action"`
|
|
Media string `json:"media,omitempty"`
|
|
Status string `json:"status"` // adapter default "all"
|
|
SortDirection string `json:"sort_direction"` // adapter default "desc"
|
|
ParentRequestID *int `json:"parent_request_id,omitempty"`
|
|
Query string `json:"query,omitempty"`
|
|
Page *Page `json:"page,omitempty"`
|
|
Target *Target `json:"target,omitempty"`
|
|
}
|
|
|
|
type Page struct{ Offset, Limit int }
|
|
type Target struct {
|
|
Kind string
|
|
ID int
|
|
}
|
|
|
|
// read_media
|
|
type MediaArgs struct {
|
|
Action string `json:"action"`
|
|
Target *Target `json:"target,omitempty"`
|
|
Media string `json:"media,omitempty"`
|
|
RequestID *int `json:"request_id,omitempty"`
|
|
TmdbID *int `json:"tmdb_id,omitempty"`
|
|
Language string `json:"language,omitempty"`
|
|
Name string `json:"name,omitempty"`
|
|
Year *int `json:"year,omitempty"`
|
|
}
|