Files
sim/apps/sim/tools/vercel/delete_alias.ts
Waleed 91aa1f9a52 feat(tools): added vercel block & tools (#3252)
* feat(vercel): add complete Vercel integration with 42 API tools

Add Vercel platform management integration covering deployments, projects,
environment variables, domains, DNS records, aliases, edge configs, and
team/user management. All tools use API key authentication with Bearer tokens.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(vercel): add webhook and deployment check tools

Add 8 new Vercel API tools:
- Webhooks: list, create, delete
- Deployment Checks: create, get, list, update, rerequest

Brings total Vercel tools to 50.

* fix(vercel): expand all object and array output definitions

Expand unexpanded output types:
- get_deployment: meta and gitSource objects now have properties
- list_deployment_files: children array now has items definition
- get_team: teamRoles and teamPermissions arrays now have items

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* update icon size, update docs

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 15:54:49 -08:00

63 lines
1.7 KiB
TypeScript

import type { ToolConfig } from '@/tools/types'
import type { VercelDeleteAliasParams, VercelDeleteAliasResponse } from '@/tools/vercel/types'
export const vercelDeleteAliasTool: ToolConfig<VercelDeleteAliasParams, VercelDeleteAliasResponse> =
{
id: 'vercel_delete_alias',
name: 'Vercel Delete Alias',
description: 'Delete an alias by its ID',
version: '1.0.0',
params: {
apiKey: {
type: 'string',
required: true,
visibility: 'user-only',
description: 'Vercel Access Token',
},
aliasId: {
type: 'string',
required: true,
visibility: 'user-or-llm',
description: 'Alias ID to delete',
},
teamId: {
type: 'string',
required: false,
visibility: 'user-or-llm',
description: 'Team ID to scope the request',
},
},
request: {
url: (params: VercelDeleteAliasParams) => {
const query = new URLSearchParams()
if (params.teamId) query.set('teamId', params.teamId.trim())
const qs = query.toString()
return `https://api.vercel.com/v2/aliases/${params.aliasId.trim()}${qs ? `?${qs}` : ''}`
},
method: 'DELETE',
headers: (params: VercelDeleteAliasParams) => ({
Authorization: `Bearer ${params.apiKey}`,
'Content-Type': 'application/json',
}),
},
transformResponse: async (response: Response) => {
const data = await response.json()
return {
success: true,
output: {
status: data.status ?? 'SUCCESS',
},
}
},
outputs: {
status: {
type: 'string',
description: 'Deletion status (SUCCESS)',
},
},
}