Build and publish / Test and build (darwin) (pull_request) Successful in 1m52s
Build and publish / Test and build (linux) (pull_request) Successful in 2m30s
Build and publish / Test and build (windows) (pull_request) Successful in 3m7s
Build and publish / Test and build (windows) (push) Successful in 3m7s
Build and publish / Test and build (darwin) (push) Successful in 1m45s
Build and publish / Test and build (linux) (push) Successful in 2m12s
Build and publish / Build and publish Docker image (pull_request) Successful in 1m49s
Build and publish / Build and publish Docker image (push) Successful in 2m4s
228 lines
7.4 KiB
Go
228 lines
7.4 KiB
Go
package tools
|
|
|
|
import "encoding/json"
|
|
|
|
// Argument structs for tools not covered by the Phase 06 baseline in
|
|
// args.go. Field shapes mirror docs/schema/03-input-schemas.md;
|
|
// decoding is strict (unknown properties rejected) in op.args.
|
|
|
|
// read_search
|
|
type SearchArgs struct {
|
|
Action string `json:"action"` // text|multi|movie_refine|actor
|
|
Media string `json:"media,omitempty"`
|
|
Query string `json:"query,omitempty"`
|
|
Include []string `json:"include,omitempty"`
|
|
Year *int `json:"year,omitempty"`
|
|
Language string `json:"language,omitempty"`
|
|
Page *Page `json:"page,omitempty"`
|
|
}
|
|
|
|
// read_discover
|
|
type DiscoverArgs struct {
|
|
Action string `json:"action"` // browse|similar|collection|credits|artist_albums|advanced_movie
|
|
Media string `json:"media,omitempty"`
|
|
Category string `json:"category,omitempty"`
|
|
TmdbID *int `json:"tmdb_id,omitempty"`
|
|
Language string `json:"language,omitempty"`
|
|
CollectionID *int `json:"collection_id,omitempty"`
|
|
PersonID *int `json:"person_id,omitempty"`
|
|
PersonName string `json:"person_name,omitempty"`
|
|
ArtistID string `json:"artist_id,omitempty"`
|
|
Filters *DiscoverFilters `json:"filters,omitempty"`
|
|
Page *Page `json:"page,omitempty"`
|
|
}
|
|
|
|
type DiscoverFilters struct {
|
|
ReleaseYear *int `json:"release_year,omitempty"`
|
|
Decade *int `json:"decade,omitempty"`
|
|
GenreIDs []int `json:"genre_ids,omitempty"`
|
|
KeywordIDs []int `json:"keyword_ids,omitempty"`
|
|
WatchProviderIDs []int `json:"watch_provider_ids,omitempty"`
|
|
CompanyIDs []int `json:"company_ids,omitempty"`
|
|
}
|
|
|
|
// read_media details target — media/provider/id where id may be an
|
|
// integer (tmdb|tvdb) or a string (imdb|musicbrainz). This shape is
|
|
// distinct from args.go Target (kind/id request targets).
|
|
type ExternalTarget struct {
|
|
Media string `json:"media"`
|
|
Provider string `json:"provider"`
|
|
ID json.RawMessage `json:"id"`
|
|
}
|
|
|
|
// mediaCallArgs decodes read_media: MediaArgs fields plus the
|
|
// correctly-shaped external details target. The outer Target field
|
|
// shadows the embedded request-shaped Target for the "target" key.
|
|
type mediaCallArgs struct {
|
|
MediaArgs
|
|
Target *ExternalTarget `json:"target,omitempty"`
|
|
}
|
|
|
|
// read_reference
|
|
type ReferenceArgs struct {
|
|
Action string `json:"action"` // genres|languages|keywords|keyword|watch_providers|streaming_countries|issue_categories
|
|
Media string `json:"media,omitempty"`
|
|
Query string `json:"query,omitempty"`
|
|
KeywordID *int `json:"keyword_id,omitempty"`
|
|
}
|
|
|
|
// read_request_stats
|
|
type RequestStatsArgs struct {
|
|
Action string `json:"action"` // counts|total|quota|has_requests
|
|
Media string `json:"media,omitempty"`
|
|
UserID string `json:"user_id,omitempty"`
|
|
}
|
|
|
|
// read_issues
|
|
type IssuesArgs struct {
|
|
Action string `json:"action"` // list|summary|get|by_request|by_provider|provider_summary|comments|counts
|
|
Status string `json:"status,omitempty"`
|
|
IssueID *int `json:"issue_id,omitempty"`
|
|
RequestID *int `json:"request_id,omitempty"`
|
|
ProviderID string `json:"provider_id,omitempty"`
|
|
Page *Page `json:"page,omitempty"`
|
|
}
|
|
|
|
// read_votes
|
|
type VotesArgs struct {
|
|
Action string `json:"action"` // list|get
|
|
Media string `json:"media,omitempty"`
|
|
RequestID *int `json:"request_id,omitempty"`
|
|
Page *Page `json:"page,omitempty"`
|
|
}
|
|
|
|
// read_users
|
|
type UsersArgs struct {
|
|
Action string `json:"action"` // self|list|dropdown|get|claims|online|notification_preferences
|
|
UserID string `json:"user_id,omitempty"`
|
|
Page *Page `json:"page,omitempty"`
|
|
}
|
|
|
|
// read_library
|
|
type LibraryArgs struct {
|
|
Action string `json:"action"` // recent|calendar|image|tv_images|album_art|default_poster|random_background|background_info
|
|
Media string `json:"media,omitempty"`
|
|
Provider string `json:"provider,omitempty"`
|
|
Kind string `json:"kind,omitempty"`
|
|
ID *int `json:"id,omitempty"`
|
|
TvdbID *int `json:"tvdb_id,omitempty"`
|
|
MusicBrainzID string `json:"musicbrainz_id,omitempty"`
|
|
Grouped *bool `json:"grouped,omitempty"`
|
|
Page *Page `json:"page,omitempty"`
|
|
}
|
|
|
|
// read_server
|
|
type ServerArgs struct {
|
|
Action string `json:"action"` // status|status_info|about|update_info|update_check|landing|features|stats|cron_validate
|
|
From string `json:"from,omitempty"`
|
|
To string `json:"to,omitempty"`
|
|
Expression string `json:"expression,omitempty"`
|
|
}
|
|
|
|
// read_integration
|
|
type IntegrationArgs struct {
|
|
Action string `json:"action"` // options|plex|plex_libraries|media_server
|
|
Service string `json:"service,omitempty"`
|
|
Resource string `json:"resource,omitempty"`
|
|
Variant string `json:"variant,omitempty"`
|
|
MachineID string `json:"machine_id,omitempty"`
|
|
ServerID string `json:"server_id,omitempty"`
|
|
}
|
|
|
|
// write_request_subscribe
|
|
type SubscribeArgs struct {
|
|
Action string `json:"action"` // subscribe|unsubscribe
|
|
Media string `json:"media"`
|
|
RequestID int `json:"request_id"`
|
|
}
|
|
|
|
// write_issue_comment
|
|
type IssueCommentArgs struct {
|
|
IssueID int `json:"issue_id"`
|
|
Comment string `json:"comment"`
|
|
}
|
|
|
|
// write_vote
|
|
type VoteArgs struct {
|
|
Media string `json:"media"`
|
|
RequestID int `json:"request_id"`
|
|
Direction string `json:"direction"` // up|down
|
|
}
|
|
|
|
// write_user_preferences
|
|
type UserPrefsArgs struct {
|
|
Action string `json:"action"` // language|streaming_country|unsubscribe_newsletter
|
|
Language string `json:"language,omitempty"`
|
|
CountryCode string `json:"country_code,omitempty"`
|
|
UserID string `json:"user_id,omitempty"`
|
|
}
|
|
|
|
// write_request_delete
|
|
type DeleteArgs struct {
|
|
Target *Target `json:"target"` // kind movie|tv_parent|tv_child|album
|
|
}
|
|
|
|
// write_issue_manage
|
|
type IssueManageArgs struct {
|
|
Action string `json:"action"` // set_status|delete|delete_comment|create_category|delete_category
|
|
IssueID *int `json:"issue_id,omitempty"`
|
|
CommentID *int `json:"comment_id,omitempty"`
|
|
CategoryID *int `json:"category_id,omitempty"`
|
|
Status string `json:"status,omitempty"`
|
|
Value string `json:"value,omitempty"`
|
|
}
|
|
|
|
// read_settings
|
|
type SettingsReadArgs struct {
|
|
Section string `json:"section"`
|
|
}
|
|
|
|
// write_settings_patch
|
|
type SettingsPatchArgs struct {
|
|
Action string `json:"action"` // patch|feature
|
|
Section string `json:"section,omitempty"`
|
|
Revision string `json:"revision,omitempty"`
|
|
Changes map[string]any `json:"changes,omitempty"`
|
|
Name string `json:"name,omitempty"`
|
|
Enabled *bool `json:"enabled,omitempty"`
|
|
}
|
|
|
|
// write_user_manage
|
|
type UserManageArgs struct {
|
|
Action string `json:"action"` // delete|welcome_email
|
|
UserID string `json:"user_id"`
|
|
}
|
|
|
|
// write_integration_test
|
|
type IntegrationTestArgs struct {
|
|
Service string `json:"service"`
|
|
ProfileID string `json:"profile_id"`
|
|
}
|
|
|
|
// write_job_run
|
|
type JobRunArgs struct {
|
|
Action string `json:"action"` // run|revalidate_watchlist
|
|
Job string `json:"job,omitempty"`
|
|
}
|
|
|
|
// write_notification_send
|
|
type NotificationSendArgs struct {
|
|
Subject string `json:"subject"`
|
|
Body string `json:"body"`
|
|
Bcc bool `json:"bcc"`
|
|
UserIDs []string `json:"user_ids"`
|
|
}
|
|
|
|
// write_retry_remove
|
|
type RetryRemoveArgs struct {
|
|
QueueID int `json:"queue_id"`
|
|
}
|
|
|
|
// read_logs
|
|
type LogsArgs struct {
|
|
Action string `json:"action"` // list|read
|
|
FileID string `json:"file_id,omitempty"`
|
|
Offset *int `json:"offset,omitempty"`
|
|
Limit *int `json:"limit,omitempty"`
|
|
}
|