From 4fdfebaecf856bd800db48cbeade4f13a9e08b74 Mon Sep 17 00:00:00 2001 From: debidong <1953531014@qq.com> Date: Wed, 23 Sep 2026 16:03:05 +0800 Subject: [PATCH] feat(work-item): add AI SRE assignee fields to the spec and SDK Create and reset take assignees ({type, id?}) beside the legacy assignee_ids alias. List can filter with assignee_type. Work item responses include structured assignees and the AI session id and venue. The vendored spec was edited in this repo; it is normally copied from flashduty-docs. Regenerated the SDK from the English spec. --- models_gen.go | 28 +++++- openapi/openapi.en.json | 184 ++++++++++++++++++++++++++++++++++++++-- openapi/openapi.zh.json | 184 ++++++++++++++++++++++++++++++++++++++-- 3 files changed, 376 insertions(+), 20 deletions(-) diff --git a/models_gen.go b/models_gen.go index e8f7765..07eecde 100644 --- a/models_gen.go +++ b/models_gen.go @@ -2370,8 +2370,10 @@ type CreateWarRoomRequest struct { // CreateWorkItemRequest is generated from the Flashduty OpenAPI schema. type CreateWorkItemRequest struct { - // Initial assignee member IDs. Assignees must be active members who can already read the anchor; assignment never grants access. + // Legacy alias for the initial assignees. Equivalent to `assignees` with every entry `type` `person`. Mutually exclusive with `assignees`: sending both returns an error. Assignees must be active members who can already read the anchor; assignment never grants access. AssigneeIDs []int64 `json:"assignee_ids,omitempty" toon:"assignee_ids,omitempty"` + // 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. + Assignees []WorkItemAssignee `json:"assignees,omitempty" toon:"assignees,omitempty"` // Optional longer description (max 65,535 characters). Description string `json:"description,omitempty" toon:"description,omitempty"` // Client-generated idempotency key (max 128 characters; letters, digits, `_`, `-`, `.`, `:` only). @@ -5216,8 +5218,10 @@ type ListWebhookHistoryResponse struct { // ListWorkItemRequest is generated from the Flashduty OpenAPI schema. type ListWorkItemRequest struct { - // Restrict results to items assigned to this member ID. Listing by assignee alone requires being that assignee or an account admin. + // Restrict results to items assigned to this member ID. Listing by assignee alone requires being that assignee or an account admin. Ignored when `assignee_type` is `ai_sre`. AssigneeID int64 `json:"assignee_id,omitempty" toon:"assignee_id,omitempty"` + // Filter by assignee type: `person` or `ai_sre`. `ai_sre` returns items assigned to AI SRE (an AI caller uses this to list its own tasks) and does not require `assignee_id`. `person` together with `assignee_id` restricts results to that member. Omitted with a positive `assignee_id` means `person`. + AssigneeType string `json:"assignee_type,omitempty" toon:"assignee_type,omitempty"` // Pagination cursor from a previous response's `next_cursor`. Cursor string `json:"cursor,omitempty" toon:"cursor,omitempty"` // Incident ID (MongoDB ObjectID). Also returns follow-ups anchored on the incident's post-mortem. @@ -6781,8 +6785,10 @@ type ResetPostMortemTitleRequest struct { // ResetWorkItemAssigneesRequest is generated from the Flashduty OpenAPI schema. type ResetWorkItemAssigneesRequest struct { - // New assignee member IDs, replacing the current set. An empty array clears all assignees. + // Legacy alias for the replacement assignee set. Equivalent to `assignees` with every entry `type` `person`. Mutually exclusive with `assignees`: sending both returns an error. An empty array clears all assignees. AssigneeIDs []int64 `json:"assignee_ids,omitempty" toon:"assignee_ids,omitempty"` + // Replacement assignee set. 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. An empty array clears all assignees. + Assignees []WorkItemAssignee `json:"assignees,omitempty" toon:"assignees,omitempty"` // Current item version for optimistic locking. Must match the stored version. Version int64 `json:"version" toon:"version"` // Work item ID (opaque string, max 128 characters). @@ -10688,6 +10694,14 @@ type WebhookHistoryItem struct { WebhookType string `json:"webhook_type" toon:"webhook_type"` } +// WorkItemAssignee is generated from the Flashduty OpenAPI schema. +type WorkItemAssignee struct { + // Member ID. Required when `type` is `person`. Omitted when `type` is `ai_sre`. + ID int64 `json:"id,omitempty" toon:"id,omitempty"` + // Assignee kind: `person` (a member) or `ai_sre` (the account AI SRE). + Type string `json:"type" toon:"type"` +} + // WorkItemCreateResult is generated from the Flashduty OpenAPI schema. type WorkItemCreateResult struct { // Assignee member IDs that were newly added (and notified). @@ -10699,8 +10713,14 @@ type WorkItemCreateResult struct { // WorkItemItem is generated from the Flashduty OpenAPI schema. type WorkItemItem struct { - // Member IDs of the current assignees. Never null; an empty array means unassigned. + // ID of the AI SRE session executing this item. Omitted when no session is recorded. + AgentSessionID string `json:"agent_session_id" toon:"agent_session_id"` + // Where that AI SRE session runs: `web` or `im`. Omitted when no session is recorded. + AgentSessionVenue string `json:"agent_session_venue" toon:"agent_session_venue"` + // Member IDs of the current person assignees. AI SRE is not included. Never null; an empty array means no person assignee. AssigneeIDs []int64 `json:"assignee_ids" toon:"assignee_ids"` + // Current assignees. Each entry is `{type, id?}`. `type` is `person` or `ai_sre`; an `ai_sre` entry omits `id`. Never null; an empty array means unassigned. `assignee_ids` is the person-only subset of this list. + Assignees []WorkItemAssignee `json:"assignees" toon:"assignees"` // Conversion time as a Unix timestamp in seconds. Present only after conversion. ConvertedAtSeconds Timestamp `json:"converted_at_seconds" toon:"converted_at_seconds"` // Member ID of the operator who converted the action into a follow-up. Present only after conversion. diff --git a/openapi/openapi.en.json b/openapi/openapi.en.json index 9ea6dd5..36e2eda 100644 --- a/openapi/openapi.en.json +++ b/openapi/openapi.en.json @@ -6592,13 +6592,21 @@ "description": "Parameters for creating an incident work item.", "properties": { "assignee_ids": { - "description": "Initial assignee member IDs. Assignees must be active members who can already read the anchor; assignment never grants access.", + "description": "Legacy alias for the initial assignees. Equivalent to `assignees` with every entry `type` `person`. Mutually exclusive with `assignees`: sending both returns an error. Assignees must be active members who can already read the anchor; assignment never grants access.", "items": { "format": "int64", "type": "integer" }, "type": "array" }, + "assignees": { + "description": "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.", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "maxItems": 20, + "type": "array" + }, "description": { "description": "Optional longer description (max 65,535 characters).", "maxLength": 65535, @@ -14456,13 +14464,21 @@ "type": "object" }, "ListWorkItemRequest": { - "description": "Filters for listing work items. At least one of `incident_id`, `post_mortem_id`, or `assignee_id` is required.", + "description": "Filters for listing work items. At least one of `incident_id`, `post_mortem_id`, `assignee_id`, or `assignee_type` = `ai_sre` is required.", "properties": { "assignee_id": { - "description": "Restrict results to items assigned to this member ID. Listing by assignee alone requires being that assignee or an account admin.", + "description": "Restrict results to items assigned to this member ID. Listing by assignee alone requires being that assignee or an account admin. Ignored when `assignee_type` is `ai_sre`.", "format": "int64", "type": "integer" }, + "assignee_type": { + "description": "Filter by assignee type: `person` or `ai_sre`. `ai_sre` returns items assigned to AI SRE (an AI caller uses this to list its own tasks) and does not require `assignee_id`. `person` together with `assignee_id` restricts results to that member. Omitted with a positive `assignee_id` means `person`.", + "enum": [ + "person", + "ai_sre" + ], + "type": "string" + }, "cursor": { "description": "Pagination cursor from a previous response's `next_cursor`.", "type": "string" @@ -18130,13 +18146,21 @@ "description": "Full replacement of a work item's assignee set.", "properties": { "assignee_ids": { - "description": "New assignee member IDs, replacing the current set. An empty array clears all assignees.", + "description": "Legacy alias for the replacement assignee set. Equivalent to `assignees` with every entry `type` `person`. Mutually exclusive with `assignees`: sending both returns an error. An empty array clears all assignees.", "items": { "format": "int64", "type": "integer" }, "type": "array" }, + "assignees": { + "description": "Replacement assignee set. 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. An empty array clears all assignees.", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "maxItems": 20, + "type": "array" + }, "version": { "description": "Current item version for optimistic locking. Must match the stored version.", "format": "int64", @@ -28429,6 +28453,28 @@ ], "type": "object" }, + "WorkItemAssignee": { + "description": "One assignee on a work item.", + "properties": { + "id": { + "description": "Member ID. Required when `type` is `person`. Omitted when `type` is `ai_sre`.", + "format": "int64", + "type": "integer" + }, + "type": { + "description": "Assignee kind: `person` (a member) or `ai_sre` (the account AI SRE).", + "enum": [ + "person", + "ai_sre" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, "WorkItemCreateResult": { "description": "Result of creating a work item.", "properties": { @@ -28456,14 +28502,33 @@ "WorkItemItem": { "description": "A structured incident work item (action or post-mortem follow-up) with its assignees.", "properties": { + "agent_session_id": { + "description": "ID of the AI SRE session executing this item. Omitted when no session is recorded.", + "type": "string" + }, + "agent_session_venue": { + "description": "Where that AI SRE session runs: `web` or `im`. Omitted when no session is recorded.", + "enum": [ + "web", + "im" + ], + "type": "string" + }, "assignee_ids": { - "description": "Member IDs of the current assignees. Never null; an empty array means unassigned.", + "description": "Member IDs of the current person assignees. AI SRE is not included. Never null; an empty array means no person assignee.", "items": { "format": "int64", "type": "integer" }, "type": "array" }, + "assignees": { + "description": "Current assignees. Each entry is `{type, id?}`. `type` is `person` or `ai_sre`; an `ai_sre` entry omits `id`. Never null; an empty array means unassigned. `assignee_ids` is the person-only subset of this list.", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "type": "array" + }, "converted_at_seconds": { "description": "Conversion time as a Unix timestamp in seconds. Present only after conversion.", "format": "int64", @@ -28563,6 +28628,7 @@ "source_kind", "version", "assignee_ids", + "assignees", "created_by", "updated_by", "created_at_seconds", @@ -40265,6 +40331,20 @@ 4756301322131, 5068740052131 ], + "assignees": [ + { + "id": 3790925372131, + "type": "person" + }, + { + "id": 4756301322131, + "type": "person" + }, + { + "id": 5068740052131, + "type": "person" + } + ], "created_at_seconds": 1785495329, "created_by": 5329873302131, "incident_id": "6a5f1e28807515413b384bce", @@ -40321,7 +40401,7 @@ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Requires the On-call Pro license.\n- Full replacement of the assignee set — an empty array clears all assignees.\n- Only newly added assignees are notified; removals never notify.\n- Audited — changes are recorded in the audit log.", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Requires the On-call Pro license.\n- Full replacement of the assignee set — an empty array clears all assignees.\n- Set either `assignees` or the legacy `assignee_ids`, not both (sending both returns an error). An `ai_sre` entry omits `id`.\n- Only newly added assignees are notified; removals never notify.\n- Audited — changes are recorded in the audit log.", "href": "/en/api-reference/on-call/incidents/incident-work-item-reset-assignees", "metadata": { "sidebarTitle": "Reset work item assignees" @@ -40361,6 +40441,20 @@ 4756301322131, 5068740052131 ], + "assignees": [ + { + "id": 3790925372131, + "type": "person" + }, + { + "id": 4756301322131, + "type": "person" + }, + { + "id": 5068740052131, + "type": "person" + } + ], "created_at_seconds": 1785495329, "created_by": 5329873302131, "incident_id": "6a5f1e28807515413b384bce", @@ -40454,6 +40548,20 @@ 4756301322131, 5068740052131 ], + "assignees": [ + { + "id": 3790925372131, + "type": "person" + }, + { + "id": 4756301322131, + "type": "person" + }, + { + "id": 5068740052131, + "type": "person" + } + ], "created_at_seconds": 1785495329, "created_by": 5329873302131, "incident_id": "6a5f1e28807515413b384bce", @@ -40554,6 +40662,12 @@ "assignee_ids": [ 3790925372131 ], + "assignees": [ + { + "id": 3790925372131, + "type": "person" + } + ], "created_at_seconds": 1785496400, "created_by": 3790925372131, "incident_id": "6a5f1e28807515413b384bce", @@ -40606,7 +40720,7 @@ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Requires the On-call Pro license.\n- An `action` anchors to an active incident and must NOT set `post_mortem_id`; a `follow_up` REQUIRES the `post_mortem_id` of a post-mortem linked to `incident_id`.\n- Assignees must be active members who can already read the anchor incident or post-mortem — assignment never grants access.\n- Newly added assignees are notified.\n- Retrying with the same (`creator`, `idempotency_key`) replays the original item with `idempotent_replay: true` instead of creating a duplicate.\n- Audited — changes are recorded in the audit log.", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Manage** (`on-call`) |\n\n## Usage\n\n- Requires the On-call Pro license.\n- An `action` anchors to an active incident and must NOT set `post_mortem_id`; a `follow_up` REQUIRES the `post_mortem_id` of a post-mortem linked to `incident_id`.\n- Set either `assignees` or the legacy `assignee_ids`, not both. `assignees` entries are `{type, id?}` with `type` `person` or `ai_sre`; an `ai_sre` entry omits `id`. `assignee_ids` is equivalent to an all-`person` list. Sending both returns an error.\n- Person assignees must be active members who can already read the anchor incident or post-mortem — assignment never grants access.\n- Newly added assignees are notified.\n- Retrying with the same (`creator`, `idempotency_key`) replays the original item with `idempotent_replay: true` instead of creating a duplicate.\n- Audited — changes are recorded in the audit log.", "href": "/en/api-reference/on-call/incidents/incident-work-item-create", "metadata": { "sidebarTitle": "Create a work item" @@ -40717,6 +40831,20 @@ 4756301322131, 5068740052131 ], + "assignees": [ + { + "id": 3790925372131, + "type": "person" + }, + { + "id": 4756301322131, + "type": "person" + }, + { + "id": 5068740052131, + "type": "person" + } + ], "created_at_seconds": 1785495329, "created_by": 5329873302131, "incident_id": "6a5f1e28807515413b384bce", @@ -40734,6 +40862,12 @@ "assignee_ids": [ 5068740052131 ], + "assignees": [ + { + "id": 5068740052131, + "type": "person" + } + ], "created_at_seconds": 1785495164, "created_by": 3790925372131, "incident_id": "6a5f1e28807515413b384bce", @@ -40789,7 +40923,7 @@ "On-call/Incidents" ], "x-mint": { - "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |\n\n## Usage\n\n- At least one of `incident_id`, `post_mortem_id`, or `assignee_id` is required.\n- Cursor pagination sorted by `updated_at_seconds` descending — pass the previous response's `next_cursor` as `cursor` until `has_more` is false.\n- Listing by `incident_id` also includes follow-ups anchored on the incident's post-mortem.\n- Listing by `assignee_id` alone requires being that assignee or an account admin.", + "content": "## Restrictions\n\n| Aspect | Value |\n| ------ | ----- |\n| Rate limits | **1,000 requests/minute**; **50 requests/second** per account |\n| Permissions | **Incidents Read** (`on-call`) |\n\n## Usage\n\n- At least one of `incident_id`, `post_mortem_id`, `assignee_id`, or `assignee_type` = `ai_sre` is required.\n- `assignee_type` = `ai_sre` lists items assigned to AI SRE and can be used on its own.\n- Cursor pagination sorted by `updated_at_seconds` descending — pass the previous response's `next_cursor` as `cursor` until `has_more` is false.\n- Listing by `incident_id` also includes follow-ups anchored on the incident's post-mortem.\n- Listing by `assignee_id` alone requires being that assignee or an account admin.", "href": "/en/api-reference/on-call/incidents/incident-work-item-list", "metadata": { "sidebarTitle": "List work items" @@ -40830,6 +40964,20 @@ 4756301322131, 5068740052131 ], + "assignees": [ + { + "id": 3790925372131, + "type": "person" + }, + { + "id": 4756301322131, + "type": "person" + }, + { + "id": 5068740052131, + "type": "person" + } + ], "created_at_seconds": 1785495329, "created_by": 5329873302131, "incident_id": "6a5f1e28807515413b384bce", @@ -40847,6 +40995,12 @@ "assignee_ids": [ 5068740052131 ], + "assignees": [ + { + "id": 5068740052131, + "type": "person" + } + ], "created_at_seconds": 1785495164, "created_by": 3790925372131, "incident_id": "6a5f1e28807515413b384bce", @@ -40941,6 +41095,20 @@ 4756301322131, 5068740052131 ], + "assignees": [ + { + "id": 3790925372131, + "type": "person" + }, + { + "id": 4756301322131, + "type": "person" + }, + { + "id": 5068740052131, + "type": "person" + } + ], "created_at_seconds": 1785495329, "created_by": 5329873302131, "incident_id": "6a5f1e28807515413b384bce", diff --git a/openapi/openapi.zh.json b/openapi/openapi.zh.json index 0f9564b..25cbdfa 100644 --- a/openapi/openapi.zh.json +++ b/openapi/openapi.zh.json @@ -6592,13 +6592,21 @@ "description": "创建故障跟进事项的参数。", "properties": { "assignee_ids": { - "description": "初始负责人成员 ID 列表。负责人须为已能查看锚定对象的活跃成员;指派不会授予访问权限。", + "description": "初始负责人的旧版别名,等价于全部为 `person` 的 `assignees`。与 `assignees` 互斥,同时出现会报错。负责人须为已能查看锚定对象的活跃成员;指派不会授予访问权限。", "items": { "format": "int64", "type": "integer" }, "type": "array" }, + "assignees": { + "description": "初始负责人列表。每项为 `{type, id?}`。`type` 取 `person` 或 `ai_sre`;`ai_sre` 不带 `id`。与 `assignee_ids` 互斥,同时出现会报错。`assignee_ids` 是旧版别名,等价于全部为 `person`。最多 20 项。`person` 须为已能查看锚定对象的活跃成员;指派不会授予访问权限。", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "maxItems": 20, + "type": "array" + }, "description": { "description": "可选的详细描述(最长 65,535 字符)。", "maxLength": 65535, @@ -14456,13 +14464,21 @@ "type": "object" }, "ListWorkItemRequest": { - "description": "查询跟进事项的过滤条件。`incident_id`、`post_mortem_id`、`assignee_id` 至少提供一个。", + "description": "查询跟进事项的过滤条件。`incident_id`、`post_mortem_id`、`assignee_id`,或 `assignee_type` 为 `ai_sre`,至少满足一个。", "properties": { "assignee_id": { - "description": "按负责人成员 ID 过滤结果。仅按负责人查询时,须为本人或账户管理员。", + "description": "按负责人成员 ID 过滤结果。仅按负责人查询时,须为本人或账户管理员。`assignee_type` 为 `ai_sre` 时忽略本字段。", "format": "int64", "type": "integer" }, + "assignee_type": { + "description": "按负责人类型过滤:`person` 或 `ai_sre`。`ai_sre` 返回指派给 AI SRE 的事项(AI 用它查询自己的任务),不需要 `assignee_id`。`person` 与 `assignee_id` 一起使用时,只返回该成员负责的事项。省略本字段且 `assignee_id` 为正数时,按 `person` 过滤。", + "enum": [ + "person", + "ai_sre" + ], + "type": "string" + }, "cursor": { "description": "分页游标,取自上一次响应的 `next_cursor`。", "type": "string" @@ -18130,13 +18146,21 @@ "description": "整体替换跟进事项的负责人集合。", "properties": { "assignee_ids": { - "description": "新的负责人成员 ID 列表,整体替换当前集合。空数组表示清空所有负责人。", + "description": "替换后负责人集合的旧版别名,等价于全部为 `person` 的 `assignees`。与 `assignees` 互斥,同时出现会报错。空数组表示清空所有负责人。", "items": { "format": "int64", "type": "integer" }, "type": "array" }, + "assignees": { + "description": "替换后的负责人集合。每项为 `{type, id?}`。`type` 取 `person` 或 `ai_sre`;`ai_sre` 不带 `id`。与 `assignee_ids` 互斥,同时出现会报错。`assignee_ids` 是旧版别名,等价于全部为 `person`。最多 20 项。空数组表示清空所有负责人。", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "maxItems": 20, + "type": "array" + }, "version": { "description": "事项当前版本号,用于乐观锁。必须与存储的版本一致。", "format": "int64", @@ -28429,6 +28453,28 @@ ], "type": "object" }, + "WorkItemAssignee": { + "description": "跟进事项的一名负责人。", + "properties": { + "id": { + "description": "成员 ID。`type` 为 `person` 时必填;`type` 为 `ai_sre` 时省略。", + "format": "int64", + "type": "integer" + }, + "type": { + "description": "负责人类型:`person` 为成员,`ai_sre` 为账户的 AI SRE。", + "enum": [ + "person", + "ai_sre" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, "WorkItemCreateResult": { "description": "创建跟进事项的结果。", "properties": { @@ -28456,14 +28502,33 @@ "WorkItemItem": { "description": "结构化的故障跟进事项(行动项或复盘后续行动)及其负责人。", "properties": { + "agent_session_id": { + "description": "执行该事项的 AI SRE 会话 ID。没有会话时省略。", + "type": "string" + }, + "agent_session_venue": { + "description": "该 AI SRE 会话所在位置:`web` 或 `im`。没有会话时省略。", + "enum": [ + "web", + "im" + ], + "type": "string" + }, "assignee_ids": { - "description": "当前负责人的成员 ID 列表。不会为 null;空数组表示未指派。", + "description": "当前人员负责人的成员 ID。不含 AI SRE。不会为 null;空数组表示没有人员负责人。", "items": { "format": "int64", "type": "integer" }, "type": "array" }, + "assignees": { + "description": "当前负责人。每项为 `{type, id?}`。`type` 取 `person` 或 `ai_sre`;`ai_sre` 不带 `id`。不会为 null;空数组表示未指派。`assignee_ids` 是其中仅含 `person` 的子集。", + "items": { + "$ref": "#/components/schemas/WorkItemAssignee" + }, + "type": "array" + }, "converted_at_seconds": { "description": "转化时间,Unix 秒级时间戳。仅转化后返回。", "format": "int64", @@ -28563,6 +28628,7 @@ "source_kind", "version", "assignee_ids", + "assignees", "created_by", "updated_by", "created_at_seconds", @@ -40265,6 +40331,20 @@ 4756301322131, 5068740052131 ], + "assignees": [ + { + "id": 3790925372131, + "type": "person" + }, + { + "id": 4756301322131, + "type": "person" + }, + { + "id": 5068740052131, + "type": "person" + } + ], "created_at_seconds": 1785495329, "created_by": 5329873302131, "incident_id": "6a5f1e28807515413b384bce", @@ -40321,7 +40401,7 @@ "On-call/故障管理" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 需要 On-call Pro 许可。\n- 整体替换负责人集合 —— 空数组表示清空所有负责人。\n- 仅新添加的负责人会收到通知;移除不通知。\n- 已审计 —— 变更会记录到审计日志。", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 需要 On-call Pro 许可。\n- 整体替换负责人集合 —— 空数组表示清空所有负责人。\n- 使用 `assignees` 或旧版 `assignee_ids`。两者同时出现会报错。`ai_sre` 条目不带 `id`。\n- 仅新添加的负责人会收到通知;移除不通知。\n- 已审计 —— 变更会记录到审计日志。", "href": "/zh/api-reference/on-call/incidents/incident-work-item-reset-assignees", "metadata": { "sidebarTitle": "重置跟进事项负责人" @@ -40361,6 +40441,20 @@ 4756301322131, 5068740052131 ], + "assignees": [ + { + "id": 3790925372131, + "type": "person" + }, + { + "id": 4756301322131, + "type": "person" + }, + { + "id": 5068740052131, + "type": "person" + } + ], "created_at_seconds": 1785495329, "created_by": 5329873302131, "incident_id": "6a5f1e28807515413b384bce", @@ -40454,6 +40548,20 @@ 4756301322131, 5068740052131 ], + "assignees": [ + { + "id": 3790925372131, + "type": "person" + }, + { + "id": 4756301322131, + "type": "person" + }, + { + "id": 5068740052131, + "type": "person" + } + ], "created_at_seconds": 1785495329, "created_by": 5329873302131, "incident_id": "6a5f1e28807515413b384bce", @@ -40554,6 +40662,12 @@ "assignee_ids": [ 3790925372131 ], + "assignees": [ + { + "id": 3790925372131, + "type": "person" + } + ], "created_at_seconds": 1785496400, "created_by": 3790925372131, "incident_id": "6a5f1e28807515413b384bce", @@ -40606,7 +40720,7 @@ "On-call/故障管理" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 需要 On-call Pro 许可。\n- `action` 锚定活动故障,且不得设置 `post_mortem_id`;`follow_up` 必须设置为关联到 `incident_id` 的故障复盘 ID。\n- 负责人须为已能查看锚定故障或复盘的活跃成员 —— 指派不会授予访问权限。\n- 新添加的负责人会收到通知。\n- 以相同的(`creator`、`idempotency_key`)重试时,返回原事项并标记 `idempotent_replay: true`,不会创建重复事项。\n- 已审计 —— 变更会记录到审计日志。", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障管理**(`on-call`) |\n\n## 使用说明\n\n- 需要 On-call Pro 许可。\n- `action` 锚定活动故障,且不得设置 `post_mortem_id`;`follow_up` 必须设置为关联到 `incident_id` 的故障复盘 ID。\n- 使用 `assignees`(`person` 带 `id`,或 `ai_sre` 不带 `id`),或使用旧版 `assignee_ids`(全部为 `person`)。两者同时出现会报错。\n- 人员负责人须为已能查看锚定故障或复盘的活跃成员 —— 指派不会授予访问权限。\n- 新添加的负责人会收到通知。\n- 以相同的(`creator`、`idempotency_key`)重试时,返回原事项并标记 `idempotent_replay: true`,不会创建重复事项。\n- 已审计 —— 变更会记录到审计日志。", "href": "/zh/api-reference/on-call/incidents/incident-work-item-create", "metadata": { "sidebarTitle": "创建跟进事项" @@ -40717,6 +40831,20 @@ 4756301322131, 5068740052131 ], + "assignees": [ + { + "id": 3790925372131, + "type": "person" + }, + { + "id": 4756301322131, + "type": "person" + }, + { + "id": 5068740052131, + "type": "person" + } + ], "created_at_seconds": 1785495329, "created_by": 5329873302131, "incident_id": "6a5f1e28807515413b384bce", @@ -40734,6 +40862,12 @@ "assignee_ids": [ 5068740052131 ], + "assignees": [ + { + "id": 5068740052131, + "type": "person" + } + ], "created_at_seconds": 1785495164, "created_by": 3790925372131, "incident_id": "6a5f1e28807515413b384bce", @@ -40789,7 +40923,7 @@ "On-call/故障管理" ], "x-mint": { - "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |\n\n## 使用说明\n\n- `incident_id`、`post_mortem_id`、`assignee_id` 至少提供一个。\n- 按 `updated_at_seconds` 倒序的游标分页 —— 将上一次响应的 `next_cursor` 作为 `cursor` 传入,直到 `has_more` 为 false。\n- 按 `incident_id` 查询时,同时包含锚定在该故障复盘上的后续行动。\n- 仅按 `assignee_id` 查询时,须为本人或账户管理员。", + "content": "## 限制说明\n\n| 项目 | 说明 |\n| ---- | ---- |\n| 速率限制 | 每个账户 **1,000 次/分钟**;**50 次/秒** |\n| 权限要求 | **故障查看**(`on-call`) |\n\n## 使用说明\n\n- `incident_id`、`post_mortem_id`、`assignee_id`,或 `assignee_type` 为 `ai_sre`,至少满足一个。\n- `assignee_type` 为 `ai_sre` 时返回指派给 AI SRE 的事项,可单独作为查询条件。\n- 按 `updated_at_seconds` 倒序的游标分页 —— 将上一次响应的 `next_cursor` 作为 `cursor` 传入,直到 `has_more` 为 false。\n- 按 `incident_id` 查询时,同时包含锚定在该故障复盘上的后续行动。\n- 仅按 `assignee_id` 查询时,须为本人或账户管理员。", "href": "/zh/api-reference/on-call/incidents/incident-work-item-list", "metadata": { "sidebarTitle": "查询跟进事项列表" @@ -40830,6 +40964,20 @@ 4756301322131, 5068740052131 ], + "assignees": [ + { + "id": 3790925372131, + "type": "person" + }, + { + "id": 4756301322131, + "type": "person" + }, + { + "id": 5068740052131, + "type": "person" + } + ], "created_at_seconds": 1785495329, "created_by": 5329873302131, "incident_id": "6a5f1e28807515413b384bce", @@ -40847,6 +40995,12 @@ "assignee_ids": [ 5068740052131 ], + "assignees": [ + { + "id": 5068740052131, + "type": "person" + } + ], "created_at_seconds": 1785495164, "created_by": 3790925372131, "incident_id": "6a5f1e28807515413b384bce", @@ -40941,6 +41095,20 @@ 4756301322131, 5068740052131 ], + "assignees": [ + { + "id": 3790925372131, + "type": "person" + }, + { + "id": 4756301322131, + "type": "person" + }, + { + "id": 5068740052131, + "type": "person" + } + ], "created_at_seconds": 1785495329, "created_by": 5329873302131, "incident_id": "6a5f1e28807515413b384bce",