diff --git a/go.mod b/go.mod index 23aa614..3c98e46 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/flashcatcloud/flashduty-cli go 1.26.0 require ( - github.com/flashcatcloud/go-flashduty v0.15.16 + github.com/flashcatcloud/go-flashduty v0.15.17 github.com/mattn/go-runewidth v0.0.30 github.com/spf13/cobra v1.10.2 github.com/spf13/pflag v1.0.10 diff --git a/go.sum b/go.sum index ee570a4..81128d3 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.16 h1:h04Z0NGxB4ujlfKliVPD8QhgLgBObeAoRMz9rXJpnes= -github.com/flashcatcloud/go-flashduty v0.15.16/go.mod h1:YpHiTYXR5NXBI/rGRZfUy537XMkhdCkwA8NW1QoRHwk= +github.com/flashcatcloud/go-flashduty v0.15.17 h1:AkWSRYEUdMMYAI7WJbzHIHBnZ+FqcbMAwK8aInOOLpI= +github.com/flashcatcloud/go-flashduty v0.15.17/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.30 h1:+KUuiDA4fF0R1p5FeueHefjDm+GIM+kWfFnDjybOPgk= diff --git a/internal/cli/command.go b/internal/cli/command.go index a18c417..d31b696 100644 --- a/internal/cli/command.go +++ b/internal/cli/command.go @@ -102,6 +102,9 @@ type listPage struct { // TotalCapped marks an endpoint that stops counting at serverCountCap; its // callers must also set More, the only "rows remain" signal past the cap. TotalCapped bool + // Siblings names the response fields beside the rows that are not + // pagination metadata; a table shows only the rows. + Siblings []string } // totalKnown reports whether Total is a usable server total. A total below the diff --git a/internal/cli/gen_support.go b/internal/cli/gen_support.go index fdcc72d..54cbe4f 100644 --- a/internal/cli/gen_support.go +++ b/internal/cli/gen_support.go @@ -698,9 +698,11 @@ func narrowNumbers(value any) any { // listEnvelopeKey reports whether value is a paginated list envelope — exactly // one array field named items/docs/list with only scalar siblings (total, -// has_next_page, search_after_ctx, …) — and returns the row array's key. It -// mirrors cligen's listEnvelope (internal/cmd/cligen), which classifies the -// same shape when generating these commands. +// has_next_page, search_after_ctx, …) — and returns the row array's key. It is +// stricter than cligen's listEnvelope, which also accepts object or array +// siblings: those cannot be shortened to fit the output limit (a calendar +// year's days map alone exceeds it), so such a response prints whole, like a +// detail object. func listEnvelopeKey(value map[string]any) (string, bool) { key := "" for name, field := range value { diff --git a/internal/cli/generic_table.go b/internal/cli/generic_table.go index 2a9889e..722cfec 100644 --- a/internal/cli/generic_table.go +++ b/internal/cli/generic_table.go @@ -62,7 +62,13 @@ func renderGenericTable(ctx *RunContext, data any, win listWindow) error { } if rows, pg, ok := genericListPage(v, win); ok { - return renderRowTable(ctx, rows, pg) + if err := renderRowTable(ctx, rows, pg); err != nil { + return err + } + if len(pg.Siblings) > 0 { + _, _ = fmt.Fprintf(ctx.Writer, "Also in the response: %s (use --json to see it).\n", strings.Join(pg.Siblings, ", ")) + } + return nil } if v.Kind() == reflect.Struct { if err := renderVertical(ctx, v); err != nil { @@ -96,7 +102,7 @@ func genericListPage(v reflect.Value, win listWindow) (rows reflect.Value, pg li if rows, meta, ok = listEnvelope(v); !ok { return reflect.Value{}, pg, false } - pg.Total, pg.More = meta.total, meta.more + pg.Total, pg.More, pg.Siblings = meta.total, meta.more, meta.siblings default: return reflect.Value{}, pg, false } @@ -106,18 +112,27 @@ func genericListPage(v reflect.Value, win listWindow) (rows reflect.Value, pg li // listMeta is the pagination metadata a list envelope carries. type listMeta struct { - total int // negative when the envelope has no Total field - more moreState // from HasNextPage or NextCursor + total int // negative when the envelope has no Total field + more moreState // from HasNextPage, HasMore or NextCursor + siblings []string // wire names of the non-pagination fields beside the rows } +// listRowFields are the Go names of the row fields — wire items, docs, list, the +// names cligen's listEnvelope matches — that mark a list envelope even when it +// carries more than pagination metadata. +var listRowFields = map[string]bool{"Items": true, "Docs": true, "List": true} + // listEnvelope reports whether struct v is a paginated list envelope: exactly // one exported field that is a slice of structs (the rows), with any remaining -// fields limited to pagination metadata. It returns the rows value and that -// metadata (Total; HasNextPage or NextCursor as the has-more signal). +// fields limited to pagination metadata — or, when the rows field is Items, Docs +// or List, any other fields too, reported as siblings. It returns the rows value +// and that metadata (Total; HasNextPage, HasMore or NextCursor as the has-more +// signal). func listEnvelope(v reflect.Value) (rows reflect.Value, meta listMeta, ok bool) { t := v.Type() meta.total = -1 found := false + rowsName := "" for i := 0; i < t.NumField(); i++ { f := t.Field(i) if f.PkgPath != "" { // unexported @@ -128,18 +143,19 @@ func listEnvelope(v reflect.Value) (rows reflect.Value, meta listMeta, ok bool) if found { return reflect.Value{}, meta, false // ambiguous: more than one row slice } - rows, found = fv, true + rows, found, rowsName = fv, true, f.Name continue } if !isListMetadataField(f, fv) { - return reflect.Value{}, meta, false + meta.siblings = append(meta.siblings, wireName(f)) + continue } switch f.Name { case "Total": if meta.total < 0 { meta.total = int(fv.Int()) } - case "HasNextPage": + case "HasNextPage", "HasMore": meta.more = moreNo if fv.Bool() { meta.more = moreYes @@ -151,12 +167,20 @@ func listEnvelope(v reflect.Value) (rows reflect.Value, meta listMeta, ok bool) } } } - if !found { + if !found || (len(meta.siblings) > 0 && !listRowFields[rowsName]) { return reflect.Value{}, meta, false } return rows, meta, true } +// wireName is f's JSON name, falling back to the Go field name. +func wireName(f reflect.StructField) string { + if name, _, _ := strings.Cut(f.Tag.Get("json"), ","); name != "" && name != "-" { + return name + } + return f.Name +} + func isListMetadataField(f reflect.StructField, fv reflect.Value) bool { if f.Anonymous && f.Name == "ListOptions" { return true @@ -164,7 +188,7 @@ func isListMetadataField(f reflect.StructField, fv reflect.Value) bool { switch f.Name { case "Total": return fv.CanInt() - case "HasNextPage": + case "HasNextPage", "HasMore": return fv.Kind() == reflect.Bool case "SearchAfterCtx", "NextCursor": return fv.Kind() == reflect.String @@ -454,15 +478,7 @@ func isScalarType(t reflect.Type) bool { // headerFromField derives a column header from a field's json tag (upper-cased), // falling back to the Go field name. func headerFromField(f reflect.StructField) string { - if tag := f.Tag.Get("json"); tag != "" { - if c := strings.IndexByte(tag, ','); c >= 0 { - tag = tag[:c] - } - if tag != "" && tag != "-" { - return strings.ToUpper(tag) - } - } - return strings.ToUpper(f.Name) + return strings.ToUpper(wireName(f)) } // jsonFallback prints indented JSON — the last resort when a response is neither diff --git a/internal/cli/generic_table_test.go b/internal/cli/generic_table_test.go index a733d7d..44b4ea9 100644 --- a/internal/cli/generic_table_test.go +++ b/internal/cli/generic_table_test.go @@ -135,6 +135,74 @@ func TestRenderGenericTable_Empty(t *testing.T) { } } +// An items envelope may carry fields beyond pagination metadata (calendar +// event list's days map): the rows still print as a table and the extra fields +// are named instead of being flattened into the output. +func TestRenderGenericTable_EnvelopeWithSiblings(t *testing.T) { + type resp struct { + Days map[string]heuristicRow `json:"days"` + Items []heuristicRow `json:"items"` + Total int `json:"total"` + } + var buf bytes.Buffer + in := &resp{Days: map[string]heuristicRow{"2026-01-01": {}}, Items: []heuristicRow{{Name: "alpha", Count: 7}}, Total: 1} + if err := renderGenericTable(tableCtx(&buf), in, listWindow{}); err != nil { + t.Fatalf("render: %v", err) + } + got := buf.String() + for _, want := range []string{"NAME", "alpha", "(total 1).", "Also in the response: days (use --json to see it)."} { + if !strings.Contains(got, want) { + t.Errorf("output missing %q\n---\n%s", want, got) + } + } + if strings.Contains(got, "2026-01-01") { + t.Errorf("sibling values must stay out of the table\n%s", got) + } +} + +func TestRenderGenericTable_EmptyEnvelopeWithSiblings(t *testing.T) { + type resp struct { + Items []heuristicRow `json:"items"` + ReleaseLimited bool `json:"release_limited"` + } + var buf bytes.Buffer + if err := renderGenericTable(tableCtx(&buf), &resp{}, listWindow{}); err != nil { + t.Fatalf("render: %v", err) + } + want := "No results.\nAlso in the response: release_limited (use --json to see it).\n" + if got := buf.String(); got != want { + t.Errorf("got %q, want %q", got, want) + } +} + +// HasMore is pagination metadata (the work item list's has-more flag), not a +// sibling worth naming. +func TestGenericListPage_HasMoreIsMetadata(t *testing.T) { + type resp struct { + HasMore bool `json:"has_more"` + Items []heuristicRow `json:"items"` + } + _, pg, ok := genericListPage(reflect.ValueOf(resp{HasMore: true, Items: []heuristicRow{{Name: "a"}}}), listWindow{}) + if !ok { + t.Fatal("expected a list envelope") + } + if pg.More != moreYes || len(pg.Siblings) != 0 { + t.Errorf("More = %v, Siblings = %v; want moreYes and none", pg.More, pg.Siblings) + } +} + +// A struct whose only row slice is not items/docs/list and that carries other +// fields is a detail object with a nested list, not a list envelope. +func TestGenericListPage_NestedRowsInDetailObject(t *testing.T) { + type detail struct { + Name string `json:"name"` + Responders []heuristicRow `json:"responders"` + } + if _, _, ok := genericListPage(reflect.ValueOf(detail{Name: "x"}), listWindow{}); ok { + t.Fatal("detail object with a nested row slice must not be treated as a list") + } +} + func TestRenderGenericTable_DetailVertical(t *testing.T) { var buf bytes.Buffer row := heuristicRow{Name: "solo", Count: 42} diff --git a/internal/cli/zz_generated_calendars.go b/internal/cli/zz_generated_calendars.go index 221ef44..6f08ec5 100644 --- a/internal/cli/zz_generated_calendars.go +++ b/internal/cli/zz_generated_calendars.go @@ -11,30 +11,44 @@ import ( func genCalendarsCalEventDeleteCmd() *cobra.Command { var dataJSON string var fCalID string + var fEndAt string var fEventID string + var fStartAt string cmd := &cobra.Command{ - Use: "event-delete", + Use: "event-delete ", Short: "Delete calendar event", Long: `Delete calendar event. -Delete a calendar event by calendar ID and event ID. +Delete one event of a personal calendar by event_id, or clear the calendar's own events off the days [start_at, end_at). Pass either event_id or both start_at and end_at. Cleared days fall back to the linked holiday calendars and the weekly workdays. API: POST /calendar/event/delete (calEventDelete) Request fields: --cal-id string (required) — Calendar ID; obtain it from 'POST /calendar/list'. - --event-id string (required) — Event ID. + --end-at string — End date of the range to clear, in YYYY-MM-DD (exclusive). Must be later than start_at. + --event-id string — ID of the event to delete. Omit when clearing a date range. + --start-at string — Start date of the range to clear, in YYYY-MM-DD. Pass together with end_at instead of event_id. `, + Args: requireBodyFieldOrExactArg("cal_id", "cal-id"), Example: ` flashduty calendar event-delete --data '{"cal_id":"cal.QiNvtdKs4Wj52kZhT3LafM","event_id":"cale.KyG9XWTCU5CucbwukEVBQ4"}'`, 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, "cal_id", "string"); err != nil { + return err + } if cmd.Flags().Changed("cal-id") { body["cal_id"] = fCalID } + if cmd.Flags().Changed("end-at") { + body["end_at"] = fEndAt + } if cmd.Flags().Changed("event-id") { body["event_id"] = fEventID } + if cmd.Flags().Changed("start-at") { + body["start_at"] = fStartAt + } return nil }) if err != nil { @@ -57,7 +71,9 @@ Request fields: }, } cmd.Flags().StringVar(&fCalID, "cal-id", "", "Calendar ID; obtain it from 'POST /calendar/list'. (required)") - cmd.Flags().StringVar(&fEventID, "event-id", "", "Event ID. (required)") + cmd.Flags().StringVar(&fEndAt, "end-at", "", "End date of the range to clear, in YYYY-MM-DD (exclusive). Must be later than start_at.") + cmd.Flags().StringVar(&fEventID, "event-id", "", "ID of the event to delete. Omit when clearing a date range.") + cmd.Flags().StringVar(&fStartAt, "start-at", "", "Start date of the range to clear, in YYYY-MM-DD. Pass together with end_at instead of event_id.") 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 } @@ -73,7 +89,7 @@ func genCalendarsCalEventListCmd() *cobra.Command { Short: "List calendar events", Long: `List calendar events. -Return events for a personal calendar within a year/month/day scope. When month and day are both omitted the whole year is returned. +Return events for a personal calendar within a year/month/day scope. When month and day are both omitted the whole year is returned. The response also carries days, the resolved state of every day in the scope. API: POST /calendar/event/list (calEventList) @@ -84,6 +100,7 @@ Request fields: --year int — Year. Defaults to the current year when omitted. (min 2023) Response fields ('data' envelope is unwrapped — rows are nested under items[]; pipe 'jq '.items[]'', NOT '.data.items[]'): + - days (object) (required) — Resolved state of every day in the requested scope, keyed by date (YYYY-MM-DD). The highest layer holding any event decides a day: the calendar's own events (custom), then the linked holiday calendars (holiday), then the weekly workdays (weekly). Inside one layer a working-day event beats a day off, so a make-up workday from a holiday calendar wins over holiday rest days. A day no event covers is a working day. - items (array) (required) — Calendar events sorted by start_at. - account_id (integer) — Account ID. Only present for private events. - cal_id (string) (required) — Calendar ID. For public events this is a locale key such as zh-cn.china.official. @@ -157,7 +174,7 @@ func genCalendarsCalEventUpsertCmd() *cobra.Command { Short: "Upsert calendar event", Long: `Upsert calendar event. -Create or update a calendar event (holiday or workday override). Omit event_id to create a new event. +Create or update an event the calendar owns (a day off or a working-day override) over the days [start_at, end_at). Omit event_id to create a new event; a given event_id must be an existing event of this calendar. The write clears the calendar's other own events off the same days: an event fully inside the range is deleted, one partly inside is shortened, and one spanning the range is split in two, so the latest write decides those days. end_at must be later than start_at. API: POST /calendar/event/upsert (calEventUpsert) @@ -168,7 +185,7 @@ Request fields: --event-id string — Event ID. Omit when creating. (≤63 chars) --is-off bool (required) — Whether the event marks a non-working day. true = day off, false = working day override. --start-at string (required) — Event start date in YYYY-MM-DD. - --summary string (required) — Event summary. (1-39 chars) + --summary string — Event summary. Optional. (≤39 chars) Response fields ('data' envelope is unwrapped — these fields are at the top level): - cal_id (string) (required) — Calendar ID. @@ -227,7 +244,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le cmd.Flags().StringVar(&fEventID, "event-id", "", "Event ID. Omit when creating. (≤63 chars)") cmd.Flags().BoolVar(&fIsOff, "is-off", false, "Whether the event marks a non-working day. true = day off, false = working day override. (required)") cmd.Flags().StringVar(&fStartAt, "start-at", "", "Event start date in YYYY-MM-DD. (required)") - cmd.Flags().StringVar(&fSummary, "summary", "", "Event summary. (required) (1-39 chars)") + cmd.Flags().StringVar(&fSummary, "summary", "", "Event summary. Optional. (≤39 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 } diff --git a/internal/cli/zz_generated_incidents.go b/internal/cli/zz_generated_incidents.go index 66d3040..b4a2447 100644 --- a/internal/cli/zz_generated_incidents.go +++ b/internal/cli/zz_generated_incidents.go @@ -3570,7 +3570,7 @@ API: POST /incident/work-item/complete (incidentWorkItemComplete) Request fields: --idempotency-key string (required) — Client-generated idempotency key (max 128 characters; letters, digits, '_', '-', '.', ':' only). (≤128 chars) - --target-status string (required) — Client-defined status to set (max 64 characters). There is no fixed state machine. (≤64 chars) + --target-status string (required) — Target status. Must be 'done'; any other value is rejected. [done] (≤64 chars) --version int (required) — Current item version for optimistic locking. Must match the stored version. --work-item-id string (required) — Work item ID (opaque string, max 128 characters). (≤128 chars) @@ -3641,7 +3641,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }, } cmd.Flags().StringVar(&fIdempotencyKey, "idempotency-key", "", "Client-generated idempotency key (max 128 characters; letters, digits, '_', '-', '.', ':' only). (required) (≤128 chars)") - cmd.Flags().StringVar(&fTargetStatus, "target-status", "", "Client-defined status to set (max 64 characters). There is no fixed state machine. (required) (≤64 chars)") + cmd.Flags().StringVar(&fTargetStatus, "target-status", "", "Target status. Must be 'done'; any other value is rejected. (required) [done] (≤64 chars)") cmd.Flags().Int64Var(&fVersion, "version", 0, "Current item version for optimistic locking. Must match the stored version. (required)") cmd.Flags().StringVar(&fWorkItemID, "work-item-id", "", "Work item ID (opaque string, max 128 characters). (required) (≤128 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.") @@ -3665,7 +3665,7 @@ API: POST /incident/work-item/convert (incidentWorkItemConvert) Request fields: --idempotency-key string (required) — Client-generated idempotency key (max 128 characters; letters, digits, '_', '-', '.', ':' only). (≤128 chars) - --target-status string — Optional client-defined status to set on the converted follow-up (max 64 characters). (≤64 chars) + --target-status string — Optional status to set on the converted follow-up. One of 'open', 'in_progress', 'done', 'cancelled'. [open, in_progress, done, cancelled] (≤64 chars) --version int (required) — Current item version for optimistic locking. Must match the stored version. --work-item-id string (required) — Work item ID (opaque string, max 128 characters). (≤128 chars) @@ -3736,7 +3736,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le }, } cmd.Flags().StringVar(&fIdempotencyKey, "idempotency-key", "", "Client-generated idempotency key (max 128 characters; letters, digits, '_', '-', '.', ':' only). (required) (≤128 chars)") - cmd.Flags().StringVar(&fTargetStatus, "target-status", "", "Optional client-defined status to set on the converted follow-up (max 64 characters). (≤64 chars)") + cmd.Flags().StringVar(&fTargetStatus, "target-status", "", "Optional status to set on the converted follow-up. One of 'open', 'in_progress', 'done', 'cancelled'. [open, in_progress, done, cancelled] (≤64 chars)") cmd.Flags().Int64Var(&fVersion, "version", 0, "Current item version for optimistic locking. Must match the stored version. (required)") cmd.Flags().StringVar(&fWorkItemID, "work-item-id", "", "Work item ID (opaque string, max 128 characters). (required) (≤128 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.") @@ -3771,7 +3771,7 @@ Request fields: --item-type string (required) — 'action' anchors to an active incident and must not set 'post_mortem_id'; 'follow_up' requires 'post_mortem_id'. [action, follow_up] --post-mortem-id string — Post-mortem ID (32-character hex string). Required for 'follow_up', forbidden for 'action'. The post-mortem must be linked to 'incident_id'. --priority string — Optional client-defined priority (max 64 characters). (≤64 chars) - --status string — Optional client-defined initial status (max 64 characters). (≤64 chars) + --status string — Initial status. One of 'open', 'in_progress', 'done', 'cancelled'; defaults to 'open' when omitted or blank. [open, in_progress, done, cancelled] (≤64 chars) --title string (required) — Item title (max 512 characters). (≤512 chars) assignees (array, via --data) — Initial assignees. Each entry is '{type, id?}'. 'type' is 'person' or 'ai_sre'; an 'ai_sre' entry omits 'id'. Mutually exclusive with 'assignee_ids': sending both returns an error. 'assignee_ids' is the legacy alias and is equivalent to an all-'person' list. At most 20 entries. Person assignees must be active members who can already read the anchor; assignment never grants access. - id (integer) — Member ID. Required when 'type' is 'person'. Omitted when 'type' is 'ai_sre'. @@ -3864,7 +3864,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le cmd.Flags().StringVar(&fItemType, "item-type", "", "'action' anchors to an active incident and must not set 'post_mortem_id'; 'follow_up' requires 'post_mortem_id'. (required) [action, follow_up]") cmd.Flags().StringVar(&fPostMortemID, "post-mortem-id", "", "Post-mortem ID (32-character hex string). Required for 'follow_up', forbidden for 'action'. The post-mortem must be linked to 'incident_id'.") cmd.Flags().StringVar(&fPriority, "priority", "", "Optional client-defined priority (max 64 characters). (≤64 chars)") - cmd.Flags().StringVar(&fStatus, "status", "", "Optional client-defined initial status (max 64 characters). (≤64 chars)") + cmd.Flags().StringVar(&fStatus, "status", "", "Initial status. One of 'open', 'in_progress', 'done', 'cancelled'; defaults to 'open' when omitted or blank. [open, in_progress, done, cancelled] (≤64 chars)") cmd.Flags().StringVar(&fTitle, "title", "", "Item title (max 512 characters). (required) (≤512 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 @@ -4174,7 +4174,7 @@ API: POST /incident/work-item/update (incidentWorkItemUpdate) Request fields: --description string — New description (max 65,535 characters). (≤65535 chars) --priority string — New client-defined priority (max 64 characters). (≤64 chars) - --status string — New client-defined status (max 64 characters). (≤64 chars) + --status string — New status. One of 'open', 'in_progress', 'done', 'cancelled'. [open, in_progress, done, cancelled] (≤64 chars) --title string — New title (max 512 characters). (≤512 chars) --version int (required) — Current item version for optimistic locking. Must match the stored version. --work-item-id string (required) — Work item ID (opaque string, max 128 characters). (≤128 chars) @@ -4253,7 +4253,7 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le } cmd.Flags().StringVar(&fDescription, "description", "", "New description (max 65,535 characters). (≤65535 chars)") cmd.Flags().StringVar(&fPriority, "priority", "", "New client-defined priority (max 64 characters). (≤64 chars)") - cmd.Flags().StringVar(&fStatus, "status", "", "New client-defined status (max 64 characters). (≤64 chars)") + cmd.Flags().StringVar(&fStatus, "status", "", "New status. One of 'open', 'in_progress', 'done', 'cancelled'. [open, in_progress, done, cancelled] (≤64 chars)") cmd.Flags().StringVar(&fTitle, "title", "", "New title (max 512 characters). (≤512 chars)") cmd.Flags().Int64Var(&fVersion, "version", 0, "Current item version for optimistic locking. Must match the stored version. (required)") cmd.Flags().StringVar(&fWorkItemID, "work-item-id", "", "Work item ID (opaque string, max 128 characters). (required) (≤128 chars)") diff --git a/internal/cli/zz_generated_licenses.go b/internal/cli/zz_generated_licenses.go index 43a8aec..cd4ae01 100644 --- a/internal/cli/zz_generated_licenses.go +++ b/internal/cli/zz_generated_licenses.go @@ -23,6 +23,7 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; - type (string) (required) — License assignment type. 'fixed' is explicitly assigned; 'temporary' is held from the active license window. [fixed, temporary] - updated_at (string) (required) — Unix timestamp when a fixed license was last changed. '0' for temporary licenses. 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. - updated_by (integer) (required) — Person ID that last changed a fixed license. '0' for temporary licenses. + - release_limited (boolean) (required) — Whether the account has used up its license release quota for the current 30-day window. While 'true', releasing a seat fails with error code 'NoLicense'. - total (integer) (required) — Number of people holding an active license. `, Example: ` flashduty oncall license-list --data '{}'`, diff --git a/internal/cli/zz_generated_response_help.go b/internal/cli/zz_generated_response_help.go index 3da5463..fd2434a 100644 --- a/internal/cli/zz_generated_response_help.go +++ b/internal/cli/zz_generated_response_help.go @@ -202,11 +202,11 @@ var responseHelpBySDKMethod = map[string]string{ "RuleFolders.List": "Response fields (`data` is a TOP-LEVEL array of these row objects — pipe `jq '.[]'`, NOT `.items[]`):\n - account_id (integer) (required) — Owning account ID.\n - created_at (string) (required) — 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 - creator_id (integer) (required) — Member ID of the creator.\n - creator_name (string) (required) — Name of the creator.\n - id (integer) (required) — Folder ID.\n - name (string) (required) — Folder name.\n - note (string) (required) — Free-form note.\n - parent_id (integer) (required) — Parent folder ID; 0 at the root.\n - parent_path (string) (required) — Comma-separated ancestor IDs from the root, excluding this folder; empty at the root.\n - team_id (integer) (required) — Team the folder is scoped to; 0 when account-wide.\n - updated_at (string) (required) — 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 - updater_id (integer) (required) — Member ID of the last updater.\n - updater_name (string) (required) — Name of the last updater.\n", "Schedules.ByPerson": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - current (object) — One on-call shift interval of a member.\n - end_at (string) — Unix timestamp in seconds - when the shift ends. Absent while the shift is ongoing. 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 - schedule_id (integer) — Owning schedule ID.\n - schedule_name (string) — Owning schedule name.\n - start_at (string) — Unix timestamp in seconds - when the shift starts. 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 - next (object) — One on-call shift interval of a member.\n - end_at (string) — Unix timestamp in seconds - when the shift ends. Absent while the shift is ongoing. 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 - schedule_id (integer) — Owning schedule ID.\n - schedule_name (string) — Owning schedule name.\n - start_at (string) — Unix timestamp in seconds - when the shift starts. 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 - schedules (array) (required) — All enabled schedules the member participates in.\n - schedule_id (integer) — Schedule ID.\n - schedule_name (string) — Schedule name.\n", "Schedules.Create": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - schedule_id (integer) (required) — ID of the newly created schedule.\n", - "Schedules.Info": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Account ID.\n - create_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 - create_by (integer) (required) — Creator person ID.\n - cur_oncall (object) (required) — Current on-call group, or null when nobody is on-call.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group on duty for the shift.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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. (min 0)\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 (string) (required) — Shift start 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 - update_at (string) (required) — 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 - weight (integer) (required) — Layer weight the shift comes from.\n - description (string) (required) — Schedule description. null when returned from /schedule/preview.\n - disabled (integer) (required) — Disabled flag (0 = enabled, 1 = disabled). Deprecated. null when returned from /schedule/preview.\n - end (string) — Window end (Unix seconds). Omitted when 0 (no window requested). 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 - field (string) — Field name used by the legacy update-field endpoint.\n - final_schedule (object) (required) — Collapsed final schedule across all layers.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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 (string) (required) — Shift start 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 - group_id (integer) (required) — Legacy team/group ID. null when returned from /schedule/preview.\n - id (integer) (required) — Schedule ID. null when returned from /schedule/preview.\n - layer_schedules (array) (required) — Alias of schedule_layers returned for compatibility. Null when not computed.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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 (string) (required) — Shift start 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 - layers (array) (required) — Rotation layers defined on the schedule. Null when layers were not loaded (for example by `/schedule/infos`, or by `/schedule/list` without start/end).\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.\n - repeat (array) — Weekday numbers (0 = Sunday) included in the rotation. Conflicts with restrict_mode = 2 (week).\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. Null when not set.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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. (min 0)\n - name (string) (required) — Legacy group name.\n - start (integer) (required) — Group start timestamp (Unix seconds).\n - handoff_time (integer) (required) — Rotation handoff time as a weekly offset in seconds (weekday x 86400 + seconds since midnight), not an absolute Unix timestamp.\n - hidden (integer) (required) — Whether the layer is hidden in the UI (0 = no, 1 = yes).\n - layer_end (integer) — Layer end timestamp (Unix seconds). null means open-ended.\n - layer_name (string) — User-facing layer name. Null when not set.\n - layer_start (integer) — Layer effective start (Unix seconds). Null when not set.\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. Null when not set.\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. On-call assignees rotate in turn by this unit. | Value | Meaning | |---|---| | `hour` | Rotates hourly. | | `day` | Rotates daily. | | `week` | Rotates weekly. | | `month` | Rotates monthly. | [hour, day, week, month]\n - rotation_value (integer) (required) — Rotation quantity (number of rotation_unit per cycle). (min 0)\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 (string) (required) — Schedule name (legacy field; mirrors schedule_name). null when returned from /schedule/preview.\n - next_oncall (object) (required) — Next on-call group, or null when unknown.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group on duty for the shift.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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. (min 0)\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 (string) (required) — Shift start 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 - update_at (string) (required) — 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 - weight (integer) (required) — Layer weight the shift comes from.\n - notify (object) (required) — Notification configuration. Null when the schedule has none.\n - advance_in_time (integer) — Advance notification lead time in seconds. `0` notifies exactly at shift start; omitting disables advance notification.\n - by (object) (required) — Recipient notification preference; null when not configured.\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; null when not configured.\n - cycle (string) (required) — Notification cycle; only `day` is supported. [day]\n - start (string) (required) — Time of day to send, format `HH:MM` (24-hour).\n - im (object) — Legacy IM-type to token map.\n - webhooks (array) (required) — IM webhook notification channels; null when not configured.\n - settings (object) (required) — Webhook channel settings.\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. Null when returned from `/schedule/preview`.\n - schedule_layers (array) (required) — Computed per-layer schedules for the requested window. Null when not computed.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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 (string) (required) — Shift start 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 - schedule_name (string) (required) — Schedule display name. null when returned from /schedule/preview.\n - start (string) — Window start (Unix seconds). Omitted when 0 (no window requested). 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 - status (integer) (required) — Legacy status flag. Deprecated. null when returned from /schedule/preview.\n - team_id (integer) (required) — Owning team ID. null when returned from /schedule/preview.\n - update_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 - update_by (integer) (required) — Last updater person ID.\n", - "Schedules.Infos": "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 (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 - create_by (integer) (required) — Creator person ID.\n - cur_oncall (object) (required) — Current on-call group, or null when nobody is on-call.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group on duty for the shift.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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 (string) (required) — Shift start 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 - update_at (string) (required) — 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 - weight (integer) (required) — Layer weight the shift comes from.\n - description (string) (required) — Schedule description. null when returned from /schedule/preview.\n - disabled (integer) (required) — Disabled flag (0 = enabled, 1 = disabled). Deprecated. null when returned from /schedule/preview.\n - end (string) — Window end (Unix seconds). Omitted when 0 (no window requested). 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 - field (string) — Field name used by the legacy update-field endpoint.\n - final_schedule (object) (required) — Collapsed final schedule across all layers.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start 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 - group_id (integer) (required) — Legacy team/group ID. null when returned from /schedule/preview.\n - id (integer) (required) — Schedule ID. null when returned from /schedule/preview.\n - layer_schedules (array) (required) — Alias of schedule_layers returned for compatibility. Null when not computed.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start 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 - layers (array) (required) — Rotation layers defined on the schedule. Null when layers were not loaded (for example by `/schedule/infos`, or by `/schedule/list` without start/end).\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.\n - repeat (array) — Weekday numbers (0 = Sunday) included in the rotation. Conflicts with restrict_mode = 2 (week).\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. Null when not set.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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) — Rotation handoff time as a weekly offset in seconds (weekday x 86400 + seconds since midnight), not an absolute Unix timestamp.\n - hidden (integer) (required) — Whether the layer is hidden in the UI (0 = no, 1 = yes).\n - layer_end (integer) — Layer end timestamp (Unix seconds). null means open-ended.\n - layer_name (string) — User-facing layer name. Null when not set.\n - layer_start (integer) — Layer effective start (Unix seconds). Null when not set.\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. Null when not set.\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. On-call assignees rotate in turn by this unit. | Value | Meaning | |---|---| | `hour` | Rotates hourly. | | `day` | Rotates daily. | | `week` | Rotates weekly. | | `month` | Rotates monthly. | [hour, day, week, month]\n - rotation_value (integer) (required) — Rotation quantity (number of rotation_unit per cycle). (min 0)\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 (string) (required) — Schedule name (legacy field; mirrors schedule_name). null when returned from /schedule/preview.\n - next_oncall (object) (required) — Next on-call group, or null when unknown.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group on duty for the shift.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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 (string) (required) — Shift start 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 - update_at (string) (required) — 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 - weight (integer) (required) — Layer weight the shift comes from.\n - notify (object) (required) — Notification configuration. Null when the schedule has none.\n - advance_in_time (integer) — Advance notification lead time in seconds. `0` notifies exactly at shift start; omitting disables advance notification.\n - by (object) (required) — Recipient notification preference; null when not configured.\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; null when not configured.\n - cycle (string) (required) — Notification cycle; only `day` is supported. [day]\n - start (string) (required) — Time of day to send, format `HH:MM` (24-hour).\n - im (object) — Legacy IM-type to token map.\n - webhooks (array) (required) — IM webhook notification channels; null when not configured.\n - settings (object) (required) — Webhook channel settings.\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. Null when returned from `/schedule/preview`.\n - schedule_layers (array) (required) — Computed per-layer schedules for the requested window. Null when not computed.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start 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 - schedule_name (string) (required) — Schedule display name. null when returned from /schedule/preview.\n - start (string) — Window start (Unix seconds). Omitted when 0 (no window requested). 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 - status (integer) (required) — Legacy status flag. Deprecated. null when returned from /schedule/preview.\n - team_id (integer) (required) — Owning team ID. null when returned from /schedule/preview.\n - update_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 - update_by (integer) (required) — Last updater person ID.\n", - "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 (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 - create_by (integer) (required) — Creator person ID.\n - cur_oncall (object) (required) — Current on-call group, or null when nobody is on-call.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group on duty for the shift.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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 (string) (required) — Shift start 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 - update_at (string) (required) — 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 - weight (integer) (required) — Layer weight the shift comes from.\n - description (string) (required) — Schedule description. null when returned from /schedule/preview.\n - disabled (integer) (required) — Disabled flag (0 = enabled, 1 = disabled). Deprecated. null when returned from /schedule/preview.\n - end (string) — Window end (Unix seconds). Omitted when 0 (no window requested). 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 - field (string) — Field name used by the legacy update-field endpoint.\n - final_schedule (object) (required) — Collapsed final schedule across all layers.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start 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 - group_id (integer) (required) — Legacy team/group ID. null when returned from /schedule/preview.\n - id (integer) (required) — Schedule ID. null when returned from /schedule/preview.\n - layer_schedules (array) (required) — Alias of schedule_layers returned for compatibility. Null when not computed.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start 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 - layers (array) (required) — Rotation layers defined on the schedule. Null when layers were not loaded (for example by `/schedule/infos`, or by `/schedule/list` without start/end).\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.\n - repeat (array) — Weekday numbers (0 = Sunday) included in the rotation. Conflicts with restrict_mode = 2 (week).\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. Null when not set.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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) — Rotation handoff time as a weekly offset in seconds (weekday x 86400 + seconds since midnight), not an absolute Unix timestamp.\n - hidden (integer) (required) — Whether the layer is hidden in the UI (0 = no, 1 = yes).\n - layer_end (integer) — Layer end timestamp (Unix seconds). null means open-ended.\n - layer_name (string) — User-facing layer name. Null when not set.\n - layer_start (integer) — Layer effective start (Unix seconds). Null when not set.\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. Null when not set.\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. On-call assignees rotate in turn by this unit. | Value | Meaning | |---|---| | `hour` | Rotates hourly. | | `day` | Rotates daily. | | `week` | Rotates weekly. | | `month` | Rotates monthly. | [hour, day, week, month]\n - rotation_value (integer) (required) — Rotation quantity (number of rotation_unit per cycle). (min 0)\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 (string) (required) — Schedule name (legacy field; mirrors schedule_name). null when returned from /schedule/preview.\n - next_oncall (object) (required) — Next on-call group, or null when unknown.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group on duty for the shift.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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 (string) (required) — Shift start 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 - update_at (string) (required) — 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 - weight (integer) (required) — Layer weight the shift comes from.\n - notify (object) (required) — Notification configuration. Null when the schedule has none.\n - advance_in_time (integer) — Advance notification lead time in seconds. `0` notifies exactly at shift start; omitting disables advance notification.\n - by (object) (required) — Recipient notification preference; null when not configured.\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; null when not configured.\n - cycle (string) (required) — Notification cycle; only `day` is supported. [day]\n - start (string) (required) — Time of day to send, format `HH:MM` (24-hour).\n - im (object) — Legacy IM-type to token map.\n - webhooks (array) (required) — IM webhook notification channels; null when not configured.\n - settings (object) (required) — Webhook channel settings.\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. Null when returned from `/schedule/preview`.\n - schedule_layers (array) (required) — Computed per-layer schedules for the requested window. Null when not computed.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start 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 - schedule_name (string) (required) — Schedule display name. null when returned from /schedule/preview.\n - start (string) — Window start (Unix seconds). Omitted when 0 (no window requested). 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 - status (integer) (required) — Legacy status flag. Deprecated. null when returned from /schedule/preview.\n - team_id (integer) (required) — Owning team ID. null when returned from /schedule/preview.\n - update_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 - 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 (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 - create_by (integer) (required) — Creator person ID.\n - cur_oncall (object) (required) — Current on-call group, or null when nobody is on-call.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group on duty for the shift.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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. (min 0)\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 (string) (required) — Shift start 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 - update_at (string) (required) — 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 - weight (integer) (required) — Layer weight the shift comes from.\n - description (string) (required) — Schedule description. null when returned from /schedule/preview.\n - disabled (integer) (required) — Disabled flag (0 = enabled, 1 = disabled). Deprecated. null when returned from /schedule/preview.\n - end (string) — Window end (Unix seconds). Omitted when 0 (no window requested). 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 - field (string) — Field name used by the legacy update-field endpoint.\n - final_schedule (object) (required) — Collapsed final schedule across all layers.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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 (string) (required) — Shift start 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 - group_id (integer) (required) — Legacy team/group ID. null when returned from /schedule/preview.\n - id (integer) (required) — Schedule ID. null when returned from /schedule/preview.\n - layer_schedules (array) (required) — Alias of schedule_layers returned for compatibility. Null when not computed.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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 (string) (required) — Shift start 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 - layers (array) (required) — Rotation layers defined on the schedule. Null when layers were not loaded (for example by `/schedule/infos`, or by `/schedule/list` without start/end).\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.\n - repeat (array) — Weekday numbers (0 = Sunday) included in the rotation. Conflicts with restrict_mode = 2 (week).\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. Null when not set.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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. (min 0)\n - name (string) (required) — Legacy group name.\n - start (integer) (required) — Group start timestamp (Unix seconds).\n - handoff_time (integer) (required) — Rotation handoff time as a weekly offset in seconds (weekday x 86400 + seconds since midnight), not an absolute Unix timestamp.\n - hidden (integer) (required) — Whether the layer is hidden in the UI (0 = no, 1 = yes).\n - layer_end (integer) — Layer end timestamp (Unix seconds). null means open-ended.\n - layer_name (string) — User-facing layer name. Null when not set.\n - layer_start (integer) — Layer effective start (Unix seconds). Null when not set.\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. Null when not set.\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. On-call assignees rotate in turn by this unit. | Value | Meaning | |---|---| | `hour` | Rotates hourly. | | `day` | Rotates daily. | | `week` | Rotates weekly. | | `month` | Rotates monthly. | [hour, day, week, month]\n - rotation_value (integer) (required) — Rotation quantity (number of rotation_unit per cycle). (min 0)\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 (string) (required) — Schedule name (legacy field; mirrors schedule_name). null when returned from /schedule/preview.\n - next_oncall (object) (required) — Next on-call group, or null when unknown.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group on duty for the shift.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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. (min 0)\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 (string) (required) — Shift start 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 - update_at (string) (required) — 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 - weight (integer) (required) — Layer weight the shift comes from.\n - notify (object) (required) — Notification configuration. Null when the schedule has none.\n - advance_in_time (integer) — Advance notification lead time in seconds. `0` notifies exactly at shift start; omitting disables advance notification.\n - by (object) (required) — Recipient notification preference; null when not configured.\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; null when not configured.\n - cycle (string) (required) — Notification cycle; only `day` is supported. [day]\n - start (string) (required) — Time of day to send, format `HH:MM` (24-hour).\n - im (object) — Legacy IM-type to token map.\n - webhooks (array) (required) — IM webhook notification channels; null when not configured.\n - settings (object) (required) — Webhook channel settings.\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. Null when returned from `/schedule/preview`.\n - schedule_layers (array) (required) — Computed per-layer schedules for the requested window. Null when not computed.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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 (string) (required) — Shift start 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 - schedule_name (string) (required) — Schedule display name. null when returned from /schedule/preview.\n - start (string) — Window start (Unix seconds). Omitted when 0 (no window requested). 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 - status (integer) (required) — Legacy status flag. Deprecated. null when returned from /schedule/preview.\n - team_id (integer) (required) — Owning team ID. null when returned from /schedule/preview.\n - update_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 - 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 (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 - create_by (integer) (required) — Creator person ID.\n - cur_oncall (object) (required) — Current on-call group, or null when nobody is on-call.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group on duty for the shift.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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 (string) (required) — Shift start 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 - update_at (string) (required) — 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 - weight (integer) (required) — Layer weight the shift comes from.\n - description (string) (required) — Schedule description. null when returned from /schedule/preview.\n - disabled (integer) (required) — Disabled flag (0 = enabled, 1 = disabled). Deprecated. null when returned from /schedule/preview.\n - end (string) — Window end (Unix seconds). Omitted when 0 (no window requested). 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 - field (string) — Field name used by the legacy update-field endpoint.\n - final_schedule (object) (required) — Collapsed final schedule across all layers.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start 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 - group_id (integer) (required) — Legacy team/group ID. null when returned from /schedule/preview.\n - id (integer) (required) — Schedule ID. null when returned from /schedule/preview.\n - layer_schedules (array) (required) — Alias of schedule_layers returned for compatibility. Null when not computed.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start 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 - layers (array) (required) — Rotation layers defined on the schedule. Null when layers were not loaded (for example by `/schedule/infos`, or by `/schedule/list` without start/end).\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.\n - repeat (array) — Weekday numbers (0 = Sunday) included in the rotation. Conflicts with restrict_mode = 2 (week).\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. Null when not set.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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) — Rotation handoff time as a weekly offset in seconds (weekday x 86400 + seconds since midnight), not an absolute Unix timestamp.\n - hidden (integer) (required) — Whether the layer is hidden in the UI (0 = no, 1 = yes).\n - layer_end (integer) — Layer end timestamp (Unix seconds). null means open-ended.\n - layer_name (string) — User-facing layer name. Null when not set.\n - layer_start (integer) — Layer effective start (Unix seconds). Null when not set.\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. Null when not set.\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. On-call assignees rotate in turn by this unit. | Value | Meaning | |---|---| | `hour` | Rotates hourly. | | `day` | Rotates daily. | | `week` | Rotates weekly. | | `month` | Rotates monthly. | [hour, day, week, month]\n - rotation_value (integer) (required) — Rotation quantity (number of rotation_unit per cycle). (min 0)\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 (string) (required) — Schedule name (legacy field; mirrors schedule_name). null when returned from /schedule/preview.\n - next_oncall (object) (required) — Next on-call group, or null when unknown.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group on duty for the shift.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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 (string) (required) — Shift start 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 - update_at (string) (required) — 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 - weight (integer) (required) — Layer weight the shift comes from.\n - notify (object) (required) — Notification configuration. Null when the schedule has none.\n - advance_in_time (integer) — Advance notification lead time in seconds. `0` notifies exactly at shift start; omitting disables advance notification.\n - by (object) (required) — Recipient notification preference; null when not configured.\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; null when not configured.\n - cycle (string) (required) — Notification cycle; only `day` is supported. [day]\n - start (string) (required) — Time of day to send, format `HH:MM` (24-hour).\n - im (object) — Legacy IM-type to token map.\n - webhooks (array) (required) — IM webhook notification channels; null when not configured.\n - settings (object) (required) — Webhook channel settings.\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. Null when returned from `/schedule/preview`.\n - schedule_layers (array) (required) — Computed per-layer schedules for the requested window. Null when not computed.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start 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 - schedule_name (string) (required) — Schedule display name. null when returned from /schedule/preview.\n - start (string) — Window start (Unix seconds). Omitted when 0 (no window requested). 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 - status (integer) (required) — Legacy status flag. Deprecated. null when returned from /schedule/preview.\n - team_id (integer) (required) — Owning team ID. null when returned from /schedule/preview.\n - update_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 - update_by (integer) (required) — Last updater person ID.\n", + "Schedules.Info": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - account_id (integer) (required) — Account ID.\n - create_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 - create_by (integer) (required) — Creator person ID.\n - cur_oncall (object) (required) — Current on-call group, or null when nobody is on-call.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group on duty for the shift.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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. (min 0)\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 (string) (required) — Shift start 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 - update_at (string) (required) — 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 - weight (integer) (required) — Layer weight the shift comes from.\n - description (string) (required) — Schedule description. null when returned from /schedule/preview.\n - disabled (integer) (required) — Disabled flag (0 = enabled, 1 = disabled). Deprecated. null when returned from /schedule/preview.\n - end (string) — Window end (Unix seconds). Omitted when 0 (no window requested). 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 - field (string) — Field name used by the legacy update-field endpoint.\n - final_schedule (object) (required) — Collapsed final schedule across all layers.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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 (string) (required) — Shift start 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 - group_id (integer) (required) — Legacy team/group ID. null when returned from /schedule/preview.\n - id (integer) (required) — Schedule ID. null when returned from /schedule/preview.\n - layer_schedules (array) (required) — Alias of schedule_layers returned for compatibility. Null when not computed.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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 (string) (required) — Shift start 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 - layers (array) (required) — Rotation layers defined on the schedule. Null when layers were not loaded (for example by `/schedule/infos`, or by `/schedule/list` without start/end).\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.\n - repeat (array) — Weekday numbers (0 = Sunday) included in the rotation. Conflicts with restrict_mode = 2 (week).\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. Null when not set.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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. (min 0)\n - name (string) (required) — Legacy group name.\n - start (integer) (required) — Group start timestamp (Unix seconds).\n - handoff_time (integer) (required) — Rotation handoff time as a weekly offset in seconds (weekday x 86400 + seconds since midnight), not an absolute Unix timestamp.\n - hidden (integer) (required) — Whether the layer is hidden in the UI (0 = no, 1 = yes).\n - layer_end (integer) — Layer end timestamp (Unix seconds). null means open-ended.\n - layer_name (string) — User-facing layer name. Null when not set.\n - layer_start (integer) — Layer effective start (Unix seconds). Null when not set.\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. Null when not set.\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. On-call assignees rotate in turn by this unit. | Value | Meaning | |---|---| | `hour` | Rotates hourly. | | `day` | Rotates daily. | | `week` | Rotates weekly. | | `month` | Rotates monthly. | [hour, day, week, month]\n - rotation_value (integer) (required) — Rotation quantity (number of rotation_unit per cycle). (min 0)\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 (string) (required) — Schedule name (legacy field; mirrors schedule_name). null when returned from /schedule/preview.\n - next_oncall (object) (required) — Next on-call group, or null when unknown.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group on duty for the shift.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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. (min 0)\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 (string) (required) — Shift start 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 - update_at (string) (required) — 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 - weight (integer) (required) — Layer weight the shift comes from.\n - notify (object) (required) — Notification configuration. Null when the schedule has none.\n - advance_in_time (integer) — Advance notification lead time in seconds. `0` notifies exactly at shift start; omitting disables advance notification.\n - by (object) (required) — Recipient notification preference; null when not configured.\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; null when not configured.\n - cycle (string) (required) — Notification cycle: `day` sends every day; `week` sends on the weekdays listed in `days`; `month` sends on the day-of-month values listed in `days`. [day, week, month]\n - days (array) — Days the notification fires on, read in the schedule's timezone. For `week`, weekday numbers 0-6 (0 = Sunday); for `month`, day-of-month numbers 1-31, and a month without that date is skipped. Required when `cycle` is `week` or `month`; ignored when `cycle` is `day`.\n - start (string) (required) — Time of day to send, format `HH:MM` (24-hour).\n - im (object) — Legacy IM-type to token map.\n - webhooks (array) (required) — IM webhook notification channels; null when not configured.\n - settings (object) (required) — Webhook channel settings.\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. Null when returned from `/schedule/preview`.\n - schedule_layers (array) (required) — Computed per-layer schedules for the requested window. Null when not computed.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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 (string) (required) — Shift start 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 - schedule_name (string) (required) — Schedule display name. null when returned from /schedule/preview.\n - start (string) — Window start (Unix seconds). Omitted when 0 (no window requested). 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 - status (integer) (required) — Legacy status flag. Deprecated. null when returned from /schedule/preview.\n - team_id (integer) (required) — Owning team ID. null when returned from /schedule/preview.\n - update_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 - update_by (integer) (required) — Last updater person ID.\n", + "Schedules.Infos": "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 (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 - create_by (integer) (required) — Creator person ID.\n - cur_oncall (object) (required) — Current on-call group, or null when nobody is on-call.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group on duty for the shift.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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 (string) (required) — Shift start 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 - update_at (string) (required) — 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 - weight (integer) (required) — Layer weight the shift comes from.\n - description (string) (required) — Schedule description. null when returned from /schedule/preview.\n - disabled (integer) (required) — Disabled flag (0 = enabled, 1 = disabled). Deprecated. null when returned from /schedule/preview.\n - end (string) — Window end (Unix seconds). Omitted when 0 (no window requested). 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 - field (string) — Field name used by the legacy update-field endpoint.\n - final_schedule (object) (required) — Collapsed final schedule across all layers.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start 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 - group_id (integer) (required) — Legacy team/group ID. null when returned from /schedule/preview.\n - id (integer) (required) — Schedule ID. null when returned from /schedule/preview.\n - layer_schedules (array) (required) — Alias of schedule_layers returned for compatibility. Null when not computed.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start 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 - layers (array) (required) — Rotation layers defined on the schedule. Null when layers were not loaded (for example by `/schedule/infos`, or by `/schedule/list` without start/end).\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.\n - repeat (array) — Weekday numbers (0 = Sunday) included in the rotation. Conflicts with restrict_mode = 2 (week).\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. Null when not set.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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) — Rotation handoff time as a weekly offset in seconds (weekday x 86400 + seconds since midnight), not an absolute Unix timestamp.\n - hidden (integer) (required) — Whether the layer is hidden in the UI (0 = no, 1 = yes).\n - layer_end (integer) — Layer end timestamp (Unix seconds). null means open-ended.\n - layer_name (string) — User-facing layer name. Null when not set.\n - layer_start (integer) — Layer effective start (Unix seconds). Null when not set.\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. Null when not set.\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. On-call assignees rotate in turn by this unit. | Value | Meaning | |---|---| | `hour` | Rotates hourly. | | `day` | Rotates daily. | | `week` | Rotates weekly. | | `month` | Rotates monthly. | [hour, day, week, month]\n - rotation_value (integer) (required) — Rotation quantity (number of rotation_unit per cycle). (min 0)\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 (string) (required) — Schedule name (legacy field; mirrors schedule_name). null when returned from /schedule/preview.\n - next_oncall (object) (required) — Next on-call group, or null when unknown.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group on duty for the shift.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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 (string) (required) — Shift start 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 - update_at (string) (required) — 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 - weight (integer) (required) — Layer weight the shift comes from.\n - notify (object) (required) — Notification configuration. Null when the schedule has none.\n - advance_in_time (integer) — Advance notification lead time in seconds. `0` notifies exactly at shift start; omitting disables advance notification.\n - by (object) (required) — Recipient notification preference; null when not configured.\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; null when not configured.\n - cycle (string) (required) — Notification cycle: `day` sends every day; `week` sends on the weekdays listed in `days`; `month` sends on the day-of-month values listed in `days`. [day, week, month]\n - days (array) — Days the notification fires on, read in the schedule's timezone. For `week`, weekday numbers 0-6 (0 = Sunday); for `month`, day-of-month numbers 1-31, and a month without that date is skipped. Required when `cycle` is `week` or `month`; ignored when `cycle` is `day`.\n - start (string) (required) — Time of day to send, format `HH:MM` (24-hour).\n - im (object) — Legacy IM-type to token map.\n - webhooks (array) (required) — IM webhook notification channels; null when not configured.\n - settings (object) (required) — Webhook channel settings.\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. Null when returned from `/schedule/preview`.\n - schedule_layers (array) (required) — Computed per-layer schedules for the requested window. Null when not computed.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start 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 - schedule_name (string) (required) — Schedule display name. null when returned from /schedule/preview.\n - start (string) — Window start (Unix seconds). Omitted when 0 (no window requested). 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 - status (integer) (required) — Legacy status flag. Deprecated. null when returned from /schedule/preview.\n - team_id (integer) (required) — Owning team ID. null when returned from /schedule/preview.\n - update_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 - update_by (integer) (required) — Last updater person ID.\n", + "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 (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 - create_by (integer) (required) — Creator person ID.\n - cur_oncall (object) (required) — Current on-call group, or null when nobody is on-call.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group on duty for the shift.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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 (string) (required) — Shift start 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 - update_at (string) (required) — 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 - weight (integer) (required) — Layer weight the shift comes from.\n - description (string) (required) — Schedule description. null when returned from /schedule/preview.\n - disabled (integer) (required) — Disabled flag (0 = enabled, 1 = disabled). Deprecated. null when returned from /schedule/preview.\n - end (string) — Window end (Unix seconds). Omitted when 0 (no window requested). 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 - field (string) — Field name used by the legacy update-field endpoint.\n - final_schedule (object) (required) — Collapsed final schedule across all layers.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start 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 - group_id (integer) (required) — Legacy team/group ID. null when returned from /schedule/preview.\n - id (integer) (required) — Schedule ID. null when returned from /schedule/preview.\n - layer_schedules (array) (required) — Alias of schedule_layers returned for compatibility. Null when not computed.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start 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 - layers (array) (required) — Rotation layers defined on the schedule. Null when layers were not loaded (for example by `/schedule/infos`, or by `/schedule/list` without start/end).\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.\n - repeat (array) — Weekday numbers (0 = Sunday) included in the rotation. Conflicts with restrict_mode = 2 (week).\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. Null when not set.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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) — Rotation handoff time as a weekly offset in seconds (weekday x 86400 + seconds since midnight), not an absolute Unix timestamp.\n - hidden (integer) (required) — Whether the layer is hidden in the UI (0 = no, 1 = yes).\n - layer_end (integer) — Layer end timestamp (Unix seconds). null means open-ended.\n - layer_name (string) — User-facing layer name. Null when not set.\n - layer_start (integer) — Layer effective start (Unix seconds). Null when not set.\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. Null when not set.\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. On-call assignees rotate in turn by this unit. | Value | Meaning | |---|---| | `hour` | Rotates hourly. | | `day` | Rotates daily. | | `week` | Rotates weekly. | | `month` | Rotates monthly. | [hour, day, week, month]\n - rotation_value (integer) (required) — Rotation quantity (number of rotation_unit per cycle). (min 0)\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 (string) (required) — Schedule name (legacy field; mirrors schedule_name). null when returned from /schedule/preview.\n - next_oncall (object) (required) — Next on-call group, or null when unknown.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group on duty for the shift.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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 (string) (required) — Shift start 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 - update_at (string) (required) — 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 - weight (integer) (required) — Layer weight the shift comes from.\n - notify (object) (required) — Notification configuration. Null when the schedule has none.\n - advance_in_time (integer) — Advance notification lead time in seconds. `0` notifies exactly at shift start; omitting disables advance notification.\n - by (object) (required) — Recipient notification preference; null when not configured.\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; null when not configured.\n - cycle (string) (required) — Notification cycle: `day` sends every day; `week` sends on the weekdays listed in `days`; `month` sends on the day-of-month values listed in `days`. [day, week, month]\n - days (array) — Days the notification fires on, read in the schedule's timezone. For `week`, weekday numbers 0-6 (0 = Sunday); for `month`, day-of-month numbers 1-31, and a month without that date is skipped. Required when `cycle` is `week` or `month`; ignored when `cycle` is `day`.\n - start (string) (required) — Time of day to send, format `HH:MM` (24-hour).\n - im (object) — Legacy IM-type to token map.\n - webhooks (array) (required) — IM webhook notification channels; null when not configured.\n - settings (object) (required) — Webhook channel settings.\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. Null when returned from `/schedule/preview`.\n - schedule_layers (array) (required) — Computed per-layer schedules for the requested window. Null when not computed.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start 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 - schedule_name (string) (required) — Schedule display name. null when returned from /schedule/preview.\n - start (string) — Window start (Unix seconds). Omitted when 0 (no window requested). 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 - status (integer) (required) — Legacy status flag. Deprecated. null when returned from /schedule/preview.\n - team_id (integer) (required) — Owning team ID. null when returned from /schedule/preview.\n - update_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 - 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 (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 - create_by (integer) (required) — Creator person ID.\n - cur_oncall (object) (required) — Current on-call group, or null when nobody is on-call.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group on duty for the shift.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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. (min 0)\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 (string) (required) — Shift start 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 - update_at (string) (required) — 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 - weight (integer) (required) — Layer weight the shift comes from.\n - description (string) (required) — Schedule description. null when returned from /schedule/preview.\n - disabled (integer) (required) — Disabled flag (0 = enabled, 1 = disabled). Deprecated. null when returned from /schedule/preview.\n - end (string) — Window end (Unix seconds). Omitted when 0 (no window requested). 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 - field (string) — Field name used by the legacy update-field endpoint.\n - final_schedule (object) (required) — Collapsed final schedule across all layers.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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 (string) (required) — Shift start 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 - group_id (integer) (required) — Legacy team/group ID. null when returned from /schedule/preview.\n - id (integer) (required) — Schedule ID. null when returned from /schedule/preview.\n - layer_schedules (array) (required) — Alias of schedule_layers returned for compatibility. Null when not computed.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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 (string) (required) — Shift start 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 - layers (array) (required) — Rotation layers defined on the schedule. Null when layers were not loaded (for example by `/schedule/infos`, or by `/schedule/list` without start/end).\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.\n - repeat (array) — Weekday numbers (0 = Sunday) included in the rotation. Conflicts with restrict_mode = 2 (week).\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. Null when not set.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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. (min 0)\n - name (string) (required) — Legacy group name.\n - start (integer) (required) — Group start timestamp (Unix seconds).\n - handoff_time (integer) (required) — Rotation handoff time as a weekly offset in seconds (weekday x 86400 + seconds since midnight), not an absolute Unix timestamp.\n - hidden (integer) (required) — Whether the layer is hidden in the UI (0 = no, 1 = yes).\n - layer_end (integer) — Layer end timestamp (Unix seconds). null means open-ended.\n - layer_name (string) — User-facing layer name. Null when not set.\n - layer_start (integer) — Layer effective start (Unix seconds). Null when not set.\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. Null when not set.\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. On-call assignees rotate in turn by this unit. | Value | Meaning | |---|---| | `hour` | Rotates hourly. | | `day` | Rotates daily. | | `week` | Rotates weekly. | | `month` | Rotates monthly. | [hour, day, week, month]\n - rotation_value (integer) (required) — Rotation quantity (number of rotation_unit per cycle). (min 0)\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 (string) (required) — Schedule name (legacy field; mirrors schedule_name). null when returned from /schedule/preview.\n - next_oncall (object) (required) — Next on-call group, or null when unknown.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group on duty for the shift.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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. (min 0)\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 (string) (required) — Shift start 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 - update_at (string) (required) — 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 - weight (integer) (required) — Layer weight the shift comes from.\n - notify (object) (required) — Notification configuration. Null when the schedule has none.\n - advance_in_time (integer) — Advance notification lead time in seconds. `0` notifies exactly at shift start; omitting disables advance notification.\n - by (object) (required) — Recipient notification preference; null when not configured.\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; null when not configured.\n - cycle (string) (required) — Notification cycle: `day` sends every day; `week` sends on the weekdays listed in `days`; `month` sends on the day-of-month values listed in `days`. [day, week, month]\n - days (array) — Days the notification fires on, read in the schedule's timezone. For `week`, weekday numbers 0-6 (0 = Sunday); for `month`, day-of-month numbers 1-31, and a month without that date is skipped. Required when `cycle` is `week` or `month`; ignored when `cycle` is `day`.\n - start (string) (required) — Time of day to send, format `HH:MM` (24-hour).\n - im (object) — Legacy IM-type to token map.\n - webhooks (array) (required) — IM webhook notification channels; null when not configured.\n - settings (object) (required) — Webhook channel settings.\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. Null when returned from `/schedule/preview`.\n - schedule_layers (array) (required) — Computed per-layer schedules for the requested window. Null when not computed.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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 (string) (required) — Shift start 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 - schedule_name (string) (required) — Schedule display name. null when returned from /schedule/preview.\n - start (string) — Window start (Unix seconds). Omitted when 0 (no window requested). 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 - status (integer) (required) — Legacy status flag. Deprecated. null when returned from /schedule/preview.\n - team_id (integer) (required) — Owning team ID. null when returned from /schedule/preview.\n - update_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 - 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 (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 - create_by (integer) (required) — Creator person ID.\n - cur_oncall (object) (required) — Current on-call group, or null when nobody is on-call.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group on duty for the shift.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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 (string) (required) — Shift start 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 - update_at (string) (required) — 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 - weight (integer) (required) — Layer weight the shift comes from.\n - description (string) (required) — Schedule description. null when returned from /schedule/preview.\n - disabled (integer) (required) — Disabled flag (0 = enabled, 1 = disabled). Deprecated. null when returned from /schedule/preview.\n - end (string) — Window end (Unix seconds). Omitted when 0 (no window requested). 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 - field (string) — Field name used by the legacy update-field endpoint.\n - final_schedule (object) (required) — Collapsed final schedule across all layers.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start 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 - group_id (integer) (required) — Legacy team/group ID. null when returned from /schedule/preview.\n - id (integer) (required) — Schedule ID. null when returned from /schedule/preview.\n - layer_schedules (array) (required) — Alias of schedule_layers returned for compatibility. Null when not computed.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start 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 - layers (array) (required) — Rotation layers defined on the schedule. Null when layers were not loaded (for example by `/schedule/infos`, or by `/schedule/list` without start/end).\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.\n - repeat (array) — Weekday numbers (0 = Sunday) included in the rotation. Conflicts with restrict_mode = 2 (week).\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. Null when not set.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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) — Rotation handoff time as a weekly offset in seconds (weekday x 86400 + seconds since midnight), not an absolute Unix timestamp.\n - hidden (integer) (required) — Whether the layer is hidden in the UI (0 = no, 1 = yes).\n - layer_end (integer) — Layer end timestamp (Unix seconds). null means open-ended.\n - layer_name (string) — User-facing layer name. Null when not set.\n - layer_start (integer) — Layer effective start (Unix seconds). Null when not set.\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. Null when not set.\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. On-call assignees rotate in turn by this unit. | Value | Meaning | |---|---| | `hour` | Rotates hourly. | | `day` | Rotates daily. | | `week` | Rotates weekly. | | `month` | Rotates monthly. | [hour, day, week, month]\n - rotation_value (integer) (required) — Rotation quantity (number of rotation_unit per cycle). (min 0)\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 (string) (required) — Schedule name (legacy field; mirrors schedule_name). null when returned from /schedule/preview.\n - next_oncall (object) (required) — Next on-call group, or null when unknown.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group on duty for the shift.\n - end (integer) (required) — Group end timestamp (Unix seconds).\n - group_name (string) (required) — Group display name. Null when only the legacy name is set.\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 (string) (required) — Shift start 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 - update_at (string) (required) — 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 - weight (integer) (required) — Layer weight the shift comes from.\n - notify (object) (required) — Notification configuration. Null when the schedule has none.\n - advance_in_time (integer) — Advance notification lead time in seconds. `0` notifies exactly at shift start; omitting disables advance notification.\n - by (object) (required) — Recipient notification preference; null when not configured.\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; null when not configured.\n - cycle (string) (required) — Notification cycle: `day` sends every day; `week` sends on the weekdays listed in `days`; `month` sends on the day-of-month values listed in `days`. [day, week, month]\n - days (array) — Days the notification fires on, read in the schedule's timezone. For `week`, weekday numbers 0-6 (0 = Sunday); for `month`, day-of-month numbers 1-31, and a month without that date is skipped. Required when `cycle` is `week` or `month`; ignored when `cycle` is `day`.\n - start (string) (required) — Time of day to send, format `HH:MM` (24-hour).\n - im (object) — Legacy IM-type to token map.\n - webhooks (array) (required) — IM webhook notification channels; null when not configured.\n - settings (object) (required) — Webhook channel settings.\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. Null when returned from `/schedule/preview`.\n - schedule_layers (array) (required) — Computed per-layer schedules for the requested window. Null when not computed.\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; null when the layer produces none.\n - end (string) (required) — Shift end 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 - group (object) (required) — Oncall group covering the shift; null marks a coverage gap.\n - index (integer) (required) — Index inside the rotation.\n - start (string) (required) — Shift start 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 - schedule_name (string) (required) — Schedule display name. null when returned from /schedule/preview.\n - start (string) — Window start (Unix seconds). Omitted when 0 (no window requested). 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 - status (integer) (required) — Legacy status flag. Deprecated. null when returned from /schedule/preview.\n - team_id (integer) (required) — Owning team ID. null when returned from /schedule/preview.\n - update_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 - update_by (integer) (required) — Last updater person ID.\n", "SessionReplay.Metadata": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - application (object) — Application the session belongs to.\n - id (string) — RUM application ID the session belongs to.\n - device (object) — Device that recorded the session.\n - type (string) — Device type recorded for the session, e.g. `desktop`, `mobile`, `tablet`.\n - foreground_periods (array) — Foreground periods across the session (mobile sessions only; empty for web).\n - end (string) — Unix timestamp in milliseconds when the foreground period 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 - start (string) — Unix timestamp in milliseconds when the foreground period 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 - view_id (string) — View ID active during this foreground period.\n - session (object) — Session bounds and state.\n - end (string) — Unix timestamp in milliseconds when the session ended (or was last updated, if still active). 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 - is_active (boolean) — Whether the session was still active as of the last recorded event.\n - server_time_delta (integer) — Clock skew in milliseconds between the client and Flashduty's servers, added to client timestamps for correction.\n - source (string) — SDK platform that recorded the session. Platform identifier: | Value | Meaning | |---|---| | `browser` | Web browser application (JavaScript SDK) | | `ios` | Apple iOS application | | `android` | Android application | | `react-native` | React Native application | | `flutter` | Flutter application | | `kotlin-multiplatform` | Kotlin Multiplatform application | | `roku` | Roku channel application | | `unity` | Unity application | | `miniprogram` | WeChat mini program | | `harmony` | HarmonyOS application | | `electron` | Electron desktop application | [browser, ios, android, react-native, flutter, kotlin-multiplatform, roku, unity, miniprogram, harmony, electron]\n - start (string) — Unix timestamp in milliseconds when the session 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 - views (array) — Every view recorded during the session, in chronological order.\n - container_source (string) — SDK platform of the container app, when this view is embedded (e.g. a WebView inside a native app). Omitted when the view is not embedded.\n - container_view_id (string) — View ID of the containing view, when this view is embedded. Omitted when the view is not embedded.\n - end (string) — Unix timestamp in milliseconds when the view 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 - is_active (boolean) — Whether the view was still active as of the last recorded event.\n - loading_type (string) — How the view was entered, e.g. `initial_load`, `route_change`.\n - name (string) — View name, typically the route or screen name.\n - server_time_delta (integer) — Clock skew in milliseconds between the client and Flashduty's servers, added to client timestamps for correction.\n - source (string) — SDK platform that recorded the view. Platform identifier: | Value | Meaning | |---|---| | `browser` | Web browser application (JavaScript SDK) | | `ios` | Apple iOS application | | `android` | Android application | | `react-native` | React Native application | | `flutter` | Flutter application | | `kotlin-multiplatform` | Kotlin Multiplatform application | | `roku` | Roku channel application | | `unity` | Unity application | | `miniprogram` | WeChat mini program | | `harmony` | HarmonyOS application | | `electron` | Electron desktop application | [browser, ios, android, react-native, flutter, kotlin-multiplatform, roku, unity, miniprogram, harmony, electron]\n - start (string) — Unix timestamp in milliseconds when the view 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 - url (string) — URL (web) or screen identifier (mobile) associated with the view.\n - view_id (string) — Unique ID of the view within the session.\n", "SessionReplay.Segments": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - items (array) — Presigned, time-limited URLs (valid 1 hour) for downloading each segment's raw compressed bytes.\n - search_after_ctx (string) — Pagination cursor to pass as `search_after_ctx` on the next call. Empty when this page was the last one.\n", "Sessions.ReadInfo": "Response fields (`data` envelope is unwrapped — these fields are at the top level):\n - events (array) (required) — 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 (string) (required) — Unix timestamp in milliseconds when the event was written. 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 - 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) (required) — Event identifier.\n - invocation_id (string) — ADK invocation id grouping a turn.\n - partial (boolean) (required) — True for a streaming partial chunk.\n - session_id (string) (required) — Owning session id.\n - status (string) — Event status. One of: `normal` (a live event included in the context fed to the model), `compressed` (folded into a compaction summary boundary event; no longer loaded for the model, kept as history only). [normal, compressed]\n - turn_complete (boolean) (required) — True on the terminal event of a turn.\n - usage_metadata (object) — Per-turn token usage metadata.\n - has_more_older (boolean) (required) — True when older events remain beyond this page.\n - pending_messages (array) (required) — Human messages queued but not yet picked up by the agent, in execution order. Always an array — empty when nothing is queued.\n - client_msg_id (string) — Client-supplied message ID, echoed back for de-duplication. Omitted when absent.\n - invocation_id (string) (required) — Invocation ID of the queued message.\n - parts (array) — Request parts passed through verbatim (text, file, ref, or skill entries). Omitted when the original message carried none.\n - person_id (integer) (required) — Person ID of the sender.\n - query (string) (required) — Message text.\n - steering (boolean) — True when the message was sent as a mid-turn steering instruction. Omitted when false.\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) (required) — One agent session row.\n - access_source (string) — How the caller received access to this session. Omitted when no access source is resolved. One of: | Value | Meaning | | --- | --- | | `owner` | Caller is the session creator (full access) | | `team_member` | Caller belongs to the session's bound team (full access) | | `manager` | Manager grant (reserved; never produced by the current version) | | `share_link` | Granted via a valid share link (view/fork only; cannot continue or manage) | | `participant` | Same-account non-member granted via a participable team session (view/continue/fork only) | [owner, team_member, manager, share_link, participant]\n - app_name (string) (required) — Agent app that owns the session.\n - archived_at (string) (required) — Unix timestamp in milliseconds when archived; 0 means not archived. 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 - bound_environment (object) — The runner or cloud sandbox the session is bound to. Null until the first message.\n - id (string) (required) — Environment identifier: a cloud sandbox ID for `cloud` bindings, a runner/environment ID for `byoc` bindings.\n - kind (string) (required) — Environment kind bound to the session: `cloud` (managed sandbox) or `byoc` (self-hosted runner). [cloud, byoc]\n - name (string) — Human-readable environment name; empty for cloud bindings using the default allowlist.\n - status (string) — Live binding health, namespaced by kind: BYOC uses online/pending/offline/deleted; cloud uses available/rebuilding/expired. [online, pending, offline, deleted, available, rebuilding, expired]\n - can_continue (boolean) (required) — True when the caller can add a new turn to this session.\n - can_fork (boolean) (required) — True when the caller can fork this session.\n - can_manage (boolean) (required) — True when the caller may rename/archive/delete the session; personal sessions are creator-only, team sessions allow the creator, account admin, or team member.\n - can_view (boolean) (required) — True when the caller can view this session.\n - context_resolved (object) — Snapshot of the three-tier knowledge resolution for this session.\n - account_pack_id (string) — Resolved account-scope knowledge ID.\n - incident_id (string) — Bound incident id, when war-room originated.\n - resolved_at_ms (string) (required) — Unix timestamp in milliseconds when the knowledge was resolved. 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 - team_pack_id (string) — Resolved team-scope knowledge ID.\n - versions (object) — Resolved version map, one entry per knowledge.\n - context_window (integer) (required) — The bound model's max context size in tokens. 0 means unknown.\n - created_at (string) (required) — Unix timestamp in milliseconds when the session 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 - creator_name (string) — Display name of the session creator, resolved when the response is rendered. Omitted when the member lookup fails.\n - current_context_tokens (integer) (required) — Size in tokens of the LLM context window as of the most recent turn. 0 means no turn has completed.\n - current_turn_active_ms (integer) (required) — Active working duration in milliseconds for the current or most recent round, excluding time spent waiting on ask_user; resets to 0 at the start of each new round.\n - current_turn_started_at (string) (required) — Unix timestamp in milliseconds when the current or most recent round started; 0 if no round has started yet. 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 - current_turn_tokens (integer) (required) — Total tokens (input+output+reasoning) for the in-flight round across the parent and its subagents; only computed by session/get while the session is running, always 0 in session/list responses and when idle.\n - current_turn_wait_ms (integer) (required) — Accumulated ask_user human-wait duration in milliseconds for the current round; resets to 0 at the start of each new round.\n - entry_kind (string) — Surface that created the session. One of: | Value | Meaning | | --- | --- | | `web` | Created from the web console | | `im` | Created from an IM client (IM bot / IM H5) | | `api` | Created via the public API | | `automation` | Created by an automation rule (unattended run) | | `subagent` | Child session spawned by a parent's agent_dispatch (audit label; at runtime it executes on the web tool surface) | [web, im, api, automation, subagent]\n - has_open_tasks (boolean) — Whether the session still has open tasks, used to tell a handed-off turn from a settled session. Best-effort: when the read fails the field is absent (`omitempty`), which callers must treat as \"unknown\", never as proof the session is idle.\n - has_unread (boolean) (required) — True when there is assistant output the caller has not yet viewed.\n - incognito (boolean) (required) — True for incognito (non-persisted-memory) sessions.\n - is_mine (boolean) (required) — True when the caller created this session.\n - is_running (boolean) (required) — True when an agent turn is currently in flight for this session.\n - last_event_at (string) — Unix timestamp in milliseconds of the most recent assistant-side event. 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 - parent_session_id (string) — Parent session id for subagent (child) sessions; empty otherwise.\n - person_id (string) (required) — Creator person id.\n - pinned_at (string) (required) — Caller's per-user pin time as a Unix timestamp in milliseconds; 0 means not pinned. 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 - session_id (string) (required) — Session identifier.\n - session_name (string) (required) — Session title; may be empty for untitled sessions.\n - share_enabled (boolean) (required) — True when the session's share link is active.\n - share_version (integer) (required) — Revision of the share link; it increases when sharing is revoked.\n - shared_at (string) (required) — Unix timestamp in milliseconds when sharing was last enabled; 0 if never shared. 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 - shared_by (integer) (required) — Person ID that most recently enabled sharing; 0 if never shared.\n - standing_tasks (integer) (required) — Number of process-type tasks (background shell or monitor) still alive when the response was rendered.\n - state (object) — Raw session-state bag (session-scoped keys). Omitted when empty.\n - status (string) (required) — Lifecycle status. One of: `enabled` (active), `deleted` (soft-deleted, no longer accessible). [enabled, deleted]\n - team_id (integer) (required) — 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) (required) — Portion of input_tokens served from the prompt cache.\n - input_tokens (integer) (required) — Total prompt (input) tokens, including the cached portion.\n - output_tokens (integer) (required) — Total generated (output) tokens.\n - reasoning_tokens (integer) (required) — Total reasoning/thinking tokens.\n - updated_at (string) (required) — Unix timestamp in milliseconds of the last session update. 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 - suggest_init (boolean) (required) — Account-wide onboarding flag: true when the account has no knowledge in any scope; not specific to this session.\n", diff --git a/internal/cli/zz_generated_schedules.go b/internal/cli/zz_generated_schedules.go index 3054d29..808ba66 100644 --- a/internal/cli/zz_generated_schedules.go +++ b/internal/cli/zz_generated_schedules.go @@ -143,7 +143,8 @@ Request fields: - follow_preference (boolean) (required) — Whether to follow each responder's personal notification preference. - personal_channels (array) (required) — Personal notification channel keys. - fixed_time (object) (required) — Fixed-time notification config; null when not configured. - - cycle (string) (required) — Notification cycle; only 'day' is supported. [day] + - cycle (string) (required) — Notification cycle: 'day' sends every day; 'week' sends on the weekdays listed in 'days'; 'month' sends on the day-of-month values listed in 'days'. [day, week, month] + - days (array) — Days the notification fires on, read in the schedule's timezone. For 'week', weekday numbers 0-6 (0 = Sunday); for 'month', day-of-month numbers 1-31, and a month without that date is skipped. Required when 'cycle' is 'week' or 'month'; ignored when 'cycle' is 'day'. - start (string) (required) — Time of day to send, format 'HH:MM' (24-hour). - im (object) — Legacy IM-type to token map. - webhooks (array) (required) — IM webhook notification channels; null when not configured. @@ -406,7 +407,8 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le - follow_preference (boolean) (required) — Whether to follow each responder's personal notification preference. - personal_channels (array) (required) — Personal notification channel keys. - fixed_time (object) (required) — Fixed-time notification config; null when not configured. - - cycle (string) (required) — Notification cycle; only 'day' is supported. [day] + - cycle (string) (required) — Notification cycle: 'day' sends every day; 'week' sends on the weekdays listed in 'days'; 'month' sends on the day-of-month values listed in 'days'. [day, week, month] + - days (array) — Days the notification fires on, read in the schedule's timezone. For 'week', weekday numbers 0-6 (0 = Sunday); for 'month', day-of-month numbers 1-31, and a month without that date is skipped. Required when 'cycle' is 'week' or 'month'; ignored when 'cycle' is 'day'. - start (string) (required) — Time of day to send, format 'HH:MM' (24-hour). - im (object) — Legacy IM-type to token map. - webhooks (array) (required) — IM webhook notification channels; null when not configured. @@ -600,7 +602,8 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; - follow_preference (boolean) (required) — Whether to follow each responder's personal notification preference. - personal_channels (array) (required) — Personal notification channel keys. - fixed_time (object) (required) — Fixed-time notification config; null when not configured. - - cycle (string) (required) — Notification cycle; only 'day' is supported. [day] + - cycle (string) (required) — Notification cycle: 'day' sends every day; 'week' sends on the weekdays listed in 'days'; 'month' sends on the day-of-month values listed in 'days'. [day, week, month] + - days (array) — Days the notification fires on, read in the schedule's timezone. For 'week', weekday numbers 0-6 (0 = Sunday); for 'month', day-of-month numbers 1-31, and a month without that date is skipped. Required when 'cycle' is 'week' or 'month'; ignored when 'cycle' is 'day'. - start (string) (required) — Time of day to send, format 'HH:MM' (24-hour). - im (object) — Legacy IM-type to token map. - webhooks (array) (required) — IM webhook notification channels; null when not configured. @@ -783,7 +786,8 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; - follow_preference (boolean) (required) — Whether to follow each responder's personal notification preference. - personal_channels (array) (required) — Personal notification channel keys. - fixed_time (object) (required) — Fixed-time notification config; null when not configured. - - cycle (string) (required) — Notification cycle; only 'day' is supported. [day] + - cycle (string) (required) — Notification cycle: 'day' sends every day; 'week' sends on the weekdays listed in 'days'; 'month' sends on the day-of-month values listed in 'days'. [day, week, month] + - days (array) — Days the notification fires on, read in the schedule's timezone. For 'week', weekday numbers 0-6 (0 = Sunday); for 'month', day-of-month numbers 1-31, and a month without that date is skipped. Required when 'cycle' is 'week' or 'month'; ignored when 'cycle' is 'day'. - start (string) (required) — Time of day to send, format 'HH:MM' (24-hour). - im (object) — Legacy IM-type to token map. - webhooks (array) (required) — IM webhook notification channels; null when not configured. @@ -948,7 +952,8 @@ Request fields: - follow_preference (boolean) (required) — Whether to follow each responder's personal notification preference. - personal_channels (array) (required) — Personal notification channel keys. - fixed_time (object) (required) — Fixed-time notification config; null when not configured. - - cycle (string) (required) — Notification cycle; only 'day' is supported. [day] + - cycle (string) (required) — Notification cycle: 'day' sends every day; 'week' sends on the weekdays listed in 'days'; 'month' sends on the day-of-month values listed in 'days'. [day, week, month] + - days (array) — Days the notification fires on, read in the schedule's timezone. For 'week', weekday numbers 0-6 (0 = Sunday); for 'month', day-of-month numbers 1-31, and a month without that date is skipped. Required when 'cycle' is 'week' or 'month'; ignored when 'cycle' is 'day'. - start (string) (required) — Time of day to send, format 'HH:MM' (24-hour). - im (object) — Legacy IM-type to token map. - webhooks (array) (required) — IM webhook notification channels; null when not configured. @@ -1072,7 +1077,8 @@ Response fields ('data' envelope is unwrapped — these fields are at the top le - follow_preference (boolean) (required) — Whether to follow each responder's personal notification preference. - personal_channels (array) (required) — Personal notification channel keys. - fixed_time (object) (required) — Fixed-time notification config; null when not configured. - - cycle (string) (required) — Notification cycle; only 'day' is supported. [day] + - cycle (string) (required) — Notification cycle: 'day' sends every day; 'week' sends on the weekdays listed in 'days'; 'month' sends on the day-of-month values listed in 'days'. [day, week, month] + - days (array) — Days the notification fires on, read in the schedule's timezone. For 'week', weekday numbers 0-6 (0 = Sunday); for 'month', day-of-month numbers 1-31, and a month without that date is skipped. Required when 'cycle' is 'week' or 'month'; ignored when 'cycle' is 'day'. - start (string) (required) — Time of day to send, format 'HH:MM' (24-hour). - im (object) — Legacy IM-type to token map. - webhooks (array) (required) — IM webhook notification channels; null when not configured. @@ -1284,7 +1290,8 @@ Response fields ('data' envelope is unwrapped — rows are nested under items[]; - follow_preference (boolean) (required) — Whether to follow each responder's personal notification preference. - personal_channels (array) (required) — Personal notification channel keys. - fixed_time (object) (required) — Fixed-time notification config; null when not configured. - - cycle (string) (required) — Notification cycle; only 'day' is supported. [day] + - cycle (string) (required) — Notification cycle: 'day' sends every day; 'week' sends on the weekdays listed in 'days'; 'month' sends on the day-of-month values listed in 'days'. [day, week, month] + - days (array) — Days the notification fires on, read in the schedule's timezone. For 'week', weekday numbers 0-6 (0 = Sunday); for 'month', day-of-month numbers 1-31, and a month without that date is skipped. Required when 'cycle' is 'week' or 'month'; ignored when 'cycle' is 'day'. - start (string) (required) — Time of day to send, format 'HH:MM' (24-hour). - im (object) — Legacy IM-type to token map. - webhooks (array) (required) — IM webhook notification channels; null when not configured. @@ -1420,7 +1427,8 @@ Request fields: - follow_preference (boolean) (required) — Whether to follow each responder's personal notification preference. - personal_channels (array) (required) — Personal notification channel keys. - fixed_time (object) (required) — Fixed-time notification config; null when not configured. - - cycle (string) (required) — Notification cycle; only 'day' is supported. [day] + - cycle (string) (required) — Notification cycle: 'day' sends every day; 'week' sends on the weekdays listed in 'days'; 'month' sends on the day-of-month values listed in 'days'. [day, week, month] + - days (array) — Days the notification fires on, read in the schedule's timezone. For 'week', weekday numbers 0-6 (0 = Sunday); for 'month', day-of-month numbers 1-31, and a month without that date is skipped. Required when 'cycle' is 'week' or 'month'; ignored when 'cycle' is 'day'. - start (string) (required) — Time of day to send, format 'HH:MM' (24-hour). - im (object) — Legacy IM-type to token map. - webhooks (array) (required) — IM webhook notification channels; null when not configured. diff --git a/internal/cmd/cligen/list_envelope_test.go b/internal/cmd/cligen/list_envelope_test.go new file mode 100644 index 0000000..3d25d33 --- /dev/null +++ b/internal/cmd/cligen/list_envelope_test.go @@ -0,0 +1,35 @@ +package main + +import "testing" + +func TestListEnvelope(t *testing.T) { + row := []schemaField{{Wire: "event_id", Type: "string"}} + cases := []struct { + name string + resp []schemaField + want bool + }{ + {"pagination siblings", []schemaField{ + {Wire: "items", Type: "array", Children: row}, + {Wire: "total", Type: "integer"}, + }, true}, + {"object sibling stays a list", []schemaField{ + {Wire: "days", Type: "object"}, + {Wire: "items", Type: "array", Children: row}, + {Wire: "total", Type: "integer"}, + }, true}, + {"two row arrays", []schemaField{ + {Wire: "items", Type: "array", Children: row}, + {Wire: "list", Type: "array", Children: row}, + }, false}, + {"no row array", []schemaField{ + {Wire: "rules", Type: "array", Children: row}, + {Wire: "total", Type: "integer"}, + }, false}, + } + for _, c := range cases { + if _, got := listEnvelope(c.resp); got != c.want { + t.Errorf("%s: listEnvelope = %v, want %v", c.name, got, c.want) + } + } +} diff --git a/internal/cmd/cligen/main.go b/internal/cmd/cligen/main.go index 3888512..b496680 100644 --- a/internal/cmd/cligen/main.go +++ b/internal/cmd/cligen/main.go @@ -1614,11 +1614,11 @@ func longHelp(o specOp, scalars []scalarField, complexFields []string, byWire ma // or "" when the response has no documented schema. Shared by longHelp (embedded // in generated commands) and emitResponseHelp (looked up by curated commands). // listEnvelope returns the row (array-element) fields and true when resp is a -// paginated list envelope: exactly one object-array field named items/docs/list -// with only SCALAR siblings (total, p, limit, has_next_page, search_after_ctx … -// — all pagination metadata). This is the shape the backend returns under -// `data`; the CLI's curated list commands flatten it to a top-level array. The -// scalar-sibling test avoids enumerating every pagination field name. +// list envelope: exactly one object-array field named items/docs/list. Its +// siblings are usually pagination metadata (total, p, limit, has_next_page …) +// but may be any field (calendar event list carries a days map); they stay at +// the top level next to the rows. This is the shape the backend returns under +// `data`; the CLI's curated list commands flatten it to a top-level array. func listEnvelope(resp []schemaField) ([]schemaField, bool) { var rows []schemaField found := false @@ -1628,12 +1628,6 @@ func listEnvelope(resp []schemaField) ([]schemaField, bool) { return nil, false } rows, found = f.Children, true - continue - } - // Any non-row sibling must be a scalar (pagination metadata). An array - // or object sibling means this is a richer response, not a flat list. - if strings.HasPrefix(f.Type, "array") || f.Type == "object" || len(f.Children) > 0 { - return nil, false } } return rows, found diff --git a/skills/flashduty/reference/calendar.md b/skills/flashduty/reference/calendar.md index ced285b..b43f054 100644 --- a/skills/flashduty/reference/calendar.md +++ b/skills/flashduty/reference/calendar.md @@ -1,6 +1,6 @@ # flashduty calendar — command card -Prereq: `SKILL.md` read. **`delete` is irreversible** (calendar + all its events gone). `event-delete` is irreversible per event. Reads are free; confirm IDs before any delete. +Prereq: `SKILL.md` read. **`delete` is irreversible** (calendar + all its events gone). `event-delete` is irreversible (one event, or every own event on a date range). Reads are free; confirm IDs before any delete. ## Route here when @@ -8,7 +8,11 @@ Prereq: `SKILL.md` read. **`delete` is irreversible** (calendar + all its events You need a **`cal_id`** (string, format `cal.`). Get it from `calendar list`. For events you also need **`event_id`** (returned by `event-upsert`; list with `event-list`). -Public holiday calendars (e.g. `zh-cn.china.official`) are read-only — list them with `--kind region.official.holiday`, then inherit them into a personal calendar via `--extra-cal-ids`. +Public holiday calendars (e.g. `zh-cn.china.official`) are read-only — list them with `--kind region.official.holiday`, then inherit them into a personal calendar via `--extra-cal-ids`. The China calendar already carries make-up workdays (补班). + +**Is a day off or a workday?** Read `days` from `event-list`, never infer it from `items`: one day can hold several events (the calendar's own, a holiday calendar's, the weekly rule). `days["YYYY-MM-DD"]` gives `is_off` plus the `layer` that decided it — `custom` (the calendar's own events) beats `holiday` (linked holiday calendars) beats `weekly` (workdays rule); inside a layer a workday beats a day off; an entry without `layer` has no event covering it and is a workday. + +`event-upsert` trims the calendar's other own events off the same days, so the latest write decides them; `--summary` is optional. ## Intent → verb @@ -21,8 +25,10 @@ Public holiday calendars (e.g. `zh-cn.china.official`) are read-only — list th | rename / change workdays / inherit holidays | `update ` | | delete a calendar (irreversible) | `delete ` | | list events in a calendar | `event-list ` | +| is a given day off or a workday? | `event-list --year Y --month M --day D` → `days` | | add or edit a working/non-working day override | `event-upsert ` | -| remove a calendar event (irreversible) | `event-delete` | +| remove a calendar event (irreversible) | `event-delete --event-id ` | +| reset a date range to the holiday/weekly defaults | `event-delete --start-at --end-at ` | ## Hot flow — create a calendar with holiday inheritance @@ -37,9 +43,9 @@ flashduty calendar create --cal-name "Ops Workdays" \ --extra-cal-ids zh-cn.china.official # → returns cal_id; save it -# 3. Mark a make-up workday (補班) on a Saturday -flashduty calendar event-upsert --summary "補班 (New Year)" \ - --start-at 2026-01-17 --end-at 2026-01-18 --is-off false +# 3. Force a workday the holiday calendar marks off (make-up days 补班 already come from it) +flashduty calendar event-upsert --summary "Release day" \ + --start-at 2026-10-08 --end-at 2026-10-09 --is-off false # 4. Mark a custom holiday (non-working) flashduty calendar event-upsert --summary "Team offsite" \ @@ -52,8 +58,14 @@ flashduty calendar event-upsert --summary "Team offsite" \ # List all events in January 2026 flashduty calendar event-list --year 2026 --month 1 --output-format toon +# Resolved state of one day +flashduty calendar event-list --year 2026 --month 1 --json | jq '.days["2026-01-04"]' + # Delete a specific event (get event_id from the list above) -flashduty calendar event-delete --cal-id --event-id +flashduty calendar event-delete --event-id + +# Drop every own override on Jan 10–11 (end exclusive); those days fall back to holiday/weekly +flashduty calendar event-delete --start-at 2026-01-10 --end-at 2026-01-12 ``` @@ -72,10 +84,12 @@ Create calendar Delete calendar - `` (positional, required) string — Calendar ID; obtain it from 'POST /calendar/list'. -### event-delete +### event-delete Delete calendar event -- `--cal-id` string (required) — Calendar ID; obtain it from 'POST /calendar/list'. -- `--event-id` string (required) — Event ID. +- `` (positional, required) string — Calendar ID; obtain it from 'POST /calendar/list'. +- `--end-at` string — End date of the range to clear, in YYYY-MM-DD (exclusive). Must be later than start_at. +- `--event-id` string — ID of the event to delete. Omit when clearing a date range. +- `--start-at` string — Start date of the range to clear, in YYYY-MM-DD. Pass together with end_at instead of event_id. ### event-list List calendar events @@ -83,7 +97,7 @@ List calendar events - `--day` int64 — Day (1-31). 0 means no day filter. (0-31) - `--month` int64 — Month (1-12). 0 means no month filter. (0-12) - `--year` int64 — Year. Defaults to the current year when omitted. (min 2023) -- response: `{items: [...], total}` page wrapper — pipe `--json | jq '.items[]'` (NOT top-level `.[]`) — items fields: account_id (integer); cal_id (string); created_at (string); creator_id (integer); description (string); end_at (string); event_id (string); is_off (boolean); start_at (string); summary (string); updated_at (string) +- response: `{items: [...], days, total}` page wrapper — pipe `--json | jq '.items[]'` (NOT top-level `.[]`) — items fields: account_id (integer); cal_id (string); created_at (string); creator_id (integer); description (string); end_at (string); event_id (string); is_off (boolean); start_at (string); summary (string); updated_at (string) ### event-upsert Upsert calendar event @@ -93,7 +107,7 @@ Upsert calendar event - `--event-id` string — Event ID. Omit when creating. (≤63 chars) - `--is-off` bool (required) — Whether the event marks a non-working day. true = day off, false = working day override. - `--start-at` string (required) — Event start date in YYYY-MM-DD. -- `--summary` string (required) — Event summary. (1-39 chars) +- `--summary` string — Event summary. Optional. (≤39 chars) - response: single object (`data` unwrapped to the top level) — fields: cal_id (string); event_id (string); summary (string) ### info @@ -129,7 +143,7 @@ Update calendar ## Gotchas -- **`cal-id` is POSITIONAL on `info`, `update`, `delete`, `event-list`, `event-upsert`** — pass it as the first bare argument: `flashduty calendar info `. On `event-delete` both `--cal-id` and `--event-id` are flags (no positional — `use` is bare `event-delete`). +- **`cal-id` is POSITIONAL on `info`, `update`, `delete`, `event-list`, `event-upsert`, `event-delete`** — pass it as the first bare argument: `flashduty calendar info `. `event-delete` then takes either `--event-id` or both `--start-at` and `--end-at`. - **`event-upsert` creates OR updates** — omit `--event-id` to create; supply it to edit an existing event. The returned `event_id` is what to save for future edits or deletes. - **`list` defaults to `--kind personal`** — you will NOT see public-holiday calendars unless you pass `--kind region.official.holiday`. Add `--no-locale` to see all locales, not just yours. - **`delete` removes the calendar and ALL its events** — confirm `cal_id` with `list` first; irreversible. diff --git a/skills/flashduty/reference/incident.md b/skills/flashduty/reference/incident.md index 022b458..b3b2533 100644 --- a/skills/flashduty/reference/incident.md +++ b/skills/flashduty/reference/incident.md @@ -450,7 +450,7 @@ Reset work item assignees ### work-item-complete Complete a work item - `--idempotency-key` string (required) — Client-generated idempotency key (max 128 characters; letters, digits, '_', '-', '.', ':' only). (≤128 chars) -- `--target-status` string (required) — Client-defined status to set (max 64 characters). There is no fixed state machine. (≤64 chars) +- `--target-status` string (required) — Target status. Must be 'done'; any other value is rejected. (≤64 chars) · enum: done - `--version` int64 (required) — Current item version for optimistic locking. Must match the stored version. - `` (positional, required) string — Work item ID (opaque string, max 128 characters). (≤128 chars) - response: same shape as `work-item-assignees-reset ` above @@ -458,7 +458,7 @@ Complete a work item ### work-item-convert Convert a work item to a follow-up - `--idempotency-key` string (required) — Client-generated idempotency key (max 128 characters; letters, digits, '_', '-', '.', ':' only). (≤128 chars) -- `--target-status` string — Optional client-defined status to set on the converted follow-up (max 64 characters). (≤64 chars) +- `--target-status` string — Optional status to set on the converted follow-up. One of 'open', 'in_progress', 'done', 'cancelled'. (≤64 chars) · enum: open | in_progress | done | cancelled - `--version` int64 (required) — Current item version for optimistic locking. Must match the stored version. - `` (positional, required) string — Work item ID (opaque string, max 128 characters). (≤128 chars) - response: same shape as `work-item-assignees-reset ` above @@ -472,7 +472,7 @@ Create a work item - `--item-type` string (required) — 'action' anchors to an active incident and must not set 'post_mortem_id'; 'follow_up' requires 'post_mortem_id'. · enum: action | follow_up - `--post-mortem-id` string — Post-mortem ID (32-character hex string). Required for 'follow_up', forbidden for 'action'. The post-mortem must be linked to 'incident_id'. - `--priority` string — Optional client-defined priority (max 64 characters). (≤64 chars) -- `--status` string — Optional client-defined initial status (max 64 characters). (≤64 chars) +- `--status` string — Initial status. One of 'open', 'in_progress', 'done', 'cancelled'; defaults to 'open' when omitted or blank. (≤64 chars) · enum: open | in_progress | done | cancelled - `--title` string (required) — Item title (max 512 characters). (≤512 chars) - body-only (`--data`): assignees (array) - response: single object (`data` unwrapped to the top level) — fields: added_assignee_ids (array); idempotent_replay (boolean); item (object) @@ -505,7 +505,7 @@ Bind work items to a post-mortem Update a work item - `--description` string — New description (max 65,535 characters). (≤65535 chars) - `--priority` string — New client-defined priority (max 64 characters). (≤64 chars) -- `--status` string — New client-defined status (max 64 characters). (≤64 chars) +- `--status` string — New status. One of 'open', 'in_progress', 'done', 'cancelled'. (≤64 chars) · enum: open | in_progress | done | cancelled - `--title` string — New title (max 512 characters). (≤512 chars) - `--version` int64 (required) — Current item version for optimistic locking. Must match the stored version. - `` (positional, required) string — Work item ID (opaque string, max 128 characters). (≤128 chars)