diff --git a/go.mod b/go.mod index 16bc421..dc07fc6 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.15.7 + github.com/flashcatcloud/go-flashduty v0.15.8 github.com/mattn/go-runewidth v0.0.29 github.com/spf13/cobra v1.10.2 github.com/spf13/pflag v1.0.10 diff --git a/go.sum b/go.sum index 10a6dd0..90ffce7 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.15.7 h1:3bnopTmY2w6zUbPSV2MpLrHdzl1fr3hEM3DDbbj4cOY= -github.com/flashcatcloud/go-flashduty v0.15.7/go.mod h1:YpHiTYXR5NXBI/rGRZfUy537XMkhdCkwA8NW1QoRHwk= +github.com/flashcatcloud/go-flashduty v0.15.8 h1:F4eO4dZl7bwFDbH2YhovQVGhRF3jP43mUZsBEE/g/a0= +github.com/flashcatcloud/go-flashduty v0.15.8/go.mod h1:YpHiTYXR5NXBI/rGRZfUy537XMkhdCkwA8NW1QoRHwk= 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.29 h1:3oGF3R/S2N9DQ3ptftzVIvg2eicmojCzlwBEmqEPDfQ= diff --git a/internal/cli/zz_generated_changes.go b/internal/cli/zz_generated_changes.go index ad629dc..34ce6c5 100644 --- a/internal/cli/zz_generated_changes.go +++ b/internal/cli/zz_generated_changes.go @@ -61,7 +61,7 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; - account_id (integer) — Account this change belongs to. - change_id (string) — Change ID, a MongoDB ObjectID hex string. - change_key (string) — Stable key that groups events belonging to the same change. - - change_status (string) — Current lifecycle status of the change. | Value | Meaning | |---|---| | 'Planned' | Planned, not started. | | 'Ready' | Ready for execution. | | 'Processing' | Being executed. | | 'Canceled' | Canceled. | | 'Done' | Completed. | [Planned, Ready, Processing, Canceled, Done] + - change_status (string) — Current lifecycle status of the change. | Value | Meaning | |---|---| | 'Planned' | Planned, not started. | | 'Ready' | Ready for execution. | | 'Processing' | Being executed. | | 'Canceled' | Canceled. | | 'Done' | Completed. | | 'Failed' | Failed. | [Planned, Ready, Processing, Canceled, Done, Failed] - channel_id (integer) — Collaboration channel this change is routed to. - channel_name (string) — Name of the collaboration channel. - channel_status (string) — Status of the collaboration channel: 'enabled' or 'disabled'. [enabled, disabled] @@ -70,7 +70,7 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; - events (array) — Underlying change events, returned only when include_events is true. - account_id (integer) — Account this change event belongs to. - change_key (string) — Stable key that groups events belonging to the same change. - - change_status (string) — Lifecycle status of the change event, reported by the change source as execution progresses. | Value | Meaning | |---|---| | 'Planned' | Planned, not started. | | 'Ready' | Ready for execution. | | 'Processing' | Being executed. | | 'Canceled' | Canceled. | | 'Done' | Completed. | [Planned, Ready, Processing, Canceled, Done] + - change_status (string) — Lifecycle status of the change event, reported by the change source as execution progresses. | Value | Meaning | |---|---| | 'Planned' | Planned, not started. | | 'Ready' | Ready for execution. | | 'Processing' | Being executed. | | 'Canceled' | Canceled. | | 'Done' | Completed. | | 'Failed' | Failed. | [Planned, Ready, Processing, Canceled, Done, Failed] - channel_id (integer) — Collaboration channel this change event is routed to. - created_at (string) — Unix timestamp in seconds when the change event was created. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. - deleted_at (string) — Unix timestamp in seconds when the change event was deleted. Omitted when not deleted. CLI '--json' renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null. diff --git a/internal/cli/zz_generated_response_help.go b/internal/cli/zz_generated_response_help.go index 28c3d28..8fc3965 100644 --- a/internal/cli/zz_generated_response_help.go +++ b/internal/cli/zz_generated_response_help.go @@ -78,7 +78,7 @@ var responseHelpBySDKMethod = map[string]string{ "Calendars.CalendarCreate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - cal_id (string) (required) — ID of the newly created calendar (format cal.).\n - cal_name (string) (required) — Calendar display name.\n", "Calendars.CalendarInfo": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Account ID.\n - cal_id (string) (required) — Calendar ID.\n - cal_name (string) (required) — Calendar display name.\n - created_at (string) (required) — Creation timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - creator_id (integer) (required) — Creator person ID.\n - description (string) (required) — Calendar description.\n - extra_cal_ids (array) — Inherited public-holiday calendar IDs. Omitted when empty.\n - kind (string) (required) — Calendar kind. `region.official.holiday` is a public regional holiday calendar (served by the central holiday service), `religion.holiday` is a public religious holiday calendar (reserved, currently no data), and `personal` is an account-created personal/team calendar. [region.official.holiday, religion.holiday, personal]\n - status (string) (required) — Calendar status. `enabled` means usable; `deleted` means removed and never returned by list endpoints. [enabled, deleted]\n - team_id (integer) (required) — Owning team ID (0 when not assigned).\n - timezone (string) (required) — IANA timezone.\n - updated_at (string) (required) — Last update timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (integer) (required) — Last updater person ID.\n - workdays (array) — Workday numbers (0 = Sunday, 6 = Saturday). Omitted when empty.\n", "Calendars.CalendarList": "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 - cal_id (string) (required) — Calendar ID.\n - cal_name (string) (required) — Calendar display name.\n - created_at (string) (required) — Creation timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - creator_id (integer) (required) — Creator person ID.\n - description (string) (required) — Calendar description.\n - extra_cal_ids (array) — Inherited public-holiday calendar IDs. Omitted when empty.\n - kind (string) (required) — Calendar kind. `region.official.holiday` is a public regional holiday calendar (served by the central holiday service), `religion.holiday` is a public religious holiday calendar (reserved, currently no data), and `personal` is an account-created personal/team calendar. [region.official.holiday, religion.holiday, personal]\n - status (string) (required) — Calendar status. `enabled` means usable; `deleted` means removed and never returned by list endpoints. [enabled, deleted]\n - team_id (integer) (required) — Owning team ID (0 when not assigned).\n - timezone (string) (required) — IANA timezone.\n - updated_at (string) (required) — Last update timestamp (Unix seconds). CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (integer) (required) — Last updater person ID.\n - workdays (array) — Workday numbers (0 = Sunday, 6 = Saturday). Omitted when empty.\n", - "Changes.List": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) — Account this change belongs to.\n - change_id (string) — Change ID, a MongoDB ObjectID hex string.\n - change_key (string) — Stable key that groups events belonging to the same change.\n - change_status (string) — Current lifecycle status of the change. | Value | Meaning | |---|---| | `Planned` | Planned, not started. | | `Ready` | Ready for execution. | | `Processing` | Being executed. | | `Canceled` | Canceled. | | `Done` | Completed. | [Planned, Ready, Processing, Canceled, Done]\n - channel_id (integer) — Collaboration channel this change is routed to.\n - channel_name (string) — Name of the collaboration channel.\n - channel_status (string) — Status of the collaboration channel: `enabled` or `disabled`. [enabled, disabled]\n - description (string) — Change description.\n - end_time (string) — Unix timestamp in seconds when the change ended. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - events (array) — Underlying change events, returned only when include_events is true.\n - account_id (integer) — Account this change event belongs to.\n - change_key (string) — Stable key that groups events belonging to the same change.\n - change_status (string) — Lifecycle status of the change event, reported by the change source as execution progresses. | Value | Meaning | |---|---| | `Planned` | Planned, not started. | | `Ready` | Ready for execution. | | `Processing` | Being executed. | | `Canceled` | Canceled. | | `Done` | Completed. | [Planned, Ready, Processing, Canceled, Done]\n - channel_id (integer) — Collaboration channel this change event is routed to.\n - created_at (string) — Unix timestamp in seconds when the change event was created. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - deleted_at (string) — Unix timestamp in seconds when the change event was deleted. Omitted when not deleted. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - description (string) — Change event description.\n - event_id (string) — Change event ID, a MongoDB ObjectID hex string.\n - event_time (string) — Unix timestamp in seconds when the change event occurred. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - integration_id (integer) — Integration that reported this change event.\n - labels (object) — Key-value labels attached to the change event.\n - link (string) — External link to the source change record.\n - title (string) — Change event title.\n - updated_at (string) — Unix timestamp in seconds when the change event was last updated. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - integration_id (integer) — Integration that reported this change.\n - integration_name (string) — Name of the reporting integration.\n - labels (object) — Key-value labels attached to the change.\n - last_time (string) — Unix timestamp in seconds of the most recent change activity. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - link (string) — External link to the source change record.\n - start_time (string) — Unix timestamp in seconds when the change started. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - title (string) — Change title.\n", + "Changes.List": "Response fields (this command's `--json` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) — Account this change belongs to.\n - change_id (string) — Change ID, a MongoDB ObjectID hex string.\n - change_key (string) — Stable key that groups events belonging to the same change.\n - change_status (string) — Current lifecycle status of the change. | Value | Meaning | |---|---| | `Planned` | Planned, not started. | | `Ready` | Ready for execution. | | `Processing` | Being executed. | | `Canceled` | Canceled. | | `Done` | Completed. | | `Failed` | Failed. | [Planned, Ready, Processing, Canceled, Done, Failed]\n - channel_id (integer) — Collaboration channel this change is routed to.\n - channel_name (string) — Name of the collaboration channel.\n - channel_status (string) — Status of the collaboration channel: `enabled` or `disabled`. [enabled, disabled]\n - description (string) — Change description.\n - end_time (string) — Unix timestamp in seconds when the change ended. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - events (array) — Underlying change events, returned only when include_events is true.\n - account_id (integer) — Account this change event belongs to.\n - change_key (string) — Stable key that groups events belonging to the same change.\n - change_status (string) — Lifecycle status of the change event, reported by the change source as execution progresses. | Value | Meaning | |---|---| | `Planned` | Planned, not started. | | `Ready` | Ready for execution. | | `Processing` | Being executed. | | `Canceled` | Canceled. | | `Done` | Completed. | | `Failed` | Failed. | [Planned, Ready, Processing, Canceled, Done, Failed]\n - channel_id (integer) — Collaboration channel this change event is routed to.\n - created_at (string) — Unix timestamp in seconds when the change event was created. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - deleted_at (string) — Unix timestamp in seconds when the change event was deleted. Omitted when not deleted. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - description (string) — Change event description.\n - event_id (string) — Change event ID, a MongoDB ObjectID hex string.\n - event_time (string) — Unix timestamp in seconds when the change event occurred. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - integration_id (integer) — Integration that reported this change event.\n - labels (object) — Key-value labels attached to the change event.\n - link (string) — External link to the source change record.\n - title (string) — Change event title.\n - updated_at (string) — Unix timestamp in seconds when the change event was last updated. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - integration_id (integer) — Integration that reported this change.\n - integration_name (string) — Name of the reporting integration.\n - labels (object) — Key-value labels attached to the change.\n - last_time (string) — Unix timestamp in seconds of the most recent change activity. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - link (string) — External link to the source change record.\n - start_time (string) — Unix timestamp in seconds when the change started. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - title (string) — Change title.\n", "Channels.ChannelCreate": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - channel_id (integer) (required) — Newly created channel ID.\n - channel_name (string) (required) — Channel name echoed back from the request.\n - external_report_token (string) — External report token. Emitted only when external reporting is enabled.\n", "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) — Delay 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 (string) (required) — Creation time, Unix timestamp in seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - deleted_at (string) — Deletion time, Unix timestamp in seconds. Omitted unless the rule is soft-deleted; deleted rules are excluded from list responses. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - description (string) (required) — Rule description.\n - filters (object) (required) — Incident-level match conditions (OR-of-AND tree): the rule is matched against the incident the alert was grouped into, not against the alert itself. Omit or leave empty to apply the rule to all incidents in the channel.\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) — Notify channels used for Critical severity. Personal channels: `sms`, `voice`, `email`, `push`; IM group-chat channels: `feishu_app:`, `dingtalk_app:`, `wecom_app:`, `slack_app:`, `teams_app:`.\n - follow_preference (boolean) — When true, use each responder's personal preference instead of the lists below.\n - info (array) — Notify channels used for Info severity. Values as for `critical`.\n - warning (array) — Notify channels used for Warning severity. Values as for `critical`.\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, one of `feishu`, `feishu_app`, `dingtalk`, `dingtalk_app`, `wecom`, `slack`, `slack_app`, `teams_app`, `telegram`, `zoom`.\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` means active, `disabled` means paused, `deleted` is soft-deleted (possible only from the detail endpoint; lists never return deleted rules). [enabled, disabled, deleted]\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 (string) (required) — Last update time, Unix timestamp in seconds. CLI `--json` renders this as an RFC3339 string in the process's local timezone (NOT UTC, and NOT the wire integer); an unset value renders as null.\n - updated_by (integer) (required) — Member ID that last updated the rule.\n",