Skip to content

Commit f3fb445

Browse files
authored
fix(incidentio): align declared outputs and enum hints with the v2 API (#7306)
* fix(incidentio): align declared tool outputs and enum hints with the v2 API Four declared outputs could never be populated because the v2 API names the field differently, and three param descriptions advertised enum values the API rejects. Verified against https://api.incident.io/v1/openapiV3.json, which serves the v1/v2/v3 schemas in one document. - IncidentV2 has `permalink`, not `incident_url`, and no `description` at all: incidents list/create/update/show now declare and map `permalink` and drop `description`. - IncidentUpdateV2 has `new_incident_status` (required), not an optional `new_status`; `message` is optional, `updated_at` is not returned, and `updater` is an actor wrapper whose user lives under `updater.user`. - EscalationV2 has `title` and `status`, not `name`. - WorkflowsCreate/UpdateWorkflowPayloadV2 accept only `newly_created` and `newly_created_and_active` for `runs_on_incidents`, and CustomFieldsCreatePayloadV2 accepts only text, link, numeric, single_select and multi_select for `field_type`. Renaming a declared output changes the reference-picker surface for these tools; nothing in the repo read the old names. * fix(incidentio): stop the block offering rejected enum values and declare every actor branch
1 parent 2a8fa38 commit f3fb445

17 files changed

Lines changed: 498 additions & 99 deletions

apps/docs/content/docs/integrations/incidentio.mdx

Lines changed: 50 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ List incidents from incident.io. Returns a list of incidents with their details
6262
|`id` | string | Incident ID |
6363
|`name` | string | Incident name/title |
6464
|`summary` | string | Incident summary |
65-
|`description` | string | Incident description |
6665
|`mode` | string | Incident mode \(standard, retrospective, test\) |
6766
|`call_url` | string | Video call URL |
6867
|`severity` | object | Incident severity |
@@ -82,7 +81,7 @@ List incidents from incident.io. Returns a list of incidents with their details
8281
|`is_default` | boolean | Whether this is the default incident type |
8382
|`created_at` | string | When the incident was created \(ISO 8601\) |
8483
|`updated_at` | string | When the incident was last updated \(ISO 8601\) |
85-
|`incident_url` | string | URL to the incident page |
84+
|`permalink` | string | Permalink to the incident in incident.io |
8685
|`slack_channel_id` | string | Slack channel ID |
8786
|`slack_channel_name` | string | Slack channel name |
8887
|`visibility` | string | Incident visibility \(public, private\) |
@@ -116,7 +115,6 @@ Create a new incident in incident.io. Requires idempotency_key, severity_id, and
116115
|`id` | string | Incident ID |
117116
|`name` | string | Incident name |
118117
|`summary` | string | Brief summary of the incident |
119-
|`description` | string | Detailed description of the incident |
120118
|`mode` | string | Incident mode \(e.g., standard, retrospective\) |
121119
|`call_url` | string | URL for the incident call/bridge |
122120
|`severity` | object | Severity of the incident |
@@ -132,7 +130,7 @@ Create a new incident in incident.io. Requires idempotency_key, severity_id, and
132130
|`name` | string | Type name |
133131
|`created_at` | string | Creation timestamp |
134132
|`updated_at` | string | Last update timestamp |
135-
|`incident_url` | string | URL to the incident |
133+
|`permalink` | string | Permalink to the incident in incident.io |
136134
|`slack_channel_id` | string | Associated Slack channel ID |
137135
|`slack_channel_name` | string | Associated Slack channel name |
138136
|`visibility` | string | Incident visibility |
@@ -156,10 +154,9 @@ Retrieve detailed information about a specific incident from incident.io by its
156154
|`id` | string | Incident ID |
157155
|`name` | string | Incident name |
158156
|`summary` | string | Brief summary of the incident |
159-
|`description` | string | Detailed description of the incident |
160157
|`mode` | string | Incident mode \(e.g., standard, retrospective\) |
161158
|`call_url` | string | URL for the incident call/bridge |
162-
|`permalink` | string | Permanent link to the incident |
159+
|`permalink` | string | Permalink to the incident in incident.io |
163160
|`severity` | object | Severity of the incident |
164161
|`id` | string | Severity ID |
165162
|`name` | string | Severity name |
@@ -173,7 +170,6 @@ Retrieve detailed information about a specific incident from incident.io by its
173170
|`name` | string | Type name |
174171
|`created_at` | string | Creation timestamp |
175172
|`updated_at` | string | Last update timestamp |
176-
|`incident_url` | string | URL to the incident |
177173
|`slack_channel_id` | string | Associated Slack channel ID |
178174
|`slack_channel_name` | string | Associated Slack channel name |
179175
|`visibility` | string | Incident visibility |
@@ -205,7 +201,6 @@ Update an existing incident in incident.io. Can update name, summary, severity,
205201
|`id` | string | Incident ID |
206202
|`name` | string | Incident name |
207203
|`summary` | string | Brief summary of the incident |
208-
|`description` | string | Detailed description of the incident |
209204
|`mode` | string | Incident mode \(e.g., standard, retrospective\) |
210205
|`call_url` | string | URL for the incident call/bridge |
211206
|`severity` | object | Severity of the incident |
@@ -221,7 +216,7 @@ Update an existing incident in incident.io. Can update name, summary, severity,
221216
|`name` | string | Type name |
222217
|`created_at` | string | Creation timestamp |
223218
|`updated_at` | string | Last update timestamp |
224-
|`incident_url` | string | URL to the incident |
219+
|`permalink` | string | Permalink to the incident in incident.io |
225220
|`slack_channel_id` | string | Associated Slack channel ID |
226221
|`slack_channel_name` | string | Associated Slack channel name |
227222
|`visibility` | string | Incident visibility |
@@ -486,7 +481,7 @@ Create a new workflow in incident.io.
486481
| `trigger` | string | No | Trigger type for the workflow \(e.g., "incident.updated", "incident.created"\) |
487482
| `steps` | string | No | Array of workflow steps as JSON string. Example: \[\{"label": "Notify team", "name": "slack.post_message"\}\] |
488483
| `condition_groups` | string | No | Array of condition groups as JSON string to control when the workflow runs. Example: \[\{"conditions": \[\{"operation": "one_of", "param_bindings": \[\], "subject": "incident.severity"\}\]\}\] |
489-
| `runs_on_incidents` | string | No | When to run the workflow: "newly_created" \(only new incidents\), "newly_created_and_active" \(new and active incidents\), "active" \(only active incidents\), or "all" \(all incidents\) |
484+
| `runs_on_incidents` | string | No | When to run the workflow: "newly_created" \(only newly created incidents\) or "newly_created_and_active" \(newly created and already active incidents\) |
490485
| `runs_on_incident_modes` | string | No | Array of incident modes to run on as JSON string. Example: \["standard", "retrospective"\] |
491486
| `include_private_incidents` | boolean | No | Whether to include private incidents |
492487
| `continue_on_step_error` | boolean | No | Whether to continue executing subsequent steps if a step fails |
@@ -569,7 +564,7 @@ Update an existing workflow in incident.io.
569564
| `name` | string | Yes | New name for the workflow \(e.g., "Notify on Critical Incidents"\) |
570565
| `steps` | string | Yes | Complete array of workflow steps as a JSON string |
571566
| `condition_groups` | string | Yes | Complete array of workflow condition groups as a JSON string |
572-
| `runs_on_incidents` | string | Yes | When to run the workflow: newly_created, newly_created_and_active, active, or all |
567+
| `runs_on_incidents` | string | Yes | When to run the workflow: newly_created or newly_created_and_active |
573568
| `runs_on_incident_modes` | string | Yes | Complete array of incident modes to run on as a JSON string |
574569
| `include_private_incidents` | boolean | Yes | Whether to include private incidents |
575570
| `continue_on_step_error` | boolean | Yes | Whether to continue executing subsequent steps if a step fails |
@@ -783,11 +778,15 @@ List all escalation policies in incident.io
783778

784779
| Parameter | Type | Description |
785780
| --------- | ---- | ----------- |
786-
| `escalations` | array | List of escalation policies |
787-
|`id` | string | The escalation policy ID |
788-
|`name` | string | The escalation policy name |
789-
|`created_at` | string | When the escalation policy was created |
790-
|`updated_at` | string | When the escalation policy was last updated |
781+
| `escalations` | array | List of escalations |
782+
|`id` | string | The escalation ID |
783+
|`title` | string | The escalation title |
784+
|`status` | string | The current escalation status |
785+
|`description` | string | Additional detail provided with this escalation |
786+
|`priority` | object | The escalation priority |
787+
|`name` | string | Priority name |
788+
|`created_at` | string | When the escalation was created |
789+
|`updated_at` | string | When the escalation was last updated |
791790
| `pagination_meta` | object | Pagination metadata |
792791
|`after` | string | Cursor for next page |
793792
|`page_size` | number | Number of results per page |
@@ -810,11 +809,15 @@ Create a new escalation policy in incident.io
810809

811810
| Parameter | Type | Description |
812811
| --------- | ---- | ----------- |
813-
| `escalation` | object | The created escalation policy |
814-
|`id` | string | The escalation policy ID |
815-
|`name` | string | The escalation policy name |
816-
|`created_at` | string | When the escalation policy was created |
817-
|`updated_at` | string | When the escalation policy was last updated |
812+
| `escalation` | object | The created escalation |
813+
|`id` | string | The escalation ID |
814+
|`title` | string | The escalation title |
815+
|`status` | string | The current escalation status |
816+
|`description` | string | Additional detail provided with this escalation |
817+
|`priority` | object | The escalation priority |
818+
|`name` | string | Priority name |
819+
|`created_at` | string | When the escalation was created |
820+
|`updated_at` | string | When the escalation was last updated |
818821

819822
### Show Escalation
820823

@@ -831,11 +834,15 @@ Get details of a specific escalation policy in incident.io
831834

832835
| Parameter | Type | Description |
833836
| --------- | ---- | ----------- |
834-
| `escalation` | object | The escalation policy details |
835-
|`id` | string | The escalation policy ID |
836-
|`name` | string | The escalation policy name |
837-
|`created_at` | string | When the escalation policy was created |
838-
|`updated_at` | string | When the escalation policy was last updated |
837+
| `escalation` | object | The escalation details |
838+
|`id` | string | The escalation ID |
839+
|`title` | string | The escalation title |
840+
|`status` | string | The current escalation status |
841+
|`description` | string | Additional detail provided with this escalation |
842+
|`priority` | object | The escalation priority |
843+
|`name` | string | Priority name |
844+
|`created_at` | string | When the escalation was created |
845+
|`updated_at` | string | When the escalation was last updated |
839846

840847
### incident.io Custom Fields List
841848

@@ -870,7 +877,7 @@ Create a new custom field in incident.io.
870877
| `apiKey` | string | Yes | incident.io API Key |
871878
| `name` | string | Yes | Name of the custom field \(e.g., "Affected Service"\) |
872879
| `description` | string | Yes | Description of the custom field \(required\) |
873-
| `field_type` | string | Yes | Type of the custom field \(e.g., text, single_select, multi_select, numeric, datetime, link, user, team\) |
880+
| `field_type` | string | Yes | Type of the custom field: text, link, numeric, single_select, or multi_select |
874881

875882
#### Output
876883

@@ -1200,20 +1207,30 @@ List all updates for a specific incident in incident.io
12001207
|`id` | string | The update ID |
12011208
|`incident_id` | string | The incident ID |
12021209
|`message` | string | The update message |
1210+
|`merged_into_incident_id` | string | ID of the incident this incident was merged into |
12031211
|`new_severity` | object | New severity if changed |
12041212
|`id` | string | Severity ID |
12051213
|`name` | string | Severity name |
12061214
|`rank` | number | Severity rank |
1207-
|`new_status` | object | New status if changed |
1215+
|`new_incident_status` | object | The incident status after this update |
12081216
|`id` | string | Status ID |
12091217
|`name` | string | Status name |
12101218
|`category` | string | Status category |
1211-
|`updater` | object | User who created the update |
1212-
|`id` | string | User ID |
1213-
|`name` | string | User name |
1214-
|`email` | string | User email |
1219+
|`updater` | object | Actor who created the update |
1220+
|`user` | object | Set when a user made the update |
1221+
|`id` | string | User ID |
1222+
|`name` | string | User name |
1223+
|`email` | string | User email |
1224+
|`api_key` | object | Set when an API key made the update |
1225+
|`id` | string | API key ID |
1226+
|`name` | string | API key name |
1227+
|`workflow` | object | Set when a workflow made the update |
1228+
|`id` | string | Workflow ID |
1229+
|`name` | string | Workflow name |
1230+
|`alert` | object | Set when an alert made the update |
1231+
|`id` | string | Alert ID |
1232+
|`title` | string | Alert title |
12151233
|`created_at` | string | When the update was created |
1216-
|`updated_at` | string | When the update was last modified |
12171234
| `pagination_meta` | object | Pagination information |
12181235
|`after` | string | Cursor for next page |
12191236
|`page_size` | number | Number of results per page |

apps/sim/blocks/blocks/incidentio.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -701,8 +701,6 @@ Return ONLY the title - no explanations.`,
701701
options: [
702702
{ label: 'Newly Created', id: 'newly_created' },
703703
{ label: 'Newly Created and Active', id: 'newly_created_and_active' },
704-
{ label: 'Active', id: 'active' },
705-
{ label: 'All', id: 'all' },
706704
],
707705
value: () => 'newly_created',
708706
condition: {

apps/sim/tools/generated/tool-metadata.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

apps/sim/tools/generated/tool-outputs.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

apps/sim/tools/incidentio/custom_fields_create.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ export const customFieldsCreateTool: ToolConfig<
3333
type: 'string',
3434
required: true,
3535
visibility: 'user-or-llm',
36-
description:
37-
'Type of the custom field (e.g., text, single_select, multi_select, numeric, datetime, link, user, team)',
36+
description: 'Type of the custom field: text, link, numeric, single_select, or multi_select',
3837
},
3938
},
4039

apps/sim/tools/incidentio/escalations_create.ts

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,22 @@ export const escalationsCreateTool: ToolConfig<
8787
outputs: {
8888
escalation: {
8989
type: 'object',
90-
description: 'The created escalation policy',
90+
description: 'The created escalation',
9191
properties: {
92-
id: { type: 'string', description: 'The escalation policy ID' },
93-
name: { type: 'string', description: 'The escalation policy name' },
94-
created_at: { type: 'string', description: 'When the escalation policy was created' },
95-
updated_at: { type: 'string', description: 'When the escalation policy was last updated' },
92+
id: { type: 'string', description: 'The escalation ID' },
93+
title: { type: 'string', description: 'The escalation title' },
94+
status: { type: 'string', description: 'The current escalation status' },
95+
description: {
96+
type: 'string',
97+
description: 'Additional detail provided with this escalation',
98+
},
99+
priority: {
100+
type: 'object',
101+
description: 'The escalation priority',
102+
properties: { name: { type: 'string', description: 'Priority name' } },
103+
},
104+
created_at: { type: 'string', description: 'When the escalation was created' },
105+
updated_at: { type: 'string', description: 'When the escalation was last updated' },
96106
},
97107
},
98108
},

apps/sim/tools/incidentio/escalations_list.ts

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,26 @@ export const escalationsListTool: ToolConfig<
6868
outputs: {
6969
escalations: {
7070
type: 'array',
71-
description: 'List of escalation policies',
71+
description: 'List of escalations',
7272
items: {
7373
type: 'object',
7474
properties: {
75-
id: { type: 'string', description: 'The escalation policy ID' },
76-
name: { type: 'string', description: 'The escalation policy name' },
77-
created_at: { type: 'string', description: 'When the escalation policy was created' },
75+
id: { type: 'string', description: 'The escalation ID' },
76+
title: { type: 'string', description: 'The escalation title' },
77+
status: { type: 'string', description: 'The current escalation status' },
78+
description: {
79+
type: 'string',
80+
description: 'Additional detail provided with this escalation',
81+
},
82+
priority: {
83+
type: 'object',
84+
description: 'The escalation priority',
85+
properties: { name: { type: 'string', description: 'Priority name' } },
86+
},
87+
created_at: { type: 'string', description: 'When the escalation was created' },
7888
updated_at: {
7989
type: 'string',
80-
description: 'When the escalation policy was last updated',
90+
description: 'When the escalation was last updated',
8191
},
8292
},
8393
},

apps/sim/tools/incidentio/escalations_show.ts

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,22 @@ export const escalationsShowTool: ToolConfig<
5151
outputs: {
5252
escalation: {
5353
type: 'object',
54-
description: 'The escalation policy details',
54+
description: 'The escalation details',
5555
properties: {
56-
id: { type: 'string', description: 'The escalation policy ID' },
57-
name: { type: 'string', description: 'The escalation policy name' },
58-
created_at: { type: 'string', description: 'When the escalation policy was created' },
59-
updated_at: { type: 'string', description: 'When the escalation policy was last updated' },
56+
id: { type: 'string', description: 'The escalation ID' },
57+
title: { type: 'string', description: 'The escalation title' },
58+
status: { type: 'string', description: 'The current escalation status' },
59+
description: {
60+
type: 'string',
61+
description: 'Additional detail provided with this escalation',
62+
},
63+
priority: {
64+
type: 'object',
65+
description: 'The escalation priority',
66+
properties: { name: { type: 'string', description: 'Priority name' } },
67+
},
68+
created_at: { type: 'string', description: 'When the escalation was created' },
69+
updated_at: { type: 'string', description: 'When the escalation was last updated' },
6070
},
6171
},
6272
},

0 commit comments

Comments
 (0)