From 5b710df16000ae2cc00259779efc928052428dea Mon Sep 17 00:00:00 2001 From: ysyneu Date: Fri, 26 Jun 2026 14:52:09 +0800 Subject: [PATCH] chore: update go-flashduty SDK --- Makefile | 6 +- go.mod | 2 +- go.sum | 4 +- internal/cli/session.go | 2 +- internal/cli/zz_generated_a2a_agents.go | 228 +++---- internal/cli/zz_generated_applications.go | 60 ++ internal/cli/zz_generated_channels.go | 61 ++ internal/cli/zz_generated_im_integrations.go | 2 +- internal/cli/zz_generated_incidents.go | 637 ++++++++++++++++++ internal/cli/zz_generated_integrations.go | 53 ++ internal/cli/zz_generated_manifest.go | 26 +- internal/cli/zz_generated_mcp_servers.go | 404 +++++------ .../cli/zz_generated_monitor_utilities.go | 81 +++ internal/cli/zz_generated_register.go | 1 + internal/cli/zz_generated_response_help.go | 36 +- internal/cli/zz_generated_sessions.go | 125 ++-- internal/cli/zz_generated_skills.go | 303 ++++----- internal/cli/zz_generated_status_pages.go | 586 ++++++++++++++++ internal/cmd/cligen/main.go | 2 +- internal/cmd/cligen/naming.go | 24 +- skills/flashduty/reference/channel.md | 5 + skills/flashduty/reference/incident.md | 54 ++ skills/flashduty/reference/monit.md | 8 + skills/flashduty/reference/rum.md | 5 + skills/flashduty/reference/status-page.md | 50 ++ 25 files changed, 2215 insertions(+), 550 deletions(-) create mode 100644 internal/cli/zz_generated_monitor_utilities.go diff --git a/Makefile b/Makefile index daec75c..23881ab 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # Build configuration BINARY_NAME ?= flashduty BUILD_DIR := bin -GOLANGCI_LINT_VERSION := v2.2.1 +GOLANGCI_LINT_VERSION := v2.11.4 GOLANGCI_LINT := $(BUILD_DIR)/golangci-lint GCI_VERSION := v0.13.5 GCI := $(BUILD_DIR)/gci @@ -52,11 +52,11 @@ gci: $(GCI) ## Sort imports using gci .PHONY: lint lint: $(GOLANGCI_LINT) ## Run golangci-lint - $(GOLANGCI_LINT) run + $(GOLANGCI_LINT) run --allow-serial-runners .PHONY: lint-fix lint-fix: $(GOLANGCI_LINT) ## Run golangci-lint with auto-fix - $(GOLANGCI_LINT) run --fix + $(GOLANGCI_LINT) run --fix --allow-serial-runners .PHONY: test test: ## Run unit tests diff --git a/go.mod b/go.mod index fcbe8d8..3c60753 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/flashcatcloud/flashduty-cli go 1.25.1 require ( - github.com/flashcatcloud/go-flashduty v0.5.4-0.20260616051811-54d4fc1065bb + github.com/flashcatcloud/go-flashduty v0.5.4-0.20260626064127-3f90f8e0e38b github.com/mattn/go-runewidth v0.0.24 github.com/spf13/cobra v1.10.2 github.com/spf13/pflag v1.0.10 diff --git a/go.sum b/go.sum index c444e7d..7d73ac0 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,8 @@ github.com/clipperhouse/uax29/v2 v2.2.0 h1:ChwIKnQN3kcZteTXMgb1wztSgaU+ZemkgWdohwgs8tY= github.com/clipperhouse/uax29/v2 v2.2.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= -github.com/flashcatcloud/go-flashduty v0.5.4-0.20260616051811-54d4fc1065bb h1:V3SrTp2JSJ4MizuCfvFdEc4FFxial3uSYQZaCiCb6oI= -github.com/flashcatcloud/go-flashduty v0.5.4-0.20260616051811-54d4fc1065bb/go.mod h1:aA0RtZEs0AYOwwdNKdtVeD8YMOdnmVY1zAlVD+9Ovx8= +github.com/flashcatcloud/go-flashduty v0.5.4-0.20260626064127-3f90f8e0e38b h1:2QQxu6uSDdmBMuKmKiLFqBT9nzp6u0M35BimnXN6kM0= +github.com/flashcatcloud/go-flashduty v0.5.4-0.20260626064127-3f90f8e0e38b/go.mod h1:aA0RtZEs0AYOwwdNKdtVeD8YMOdnmVY1zAlVD+9Ovx8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/mattn/go-runewidth v0.0.24 h1:cpokDiIn0MGnhdHwuWnJBITySJ20QyNGnY2kR/ay2DU= diff --git a/internal/cli/session.go b/internal/cli/session.go index bf16158..7f7580a 100644 --- a/internal/cli/session.go +++ b/internal/cli/session.go @@ -197,7 +197,7 @@ func fetchSessionsPaged( req.Page = page req.Limit = pageLimit - resp, _, err := client.Sessions.List(ctx, &req) + resp, _, err := client.Sessions.ReadList(ctx, &req) if err != nil { return nil, 0, err } diff --git a/internal/cli/zz_generated_a2a_agents.go b/internal/cli/zz_generated_a2a_agents.go index c218a57..7ec5620 100644 --- a/internal/cli/zz_generated_a2a_agents.go +++ b/internal/cli/zz_generated_a2a_agents.go @@ -16,38 +16,38 @@ func genA2aAgentsReadGetCmd() *cobra.Command { Short: "Get A2A agent detail", Long: `Get A2A agent detail. -Return the full configuration of a single A2A agent by ID. +Get one A2A agent by ID. API: POST /safari/a2a-agent/get (remote-agent-read-get) Request fields: - --agent-id string (required) — Identifier of the target agent. + --agent-id string (required) — Target agent ID. Response fields ('data' envelope is unwrapped — these fields are at the top level): - - account_id (integer) (required) — Owning account. - - agent_card_name (string) — Name resolved from the fetched agent card. - - agent_card_skills (array) — Skills advertised on the fetched agent card. - - agent_id (string) (required) — Unique identifier of the A2A agent. - - agent_name (string) (required) — Display name of the agent. - - auth_config (object) — Authentication parameters keyed by name. - - auth_mode (string) — Credential model: shared, per_user_secret, or per_user_oauth. - - auth_type (string) (required) — Authentication scheme used when calling the agent. - - can_edit (boolean) (required) — Whether the calling member may edit or delete this resource. - - card_resolve_timeout (integer) (required) — Timeout for fetching the agent card, in seconds. - - card_url (string) (required) — URL of the agent's published A2A agent card. - - created_at (integer) (required) — Creation time as a Unix timestamp in seconds. - - created_by (integer) (required) — Member who created this resource. - - description (string) (required) — What this agent does and when to delegate to it. - - oauth_metadata (string) — OAuth metadata JSON. - - secret_schema (string) — JSON schema of the per-user secret. - - status (string) (required) — Whether the agent is active and reachable. [enabled, disabled] - - streaming (boolean) (required) — Whether the agent supports streaming responses. - - task_timeout (integer) (required) — Timeout for a single delegated task, in seconds. - - team_id (integer) (required) — Owning team; 0 means account scope. - - updated_at (integer) (required) — Last-update time as a Unix timestamp in seconds. + - account_id (integer) (required) — Owning account ID. + - agent_card_name (string) — Agent name resolved from the remote card. + - agent_card_skills (array) — Skills advertised by the remote card. + - agent_id (string) (required) — Unique A2A agent ID (prefix 'a2a_'). + - agent_name (string) (required) — Agent display name. + - auth_config (object) — Authentication config; secret values are masked. + - auth_mode (string) — Authentication mode. [shared, per_user_secret, per_user_oauth] + - auth_type (string) (required) — Authentication type for reaching the remote agent. + - can_edit (boolean) (required) — Whether the caller may edit this agent. + - card_resolve_timeout (integer) (required) — Card-resolution timeout in seconds. + - card_url (string) (required) — URL of the remote agent card. + - created_at (integer) (required) — Creation time. Unix timestamp in milliseconds. + - created_by (integer) (required) — Member ID that created the agent. + - description (string) (required) — Agent description. + - oauth_metadata (string) — JSON-encoded OAuth metadata (per_user_oauth mode). + - secret_schema (string) — JSON-encoded secret schema (per_user_secret mode). + - status (string) (required) — Agent status. [enabled, disabled] + - streaming (boolean) (required) — Whether the remote agent supports streaming responses. + - task_timeout (integer) (required) — Single-task execution timeout in seconds. + - team_id (integer) (required) — Team scope: 0 = account-wide; >0 = the owning team. + - updated_at (integer) (required) — Last update time. Unix timestamp in milliseconds. `, Args: requireExactArg("agent_id"), - Example: ` flashduty safari a2a-agent-get --data '{"agent_id":"a2a_9d4c1f60b3a2"}'`, + Example: ` flashduty safari a2a-agent-get --data '{"agent_id":"a2a_6mWqZ2pK9nLcR3tY8uVb4D"}'`, RunE: func(cmd *cobra.Command, args []string) error { return runCommand(cmd, args, func(ctx *RunContext) error { body, err := genAssembleBody(dataJSON, func(body map[string]any) error { @@ -74,7 +74,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringVar(&fAgentID, "agent-id", "", "Identifier of the target agent. (required)") + cmd.Flags().StringVar(&fAgentID, "agent-id", "", "Target agent ID. (required)") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd } @@ -90,40 +90,40 @@ func genA2aAgentsReadListCmd() *cobra.Command { Short: "List A2A agents", Long: `List A2A agents. -List registered A2A agents visible to the caller across account and team scopes, with pagination. +List A2A agents visible to the caller across account and team scopes, with pagination. API: POST /safari/a2a-agent/list (remote-agent-read-list) Request fields: - --include-account bool — Include account-scoped rows alongside team-scoped ones; defaults to true. - --limit int — Maximum number of rows to return; defaults to 20. - --offset int — Number of rows to skip for pagination. - --team-ids []int — Restrict results to resources owned by these teams; intersected with the caller's visible set. + --include-account bool — Include account-scoped (team_id=0) rows. Defaults to true. + --limit int — Page size. + --offset int — Row offset for pagination. + --team-ids []int — Filter to these team IDs; empty = the caller's visible set. Response fields ('data' envelope is unwrapped — rows are nested under items[]; pipe 'jq '.items[]'', NOT '.data.items[]'): - - items (array) (required) — A2A agents on the current page. - - account_id (integer) (required) — Owning account. - - agent_card_name (string) — Name resolved from the fetched agent card. - - agent_card_skills (array) — Skills advertised on the fetched agent card. - - agent_id (string) (required) — Unique identifier of the A2A agent. - - agent_name (string) (required) — Display name of the agent. - - auth_config (object) — Authentication parameters keyed by name. - - auth_mode (string) — Credential model: shared, per_user_secret, or per_user_oauth. - - auth_type (string) (required) — Authentication scheme used when calling the agent. - - can_edit (boolean) (required) — Whether the calling member may edit or delete this resource. - - card_resolve_timeout (integer) (required) — Timeout for fetching the agent card, in seconds. - - card_url (string) (required) — URL of the agent's published A2A agent card. - - created_at (integer) (required) — Creation time as a Unix timestamp in seconds. - - created_by (integer) (required) — Member who created this resource. - - description (string) (required) — What this agent does and when to delegate to it. - - oauth_metadata (string) — OAuth metadata JSON. - - secret_schema (string) — JSON schema of the per-user secret. - - status (string) (required) — Whether the agent is active and reachable. [enabled, disabled] - - streaming (boolean) (required) — Whether the agent supports streaming responses. - - task_timeout (integer) (required) — Timeout for a single delegated task, in seconds. - - team_id (integer) (required) — Owning team; 0 means account scope. - - updated_at (integer) (required) — Last-update time as a Unix timestamp in seconds. - - total (integer) (required) — Total number of agents matching the filters. + - items (array) (required) — A2A agents on this page. + - account_id (integer) (required) — Owning account ID. + - agent_card_name (string) — Agent name resolved from the remote card. + - agent_card_skills (array) — Skills advertised by the remote card. + - agent_id (string) (required) — Unique A2A agent ID (prefix 'a2a_'). + - agent_name (string) (required) — Agent display name. + - auth_config (object) — Authentication config; secret values are masked. + - auth_mode (string) — Authentication mode. [shared, per_user_secret, per_user_oauth] + - auth_type (string) (required) — Authentication type for reaching the remote agent. + - can_edit (boolean) (required) — Whether the caller may edit this agent. + - card_resolve_timeout (integer) (required) — Card-resolution timeout in seconds. + - card_url (string) (required) — URL of the remote agent card. + - created_at (integer) (required) — Creation time. Unix timestamp in milliseconds. + - created_by (integer) (required) — Member ID that created the agent. + - description (string) (required) — Agent description. + - oauth_metadata (string) — JSON-encoded OAuth metadata (per_user_oauth mode). + - secret_schema (string) — JSON-encoded secret schema (per_user_secret mode). + - status (string) (required) — Agent status. [enabled, disabled] + - streaming (boolean) (required) — Whether the remote agent supports streaming responses. + - task_timeout (integer) (required) — Single-task execution timeout in seconds. + - team_id (integer) (required) — Team scope: 0 = account-wide; >0 = the owning team. + - updated_at (integer) (required) — Last update time. Unix timestamp in milliseconds. + - total (integer) (required) — Total number of matching agents. `, Example: ` flashduty safari a2a-agent-list --data '{"include_account":true,"limit":20,"offset":0}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -158,10 +158,10 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; }) }, } - cmd.Flags().BoolVar(&fIncludeAccount, "include-account", false, "Include account-scoped rows alongside team-scoped ones; defaults to true.") - cmd.Flags().Int64Var(&fLimit, "limit", 0, "Maximum number of rows to return; defaults to 20.") - cmd.Flags().Int64Var(&fOffset, "offset", 0, "Number of rows to skip for pagination.") - cmd.Flags().IntSliceVar(&fTeamIDs, "team-ids", nil, "Restrict results to resources owned by these teams; intersected with the caller's visible set.") + cmd.Flags().BoolVar(&fIncludeAccount, "include-account", false, "Include account-scoped (team_id=0) rows. Defaults to true.") + cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size.") + cmd.Flags().Int64Var(&fOffset, "offset", 0, "Row offset for pagination.") + cmd.Flags().IntSliceVar(&fTeamIDs, "team-ids", nil, "Filter to these team IDs; empty = the caller's visible set.") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd } @@ -182,26 +182,26 @@ func genA2aAgentsWriteCreateCmd() *cobra.Command { Short: "Create A2A agent", Long: `Create A2A agent. -Register a new A2A remote agent the SRE agent can delegate tasks to. +Register a new A2A remote agent from its agent-card URL. API: POST /safari/a2a-agent/create (remote-agent-write-create) Request fields: - --agent-name string (required) — Display name of the agent. (≤128 chars) - --auth-mode string — Credential model; defaults to shared. - --auth-type string — Authentication scheme used when calling the agent. - --card-url string (required) — URL of the agent's published A2A agent card. - --description string — What this agent does and when to delegate to it. - --oauth-metadata string — OAuth metadata JSON; reserved for OAuth-based auth. - --secret-schema string — JSON schema of the per-user secret; required when auth_mode is per_user_secret. - --streaming bool — Whether the agent supports streaming responses. - --team-id int — Owning team for the new agent; 0 for account scope. - auth_config (object, via --data) — Authentication parameters keyed by name. + --agent-name string (required) — Agent display name. (≤128 chars) + --auth-mode string — Authentication mode: shared (default), per_user_secret, or per_user_oauth. + --auth-type string — Authentication type for the remote agent. + --card-url string (required) — URL of the remote agent card. + --description string — Agent description. + --oauth-metadata string — JSON OAuth metadata; reserved for per_user_oauth. + --secret-schema string — JSON secret schema; required when auth_mode=per_user_secret. + --streaming bool — Whether the remote agent supports streaming. + --team-id int — Team scope: 0 = account-wide; >0 = team. + auth_config (object, via --data) — Authentication config key-values. Response fields ('data' envelope is unwrapped — these fields are at the top level): - - agent_id (string) (required) — Identifier of the created agent. + - agent_id (string) (required) — ID of the newly created agent. `, - Example: ` flashduty safari a2a-agent-create --data '{"agent_name":"Network Diagnostics Agent","auth_config":{"token":"secret"},"auth_type":"bearer","card_url":"https://agents.example.com/network-diag/.well-known/agent.json","description":"Runs traceroute and BGP-path analysis for network incidents.","streaming":true,"team_id":0}'`, + Example: ` flashduty safari a2a-agent-create --data '{"agent_name":"deploy-bot","auth_type":"bearer","card_url":"https://agents.example.com/deploy-bot/card","streaming":true,"team_id":0}'`, RunE: func(cmd *cobra.Command, args []string) error { return runCommand(cmd, args, func(ctx *RunContext) error { body, err := genAssembleBody(dataJSON, func(body map[string]any) error { @@ -249,15 +249,15 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringVar(&fAgentName, "agent-name", "", "Display name of the agent. (required) (≤128 chars)") - cmd.Flags().StringVar(&fAuthMode, "auth-mode", "", "Credential model; defaults to shared.") - cmd.Flags().StringVar(&fAuthType, "auth-type", "", "Authentication scheme used when calling the agent.") - cmd.Flags().StringVar(&fCardURL, "card-url", "", "URL of the agent's published A2A agent card. (required)") - cmd.Flags().StringVar(&fDescription, "description", "", "What this agent does and when to delegate to it.") - cmd.Flags().StringVar(&fOauthMetadata, "oauth-metadata", "", "OAuth metadata JSON; reserved for OAuth-based auth.") - cmd.Flags().StringVar(&fSecretSchema, "secret-schema", "", "JSON schema of the per-user secret; required when auth_mode is per_user_secret.") - cmd.Flags().BoolVar(&fStreaming, "streaming", false, "Whether the agent supports streaming responses.") - cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Owning team for the new agent; 0 for account scope.") + cmd.Flags().StringVar(&fAgentName, "agent-name", "", "Agent display name. (required) (≤128 chars)") + cmd.Flags().StringVar(&fAuthMode, "auth-mode", "", "Authentication mode: shared (default), per_user_secret, or per_user_oauth.") + cmd.Flags().StringVar(&fAuthType, "auth-type", "", "Authentication type for the remote agent.") + cmd.Flags().StringVar(&fCardURL, "card-url", "", "URL of the remote agent card. (required)") + cmd.Flags().StringVar(&fDescription, "description", "", "Agent description.") + cmd.Flags().StringVar(&fOauthMetadata, "oauth-metadata", "", "JSON OAuth metadata; reserved for per_user_oauth.") + cmd.Flags().StringVar(&fSecretSchema, "secret-schema", "", "JSON secret schema; required when auth_mode=per_user_secret.") + cmd.Flags().BoolVar(&fStreaming, "streaming", false, "Whether the remote agent supports streaming.") + cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Team scope: 0 = account-wide; >0 = team.") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd } @@ -270,15 +270,15 @@ func genA2aAgentsWriteDeleteCmd() *cobra.Command { Short: "Delete A2A agent", Long: `Delete A2A agent. -Soft-delete an A2A agent registration so it can no longer be used. +Soft-delete an A2A agent by ID. API: POST /safari/a2a-agent/delete (remote-agent-write-delete) Request fields: - --agent-id string (required) — Identifier of the target agent. + --agent-id string (required) — Target agent ID. `, Args: requireExactArg("agent_id"), - Example: ` flashduty safari a2a-agent-delete --data '{"agent_id":"a2a_9d4c1f60b3a2"}'`, + Example: ` flashduty safari a2a-agent-delete --data '{"agent_id":"a2a_6mWqZ2pK9nLcR3tY8uVb4D"}'`, RunE: func(cmd *cobra.Command, args []string) error { return runCommand(cmd, args, func(ctx *RunContext) error { body, err := genAssembleBody(dataJSON, func(body map[string]any) error { @@ -305,7 +305,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fAgentID, "agent-id", "", "Identifier of the target agent. (required)") + cmd.Flags().StringVar(&fAgentID, "agent-id", "", "Target agent ID. (required)") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd } @@ -318,15 +318,15 @@ func genA2aAgentsWriteDisableCmd() *cobra.Command { Short: "Disable A2A agent", Long: `Disable A2A agent. -Deactivate an A2A agent so the SRE agent stops delegating to it. +Disable an enabled A2A agent. API: POST /safari/a2a-agent/disable (remote-agent-write-disable) Request fields: - --agent-id string (required) — Identifier of the target agent. + --agent-id string (required) — Target agent ID. `, Args: requireExactArg("agent_id"), - Example: ` flashduty safari a2a-agent-disable --data '{"agent_id":"a2a_9d4c1f60b3a2"}'`, + Example: ` flashduty safari a2a-agent-disable --data '{"agent_id":"a2a_6mWqZ2pK9nLcR3tY8uVb4D"}'`, RunE: func(cmd *cobra.Command, args []string) error { return runCommand(cmd, args, func(ctx *RunContext) error { body, err := genAssembleBody(dataJSON, func(body map[string]any) error { @@ -353,7 +353,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fAgentID, "agent-id", "", "Identifier of the target agent. (required)") + cmd.Flags().StringVar(&fAgentID, "agent-id", "", "Target agent ID. (required)") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd } @@ -366,15 +366,15 @@ func genA2aAgentsWriteEnableCmd() *cobra.Command { Short: "Enable A2A agent", Long: `Enable A2A agent. -Activate a disabled A2A agent so the SRE agent can delegate to it. +Enable a disabled A2A agent. API: POST /safari/a2a-agent/enable (remote-agent-write-enable) Request fields: - --agent-id string (required) — Identifier of the target agent. + --agent-id string (required) — Target agent ID. `, Args: requireExactArg("agent_id"), - Example: ` flashduty safari a2a-agent-enable --data '{"agent_id":"a2a_9d4c1f60b3a2"}'`, + Example: ` flashduty safari a2a-agent-enable --data '{"agent_id":"a2a_6mWqZ2pK9nLcR3tY8uVb4D"}'`, RunE: func(cmd *cobra.Command, args []string) error { return runCommand(cmd, args, func(ctx *RunContext) error { body, err := genAssembleBody(dataJSON, func(body map[string]any) error { @@ -401,7 +401,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fAgentID, "agent-id", "", "Identifier of the target agent. (required)") + cmd.Flags().StringVar(&fAgentID, "agent-id", "", "Target agent ID. (required)") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd } @@ -423,25 +423,25 @@ func genA2aAgentsWriteUpdateCmd() *cobra.Command { Short: "Update A2A agent", Long: `Update A2A agent. -Edit an A2A agent's card URL, auth, streaming flag, or owning team. +Apply a partial update to an A2A agent. Omit a field to leave it unchanged. API: POST /safari/a2a-agent/update (remote-agent-write-update) Request fields: - --agent-id string (required) — Identifier of the agent to update. - --agent-name string — New display name. (≤128 chars) - --auth-mode string — New credential model. - --auth-type string — New authentication scheme. - --card-url string — New agent card URL. - --description string — New description. - --oauth-metadata string — New OAuth metadata JSON. - --secret-schema string — New per-user secret JSON schema. - --streaming bool — Toggle streaming-response support. - --team-id int — Reassign the agent to this team; omit to leave unchanged, 0 for account scope. - auth_config (object, via --data) — New authentication parameters. + --agent-id string (required) — Target agent ID. + --agent-name string — New display name. Omit to leave unchanged. (≤128 chars) + --auth-mode string — New auth mode: shared, per_user_secret, or per_user_oauth. + --auth-type string — New auth type. Omit to leave unchanged. + --card-url string — New card URL. Omit to leave unchanged. + --description string — New description. Omit to leave unchanged. + --oauth-metadata string — New JSON OAuth metadata. + --secret-schema string — New JSON secret schema. + --streaming bool — Toggle streaming support. Omit to leave unchanged. + --team-id int — Reassign team scope. Omit to leave unchanged. + auth_config (object, via --data) — Replace the auth config. Omit to leave unchanged. `, Args: requireExactArg("agent_id"), - Example: ` flashduty safari a2a-agent-update --data '{"agent_id":"a2a_9d4c1f60b3a2","description":"Runs traceroute, BGP, and DNS analysis for network incidents."}'`, + Example: ` flashduty safari a2a-agent-update --data '{"agent_id":"a2a_6mWqZ2pK9nLcR3tY8uVb4D","description":"Inspects deployment pipelines and proposes rollbacks."}'`, RunE: func(cmd *cobra.Command, args []string) error { return runCommand(cmd, args, func(ctx *RunContext) error { body, err := genAssembleBody(dataJSON, func(body map[string]any) error { @@ -495,16 +495,16 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fAgentID, "agent-id", "", "Identifier of the agent to update. (required)") - cmd.Flags().StringVar(&fAgentName, "agent-name", "", "New display name. (≤128 chars)") - cmd.Flags().StringVar(&fAuthMode, "auth-mode", "", "New credential model.") - cmd.Flags().StringVar(&fAuthType, "auth-type", "", "New authentication scheme.") - cmd.Flags().StringVar(&fCardURL, "card-url", "", "New agent card URL.") - cmd.Flags().StringVar(&fDescription, "description", "", "New description.") - cmd.Flags().StringVar(&fOauthMetadata, "oauth-metadata", "", "New OAuth metadata JSON.") - cmd.Flags().StringVar(&fSecretSchema, "secret-schema", "", "New per-user secret JSON schema.") - cmd.Flags().BoolVar(&fStreaming, "streaming", false, "Toggle streaming-response support.") - cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Reassign the agent to this team; omit to leave unchanged, 0 for account scope.") + cmd.Flags().StringVar(&fAgentID, "agent-id", "", "Target agent ID. (required)") + cmd.Flags().StringVar(&fAgentName, "agent-name", "", "New display name. Omit to leave unchanged. (≤128 chars)") + cmd.Flags().StringVar(&fAuthMode, "auth-mode", "", "New auth mode: shared, per_user_secret, or per_user_oauth.") + cmd.Flags().StringVar(&fAuthType, "auth-type", "", "New auth type. Omit to leave unchanged.") + cmd.Flags().StringVar(&fCardURL, "card-url", "", "New card URL. Omit to leave unchanged.") + cmd.Flags().StringVar(&fDescription, "description", "", "New description. Omit to leave unchanged.") + cmd.Flags().StringVar(&fOauthMetadata, "oauth-metadata", "", "New JSON OAuth metadata.") + cmd.Flags().StringVar(&fSecretSchema, "secret-schema", "", "New JSON secret schema.") + cmd.Flags().BoolVar(&fStreaming, "streaming", false, "Toggle streaming support. Omit to leave unchanged.") + cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Reassign team scope. Omit to leave unchanged.") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd } diff --git a/internal/cli/zz_generated_applications.go b/internal/cli/zz_generated_applications.go index 4a75bae..f84591a 100644 --- a/internal/cli/zz_generated_applications.go +++ b/internal/cli/zz_generated_applications.go @@ -266,6 +266,65 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; return cmd } +func genApplicationsWebhookTestCmd() *cobra.Command { + var dataJSON string + var fApplicationID string + var fWebhookURL string + cmd := &cobra.Command{ + Use: "application-webhook-test ", + Short: "Test application webhook", + Long: `Test application webhook. + +Send a sample RUM alert event to verify an application's webhook URL. + +API: POST /rum/application/webhook/test (rum-application-webhook-test) + +Request fields: + --application-id string (required) — RUM application ID. + --webhook-url string (required) — Webhook URL to receive the sample alert event. + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - message (string) (required) — 'ok' on success, otherwise the delivery error message. + - ok (boolean) (required) — Whether the webhook endpoint accepted the sample event. + - status_code (integer) (required) — HTTP status code returned by the webhook endpoint. 0 when the request did not receive a response. +`, + Args: requireExactArg("application_id"), + Example: ` flashduty rum application-webhook-test --data '{"application_id":"rum-app-prod","webhook_url":"https://hooks.example.com/rum-alerts"}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "application_id", "string"); err != nil { + return err + } + if cmd.Flags().Changed("application-id") { + body["application_id"] = fApplicationID + } + if cmd.Flags().Changed("webhook-url") { + body["webhook_url"] = fWebhookURL + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.RUMWebhookTestRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Applications.WebhookTest(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().StringVar(&fApplicationID, "application-id", "", "RUM application ID. (required)") + cmd.Flags().StringVar(&fWebhookURL, "webhook-url", "", "Webhook URL to receive the sample alert event. (required)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + func genApplicationsWriteCreateCmd() *cobra.Command { var dataJSON string var fApplicationName string @@ -510,6 +569,7 @@ func registerGeneratedApplications(root *cobra.Command) { genAddLeaf(gRUM, genApplicationsReadInfoCmd()) genAddLeaf(gRUM, genApplicationsReadInfosCmd()) genAddLeaf(gRUM, genApplicationsReadListCmd()) + genAddLeaf(gRUM, genApplicationsWebhookTestCmd()) genAddLeaf(gRUM, genApplicationsWriteCreateCmd()) genAddLeaf(gRUM, genApplicationsWriteDeleteCmd()) genAddLeaf(gRUM, genApplicationsWriteUpdateCmd()) diff --git a/internal/cli/zz_generated_channels.go b/internal/cli/zz_generated_channels.go index 370b43a..9c13837 100644 --- a/internal/cli/zz_generated_channels.go +++ b/internal/cli/zz_generated_channels.go @@ -854,6 +854,66 @@ Request fields: return cmd } +func genChannelsChannelEscalateWebhookRobotListCmd() *cobra.Command { + var dataJSON string + var fQuery string + var fType string + cmd := &cobra.Command{ + Use: "escalate-webhook-robot-list", + Short: "List webhook robots in escalation rules", + Long: `List webhook robots in escalation rules. + +List all IM webhook robots configured in escalation rules across the account. Returns a deduplicated list of robots with references to which channels and escalation rules use them. + +API: POST /channel/escalate/webhook/robot/list (channelEscalateWebhookRobotList) + +Request fields: + --query string — Search keyword. Fuzzy matches against robot alias or token, case-insensitive. + --type string — Filter by robot type, e.g. 'feishu', 'dingtalk', 'wecom', 'slack', 'teams'. Omit to return all types. + +Response fields ('data' envelope is unwrapped — rows are nested under items[]; pipe 'jq '.items[]'', NOT '.data.items[]'): + - list (array) — Deduplicated list of webhook robots. + - referenced_by (array) — List of channels and escalation rules referencing this robot. + - channel_id (integer) — Channel ID. + - channel_name (string) — Channel name. + - escalate_rule_id (string) — Escalation rule ID (MongoDB ObjectID). + - escalate_rule_name (string) — Escalation rule name. + - settings (object) — Robot configuration, including 'token' (webhook URL or secret) and 'alias' (robot display name) among other fields. + - type (string) — Robot type, e.g. 'feishu', 'dingtalk', 'wecom', 'slack', 'teams', etc. +`, + Example: ` flashduty channel escalate-webhook-robot-list --data '{"query":"ops","type":"feishu"}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if cmd.Flags().Changed("query") { + body["query"] = fQuery + } + if cmd.Flags().Changed("type") { + body["type"] = fType + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.ChannelsChannelEscalateWebhookRobotListRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Channels.ChannelEscalateWebhookRobotList(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().StringVar(&fQuery, "query", "", "Search keyword. Fuzzy matches against robot alias or token, case-insensitive.") + cmd.Flags().StringVar(&fType, "type", "", "Filter by robot type, e.g. 'feishu', 'dingtalk', 'wecom', 'slack', 'teams'. Omit to return all types.") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + func genChannelsChannelInfoCmd() *cobra.Command { var dataJSON string var fChannelID int64 @@ -2717,6 +2777,7 @@ func registerGeneratedChannels(root *cobra.Command) { genAddLeaf(gChannel, genChannelsChannelEscalateRuleInfoCmd()) genAddLeaf(gChannel, genChannelsChannelEscalateRuleListCmd()) genAddLeaf(gChannel, genChannelsChannelEscalateRuleUpdateCmd()) + genAddLeaf(gChannel, genChannelsChannelEscalateWebhookRobotListCmd()) genAddLeaf(gChannel, genChannelsChannelInfoCmd()) genAddLeaf(gChannel, genChannelsChannelInfosCmd()) genAddLeaf(gChannel, genChannelsChannelInhibitRuleCreateCmd()) diff --git a/internal/cli/zz_generated_im_integrations.go b/internal/cli/zz_generated_im_integrations.go index f5391a2..a502552 100644 --- a/internal/cli/zz_generated_im_integrations.go +++ b/internal/cli/zz_generated_im_integrations.go @@ -62,6 +62,6 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; } func registerGeneratedImIntegrations(root *cobra.Command) { - gDatasource := genGroup(root, "datasource", "On-call/IM integrations API") + gDatasource := genGroup(root, "datasource", "On-call API") genAddLeaf(gDatasource, genImIntegrationsListCmd()) } diff --git a/internal/cli/zz_generated_incidents.go b/internal/cli/zz_generated_incidents.go index ccbc755..bdd93b3 100644 --- a/internal/cli/zz_generated_incidents.go +++ b/internal/cli/zz_generated_incidents.go @@ -2810,6 +2810,634 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; return cmd } +func genIncidentsPostmortemReadListTemplatesCmd() *cobra.Command { + var dataJSON string + var fP int64 + var fLimit int64 + var fSearchAfterCtx string + var fAsc bool + var fOrderBy string + cmd := &cobra.Command{ + Use: "post-mortem-template-list", + Short: "List post-mortem templates", + Long: `List post-mortem templates. + +Return built-in and custom post-mortem templates for the account. + +API: POST /incident/post-mortem/template/list (postmortem-read-list-templates) + +Request fields: + --page int — Page number starting at 1. (min 0) + --limit int — Page size, at most 100. (0-100) + --search-after-ctx string — Cursor from a previous response for forward pagination. + --asc bool — Ascending order when true. + --order-by string — Field used to order results. [created_at_seconds] + +Response fields ('data' envelope is unwrapped — rows are nested under items[]; pipe 'jq '.items[]'', NOT '.data.items[]'): + - has_next_page (boolean) (required) — True when another page is available. + - items (array) (required) — Templates in the current page. + - account_id (integer) (required) — Account ID that owns the template. 0 for built-in templates. + - content (string) (required) — BlockNote JSON content used to initialize the report body. + - content_markdown (string) (required) — Markdown version of the template content, used by AI generation. + - created_at_seconds (integer) (required) — Unix timestamp in seconds when the template was created. + - description (string) (required) — Template description. + - name (string) (required) — Template name shown in the console. + - team_id (integer) (required) — Managing team ID. Built-in templates use 0. + - template_id (string) (required) — Template ID. Built-in templates use a stable 'post_mortem_default_tmpl_*' ID. + - updated_at_seconds (integer) (required) — Unix timestamp in seconds when the template was last updated. + - search_after_ctx (string) — Cursor for forward pagination. + - total (integer) (required) — Total matching templates. +`, + Example: ` flashduty incident post-mortem-template-list --data '{"asc":false,"limit":20,"order_by":"created_at_seconds","p":1}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if cmd.Flags().Changed("page") { + body["p"] = fP + } + if cmd.Flags().Changed("limit") { + body["limit"] = fLimit + } + if cmd.Flags().Changed("search-after-ctx") { + body["search_after_ctx"] = fSearchAfterCtx + } + if cmd.Flags().Changed("asc") { + body["asc"] = fAsc + } + if cmd.Flags().Changed("order-by") { + body["order_by"] = fOrderBy + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.ListPostMortemTemplatesRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Incidents.PostmortemReadListTemplates(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().Int64Var(&fP, "page", 0, "Page number starting at 1. (min 0)") + cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size, at most 100. (0-100)") + cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Cursor from a previous response for forward pagination.") + cmd.Flags().BoolVar(&fAsc, "asc", false, "Ascending order when true.") + cmd.Flags().StringVar(&fOrderBy, "order-by", "", "Field used to order results. [created_at_seconds]") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genIncidentsPostmortemReadTemplateInfoCmd() *cobra.Command { + var dataJSON string + var fTemplateID string + cmd := &cobra.Command{ + Use: "post-mortem-template-info ", + Short: "Get post-mortem template detail", + Long: `Get post-mortem template detail. + +Return one post-mortem template by ID. + +API: GET /incident/post-mortem/template/info (postmortem-read-template-info) + +Request fields: + --template-id string (required) — Template ID. + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - account_id (integer) (required) — Account ID that owns the template. 0 for built-in templates. + - content (string) (required) — BlockNote JSON content used to initialize the report body. + - content_markdown (string) (required) — Markdown version of the template content, used by AI generation. + - created_at_seconds (integer) (required) — Unix timestamp in seconds when the template was created. + - description (string) (required) — Template description. + - name (string) (required) — Template name shown in the console. + - team_id (integer) (required) — Managing team ID. Built-in templates use 0. + - template_id (string) (required) — Template ID. Built-in templates use a stable 'post_mortem_default_tmpl_*' ID. + - updated_at_seconds (integer) (required) — Unix timestamp in seconds when the template was last updated. +`, + Args: requireExactArg("template_id"), + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "template_id", "string"); err != nil { + return err + } + if cmd.Flags().Changed("template-id") { + body["template_id"] = fTemplateID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.IncidentsPostmortemReadTemplateInfoRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Incidents.PostmortemReadTemplateInfo(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().StringVar(&fTemplateID, "template-id", "", "Template ID. (required)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genIncidentsPostmortemWriteDeleteTemplateCmd() *cobra.Command { + var dataJSON string + var fTemplateID string + cmd := &cobra.Command{ + Use: "post-mortem-template-delete ", + Short: "Delete post-mortem template", + Long: `Delete post-mortem template. + +Delete a custom post-mortem template. + +API: POST /incident/post-mortem/template/delete (postmortem-write-delete-template) + +Request fields: + --template-id string (required) — Template ID. +`, + Args: requireExactArg("template_id"), + Example: ` flashduty incident post-mortem-template-delete --data '{"template_id":"post_mortem_custom_tmpl_01"}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "template_id", "string"); err != nil { + return err + } + if cmd.Flags().Changed("template-id") { + body["template_id"] = fTemplateID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.DeletePostMortemTemplateRequest) + if err := genBindBody(body, req); err != nil { + return err + } + resp, err := ctx.Client.Incidents.PostmortemWriteDeleteTemplate(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + if resp != nil && len(resp.Raw) > 0 { + return ctx.WriteRaw(resp.Raw) + } + ctx.WriteResult("OK: POST /incident/post-mortem/template/delete") + return nil + }) + }, + } + cmd.Flags().StringVar(&fTemplateID, "template-id", "", "Template ID. (required)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genIncidentsPostmortemWriteInitCmd() *cobra.Command { + var dataJSON string + var fIncidentIDs []string + var fTemplateID string + cmd := &cobra.Command{ + Use: "post-mortem-init [...]", + Short: "Initialize post-mortem", + Long: `Initialize post-mortem. + +Create a post-mortem draft from one or more incidents and a template. + +API: POST /incident/post-mortem/init (postmortem-write-init) + +Request fields: + --incident-ids []string (required) — Incident IDs to link to the report. 1-10 incidents. + --template-id string (required) — Template ID used to initialize the report. + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - basics (object) (required) + - incidents_earliest_start_seconds (integer) (required) — Earliest start time among linked incidents (seconds). + - incidents_highest_severity (string) (required) — Highest severity among linked incidents. + - incidents_latest_close_seconds (integer) (required) — Latest close time among linked incidents (seconds). + - incidents_total_duration_seconds (integer) (required) — Cumulative duration in seconds. + - responders (array) (required) — Responders involved in the incident(s). + - acknowledged_at (integer) (required) — Unix timestamp (seconds) when the member acknowledged. 0 if not yet acknowledged. + - as (string) — Role label of this responder. + - assigned_at (integer) (required) — Unix timestamp (seconds) when the member was assigned. + - email (string) — Member email, filled by the server. + - person_id (integer) (required) — Responder member ID. + - person_name (string) — Member display name, filled by the server. + - content (object) (required) + - content (string) (required) — Report body content (BlockNote JSON). + - follow_ups (string) (required) — Follow-up action items rendered as a single string. + - meta (object) (required) — Post-mortem metadata (lightweight shape used in lists). + - account_id (integer) (required) — Account ID. + - author_ids (array) (required) — Member IDs that contributed to the report. + - channel_id (integer) (required) — Owning channel ID. 0 if none. + - channel_name (string) (required) — Channel name, filled by the server. + - created_at_seconds (integer) (required) — Creation timestamp (seconds). + - incident_ids (array) (required) — Linked incident IDs. + - is_private (boolean) (required) — When true, only team members and admins can view. + - media_count (integer) (required) — Number of uploaded media files. + - post_mortem_id (string) (required) — Deterministic post-mortem ID derived from account and incident IDs. + - status (string) (required) — Report status. [drafting, published] + - team_id (integer) (required) — Owning team ID. 0 if none. + - template_id (string) (required) — Template used to initialize the report. + - title (string) (required) — Report title. + - updated_at_seconds (integer) (required) — Last update timestamp (seconds). +`, + Args: requireArgs("incident_ids"), + Example: ` flashduty incident post-mortem-init --data '{"incident_ids":["69bb9233331067560c718ecd"],"template_id":"post_mortem_default_tmpl_en-us"}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "incident_ids", "slice"); err != nil { + return err + } + if cmd.Flags().Changed("incident-ids") { + body["incident_ids"] = fIncidentIDs + } + if cmd.Flags().Changed("template-id") { + body["template_id"] = fTemplateID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.InitPostMortemRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Incidents.PostmortemWriteInit(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().StringSliceVar(&fIncidentIDs, "incident-ids", nil, "Incident IDs to link to the report. 1-10 incidents. (required)") + cmd.Flags().StringVar(&fTemplateID, "template-id", "", "Template ID used to initialize the report. (required)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genIncidentsPostmortemWriteResetBasicsCmd() *cobra.Command { + var dataJSON string + var fIncidentsEarliestStartSeconds string + var fIncidentsHighestSeverity string + var fIncidentsLatestCloseSeconds string + var fIncidentsTotalDurationSeconds int64 + var fPostMortemID string + var fResponderIDs []int + cmd := &cobra.Command{ + Use: "post-mortem-basics-reset ", + Short: "Update post-mortem basics", + Long: `Update post-mortem basics. + +Replace the incident facts stored in a post-mortem report. + +API: POST /incident/post-mortem/basics/reset (postmortem-write-reset-basics) + +Request fields: + --incidents-earliest-start-seconds string (required) — Unix timestamp in seconds for the earliest linked incident start time. (min 1) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. + --incidents-highest-severity string (required) — Highest severity among linked incidents. + --incidents-latest-close-seconds string — Unix timestamp in seconds for the latest linked incident close time. 0 when still open. (min 0) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. + --incidents-total-duration-seconds int — Total incident duration in seconds. (min 0) + --post-mortem-id string (required) — Post-mortem ID. + --responder-ids []int — Responder member IDs to store on the report. +`, + Args: requireExactArg("post_mortem_id"), + Example: ` flashduty incident post-mortem-basics-reset --data '{"incidents_earliest_start_seconds":1761133512,"incidents_highest_severity":"Warning","incidents_latest_close_seconds":1761133632,"incidents_total_duration_seconds":120,"post_mortem_id":"8104935102bf89dc01ac638a5261fe7e","responder_ids":[3790925372131]}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + vIncidentsEarliestStartSeconds, okIncidentsEarliestStartSeconds, err := genParseTimeFlag(cmd, "incidents-earliest-start-seconds", fIncidentsEarliestStartSeconds) + if err != nil { + return err + } + vIncidentsLatestCloseSeconds, okIncidentsLatestCloseSeconds, err := genParseTimeFlag(cmd, "incidents-latest-close-seconds", fIncidentsLatestCloseSeconds) + if err != nil { + return err + } + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "post_mortem_id", "string"); err != nil { + return err + } + if okIncidentsEarliestStartSeconds { + body["incidents_earliest_start_seconds"] = vIncidentsEarliestStartSeconds + } + if cmd.Flags().Changed("incidents-highest-severity") { + body["incidents_highest_severity"] = fIncidentsHighestSeverity + } + if okIncidentsLatestCloseSeconds { + body["incidents_latest_close_seconds"] = vIncidentsLatestCloseSeconds + } + if cmd.Flags().Changed("incidents-total-duration-seconds") { + body["incidents_total_duration_seconds"] = fIncidentsTotalDurationSeconds + } + if cmd.Flags().Changed("post-mortem-id") { + body["post_mortem_id"] = fPostMortemID + } + if cmd.Flags().Changed("responder-ids") { + body["responder_ids"] = fResponderIDs + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.ResetPostMortemBasicsRequest) + if err := genBindBody(body, req); err != nil { + return err + } + resp, err := ctx.Client.Incidents.PostmortemWriteResetBasics(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + if resp != nil && len(resp.Raw) > 0 { + return ctx.WriteRaw(resp.Raw) + } + ctx.WriteResult("OK: POST /incident/post-mortem/basics/reset") + return nil + }) + }, + } + cmd.Flags().StringVar(&fIncidentsEarliestStartSeconds, "incidents-earliest-start-seconds", "", "Unix timestamp in seconds for the earliest linked incident start time. (required) (min 1) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds.") + cmd.Flags().StringVar(&fIncidentsHighestSeverity, "incidents-highest-severity", "", "Highest severity among linked incidents. (required)") + cmd.Flags().StringVar(&fIncidentsLatestCloseSeconds, "incidents-latest-close-seconds", "", "Unix timestamp in seconds for the latest linked incident close time. 0 when still open. (min 0) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds.") + cmd.Flags().Int64Var(&fIncidentsTotalDurationSeconds, "incidents-total-duration-seconds", 0, "Total incident duration in seconds. (min 0)") + cmd.Flags().StringVar(&fPostMortemID, "post-mortem-id", "", "Post-mortem ID. (required)") + cmd.Flags().IntSliceVar(&fResponderIDs, "responder-ids", nil, "Responder member IDs to store on the report.") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genIncidentsPostmortemWriteResetFollowUpsCmd() *cobra.Command { + var dataJSON string + var fFollowUps string + var fPostMortemID string + cmd := &cobra.Command{ + Use: "post-mortem-follow-ups-reset ", + Short: "Update post-mortem follow-ups", + Long: `Update post-mortem follow-ups. + +Replace the follow-up action items on a post-mortem report. + +API: POST /incident/post-mortem/follow-ups/reset (postmortem-write-reset-follow-ups) + +Request fields: + --follow-ups string — Follow-up action items as free text. + --post-mortem-id string (required) — Post-mortem ID. +`, + Args: requireExactArg("post_mortem_id"), + Example: ` flashduty incident post-mortem-follow-ups-reset --data '{"follow_ups":"- Add database saturation alert\n- Review cache TTL rollout","post_mortem_id":"8104935102bf89dc01ac638a5261fe7e"}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "post_mortem_id", "string"); err != nil { + return err + } + if cmd.Flags().Changed("follow-ups") { + body["follow_ups"] = fFollowUps + } + if cmd.Flags().Changed("post-mortem-id") { + body["post_mortem_id"] = fPostMortemID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.ResetPostMortemFollowUpsRequest) + if err := genBindBody(body, req); err != nil { + return err + } + resp, err := ctx.Client.Incidents.PostmortemWriteResetFollowUps(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + if resp != nil && len(resp.Raw) > 0 { + return ctx.WriteRaw(resp.Raw) + } + ctx.WriteResult("OK: POST /incident/post-mortem/follow-ups/reset") + return nil + }) + }, + } + cmd.Flags().StringVar(&fFollowUps, "follow-ups", "", "Follow-up action items as free text.") + cmd.Flags().StringVar(&fPostMortemID, "post-mortem-id", "", "Post-mortem ID. (required)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genIncidentsPostmortemWriteResetStatusCmd() *cobra.Command { + var dataJSON string + var fPostMortemID string + var fStatus string + cmd := &cobra.Command{ + Use: "post-mortem-status-reset ", + Short: "Update post-mortem status", + Long: `Update post-mortem status. + +Set a post-mortem report to drafting or published. + +API: POST /incident/post-mortem/status/reset (postmortem-write-reset-status) + +Request fields: + --post-mortem-id string (required) — Post-mortem ID. + --status string (required) — Target report status. [drafting, published] +`, + Args: requireExactArg("post_mortem_id"), + Example: ` flashduty incident post-mortem-status-reset --data '{"post_mortem_id":"8104935102bf89dc01ac638a5261fe7e","status":"published"}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "post_mortem_id", "string"); err != nil { + return err + } + if cmd.Flags().Changed("post-mortem-id") { + body["post_mortem_id"] = fPostMortemID + } + if cmd.Flags().Changed("status") { + body["status"] = fStatus + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.ResetPostMortemStatusRequest) + if err := genBindBody(body, req); err != nil { + return err + } + resp, err := ctx.Client.Incidents.PostmortemWriteResetStatus(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + if resp != nil && len(resp.Raw) > 0 { + return ctx.WriteRaw(resp.Raw) + } + ctx.WriteResult("OK: POST /incident/post-mortem/status/reset") + return nil + }) + }, + } + cmd.Flags().StringVar(&fPostMortemID, "post-mortem-id", "", "Post-mortem ID. (required)") + cmd.Flags().StringVar(&fStatus, "status", "", "Target report status. (required) [drafting, published]") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genIncidentsPostmortemWriteResetTitleCmd() *cobra.Command { + var dataJSON string + var fPostMortemID string + var fTitle string + cmd := &cobra.Command{ + Use: "post-mortem-title-reset ", + Short: "Update post-mortem title", + Long: `Update post-mortem title. + +Replace the title of a post-mortem report. + +API: POST /incident/post-mortem/title/reset (postmortem-write-reset-title) + +Request fields: + --post-mortem-id string (required) — Post-mortem ID. + --title string (required) — New report title. +`, + Args: requireExactArg("post_mortem_id"), + Example: ` flashduty incident post-mortem-title-reset --data '{"post_mortem_id":"8104935102bf89dc01ac638a5261fe7e","title":"Production API latency incident"}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "post_mortem_id", "string"); err != nil { + return err + } + if cmd.Flags().Changed("post-mortem-id") { + body["post_mortem_id"] = fPostMortemID + } + if cmd.Flags().Changed("title") { + body["title"] = fTitle + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.ResetPostMortemTitleRequest) + if err := genBindBody(body, req); err != nil { + return err + } + resp, err := ctx.Client.Incidents.PostmortemWriteResetTitle(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + if resp != nil && len(resp.Raw) > 0 { + return ctx.WriteRaw(resp.Raw) + } + ctx.WriteResult("OK: POST /incident/post-mortem/title/reset") + return nil + }) + }, + } + cmd.Flags().StringVar(&fPostMortemID, "post-mortem-id", "", "Post-mortem ID. (required)") + cmd.Flags().StringVar(&fTitle, "title", "", "New report title. (required)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genIncidentsPostmortemWriteUpsertTemplateCmd() *cobra.Command { + var dataJSON string + var fContent string + var fContentMarkdown string + var fDescription string + var fName string + var fTeamID int64 + var fTemplateID string + cmd := &cobra.Command{ + Use: "post-mortem-template-upsert", + Short: "Create or update post-mortem template", + Long: `Create or update post-mortem template. + +Create a custom post-mortem template or update an existing one. + +API: POST /incident/post-mortem/template/upsert (postmortem-write-upsert-template) + +Request fields: + --content string (required) — BlockNote JSON template content. + --content-markdown string — Markdown version of the template content. + --description string — Template description. + --name string (required) — Template name. + --team-id int — Managing team ID. Required when creating a custom template. + --template-id string — Template ID. Omit to create a new template; provide it to update an existing template. + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - account_id (integer) (required) — Account ID that owns the template. 0 for built-in templates. + - content (string) (required) — BlockNote JSON content used to initialize the report body. + - content_markdown (string) (required) — Markdown version of the template content, used by AI generation. + - created_at_seconds (integer) (required) — Unix timestamp in seconds when the template was created. + - description (string) (required) — Template description. + - name (string) (required) — Template name shown in the console. + - team_id (integer) (required) — Managing team ID. Built-in templates use 0. + - template_id (string) (required) — Template ID. Built-in templates use a stable 'post_mortem_default_tmpl_*' ID. + - updated_at_seconds (integer) (required) — Unix timestamp in seconds when the template was last updated. +`, + Example: ` flashduty incident post-mortem-template-upsert --data '{"content":"[{\"type\":\"heading\",\"content\":\"Summary\"}]","content_markdown":"## Summary\nDescribe what happened.","description":"Template for production incident reviews.","name":"Production incident template","team_id":2477033058131}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if cmd.Flags().Changed("content") { + body["content"] = fContent + } + if cmd.Flags().Changed("content-markdown") { + body["content_markdown"] = fContentMarkdown + } + if cmd.Flags().Changed("description") { + body["description"] = fDescription + } + if cmd.Flags().Changed("name") { + body["name"] = fName + } + if cmd.Flags().Changed("team-id") { + body["team_id"] = fTeamID + } + if cmd.Flags().Changed("template-id") { + body["template_id"] = fTemplateID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.UpsertPostMortemTemplateRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Incidents.PostmortemWriteUpsertTemplate(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().StringVar(&fContent, "content", "", "BlockNote JSON template content. (required)") + cmd.Flags().StringVar(&fContentMarkdown, "content-markdown", "", "Markdown version of the template content.") + cmd.Flags().StringVar(&fDescription, "description", "", "Template description.") + cmd.Flags().StringVar(&fName, "name", "", "Template name. (required)") + cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Managing team ID. Required when creating a custom template.") + cmd.Flags().StringVar(&fTemplateID, "template-id", "", "Template ID. Omit to create a new template; provide it to update an existing template.") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + func registerGeneratedIncidents(root *cobra.Command) { gIncident := genGroup(root, "incident", "On-call/Incidents API") genAddLeaf(gIncident, genIncidentsReadGetWarRoomDefaultObserversCmd()) @@ -2843,4 +3471,13 @@ func registerGeneratedIncidents(root *cobra.Command) { genAddLeaf(gIncident, genIncidentsWarRoomDeleteCmd()) genAddLeaf(gIncident, genIncidentsWarRoomDetailCmd()) genAddLeaf(gIncident, genIncidentsWarRoomListCmd()) + genAddLeaf(gIncident, genIncidentsPostmortemReadListTemplatesCmd()) + genAddLeaf(gIncident, genIncidentsPostmortemReadTemplateInfoCmd()) + genAddLeaf(gIncident, genIncidentsPostmortemWriteDeleteTemplateCmd()) + genAddLeaf(gIncident, genIncidentsPostmortemWriteInitCmd()) + genAddLeaf(gIncident, genIncidentsPostmortemWriteResetBasicsCmd()) + genAddLeaf(gIncident, genIncidentsPostmortemWriteResetFollowUpsCmd()) + genAddLeaf(gIncident, genIncidentsPostmortemWriteResetStatusCmd()) + genAddLeaf(gIncident, genIncidentsPostmortemWriteResetTitleCmd()) + genAddLeaf(gIncident, genIncidentsPostmortemWriteUpsertTemplateCmd()) } diff --git a/internal/cli/zz_generated_integrations.go b/internal/cli/zz_generated_integrations.go index fc2082b..f970225 100644 --- a/internal/cli/zz_generated_integrations.go +++ b/internal/cli/zz_generated_integrations.go @@ -8,6 +8,57 @@ import ( flashduty "github.com/flashcatcloud/go-flashduty" ) +func genIntegrationsDatasourceImPersonTryLinkCmd() *cobra.Command { + var dataJSON string + var fIntegrationID int64 + cmd := &cobra.Command{ + Use: "im-person-try-link ", + Short: "Attempt IM person linking", + Long: `Attempt IM person linking. + +Try to automatically link unbound members to their IM accounts for one integration. + +API: POST /datasource/im/person/try-link (datasourceImPersonTryLink) + +Request fields: + --integration-id int (required) — IM integration ID. + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - new_linked_person_ids (array) (required) — Person IDs newly linked during this call. +`, + Args: requireExactArg("integration_id"), + Example: ` flashduty datasource im-person-try-link --data '{"integration_id":6113996590131}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "integration_id", "int"); err != nil { + return err + } + if cmd.Flags().Changed("integration-id") { + body["integration_id"] = fIntegrationID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.TryLinkPersonRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Integrations.DatasourceImPersonTryLink(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().Int64Var(&fIntegrationID, "integration-id", 0, "IM integration ID. (required)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + func genIntegrationsDetailCmd() *cobra.Command { var dataJSON string var fEventID string @@ -200,6 +251,8 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; } func registerGeneratedIntegrations(root *cobra.Command) { + gDatasource := genGroup(root, "datasource", "On-call API") + genAddLeaf(gDatasource, genIntegrationsDatasourceImPersonTryLinkCmd()) gWebhook := genGroup(root, "webhook", "On-call/Integrations API") genAddLeaf(gWebhook, genIntegrationsDetailCmd()) genAddLeaf(gWebhook, genIntegrationsListCmd()) diff --git a/internal/cli/zz_generated_manifest.go b/internal/cli/zz_generated_manifest.go index 384797f..5e693d3 100644 --- a/internal/cli/zz_generated_manifest.go +++ b/internal/cli/zz_generated_manifest.go @@ -38,6 +38,7 @@ var generatedOpIDs = []string{ "channelEscalateRuleInfo", "channelEscalateRuleList", "channelEscalateRuleUpdate", + "channelEscalateWebhookRobotList", "channelInfo", "channelInfos", "channelInhibitRuleCreate", @@ -60,6 +61,7 @@ var generatedOpIDs = []string{ "channelUnsubscribeRuleList", "channelUnsubscribeRuleUpdate", "channelUpdate", + "datasourceImPersonTryLink", "enrichment-read-info", "enrichment-read-list", "enrichment-write-upsert", @@ -148,6 +150,7 @@ var generatedOpIDs = []string{ "monit-datasource-write-create", "monit-datasource-write-delete", "monit-datasource-write-update", + "monit-preview-sync", "monit-read-query-diagnose", "monit-read-query-rows", "monit-read-targets-list", @@ -177,6 +180,15 @@ var generatedOpIDs = []string{ "monit-store-ruleset-list", "monit-store-ruleset-update", "personInfos", + "postmortem-read-list-templates", + "postmortem-read-template-info", + "postmortem-write-delete-template", + "postmortem-write-init", + "postmortem-write-reset-basics", + "postmortem-write-reset-follow-ups", + "postmortem-write-reset-status", + "postmortem-write-reset-title", + "postmortem-write-upsert-template", "remote-agent-read-get", "remote-agent-read-list", "remote-agent-write-create", @@ -200,6 +212,7 @@ var generatedOpIDs = []string{ "rum-application-read-info", "rum-application-read-infos", "rum-application-read-list", + "rum-application-webhook-test", "rum-application-write-create", "rum-application-write-delete", "rum-application-write-update", @@ -216,7 +229,7 @@ var generatedOpIDs = []string{ "scheduleUpdate", "session-read-info", "session-read-list", - "skill-read-download", + "session-write-delete", "skill-read-enable", "skill-read-get", "skill-read-list", @@ -235,13 +248,24 @@ var generatedOpIDs = []string{ "statusPageChangeTimelineDelete", "statusPageChangeTimelineUpdate", "statusPageChangeUpdate", + "statusPageComponentDelete", + "statusPageComponentUpsert", + "statusPageCreate", + "statusPageDelete", + "statusPageInfo", "statusPageMigrateEmailSubscribers", "statusPageMigrateStructure", "statusPageMigrationCancel", "statusPageMigrationStatus", + "statusPageSectionDelete", + "statusPageSectionUpsert", "statusPageSubscriberExport", "statusPageSubscriberImport", "statusPageSubscriberList", + "statusPageTemplateDelete", + "statusPageTemplateList", + "statusPageTemplateUpsert", + "statusPageUpdate", "team-read-info", "team-read-infos", "team-read-list", diff --git a/internal/cli/zz_generated_mcp_servers.go b/internal/cli/zz_generated_mcp_servers.go index dd765ff..e755d5b 100644 --- a/internal/cli/zz_generated_mcp_servers.go +++ b/internal/cli/zz_generated_mcp_servers.go @@ -16,46 +16,47 @@ func genMcpServersReadServerGetCmd() *cobra.Command { Short: "Get MCP server detail", Long: `Get MCP server detail. -Return the full configuration of a single MCP server, with a live tool catalogue. +Get one MCP server and run a live probe of its tool list. API: POST /safari/mcp/server/get (mcp-read-server-get) Request fields: - --server-id string (required) — Identifier of the server to fetch. + --server-id string (required) — Target MCP server ID. Response fields ('data' envelope is unwrapped — these fields are at the top level): - - account_id (integer) (required) — Owning account. - - ai_description (string) — LLM-generated description, preferred over description when present. - - args (array) — Command-line arguments for the stdio executable. - - auth_mode (string) — Credential model: shared, per_user_secret, or per_user_oauth. - - call_timeout (integer) (required) — Per-call timeout in seconds. - - can_edit (boolean) (required) — Whether the calling member may edit or delete this resource. - - command (string) — Executable launched for stdio transport. - - connect_timeout (integer) (required) — Connection timeout in seconds. - - created_at (integer) (required) — Creation time as a Unix timestamp in milliseconds. - - created_by (integer) (required) — Member who created this resource. - - description (string) (required) — What this MCP server provides. - - env (object) — Environment variables passed to the stdio process. - - headers (object) — HTTP headers sent to the remote endpoint; secret values are masked. - - list_error (string) — Tool-probe failure message; present when the live probe failed. - - oauth_metadata (string) — OAuth metadata JSON. + - account_id (integer) (required) — Owning account ID. + - ai_description (string) — LLM-generated description, preferred over 'description' when present. + - args (array) — Command arguments (stdio transport). + - auth_mode (string) — Authentication mode. [shared, per_user_secret, per_user_oauth] + - call_timeout (integer) (required) — Tool-call timeout in seconds (0 = server default, 60s). + - can_edit (boolean) (required) — Whether the caller may edit this server. + - command (string) — Executable command (stdio transport only). + - connect_timeout (integer) (required) — Connection timeout in seconds (0 = server default, 10s). + - created_at (integer) (required) — Creation time. Unix timestamp in milliseconds. + - created_by (integer) (required) — Member ID that created the server. + - description (string) (required) — Server description. + - env (object) — Environment variables (stdio transport). Secret values are masked. + - headers (object) — HTTP headers (sse / streamable-http). Secret values are masked. + - list_error (string) — Error message when the live tool list failed. + - oauth_metadata (string) — JSON-encoded OAuth metadata (per_user_oauth mode). - proxy_url (string) — Outbound proxy URL used to reach the server. - - secret_schema (string) — JSON schema of the per-user secret. - - server_id (string) (required) — Unique identifier of the MCP server. - - server_name (string) (required) — Display name of the MCP server. - - status (string) (required) — Whether the server is active and usable by agents. [enabled, disabled] - - team_id (integer) (required) — Owning team; 0 means account scope. - - tool_count (integer) — Number of tools discovered on the server. - - tools (array) — Live tool catalogue; populated only by get and test. - - description (string) (required) — What the tool does. - - input_schema (any) — JSON schema of the tool's input arguments. - - name (string) (required) — Tool name as advertised by the server. - - transport (string) (required) — Transport used to reach the server. [stdio, sse, streamable-http] - - updated_at (integer) (required) — Last-update time as a Unix timestamp in milliseconds. - - url (string) — Endpoint URL for sse or streamable-http transport. + - secret_schema (string) — JSON-encoded secret schema (per_user_secret mode). + - server_id (string) (required) — Unique MCP server ID (prefix 'mcp_'). + - server_name (string) (required) — MCP server name, unique within the account. + - source_template_name (string) — Marketplace template this connector was installed from; empty for user-authored. + - status (string) (required) — Server status. [enabled, disabled] + - team_id (integer) (required) — Team scope: 0 = account-wide; >0 = the owning team. + - tool_count (integer) — Number of tools in the live list. + - tools (array) — Live tool list; populated by the get/test endpoints. + - description (string) (required) — Tool description. + - input_schema (object) — JSON Schema describing the tool's input parameters. + - name (string) (required) — Tool name. + - transport (string) (required) — Transport protocol. [stdio, sse, streamable-http] + - updated_at (integer) (required) — Last update time. Unix timestamp in milliseconds. + - url (string) — Server URL (sse / streamable-http transport). `, Args: requireExactArg("server_id"), - Example: ` flashduty safari mcp-server-get --data '{"server_id":"mcp-2b5e8d14a7c9"}'`, + Example: ` flashduty safari mcp-server-get --data '{"server_id":"mcp_4kP9wQ2nLceRtY7uVb3xA1"}'`, RunE: func(cmd *cobra.Command, args []string) error { return runCommand(cmd, args, func(ctx *RunContext) error { body, err := genAssembleBody(dataJSON, func(body map[string]any) error { @@ -82,7 +83,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringVar(&fServerID, "server-id", "", "Identifier of the server to fetch. (required)") + cmd.Flags().StringVar(&fServerID, "server-id", "", "Target MCP server ID. (required)") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd } @@ -99,49 +100,50 @@ func genMcpServersReadServerListCmd() *cobra.Command { Short: "List MCP servers", Long: `List MCP servers. -List configured MCP servers visible to the caller across account and team scopes, with pagination. +List MCP servers visible to the caller across account and team scopes, with pagination. API: POST /safari/mcp/server/list (mcp-read-server-list) Request fields: - --page int — Page number, starting at 1. - --limit int — Page size; defaults to 20. + --page int — Page number, 1-based. + --limit int — Page size. --search-after-ctx string - --include-account bool — Include account-scoped rows alongside team-scoped ones; defaults to true. - --team-ids []int — Restrict results to resources owned by these teams; intersected with the caller's visible set. + --include-account bool — Include account-scoped (team_id=0) rows. Defaults to true. + --team-ids []int — Filter to these team IDs; empty = the caller's visible set. Response fields ('data' envelope is unwrapped — these fields are at the top level): - - servers (array) (required) — MCP servers on the current page. - - account_id (integer) (required) — Owning account. - - ai_description (string) — LLM-generated description, preferred over description when present. - - args (array) — Command-line arguments for the stdio executable. - - auth_mode (string) — Credential model: shared, per_user_secret, or per_user_oauth. - - call_timeout (integer) (required) — Per-call timeout in seconds. - - can_edit (boolean) (required) — Whether the calling member may edit or delete this resource. - - command (string) — Executable launched for stdio transport. - - connect_timeout (integer) (required) — Connection timeout in seconds. - - created_at (integer) (required) — Creation time as a Unix timestamp in milliseconds. - - created_by (integer) (required) — Member who created this resource. - - description (string) (required) — What this MCP server provides. - - env (object) — Environment variables passed to the stdio process. - - headers (object) — HTTP headers sent to the remote endpoint; secret values are masked. - - list_error (string) — Tool-probe failure message; present when the live probe failed. - - oauth_metadata (string) — OAuth metadata JSON. + - servers (array) (required) — MCP servers on this page. + - account_id (integer) (required) — Owning account ID. + - ai_description (string) — LLM-generated description, preferred over 'description' when present. + - args (array) — Command arguments (stdio transport). + - auth_mode (string) — Authentication mode. [shared, per_user_secret, per_user_oauth] + - call_timeout (integer) (required) — Tool-call timeout in seconds (0 = server default, 60s). + - can_edit (boolean) (required) — Whether the caller may edit this server. + - command (string) — Executable command (stdio transport only). + - connect_timeout (integer) (required) — Connection timeout in seconds (0 = server default, 10s). + - created_at (integer) (required) — Creation time. Unix timestamp in milliseconds. + - created_by (integer) (required) — Member ID that created the server. + - description (string) (required) — Server description. + - env (object) — Environment variables (stdio transport). Secret values are masked. + - headers (object) — HTTP headers (sse / streamable-http). Secret values are masked. + - list_error (string) — Error message when the live tool list failed. + - oauth_metadata (string) — JSON-encoded OAuth metadata (per_user_oauth mode). - proxy_url (string) — Outbound proxy URL used to reach the server. - - secret_schema (string) — JSON schema of the per-user secret. - - server_id (string) (required) — Unique identifier of the MCP server. - - server_name (string) (required) — Display name of the MCP server. - - status (string) (required) — Whether the server is active and usable by agents. [enabled, disabled] - - team_id (integer) (required) — Owning team; 0 means account scope. - - tool_count (integer) — Number of tools discovered on the server. - - tools (array) — Live tool catalogue; populated only by get and test. - - description (string) (required) — What the tool does. - - input_schema (any) — JSON schema of the tool's input arguments. - - name (string) (required) — Tool name as advertised by the server. - - transport (string) (required) — Transport used to reach the server. [stdio, sse, streamable-http] - - updated_at (integer) (required) — Last-update time as a Unix timestamp in milliseconds. - - url (string) — Endpoint URL for sse or streamable-http transport. - - total (integer) (required) — Total number of servers matching the filters. + - secret_schema (string) — JSON-encoded secret schema (per_user_secret mode). + - server_id (string) (required) — Unique MCP server ID (prefix 'mcp_'). + - server_name (string) (required) — MCP server name, unique within the account. + - source_template_name (string) — Marketplace template this connector was installed from; empty for user-authored. + - status (string) (required) — Server status. [enabled, disabled] + - team_id (integer) (required) — Team scope: 0 = account-wide; >0 = the owning team. + - tool_count (integer) — Number of tools in the live list. + - tools (array) — Live tool list; populated by the get/test endpoints. + - description (string) (required) — Tool description. + - input_schema (object) — JSON Schema describing the tool's input parameters. + - name (string) (required) — Tool name. + - transport (string) (required) — Transport protocol. [stdio, sse, streamable-http] + - updated_at (integer) (required) — Last update time. Unix timestamp in milliseconds. + - url (string) — Server URL (sse / streamable-http transport). + - total (integer) (required) — Total number of matching servers. `, Example: ` flashduty safari mcp-server-list --data '{"include_account":true,"limit":20,"p":1}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -179,11 +181,11 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().Int64Var(&fP, "page", 0, "Page number, starting at 1.") - cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size; defaults to 20.") + cmd.Flags().Int64Var(&fP, "page", 0, "Page number, 1-based.") + cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size.") cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Request field ") - cmd.Flags().BoolVar(&fIncludeAccount, "include-account", false, "Include account-scoped rows alongside team-scoped ones; defaults to true.") - cmd.Flags().IntSliceVar(&fTeamIDs, "team-ids", nil, "Restrict results to resources owned by these teams; intersected with the caller's visible set.") + cmd.Flags().BoolVar(&fIncludeAccount, "include-account", false, "Include account-scoped (team_id=0) rows. Defaults to true.") + cmd.Flags().IntSliceVar(&fTeamIDs, "team-ids", nil, "Filter to these team IDs; empty = the caller's visible set.") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd } @@ -199,6 +201,7 @@ func genMcpServersWriteServerCreateCmd() *cobra.Command { var fOauthMetadata string var fSecretSchema string var fServerName string + var fSourceTemplateName string var fStatus string var fTeamID int64 var fTransport string @@ -208,59 +211,61 @@ func genMcpServersWriteServerCreateCmd() *cobra.Command { Short: "Create MCP server", Long: `Create MCP server. -Register a new MCP server the agent can call tools through. +Register a new MCP server (connector) on the account. API: POST /safari/mcp/server/create (mcp-write-server-create) Request fields: - --args []string — Command-line arguments for the stdio executable. - --auth-mode string — Credential model; defaults to shared. - --call-timeout int — Per-call timeout in seconds. - --command string — Executable to launch for stdio transport. - --connect-timeout int — Connection timeout in seconds. - --description string (required) — What this MCP server provides. (1-1024 chars) - --oauth-metadata string — OAuth metadata JSON; reserved for OAuth-based auth. - --secret-schema string — JSON schema of the per-user secret; required when auth_mode is per_user_secret. - --server-name string (required) — Display name of the server. (1-255 chars) - --status string — Initial lifecycle state of the server. [enabled, disabled] - --team-id int — Owning team for the new server; 0 for account scope. - --transport string (required) — Transport used to reach the server. [stdio, sse, streamable-http] - --url string — Endpoint URL for sse or streamable-http transport. - env (object, via --data) — Environment variables for the stdio process. - headers (object, via --data) — HTTP headers sent to the remote endpoint. + --args []string — Command arguments (stdio transport). + --auth-mode string — Authentication mode: shared (default), per_user_secret, or per_user_oauth. + --call-timeout int — Tool-call timeout in seconds. 0 = default (60s). + --command string — Executable command (stdio transport). + --connect-timeout int — Connection timeout in seconds. 0 = default (10s). + --description string (required) — Server description. (1-1024 chars) + --oauth-metadata string — JSON OAuth metadata; reserved for per_user_oauth. + --secret-schema string — JSON secret schema; required when auth_mode=per_user_secret. + --server-name string (required) — MCP server name, unique within the account. (1-255 chars) + --source-template-name string — Marketplace template name when created from a connector template. + --status string — Initial status. [enabled, disabled] + --team-id int — Team scope: 0 = account-wide; >0 = team. + --transport string (required) — Transport protocol. [stdio, sse, streamable-http] + --url string — Server URL (sse / streamable-http transport). + env (object, via --data) — Environment variables (stdio transport). + headers (object, via --data) — HTTP headers (sse / streamable-http). Response fields ('data' envelope is unwrapped — these fields are at the top level): - - account_id (integer) (required) — Owning account. - - ai_description (string) — LLM-generated description, preferred over description when present. - - args (array) — Command-line arguments for the stdio executable. - - auth_mode (string) — Credential model: shared, per_user_secret, or per_user_oauth. - - call_timeout (integer) (required) — Per-call timeout in seconds. - - can_edit (boolean) (required) — Whether the calling member may edit or delete this resource. - - command (string) — Executable launched for stdio transport. - - connect_timeout (integer) (required) — Connection timeout in seconds. - - created_at (integer) (required) — Creation time as a Unix timestamp in milliseconds. - - created_by (integer) (required) — Member who created this resource. - - description (string) (required) — What this MCP server provides. - - env (object) — Environment variables passed to the stdio process. - - headers (object) — HTTP headers sent to the remote endpoint; secret values are masked. - - list_error (string) — Tool-probe failure message; present when the live probe failed. - - oauth_metadata (string) — OAuth metadata JSON. + - account_id (integer) (required) — Owning account ID. + - ai_description (string) — LLM-generated description, preferred over 'description' when present. + - args (array) — Command arguments (stdio transport). + - auth_mode (string) — Authentication mode. [shared, per_user_secret, per_user_oauth] + - call_timeout (integer) (required) — Tool-call timeout in seconds (0 = server default, 60s). + - can_edit (boolean) (required) — Whether the caller may edit this server. + - command (string) — Executable command (stdio transport only). + - connect_timeout (integer) (required) — Connection timeout in seconds (0 = server default, 10s). + - created_at (integer) (required) — Creation time. Unix timestamp in milliseconds. + - created_by (integer) (required) — Member ID that created the server. + - description (string) (required) — Server description. + - env (object) — Environment variables (stdio transport). Secret values are masked. + - headers (object) — HTTP headers (sse / streamable-http). Secret values are masked. + - list_error (string) — Error message when the live tool list failed. + - oauth_metadata (string) — JSON-encoded OAuth metadata (per_user_oauth mode). - proxy_url (string) — Outbound proxy URL used to reach the server. - - secret_schema (string) — JSON schema of the per-user secret. - - server_id (string) (required) — Unique identifier of the MCP server. - - server_name (string) (required) — Display name of the MCP server. - - status (string) (required) — Whether the server is active and usable by agents. [enabled, disabled] - - team_id (integer) (required) — Owning team; 0 means account scope. - - tool_count (integer) — Number of tools discovered on the server. - - tools (array) — Live tool catalogue; populated only by get and test. - - description (string) (required) — What the tool does. - - input_schema (any) — JSON schema of the tool's input arguments. - - name (string) (required) — Tool name as advertised by the server. - - transport (string) (required) — Transport used to reach the server. [stdio, sse, streamable-http] - - updated_at (integer) (required) — Last-update time as a Unix timestamp in milliseconds. - - url (string) — Endpoint URL for sse or streamable-http transport. + - secret_schema (string) — JSON-encoded secret schema (per_user_secret mode). + - server_id (string) (required) — Unique MCP server ID (prefix 'mcp_'). + - server_name (string) (required) — MCP server name, unique within the account. + - source_template_name (string) — Marketplace template this connector was installed from; empty for user-authored. + - status (string) (required) — Server status. [enabled, disabled] + - team_id (integer) (required) — Team scope: 0 = account-wide; >0 = the owning team. + - tool_count (integer) — Number of tools in the live list. + - tools (array) — Live tool list; populated by the get/test endpoints. + - description (string) (required) — Tool description. + - input_schema (object) — JSON Schema describing the tool's input parameters. + - name (string) (required) — Tool name. + - transport (string) (required) — Transport protocol. [stdio, sse, streamable-http] + - updated_at (integer) (required) — Last update time. Unix timestamp in milliseconds. + - url (string) — Server URL (sse / streamable-http transport). `, - Example: ` flashduty safari mcp-server-create --data '{"args":["-y","@modelcontextprotocol/server-github"],"command":"npx","description":"Read issues and pull requests from GitHub.","env":{"GITHUB_TOKEN":"ghp_xxx"},"server_name":"GitHub Tools","status":"enabled","team_id":0,"transport":"stdio"}'`, + Example: ` flashduty safari mcp-server-create --data '{"description":"Query Prometheus metrics and alerts.","server_name":"prometheus","status":"enabled","transport":"streamable-http","url":"https://mcp.example.com/prometheus"}'`, RunE: func(cmd *cobra.Command, args []string) error { return runCommand(cmd, args, func(ctx *RunContext) error { body, err := genAssembleBody(dataJSON, func(body map[string]any) error { @@ -291,6 +296,9 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le if cmd.Flags().Changed("server-name") { body["server_name"] = fServerName } + if cmd.Flags().Changed("source-template-name") { + body["source_template_name"] = fSourceTemplateName + } if cmd.Flags().Changed("status") { body["status"] = fStatus } @@ -320,19 +328,20 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringSliceVar(&fArgs, "args", nil, "Command-line arguments for the stdio executable.") - cmd.Flags().StringVar(&fAuthMode, "auth-mode", "", "Credential model; defaults to shared.") - cmd.Flags().Int64Var(&fCallTimeout, "call-timeout", 0, "Per-call timeout in seconds.") - cmd.Flags().StringVar(&fCommand, "command", "", "Executable to launch for stdio transport.") - cmd.Flags().Int64Var(&fConnectTimeout, "connect-timeout", 0, "Connection timeout in seconds.") - cmd.Flags().StringVar(&fDescription, "description", "", "What this MCP server provides. (required) (1-1024 chars)") - cmd.Flags().StringVar(&fOauthMetadata, "oauth-metadata", "", "OAuth metadata JSON; reserved for OAuth-based auth.") - cmd.Flags().StringVar(&fSecretSchema, "secret-schema", "", "JSON schema of the per-user secret; required when auth_mode is per_user_secret.") - cmd.Flags().StringVar(&fServerName, "server-name", "", "Display name of the server. (required) (1-255 chars)") - cmd.Flags().StringVar(&fStatus, "status", "", "Initial lifecycle state of the server. [enabled, disabled]") - cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Owning team for the new server; 0 for account scope.") - cmd.Flags().StringVar(&fTransport, "transport", "", "Transport used to reach the server. (required) [stdio, sse, streamable-http]") - cmd.Flags().StringVar(&fURL, "url", "", "Endpoint URL for sse or streamable-http transport.") + cmd.Flags().StringSliceVar(&fArgs, "args", nil, "Command arguments (stdio transport).") + cmd.Flags().StringVar(&fAuthMode, "auth-mode", "", "Authentication mode: shared (default), per_user_secret, or per_user_oauth.") + cmd.Flags().Int64Var(&fCallTimeout, "call-timeout", 0, "Tool-call timeout in seconds. 0 = default (60s).") + cmd.Flags().StringVar(&fCommand, "command", "", "Executable command (stdio transport).") + cmd.Flags().Int64Var(&fConnectTimeout, "connect-timeout", 0, "Connection timeout in seconds. 0 = default (10s).") + cmd.Flags().StringVar(&fDescription, "description", "", "Server description. (required) (1-1024 chars)") + cmd.Flags().StringVar(&fOauthMetadata, "oauth-metadata", "", "JSON OAuth metadata; reserved for per_user_oauth.") + cmd.Flags().StringVar(&fSecretSchema, "secret-schema", "", "JSON secret schema; required when auth_mode=per_user_secret.") + cmd.Flags().StringVar(&fServerName, "server-name", "", "MCP server name, unique within the account. (required) (1-255 chars)") + cmd.Flags().StringVar(&fSourceTemplateName, "source-template-name", "", "Marketplace template name when created from a connector template.") + cmd.Flags().StringVar(&fStatus, "status", "", "Initial status. [enabled, disabled]") + cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Team scope: 0 = account-wide; >0 = team.") + cmd.Flags().StringVar(&fTransport, "transport", "", "Transport protocol. (required) [stdio, sse, streamable-http]") + cmd.Flags().StringVar(&fURL, "url", "", "Server URL (sse / streamable-http transport).") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd } @@ -345,15 +354,15 @@ func genMcpServersWriteServerDeleteCmd() *cobra.Command { Short: "Delete MCP server", Long: `Delete MCP server. -Permanently remove an MCP server so agents can no longer use its tools. +Delete an MCP server by ID. API: POST /safari/mcp/server/delete (mcp-write-server-delete) Request fields: - --server-id string (required) — Identifier of the server to delete. + --server-id string (required) — Target MCP server ID. `, Args: requireExactArg("server_id"), - Example: ` flashduty safari mcp-server-delete --data '{"server_id":"mcp-2b5e8d14a7c9"}'`, + Example: ` flashduty safari mcp-server-delete --data '{"server_id":"mcp_4kP9wQ2nLceRtY7uVb3xA1"}'`, RunE: func(cmd *cobra.Command, args []string) error { return runCommand(cmd, args, func(ctx *RunContext) error { body, err := genAssembleBody(dataJSON, func(body map[string]any) error { @@ -380,7 +389,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fServerID, "server-id", "", "Identifier of the server to delete. (required)") + cmd.Flags().StringVar(&fServerID, "server-id", "", "Target MCP server ID. (required)") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd } @@ -393,15 +402,15 @@ func genMcpServersWriteServerDisableCmd() *cobra.Command { Short: "Disable MCP server", Long: `Disable MCP server. -Deactivate an MCP server so agents stop calling its tools. +Disable an enabled MCP server. API: POST /safari/mcp/server/disable (mcp-write-server-disable) Request fields: - --server-id string (required) — Identifier of the target server. + --server-id string (required) — Target MCP server ID. `, Args: requireExactArg("server_id"), - Example: ` flashduty safari mcp-server-disable --data '{"server_id":"mcp-2b5e8d14a7c9"}'`, + Example: ` flashduty safari mcp-server-disable --data '{"server_id":"mcp_4kP9wQ2nLceRtY7uVb3xA1"}'`, RunE: func(cmd *cobra.Command, args []string) error { return runCommand(cmd, args, func(ctx *RunContext) error { body, err := genAssembleBody(dataJSON, func(body map[string]any) error { @@ -428,7 +437,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fServerID, "server-id", "", "Identifier of the target server. (required)") + cmd.Flags().StringVar(&fServerID, "server-id", "", "Target MCP server ID. (required)") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd } @@ -441,15 +450,15 @@ func genMcpServersWriteServerEnableCmd() *cobra.Command { Short: "Enable MCP server", Long: `Enable MCP server. -Activate a disabled MCP server so agents can call its tools. +Enable a disabled MCP server. API: POST /safari/mcp/server/enable (mcp-write-server-enable) Request fields: - --server-id string (required) — Identifier of the target server. + --server-id string (required) — Target MCP server ID. `, Args: requireExactArg("server_id"), - Example: ` flashduty safari mcp-server-enable --data '{"server_id":"mcp-2b5e8d14a7c9"}'`, + Example: ` flashduty safari mcp-server-enable --data '{"server_id":"mcp_4kP9wQ2nLceRtY7uVb3xA1"}'`, RunE: func(cmd *cobra.Command, args []string) error { return runCommand(cmd, args, func(ctx *RunContext) error { body, err := genAssembleBody(dataJSON, func(body map[string]any) error { @@ -476,7 +485,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fServerID, "server-id", "", "Identifier of the target server. (required)") + cmd.Flags().StringVar(&fServerID, "server-id", "", "Target MCP server ID. (required)") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd } @@ -501,60 +510,61 @@ func genMcpServersWriteServerUpdateCmd() *cobra.Command { Short: "Update MCP server", Long: `Update MCP server. -Edit an MCP server's connection settings or reassign its owning team. +Update an MCP server's configuration. Omit a field to leave it unchanged. API: POST /safari/mcp/server/update (mcp-write-server-update) Request fields: - --args []string — New stdio arguments. - --auth-mode string — New credential model. - --call-timeout int — New per-call timeout in seconds. - --command string — New stdio executable. - --connect-timeout int — New connection timeout in seconds. + --args []string — Command arguments (stdio transport). + --auth-mode string — Authentication mode: shared (default), per_user_secret, or per_user_oauth. + --call-timeout int — Tool-call timeout in seconds. 0 = default (60s). + --command string — Executable command (stdio transport). + --connect-timeout int — Connection timeout in seconds. 0 = default (10s). --description string — New description. (1-1024 chars) - --oauth-metadata string — New OAuth metadata JSON. - --secret-schema string — New per-user secret JSON schema. - --server-id string (required) — Identifier of the server to update. - --server-name string — New display name. (1-255 chars) - --team-id int — Reassign the server to this team; omit to leave unchanged, 0 for account scope. - --transport string — New transport for the server. [stdio, sse, streamable-http] - --url string — New endpoint URL for remote transports. - env (object, via --data) — New stdio environment variables. - headers (object, via --data) — New HTTP headers for the remote endpoint. + --oauth-metadata string — JSON OAuth metadata; reserved for per_user_oauth. + --secret-schema string — JSON secret schema; required when auth_mode=per_user_secret. + --server-id string (required) — Target MCP server ID. + --server-name string — New name. (1-255 chars) + --team-id int — Reassign team scope: 0 = account-wide; >0 = team. Omit to leave unchanged. + --transport string — Transport protocol. [stdio, sse, streamable-http] + --url string — Server URL (sse / streamable-http transport). + env (object, via --data) — Environment variables (stdio transport). + headers (object, via --data) — HTTP headers (sse / streamable-http). Response fields ('data' envelope is unwrapped — these fields are at the top level): - - account_id (integer) (required) — Owning account. - - ai_description (string) — LLM-generated description, preferred over description when present. - - args (array) — Command-line arguments for the stdio executable. - - auth_mode (string) — Credential model: shared, per_user_secret, or per_user_oauth. - - call_timeout (integer) (required) — Per-call timeout in seconds. - - can_edit (boolean) (required) — Whether the calling member may edit or delete this resource. - - command (string) — Executable launched for stdio transport. - - connect_timeout (integer) (required) — Connection timeout in seconds. - - created_at (integer) (required) — Creation time as a Unix timestamp in milliseconds. - - created_by (integer) (required) — Member who created this resource. - - description (string) (required) — What this MCP server provides. - - env (object) — Environment variables passed to the stdio process. - - headers (object) — HTTP headers sent to the remote endpoint; secret values are masked. - - list_error (string) — Tool-probe failure message; present when the live probe failed. - - oauth_metadata (string) — OAuth metadata JSON. + - account_id (integer) (required) — Owning account ID. + - ai_description (string) — LLM-generated description, preferred over 'description' when present. + - args (array) — Command arguments (stdio transport). + - auth_mode (string) — Authentication mode. [shared, per_user_secret, per_user_oauth] + - call_timeout (integer) (required) — Tool-call timeout in seconds (0 = server default, 60s). + - can_edit (boolean) (required) — Whether the caller may edit this server. + - command (string) — Executable command (stdio transport only). + - connect_timeout (integer) (required) — Connection timeout in seconds (0 = server default, 10s). + - created_at (integer) (required) — Creation time. Unix timestamp in milliseconds. + - created_by (integer) (required) — Member ID that created the server. + - description (string) (required) — Server description. + - env (object) — Environment variables (stdio transport). Secret values are masked. + - headers (object) — HTTP headers (sse / streamable-http). Secret values are masked. + - list_error (string) — Error message when the live tool list failed. + - oauth_metadata (string) — JSON-encoded OAuth metadata (per_user_oauth mode). - proxy_url (string) — Outbound proxy URL used to reach the server. - - secret_schema (string) — JSON schema of the per-user secret. - - server_id (string) (required) — Unique identifier of the MCP server. - - server_name (string) (required) — Display name of the MCP server. - - status (string) (required) — Whether the server is active and usable by agents. [enabled, disabled] - - team_id (integer) (required) — Owning team; 0 means account scope. - - tool_count (integer) — Number of tools discovered on the server. - - tools (array) — Live tool catalogue; populated only by get and test. - - description (string) (required) — What the tool does. - - input_schema (any) — JSON schema of the tool's input arguments. - - name (string) (required) — Tool name as advertised by the server. - - transport (string) (required) — Transport used to reach the server. [stdio, sse, streamable-http] - - updated_at (integer) (required) — Last-update time as a Unix timestamp in milliseconds. - - url (string) — Endpoint URL for sse or streamable-http transport. + - secret_schema (string) — JSON-encoded secret schema (per_user_secret mode). + - server_id (string) (required) — Unique MCP server ID (prefix 'mcp_'). + - server_name (string) (required) — MCP server name, unique within the account. + - source_template_name (string) — Marketplace template this connector was installed from; empty for user-authored. + - status (string) (required) — Server status. [enabled, disabled] + - team_id (integer) (required) — Team scope: 0 = account-wide; >0 = the owning team. + - tool_count (integer) — Number of tools in the live list. + - tools (array) — Live tool list; populated by the get/test endpoints. + - description (string) (required) — Tool description. + - input_schema (object) — JSON Schema describing the tool's input parameters. + - name (string) (required) — Tool name. + - transport (string) (required) — Transport protocol. [stdio, sse, streamable-http] + - updated_at (integer) (required) — Last update time. Unix timestamp in milliseconds. + - url (string) — Server URL (sse / streamable-http transport). `, Args: requireExactArg("server_id"), - Example: ` flashduty safari mcp-server-update --data '{"description":"Read issues, PRs, and commits from GitHub.","server_id":"mcp-2b5e8d14a7c9"}'`, + Example: ` flashduty safari mcp-server-update --data '{"description":"Query Prometheus metrics, alerts, and rules.","server_id":"mcp_4kP9wQ2nLceRtY7uVb3xA1"}'`, RunE: func(cmd *cobra.Command, args []string) error { return runCommand(cmd, args, func(ctx *RunContext) error { body, err := genAssembleBody(dataJSON, func(body map[string]any) error { @@ -617,19 +627,19 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringSliceVar(&fArgs, "args", nil, "New stdio arguments.") - cmd.Flags().StringVar(&fAuthMode, "auth-mode", "", "New credential model.") - cmd.Flags().Int64Var(&fCallTimeout, "call-timeout", 0, "New per-call timeout in seconds.") - cmd.Flags().StringVar(&fCommand, "command", "", "New stdio executable.") - cmd.Flags().Int64Var(&fConnectTimeout, "connect-timeout", 0, "New connection timeout in seconds.") + cmd.Flags().StringSliceVar(&fArgs, "args", nil, "Command arguments (stdio transport).") + cmd.Flags().StringVar(&fAuthMode, "auth-mode", "", "Authentication mode: shared (default), per_user_secret, or per_user_oauth.") + cmd.Flags().Int64Var(&fCallTimeout, "call-timeout", 0, "Tool-call timeout in seconds. 0 = default (60s).") + cmd.Flags().StringVar(&fCommand, "command", "", "Executable command (stdio transport).") + cmd.Flags().Int64Var(&fConnectTimeout, "connect-timeout", 0, "Connection timeout in seconds. 0 = default (10s).") cmd.Flags().StringVar(&fDescription, "description", "", "New description. (1-1024 chars)") - cmd.Flags().StringVar(&fOauthMetadata, "oauth-metadata", "", "New OAuth metadata JSON.") - cmd.Flags().StringVar(&fSecretSchema, "secret-schema", "", "New per-user secret JSON schema.") - cmd.Flags().StringVar(&fServerID, "server-id", "", "Identifier of the server to update. (required)") - cmd.Flags().StringVar(&fServerName, "server-name", "", "New display name. (1-255 chars)") - cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Reassign the server to this team; omit to leave unchanged, 0 for account scope.") - cmd.Flags().StringVar(&fTransport, "transport", "", "New transport for the server. [stdio, sse, streamable-http]") - cmd.Flags().StringVar(&fURL, "url", "", "New endpoint URL for remote transports.") + cmd.Flags().StringVar(&fOauthMetadata, "oauth-metadata", "", "JSON OAuth metadata; reserved for per_user_oauth.") + cmd.Flags().StringVar(&fSecretSchema, "secret-schema", "", "JSON secret schema; required when auth_mode=per_user_secret.") + cmd.Flags().StringVar(&fServerID, "server-id", "", "Target MCP server ID. (required)") + cmd.Flags().StringVar(&fServerName, "server-name", "", "New name. (1-255 chars)") + cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Reassign team scope: 0 = account-wide; >0 = team. Omit to leave unchanged.") + cmd.Flags().StringVar(&fTransport, "transport", "", "Transport protocol. [stdio, sse, streamable-http]") + cmd.Flags().StringVar(&fURL, "url", "", "Server URL (sse / streamable-http transport).") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd } diff --git a/internal/cli/zz_generated_monitor_utilities.go b/internal/cli/zz_generated_monitor_utilities.go new file mode 100644 index 0000000..b6fd5e5 --- /dev/null +++ b/internal/cli/zz_generated_monitor_utilities.go @@ -0,0 +1,81 @@ +// Code generated by internal/cmd/cligen; DO NOT EDIT. + +package cli + +import ( + "github.com/spf13/cobra" + + flashduty "github.com/flashcatcloud/go-flashduty" +) + +func genMonitorUtilitiesSyncCmd() *cobra.Command { + var dataJSON string + var fDelaySeconds int64 + var fDsName string + var fDsType string + var fExpr string + cmd := &cobra.Command{ + Use: "preview-sync", + Short: "Preview datasource query", + Long: `Preview datasource query. + +Execute a synchronous datasource query and return the raw result. Used to preview alert rule expressions before saving. + +API: POST /monit/preview/sync (monit-preview-sync) + +Request fields: + --delay-seconds int — Shift the query window backward by this many seconds to compensate for data ingestion latency. + --ds-name string (required) — Datasource display name as configured in the account. + --ds-type string (required) — Datasource type, e.g. 'prometheus', 'loki', 'elasticsearch'. + --expr string (required) — Query expression. Format depends on 'ds_type' (PromQL for Prometheus, LogQL for Loki, etc.). + args (object, via --data) — Additional type-specific query arguments. +`, + Example: ` flashduty monit preview-sync --data '{"delay_seconds":0,"ds_name":"Prometheus Prod","ds_type":"prometheus","expr":"rate(http_requests_total[5m])"}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if cmd.Flags().Changed("delay-seconds") { + body["delay_seconds"] = fDelaySeconds + } + if cmd.Flags().Changed("ds-name") { + body["ds_name"] = fDsName + } + if cmd.Flags().Changed("ds-type") { + body["ds_type"] = fDsType + } + if cmd.Flags().Changed("expr") { + body["expr"] = fExpr + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.PreviewSyncRequest) + if err := genBindBody(body, req); err != nil { + return err + } + resp, err := ctx.Client.MonitorUtilities.Sync(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + if resp != nil && len(resp.Raw) > 0 { + return ctx.WriteRaw(resp.Raw) + } + ctx.WriteResult("OK: POST /monit/preview/sync") + return nil + }) + }, + } + cmd.Flags().Int64Var(&fDelaySeconds, "delay-seconds", 0, "Shift the query window backward by this many seconds to compensate for data ingestion latency.") + cmd.Flags().StringVar(&fDsName, "ds-name", "", "Datasource display name as configured in the account. (required)") + cmd.Flags().StringVar(&fDsType, "ds-type", "", "Datasource type, e.g. 'prometheus', 'loki', 'elasticsearch'. (required)") + cmd.Flags().StringVar(&fExpr, "expr", "", "Query expression. Format depends on 'ds_type' (PromQL for Prometheus, LogQL for Loki, etc.). (required)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func registerGeneratedMonitorUtilities(root *cobra.Command) { + gMonit := genGroup(root, "monit", "Monitors API") + genAddLeaf(gMonit, genMonitorUtilitiesSyncCmd()) +} diff --git a/internal/cli/zz_generated_register.go b/internal/cli/zz_generated_register.go index 8fb8a7d..e577113 100644 --- a/internal/cli/zz_generated_register.go +++ b/internal/cli/zz_generated_register.go @@ -14,6 +14,7 @@ func registerGenerated(root *cobra.Command) { registerGeneratedAlertRules(root) registerGeneratedDataSources(root) registerGeneratedDiagnostics(root) + registerGeneratedMonitorUtilities(root) registerGeneratedRuleSets(root) registerGeneratedAlertEnrichment(root) registerGeneratedAlerts(root) diff --git a/internal/cli/zz_generated_response_help.go b/internal/cli/zz_generated_response_help.go index bec4a75..358496d 100644 --- a/internal/cli/zz_generated_response_help.go +++ b/internal/cli/zz_generated_response_help.go @@ -6,9 +6,9 @@ package cli // Response-fields help block. Curated commands look this up via responseHelp() // so they document the same output shape as the generated commands. var responseHelpBySDKMethod = map[string]string{ - "A2aAgents.ReadGet": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Owning account.\n - agent_card_name (string) — Name resolved from the fetched agent card.\n - agent_card_skills (array) — Skills advertised on the fetched agent card.\n - agent_id (string) (required) — Unique identifier of the A2A agent.\n - agent_name (string) (required) — Display name of the agent.\n - auth_config (object) — Authentication parameters keyed by name.\n - auth_mode (string) — Credential model: shared, per_user_secret, or per_user_oauth.\n - auth_type (string) (required) — Authentication scheme used when calling the agent.\n - can_edit (boolean) (required) — Whether the calling member may edit or delete this resource.\n - card_resolve_timeout (integer) (required) — Timeout for fetching the agent card, in seconds.\n - card_url (string) (required) — URL of the agent's published A2A agent card.\n - created_at (integer) (required) — Creation time as a Unix timestamp in seconds.\n - created_by (integer) (required) — Member who created this resource.\n - description (string) (required) — What this agent does and when to delegate to it.\n - oauth_metadata (string) — OAuth metadata JSON.\n - secret_schema (string) — JSON schema of the per-user secret.\n - status (string) (required) — Whether the agent is active and reachable. [enabled, disabled]\n - streaming (boolean) (required) — Whether the agent supports streaming responses.\n - task_timeout (integer) (required) — Timeout for a single delegated task, in seconds.\n - team_id (integer) (required) — Owning team; 0 means account scope.\n - updated_at (integer) (required) — Last-update time as a Unix timestamp in seconds.\n", - "A2aAgents.ReadList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) (required) — Owning account.\n - agent_card_name (string) — Name resolved from the fetched agent card.\n - agent_card_skills (array) — Skills advertised on the fetched agent card.\n - agent_id (string) (required) — Unique identifier of the A2A agent.\n - agent_name (string) (required) — Display name of the agent.\n - auth_config (object) — Authentication parameters keyed by name.\n - auth_mode (string) — Credential model: shared, per_user_secret, or per_user_oauth.\n - auth_type (string) (required) — Authentication scheme used when calling the agent.\n - can_edit (boolean) (required) — Whether the calling member may edit or delete this resource.\n - card_resolve_timeout (integer) (required) — Timeout for fetching the agent card, in seconds.\n - card_url (string) (required) — URL of the agent's published A2A agent card.\n - created_at (integer) (required) — Creation time as a Unix timestamp in seconds.\n - created_by (integer) (required) — Member who created this resource.\n - description (string) (required) — What this agent does and when to delegate to it.\n - oauth_metadata (string) — OAuth metadata JSON.\n - secret_schema (string) — JSON schema of the per-user secret.\n - status (string) (required) — Whether the agent is active and reachable. [enabled, disabled]\n - streaming (boolean) (required) — Whether the agent supports streaming responses.\n - task_timeout (integer) (required) — Timeout for a single delegated task, in seconds.\n - team_id (integer) (required) — Owning team; 0 means account scope.\n - updated_at (integer) (required) — Last-update time as a Unix timestamp in seconds.\n", - "A2aAgents.WriteCreate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - agent_id (string) (required) — Identifier of the created agent.\n", + "A2aAgents.ReadGet": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Owning account ID.\n - agent_card_name (string) — Agent name resolved from the remote card.\n - agent_card_skills (array) — Skills advertised by the remote card.\n - agent_id (string) (required) — Unique A2A agent ID (prefix `a2a_`).\n - agent_name (string) (required) — Agent display name.\n - auth_config (object) — Authentication config; secret values are masked.\n - auth_mode (string) — Authentication mode. [shared, per_user_secret, per_user_oauth]\n - auth_type (string) (required) — Authentication type for reaching the remote agent.\n - can_edit (boolean) (required) — Whether the caller may edit this agent.\n - card_resolve_timeout (integer) (required) — Card-resolution timeout in seconds.\n - card_url (string) (required) — URL of the remote agent card.\n - created_at (integer) (required) — Creation time. Unix timestamp in milliseconds.\n - created_by (integer) (required) — Member ID that created the agent.\n - description (string) (required) — Agent description.\n - oauth_metadata (string) — JSON-encoded OAuth metadata (per_user_oauth mode).\n - secret_schema (string) — JSON-encoded secret schema (per_user_secret mode).\n - status (string) (required) — Agent status. [enabled, disabled]\n - streaming (boolean) (required) — Whether the remote agent supports streaming responses.\n - task_timeout (integer) (required) — Single-task execution timeout in seconds.\n - team_id (integer) (required) — Team scope: 0 = account-wide; >0 = the owning team.\n - updated_at (integer) (required) — Last update time. Unix timestamp in milliseconds.\n", + "A2aAgents.ReadList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) (required) — Owning account ID.\n - agent_card_name (string) — Agent name resolved from the remote card.\n - agent_card_skills (array) — Skills advertised by the remote card.\n - agent_id (string) (required) — Unique A2A agent ID (prefix `a2a_`).\n - agent_name (string) (required) — Agent display name.\n - auth_config (object) — Authentication config; secret values are masked.\n - auth_mode (string) — Authentication mode. [shared, per_user_secret, per_user_oauth]\n - auth_type (string) (required) — Authentication type for reaching the remote agent.\n - can_edit (boolean) (required) — Whether the caller may edit this agent.\n - card_resolve_timeout (integer) (required) — Card-resolution timeout in seconds.\n - card_url (string) (required) — URL of the remote agent card.\n - created_at (integer) (required) — Creation time. Unix timestamp in milliseconds.\n - created_by (integer) (required) — Member ID that created the agent.\n - description (string) (required) — Agent description.\n - oauth_metadata (string) — JSON-encoded OAuth metadata (per_user_oauth mode).\n - secret_schema (string) — JSON-encoded secret schema (per_user_secret mode).\n - status (string) (required) — Agent status. [enabled, disabled]\n - streaming (boolean) (required) — Whether the remote agent supports streaming responses.\n - task_timeout (integer) (required) — Single-task execution timeout in seconds.\n - team_id (integer) (required) — Team scope: 0 = account-wide; >0 = the owning team.\n - updated_at (integer) (required) — Last update time. Unix timestamp in milliseconds.\n", + "A2aAgents.WriteCreate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - agent_id (string) (required) — ID of the newly created agent.\n", "Account.Info": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) — Account identifier.\n - account_name (string) — Account name.\n - avatar (string) — Account avatar URL.\n - country_code (string) — Calling country code for the contact phone.\n - created_at (integer) — Account creation time, Unix timestamp in seconds.\n - domain (string) — Primary account domain (login subdomain).\n - email (string) — Account contact email.\n - extra_domains (array) — Additional account domains.\n - locale (string) — Account language preference (e.g. zh-CN, en-US).\n - mp_account_id (string) — Account identifier on the cloud marketplace platform (present only for marketplace accounts).\n - mp_plat (string) — Cloud marketplace platform the account was provisioned from (present only for marketplace accounts).\n - phone (string) — Account contact phone, masked for privacy.\n - restrictions (object) — Account access restrictions (present only when configured).\n - allow_subdomain (boolean) — Whether subdomains of the allowed email domains are also accepted.\n - email_domains (array) — Allowed login email domains.\n - ips (array) — Allowed source IP/CIDR whitelist.\n - time_zone (string) — Account default timezone (IANA name, e.g. Asia/Shanghai).\n", "AlertEnrichment.EnrichmentReadInfo": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - created_at (integer) (required) — Creation timestamp, Unix seconds.\n - creator_id (integer) (required) — Creator member ID.\n - integration_id (integer) (required) — Integration ID.\n - rules (array) (required) — Ordered enrichment rules.\n - if (array) — Optional AND-filter list. The rule is skipped if the condition does not match.\n - key (string) (required) — Alert label key.\n - oper (string) (required) — Match operator. `IN` matches when any value matches; `NOTIN` matches when none of the values match. [IN, NOTIN]\n - vals (array) (required) — Values to match against.\n - kind (string) (required) — Rule type. `extraction` extracts a label via regex or GJson. `composition` builds a label from a template. `mapping` looks up values from a schema or API. `drop` removes labels. [extraction, composition, mapping, drop]\n - settings (any) (required) — Rule-kind–specific settings. The shape depends on `kind`.\n - status (string) (required) — Rule set status.\n - updated_at (integer) (required) — Last update timestamp, Unix seconds.\n - updated_by (integer) (required) — Last updater member ID.\n", "AlertEnrichment.EnrichmentReadList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - created_at (integer) (required) — Creation timestamp, Unix seconds.\n - creator_id (integer) (required) — Creator member ID.\n - integration_id (integer) (required) — Integration ID.\n - rules (array) (required) — Ordered enrichment rules.\n - if (array) — Optional AND-filter list. The rule is skipped if the condition does not match.\n - key (string) (required) — Alert label key.\n - oper (string) (required) — Match operator. `IN` matches when any value matches; `NOTIN` matches when none of the values match. [IN, NOTIN]\n - vals (array) (required) — Values to match against.\n - kind (string) (required) — Rule type. `extraction` extracts a label via regex or GJson. `composition` builds a label from a template. `mapping` looks up values from a schema or API. `drop` removes labels. [extraction, composition, mapping, drop]\n - settings (any) (required) — Rule-kind–specific settings. The shape depends on `kind`.\n - status (string) (required) — Rule set status.\n - updated_at (integer) (required) — Last update timestamp, Unix seconds.\n - updated_by (integer) (required) — Last updater member ID.\n", @@ -54,6 +54,7 @@ var responseHelpBySDKMethod = map[string]string{ "Applications.ReadInfo": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) — Account ID.\n - alerting (object) — Alert settings for the application.\n - channel_ids (array) — Channel IDs to send alerts to.\n - enabled (boolean) — Whether alerting is enabled.\n - integration_id (integer) — Associated on-call integration ID (read-only, auto-assigned).\n - application_id (string) — Unique application ID.\n - application_name (string) — Application display name.\n - client_token (string) — Token used to initialize the RUM SDK.\n - created_at (integer) — Creation timestamp, Unix epoch seconds.\n - created_by (integer) — Creator member ID.\n - is_private (boolean) — If `true`, the application is only accessible to team members.\n - no_geo (boolean) — If `true`, geographic location is not inferred from IP.\n - no_ip (boolean) — If `true`, IP addresses are not collected.\n - status (string) — Application status. [enabled, disabled, deleted]\n - team_id (integer) — Owning team ID.\n - tracing (object) — APM tracing integration settings.\n - enabled (boolean) — Whether tracing integration is enabled.\n - endpoint (string) — Trace endpoint URL (http or https).\n - open_type (string) — How to open the trace link. [popup, tab]\n - type (string) — Application type. [browser, ios, android, react-native, flutter, kotlin-multiplatform, roku, unity]\n - updated_at (integer) — Last update timestamp, Unix epoch seconds.\n - updated_by (integer) — Last updater member ID.\n", "Applications.ReadInfos": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) — Account ID.\n - alerting (object) — Alert settings for the application.\n - channel_ids (array) — Channel IDs to send alerts to.\n - enabled (boolean) — Whether alerting is enabled.\n - integration_id (integer) — Associated on-call integration ID (read-only, auto-assigned).\n - application_id (string) — Unique application ID.\n - application_name (string) — Application display name.\n - client_token (string) — Token used to initialize the RUM SDK.\n - created_at (integer) — Creation timestamp, Unix epoch seconds.\n - created_by (integer) — Creator member ID.\n - is_private (boolean) — If `true`, the application is only accessible to team members.\n - no_geo (boolean) — If `true`, geographic location is not inferred from IP.\n - no_ip (boolean) — If `true`, IP addresses are not collected.\n - status (string) — Application status. [enabled, disabled, deleted]\n - team_id (integer) — Owning team ID.\n - tracing (object) — APM tracing integration settings.\n - enabled (boolean) — Whether tracing integration is enabled.\n - endpoint (string) — Trace endpoint URL (http or https).\n - open_type (string) — How to open the trace link. [popup, tab]\n - type (string) — Application type. [browser, ios, android, react-native, flutter, kotlin-multiplatform, roku, unity]\n - updated_at (integer) — Last update timestamp, Unix epoch seconds.\n - updated_by (integer) — Last updater member ID.\n", "Applications.ReadList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) — Account ID.\n - alerting (object) — Alert settings for the application.\n - channel_ids (array) — Channel IDs to send alerts to.\n - enabled (boolean) — Whether alerting is enabled.\n - integration_id (integer) — Associated on-call integration ID (read-only, auto-assigned).\n - application_id (string) — Unique application ID.\n - application_name (string) — Application display name.\n - client_token (string) — Token used to initialize the RUM SDK.\n - created_at (integer) — Creation timestamp, Unix epoch seconds.\n - created_by (integer) — Creator member ID.\n - is_private (boolean) — If `true`, the application is only accessible to team members.\n - no_geo (boolean) — If `true`, geographic location is not inferred from IP.\n - no_ip (boolean) — If `true`, IP addresses are not collected.\n - status (string) — Application status. [enabled, disabled, deleted]\n - team_id (integer) — Owning team ID.\n - tracing (object) — APM tracing integration settings.\n - enabled (boolean) — Whether tracing integration is enabled.\n - endpoint (string) — Trace endpoint URL (http or https).\n - open_type (string) — How to open the trace link. [popup, tab]\n - type (string) — Application type. [browser, ios, android, react-native, flutter, kotlin-multiplatform, roku, unity]\n - updated_at (integer) — Last update timestamp, Unix epoch seconds.\n - updated_by (integer) — Last updater member ID.\n", + "Applications.WebhookTest": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - message (string) (required) — `ok` on success, otherwise the delivery error message.\n - ok (boolean) (required) — Whether the webhook endpoint accepted the sample event.\n - status_code (integer) (required) — HTTP status code returned by the webhook endpoint. 0 when the request did not receive a response.\n", "Applications.WriteCreate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - application_id (string) — Auto-generated unique application ID.\n - application_name (string) — Application display name.\n - client_token (string) — Token for RUM SDK initialization.\n", "AuditLogs.OperationList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - name (string) (required) — Stable machine-readable operation name for use as a filter.\n - name_cn (string) (required) — Human-readable Chinese label shown in the console.\n", "AuditLogs.Search": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) (required) — ID of the account.\n - body (string) (required) — JSON-encoded request body (may be truncated at 10 KB).\n - created_at (integer) (required) — Timestamp of the operation in Unix epoch milliseconds.\n - ip (string) (required) — Client IP address of the caller.\n - is_dangerous (boolean) (required) — True if this is flagged as a high-risk operation.\n - is_write (boolean) (required) — True for mutating operations; false for read-only ones.\n - member_id (integer) (required) — ID of the member who performed the action.\n - member_name (string) (required) — Display name of the member.\n - operation (string) (required) — Stable machine-readable operation name, e.g. `template:write:create`.\n - operation_name (string) (required) — Human-readable operation label in the account's locale.\n - params (array) (required) — URL path parameters as an array of key-value pairs, or an empty array when none.\n - Key (string)\n - Value (string)\n - request_id (string) (required) — Unique request ID for correlation.\n", @@ -67,6 +68,7 @@ var responseHelpBySDKMethod = map[string]string{ "Channels.ChannelEscalateRuleCreate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - rule_id (string) (required) — Newly created rule ID (MongoDB ObjectID).\n - rule_name (string) (required) — Rule name echoed back from the request.\n", "Channels.ChannelEscalateRuleInfo": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Owning account ID.\n - aggr_window (integer) (required) — Aggregation window in seconds.\n - channel_id (integer) (required) — Channel the rule belongs to.\n - channel_name (string) — Channel name, populated for cross-channel listing responses.\n - created_at (integer) (required) — Creation timestamp (unix seconds).\n - deleted_at (integer) — Deletion timestamp (unix seconds). Emitted only for soft-deleted rules.\n - description (string) (required) — Rule description.\n - filters (object) (required)\n - layers (array) (required) — Escalation levels in order.\n - escalate_window (integer) — Wait before moving to the next level, in minutes. (0-720)\n - force_escalate (boolean) — When true, always escalate regardless of acknowledgement.\n - max_times (integer) — Max repeat notifications within the level. (0-6)\n - notify_step (number) — Repeat interval in minutes. (0.5-120)\n - target (object) (required) — Notification target. At least one of `person_ids`, `team_ids`, `schedule_to_role_ids`, or `emails` must be set, together with either `by` or `webhooks`.\n - by (object) — Per-severity personal notification channels. Required unless `webhooks` is provided.\n - critical (array) — Channels for Critical events (e.g. `voice`, `sms`, `email`, `feishu`).\n - follow_preference (boolean) — When true, use each responder's personal preference instead of the lists below.\n - info (array) — Channels for Info events.\n - warning (array) — Channels for Warning events.\n - emails (array) — Email addresses to notify (push-only scenarios).\n - person_ids (array) — Member IDs to notify directly.\n - schedule_to_role_ids (object) — Map of schedule ID to the role IDs on that schedule to notify.\n - team_ids (array) — Team IDs to notify.\n - webhooks (array) — Group chat / webhook targets. Required unless `by` is provided.\n - settings (object) (required) — Type-specific settings (chat IDs, URLs, etc.).\n - type (string) (required) — Webhook type (e.g. `feishu`, `dingtalk_app`, `wecom_app`, `slack`, `teams`, `custom`).\n - priority (integer) (required) — Evaluation priority. Lower runs first.\n - rule_id (string) (required) — Escalation rule ID (MongoDB ObjectID).\n - rule_name (string) (required) — Rule name.\n - status (string) (required) — Rule status. [enabled, disabled]\n - template_id (string) (required) — Notification template ID (MongoDB ObjectID).\n - time_filters (array) (required) — Recurring time windows during which the rule applies.\n - cal_id (string) — Optional calendar ID; restricts the window to days matching the calendar.\n - end (string) — End of the window in `HH:MM`.\n - is_off (boolean) — When true, match days marked as days-off in the calendar.\n - repeat (array) — Days of the week this window repeats on. Empty means every day.\n - start (string) — Start of the window in `HH:MM`.\n - updated_at (integer) (required) — Last update timestamp (unix seconds).\n - updated_by (integer) (required) — Member ID that last updated the rule.\n", "Channels.ChannelEscalateRuleList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) (required) — Owning account ID.\n - aggr_window (integer) (required) — Aggregation window in seconds.\n - channel_id (integer) (required) — Channel the rule belongs to.\n - channel_name (string) — Channel name, populated for cross-channel listing responses.\n - created_at (integer) (required) — Creation timestamp (unix seconds).\n - deleted_at (integer) — Deletion timestamp (unix seconds). Emitted only for soft-deleted rules.\n - description (string) (required) — Rule description.\n - filters (object) (required)\n - layers (array) (required) — Escalation levels in order.\n - escalate_window (integer) — Wait before moving to the next level, in minutes. (0-720)\n - force_escalate (boolean) — When true, always escalate regardless of acknowledgement.\n - max_times (integer) — Max repeat notifications within the level. (0-6)\n - notify_step (number) — Repeat interval in minutes. (0.5-120)\n - target (object) (required) — Notification target. At least one of `person_ids`, `team_ids`, `schedule_to_role_ids`, or `emails` must be set, together with either `by` or `webhooks`.\n - by (object) — Per-severity personal notification channels. Required unless `webhooks` is provided.\n - emails (array) — Email addresses to notify (push-only scenarios).\n - person_ids (array) — Member IDs to notify directly.\n - schedule_to_role_ids (object) — Map of schedule ID to the role IDs on that schedule to notify.\n - team_ids (array) — Team IDs to notify.\n - webhooks (array) — Group chat / webhook targets. Required unless `by` is provided.\n - priority (integer) (required) — Evaluation priority. Lower runs first.\n - rule_id (string) (required) — Escalation rule ID (MongoDB ObjectID).\n - rule_name (string) (required) — Rule name.\n - status (string) (required) — Rule status. [enabled, disabled]\n - template_id (string) (required) — Notification template ID (MongoDB ObjectID).\n - time_filters (array) (required) — Recurring time windows during which the rule applies.\n - cal_id (string) — Optional calendar ID; restricts the window to days matching the calendar.\n - end (string) — End of the window in `HH:MM`.\n - is_off (boolean) — When true, match days marked as days-off in the calendar.\n - repeat (array) — Days of the week this window repeats on. Empty means every day.\n - start (string) — Start of the window in `HH:MM`.\n - updated_at (integer) (required) — Last update timestamp (unix seconds).\n - updated_by (integer) (required) — Member ID that last updated the rule.\n", + "Channels.ChannelEscalateWebhookRobotList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - referenced_by (array) — List of channels and escalation rules referencing this robot.\n - channel_id (integer) — Channel ID.\n - channel_name (string) — Channel name.\n - escalate_rule_id (string) — Escalation rule ID (MongoDB ObjectID).\n - escalate_rule_name (string) — Escalation rule name.\n - settings (object) — Robot configuration, including `token` (webhook URL or secret) and `alias` (robot display name) among other fields.\n - type (string) — Robot type, e.g. `feishu`, `dingtalk`, `wecom`, `slack`, `teams`, etc.\n", "Channels.ChannelInfo": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) — Owning account ID.\n - active_incident_highest_severity (string) — Highest severity among active incidents in the channel.\n - auto_resolve_mode (string) — Auto-resolve timer reset mode. [trigger, update]\n - auto_resolve_timeout (integer) — Auto-resolve timeout in seconds. 0 disables auto-resolve.\n - channel_id (integer) — Channel ID.\n - channel_name (string) — Channel name.\n - created_at (integer) — Creation timestamp (unix seconds).\n - creator_id (integer) — Member ID who created the channel.\n - creator_name (string) — Name of the member who created the channel (resolved from the member directory; empty when unavailable).\n - deleted_at (integer) — Deletion timestamp (unix seconds). Non-zero only for soft-deleted channels.\n - description (string) — Free-form description.\n - disable_auto_close (boolean) — When true, automatic incident closing is disabled.\n - disable_outlier_detection (boolean) — When true, outlier incident detection is disabled.\n - external_report_token (string) — Token granted to external reporters when external reporting is enabled.\n - flapping (object) — Flapping detection configuration.\n - in_mins (integer) — Observation window in minutes. (1-1440)\n - is_disabled (boolean) — Disable flapping detection.\n - max_changes (integer) — Max state changes allowed within `in_mins`. (2-100)\n - mute_mins (integer) — Mute duration in minutes after flapping is detected. (0-1440)\n - group (object) — Alert grouping configuration.\n - all_equals_required (boolean) — When true, all listed keys must be present for grouping.\n - cases (array) — Per-filter grouping overrides.\n - equals (array) — Groups of label keys whose equality defines a bucket.\n - i_keys (array) — Label keys used for intelligent grouping embeddings.\n - i_score_threshold (number) — Intelligent grouping similarity threshold. (0.5-1)\n - method (string) (required) — Grouping method: `i` intelligent, `p` pattern, `n` none. [i, p, n]\n - storm_threshold (integer) — Alert storm threshold. (0-10000)\n - storm_thresholds (array) — Multi-level storm thresholds.\n - time_window (integer) — Grouping time window in minutes. Default max is 1440 minutes (24 h); extended accounts may allow up to 43200 minutes (30 days). (min 0)\n - window_type (string) — Window type. Defaults to `tumbling`. [tumbling, sliding]\n - is_external_report_enabled (boolean) — Whether external reporters can file incidents into this channel.\n - is_private (boolean) — When true, the channel is visible only to its managing teams.\n - is_starred (boolean) — Whether the current user has starred this channel.\n - last_incident_at (integer) — Timestamp of the most recent incident (unix seconds).\n - managing_team_ids (array) — Additional teams that can manage the channel.\n - progress_to_incident_cnts (object)\n - Processing (integer) (required) — Count of processing incidents in the last 30 days.\n - Triggered (integer) (required) — Count of triggered incidents in the last 30 days.\n - status (string) — Channel status. [enabled, disabled, deleted]\n - team_id (integer) — Owning team ID.\n - team_name (string) — Owning team name (resolved from the team directory; empty when unavailable).\n - updated_at (integer) — Last update timestamp (unix seconds).\n", "Channels.ChannelInfos": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - channel_id (integer) (required) — Channel ID.\n - channel_name (string) (required) — Channel name.\n - status (string) — Channel status. [enabled, disabled]\n", "Channels.ChannelInhibitRuleCreate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - rule_id (string) (required) — Newly created rule ID (MongoDB ObjectID).\n - rule_name (string) (required) — Rule name echoed back from the request.\n", @@ -99,18 +101,23 @@ var responseHelpBySDKMethod = map[string]string{ "Incidents.PastList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) (required) — Account ID that owns the incident.\n - account_locale (string) (required) — Account locale.\n - account_name (string) (required) — Account name.\n - account_time_zone (string) (required) — Account time zone.\n - ack_time (integer) (required) — Unix timestamp (seconds) when the incident was first acknowledged. 0 if unacknowledged.\n - active_alert_cnt (integer) (required) — Count of alerts currently in Critical/Warning/Info state.\n - ai_summary (string) (required) — AI-generated summary of the incident.\n - alert_cnt (integer) (required) — Total count of alerts merged into this incident.\n - alert_event_cnt (integer) (required) — Total raw alert event count across all merged alerts.\n - alerts (array) — Embedded alerts, only populated for notification templates and custom actions.\n - account_id (integer) (required) — Account ID.\n - alert_id (string) (required) — Alert ID (MongoDB ObjectID).\n - alert_key (string) (required) — Deduplication key used to merge events into the alert.\n - alert_severity (string) (required) — Current severity. [Critical, Warning, Info, Ok]\n - alert_status (string) (required) — Current status. [Critical, Warning, Info, Ok]\n - channel_id (integer) (required) — Channel ID.\n - channel_name (string) (required) — Channel display name.\n - channel_status (string) (required) — Channel status.\n - created_at (integer) (required) — Creation timestamp (seconds).\n - data_source_id (integer) (required) — Deprecated. Use `integration_id` instead.\n - data_source_name (string) (required) — Deprecated. Use `integration_name`.\n - data_source_ref_id (string) (required) — Deprecated. Use `integration_ref_id`.\n - data_source_type (string) — Deprecated. Use `integration_type`.\n - deleted_at (integer) — Soft-delete timestamp (seconds). Zero if not deleted.\n - description (string) (required) — Alert description.\n - end_time (integer) (required) — Unix timestamp (seconds) when the alert recovered. 0 if still active.\n - event_cnt (integer) (required) — Total number of raw events merged into this alert.\n - events (array) — Raw alert events, populated when the caller opts in.\n - account_id (integer) — Account ID.\n - alert_id (string) — Parent alert ID (MongoDB ObjectID).\n - alert_key (string) — Deduplication key used to merge events into an alert.\n - channel_id (integer) — Channel ID the event is routed to.\n - created_at (integer) — Record creation time, Unix epoch seconds.\n - data_source_id (integer) — Deprecated. Use `integration_id` instead.\n - deleted_at (integer) — Soft-delete timestamp (seconds). Zero if not deleted.\n - description (string) — Event description.\n - event_id (string) — Event ID (MongoDB ObjectID).\n - event_severity (string) — Severity of this event. [Critical, Warning, Info, Ok]\n - event_status (string) — Status of this event. [Critical, Warning, Info, Ok]\n - event_time (integer) — Event timestamp, Unix epoch seconds.\n - images (array) — Images attached to the event.\n - integration_id (integer) — Integration that produced this event.\n - integration_type (string) — Type/plugin key of the integration that produced this event.\n - labels (object) — Label key-value pairs.\n - title (string) — Event title.\n - title_rule (string) — Title template used to derive `title` from labels.\n - updated_at (integer) — Record update time, Unix epoch seconds.\n - ever_muted (boolean) (required) — Whether this alert has ever been silenced.\n - images (array) (required) — Attached images.\n - alt (string) — Alt text.\n - href (string) — Optional link the image points to.\n - src (string) (required) — Image source. Either an `img_` upload token or an `http(s)` URL.\n - incident (object) — Brief incident reference embedded in an alert.\n - incident_id (string) — Incident ID (ObjectID hex string).\n - progress (string) — Incident progress — one of `Triggered`, `Processing`, `Closed`.\n - title (string) — Incident title.\n - integration_id (integer) (required) — Integration ID that produced the alert.\n - integration_name (string) (required) — Integration display name.\n - integration_ref_id (string) (required) — Integration reference ID.\n - integration_type (string) (required) — Integration type string.\n - labels (object) (required) — Alert labels.\n - last_time (integer) (required) — Unix timestamp (seconds) of the most recent event.\n - responder_email (string) (required) — Primary responder email, if any.\n - responder_name (string) (required) — Primary responder name, if any.\n - start_time (integer) (required) — Unix timestamp (seconds) when the alert first fired.\n - title (string) (required) — Alert title.\n - title_rule (string) (required) — Title rendering rule.\n - updated_at (integer) (required) — Last update timestamp (seconds).\n - assigned_to (object) (required) — Incident assignment target. Either `person_ids` or `escalate_rule_id` must be provided.\n - assigned_at (integer) — Unix timestamp (seconds) when the assignment was made.\n - emails (array) — Email recipients, used by integrations such as ServiceNow.\n - escalate_rule_id (string) — Escalation rule ID (MongoDB ObjectID) to drive assignment.\n - escalate_rule_name (string) — Escalation rule display name, filled by the server.\n - id (string) — Opaque assignment ID generated by the server.\n - layer_idx (integer) — Current level index within the escalation rule.\n - person_ids (array) — Member IDs to assign directly.\n - type (string) — Assignment type: `assign` direct assignment, `reassign` reassignment, `escalate` escalation-rule driven, `reopen` automatic reassignment on reopen. [assign, reassign, escalate, reopen]\n - channel_id (integer) (required) — Channel ID. 0 for standalone incidents.\n - channel_name (string) (required) — Channel display name.\n - channel_status (string) (required) — Channel status.\n - close_time (integer) (required) — Unix timestamp (seconds) when the incident was closed. 0 if still open.\n - closer (object) — A Flashduty member reference.\n - as (string) — Role label for this member in the context of the current object.\n - email (string) — Member email address.\n - person_id (integer) — Member ID.\n - person_name (string) — Member display name.\n - closer_id (integer) (required) — Member ID that closed the incident. 0 if auto-closed.\n - created_at (integer) (required) — Creation timestamp (seconds).\n - creator (object) — A Flashduty member reference.\n - as (string) — Role label for this member in the context of the current object.\n - email (string) — Member email address.\n - person_id (integer) — Member ID.\n - person_name (string) — Member display name.\n - creator_id (integer) (required) — Member ID that created the incident. 0 if auto-created by the system.\n - data_source_id (integer) — Deprecated. Use `integration_id` instead.\n - data_source_ids (array) — Deprecated. Use `integration_ids` instead.\n - data_source_type (string) — Deprecated. Use `integration_type` instead.\n - data_source_types (array) — Deprecated. Use `integration_types` instead.\n - dedup_key (string) (required) — Deduplication key used to coalesce alerts.\n - deleted_at (integer) — Soft-delete timestamp (seconds). Zero if not deleted.\n - description (string) (required) — Incident description.\n - detail_url (string) (required) — Web console URL for the incident.\n - end_time (integer) (required) — Unix timestamp (seconds) when the incident ended. 0 if still active.\n - equals_md5 (string) (required) — MD5 hash used for content-equality checks.\n - ever_muted (boolean) (required) — Whether the incident has ever been silenced.\n - fields (object) (required) — Custom field values keyed by field name.\n - frequency (string) — Frequency bucket for recurrence analysis: `frequent` or `rare`. [frequent, rare]\n - group_method (string) (required) — Alert grouping method: `i` intelligent, `p` pattern, `n` none. [i, p, n]\n - images (array) (required) — Attached images.\n - alt (string) — Alt text.\n - href (string) — Optional link the image points to.\n - src (string) (required) — Image source. Either an `img_` upload token or an `http(s)` URL.\n - impact (string) (required) — Impact description.\n - incident_id (string) (required) — Incident ID (MongoDB ObjectID).\n - incident_severity (string) (required) — Configured incident severity. [Critical, Warning, Info, Ok]\n - incident_status (string) (required) — Current incident status, derived from alert statuses. [Critical, Warning, Info, Ok]\n - integration_id (integer) (required) — First integration associated with the incident.\n - integration_ids (array) (required) — All integration IDs contributing alerts to this incident.\n - integration_type (string) — First alert's integration type string, used by the detail page for label mappings.\n - integration_types (array) (required) — Integration type strings for all contributing integrations.\n - labels (object) (required) — Labels propagated from alerts.\n - last_time (integer) (required) — Unix timestamp (seconds) of the most recent update.\n - links (array) — Channel-level link integrations rendered for this incident.\n - endpoint (string) (required) — Rendered URL for the link.\n - name (string) (required) — Display name of the link.\n - open_type (string) (required) — How the link should be opened. [popup, tab]\n - manual_overrides (array) (required) — Fields that were manually overridden after auto-population.\n - num (string) (required) — Short display identifier; not guaranteed unique.\n - owner (object) — A Flashduty member reference.\n - as (string) — Role label for this member in the context of the current object.\n - email (string) — Member email address.\n - person_id (integer) — Member ID.\n - person_name (string) — Member display name.\n - owner_id (integer) (required) — Primary owner member ID. 0 if none.\n - post_mortem_id (string) (required) — Associated post-mortem ID, if any. One incident can only link to a single post-mortem.\n - progress (string) (required) — Incident progress state. [Triggered, Processing, Closed]\n - reporter_email (string) — Reporter email for manually created incidents.\n - resolution (string) (required) — Resolution notes.\n - responders (array) (required) — Current responders with assignment/acknowledgement state.\n - acknowledged_at (integer) (required) — Unix timestamp (seconds) when the member acknowledged. 0 if not yet acknowledged.\n - as (string) — Role label of this responder.\n - assigned_at (integer) (required) — Unix timestamp (seconds) when the member was assigned.\n - email (string) — Member email, filled by the server.\n - person_id (integer) (required) — Responder member ID.\n - person_name (string) — Member display name, filled by the server.\n - root_cause (string) (required) — Root cause analysis.\n - score (number) (required) — Similarity score from the vector search.\n - silence_url (string) (required) — Quick-silence URL for this incident.\n - snoozed_before (integer) (required) — Unix timestamp (seconds) until which notifications are snoozed. 0 if not snoozed.\n - start_time (integer) (required) — Unix timestamp (seconds) when the incident started.\n - title (string) (required) — Incident title.\n - updated_at (integer) (required) — Last update timestamp (seconds).\n", "Incidents.PostMortemInfo": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - basics (object) (required)\n - incidents_earliest_start_seconds (integer) (required) — Earliest start time among linked incidents (seconds).\n - incidents_highest_severity (string) (required) — Highest severity among linked incidents.\n - incidents_latest_close_seconds (integer) (required) — Latest close time among linked incidents (seconds).\n - incidents_total_duration_seconds (integer) (required) — Cumulative duration in seconds.\n - responders (array) (required) — Responders involved in the incident(s).\n - acknowledged_at (integer) (required) — Unix timestamp (seconds) when the member acknowledged. 0 if not yet acknowledged.\n - as (string) — Role label of this responder.\n - assigned_at (integer) (required) — Unix timestamp (seconds) when the member was assigned.\n - email (string) — Member email, filled by the server.\n - person_id (integer) (required) — Responder member ID.\n - person_name (string) — Member display name, filled by the server.\n - content (object) (required)\n - content (string) (required) — Report body content (BlockNote JSON).\n - follow_ups (string) (required) — Follow-up action items rendered as a single string.\n - meta (object) (required) — Post-mortem metadata (lightweight shape used in lists).\n - account_id (integer) (required) — Account ID.\n - author_ids (array) (required) — Member IDs that contributed to the report.\n - channel_id (integer) (required) — Owning channel ID. 0 if none.\n - channel_name (string) (required) — Channel name, filled by the server.\n - created_at_seconds (integer) (required) — Creation timestamp (seconds).\n - incident_ids (array) (required) — Linked incident IDs.\n - is_private (boolean) (required) — When true, only team members and admins can view.\n - media_count (integer) (required) — Number of uploaded media files.\n - post_mortem_id (string) (required) — Deterministic post-mortem ID derived from account and incident IDs.\n - status (string) (required) — Report status. [drafting, published]\n - team_id (integer) (required) — Owning team ID. 0 if none.\n - template_id (string) (required) — Template used to initialize the report.\n - title (string) (required) — Report title.\n - updated_at_seconds (integer) (required) — Last update timestamp (seconds).\n", "Incidents.PostMortemList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) (required) — Account ID.\n - author_ids (array) (required) — Member IDs that contributed to the report.\n - channel_id (integer) (required) — Owning channel ID. 0 if none.\n - channel_name (string) (required) — Channel name, filled by the server.\n - created_at_seconds (integer) (required) — Creation timestamp (seconds).\n - incident_ids (array) (required) — Linked incident IDs.\n - is_private (boolean) (required) — When true, only team members and admins can view.\n - media_count (integer) (required) — Number of uploaded media files.\n - post_mortem_id (string) (required) — Deterministic post-mortem ID derived from account and incident IDs.\n - status (string) (required) — Report status. [drafting, published]\n - team_id (integer) (required) — Owning team ID. 0 if none.\n - template_id (string) (required) — Template used to initialize the report.\n - title (string) (required) — Report title.\n - updated_at_seconds (integer) (required) — Last update timestamp (seconds).\n", + "Incidents.PostmortemReadListTemplates": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) (required) — Account ID that owns the template. 0 for built-in templates.\n - content (string) (required) — BlockNote JSON content used to initialize the report body.\n - content_markdown (string) (required) — Markdown version of the template content, used by AI generation.\n - created_at_seconds (integer) (required) — Unix timestamp in seconds when the template was created.\n - description (string) (required) — Template description.\n - name (string) (required) — Template name shown in the console.\n - team_id (integer) (required) — Managing team ID. Built-in templates use 0.\n - template_id (string) (required) — Template ID. Built-in templates use a stable `post_mortem_default_tmpl_*` ID.\n - updated_at_seconds (integer) (required) — Unix timestamp in seconds when the template was last updated.\n", + "Incidents.PostmortemReadTemplateInfo": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Account ID that owns the template. 0 for built-in templates.\n - content (string) (required) — BlockNote JSON content used to initialize the report body.\n - content_markdown (string) (required) — Markdown version of the template content, used by AI generation.\n - created_at_seconds (integer) (required) — Unix timestamp in seconds when the template was created.\n - description (string) (required) — Template description.\n - name (string) (required) — Template name shown in the console.\n - team_id (integer) (required) — Managing team ID. Built-in templates use 0.\n - template_id (string) (required) — Template ID. Built-in templates use a stable `post_mortem_default_tmpl_*` ID.\n - updated_at_seconds (integer) (required) — Unix timestamp in seconds when the template was last updated.\n", + "Incidents.PostmortemWriteInit": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - basics (object) (required)\n - incidents_earliest_start_seconds (integer) (required) — Earliest start time among linked incidents (seconds).\n - incidents_highest_severity (string) (required) — Highest severity among linked incidents.\n - incidents_latest_close_seconds (integer) (required) — Latest close time among linked incidents (seconds).\n - incidents_total_duration_seconds (integer) (required) — Cumulative duration in seconds.\n - responders (array) (required) — Responders involved in the incident(s).\n - acknowledged_at (integer) (required) — Unix timestamp (seconds) when the member acknowledged. 0 if not yet acknowledged.\n - as (string) — Role label of this responder.\n - assigned_at (integer) (required) — Unix timestamp (seconds) when the member was assigned.\n - email (string) — Member email, filled by the server.\n - person_id (integer) (required) — Responder member ID.\n - person_name (string) — Member display name, filled by the server.\n - content (object) (required)\n - content (string) (required) — Report body content (BlockNote JSON).\n - follow_ups (string) (required) — Follow-up action items rendered as a single string.\n - meta (object) (required) — Post-mortem metadata (lightweight shape used in lists).\n - account_id (integer) (required) — Account ID.\n - author_ids (array) (required) — Member IDs that contributed to the report.\n - channel_id (integer) (required) — Owning channel ID. 0 if none.\n - channel_name (string) (required) — Channel name, filled by the server.\n - created_at_seconds (integer) (required) — Creation timestamp (seconds).\n - incident_ids (array) (required) — Linked incident IDs.\n - is_private (boolean) (required) — When true, only team members and admins can view.\n - media_count (integer) (required) — Number of uploaded media files.\n - post_mortem_id (string) (required) — Deterministic post-mortem ID derived from account and incident IDs.\n - status (string) (required) — Report status. [drafting, published]\n - team_id (integer) (required) — Owning team ID. 0 if none.\n - template_id (string) (required) — Template used to initialize the report.\n - title (string) (required) — Report title.\n - updated_at_seconds (integer) (required) — Last update timestamp (seconds).\n", + "Incidents.PostmortemWriteUpsertTemplate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Account ID that owns the template. 0 for built-in templates.\n - content (string) (required) — BlockNote JSON content used to initialize the report body.\n - content_markdown (string) (required) — Markdown version of the template content, used by AI generation.\n - created_at_seconds (integer) (required) — Unix timestamp in seconds when the template was created.\n - description (string) (required) — Template description.\n - name (string) (required) — Template name shown in the console.\n - team_id (integer) (required) — Managing team ID. Built-in templates use 0.\n - template_id (string) (required) — Template ID. Built-in templates use a stable `post_mortem_default_tmpl_*` ID.\n - updated_at_seconds (integer) (required) — Unix timestamp in seconds when the template was last updated.\n", "Incidents.ReadGetWarRoomDefaultObservers": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - observers (array) — Historical responders suggested as default war-room observers.\n - account_id (integer) — Account this person belongs to.\n - as (string) — Role the person holds in the related context.\n - avatar (string) — URL of the person's avatar image.\n - email (string) — Email address of the person.\n - locale (string) — Preferred language locale of the person.\n - person_id (integer) — Person ID.\n - person_name (string) — Display name of the person.\n - phone (string) — Phone number of the person.\n - status (string) — Current status of the person.\n - time_zone (string) — Time zone of the person.\n", "Incidents.WarRoomCreate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - chat_id (string) (required) — Chat/group ID on the IM side.\n - chat_name (string) (required) — Chat/group display name.\n - share_link (string) (required) — Join link for the war room, if provided by the IM.\n", "Incidents.WarRoomDetail": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - chat_id (string) (required) — Chat/group ID on the IM side.\n - chat_name (string) (required) — Chat/group display name.\n - share_link (string) (required) — Join link for the war room, if provided by the IM.\n", "Incidents.WarRoomList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) (required) — Account ID.\n - chat_id (string) (required) — Chat/group ID on the IM side.\n - created_at (integer) (required) — Creation timestamp (seconds).\n - created_by (integer) (required) — Member ID that created the war room.\n - incident_id (string) (required) — Associated incident ID (MongoDB ObjectID).\n - integration_id (integer) (required) — IM integration ID.\n - plugin_type (string) (required) — IM plugin type (e.g. `feishu`, `dingtalk`, `wecom`, `slack`).\n - status (string) (required) — War room status.\n", + "Integrations.DatasourceImPersonTryLink": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - new_linked_person_ids (array) (required) — Person IDs newly linked during this call.\n", "Integrations.Detail": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - attempt (integer) (required) — Attempt sequence number.\n - channel_id (integer) — Channel ID when applicable.\n - channel_name (string) — Name of the associated channel, resolved at query time.\n - duration (integer) (required) — Total elapsed time of the attempt in milliseconds.\n - endpoint (string) (required) — Destination URL.\n - error_message (string) — Error message when delivery failed.\n - event_id (string) (required) — Event ID.\n - event_time (string) (required) — Event time as a formatted timestamp string.\n - event_type (string) (required) — Event type.\n - integration_id (integer) (required) — Integration ID.\n - ref_id (string) — Source object ID.\n - ref_title (string) — Title of the source incident or alert, resolved at query time.\n - request_body (string) — Outbound request body payload.\n - request_headers (string) — Serialized outbound request headers.\n - response_body (string) — Response body.\n - response_headers (string) — Serialized response headers.\n - status (string) (required) — Delivery outcome. [success, failed]\n - status_code (integer) (required) — HTTP status code.\n - webhook_type (string) (required) — Source object kind. `incident` or `alert`.\n", "Integrations.List": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - attempt (integer) (required) — Attempt sequence number.\n - channel_id (integer) — Channel ID associated with the event, when applicable.\n - duration (integer) (required) — Total elapsed time of the attempt in milliseconds.\n - endpoint (string) (required) — Destination URL.\n - error_message (string) — Error message when delivery failed.\n - event_id (string) (required) — Unique event identifier for the delivery attempt.\n - event_time (string) (required) — Event time as a formatted timestamp string.\n - event_type (string) (required) — Event type (e.g. `created`, `acknowledged`, `closed`).\n - integration_id (integer) (required) — Integration ID that triggered the webhook.\n - ref_id (string) — Source object ID (incident ID or alert ID).\n - request_body (string) — Outbound request body payload.\n - request_headers (string) — Serialized outbound request headers.\n - response_body (string) — Response body returned by the destination.\n - response_headers (string) — Serialized response headers from the destination.\n - status (string) (required) — Delivery outcome. [success, failed]\n - status_code (integer) (required) — HTTP status code returned by the destination.\n - webhook_type (string) (required) — Source object kind. `incident` or `alert`.\n", "Issues.ReadInfo": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - age (integer)\n - application_id (string)\n - application_name (string)\n - created_at (integer)\n - error (object)\n - message (string)\n - type (string)\n - error_count (integer) — Total error occurrences.\n - first_seen (object)\n - timestamp (integer)\n - version (string)\n - is_crash (boolean) — Whether the error caused an app crash.\n - issue_id (string) — Unique issue ID.\n - last_seen (object)\n - timestamp (integer)\n - version (string)\n - regression (object) — Regression metadata. Present only when a previously resolved issue re-occurred.\n - regressed_at (integer) — Timestamp when the regression was detected.\n - regressed_at_version (string) — Application version in which the regression was observed.\n - resolved_at (integer) — Timestamp of the previous resolution before the regression.\n - resolved_at (integer)\n - resolved_by (integer)\n - service (string)\n - session_count (integer) — Affected user sessions.\n - severity (string) — Issue severity level.\n - status (string) [for_review, reviewed, ignored, resolved]\n - suspected_cause (object)\n - person_id (integer)\n - reason (string)\n - source (string) [auto, user]\n - value (string) [api.failed_request, network.error, code.exception, code.invalid_object_access, code.invalid_argument, unknown]\n - team_id (integer)\n - updated_at (integer)\n - versions (array)\n", "Issues.ReadList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - age (integer)\n - application_id (string)\n - application_name (string)\n - created_at (integer)\n - error (object)\n - message (string)\n - type (string)\n - error_count (integer) — Total error occurrences.\n - first_seen (object)\n - timestamp (integer)\n - version (string)\n - is_crash (boolean) — Whether the error caused an app crash.\n - issue_id (string) — Unique issue ID.\n - last_seen (object)\n - timestamp (integer)\n - version (string)\n - regression (object) — Regression metadata. Present only when a previously resolved issue re-occurred.\n - regressed_at (integer) — Timestamp when the regression was detected.\n - regressed_at_version (string) — Application version in which the regression was observed.\n - resolved_at (integer) — Timestamp of the previous resolution before the regression.\n - resolved_at (integer)\n - resolved_by (integer)\n - service (string)\n - session_count (integer) — Affected user sessions.\n - severity (string) — Issue severity level.\n - status (string) [for_review, reviewed, ignored, resolved]\n - suspected_cause (object)\n - person_id (integer)\n - reason (string)\n - source (string) [auto, user]\n - value (string) [api.failed_request, network.error, code.exception, code.invalid_object_access, code.invalid_argument, unknown]\n - team_id (integer)\n - updated_at (integer)\n - versions (array)\n", - "McpServers.ReadServerGet": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Owning account.\n - ai_description (string) — LLM-generated description, preferred over description when present.\n - args (array) — Command-line arguments for the stdio executable.\n - auth_mode (string) — Credential model: shared, per_user_secret, or per_user_oauth.\n - call_timeout (integer) (required) — Per-call timeout in seconds.\n - can_edit (boolean) (required) — Whether the calling member may edit or delete this resource.\n - command (string) — Executable launched for stdio transport.\n - connect_timeout (integer) (required) — Connection timeout in seconds.\n - created_at (integer) (required) — Creation time as a Unix timestamp in milliseconds.\n - created_by (integer) (required) — Member who created this resource.\n - description (string) (required) — What this MCP server provides.\n - env (object) — Environment variables passed to the stdio process.\n - headers (object) — HTTP headers sent to the remote endpoint; secret values are masked.\n - list_error (string) — Tool-probe failure message; present when the live probe failed.\n - oauth_metadata (string) — OAuth metadata JSON.\n - proxy_url (string) — Outbound proxy URL used to reach the server.\n - secret_schema (string) — JSON schema of the per-user secret.\n - server_id (string) (required) — Unique identifier of the MCP server.\n - server_name (string) (required) — Display name of the MCP server.\n - status (string) (required) — Whether the server is active and usable by agents. [enabled, disabled]\n - team_id (integer) (required) — Owning team; 0 means account scope.\n - tool_count (integer) — Number of tools discovered on the server.\n - tools (array) — Live tool catalogue; populated only by get and test.\n - description (string) (required) — What the tool does.\n - input_schema (any) — JSON schema of the tool's input arguments.\n - name (string) (required) — Tool name as advertised by the server.\n - transport (string) (required) — Transport used to reach the server. [stdio, sse, streamable-http]\n - updated_at (integer) (required) — Last-update time as a Unix timestamp in milliseconds.\n - url (string) — Endpoint URL for sse or streamable-http transport.\n", - "McpServers.ReadServerList": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - servers (array) (required) — MCP servers on the current page.\n - account_id (integer) (required) — Owning account.\n - ai_description (string) — LLM-generated description, preferred over description when present.\n - args (array) — Command-line arguments for the stdio executable.\n - auth_mode (string) — Credential model: shared, per_user_secret, or per_user_oauth.\n - call_timeout (integer) (required) — Per-call timeout in seconds.\n - can_edit (boolean) (required) — Whether the calling member may edit or delete this resource.\n - command (string) — Executable launched for stdio transport.\n - connect_timeout (integer) (required) — Connection timeout in seconds.\n - created_at (integer) (required) — Creation time as a Unix timestamp in milliseconds.\n - created_by (integer) (required) — Member who created this resource.\n - description (string) (required) — What this MCP server provides.\n - env (object) — Environment variables passed to the stdio process.\n - headers (object) — HTTP headers sent to the remote endpoint; secret values are masked.\n - list_error (string) — Tool-probe failure message; present when the live probe failed.\n - oauth_metadata (string) — OAuth metadata JSON.\n - proxy_url (string) — Outbound proxy URL used to reach the server.\n - secret_schema (string) — JSON schema of the per-user secret.\n - server_id (string) (required) — Unique identifier of the MCP server.\n - server_name (string) (required) — Display name of the MCP server.\n - status (string) (required) — Whether the server is active and usable by agents. [enabled, disabled]\n - team_id (integer) (required) — Owning team; 0 means account scope.\n - tool_count (integer) — Number of tools discovered on the server.\n - tools (array) — Live tool catalogue; populated only by get and test.\n - description (string) (required) — What the tool does.\n - input_schema (any) — JSON schema of the tool's input arguments.\n - name (string) (required) — Tool name as advertised by the server.\n - transport (string) (required) — Transport used to reach the server. [stdio, sse, streamable-http]\n - updated_at (integer) (required) — Last-update time as a Unix timestamp in milliseconds.\n - url (string) — Endpoint URL for sse or streamable-http transport.\n - total (integer) (required) — Total number of servers matching the filters.\n", - "McpServers.WriteServerCreate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Owning account.\n - ai_description (string) — LLM-generated description, preferred over description when present.\n - args (array) — Command-line arguments for the stdio executable.\n - auth_mode (string) — Credential model: shared, per_user_secret, or per_user_oauth.\n - call_timeout (integer) (required) — Per-call timeout in seconds.\n - can_edit (boolean) (required) — Whether the calling member may edit or delete this resource.\n - command (string) — Executable launched for stdio transport.\n - connect_timeout (integer) (required) — Connection timeout in seconds.\n - created_at (integer) (required) — Creation time as a Unix timestamp in milliseconds.\n - created_by (integer) (required) — Member who created this resource.\n - description (string) (required) — What this MCP server provides.\n - env (object) — Environment variables passed to the stdio process.\n - headers (object) — HTTP headers sent to the remote endpoint; secret values are masked.\n - list_error (string) — Tool-probe failure message; present when the live probe failed.\n - oauth_metadata (string) — OAuth metadata JSON.\n - proxy_url (string) — Outbound proxy URL used to reach the server.\n - secret_schema (string) — JSON schema of the per-user secret.\n - server_id (string) (required) — Unique identifier of the MCP server.\n - server_name (string) (required) — Display name of the MCP server.\n - status (string) (required) — Whether the server is active and usable by agents. [enabled, disabled]\n - team_id (integer) (required) — Owning team; 0 means account scope.\n - tool_count (integer) — Number of tools discovered on the server.\n - tools (array) — Live tool catalogue; populated only by get and test.\n - description (string) (required) — What the tool does.\n - input_schema (any) — JSON schema of the tool's input arguments.\n - name (string) (required) — Tool name as advertised by the server.\n - transport (string) (required) — Transport used to reach the server. [stdio, sse, streamable-http]\n - updated_at (integer) (required) — Last-update time as a Unix timestamp in milliseconds.\n - url (string) — Endpoint URL for sse or streamable-http transport.\n", - "McpServers.WriteServerUpdate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Owning account.\n - ai_description (string) — LLM-generated description, preferred over description when present.\n - args (array) — Command-line arguments for the stdio executable.\n - auth_mode (string) — Credential model: shared, per_user_secret, or per_user_oauth.\n - call_timeout (integer) (required) — Per-call timeout in seconds.\n - can_edit (boolean) (required) — Whether the calling member may edit or delete this resource.\n - command (string) — Executable launched for stdio transport.\n - connect_timeout (integer) (required) — Connection timeout in seconds.\n - created_at (integer) (required) — Creation time as a Unix timestamp in milliseconds.\n - created_by (integer) (required) — Member who created this resource.\n - description (string) (required) — What this MCP server provides.\n - env (object) — Environment variables passed to the stdio process.\n - headers (object) — HTTP headers sent to the remote endpoint; secret values are masked.\n - list_error (string) — Tool-probe failure message; present when the live probe failed.\n - oauth_metadata (string) — OAuth metadata JSON.\n - proxy_url (string) — Outbound proxy URL used to reach the server.\n - secret_schema (string) — JSON schema of the per-user secret.\n - server_id (string) (required) — Unique identifier of the MCP server.\n - server_name (string) (required) — Display name of the MCP server.\n - status (string) (required) — Whether the server is active and usable by agents. [enabled, disabled]\n - team_id (integer) (required) — Owning team; 0 means account scope.\n - tool_count (integer) — Number of tools discovered on the server.\n - tools (array) — Live tool catalogue; populated only by get and test.\n - description (string) (required) — What the tool does.\n - input_schema (any) — JSON schema of the tool's input arguments.\n - name (string) (required) — Tool name as advertised by the server.\n - transport (string) (required) — Transport used to reach the server. [stdio, sse, streamable-http]\n - updated_at (integer) (required) — Last-update time as a Unix timestamp in milliseconds.\n - url (string) — Endpoint URL for sse or streamable-http transport.\n", + "McpServers.ReadServerGet": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Owning account ID.\n - ai_description (string) — LLM-generated description, preferred over `description` when present.\n - args (array) — Command arguments (stdio transport).\n - auth_mode (string) — Authentication mode. [shared, per_user_secret, per_user_oauth]\n - call_timeout (integer) (required) — Tool-call timeout in seconds (0 = server default, 60s).\n - can_edit (boolean) (required) — Whether the caller may edit this server.\n - command (string) — Executable command (stdio transport only).\n - connect_timeout (integer) (required) — Connection timeout in seconds (0 = server default, 10s).\n - created_at (integer) (required) — Creation time. Unix timestamp in milliseconds.\n - created_by (integer) (required) — Member ID that created the server.\n - description (string) (required) — Server description.\n - env (object) — Environment variables (stdio transport). Secret values are masked.\n - headers (object) — HTTP headers (sse / streamable-http). Secret values are masked.\n - list_error (string) — Error message when the live tool list failed.\n - oauth_metadata (string) — JSON-encoded OAuth metadata (per_user_oauth mode).\n - proxy_url (string) — Outbound proxy URL used to reach the server.\n - secret_schema (string) — JSON-encoded secret schema (per_user_secret mode).\n - server_id (string) (required) — Unique MCP server ID (prefix `mcp_`).\n - server_name (string) (required) — MCP server name, unique within the account.\n - source_template_name (string) — Marketplace template this connector was installed from; empty for user-authored.\n - status (string) (required) — Server status. [enabled, disabled]\n - team_id (integer) (required) — Team scope: 0 = account-wide; >0 = the owning team.\n - tool_count (integer) — Number of tools in the live list.\n - tools (array) — Live tool list; populated by the get/test endpoints.\n - description (string) (required) — Tool description.\n - input_schema (object) — JSON Schema describing the tool's input parameters.\n - name (string) (required) — Tool name.\n - transport (string) (required) — Transport protocol. [stdio, sse, streamable-http]\n - updated_at (integer) (required) — Last update time. Unix timestamp in milliseconds.\n - url (string) — Server URL (sse / streamable-http transport).\n", + "McpServers.ReadServerList": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - servers (array) (required) — MCP servers on this page.\n - account_id (integer) (required) — Owning account ID.\n - ai_description (string) — LLM-generated description, preferred over `description` when present.\n - args (array) — Command arguments (stdio transport).\n - auth_mode (string) — Authentication mode. [shared, per_user_secret, per_user_oauth]\n - call_timeout (integer) (required) — Tool-call timeout in seconds (0 = server default, 60s).\n - can_edit (boolean) (required) — Whether the caller may edit this server.\n - command (string) — Executable command (stdio transport only).\n - connect_timeout (integer) (required) — Connection timeout in seconds (0 = server default, 10s).\n - created_at (integer) (required) — Creation time. Unix timestamp in milliseconds.\n - created_by (integer) (required) — Member ID that created the server.\n - description (string) (required) — Server description.\n - env (object) — Environment variables (stdio transport). Secret values are masked.\n - headers (object) — HTTP headers (sse / streamable-http). Secret values are masked.\n - list_error (string) — Error message when the live tool list failed.\n - oauth_metadata (string) — JSON-encoded OAuth metadata (per_user_oauth mode).\n - proxy_url (string) — Outbound proxy URL used to reach the server.\n - secret_schema (string) — JSON-encoded secret schema (per_user_secret mode).\n - server_id (string) (required) — Unique MCP server ID (prefix `mcp_`).\n - server_name (string) (required) — MCP server name, unique within the account.\n - source_template_name (string) — Marketplace template this connector was installed from; empty for user-authored.\n - status (string) (required) — Server status. [enabled, disabled]\n - team_id (integer) (required) — Team scope: 0 = account-wide; >0 = the owning team.\n - tool_count (integer) — Number of tools in the live list.\n - tools (array) — Live tool list; populated by the get/test endpoints.\n - description (string) (required) — Tool description.\n - input_schema (object) — JSON Schema describing the tool's input parameters.\n - name (string) (required) — Tool name.\n - transport (string) (required) — Transport protocol. [stdio, sse, streamable-http]\n - updated_at (integer) (required) — Last update time. Unix timestamp in milliseconds.\n - url (string) — Server URL (sse / streamable-http transport).\n - total (integer) (required) — Total number of matching servers.\n", + "McpServers.WriteServerCreate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Owning account ID.\n - ai_description (string) — LLM-generated description, preferred over `description` when present.\n - args (array) — Command arguments (stdio transport).\n - auth_mode (string) — Authentication mode. [shared, per_user_secret, per_user_oauth]\n - call_timeout (integer) (required) — Tool-call timeout in seconds (0 = server default, 60s).\n - can_edit (boolean) (required) — Whether the caller may edit this server.\n - command (string) — Executable command (stdio transport only).\n - connect_timeout (integer) (required) — Connection timeout in seconds (0 = server default, 10s).\n - created_at (integer) (required) — Creation time. Unix timestamp in milliseconds.\n - created_by (integer) (required) — Member ID that created the server.\n - description (string) (required) — Server description.\n - env (object) — Environment variables (stdio transport). Secret values are masked.\n - headers (object) — HTTP headers (sse / streamable-http). Secret values are masked.\n - list_error (string) — Error message when the live tool list failed.\n - oauth_metadata (string) — JSON-encoded OAuth metadata (per_user_oauth mode).\n - proxy_url (string) — Outbound proxy URL used to reach the server.\n - secret_schema (string) — JSON-encoded secret schema (per_user_secret mode).\n - server_id (string) (required) — Unique MCP server ID (prefix `mcp_`).\n - server_name (string) (required) — MCP server name, unique within the account.\n - source_template_name (string) — Marketplace template this connector was installed from; empty for user-authored.\n - status (string) (required) — Server status. [enabled, disabled]\n - team_id (integer) (required) — Team scope: 0 = account-wide; >0 = the owning team.\n - tool_count (integer) — Number of tools in the live list.\n - tools (array) — Live tool list; populated by the get/test endpoints.\n - description (string) (required) — Tool description.\n - input_schema (object) — JSON Schema describing the tool's input parameters.\n - name (string) (required) — Tool name.\n - transport (string) (required) — Transport protocol. [stdio, sse, streamable-http]\n - updated_at (integer) (required) — Last update time. Unix timestamp in milliseconds.\n - url (string) — Server URL (sse / streamable-http transport).\n", + "McpServers.WriteServerUpdate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Owning account ID.\n - ai_description (string) — LLM-generated description, preferred over `description` when present.\n - args (array) — Command arguments (stdio transport).\n - auth_mode (string) — Authentication mode. [shared, per_user_secret, per_user_oauth]\n - call_timeout (integer) (required) — Tool-call timeout in seconds (0 = server default, 60s).\n - can_edit (boolean) (required) — Whether the caller may edit this server.\n - command (string) — Executable command (stdio transport only).\n - connect_timeout (integer) (required) — Connection timeout in seconds (0 = server default, 10s).\n - created_at (integer) (required) — Creation time. Unix timestamp in milliseconds.\n - created_by (integer) (required) — Member ID that created the server.\n - description (string) (required) — Server description.\n - env (object) — Environment variables (stdio transport). Secret values are masked.\n - headers (object) — HTTP headers (sse / streamable-http). Secret values are masked.\n - list_error (string) — Error message when the live tool list failed.\n - oauth_metadata (string) — JSON-encoded OAuth metadata (per_user_oauth mode).\n - proxy_url (string) — Outbound proxy URL used to reach the server.\n - secret_schema (string) — JSON-encoded secret schema (per_user_secret mode).\n - server_id (string) (required) — Unique MCP server ID (prefix `mcp_`).\n - server_name (string) (required) — MCP server name, unique within the account.\n - source_template_name (string) — Marketplace template this connector was installed from; empty for user-authored.\n - status (string) (required) — Server status. [enabled, disabled]\n - team_id (integer) (required) — Team scope: 0 = account-wide; >0 = the owning team.\n - tool_count (integer) — Number of tools in the live list.\n - tools (array) — Live tool list; populated by the get/test endpoints.\n - description (string) (required) — Tool description.\n - input_schema (object) — JSON Schema describing the tool's input parameters.\n - name (string) (required) — Tool name.\n - transport (string) (required) — Transport protocol. [stdio, sse, streamable-http]\n - updated_at (integer) (required) — Last update time. Unix timestamp in milliseconds.\n - url (string) — Server URL (sse / streamable-http transport).\n", "Members.MemberInfo": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_avatar (string) — Account avatar URL\n - account_email (string) — Account email\n - account_id (integer) — Account ID\n - account_locale (string) — Account-level locale preference (e.g. zh-CN or en-US)\n - account_name (string) — Account name\n - account_role_ids (array) — Assigned role IDs\n - account_time_zone (string) — Account-level time zone (e.g. Asia/Shanghai)\n - avatar (string) — Member avatar URL\n - country_code (string) — Phone country code\n - domain (string) — Account domain\n - email (string) — Email address\n - email_verified (boolean) — Whether email is verified\n - is_external (boolean) — Whether provisioned via SSO\n - locale (string) — Locale preference\n - member_id (integer) — Member ID\n - member_name (string) — Member display name\n - phone (string) — Masked phone number\n - phone_verified (boolean) — Whether phone is verified\n - status (string) — Member status. `enabled` — active member; `pending` — invited but not yet accepted; `deleted` — removed from the organization. [enabled, pending, deleted]\n - time_zone (string) — Time zone\n", "Members.MemberInvite": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - member_id (integer) — Member ID\n - member_name (string) — Member display name\n", "Members.MemberList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) (required) — Account ID\n - account_role_ids (array) (required) — Role IDs\n - avatar (string) (required) — Avatar URL\n - country_code (string) (required) — Phone country code\n - created_at (integer) (required) — Creation timestamp (Unix seconds)\n - email (string) (required) — Email address\n - email_verified (boolean) (required) — Email verified\n - is_external (boolean) (required) — Provisioned via SSO\n - locale (string) — Locale\n - member_id (integer) (required) — Member ID\n - member_name (string) (required) — Display name\n - phone (string) (required) — Masked phone number\n - phone_verified (boolean) (required) — Phone verified\n - ref_id (string) (required) — External reference ID\n - status (string) (required) — Member status. `enabled` — active member; `pending` — invited but not yet accepted; `deleted` — removed from the organization. [enabled, pending, deleted]\n - time_zone (string) — Time zone\n - updated_at (integer) (required) — Update timestamp (Unix seconds)\n", @@ -134,23 +141,26 @@ var responseHelpBySDKMethod = map[string]string{ "Schedules.List": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) (required) — Account ID.\n - create_at (integer) (required) — Creation timestamp (Unix seconds).\n - create_by (integer) (required) — Creator person ID.\n - cur_oncall (object) (required) — Snapshot of the currently or next on-call group.\n - end (integer) (required) — Shift end timestamp (Unix seconds).\n - group (object) (required) — Oncall group definition within a rotation layer.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name.\n - members (array) (required) — Members of this group.\n - name (string) (required) — Legacy group name.\n - start (integer) (required) — Group start timestamp (Unix seconds).\n - index (integer) (required) — Index inside the rotation.\n - start (integer) (required) — Shift start timestamp (Unix seconds).\n - update_at (integer) (required) — Update timestamp (Unix seconds).\n - weight (integer) (required) — Layer weight the shift comes from.\n - description (any) (required) — Schedule description. null when returned from /schedule/preview.\n - disabled (any) (required) — Disabled flag (0 = enabled, 1 = disabled). Deprecated. null when returned from /schedule/preview.\n - end (integer) — Window end (Unix seconds).\n - field (string) — Field name used by the legacy update-field endpoint.\n - final_schedule (object) (required) — Computed schedule for a single layer.\n - layer_name (string) (required) — Layer display name.\n - mode (integer) (required) — Layer mode: 0 = common rotation, 1 = override.\n - name (string) (required) — Layer internal name.\n - schedules (array) (required) — Computed shifts.\n - end (integer) (required) — Shift end timestamp (Unix seconds).\n - group (object) (required) — Oncall group definition within a rotation layer.\n - index (integer) (required) — Index inside the rotation.\n - start (integer) (required) — Shift start timestamp (Unix seconds).\n - group_id (any) (required) — Legacy team/group ID. null when returned from /schedule/preview.\n - id (any) (required) — Schedule ID. null when returned from /schedule/preview.\n - layer_schedules (array) (required) — Alias of schedule_layers returned for compatibility.\n - layer_name (string) (required) — Layer display name.\n - mode (integer) (required) — Layer mode: 0 = common rotation, 1 = override.\n - name (string) (required) — Layer internal name.\n - schedules (array) (required) — Computed shifts.\n - end (integer) (required) — Shift end timestamp (Unix seconds).\n - group (object) (required) — Oncall group definition within a rotation layer.\n - index (integer) (required) — Index inside the rotation.\n - start (integer) (required) — Shift start timestamp (Unix seconds).\n - layers (array) (required) — Rotation layers defined on the schedule.\n - account_id (integer) (required) — Account ID.\n - create_at (integer) (required) — Creation timestamp (Unix seconds).\n - create_by (integer) (required) — Creator person ID.\n - day_mask (object) (required) — Day-of-week mask for a rotation layer.\n - repeat (array) — Weekday numbers (0 = Sunday) included in the rotation.\n - enable_time (integer) (required) — When the layer becomes effective (Unix seconds).\n - expire_time (integer) (required) — When the layer expires (Unix seconds, 0 means never).\n - fair_rotation (boolean) (required) — Whether fair rotation is enabled.\n - groups (array) (required) — Oncall groups participating in the rotation.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name.\n - members (array) (required) — Members of this group.\n - name (string) (required) — Legacy group name.\n - start (integer) (required) — Group start timestamp (Unix seconds).\n - handoff_time (integer) (required) — Handoff time inside the rotation cycle (seconds).\n - hidden (integer) (required) — Whether the layer is hidden in the UI (0 = no, 1 = yes).\n - layer_end (any) — Layer end timestamp (Unix seconds). null means open-ended.\n - layer_name (string) — User-facing layer name.\n - layer_start (integer) — Layer start timestamp (Unix seconds).\n - mask_continuous_enabled (boolean) (required) — Whether continuous masking is enabled.\n - mode (integer) (required) — Layer mode: 0 = common rotation, 1 = override.\n - name (string) (required) — Layer internal name.\n - restrict_end (integer) (required) — Legacy end offset inside the restriction window (seconds).\n - restrict_mode (integer) (required) — Restriction mode: 0 = none, 1 = day, 2 = week.\n - restrict_periods (array) (required) — Restriction windows inside each rotation cycle.\n - restrict_end (integer) (required) — End offset inside the rotation cycle.\n - restrict_start (integer) (required) — Start offset inside the rotation cycle.\n - restrict_start (integer) (required) — Legacy start offset inside the restriction window (seconds).\n - rotation_duration (integer) (required) — Rotation duration in seconds.\n - rotation_unit (string) (required) — Rotation unit. [hour, day, week, month]\n - rotation_value (integer) (required) — Rotation quantity (number of rotation_unit per cycle).\n - schedule_id (integer) (required) — Parent schedule ID.\n - update_at (integer) (required) — Last update timestamp (Unix seconds).\n - update_by (integer) (required) — Last updater person ID.\n - weight (integer) (required) — Layer weight for ordering.\n - name (any) (required) — Schedule name (legacy field; mirrors schedule_name). null when returned from /schedule/preview.\n - next_oncall (object) (required) — Snapshot of the currently or next on-call group.\n - end (integer) (required) — Shift end timestamp (Unix seconds).\n - group (object) (required) — Oncall group definition within a rotation layer.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name.\n - members (array) (required) — Members of this group.\n - name (string) (required) — Legacy group name.\n - start (integer) (required) — Group start timestamp (Unix seconds).\n - index (integer) (required) — Index inside the rotation.\n - start (integer) (required) — Shift start timestamp (Unix seconds).\n - update_at (integer) (required) — Update timestamp (Unix seconds).\n - weight (integer) (required) — Layer weight the shift comes from.\n - notify (object) (required) — Notification configuration attached to a schedule.\n - advance_in_time (integer) — Advance notification lead time (seconds).\n - by (object) (required) — Per-recipient notification preference.\n - follow_preference (boolean) (required) — Whether to follow each responder's personal notification preference.\n - personal_channels (array) (required) — Personal notification channel keys.\n - fixed_time (object) (required) — Fixed-time notification config.\n - cycle (string) (required) — Notification cycle.\n - start (string) (required) — Notification start time within the cycle.\n - im (object) — Legacy IM-type to token map.\n - webhooks (array) (required) — IM webhook notification channels.\n - settings (object) (required) — Settings for an IM webhook notification channel.\n - type (string) (required) — IM provider type (for example feishu_app, dingtalk_app, wecom_app, teams_app, slack_app).\n - schedule_id (integer) (required) — Schedule ID.\n - schedule_layers (array) (required) — Computed layers for the requested window.\n - layer_name (string) (required) — Layer display name.\n - mode (integer) (required) — Layer mode: 0 = common rotation, 1 = override.\n - name (string) (required) — Layer internal name.\n - schedules (array) (required) — Computed shifts.\n - end (integer) (required) — Shift end timestamp (Unix seconds).\n - group (object) (required) — Oncall group definition within a rotation layer.\n - index (integer) (required) — Index inside the rotation.\n - start (integer) (required) — Shift start timestamp (Unix seconds).\n - schedule_name (any) (required) — Schedule display name. null when returned from /schedule/preview.\n - start (integer) — Window start (Unix seconds).\n - status (any) (required) — Legacy status flag. Deprecated. null when returned from /schedule/preview.\n - team_id (any) (required) — Owning team ID. null when returned from /schedule/preview.\n - update_at (integer) (required) — Last update timestamp (Unix seconds).\n - update_by (integer) (required) — Last updater person ID.\n", "Schedules.Preview": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Account ID.\n - create_at (integer) (required) — Creation timestamp (Unix seconds).\n - create_by (integer) (required) — Creator person ID.\n - cur_oncall (object) (required) — Snapshot of the currently or next on-call group.\n - end (integer) (required) — Shift end timestamp (Unix seconds).\n - group (object) (required) — Oncall group definition within a rotation layer.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name.\n - members (array) (required) — Members of this group.\n - person_ids (array) (required) — Person IDs in this slot.\n - role_id (integer) (required) — Oncall role ID.\n - name (string) (required) — Legacy group name.\n - start (integer) (required) — Group start timestamp (Unix seconds).\n - index (integer) (required) — Index inside the rotation.\n - start (integer) (required) — Shift start timestamp (Unix seconds).\n - update_at (integer) (required) — Update timestamp (Unix seconds).\n - weight (integer) (required) — Layer weight the shift comes from.\n - description (any) (required) — Schedule description. null when returned from /schedule/preview.\n - disabled (any) (required) — Disabled flag (0 = enabled, 1 = disabled). Deprecated. null when returned from /schedule/preview.\n - end (integer) — Window end (Unix seconds).\n - field (string) — Field name used by the legacy update-field endpoint.\n - final_schedule (object) (required) — Computed schedule for a single layer.\n - layer_name (string) (required) — Layer display name.\n - mode (integer) (required) — Layer mode: 0 = common rotation, 1 = override.\n - name (string) (required) — Layer internal name.\n - schedules (array) (required) — Computed shifts.\n - end (integer) (required) — Shift end timestamp (Unix seconds).\n - group (object) (required) — Oncall group definition within a rotation layer.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name.\n - members (array) (required) — Members of this group.\n - name (string) (required) — Legacy group name.\n - start (integer) (required) — Group start timestamp (Unix seconds).\n - index (integer) (required) — Index inside the rotation.\n - start (integer) (required) — Shift start timestamp (Unix seconds).\n - group_id (any) (required) — Legacy team/group ID. null when returned from /schedule/preview.\n - id (any) (required) — Schedule ID. null when returned from /schedule/preview.\n - layer_schedules (array) (required) — Alias of schedule_layers returned for compatibility.\n - layer_name (string) (required) — Layer display name.\n - mode (integer) (required) — Layer mode: 0 = common rotation, 1 = override.\n - name (string) (required) — Layer internal name.\n - schedules (array) (required) — Computed shifts.\n - end (integer) (required) — Shift end timestamp (Unix seconds).\n - group (object) (required) — Oncall group definition within a rotation layer.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name.\n - members (array) (required) — Members of this group.\n - name (string) (required) — Legacy group name.\n - start (integer) (required) — Group start timestamp (Unix seconds).\n - index (integer) (required) — Index inside the rotation.\n - start (integer) (required) — Shift start timestamp (Unix seconds).\n - layers (array) (required) — Rotation layers defined on the schedule.\n - account_id (integer) (required) — Account ID.\n - create_at (integer) (required) — Creation timestamp (Unix seconds).\n - create_by (integer) (required) — Creator person ID.\n - day_mask (object) (required) — Day-of-week mask for a rotation layer.\n - repeat (array) — Weekday numbers (0 = Sunday) included in the rotation.\n - enable_time (integer) (required) — When the layer becomes effective (Unix seconds).\n - expire_time (integer) (required) — When the layer expires (Unix seconds, 0 means never).\n - fair_rotation (boolean) (required) — Whether fair rotation is enabled.\n - groups (array) (required) — Oncall groups participating in the rotation.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name.\n - members (array) (required) — Members of this group.\n - person_ids (array) (required) — Person IDs in this slot.\n - role_id (integer) (required) — Oncall role ID.\n - name (string) (required) — Legacy group name.\n - start (integer) (required) — Group start timestamp (Unix seconds).\n - handoff_time (integer) (required) — Handoff time inside the rotation cycle (seconds).\n - hidden (integer) (required) — Whether the layer is hidden in the UI (0 = no, 1 = yes).\n - layer_end (any) — Layer end timestamp (Unix seconds). null means open-ended.\n - layer_name (string) — User-facing layer name.\n - layer_start (integer) — Layer start timestamp (Unix seconds).\n - mask_continuous_enabled (boolean) (required) — Whether continuous masking is enabled.\n - mode (integer) (required) — Layer mode: 0 = common rotation, 1 = override.\n - name (string) (required) — Layer internal name.\n - restrict_end (integer) (required) — Legacy end offset inside the restriction window (seconds).\n - restrict_mode (integer) (required) — Restriction mode: 0 = none, 1 = day, 2 = week.\n - restrict_periods (array) (required) — Restriction windows inside each rotation cycle.\n - restrict_end (integer) (required) — End offset inside the rotation cycle.\n - restrict_start (integer) (required) — Start offset inside the rotation cycle.\n - restrict_start (integer) (required) — Legacy start offset inside the restriction window (seconds).\n - rotation_duration (integer) (required) — Rotation duration in seconds.\n - rotation_unit (string) (required) — Rotation unit. [hour, day, week, month]\n - rotation_value (integer) (required) — Rotation quantity (number of rotation_unit per cycle).\n - schedule_id (integer) (required) — Parent schedule ID.\n - update_at (integer) (required) — Last update timestamp (Unix seconds).\n - update_by (integer) (required) — Last updater person ID.\n - weight (integer) (required) — Layer weight for ordering.\n - name (any) (required) — Schedule name (legacy field; mirrors schedule_name). null when returned from /schedule/preview.\n - next_oncall (object) (required) — Snapshot of the currently or next on-call group.\n - end (integer) (required) — Shift end timestamp (Unix seconds).\n - group (object) (required) — Oncall group definition within a rotation layer.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name.\n - members (array) (required) — Members of this group.\n - person_ids (array) (required) — Person IDs in this slot.\n - role_id (integer) (required) — Oncall role ID.\n - name (string) (required) — Legacy group name.\n - start (integer) (required) — Group start timestamp (Unix seconds).\n - index (integer) (required) — Index inside the rotation.\n - start (integer) (required) — Shift start timestamp (Unix seconds).\n - update_at (integer) (required) — Update timestamp (Unix seconds).\n - weight (integer) (required) — Layer weight the shift comes from.\n - notify (object) (required) — Notification configuration attached to a schedule.\n - advance_in_time (integer) — Advance notification lead time (seconds).\n - by (object) (required) — Per-recipient notification preference.\n - follow_preference (boolean) (required) — Whether to follow each responder's personal notification preference.\n - personal_channels (array) (required) — Personal notification channel keys.\n - fixed_time (object) (required) — Fixed-time notification config.\n - cycle (string) (required) — Notification cycle.\n - start (string) (required) — Notification start time within the cycle.\n - im (object) — Legacy IM-type to token map.\n - webhooks (array) (required) — IM webhook notification channels.\n - settings (object) (required) — Settings for an IM webhook notification channel.\n - alias (string) (required) — Channel alias.\n - chat_ids (array) (required) — Chat IDs.\n - data_source_id (integer) (required) — Data source ID.\n - sign_secret (string) (required) — Signature secret.\n - token (string) (required) — Webhook token.\n - verify_token (string) (required) — Verification token.\n - type (string) (required) — IM provider type (for example feishu_app, dingtalk_app, wecom_app, teams_app, slack_app).\n - schedule_id (integer) (required) — Schedule ID.\n - schedule_layers (array) (required) — Computed layers for the requested window.\n - layer_name (string) (required) — Layer display name.\n - mode (integer) (required) — Layer mode: 0 = common rotation, 1 = override.\n - name (string) (required) — Layer internal name.\n - schedules (array) (required) — Computed shifts.\n - end (integer) (required) — Shift end timestamp (Unix seconds).\n - group (object) (required) — Oncall group definition within a rotation layer.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name.\n - members (array) (required) — Members of this group.\n - name (string) (required) — Legacy group name.\n - start (integer) (required) — Group start timestamp (Unix seconds).\n - index (integer) (required) — Index inside the rotation.\n - start (integer) (required) — Shift start timestamp (Unix seconds).\n - schedule_name (any) (required) — Schedule display name. null when returned from /schedule/preview.\n - start (integer) — Window start (Unix seconds).\n - status (any) (required) — Legacy status flag. Deprecated. null when returned from /schedule/preview.\n - team_id (any) (required) — Owning team ID. null when returned from /schedule/preview.\n - update_at (integer) (required) — Last update timestamp (Unix seconds).\n - update_by (integer) (required) — Last updater person ID.\n", "Schedules.Self": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) (required) — Account ID.\n - create_at (integer) (required) — Creation timestamp (Unix seconds).\n - create_by (integer) (required) — Creator person ID.\n - cur_oncall (object) (required) — Snapshot of the currently or next on-call group.\n - end (integer) (required) — Shift end timestamp (Unix seconds).\n - group (object) (required) — Oncall group definition within a rotation layer.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name.\n - members (array) (required) — Members of this group.\n - name (string) (required) — Legacy group name.\n - start (integer) (required) — Group start timestamp (Unix seconds).\n - index (integer) (required) — Index inside the rotation.\n - start (integer) (required) — Shift start timestamp (Unix seconds).\n - update_at (integer) (required) — Update timestamp (Unix seconds).\n - weight (integer) (required) — Layer weight the shift comes from.\n - description (any) (required) — Schedule description. null when returned from /schedule/preview.\n - disabled (any) (required) — Disabled flag (0 = enabled, 1 = disabled). Deprecated. null when returned from /schedule/preview.\n - end (integer) — Window end (Unix seconds).\n - field (string) — Field name used by the legacy update-field endpoint.\n - final_schedule (object) (required) — Computed schedule for a single layer.\n - layer_name (string) (required) — Layer display name.\n - mode (integer) (required) — Layer mode: 0 = common rotation, 1 = override.\n - name (string) (required) — Layer internal name.\n - schedules (array) (required) — Computed shifts.\n - end (integer) (required) — Shift end timestamp (Unix seconds).\n - group (object) (required) — Oncall group definition within a rotation layer.\n - index (integer) (required) — Index inside the rotation.\n - start (integer) (required) — Shift start timestamp (Unix seconds).\n - group_id (any) (required) — Legacy team/group ID. null when returned from /schedule/preview.\n - id (any) (required) — Schedule ID. null when returned from /schedule/preview.\n - layer_schedules (array) (required) — Alias of schedule_layers returned for compatibility.\n - layer_name (string) (required) — Layer display name.\n - mode (integer) (required) — Layer mode: 0 = common rotation, 1 = override.\n - name (string) (required) — Layer internal name.\n - schedules (array) (required) — Computed shifts.\n - end (integer) (required) — Shift end timestamp (Unix seconds).\n - group (object) (required) — Oncall group definition within a rotation layer.\n - index (integer) (required) — Index inside the rotation.\n - start (integer) (required) — Shift start timestamp (Unix seconds).\n - layers (array) (required) — Rotation layers defined on the schedule.\n - account_id (integer) (required) — Account ID.\n - create_at (integer) (required) — Creation timestamp (Unix seconds).\n - create_by (integer) (required) — Creator person ID.\n - day_mask (object) (required) — Day-of-week mask for a rotation layer.\n - repeat (array) — Weekday numbers (0 = Sunday) included in the rotation.\n - enable_time (integer) (required) — When the layer becomes effective (Unix seconds).\n - expire_time (integer) (required) — When the layer expires (Unix seconds, 0 means never).\n - fair_rotation (boolean) (required) — Whether fair rotation is enabled.\n - groups (array) (required) — Oncall groups participating in the rotation.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name.\n - members (array) (required) — Members of this group.\n - name (string) (required) — Legacy group name.\n - start (integer) (required) — Group start timestamp (Unix seconds).\n - handoff_time (integer) (required) — Handoff time inside the rotation cycle (seconds).\n - hidden (integer) (required) — Whether the layer is hidden in the UI (0 = no, 1 = yes).\n - layer_end (any) — Layer end timestamp (Unix seconds). null means open-ended.\n - layer_name (string) — User-facing layer name.\n - layer_start (integer) — Layer start timestamp (Unix seconds).\n - mask_continuous_enabled (boolean) (required) — Whether continuous masking is enabled.\n - mode (integer) (required) — Layer mode: 0 = common rotation, 1 = override.\n - name (string) (required) — Layer internal name.\n - restrict_end (integer) (required) — Legacy end offset inside the restriction window (seconds).\n - restrict_mode (integer) (required) — Restriction mode: 0 = none, 1 = day, 2 = week.\n - restrict_periods (array) (required) — Restriction windows inside each rotation cycle.\n - restrict_end (integer) (required) — End offset inside the rotation cycle.\n - restrict_start (integer) (required) — Start offset inside the rotation cycle.\n - restrict_start (integer) (required) — Legacy start offset inside the restriction window (seconds).\n - rotation_duration (integer) (required) — Rotation duration in seconds.\n - rotation_unit (string) (required) — Rotation unit. [hour, day, week, month]\n - rotation_value (integer) (required) — Rotation quantity (number of rotation_unit per cycle).\n - schedule_id (integer) (required) — Parent schedule ID.\n - update_at (integer) (required) — Last update timestamp (Unix seconds).\n - update_by (integer) (required) — Last updater person ID.\n - weight (integer) (required) — Layer weight for ordering.\n - name (any) (required) — Schedule name (legacy field; mirrors schedule_name). null when returned from /schedule/preview.\n - next_oncall (object) (required) — Snapshot of the currently or next on-call group.\n - end (integer) (required) — Shift end timestamp (Unix seconds).\n - group (object) (required) — Oncall group definition within a rotation layer.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name.\n - members (array) (required) — Members of this group.\n - name (string) (required) — Legacy group name.\n - start (integer) (required) — Group start timestamp (Unix seconds).\n - index (integer) (required) — Index inside the rotation.\n - start (integer) (required) — Shift start timestamp (Unix seconds).\n - update_at (integer) (required) — Update timestamp (Unix seconds).\n - weight (integer) (required) — Layer weight the shift comes from.\n - notify (object) (required) — Notification configuration attached to a schedule.\n - advance_in_time (integer) — Advance notification lead time (seconds).\n - by (object) (required) — Per-recipient notification preference.\n - follow_preference (boolean) (required) — Whether to follow each responder's personal notification preference.\n - personal_channels (array) (required) — Personal notification channel keys.\n - fixed_time (object) (required) — Fixed-time notification config.\n - cycle (string) (required) — Notification cycle.\n - start (string) (required) — Notification start time within the cycle.\n - im (object) — Legacy IM-type to token map.\n - webhooks (array) (required) — IM webhook notification channels.\n - settings (object) (required) — Settings for an IM webhook notification channel.\n - type (string) (required) — IM provider type (for example feishu_app, dingtalk_app, wecom_app, teams_app, slack_app).\n - schedule_id (integer) (required) — Schedule ID.\n - schedule_layers (array) (required) — Computed layers for the requested window.\n - layer_name (string) (required) — Layer display name.\n - mode (integer) (required) — Layer mode: 0 = common rotation, 1 = override.\n - name (string) (required) — Layer internal name.\n - schedules (array) (required) — Computed shifts.\n - end (integer) (required) — Shift end timestamp (Unix seconds).\n - group (object) (required) — Oncall group definition within a rotation layer.\n - index (integer) (required) — Index inside the rotation.\n - start (integer) (required) — Shift start timestamp (Unix seconds).\n - schedule_name (any) (required) — Schedule display name. null when returned from /schedule/preview.\n - start (integer) — Window start (Unix seconds).\n - status (any) (required) — Legacy status flag. Deprecated. null when returned from /schedule/preview.\n - team_id (any) (required) — Owning team ID. null when returned from /schedule/preview.\n - update_at (integer) (required) — Last update timestamp (Unix seconds).\n - update_by (integer) (required) — Last updater person ID.\n", - "Sessions.Info": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - events (array) — Recent events, ascending by (created_at, event_id).\n - actions (object) — ADK actions envelope (state deltas, transfers, escalation).\n - author (string) — Event author (e.g. user, the agent name).\n - branch (string) — ADK branch path for nested agents.\n - content (object) — ADK content envelope {role, parts:[...]}.\n - created_at (integer) — Unix timestamp in milliseconds when the event was written.\n - error_code (string) — Error code when the event represents a failure.\n - error_message (string) — Human-readable error message, when present.\n - event_id (string) — Event identifier.\n - invocation_id (string) — ADK invocation id grouping a turn.\n - partial (boolean) — True for a streaming partial chunk.\n - session_id (string) — Owning session id.\n - status (string) — Event status. [normal, compressed]\n - turn_complete (boolean) — True on the terminal event of a turn.\n - usage_metadata (object) — Per-turn token usage metadata.\n - has_more_older (boolean) — True when older events remain beyond this page.\n - search_after_ctx (string) — Opaque keyset cursor; pass back as search_after_ctx to fetch the next older page. Omitted when has_more_older is false.\n - session (object) — One agent session row.\n - app_name (string) — Agent app that owns the session.\n - archived_at (integer) — Unix timestamp in milliseconds when archived; 0 means not archived.\n - bound_environment (object) — The runner or cloud sandbox the session is bound to. Null until the first message.\n - id (string) — Environment identifier.\n - kind (string) — Environment kind (e.g. runner, sandbox).\n - name (string) — Human-readable environment name.\n - status (string) — Binding status.\n - can_manage (boolean) — True when the caller may rename/archive/delete the session.\n - context_resolved (object) — Snapshot of the three-tier knowledge-pack resolution for this session.\n - account_pack_id (string) — Resolved account-scoped pack id.\n - incident_id (string) — Bound incident id, when war-room originated.\n - resolved_at_ms (integer) — Unix timestamp in milliseconds when the packs were resolved.\n - team_pack_id (string) — Resolved team-scoped pack id.\n - versions (object) — Per-pack resolved version map.\n - context_window (integer) — The bound model's max context size in tokens. 0 means unknown.\n - created_at (integer) — Unix timestamp in milliseconds when the session was created.\n - current_context_tokens (integer) — Size in tokens of the LLM context window as of the most recent turn. 0 means no turn has completed.\n - entry_kind (string) — Surface that created the session. [web, im, api, scheduled, subagent]\n - has_unread (boolean) — True when there is assistant output the caller has not yet viewed.\n - incognito (boolean) — True for incognito (non-persisted-memory) sessions.\n - is_mine (boolean) — True when the caller created this session.\n - is_running (boolean) — True when an agent turn is currently in flight for this session.\n - last_event_at (integer) — Unix timestamp in milliseconds of the most recent assistant-side event.\n - parent_session_id (string) — Parent session id for subagent (child) sessions; empty otherwise.\n - person_id (string) — Creator person id.\n - pinned_at (integer) — Caller's per-user pin timestamp in milliseconds; 0 means not pinned.\n - session_id (string) — Session identifier.\n - session_name (string) — Session title; may be empty for untitled sessions.\n - state (object) — Raw session-state bag (session-scoped keys). Omitted when empty.\n - status (string) — Lifecycle status. [enabled, deleted]\n - team_id (integer) — Owning team id; 0 means no team is bound. Immutable after create.\n - team_name (string) — Resolved team name; empty for unbound rows or deleted teams.\n - template_staging_round_id (string) — Current save→validate round id (template-assistant only); empty otherwise.\n - token_usage (object) — Cumulative session-level token rollup across all turns. The account-billing source of truth.\n - cached_tokens (integer) — Portion of input_tokens served from the prompt cache.\n - input_tokens (integer) — Total prompt (input) tokens, including the cached portion.\n - output_tokens (integer) — Total generated (output) tokens.\n - reasoning_tokens (integer) — Total reasoning/thinking tokens.\n - updated_at (integer) — Unix timestamp in milliseconds of the last session update.\n", - "Sessions.List": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - sessions (array) — The page of sessions.\n - app_name (string) — Agent app that owns the session.\n - archived_at (integer) — Unix timestamp in milliseconds when archived; 0 means not archived.\n - bound_environment (object) — The runner or cloud sandbox the session is bound to. Null until the first message.\n - id (string) — Environment identifier.\n - kind (string) — Environment kind (e.g. runner, sandbox).\n - name (string) — Human-readable environment name.\n - status (string) — Binding status.\n - can_manage (boolean) — True when the caller may rename/archive/delete the session.\n - context_resolved (object) — Snapshot of the three-tier knowledge-pack resolution for this session.\n - account_pack_id (string) — Resolved account-scoped pack id.\n - incident_id (string) — Bound incident id, when war-room originated.\n - resolved_at_ms (integer) — Unix timestamp in milliseconds when the packs were resolved.\n - team_pack_id (string) — Resolved team-scoped pack id.\n - versions (object) — Per-pack resolved version map.\n - context_window (integer) — The bound model's max context size in tokens. 0 means unknown.\n - created_at (integer) — Unix timestamp in milliseconds when the session was created.\n - current_context_tokens (integer) — Size in tokens of the LLM context window as of the most recent turn. 0 means no turn has completed.\n - entry_kind (string) — Surface that created the session. [web, im, api, scheduled, subagent]\n - has_unread (boolean) — True when there is assistant output the caller has not yet viewed.\n - incognito (boolean) — True for incognito (non-persisted-memory) sessions.\n - is_mine (boolean) — True when the caller created this session.\n - is_running (boolean) — True when an agent turn is currently in flight for this session.\n - last_event_at (integer) — Unix timestamp in milliseconds of the most recent assistant-side event.\n - parent_session_id (string) — Parent session id for subagent (child) sessions; empty otherwise.\n - person_id (string) — Creator person id.\n - pinned_at (integer) — Caller's per-user pin timestamp in milliseconds; 0 means not pinned.\n - session_id (string) — Session identifier.\n - session_name (string) — Session title; may be empty for untitled sessions.\n - state (object) — Raw session-state bag (session-scoped keys). Omitted when empty.\n - status (string) — Lifecycle status. [enabled, deleted]\n - team_id (integer) — Owning team id; 0 means no team is bound. Immutable after create.\n - team_name (string) — Resolved team name; empty for unbound rows or deleted teams.\n - template_staging_round_id (string) — Current save→validate round id (template-assistant only); empty otherwise.\n - token_usage (object) — Cumulative session-level token rollup across all turns. The account-billing source of truth.\n - cached_tokens (integer) — Portion of input_tokens served from the prompt cache.\n - input_tokens (integer) — Total prompt (input) tokens, including the cached portion.\n - output_tokens (integer) — Total generated (output) tokens.\n - reasoning_tokens (integer) — Total reasoning/thinking tokens.\n - updated_at (integer) — Unix timestamp in milliseconds of the last session update.\n - total (integer) — Total number of sessions matching the filter (ignoring pagination).\n", - "Skills.ReadGet": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Owning account.\n - author (string) — Author declared in the skill frontmatter.\n - can_edit (boolean) (required) — Whether the calling member may edit or delete this resource.\n - checksum (string) — SHA-256 checksum of the skill's zip package.\n - content (string) — Full SKILL.md body; omitted in list responses.\n - created (boolean) — Install response only: true for a fresh install, false for an in-place upsert.\n - created_at (integer) (required) — Creation time as a Unix timestamp in milliseconds.\n - created_by (integer) (required) — Member who created this resource.\n - description (string) (required) — What the skill does and when the agent should use it.\n - is_modified (boolean) (required) — A marketplace-sourced skill has been edited locally; auto-update skips it.\n - license (string) — License declared in the skill frontmatter.\n - s3_key (string) — Object-storage key of the skill's zip package.\n - skill_id (string) (required) — Unique identifier of the skill.\n - skill_name (string) (required) — Name of the skill, parsed from its SKILL.md frontmatter.\n - source_template_name (string) — Marketplace template this skill was installed from, if any.\n - source_template_version (string) — Marketplace template version captured at install time.\n - status (string) (required) — Whether the skill is active and loadable by agents. [enabled, disabled]\n - tags (array) — Tags declared in the skill frontmatter.\n - team_id (integer) (required) — Owning team; 0 means account scope.\n - tools (array) — Tools the skill requires, declared in its frontmatter.\n - update_available (boolean) (required) — A newer marketplace template version exists for this skill.\n - updated_at (integer) (required) — Last-update time as a Unix timestamp in milliseconds.\n - version (string) — Skill version string from its frontmatter.\n", - "Skills.ReadList": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - skills (array) (required) — Skills on the current page.\n - account_id (integer) (required) — Owning account.\n - author (string) — Author declared in the skill frontmatter.\n - can_edit (boolean) (required) — Whether the calling member may edit or delete this resource.\n - checksum (string) — SHA-256 checksum of the skill's zip package.\n - content (string) — Full SKILL.md body; omitted in list responses.\n - created (boolean) — Install response only: true for a fresh install, false for an in-place upsert.\n - created_at (integer) (required) — Creation time as a Unix timestamp in milliseconds.\n - created_by (integer) (required) — Member who created this resource.\n - description (string) (required) — What the skill does and when the agent should use it.\n - is_modified (boolean) (required) — A marketplace-sourced skill has been edited locally; auto-update skips it.\n - license (string) — License declared in the skill frontmatter.\n - s3_key (string) — Object-storage key of the skill's zip package.\n - skill_id (string) (required) — Unique identifier of the skill.\n - skill_name (string) (required) — Name of the skill, parsed from its SKILL.md frontmatter.\n - source_template_name (string) — Marketplace template this skill was installed from, if any.\n - source_template_version (string) — Marketplace template version captured at install time.\n - status (string) (required) — Whether the skill is active and loadable by agents. [enabled, disabled]\n - tags (array) — Tags declared in the skill frontmatter.\n - team_id (integer) (required) — Owning team; 0 means account scope.\n - tools (array) — Tools the skill requires, declared in its frontmatter.\n - update_available (boolean) (required) — A newer marketplace template version exists for this skill.\n - updated_at (integer) (required) — Last-update time as a Unix timestamp in milliseconds.\n - version (string) — Skill version string from its frontmatter.\n - total (integer) (required) — Total number of skills matching the filters.\n", - "Skills.WriteUpdate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Owning account.\n - author (string) — Author declared in the skill frontmatter.\n - can_edit (boolean) (required) — Whether the calling member may edit or delete this resource.\n - checksum (string) — SHA-256 checksum of the skill's zip package.\n - content (string) — Full SKILL.md body; omitted in list responses.\n - created (boolean) — Install response only: true for a fresh install, false for an in-place upsert.\n - created_at (integer) (required) — Creation time as a Unix timestamp in milliseconds.\n - created_by (integer) (required) — Member who created this resource.\n - description (string) (required) — What the skill does and when the agent should use it.\n - is_modified (boolean) (required) — A marketplace-sourced skill has been edited locally; auto-update skips it.\n - license (string) — License declared in the skill frontmatter.\n - s3_key (string) — Object-storage key of the skill's zip package.\n - skill_id (string) (required) — Unique identifier of the skill.\n - skill_name (string) (required) — Name of the skill, parsed from its SKILL.md frontmatter.\n - source_template_name (string) — Marketplace template this skill was installed from, if any.\n - source_template_version (string) — Marketplace template version captured at install time.\n - status (string) (required) — Whether the skill is active and loadable by agents. [enabled, disabled]\n - tags (array) — Tags declared in the skill frontmatter.\n - team_id (integer) (required) — Owning team; 0 means account scope.\n - tools (array) — Tools the skill requires, declared in its frontmatter.\n - update_available (boolean) (required) — A newer marketplace template version exists for this skill.\n - updated_at (integer) (required) — Last-update time as a Unix timestamp in milliseconds.\n - version (string) — Skill version string from its frontmatter.\n", - "Skills.WriteUpload": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Owning account.\n - author (string) — Author declared in the skill frontmatter.\n - can_edit (boolean) (required) — Whether the calling member may edit or delete this resource.\n - checksum (string) — SHA-256 checksum of the skill's zip package.\n - content (string) — Full SKILL.md body; omitted in list responses.\n - created (boolean) — Install response only: true for a fresh install, false for an in-place upsert.\n - created_at (integer) (required) — Creation time as a Unix timestamp in milliseconds.\n - created_by (integer) (required) — Member who created this resource.\n - description (string) (required) — What the skill does and when the agent should use it.\n - is_modified (boolean) (required) — A marketplace-sourced skill has been edited locally; auto-update skips it.\n - license (string) — License declared in the skill frontmatter.\n - s3_key (string) — Object-storage key of the skill's zip package.\n - skill_id (string) (required) — Unique identifier of the skill.\n - skill_name (string) (required) — Name of the skill, parsed from its SKILL.md frontmatter.\n - source_template_name (string) — Marketplace template this skill was installed from, if any.\n - source_template_version (string) — Marketplace template version captured at install time.\n - status (string) (required) — Whether the skill is active and loadable by agents. [enabled, disabled]\n - tags (array) — Tags declared in the skill frontmatter.\n - team_id (integer) (required) — Owning team; 0 means account scope.\n - tools (array) — Tools the skill requires, declared in its frontmatter.\n - update_available (boolean) (required) — A newer marketplace template version exists for this skill.\n - updated_at (integer) (required) — Last-update time as a Unix timestamp in milliseconds.\n - version (string) — Skill version string from its frontmatter.\n", + "Sessions.ReadInfo": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - events (array) — Recent events, ascending by (created_at, event_id).\n - actions (object) — ADK actions envelope (state deltas, transfers, escalation).\n - author (string) — Event author (e.g. user, the agent name).\n - branch (string) — ADK branch path for nested agents.\n - content (object) — ADK content envelope {role, parts:[...]}.\n - created_at (integer) — Unix timestamp in milliseconds when the event was written.\n - error_code (string) — Error code when the event represents a failure.\n - error_message (string) — Human-readable error message, when present.\n - event_id (string) — Event identifier.\n - invocation_id (string) — ADK invocation id grouping a turn.\n - partial (boolean) — True for a streaming partial chunk.\n - session_id (string) — Owning session id.\n - status (string) — Event status. [normal, compressed]\n - turn_complete (boolean) — True on the terminal event of a turn.\n - usage_metadata (object) — Per-turn token usage metadata.\n - has_more_older (boolean) — True when older events remain beyond this page.\n - search_after_ctx (string) — Opaque keyset cursor; pass back as search_after_ctx to fetch the next older page. Omitted when has_more_older is false.\n - session (object) — One agent session row.\n - app_name (string) — Agent app that owns the session.\n - archived_at (integer) — Unix timestamp in milliseconds when archived; 0 means not archived.\n - bound_environment (object) — The runner or cloud sandbox the session is bound to. Null until the first message.\n - id (string) — Environment identifier.\n - kind (string) — Environment kind (e.g. runner, sandbox).\n - name (string) — Human-readable environment name.\n - status (string) — Binding status.\n - can_manage (boolean) — True when the caller may rename/archive/delete the session.\n - context_resolved (object) — Snapshot of the three-tier knowledge-pack resolution for this session.\n - account_pack_id (string) — Resolved account-scoped pack id.\n - incident_id (string) — Bound incident id, when war-room originated.\n - resolved_at_ms (integer) — Unix timestamp in milliseconds when the packs were resolved.\n - team_pack_id (string) — Resolved team-scoped pack id.\n - versions (object) — Per-pack resolved version map.\n - context_window (integer) — The bound model's max context size in tokens. 0 means unknown.\n - created_at (integer) — Unix timestamp in milliseconds when the session was created.\n - current_context_tokens (integer) — Size in tokens of the LLM context window as of the most recent turn. 0 means no turn has completed.\n - entry_kind (string) — Surface that created the session. [web, im, api, scheduled, subagent]\n - has_unread (boolean) — True when there is assistant output the caller has not yet viewed.\n - incognito (boolean) — True for incognito (non-persisted-memory) sessions.\n - is_mine (boolean) — True when the caller created this session.\n - is_running (boolean) — True when an agent turn is currently in flight for this session.\n - last_event_at (integer) — Unix timestamp in milliseconds of the most recent assistant-side event.\n - parent_session_id (string) — Parent session id for subagent (child) sessions; empty otherwise.\n - person_id (string) — Creator person id.\n - pinned_at (integer) — Caller's per-user pin timestamp in milliseconds; 0 means not pinned.\n - session_id (string) — Session identifier.\n - session_name (string) — Session title; may be empty for untitled sessions.\n - state (object) — Raw session-state bag (session-scoped keys). Omitted when empty.\n - status (string) — Lifecycle status. [enabled, deleted]\n - team_id (integer) — Owning team id; 0 means no team is bound. Immutable after create.\n - team_name (string) — Resolved team name; empty for unbound rows or deleted teams.\n - template_staging_round_id (string) — Current save→validate round id (template-assistant only); empty otherwise.\n - token_usage (object) — Cumulative session-level token rollup across all turns. The account-billing source of truth.\n - cached_tokens (integer) — Portion of input_tokens served from the prompt cache.\n - input_tokens (integer) — Total prompt (input) tokens, including the cached portion.\n - output_tokens (integer) — Total generated (output) tokens.\n - reasoning_tokens (integer) — Total reasoning/thinking tokens.\n - updated_at (integer) — Unix timestamp in milliseconds of the last session update.\n", + "Sessions.ReadList": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - sessions (array) — The page of sessions.\n - app_name (string) — Agent app that owns the session.\n - archived_at (integer) — Unix timestamp in milliseconds when archived; 0 means not archived.\n - bound_environment (object) — The runner or cloud sandbox the session is bound to. Null until the first message.\n - id (string) — Environment identifier.\n - kind (string) — Environment kind (e.g. runner, sandbox).\n - name (string) — Human-readable environment name.\n - status (string) — Binding status.\n - can_manage (boolean) — True when the caller may rename/archive/delete the session.\n - context_resolved (object) — Snapshot of the three-tier knowledge-pack resolution for this session.\n - account_pack_id (string) — Resolved account-scoped pack id.\n - incident_id (string) — Bound incident id, when war-room originated.\n - resolved_at_ms (integer) — Unix timestamp in milliseconds when the packs were resolved.\n - team_pack_id (string) — Resolved team-scoped pack id.\n - versions (object) — Per-pack resolved version map.\n - context_window (integer) — The bound model's max context size in tokens. 0 means unknown.\n - created_at (integer) — Unix timestamp in milliseconds when the session was created.\n - current_context_tokens (integer) — Size in tokens of the LLM context window as of the most recent turn. 0 means no turn has completed.\n - entry_kind (string) — Surface that created the session. [web, im, api, scheduled, subagent]\n - has_unread (boolean) — True when there is assistant output the caller has not yet viewed.\n - incognito (boolean) — True for incognito (non-persisted-memory) sessions.\n - is_mine (boolean) — True when the caller created this session.\n - is_running (boolean) — True when an agent turn is currently in flight for this session.\n - last_event_at (integer) — Unix timestamp in milliseconds of the most recent assistant-side event.\n - parent_session_id (string) — Parent session id for subagent (child) sessions; empty otherwise.\n - person_id (string) — Creator person id.\n - pinned_at (integer) — Caller's per-user pin timestamp in milliseconds; 0 means not pinned.\n - session_id (string) — Session identifier.\n - session_name (string) — Session title; may be empty for untitled sessions.\n - state (object) — Raw session-state bag (session-scoped keys). Omitted when empty.\n - status (string) — Lifecycle status. [enabled, deleted]\n - team_id (integer) — Owning team id; 0 means no team is bound. Immutable after create.\n - team_name (string) — Resolved team name; empty for unbound rows or deleted teams.\n - template_staging_round_id (string) — Current save→validate round id (template-assistant only); empty otherwise.\n - token_usage (object) — Cumulative session-level token rollup across all turns. The account-billing source of truth.\n - cached_tokens (integer) — Portion of input_tokens served from the prompt cache.\n - input_tokens (integer) — Total prompt (input) tokens, including the cached portion.\n - output_tokens (integer) — Total generated (output) tokens.\n - reasoning_tokens (integer) — Total reasoning/thinking tokens.\n - updated_at (integer) — Unix timestamp in milliseconds of the last session update.\n - total (integer) — Total number of sessions matching the filter (ignoring pagination).\n", + "Skills.ReadGet": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Owning account ID.\n - author (string) — Skill author.\n - can_edit (boolean) (required) — Whether the caller may edit this skill.\n - checksum (string) — SHA-256 checksum of the skill zip.\n - content (string) — Full SKILL.md content. Omitted in list responses.\n - created (boolean) — Set only on install-from-session responses: true = fresh install, false = in-place update.\n - created_at (integer) (required) — Creation time. Unix timestamp in milliseconds.\n - created_by (integer) (required) — Member ID that created the skill.\n - description (string) (required) — Human-readable description from the SKILL.md frontmatter.\n - is_modified (boolean) (required) — True when a marketplace-sourced skill was edited locally (auto-update skips it).\n - license (string) — Skill license.\n - s3_key (string) — Object-storage key of the skill zip.\n - skill_id (string) (required) — Unique skill ID (prefix `skill_`).\n - skill_name (string) (required) — Skill name, unique within the account.\n - source_template_name (string) — Marketplace template this skill was installed from; empty for user-authored.\n - source_template_version (string) — Template version at install time.\n - status (string) (required) — Skill status. [enabled, disabled]\n - tags (array) — Tags parsed from the frontmatter.\n - team_id (integer) (required) — Team scope: 0 = account-wide; >0 = the owning team.\n - tools (array) — Required tools (builtin or `mcp:server/tool`).\n - update_available (boolean) (required) — True when the marketplace has a newer template version.\n - updated_at (integer) (required) — Last update time. Unix timestamp in milliseconds.\n - version (string) — Skill version from the frontmatter.\n", + "Skills.ReadList": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - skills (array) (required) — Skills on this page.\n - account_id (integer) (required) — Owning account ID.\n - author (string) — Skill author.\n - can_edit (boolean) (required) — Whether the caller may edit this skill.\n - checksum (string) — SHA-256 checksum of the skill zip.\n - content (string) — Full SKILL.md content. Omitted in list responses.\n - created (boolean) — Set only on install-from-session responses: true = fresh install, false = in-place update.\n - created_at (integer) (required) — Creation time. Unix timestamp in milliseconds.\n - created_by (integer) (required) — Member ID that created the skill.\n - description (string) (required) — Human-readable description from the SKILL.md frontmatter.\n - is_modified (boolean) (required) — True when a marketplace-sourced skill was edited locally (auto-update skips it).\n - license (string) — Skill license.\n - s3_key (string) — Object-storage key of the skill zip.\n - skill_id (string) (required) — Unique skill ID (prefix `skill_`).\n - skill_name (string) (required) — Skill name, unique within the account.\n - source_template_name (string) — Marketplace template this skill was installed from; empty for user-authored.\n - source_template_version (string) — Template version at install time.\n - status (string) (required) — Skill status. [enabled, disabled]\n - tags (array) — Tags parsed from the frontmatter.\n - team_id (integer) (required) — Team scope: 0 = account-wide; >0 = the owning team.\n - tools (array) — Required tools (builtin or `mcp:server/tool`).\n - update_available (boolean) (required) — True when the marketplace has a newer template version.\n - updated_at (integer) (required) — Last update time. Unix timestamp in milliseconds.\n - version (string) — Skill version from the frontmatter.\n - total (integer) (required) — Total number of matching skills.\n", + "Skills.WriteUpdate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Owning account ID.\n - author (string) — Skill author.\n - can_edit (boolean) (required) — Whether the caller may edit this skill.\n - checksum (string) — SHA-256 checksum of the skill zip.\n - content (string) — Full SKILL.md content. Omitted in list responses.\n - created (boolean) — Set only on install-from-session responses: true = fresh install, false = in-place update.\n - created_at (integer) (required) — Creation time. Unix timestamp in milliseconds.\n - created_by (integer) (required) — Member ID that created the skill.\n - description (string) (required) — Human-readable description from the SKILL.md frontmatter.\n - is_modified (boolean) (required) — True when a marketplace-sourced skill was edited locally (auto-update skips it).\n - license (string) — Skill license.\n - s3_key (string) — Object-storage key of the skill zip.\n - skill_id (string) (required) — Unique skill ID (prefix `skill_`).\n - skill_name (string) (required) — Skill name, unique within the account.\n - source_template_name (string) — Marketplace template this skill was installed from; empty for user-authored.\n - source_template_version (string) — Template version at install time.\n - status (string) (required) — Skill status. [enabled, disabled]\n - tags (array) — Tags parsed from the frontmatter.\n - team_id (integer) (required) — Team scope: 0 = account-wide; >0 = the owning team.\n - tools (array) — Required tools (builtin or `mcp:server/tool`).\n - update_available (boolean) (required) — True when the marketplace has a newer template version.\n - updated_at (integer) (required) — Last update time. Unix timestamp in milliseconds.\n - version (string) — Skill version from the frontmatter.\n", + "Skills.WriteUpload": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Owning account ID.\n - author (string) — Skill author.\n - can_edit (boolean) (required) — Whether the caller may edit this skill.\n - checksum (string) — SHA-256 checksum of the skill zip.\n - content (string) — Full SKILL.md content. Omitted in list responses.\n - created (boolean) — Set only on install-from-session responses: true = fresh install, false = in-place update.\n - created_at (integer) (required) — Creation time. Unix timestamp in milliseconds.\n - created_by (integer) (required) — Member ID that created the skill.\n - description (string) (required) — Human-readable description from the SKILL.md frontmatter.\n - is_modified (boolean) (required) — True when a marketplace-sourced skill was edited locally (auto-update skips it).\n - license (string) — Skill license.\n - s3_key (string) — Object-storage key of the skill zip.\n - skill_id (string) (required) — Unique skill ID (prefix `skill_`).\n - skill_name (string) (required) — Skill name, unique within the account.\n - source_template_name (string) — Marketplace template this skill was installed from; empty for user-authored.\n - source_template_version (string) — Template version at install time.\n - status (string) (required) — Skill status. [enabled, disabled]\n - tags (array) — Tags parsed from the frontmatter.\n - team_id (integer) (required) — Team scope: 0 = account-wide; >0 = the owning team.\n - tools (array) — Required tools (builtin or `mcp:server/tool`).\n - update_available (boolean) (required) — True when the marketplace has a newer template version.\n - updated_at (integer) (required) — Last update time. Unix timestamp in milliseconds.\n - version (string) — Skill version from the frontmatter.\n", "Sourcemaps.List": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - created_at (integer) — Upload timestamp, Unix epoch seconds.\n - git_commit_sha (string) — Git commit SHA for this build.\n - git_repository_url (string) — Git repository URL associated with this build.\n - key (string) — Storage key uniquely identifying this sourcemap file.\n - metadata (object) — Free-form key-value metadata attached to the sourcemap. Shape depends on the upload client; common keys include `git_repository_url` and `git_commit_sha` (though those are also promoted to top-level fields).\n - service (string) — Application or service name.\n - size (integer) — File size in bytes.\n - type (string) — Platform type: `browser`, `android`, or `ios`. [browser, android, ios]\n - updated_at (integer) — Last update timestamp, Unix epoch seconds.\n - version (string) — Application version string.\n", "StatusPages.ChangeActiveList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - affected_components (array) — Components currently affected by this event, with their resulting status.\n - available_since_seconds (integer) — Timestamp when the component was first available, in unix seconds.\n - component_id (string) — Component ID.\n - description (string) — Component description.\n - hide_all (boolean) — When true, the component is hidden entirely from summary endpoints.\n - hide_uptime (boolean) — When true, uptime data is hidden from summary responses.\n - name (string) (required) — Component display name.\n - order_id (integer) — Display order within its section.\n - section_id (string) — Parent section ID.\n - status (string) (required) — Current component status resulting from the event. [operational, degraded, partial_outage, full_outage, under_maintenance]\n - auto_update_by_schedule (boolean) — Maintenance only: whether the status advances automatically based on the scheduled window.\n - change_id (integer) (required) — Event ID.\n - close_at_seconds (integer) — Scheduled close time in unix seconds. Set for retrospective and maintenance events.\n - description (string) — Event description (Markdown).\n - is_retrospective (boolean) — Whether this event is a retrospective (historical) one.\n - linked_change_ids (array) — Linked event IDs (related incidents, deployments, etc.).\n - notify_subscribers (boolean) — Whether subscribers were notified about this event.\n - page_id (integer) — Parent status page ID.\n - responder_ids (array) — Member IDs responsible for this event.\n - start_at_seconds (integer) — Event start time in unix seconds.\n - status (string) — Current event status. Incident statuses: `investigating`/`identified`/`monitoring`/`resolved`. Maintenance statuses: `scheduled`/`ongoing`/`completed`. [investigating, identified, monitoring, resolved, scheduled, ongoing, completed]\n - title (string) (required) — Event title.\n - type (string) (required) — Event type. [incident, maintenance]\n - updates (array) — Timeline updates attached to this event, ordered by time.\n - at_seconds (integer) (required) — Update timestamp in unix seconds.\n - component_changes (array) — Component status transitions applied by this update.\n - component_id (string) (required) — Component ID.\n - component_name (string) — Component display name. Populated by the backend on read; ignored on write.\n - status (string) (required) — New component status. Incidents support `operational`/`degraded`/`partial_outage`/`full_outage`; maintenances support `operational`/`under_maintenance`. [operational, degraded, partial_outage, full_outage, under_maintenance]\n - description (string) — Update description (Markdown).\n - status (string) — Event status after this update. Omitted when the update does not change the overall status. [investigating, identified, monitoring, resolved, scheduled, ongoing, completed]\n - update_id (string) (required) — Update ID.\n", "StatusPages.ChangeCreate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - change_id (integer) (required) — Newly created event ID.\n - change_name (string) (required) — Event title (echoed from the request).\n", "StatusPages.ChangeInfo": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - affected_components (array) — Components currently affected by this event, with their resulting status.\n - available_since_seconds (integer) — Timestamp when the component was first available, in unix seconds.\n - component_id (string) — Component ID.\n - description (string) — Component description.\n - hide_all (boolean) — When true, the component is hidden entirely from summary endpoints.\n - hide_uptime (boolean) — When true, uptime data is hidden from summary responses.\n - name (string) (required) — Component display name.\n - order_id (integer) — Display order within its section.\n - section_id (string) — Parent section ID.\n - status (string) (required) — Current component status resulting from the event. [operational, degraded, partial_outage, full_outage, under_maintenance]\n - auto_update_by_schedule (boolean) — Maintenance only: whether the status advances automatically based on the scheduled window.\n - change_id (integer) (required) — Event ID.\n - close_at_seconds (integer) — Scheduled close time in unix seconds. Set for retrospective and maintenance events.\n - description (string) — Event description (Markdown).\n - is_retrospective (boolean) — Whether this event is a retrospective (historical) one.\n - linked_change_ids (array) — Linked event IDs (related incidents, deployments, etc.).\n - notify_subscribers (boolean) — Whether subscribers were notified about this event.\n - page_id (integer) — Parent status page ID.\n - responder_ids (array) — Member IDs responsible for this event.\n - start_at_seconds (integer) — Event start time in unix seconds.\n - status (string) — Current event status. Incident statuses: `investigating`/`identified`/`monitoring`/`resolved`. Maintenance statuses: `scheduled`/`ongoing`/`completed`. [investigating, identified, monitoring, resolved, scheduled, ongoing, completed]\n - title (string) (required) — Event title.\n - type (string) (required) — Event type. [incident, maintenance]\n - updates (array) — Timeline updates attached to this event, ordered by time.\n - at_seconds (integer) (required) — Update timestamp in unix seconds.\n - component_changes (array) — Component status transitions applied by this update.\n - component_id (string) (required) — Component ID.\n - component_name (string) — Component display name. Populated by the backend on read; ignored on write.\n - status (string) (required) — New component status. Incidents support `operational`/`degraded`/`partial_outage`/`full_outage`; maintenances support `operational`/`under_maintenance`. [operational, degraded, partial_outage, full_outage, under_maintenance]\n - description (string) — Update description (Markdown).\n - status (string) — Event status after this update. Omitted when the update does not change the overall status. [investigating, identified, monitoring, resolved, scheduled, ongoing, completed]\n - update_id (string) (required) — Update ID.\n", "StatusPages.ChangeList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - affected_components (array) — Components currently affected by this event, with their resulting status.\n - available_since_seconds (integer) — Timestamp when the component was first available, in unix seconds.\n - component_id (string) — Component ID.\n - description (string) — Component description.\n - hide_all (boolean) — When true, the component is hidden entirely from summary endpoints.\n - hide_uptime (boolean) — When true, uptime data is hidden from summary responses.\n - name (string) (required) — Component display name.\n - order_id (integer) — Display order within its section.\n - section_id (string) — Parent section ID.\n - status (string) (required) — Current component status resulting from the event. [operational, degraded, partial_outage, full_outage, under_maintenance]\n - auto_update_by_schedule (boolean) — Maintenance only: whether the status advances automatically based on the scheduled window.\n - change_id (integer) (required) — Event ID.\n - close_at_seconds (integer) — Scheduled close time in unix seconds. Set for retrospective and maintenance events.\n - description (string) — Event description (Markdown).\n - is_retrospective (boolean) — Whether this event is a retrospective (historical) one.\n - linked_change_ids (array) — Linked event IDs (related incidents, deployments, etc.).\n - notify_subscribers (boolean) — Whether subscribers were notified about this event.\n - page_id (integer) — Parent status page ID.\n - responder_ids (array) — Member IDs responsible for this event.\n - start_at_seconds (integer) — Event start time in unix seconds.\n - status (string) — Current event status. Incident statuses: `investigating`/`identified`/`monitoring`/`resolved`. Maintenance statuses: `scheduled`/`ongoing`/`completed`. [investigating, identified, monitoring, resolved, scheduled, ongoing, completed]\n - title (string) (required) — Event title.\n - type (string) (required) — Event type. [incident, maintenance]\n - updates (array) — Timeline updates attached to this event, ordered by time.\n - at_seconds (integer) (required) — Update timestamp in unix seconds.\n - component_changes (array) — Component status transitions applied by this update.\n - component_id (string) (required) — Component ID.\n - component_name (string) — Component display name. Populated by the backend on read; ignored on write.\n - status (string) (required) — New component status. Incidents support `operational`/`degraded`/`partial_outage`/`full_outage`; maintenances support `operational`/`under_maintenance`. [operational, degraded, partial_outage, full_outage, under_maintenance]\n - description (string) — Update description (Markdown).\n - status (string) — Event status after this update. Omitted when the update does not change the overall status. [investigating, identified, monitoring, resolved, scheduled, ongoing, completed]\n - update_id (string) (required) — Update ID.\n", "StatusPages.ChangeTimelineCreate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - update_id (string) (required) — Newly created update ID.\n", + "StatusPages.ComponentUpsert": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - component_ids (array) (required) — IDs of the created or updated components, in the same order as the request.\n", "StatusPages.MigrateEmailSubscribers": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - job_id (string) (required) — Migration job ID. Use this to poll status or request cancellation.\n", "StatusPages.MigrateStructure": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - job_id (string) (required) — Migration job ID. Use this to poll status or request cancellation.\n", "StatusPages.MigrationStatus": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Owner account ID.\n - created_at (integer) (required) — Job creation time, unix seconds.\n - error (string) — Terminal error message when `status` is `failed`.\n - job_id (string) (required) — Migration job ID.\n - phase (string) (required) — Current migration phase. [structure, history, subscribers]\n - progress (object) (required) — Progress counters for a migration job.\n - completed_steps (integer) (required) — Steps completed so far.\n - components_imported (integer) (required)\n - incidents_imported (integer) (required)\n - maintenances_imported (integer) (required)\n - sections_imported (integer) (required)\n - subscribers_imported (integer) (required)\n - subscribers_skipped (integer) (required) — Number of subscribers skipped (e.g. because they would create duplicates).\n - templates_imported (integer) (required)\n - total_steps (integer) (required) — Total steps this job will perform.\n - warnings (array) — Non-fatal warnings recorded during the job.\n - source_page_id (string) (required) — Atlassian Statuspage source page ID.\n - status (string) (required) — Current job status. [pending, running, completed, failed, cancelled]\n - target_page_id (integer) (required) — Flashduty target status page ID. Set once the job produces one, or supplied up front for subscriber migration.\n - updated_at (integer) (required) — Last status update time, unix seconds.\n", "StatusPages.ReadPageList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - components (array) — Components tracked on the status page.\n - available_since_seconds (integer) — Timestamp when the component was first available, in unix seconds.\n - component_id (string) — Component ID.\n - description (string) — Component description.\n - hide_all (boolean) — When true, the component is hidden entirely from summary endpoints.\n - hide_uptime (boolean) — When true, uptime data is hidden from summary responses.\n - name (string) (required) — Component display name.\n - order_id (integer) — Display order within its section.\n - section_id (string) — Parent section ID.\n - contact_info (string) — Get-in-touch contact, a mailto or website URL.\n - custom_domain (string) — Custom domain pointing to the status page.\n - custom_links (array) — Custom navigation links shown on the status page.\n - dark_logo (string) — Dark-mode logo image of the status page.\n - date_view (string) — How the timeline is displayed. [calendar, list]\n - display_uptime_mode (string) — How uptime is displayed. [chart_and_percentage, chart, none]\n - favicon (string) — Favicon of the status page.\n - logo (string) — Logo image of the status page.\n - logo_url (string) — URL opened when the logo is clicked.\n - name (string) — Display name of the status page.\n - page_footer (string) — Footer content of the status page.\n - page_header (string) — Header content of the status page.\n - page_id (integer) — Status page ID.\n - sections (array) — Sections grouping the components.\n - description (string) — Section description.\n - hide_all (boolean) — Whether the section and its components are hidden from summary endpoints.\n - hide_uptime (boolean) — Whether uptime data is hidden from summary responses.\n - name (string) — Section name.\n - order_id (integer) — Display order of the section.\n - section_id (string) — Section ID.\n - subscription (object)\n - email (boolean) — Whether email subscription is enabled.\n - im (boolean) — Whether IM subscription is enabled.\n - template_preference (string) — Preferred change-event template type.\n - type (string) — Visibility type of the status page. [public, internal]\n - url_name (string) — URL-safe slug, unique per account.\n", + "StatusPages.SectionUpsert": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - section_ids (array) (required) — IDs of the created or updated sections, in the same order as the request.\n", "StatusPages.SubscriberList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - all (boolean) (required) — Whether the subscriber is subscribed to all components.\n - components (array) (required) — Components this subscriber has subscribed to.\n - available_since_seconds (integer) — Timestamp when the component was first available, in unix seconds.\n - component_id (string) — Component ID.\n - description (string) — Component description.\n - hide_all (boolean) — When true, the component is hidden entirely from summary endpoints.\n - hide_uptime (boolean) — When true, uptime data is hidden from summary responses.\n - name (string) (required) — Component display name.\n - order_id (integer) — Display order within its section.\n - section_id (string) — Parent section ID.\n - locale (string) — Preferred locale for notifications.\n - method (string) (required) — Subscription delivery method. [email, im]\n - recipient (string) (required) — Subscriber recipient: email address for public pages, user ID for internal pages.\n", + "StatusPages.TemplateUpsert": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - template_id (string) (required) — ID of the created or updated template.\n", "Teams.ReadInfo": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Owning account ID.\n - created_at (integer) (required) — Unix epoch seconds the team was created.\n - creator_id (integer) (required) — Member ID of the creator.\n - creator_name (string) (required) — Display name of the creator.\n - description (string) (required) — Free-form description.\n - person_ids (array) (required) — Member IDs of team members.\n - ref_id (string) (required) — External reference ID for third-party HR system integration.\n - status (string) (required) — Team status. [enabled, disabled]\n - team_id (integer) (required) — Unique team ID.\n - team_name (string) (required) — Team display name. 1–39 characters, unique per account.\n - updated_at (integer) (required) — Unix epoch seconds the team was last updated.\n - updated_by (integer) (required) — Member ID of the last editor.\n - updated_by_name (string) (required) — Display name of the last editor.\n", "Teams.ReadInfos": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - person_ids (array)\n - team_id (integer)\n - team_name (string)\n", "Teams.ReadList": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) (required) — Owning account ID.\n - created_at (integer) (required) — Unix epoch seconds the team was created.\n - creator_id (integer) (required) — Member ID of the creator.\n - creator_name (string) (required) — Display name of the creator.\n - description (string) (required) — Free-form description.\n - person_ids (array) (required) — Member IDs of team members.\n - ref_id (string) (required) — External reference ID for third-party HR system integration.\n - status (string) (required) — Team status. [enabled, disabled]\n - team_id (integer) (required) — Unique team ID.\n - team_name (string) (required) — Team display name. 1–39 characters, unique per account.\n - updated_at (integer) (required) — Unix epoch seconds the team was last updated.\n - updated_by (integer) (required) — Member ID of the last editor.\n - updated_by_name (string) (required) — Display name of the last editor.\n", diff --git a/internal/cli/zz_generated_sessions.go b/internal/cli/zz_generated_sessions.go index 2702009..995e99c 100644 --- a/internal/cli/zz_generated_sessions.go +++ b/internal/cli/zz_generated_sessions.go @@ -8,7 +8,7 @@ import ( flashduty "github.com/flashcatcloud/go-flashduty" ) -func genSessionsInfoCmd() *cobra.Command { +func genSessionsReadInfoCmd() *cobra.Command { var dataJSON string var fLimit int64 var fNumRecentEvents int64 @@ -19,15 +19,15 @@ func genSessionsInfoCmd() *cobra.Command { Short: "Get session detail", Long: `Get session detail. -Fetch one session plus a backward-paged window of its most recent events. Use search_after_ctx to page through older history. +Fetch one session plus a backward-paged window of its most recent events. API: POST /safari/session/get (session-read-info) Request fields: - --limit int — Alias for num_recent_events; takes precedence when both are set. (0-1000) - --num-recent-events int — Number of most-recent events to return; 0 uses the server default. (0-1000) - --search-after-ctx string — Opaque keyset cursor from a previous response's search_after_ctx, to page backward through older events. (≤4096 chars) - --session-id string (required) — Session identifier. (≥1 chars) + --limit int — Page size for events; takes precedence over 'num_recent_events'. 0 uses the server default (100). (0-1000) + --num-recent-events int — Legacy page size: number of most-recent events to return. Superseded by 'limit' when both are set; 0 uses the server default (100). (0-1000) + --search-after-ctx string — Opaque keyset cursor from a previous response; pass it back to fetch the next older page. (≤4096 chars) + --session-id string (required) — Target session ID. (≥1 chars) Response fields ('data' envelope is unwrapped — these fields are at the top level): - events (array) — Recent events, ascending by (created_at, event_id). @@ -117,7 +117,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le if err := genBindBody(body, req); err != nil { return err } - out, _, err := ctx.Client.Sessions.Info(cmdContext(ctx.Cmd), req) + out, _, err := ctx.Client.Sessions.ReadInfo(cmdContext(ctx.Cmd), req) if err != nil { return err } @@ -125,15 +125,15 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().Int64Var(&fLimit, "limit", 0, "Alias for num_recent_events; takes precedence when both are set. (0-1000)") - cmd.Flags().Int64Var(&fNumRecentEvents, "num-recent-events", 0, "Number of most-recent events to return; 0 uses the server default. (0-1000)") - cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Opaque keyset cursor from a previous response's search_after_ctx, to page backward through older events. (≤4096 chars)") - cmd.Flags().StringVar(&fSessionID, "session-id", "", "Session identifier. (required) (≥1 chars)") + cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size for events; takes precedence over 'num_recent_events'. 0 uses the server default (100). (0-1000)") + cmd.Flags().Int64Var(&fNumRecentEvents, "num-recent-events", 0, "Legacy page size: number of most-recent events to return. Superseded by 'limit' when both are set; 0 uses the server default (100). (0-1000)") + cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Opaque keyset cursor from a previous response; pass it back to fetch the next older page. (≤4096 chars)") + cmd.Flags().StringVar(&fSessionID, "session-id", "", "Target session ID. (required) (≥1 chars)") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd } -func genSessionsListCmd() *cobra.Command { +func genSessionsReadListCmd() *cobra.Command { var dataJSON string var fP int64 var fLimit int64 @@ -152,23 +152,23 @@ func genSessionsListCmd() *cobra.Command { Short: "List sessions", Long: `List sessions. -List agent sessions visible to the caller within the resolved account, filtered by app, entry surface, archive status, and team scope, with pagination. Reads are scoped to the person the app_key resolves to. +List agent sessions visible to the caller, filtered by app, surface, archive status, and team. API: POST /safari/session/list (session-read-list) Request fields: - --page int — 1-based page number; defaults to 1. - --limit int — Page size, 1..100; defaults to 20. (1-100) + --page int — Page number, 1-based. (min 1) + --limit int — Page size, 1–100. (1-100) --search-after-ctx string - --app-name string (required) — Agent app whose sessions to list. [ask-ai, support, support-website, support-flashcat, ai-sre, template-assistant] - --asc bool — Ascending sort when true; defaults to false (descending). Only honored when orderby is set. - --entry-kinds []string — Restrict to sessions produced by these entry surfaces. Empty returns every kind. [web, im, api, scheduled] - --include-subagent-sessions bool — Include subagent (child) sessions in the result; defaults to false. - --keyword string — Case-insensitive substring match against session name. (≤64 chars) - --orderby string — Sort column. [created_at, updated_at] - --scope string — Visibility scope: all (own + member-of-team rows, the default), personal (own only), or team (member teams only). [all, personal, team] - --status string — Archive bucket: active (default, not archived), archived, or all. [active, archived, all] - --team-ids []int — Optional explicit team filter; intersected with the caller's visible set / scope. + --app-name string (required) — Agent app whose sessions to list. [ask-ai, support, support-website, support-flashcat, ai-sre, template-assistant, swe] + --asc bool — Ascending order when true; applies only when 'orderby' is set. + --entry-kinds []string — Restrict to sessions produced by these surfaces; empty returns every kind. [web, im, api, automation] + --include-subagent-sessions bool — Include subagent-dispatched sessions in the list. + --keyword string — Filter by session-name keyword. (≤64 chars) + --orderby string — Sort field. [created_at, updated_at] + --scope string — Visibility scope: all (own + member-of-team rows, default), personal, or team. [all, personal, team] + --status string — Archive bucket: active (default) returns un-archived, archived returns archived, all returns both. [active, archived, all] + --team-ids []int — Optional explicit team filter; intersects with 'scope'. Response fields ('data' envelope is unwrapped — these fields are at the top level): - sessions (array) — The page of sessions. @@ -262,7 +262,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le if err := genBindBody(body, req); err != nil { return err } - out, _, err := ctx.Client.Sessions.List(cmdContext(ctx.Cmd), req) + out, _, err := ctx.Client.Sessions.ReadList(cmdContext(ctx.Cmd), req) if err != nil { return err } @@ -270,24 +270,73 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().Int64Var(&fP, "page", 0, "1-based page number; defaults to 1.") - cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size, 1..100; defaults to 20. (1-100)") + cmd.Flags().Int64Var(&fP, "page", 0, "Page number, 1-based. (min 1)") + cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size, 1–100. (1-100)") cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Request field ") - cmd.Flags().StringVar(&fAppName, "app-name", "", "Agent app whose sessions to list. (required) [ask-ai, support, support-website, support-flashcat, ai-sre, template-assistant]") - cmd.Flags().BoolVar(&fAsc, "asc", false, "Ascending sort when true; defaults to false (descending). Only honored when orderby is set.") - cmd.Flags().StringSliceVar(&fEntryKinds, "entry-kinds", nil, "Restrict to sessions produced by these entry surfaces. Empty returns every kind. [web, im, api, scheduled]") - cmd.Flags().BoolVar(&fIncludeSubagentSessions, "include-subagent-sessions", false, "Include subagent (child) sessions in the result; defaults to false.") - cmd.Flags().StringVar(&fKeyword, "keyword", "", "Case-insensitive substring match against session name. (≤64 chars)") - cmd.Flags().StringVar(&fOrderby, "orderby", "", "Sort column. [created_at, updated_at]") - cmd.Flags().StringVar(&fScope, "scope", "", "Visibility scope: all (own + member-of-team rows, the default), personal (own only), or team (member teams only). [all, personal, team]") - cmd.Flags().StringVar(&fStatus, "status", "", "Archive bucket: active (default, not archived), archived, or all. [active, archived, all]") - cmd.Flags().IntSliceVar(&fTeamIDs, "team-ids", nil, "Optional explicit team filter; intersected with the caller's visible set / scope.") + cmd.Flags().StringVar(&fAppName, "app-name", "", "Agent app whose sessions to list. (required) [ask-ai, support, support-website, support-flashcat, ai-sre, template-assistant, swe]") + cmd.Flags().BoolVar(&fAsc, "asc", false, "Ascending order when true; applies only when 'orderby' is set.") + cmd.Flags().StringSliceVar(&fEntryKinds, "entry-kinds", nil, "Restrict to sessions produced by these surfaces; empty returns every kind. [web, im, api, automation]") + cmd.Flags().BoolVar(&fIncludeSubagentSessions, "include-subagent-sessions", false, "Include subagent-dispatched sessions in the list.") + cmd.Flags().StringVar(&fKeyword, "keyword", "", "Filter by session-name keyword. (≤64 chars)") + cmd.Flags().StringVar(&fOrderby, "orderby", "", "Sort field. [created_at, updated_at]") + cmd.Flags().StringVar(&fScope, "scope", "", "Visibility scope: all (own + member-of-team rows, default), personal, or team. [all, personal, team]") + cmd.Flags().StringVar(&fStatus, "status", "", "Archive bucket: active (default) returns un-archived, archived returns archived, all returns both. [active, archived, all]") + cmd.Flags().IntSliceVar(&fTeamIDs, "team-ids", nil, "Optional explicit team filter; intersects with 'scope'.") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genSessionsWriteDeleteCmd() *cobra.Command { + var dataJSON string + var fSessionID string + cmd := &cobra.Command{ + Use: "session-delete ", + Short: "Delete session", + Long: `Delete session. + +Delete a session by ID. + +API: POST /safari/session/delete (session-write-delete) + +Request fields: + --session-id string (required) — Target session ID. (≥1 chars) +`, + Args: requireExactArg("session_id"), + Example: ` flashduty safari session-delete --data '{"session_id":"sess_f8oDvqiG64uur6sBNsTc4u"}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "session_id", "string"); err != nil { + return err + } + if cmd.Flags().Changed("session-id") { + body["session_id"] = fSessionID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.SessionDeleteRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.Sessions.WriteDelete(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().StringVar(&fSessionID, "session-id", "", "Target session ID. (required) (≥1 chars)") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd } func registerGeneratedSessions(root *cobra.Command) { gSafari := genGroup(root, "safari", "AI SRE API") - genAddLeaf(gSafari, genSessionsInfoCmd()) - genAddLeaf(gSafari, genSessionsListCmd()) + genAddLeaf(gSafari, genSessionsReadInfoCmd()) + genAddLeaf(gSafari, genSessionsReadListCmd()) + genAddLeaf(gSafari, genSessionsWriteDeleteCmd()) } diff --git a/internal/cli/zz_generated_skills.go b/internal/cli/zz_generated_skills.go index 5b4f642..17e59c9 100644 --- a/internal/cli/zz_generated_skills.go +++ b/internal/cli/zz_generated_skills.go @@ -8,54 +8,6 @@ import ( flashduty "github.com/flashcatcloud/go-flashduty" ) -func genSkillsReadDownloadCmd() *cobra.Command { - var dataJSON string - var fSkillID string - cmd := &cobra.Command{ - Use: "skill-download ", - Short: "Download skill", - Long: `Download skill. - -Download the original zip package of a skill as a binary attachment. - -API: POST /safari/skill/download (skill-read-download) - -Request fields: - --skill-id string (required) — Identifier of the skill to download. -`, - Args: requireExactArg("skill_id"), - Example: ` flashduty safari skill-download --data '{"skill_id":"skl-7f3a9c21b8e0"}'`, - RunE: func(cmd *cobra.Command, args []string) error { - return runCommand(cmd, args, func(ctx *RunContext) error { - body, err := genAssembleBody(dataJSON, func(body map[string]any) error { - if err := genFoldPositional(args, body, "skill_id", "string"); err != nil { - return err - } - if cmd.Flags().Changed("skill-id") { - body["skill_id"] = fSkillID - } - return nil - }) - if err != nil { - return err - } - req := new(flashduty.SkillDownloadRequest) - if err := genBindBody(body, req); err != nil { - return err - } - out, _, err := ctx.Client.Skills.ReadDownload(cmdContext(ctx.Cmd), req) - if err != nil { - return err - } - return printGenericResult(ctx, out) - }) - }, - } - cmd.Flags().StringVar(&fSkillID, "skill-id", "", "Identifier of the skill to download. (required)") - cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") - return cmd -} - func genSkillsReadEnableCmd() *cobra.Command { var dataJSON string var fSkillID string @@ -64,15 +16,15 @@ func genSkillsReadEnableCmd() *cobra.Command { Short: "Enable skill", Long: `Enable skill. -Activate a disabled skill so agents can load it at session start. +Enable a disabled skill so the agent can load it. API: POST /safari/skill/enable (skill-read-enable) Request fields: - --skill-id string (required) — Identifier of the target skill. + --skill-id string (required) — Target skill ID. `, Args: requireExactArg("skill_id"), - Example: ` flashduty safari skill-enable --data '{"skill_id":"skl-7f3a9c21b8e0"}'`, + Example: ` flashduty safari skill-enable --data '{"skill_id":"skill_8s7Hn2kLpQ3xYbVc4Wd2m"}'`, RunE: func(cmd *cobra.Command, args []string) error { return runCommand(cmd, args, func(ctx *RunContext) error { body, err := genAssembleBody(dataJSON, func(body map[string]any) error { @@ -99,7 +51,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fSkillID, "skill-id", "", "Identifier of the target skill. (required)") + cmd.Flags().StringVar(&fSkillID, "skill-id", "", "Target skill ID. (required)") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd } @@ -112,40 +64,40 @@ func genSkillsReadGetCmd() *cobra.Command { Short: "Get skill detail", Long: `Get skill detail. -Return the full configuration and SKILL.md body of a single skill by ID. +Get one skill including its full SKILL.md content. API: POST /safari/skill/get (skill-read-get) Request fields: - --skill-id string (required) — Identifier of the skill to fetch. + --skill-id string (required) — Target skill ID. Response fields ('data' envelope is unwrapped — these fields are at the top level): - - account_id (integer) (required) — Owning account. - - author (string) — Author declared in the skill frontmatter. - - can_edit (boolean) (required) — Whether the calling member may edit or delete this resource. - - checksum (string) — SHA-256 checksum of the skill's zip package. - - content (string) — Full SKILL.md body; omitted in list responses. - - created (boolean) — Install response only: true for a fresh install, false for an in-place upsert. - - created_at (integer) (required) — Creation time as a Unix timestamp in milliseconds. - - created_by (integer) (required) — Member who created this resource. - - description (string) (required) — What the skill does and when the agent should use it. - - is_modified (boolean) (required) — A marketplace-sourced skill has been edited locally; auto-update skips it. - - license (string) — License declared in the skill frontmatter. - - s3_key (string) — Object-storage key of the skill's zip package. - - skill_id (string) (required) — Unique identifier of the skill. - - skill_name (string) (required) — Name of the skill, parsed from its SKILL.md frontmatter. - - source_template_name (string) — Marketplace template this skill was installed from, if any. - - source_template_version (string) — Marketplace template version captured at install time. - - status (string) (required) — Whether the skill is active and loadable by agents. [enabled, disabled] - - tags (array) — Tags declared in the skill frontmatter. - - team_id (integer) (required) — Owning team; 0 means account scope. - - tools (array) — Tools the skill requires, declared in its frontmatter. - - update_available (boolean) (required) — A newer marketplace template version exists for this skill. - - updated_at (integer) (required) — Last-update time as a Unix timestamp in milliseconds. - - version (string) — Skill version string from its frontmatter. + - account_id (integer) (required) — Owning account ID. + - author (string) — Skill author. + - can_edit (boolean) (required) — Whether the caller may edit this skill. + - checksum (string) — SHA-256 checksum of the skill zip. + - content (string) — Full SKILL.md content. Omitted in list responses. + - created (boolean) — Set only on install-from-session responses: true = fresh install, false = in-place update. + - created_at (integer) (required) — Creation time. Unix timestamp in milliseconds. + - created_by (integer) (required) — Member ID that created the skill. + - description (string) (required) — Human-readable description from the SKILL.md frontmatter. + - is_modified (boolean) (required) — True when a marketplace-sourced skill was edited locally (auto-update skips it). + - license (string) — Skill license. + - s3_key (string) — Object-storage key of the skill zip. + - skill_id (string) (required) — Unique skill ID (prefix 'skill_'). + - skill_name (string) (required) — Skill name, unique within the account. + - source_template_name (string) — Marketplace template this skill was installed from; empty for user-authored. + - source_template_version (string) — Template version at install time. + - status (string) (required) — Skill status. [enabled, disabled] + - tags (array) — Tags parsed from the frontmatter. + - team_id (integer) (required) — Team scope: 0 = account-wide; >0 = the owning team. + - tools (array) — Required tools (builtin or 'mcp:server/tool'). + - update_available (boolean) (required) — True when the marketplace has a newer template version. + - updated_at (integer) (required) — Last update time. Unix timestamp in milliseconds. + - version (string) — Skill version from the frontmatter. `, Args: requireExactArg("skill_id"), - Example: ` flashduty safari skill-get --data '{"skill_id":"skl-7f3a9c21b8e0"}'`, + Example: ` flashduty safari skill-get --data '{"skill_id":"skill_8s7Hn2kLpQ3xYbVc4Wd2m"}'`, RunE: func(cmd *cobra.Command, args []string) error { return runCommand(cmd, args, func(ctx *RunContext) error { body, err := genAssembleBody(dataJSON, func(body map[string]any) error { @@ -172,7 +124,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringVar(&fSkillID, "skill-id", "", "Identifier of the skill to fetch. (required)") + cmd.Flags().StringVar(&fSkillID, "skill-id", "", "Target skill ID. (required)") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd } @@ -194,38 +146,38 @@ List AI SRE skills visible to the caller across account and team scopes, with pa API: POST /safari/skill/list (skill-read-list) Request fields: - --page int — Page number, starting at 1. - --limit int — Page size; defaults to 20. + --page int — Page number, 1-based. + --limit int — Page size. --search-after-ctx string - --include-account bool — Include account-scoped rows alongside team-scoped ones; defaults to true. - --team-ids []int — Restrict results to resources owned by these teams; intersected with the caller's visible set. + --include-account bool — Include account-scoped (team_id=0) rows. Defaults to true. + --team-ids []int — Filter to these team IDs; empty = the caller's visible set. Response fields ('data' envelope is unwrapped — these fields are at the top level): - - skills (array) (required) — Skills on the current page. - - account_id (integer) (required) — Owning account. - - author (string) — Author declared in the skill frontmatter. - - can_edit (boolean) (required) — Whether the calling member may edit or delete this resource. - - checksum (string) — SHA-256 checksum of the skill's zip package. - - content (string) — Full SKILL.md body; omitted in list responses. - - created (boolean) — Install response only: true for a fresh install, false for an in-place upsert. - - created_at (integer) (required) — Creation time as a Unix timestamp in milliseconds. - - created_by (integer) (required) — Member who created this resource. - - description (string) (required) — What the skill does and when the agent should use it. - - is_modified (boolean) (required) — A marketplace-sourced skill has been edited locally; auto-update skips it. - - license (string) — License declared in the skill frontmatter. - - s3_key (string) — Object-storage key of the skill's zip package. - - skill_id (string) (required) — Unique identifier of the skill. - - skill_name (string) (required) — Name of the skill, parsed from its SKILL.md frontmatter. - - source_template_name (string) — Marketplace template this skill was installed from, if any. - - source_template_version (string) — Marketplace template version captured at install time. - - status (string) (required) — Whether the skill is active and loadable by agents. [enabled, disabled] - - tags (array) — Tags declared in the skill frontmatter. - - team_id (integer) (required) — Owning team; 0 means account scope. - - tools (array) — Tools the skill requires, declared in its frontmatter. - - update_available (boolean) (required) — A newer marketplace template version exists for this skill. - - updated_at (integer) (required) — Last-update time as a Unix timestamp in milliseconds. - - version (string) — Skill version string from its frontmatter. - - total (integer) (required) — Total number of skills matching the filters. + - skills (array) (required) — Skills on this page. + - account_id (integer) (required) — Owning account ID. + - author (string) — Skill author. + - can_edit (boolean) (required) — Whether the caller may edit this skill. + - checksum (string) — SHA-256 checksum of the skill zip. + - content (string) — Full SKILL.md content. Omitted in list responses. + - created (boolean) — Set only on install-from-session responses: true = fresh install, false = in-place update. + - created_at (integer) (required) — Creation time. Unix timestamp in milliseconds. + - created_by (integer) (required) — Member ID that created the skill. + - description (string) (required) — Human-readable description from the SKILL.md frontmatter. + - is_modified (boolean) (required) — True when a marketplace-sourced skill was edited locally (auto-update skips it). + - license (string) — Skill license. + - s3_key (string) — Object-storage key of the skill zip. + - skill_id (string) (required) — Unique skill ID (prefix 'skill_'). + - skill_name (string) (required) — Skill name, unique within the account. + - source_template_name (string) — Marketplace template this skill was installed from; empty for user-authored. + - source_template_version (string) — Template version at install time. + - status (string) (required) — Skill status. [enabled, disabled] + - tags (array) — Tags parsed from the frontmatter. + - team_id (integer) (required) — Team scope: 0 = account-wide; >0 = the owning team. + - tools (array) — Required tools (builtin or 'mcp:server/tool'). + - update_available (boolean) (required) — True when the marketplace has a newer template version. + - updated_at (integer) (required) — Last update time. Unix timestamp in milliseconds. + - version (string) — Skill version from the frontmatter. + - total (integer) (required) — Total number of matching skills. `, Example: ` flashduty safari skill-list --data '{"include_account":true,"limit":20,"p":1}'`, RunE: func(cmd *cobra.Command, args []string) error { @@ -263,11 +215,11 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().Int64Var(&fP, "page", 0, "Page number, starting at 1.") - cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size; defaults to 20.") + cmd.Flags().Int64Var(&fP, "page", 0, "Page number, 1-based.") + cmd.Flags().Int64Var(&fLimit, "limit", 0, "Page size.") cmd.Flags().StringVar(&fSearchAfterCtx, "search-after-ctx", "", "Request field ") - cmd.Flags().BoolVar(&fIncludeAccount, "include-account", false, "Include account-scoped rows alongside team-scoped ones; defaults to true.") - cmd.Flags().IntSliceVar(&fTeamIDs, "team-ids", nil, "Restrict results to resources owned by these teams; intersected with the caller's visible set.") + cmd.Flags().BoolVar(&fIncludeAccount, "include-account", false, "Include account-scoped (team_id=0) rows. Defaults to true.") + cmd.Flags().IntSliceVar(&fTeamIDs, "team-ids", nil, "Filter to these team IDs; empty = the caller's visible set.") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd } @@ -280,15 +232,15 @@ func genSkillsWriteDeleteCmd() *cobra.Command { Short: "Delete skill", Long: `Delete skill. -Permanently remove a skill so agents can no longer load it. +Delete a skill by ID. API: POST /safari/skill/delete (skill-write-delete) Request fields: - --skill-id string (required) — Identifier of the skill to delete. + --skill-id string (required) — Target skill ID. `, Args: requireExactArg("skill_id"), - Example: ` flashduty safari skill-delete --data '{"skill_id":"skl-7f3a9c21b8e0"}'`, + Example: ` flashduty safari skill-delete --data '{"skill_id":"skill_8s7Hn2kLpQ3xYbVc4Wd2m"}'`, RunE: func(cmd *cobra.Command, args []string) error { return runCommand(cmd, args, func(ctx *RunContext) error { body, err := genAssembleBody(dataJSON, func(body map[string]any) error { @@ -315,7 +267,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fSkillID, "skill-id", "", "Identifier of the skill to delete. (required)") + cmd.Flags().StringVar(&fSkillID, "skill-id", "", "Target skill ID. (required)") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd } @@ -328,15 +280,15 @@ func genSkillsWriteDisableCmd() *cobra.Command { Short: "Disable skill", Long: `Disable skill. -Deactivate an enabled skill so agents no longer load it. +Disable an enabled skill so the agent stops loading it. API: POST /safari/skill/disable (skill-write-disable) Request fields: - --skill-id string (required) — Identifier of the target skill. + --skill-id string (required) — Target skill ID. `, Args: requireExactArg("skill_id"), - Example: ` flashduty safari skill-disable --data '{"skill_id":"skl-7f3a9c21b8e0"}'`, + Example: ` flashduty safari skill-disable --data '{"skill_id":"skill_8s7Hn2kLpQ3xYbVc4Wd2m"}'`, RunE: func(cmd *cobra.Command, args []string) error { return runCommand(cmd, args, func(ctx *RunContext) error { body, err := genAssembleBody(dataJSON, func(body map[string]any) error { @@ -363,7 +315,7 @@ Request fields: }) }, } - cmd.Flags().StringVar(&fSkillID, "skill-id", "", "Identifier of the target skill. (required)") + cmd.Flags().StringVar(&fSkillID, "skill-id", "", "Target skill ID. (required)") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd } @@ -378,42 +330,42 @@ func genSkillsWriteUpdateCmd() *cobra.Command { Short: "Update skill", Long: `Update skill. -Edit a skill's description or reassign its owning team. +Update a skill's description or reassign its team scope. API: POST /safari/skill/update (skill-write-update) Request fields: - --description string — New description for the skill. (≤1024 chars) - --skill-id string (required) — Identifier of the skill to update. - --team-id int — Reassign the skill to this team; omit to leave unchanged, 0 for account scope. + --description string — New description. (≤1024 chars) + --skill-id string (required) — Target skill ID. + --team-id int — Reassign team scope: 0 = account-wide; >0 = team. Omit to leave unchanged. Response fields ('data' envelope is unwrapped — these fields are at the top level): - - account_id (integer) (required) — Owning account. - - author (string) — Author declared in the skill frontmatter. - - can_edit (boolean) (required) — Whether the calling member may edit or delete this resource. - - checksum (string) — SHA-256 checksum of the skill's zip package. - - content (string) — Full SKILL.md body; omitted in list responses. - - created (boolean) — Install response only: true for a fresh install, false for an in-place upsert. - - created_at (integer) (required) — Creation time as a Unix timestamp in milliseconds. - - created_by (integer) (required) — Member who created this resource. - - description (string) (required) — What the skill does and when the agent should use it. - - is_modified (boolean) (required) — A marketplace-sourced skill has been edited locally; auto-update skips it. - - license (string) — License declared in the skill frontmatter. - - s3_key (string) — Object-storage key of the skill's zip package. - - skill_id (string) (required) — Unique identifier of the skill. - - skill_name (string) (required) — Name of the skill, parsed from its SKILL.md frontmatter. - - source_template_name (string) — Marketplace template this skill was installed from, if any. - - source_template_version (string) — Marketplace template version captured at install time. - - status (string) (required) — Whether the skill is active and loadable by agents. [enabled, disabled] - - tags (array) — Tags declared in the skill frontmatter. - - team_id (integer) (required) — Owning team; 0 means account scope. - - tools (array) — Tools the skill requires, declared in its frontmatter. - - update_available (boolean) (required) — A newer marketplace template version exists for this skill. - - updated_at (integer) (required) — Last-update time as a Unix timestamp in milliseconds. - - version (string) — Skill version string from its frontmatter. + - account_id (integer) (required) — Owning account ID. + - author (string) — Skill author. + - can_edit (boolean) (required) — Whether the caller may edit this skill. + - checksum (string) — SHA-256 checksum of the skill zip. + - content (string) — Full SKILL.md content. Omitted in list responses. + - created (boolean) — Set only on install-from-session responses: true = fresh install, false = in-place update. + - created_at (integer) (required) — Creation time. Unix timestamp in milliseconds. + - created_by (integer) (required) — Member ID that created the skill. + - description (string) (required) — Human-readable description from the SKILL.md frontmatter. + - is_modified (boolean) (required) — True when a marketplace-sourced skill was edited locally (auto-update skips it). + - license (string) — Skill license. + - s3_key (string) — Object-storage key of the skill zip. + - skill_id (string) (required) — Unique skill ID (prefix 'skill_'). + - skill_name (string) (required) — Skill name, unique within the account. + - source_template_name (string) — Marketplace template this skill was installed from; empty for user-authored. + - source_template_version (string) — Template version at install time. + - status (string) (required) — Skill status. [enabled, disabled] + - tags (array) — Tags parsed from the frontmatter. + - team_id (integer) (required) — Team scope: 0 = account-wide; >0 = the owning team. + - tools (array) — Required tools (builtin or 'mcp:server/tool'). + - update_available (boolean) (required) — True when the marketplace has a newer template version. + - updated_at (integer) (required) — Last update time. Unix timestamp in milliseconds. + - version (string) — Skill version from the frontmatter. `, Args: requireExactArg("skill_id"), - Example: ` flashduty safari skill-update --data '{"description":"Diagnose unhealthy Kubernetes workloads.","skill_id":"skl-7f3a9c21b8e0"}'`, + Example: ` flashduty safari skill-update --data '{"description":"Updated triage runbook.","skill_id":"skill_8s7Hn2kLpQ3xYbVc4Wd2m"}'`, RunE: func(cmd *cobra.Command, args []string) error { return runCommand(cmd, args, func(ctx *RunContext) error { body, err := genAssembleBody(dataJSON, func(body map[string]any) error { @@ -446,9 +398,9 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }) }, } - cmd.Flags().StringVar(&fDescription, "description", "", "New description for the skill. (≤1024 chars)") - cmd.Flags().StringVar(&fSkillID, "skill-id", "", "Identifier of the skill to update. (required)") - cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Reassign the skill to this team; omit to leave unchanged, 0 for account scope.") + cmd.Flags().StringVar(&fDescription, "description", "", "New description. (≤1024 chars)") + cmd.Flags().StringVar(&fSkillID, "skill-id", "", "Target skill ID. (required)") + cmd.Flags().Int64Var(&fTeamID, "team-id", 0, "Reassign team scope: 0 = account-wide; >0 = team. Omit to leave unchanged.") cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") return cmd } @@ -460,34 +412,34 @@ func genSkillsWriteUploadCmd() *cobra.Command { Short: "Upload skill", Long: `Upload skill. -Upload a skill zip package and register it as a new account or team skill. +Upload a skill archive (.skill/.zip/.tar.gz/.tgz) to create or replace a skill. API: POST /safari/skill/upload (skill-write-upload) Response fields ('data' envelope is unwrapped — these fields are at the top level): - - account_id (integer) (required) — Owning account. - - author (string) — Author declared in the skill frontmatter. - - can_edit (boolean) (required) — Whether the calling member may edit or delete this resource. - - checksum (string) — SHA-256 checksum of the skill's zip package. - - content (string) — Full SKILL.md body; omitted in list responses. - - created (boolean) — Install response only: true for a fresh install, false for an in-place upsert. - - created_at (integer) (required) — Creation time as a Unix timestamp in milliseconds. - - created_by (integer) (required) — Member who created this resource. - - description (string) (required) — What the skill does and when the agent should use it. - - is_modified (boolean) (required) — A marketplace-sourced skill has been edited locally; auto-update skips it. - - license (string) — License declared in the skill frontmatter. - - s3_key (string) — Object-storage key of the skill's zip package. - - skill_id (string) (required) — Unique identifier of the skill. - - skill_name (string) (required) — Name of the skill, parsed from its SKILL.md frontmatter. - - source_template_name (string) — Marketplace template this skill was installed from, if any. - - source_template_version (string) — Marketplace template version captured at install time. - - status (string) (required) — Whether the skill is active and loadable by agents. [enabled, disabled] - - tags (array) — Tags declared in the skill frontmatter. - - team_id (integer) (required) — Owning team; 0 means account scope. - - tools (array) — Tools the skill requires, declared in its frontmatter. - - update_available (boolean) (required) — A newer marketplace template version exists for this skill. - - updated_at (integer) (required) — Last-update time as a Unix timestamp in milliseconds. - - version (string) — Skill version string from its frontmatter. + - account_id (integer) (required) — Owning account ID. + - author (string) — Skill author. + - can_edit (boolean) (required) — Whether the caller may edit this skill. + - checksum (string) — SHA-256 checksum of the skill zip. + - content (string) — Full SKILL.md content. Omitted in list responses. + - created (boolean) — Set only on install-from-session responses: true = fresh install, false = in-place update. + - created_at (integer) (required) — Creation time. Unix timestamp in milliseconds. + - created_by (integer) (required) — Member ID that created the skill. + - description (string) (required) — Human-readable description from the SKILL.md frontmatter. + - is_modified (boolean) (required) — True when a marketplace-sourced skill was edited locally (auto-update skips it). + - license (string) — Skill license. + - s3_key (string) — Object-storage key of the skill zip. + - skill_id (string) (required) — Unique skill ID (prefix 'skill_'). + - skill_name (string) (required) — Skill name, unique within the account. + - source_template_name (string) — Marketplace template this skill was installed from; empty for user-authored. + - source_template_version (string) — Template version at install time. + - status (string) (required) — Skill status. [enabled, disabled] + - tags (array) — Tags parsed from the frontmatter. + - team_id (integer) (required) — Team scope: 0 = account-wide; >0 = the owning team. + - tools (array) — Required tools (builtin or 'mcp:server/tool'). + - update_available (boolean) (required) — True when the marketplace has a newer template version. + - updated_at (integer) (required) — Last update time. Unix timestamp in milliseconds. + - version (string) — Skill version from the frontmatter. `, RunE: func(cmd *cobra.Command, args []string) error { return runCommand(cmd, args, func(ctx *RunContext) error { @@ -512,7 +464,6 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le func registerGeneratedSkills(root *cobra.Command) { gSafari := genGroup(root, "safari", "AI SRE API") - genAddLeaf(gSafari, genSkillsReadDownloadCmd()) genAddLeaf(gSafari, genSkillsReadEnableCmd()) genAddLeaf(gSafari, genSkillsReadGetCmd()) genAddLeaf(gSafari, genSkillsReadListCmd()) diff --git a/internal/cli/zz_generated_status_pages.go b/internal/cli/zz_generated_status_pages.go index 421eb53..a8c0ffd 100644 --- a/internal/cli/zz_generated_status_pages.go +++ b/internal/cli/zz_generated_status_pages.go @@ -837,6 +837,248 @@ Request fields: return cmd } +func genStatusPagesComponentDeleteCmd() *cobra.Command { + var dataJSON string + var fComponentIDs []string + var fPageID int64 + cmd := &cobra.Command{ + Use: "component-delete [...]", + Short: "Delete status page component", + Long: `Delete status page component. + +Delete a service component from a status page. + +API: POST /status-page/component/delete (statusPageComponentDelete) + +Request fields: + --component-ids []string (required) — IDs of components to delete. + --page-id int (required) — Status page ID. +`, + Args: requireArgs("component_ids"), + Example: ` flashduty status-page component-delete --data '{"component_ids":["01KP032KMN9YFBMPWANJMFZFG1"],"page_id":5750613685214}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "component_ids", "slice"); err != nil { + return err + } + if cmd.Flags().Changed("component-ids") { + body["component_ids"] = fComponentIDs + } + if cmd.Flags().Changed("page-id") { + body["page_id"] = fPageID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.DeleteStatusPageComponentRequest) + if err := genBindBody(body, req); err != nil { + return err + } + resp, err := ctx.Client.StatusPages.ComponentDelete(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + if resp != nil && len(resp.Raw) > 0 { + return ctx.WriteRaw(resp.Raw) + } + ctx.WriteResult("OK: POST /status-page/component/delete") + return nil + }) + }, + } + cmd.Flags().StringSliceVar(&fComponentIDs, "component-ids", nil, "IDs of components to delete. (required)") + cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID. (required)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genStatusPagesComponentUpsertCmd() *cobra.Command { + var dataJSON string + var fPageID int64 + cmd := &cobra.Command{ + Use: "component-upsert ", + Short: "Upsert status page component", + Long: `Upsert status page component. + +Create or update a service component on a status page. + +API: POST /status-page/component/upsert (statusPageComponentUpsert) + +Request fields: + --page-id int (required) — Status page ID. + components (array, via --data) (required) — Components to create or update. + - component_id (string) — Component ID. Omit to create a new component; supply to update an existing one. + - description (string) — Component description. + - hide_all (boolean) — When true, the component is hidden entirely from summary endpoints. + - hide_uptime (boolean) — When true, uptime data is hidden from summary responses. + - name (string) (required) — Component display name. + - order_id (integer) — Display order within its section. + - section_id (string) — Parent section ID. Omit to place the component at the top level. + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - component_ids (array) (required) — IDs of the created or updated components, in the same order as the request. +`, + Args: requireExactArg("page_id"), + Example: ` flashduty status-page component-upsert --data '{"components":[{"description":"Main web interface","name":"Web Console","order_id":1,"section_id":"01KC3FKKX5TSVG6Z3X1QNGF6V2"}],"page_id":5750613685214}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "page_id", "int"); err != nil { + return err + } + if cmd.Flags().Changed("page-id") { + body["page_id"] = fPageID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.UpsertStatusPageComponentRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.StatusPages.ComponentUpsert(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID. (required)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genStatusPagesCreateCmd() *cobra.Command { + var dataJSON string + cmd := &cobra.Command{ + Use: "create", + Short: "Create status page", + Long: `Create status page. + +Create a new status page. + +API: POST /status-page/create (statusPageCreate) +`, + Example: ` flashduty status-page create --data '{"contact_info":"mailto:support@example.com","name":"My Status Page","page_header":"Welcome to our status page","type":"public","url_name":"my-status-page"}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + return nil + }) + if err != nil { + return err + } + _ = body + resp, err := ctx.Client.StatusPages.Create(cmdContext(ctx.Cmd)) + if err != nil { + return err + } + if resp != nil && len(resp.Raw) > 0 { + return ctx.WriteRaw(resp.Raw) + } + ctx.WriteResult("OK: POST /status-page/create") + return nil + }) + }, + } + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genStatusPagesDeleteCmd() *cobra.Command { + var dataJSON string + cmd := &cobra.Command{ + Use: "delete", + Short: "Delete status page", + Long: `Delete status page. + +Delete a status page. + +API: POST /status-page/delete (statusPageDelete) +`, + Example: ` flashduty status-page delete --data '{"page_id":5750613685214}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + return nil + }) + if err != nil { + return err + } + _ = body + resp, err := ctx.Client.StatusPages.Delete(cmdContext(ctx.Cmd)) + if err != nil { + return err + } + if resp != nil && len(resp.Raw) > 0 { + return ctx.WriteRaw(resp.Raw) + } + ctx.WriteResult("OK: POST /status-page/delete") + return nil + }) + }, + } + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genStatusPagesInfoCmd() *cobra.Command { + var dataJSON string + var fPageID string + cmd := &cobra.Command{ + Use: "info ", + Short: "Get status page detail", + Long: `Get status page detail. + +Retrieve detailed configuration for a specific status page. + +API: GET /status-page/info (statusPageInfo) + +Request fields: + --page-id string (required) — Status page ID +`, + Args: requireExactArg("page_id"), + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "page_id", "string"); err != nil { + return err + } + if cmd.Flags().Changed("page-id") { + body["page_id"] = fPageID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.StatusPagesInfoRequest) + if err := genBindBody(body, req); err != nil { + return err + } + resp, err := ctx.Client.StatusPages.Info(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + if resp != nil && len(resp.Raw) > 0 { + return ctx.WriteRaw(resp.Raw) + } + ctx.WriteResult("OK: GET /status-page/info") + return nil + }) + }, + } + cmd.Flags().StringVar(&fPageID, "page-id", "", "Status page ID (required)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + func genStatusPagesMigrateEmailSubscribersCmd() *cobra.Command { var dataJSON string var fAPIKey string @@ -1080,6 +1322,122 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le return cmd } +func genStatusPagesSectionDeleteCmd() *cobra.Command { + var dataJSON string + var fPageID int64 + var fSectionIDs []string + cmd := &cobra.Command{ + Use: "section-delete [...]", + Short: "Delete status page section", + Long: `Delete status page section. + +Delete a section from a status page. + +API: POST /status-page/section/delete (statusPageSectionDelete) + +Request fields: + --page-id int (required) — Status page ID. + --section-ids []string (required) — IDs of sections to delete. +`, + Args: requireArgs("section_ids"), + Example: ` flashduty status-page section-delete --data '{"page_id":5750613685214,"section_ids":["01KP032J1FV2H8DDGN0QSJ1CAR"]}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "section_ids", "slice"); err != nil { + return err + } + if cmd.Flags().Changed("page-id") { + body["page_id"] = fPageID + } + if cmd.Flags().Changed("section-ids") { + body["section_ids"] = fSectionIDs + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.DeleteStatusPageSectionRequest) + if err := genBindBody(body, req); err != nil { + return err + } + resp, err := ctx.Client.StatusPages.SectionDelete(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + if resp != nil && len(resp.Raw) > 0 { + return ctx.WriteRaw(resp.Raw) + } + ctx.WriteResult("OK: POST /status-page/section/delete") + return nil + }) + }, + } + cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID. (required)") + cmd.Flags().StringSliceVar(&fSectionIDs, "section-ids", nil, "IDs of sections to delete. (required)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genStatusPagesSectionUpsertCmd() *cobra.Command { + var dataJSON string + var fPageID int64 + cmd := &cobra.Command{ + Use: "section-upsert ", + Short: "Upsert status page section", + Long: `Upsert status page section. + +Create or update a section on a status page. + +API: POST /status-page/section/upsert (statusPageSectionUpsert) + +Request fields: + --page-id int (required) — Status page ID. + sections (array, via --data) (required) — Sections to create or update. + - description (string) — Section description. + - hide_all (boolean) — When true, the entire section is hidden from summary endpoints. + - hide_uptime (boolean) — When true, uptime data for all components in this section is hidden. + - name (string) (required) — Section display name. + - order_id (integer) — Display order. + - section_id (string) — Section ID. Omit to create a new section; supply to update an existing one. + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - section_ids (array) (required) — IDs of the created or updated sections, in the same order as the request. +`, + Args: requireExactArg("page_id"), + Example: ` flashduty status-page section-upsert --data '{"page_id":5750613685214,"sections":[{"description":"Our core services","name":"Core Services","order_id":1}]}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "page_id", "int"); err != nil { + return err + } + if cmd.Flags().Changed("page-id") { + body["page_id"] = fPageID + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.UpsertStatusPageSectionRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.StatusPages.SectionUpsert(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID. (required)") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + func genStatusPagesSubscriberExportCmd() *cobra.Command { var dataJSON string var fComponentIDs []string @@ -1281,6 +1639,223 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; return cmd } +func genStatusPagesTemplateDeleteCmd() *cobra.Command { + var dataJSON string + var fPageID int64 + var fTemplateID string + var fType string + cmd := &cobra.Command{ + Use: "template-delete", + Short: "Delete status page template", + Long: `Delete status page template. + +Delete an event template from a status page. + +API: POST /status-page/template/delete (statusPageTemplateDelete) + +Request fields: + --page-id int (required) — Status page ID. + --template-id string (required) — Template ID to delete. + --type string (required) — Template category. [pre_defined, message] +`, + Example: ` flashduty status-page template-delete --data '{"page_id":5720156736380,"template_id":"01KP0339G5XDEPM4R86T2B23EP","type":"pre_defined"}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if cmd.Flags().Changed("page-id") { + body["page_id"] = fPageID + } + if cmd.Flags().Changed("template-id") { + body["template_id"] = fTemplateID + } + if cmd.Flags().Changed("type") { + body["type"] = fType + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.DeleteStatusPageTemplateRequest) + if err := genBindBody(body, req); err != nil { + return err + } + resp, err := ctx.Client.StatusPages.TemplateDelete(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + if resp != nil && len(resp.Raw) > 0 { + return ctx.WriteRaw(resp.Raw) + } + ctx.WriteResult("OK: POST /status-page/template/delete") + return nil + }) + }, + } + cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID. (required)") + cmd.Flags().StringVar(&fTemplateID, "template-id", "", "Template ID to delete. (required)") + cmd.Flags().StringVar(&fType, "type", "", "Template category. (required) [pre_defined, message]") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genStatusPagesTemplateListCmd() *cobra.Command { + var dataJSON string + var fPageID int64 + var fType string + cmd := &cobra.Command{ + Use: "template-list ", + Short: "List status page templates", + Long: `List status page templates. + +List all event templates for a status page. + +API: GET /status-page/template/list (statusPageTemplateList) + +Request fields: + --page-id int (required) — Status page ID. + --type string (required) — Template category. 'pre_defined' returns predefined event templates; 'message' returns message notification templates. [pre_defined, message] +`, + Args: requireExactArg("page_id"), + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "page_id", "int"); err != nil { + return err + } + if cmd.Flags().Changed("page-id") { + body["page_id"] = fPageID + } + if cmd.Flags().Changed("type") { + body["type"] = fType + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.StatusPagesTemplateListRequest) + if err := genBindBody(body, req); err != nil { + return err + } + resp, err := ctx.Client.StatusPages.TemplateList(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + if resp != nil && len(resp.Raw) > 0 { + return ctx.WriteRaw(resp.Raw) + } + ctx.WriteResult("OK: GET /status-page/template/list") + return nil + }) + }, + } + cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID. (required)") + cmd.Flags().StringVar(&fType, "type", "", "Template category. 'pre_defined' returns predefined event templates; 'message' returns message notification templates. (required) [pre_defined, message]") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genStatusPagesTemplateUpsertCmd() *cobra.Command { + var dataJSON string + var fPageID int64 + var fType string + cmd := &cobra.Command{ + Use: "template-upsert ", + Short: "Upsert status page template", + Long: `Upsert status page template. + +Create or update an event template for a status page. + +API: POST /status-page/template/upsert (statusPageTemplateUpsert) + +Request fields: + --page-id int (required) — Status page ID. + --type string (required) — Template category. 'pre_defined' for predefined event templates; 'message' for notification message templates. [pre_defined, message] + template (object, via --data) (required) — Template content. + - description (string) — Template body text (Markdown). + - event_type (string) (required) — Event type this template applies to. [incident, maintenance] + - status (string) (required) — Event status this template represents. [investigating, identified, monitoring, resolved, scheduled, ongoing, completed] + - template_id (string) — Template ID. Omit to create; supply to update. + - title (string) (required) — Template title. + +Response fields ('data' envelope is unwrapped — these fields are at the top level): + - template_id (string) (required) — ID of the created or updated template. +`, + Args: requireExactArg("page_id"), + Example: ` flashduty status-page template-upsert --data '{"page_id":5720156736380,"template":{"description":"We are investigating a service disruption affecting some users.","event_type":"incident","status":"investigating","title":"Service Disruption"},"type":"pre_defined"}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + if err := genFoldPositional(args, body, "page_id", "int"); err != nil { + return err + } + if cmd.Flags().Changed("page-id") { + body["page_id"] = fPageID + } + if cmd.Flags().Changed("type") { + body["type"] = fType + } + return nil + }) + if err != nil { + return err + } + req := new(flashduty.UpsertStatusPageTemplateRequest) + if err := genBindBody(body, req); err != nil { + return err + } + out, _, err := ctx.Client.StatusPages.TemplateUpsert(cmdContext(ctx.Cmd), req) + if err != nil { + return err + } + return printGenericResult(ctx, out) + }) + }, + } + cmd.Flags().Int64Var(&fPageID, "page-id", 0, "Status page ID. (required)") + cmd.Flags().StringVar(&fType, "type", "", "Template category. 'pre_defined' for predefined event templates; 'message' for notification message templates. (required) [pre_defined, message]") + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + +func genStatusPagesUpdateCmd() *cobra.Command { + var dataJSON string + cmd := &cobra.Command{ + Use: "update", + Short: "Update status page", + Long: `Update status page. + +Update an existing status page configuration. + +API: POST /status-page/update (statusPageUpdate) +`, + Example: ` flashduty status-page update --data '{"contact_info":"mailto:support@example.com","name":"Flashduty Status Page (Updated)","page_header":"Updated status page header","page_id":5750613685214}'`, + RunE: func(cmd *cobra.Command, args []string) error { + return runCommand(cmd, args, func(ctx *RunContext) error { + body, err := genAssembleBody(dataJSON, func(body map[string]any) error { + return nil + }) + if err != nil { + return err + } + _ = body + resp, err := ctx.Client.StatusPages.Update(cmdContext(ctx.Cmd)) + if err != nil { + return err + } + if resp != nil && len(resp.Raw) > 0 { + return ctx.WriteRaw(resp.Raw) + } + ctx.WriteResult("OK: POST /status-page/update") + return nil + }) + }, + } + cmd.Flags().StringVar(&dataJSON, "data", "", "Full request body as JSON; positional arguments and typed flags override its fields. Accepts inline JSON, or - to read stdin.") + return cmd +} + func registerGeneratedStatusPages(root *cobra.Command) { gStatusPage := genGroup(root, "status-page", "On-call/Status pages API") genAddLeaf(gStatusPage, genStatusPagesReadPageListCmd()) @@ -1293,11 +1868,22 @@ func registerGeneratedStatusPages(root *cobra.Command) { genAddLeaf(gStatusPage, genStatusPagesChangeTimelineDeleteCmd()) genAddLeaf(gStatusPage, genStatusPagesChangeTimelineUpdateCmd()) genAddLeaf(gStatusPage, genStatusPagesChangeUpdateCmd()) + genAddLeaf(gStatusPage, genStatusPagesComponentDeleteCmd()) + genAddLeaf(gStatusPage, genStatusPagesComponentUpsertCmd()) + genAddLeaf(gStatusPage, genStatusPagesCreateCmd()) + genAddLeaf(gStatusPage, genStatusPagesDeleteCmd()) + genAddLeaf(gStatusPage, genStatusPagesInfoCmd()) genAddLeaf(gStatusPage, genStatusPagesMigrateEmailSubscribersCmd()) genAddLeaf(gStatusPage, genStatusPagesMigrateStructureCmd()) genAddLeaf(gStatusPage, genStatusPagesMigrationCancelCmd()) genAddLeaf(gStatusPage, genStatusPagesMigrationStatusCmd()) + genAddLeaf(gStatusPage, genStatusPagesSectionDeleteCmd()) + genAddLeaf(gStatusPage, genStatusPagesSectionUpsertCmd()) genAddLeaf(gStatusPage, genStatusPagesSubscriberExportCmd()) genAddLeaf(gStatusPage, genStatusPagesSubscriberImportCmd()) genAddLeaf(gStatusPage, genStatusPagesSubscriberListCmd()) + genAddLeaf(gStatusPage, genStatusPagesTemplateDeleteCmd()) + genAddLeaf(gStatusPage, genStatusPagesTemplateListCmd()) + genAddLeaf(gStatusPage, genStatusPagesTemplateUpsertCmd()) + genAddLeaf(gStatusPage, genStatusPagesUpdateCmd()) } diff --git a/internal/cmd/cligen/main.go b/internal/cmd/cligen/main.go index b2b993a..138a9fc 100644 --- a/internal/cmd/cligen/main.go +++ b/internal/cmd/cligen/main.go @@ -223,7 +223,7 @@ func collectServices(paths, schemas map[string]any) []service { for _, e := range entries { opIDs = append(opIDs, str(e.op, "operationId")) } - names := methodNames(opIDs) + names := methodNames(tag, opIDs) svc := service{Name: serviceName(tag), Tag: tag} for _, e := range entries { opID := str(e.op, "operationId") diff --git a/internal/cmd/cligen/naming.go b/internal/cmd/cligen/naming.go index 14466ba..5c2ea05 100644 --- a/internal/cmd/cligen/naming.go +++ b/internal/cmd/cligen/naming.go @@ -109,9 +109,14 @@ func commonPrefixLen(opTokens [][]string) int { } } +var methodPrefixByTag = map[string][]string{ + "On-call/Incidents": {"incident"}, + "On-call/Integrations": {"webhook", "history"}, +} + // methodNames computes a unique Go method name for each operationId within a -// service by stripping the shared leading resource tokens, then deduping. -func methodNames(opIDs []string) map[string]string { +// service by stripping stable service-specific leading tokens, then deduping. +func methodNames(tag string, opIDs []string) map[string]string { opTokens := make([][]string, len(opIDs)) for i, id := range opIDs { opTokens[i] = tokens(id) @@ -122,6 +127,9 @@ func methodNames(opIDs []string) map[string]string { used := make(map[string]int) for i, id := range opIDs { toks := opTokens[i][n:] + if prefix, ok := methodPrefixByTag[tag]; ok && hasTokenPrefix(opTokens[i], prefix) { + toks = opTokens[i][len(prefix):] + } if len(toks) == 0 { toks = opTokens[i] } @@ -143,6 +151,18 @@ func methodNames(opIDs []string) map[string]string { return result } +func hasTokenPrefix(toks, prefix []string) bool { + if len(toks) <= len(prefix) { + return false + } + for i, p := range prefix { + if strings.ToLower(toks[i]) != p { + return false + } + } + return true +} + func itoa(n int) string { if n == 0 { return "0" diff --git a/skills/flashduty/reference/channel.md b/skills/flashduty/reference/channel.md index 716bc84..6b6f5b1 100644 --- a/skills/flashduty/reference/channel.md +++ b/skills/flashduty/reference/channel.md @@ -129,6 +129,11 @@ Update escalation rule - `--template-id` string (required) — Notification template ID (MongoDB ObjectID). - body-only (`--data`): filters (object); layers (array) (required); time_filters (array) +### escalate-webhook-robot-list +List webhook robots in escalation rules +- `--query` string — Search keyword. Fuzzy matches against robot alias or token, case-insensitive. +- `--type` string — Filter by robot type, e.g. 'feishu', 'dingtalk', 'wecom', 'slack', 'teams'. Omit to return all types. + ### info Get channel detail - `` (positional, required) int64 — Channel ID to fetch. diff --git a/skills/flashduty/reference/incident.md b/skills/flashduty/reference/incident.md index 743794b..93c1677 100644 --- a/skills/flashduty/reference/incident.md +++ b/skills/flashduty/reference/incident.md @@ -208,14 +208,33 @@ List past incidents - `` (positional, required) string — Reference incident ID (MongoDB ObjectID). - `--limit` int64 — Maximum number of similar incidents to return. (0-100) +### post-mortem-basics-reset +Update post-mortem basics +- `--incidents-earliest-start-seconds` string (required) — Unix timestamp in seconds for the earliest linked incident start time. (min 1) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. +- `--incidents-highest-severity` string (required) — Highest severity among linked incidents. +- `--incidents-latest-close-seconds` string — Unix timestamp in seconds for the latest linked incident close time. 0 when still open. (min 0) Accepts a duration (7d, 24h), '+7d' for the future, 'now', a date, or Unix seconds. +- `--incidents-total-duration-seconds` int64 — Total incident duration in seconds. (min 0) +- `` (positional, required) string — Post-mortem ID. +- `--responder-ids` intSlice — Responder member IDs to store on the report. + ### post-mortem-delete Delete post-mortem - `` (positional, required) string — Post-mortem ID. +### post-mortem-follow-ups-reset +Update post-mortem follow-ups +- `--follow-ups` string — Follow-up action items as free text. +- `` (positional, required) string — Post-mortem ID. + ### post-mortem-info Get post-mortem - `` (positional, required) string — Post-mortem ID. Deterministic hash derived from account ID and the set of linked incident IDs. +### post-mortem-init [...] +Initialize post-mortem +- `` (positional, required) stringSlice — Incident IDs to link to the report. 1-10 incidents. +- `--template-id` string (required) — Template ID used to initialize the report. + ### post-mortem-list List post-mortems - `--asc` bool — Ascending order when true. @@ -229,6 +248,41 @@ List post-mortems - `--status` string — Report status. Defaults to 'published' on the server when omitted. · enum: drafting | published - `--team-ids` intSlice — Team IDs to restrict the query to. +### post-mortem-status-reset +Update post-mortem status +- `` (positional, required) string — Post-mortem ID. +- `--status` string (required) — Target report status. · enum: drafting | published + +### post-mortem-template-delete +Delete post-mortem template +- `` (positional, required) string — Template ID. + +### post-mortem-template-info +Get post-mortem template detail +- `` (positional, required) string — Template ID. + +### post-mortem-template-list +List post-mortem templates +- `--asc` bool — Ascending order when true. +- `--limit` int64 — Page size, at most 100. (0-100) +- `--order-by` string — Field used to order results. · enum: created_at_seconds +- `--page` int64 — Page number starting at 1. (min 0) +- `--search-after-ctx` string — Cursor from a previous response for forward pagination. + +### post-mortem-template-upsert +Create or update post-mortem template +- `--content` string (required) — BlockNote JSON template content. +- `--content-markdown` string — Markdown version of the template content. +- `--description` string — Template description. +- `--name` string (required) — Template name. +- `--team-id` int64 — Managing team ID. Required when creating a custom template. +- `--template-id` string — Template ID. Omit to create a new template; provide it to update an existing template. + +### post-mortem-title-reset +Update post-mortem title +- `` (positional, required) string — Post-mortem ID. +- `--title` string (required) — New report title. + ### reassign Reassign an incident to new responders - `--person` string diff --git a/skills/flashduty/reference/monit.md b/skills/flashduty/reference/monit.md index b18b785..e6577bf 100644 --- a/skills/flashduty/reference/monit.md +++ b/skills/flashduty/reference/monit.md @@ -116,6 +116,14 @@ Update datasource - `--type-ident` string (required) — Datasource type identifier. Allowed: 'prometheus', 'loki', 'mysql', 'oracle', 'postgres', 'clickhouse', 'elasticsearch', 'sls', 'victorialogs'. - body-only (`--data`): payload (object) (required) +### preview-sync +Preview datasource query +- `--delay-seconds` int64 — Shift the query window backward by this many seconds to compensate for data ingestion latency. +- `--ds-name` string (required) — Datasource display name as configured in the account. +- `--ds-type` string (required) — Datasource type, e.g. 'prometheus', 'loki', 'elasticsearch'. +- `--expr` string (required) — Query expression. Format depends on 'ds_type' (PromQL for Prometheus, LogQL for Loki, etc.). +- body-only (`--data`): args (object) + ### query-diagnose Diagnose data source - `--account-id` int64 — Optional consistency check. Must equal the authenticated account when supplied. diff --git a/skills/flashduty/reference/rum.md b/skills/flashduty/reference/rum.md index b9a1dff..81a38b6 100644 --- a/skills/flashduty/reference/rum.md +++ b/skills/flashduty/reference/rum.md @@ -98,6 +98,11 @@ Update application - `--type` string — enum: browser | ios | android | react-native | flutter | kotlin-multiplatform | roku | unity - body-only (`--data`): alerting (object); tracing (object) +### application-webhook-test +Test application webhook +- `` (positional, required) string — RUM application ID. +- `--webhook-url` string (required) — Webhook URL to receive the sample alert event. + ### issue-info Get issue detail - `` (positional, required) string — Issue ID. diff --git a/skills/flashduty/reference/status-page.md b/skills/flashduty/reference/status-page.md index 149fea0..aa55507 100644 --- a/skills/flashduty/reference/status-page.md +++ b/skills/flashduty/reference/status-page.md @@ -117,6 +117,26 @@ Update status page event - `--responders` intSlice — Member IDs responsible for this event. Pass the full replacement list. - `--title` string — New event title, up to 255 characters. Omit to keep the existing value. (≤255 chars) +### component-delete [...] +Delete status page component +- `` (positional, required) stringSlice — IDs of components to delete. +- `--page-id` int64 (required) — Status page ID. + +### component-upsert +Upsert status page component +- `` (positional, required) int64 — Status page ID. +- body-only (`--data`): components (array) (required) + +### create +Create status page + +### delete +Delete status page + +### info +Get status page detail +- `` (positional, required) string — Status page ID + ### list List status pages @@ -140,6 +160,16 @@ Cancel status page migration Get migration status - `` (positional, required) string — Migration job ID returned by 'migrate-structure' or 'migrate-email-subscribers'. +### section-delete [...] +Delete status page section +- `--page-id` int64 (required) — Status page ID. +- `` (positional, required) stringSlice — IDs of sections to delete. + +### section-upsert +Upsert status page section +- `` (positional, required) int64 — Status page ID. +- body-only (`--data`): sections (array) (required) + ### subscriber-export Export subscribers - `--component-ids` stringSlice — Optional component IDs to filter subscribers by. @@ -158,6 +188,26 @@ List status page subscribers - `--page` int64 — Page number (1-based). (min 1) - `` (positional, required) int64 — Status page ID. +### template-delete +Delete status page template +- `--page-id` int64 (required) — Status page ID. +- `--template-id` string (required) — Template ID to delete. +- `--type` string (required) — Template category. · enum: pre_defined | message + +### template-list +List status page templates +- `` (positional, required) int64 — Status page ID. +- `--type` string (required) — Template category. 'pre_defined' returns predefined event templates; 'message' returns message notification templates. · enum: pre_defined | message + +### template-upsert +Upsert status page template +- `` (positional, required) int64 — Status page ID. +- `--type` string (required) — Template category. 'pre_defined' for predefined event templates; 'message' for notification message templates. · enum: pre_defined | message +- body-only (`--data`): template (object) (required) + +### update +Update status page + ## Status values (load-bearing — a wrong value 400s)