Skip to content

Commit e3ba4ab

Browse files
waleedlatif1claude
andcommitted
fix(rootly): final validation fixes from OpenAPI spec audit
- update_incident: change PATCH to PUT per OpenAPI spec - index.ts: add types re-export - types.ts: fix id fields to string | null (matches ?? null runtime) - block: add value initializers to 4 dropdowns missing them - registry: fix alphabetical order (incident_types before incidents) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 0c7d61a commit e3ba4ab

4 files changed

Lines changed: 15 additions & 10 deletions

File tree

apps/sim/blocks/blocks/rootly.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ export const RootlyBlock: BlockConfig<RootlyResponse> = {
221221
{ label: 'In Progress', id: 'in_progress' },
222222
{ label: 'Completed', id: 'completed' },
223223
],
224+
value: () => '',
224225
condition: { field: 'operation', value: 'rootly_update_incident' },
225226
},
226227
{
@@ -359,6 +360,7 @@ export const RootlyBlock: BlockConfig<RootlyResponse> = {
359360
{ label: 'In Progress', id: 'in_progress' },
360361
{ label: 'Completed', id: 'completed' },
361362
],
363+
value: () => '',
362364
condition: { field: 'operation', value: 'rootly_list_incidents' },
363365
},
364366
{
@@ -531,6 +533,7 @@ export const RootlyBlock: BlockConfig<RootlyResponse> = {
531533
{ label: 'Resolved', id: 'resolved' },
532534
{ label: 'Deferred', id: 'deferred' },
533535
],
536+
value: () => '',
534537
condition: { field: 'operation', value: 'rootly_list_alerts' },
535538
},
536539
{
@@ -773,6 +776,7 @@ export const RootlyBlock: BlockConfig<RootlyResponse> = {
773776
{ label: 'Draft', id: 'draft' },
774777
{ label: 'Published', id: 'published' },
775778
],
779+
value: () => '',
776780
condition: { field: 'operation', value: 'rootly_list_retrospectives' },
777781
},
778782
{

apps/sim/tools/rootly/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ export { rootlyListRetrospectivesTool } from '@/tools/rootly/list_retrospectives
1111
export { rootlyListServicesTool } from '@/tools/rootly/list_services'
1212
export { rootlyListSeveritiesTool } from '@/tools/rootly/list_severities'
1313
export { rootlyListTeamsTool } from '@/tools/rootly/list_teams'
14+
export * from '@/tools/rootly/types'
1415
export { rootlyUpdateIncidentTool } from '@/tools/rootly/update_incident'

apps/sim/tools/rootly/types.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export interface RootlyCreateIncidentParams extends RootlyBaseParams {
2222
}
2323

2424
export interface RootlyIncidentData {
25-
id: string
25+
id: string | null
2626
sequentialId: number | null
2727
title: string
2828
slug: string | null
@@ -120,7 +120,7 @@ export interface RootlyCreateAlertParams extends RootlyBaseParams {
120120
}
121121

122122
export interface RootlyAlertData {
123-
id: string
123+
id: string | null
124124
summary: string
125125
description: string | null
126126
source: string | null
@@ -182,7 +182,7 @@ export interface RootlyListServicesParams extends RootlyBaseParams {
182182
}
183183

184184
export interface RootlyServiceData {
185-
id: string
185+
id: string | null
186186
name: string
187187
slug: string | null
188188
description: string | null
@@ -206,7 +206,7 @@ export interface RootlyListSeveritiesParams extends RootlyBaseParams {
206206
}
207207

208208
export interface RootlySeverityData {
209-
id: string
209+
id: string | null
210210
name: string
211211
slug: string | null
212212
description: string | null
@@ -233,7 +233,7 @@ export interface RootlyListRetrospectivesParams extends RootlyBaseParams {
233233
}
234234

235235
export interface RootlyRetrospectiveData {
236-
id: string
236+
id: string | null
237237
title: string
238238
status: string | null
239239
url: string | null
@@ -259,7 +259,7 @@ export interface RootlyListTeamsParams extends RootlyBaseParams {
259259
}
260260

261261
export interface RootlyTeamData {
262-
id: string
262+
id: string | null
263263
name: string
264264
slug: string | null
265265
description: string | null
@@ -283,7 +283,7 @@ export interface RootlyListEnvironmentsParams extends RootlyBaseParams {
283283
}
284284

285285
export interface RootlyEnvironmentData {
286-
id: string
286+
id: string | null
287287
name: string
288288
slug: string | null
289289
description: string | null
@@ -307,7 +307,7 @@ export interface RootlyListIncidentTypesParams extends RootlyBaseParams {
307307
}
308308

309309
export interface RootlyIncidentTypeData {
310-
id: string
310+
id: string | null
311311
name: string
312312
slug: string | null
313313
description: string | null
@@ -331,7 +331,7 @@ export interface RootlyListFunctionalitiesParams extends RootlyBaseParams {
331331
}
332332

333333
export interface RootlyFunctionalityData {
334-
id: string
334+
id: string | null
335335
name: string
336336
slug: string | null
337337
description: string | null

apps/sim/tools/rootly/update_incident.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export const rootlyUpdateIncidentTool: ToolConfig<
119119

120120
request: {
121121
url: (params) => `https://api.rootly.com/v1/incidents/${params.incidentId.trim()}`,
122-
method: 'PATCH',
122+
method: 'PUT',
123123
headers: (params) => ({
124124
'Content-Type': 'application/vnd.api+json',
125125
Authorization: `Bearer ${params.apiKey}`,

0 commit comments

Comments
 (0)