Files
sim/apps/sim/tools/incidentio/workflows_delete.ts
Waleed ff79b78b5f feat(tools): added sentry, incidentio, and posthog tools (#2116)
* feat(tools): added sentry, incidentio, and posthog tools

* update docs

* fixed docs to use native fumadocs for llms.txt and copy markdown, fixed tool issues

* cleanup

* enhance error extractor, fixed posthog tools

* docs enhancements, cleanup

* added more incident io ops, remove zustand/shallow in favor of zustand/react/shallow

* fix type errors

* remove unnecessary comments

* added vllm to docs
2025-11-25 19:50:23 -08:00

50 lines
1.2 KiB
TypeScript

import type { ToolConfig } from '@/tools/types'
import type { WorkflowsDeleteParams, WorkflowsDeleteResponse } from './types'
export const workflowsDeleteTool: ToolConfig<WorkflowsDeleteParams, WorkflowsDeleteResponse> = {
id: 'incidentio_workflows_delete',
name: 'incident.io Workflows Delete',
description: 'Delete a workflow in incident.io.',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'incident.io API Key',
},
id: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'The ID of the workflow to delete',
},
},
request: {
url: (params) => `https://api.incident.io/v2/workflows/${params.id}`,
method: 'DELETE',
headers: (params) => ({
'Content-Type': 'application/json',
Authorization: `Bearer ${params.apiKey}`,
}),
},
transformResponse: async (response: Response) => {
return {
success: true,
output: {
message: 'Workflow deleted successfully',
},
}
},
outputs: {
message: {
type: 'string',
description: 'Success message',
},
},
}