diff --git a/apps/sim/blocks/blocks/vercel.ts b/apps/sim/blocks/blocks/vercel.ts index 65e0513c63b..b754122b061 100644 --- a/apps/sim/blocks/blocks/vercel.ts +++ b/apps/sim/blocks/blocks/vercel.ts @@ -103,7 +103,7 @@ export const VercelBlock: BlockConfig = { }, { - id: 'projectId', + id: 'deploymentsProjectId', title: 'Project ID', type: 'short-input', placeholder: 'Filter by project ID or name (optional)', @@ -137,6 +137,38 @@ export const VercelBlock: BlockConfig = { condition: { field: 'operation', value: 'list_deployments' }, mode: 'advanced', }, + { + id: 'deploymentsApp', + title: 'App Name', + type: 'short-input', + placeholder: 'Filter by deployment name (optional)', + condition: { field: 'operation', value: 'list_deployments' }, + mode: 'advanced', + }, + { + id: 'deploymentsSince', + title: 'Since', + type: 'short-input', + placeholder: 'Only deployments created after this timestamp, in ms (optional)', + condition: { field: 'operation', value: 'list_deployments' }, + mode: 'advanced', + }, + { + id: 'deploymentsUntil', + title: 'Until', + type: 'short-input', + placeholder: 'Only deployments created before this timestamp, in ms (optional)', + condition: { field: 'operation', value: 'list_deployments' }, + mode: 'advanced', + }, + { + id: 'deploymentsLimit', + title: 'Limit', + type: 'short-input', + placeholder: 'Maximum number of deployments to return (optional)', + condition: { field: 'operation', value: 'list_deployments' }, + mode: 'advanced', + }, { id: 'deploymentId', title: 'Deployment ID', @@ -165,6 +197,63 @@ export const VercelBlock: BlockConfig = { ], }, }, + { + id: 'withGitRepoInfo', + title: 'Include Git Repo Info', + type: 'dropdown', + options: [ + { label: 'No', id: '' }, + { label: 'Yes', id: 'true' }, + ], + condition: { field: 'operation', value: 'get_deployment' }, + mode: 'advanced', + }, + { + id: 'eventsDirection', + title: 'Direction', + type: 'dropdown', + options: [ + { label: 'Forward (default)', id: '' }, + { label: 'Backward', id: 'backward' }, + ], + condition: { field: 'operation', value: 'get_deployment_events' }, + mode: 'advanced', + }, + { + id: 'eventsFollow', + title: 'Follow Live Events', + type: 'dropdown', + options: [ + { label: 'No', id: '' }, + { label: 'Yes', id: '1' }, + ], + condition: { field: 'operation', value: 'get_deployment_events' }, + mode: 'advanced', + }, + { + id: 'eventsLimit', + title: 'Limit', + type: 'short-input', + placeholder: 'Maximum number of events to return, -1 for all (optional)', + condition: { field: 'operation', value: 'get_deployment_events' }, + mode: 'advanced', + }, + { + id: 'eventsSince', + title: 'Since', + type: 'short-input', + placeholder: 'Timestamp to start pulling build logs from (optional)', + condition: { field: 'operation', value: 'get_deployment_events' }, + mode: 'advanced', + }, + { + id: 'eventsUntil', + title: 'Until', + type: 'short-input', + placeholder: 'Timestamp to stop pulling build logs at (optional)', + condition: { field: 'operation', value: 'get_deployment_events' }, + mode: 'advanced', + }, { id: 'name', title: 'Project Name', @@ -201,6 +290,25 @@ export const VercelBlock: BlockConfig = { condition: { field: 'operation', value: 'create_deployment' }, mode: 'advanced', }, + { + id: 'deploymentGitSource', + title: 'Git Source', + type: 'code', + placeholder: '{"type":"github","repo":"owner/repo","ref":"main"}', + condition: { field: 'operation', value: 'create_deployment' }, + mode: 'advanced', + }, + { + id: 'deploymentForceNew', + title: 'Force New Deployment', + type: 'dropdown', + options: [ + { label: 'No', id: '' }, + { label: 'Yes', id: '1' }, + ], + condition: { field: 'operation', value: 'create_deployment' }, + mode: 'advanced', + }, { id: 'search', @@ -210,6 +318,14 @@ export const VercelBlock: BlockConfig = { condition: { field: 'operation', value: 'list_projects' }, mode: 'advanced', }, + { + id: 'projectsFrom', + title: 'From', + type: 'short-input', + placeholder: "Continuation token from the previous response's nextFrom output (optional)", + condition: { field: 'operation', value: 'list_projects' }, + mode: 'advanced', + }, { id: 'projectId', title: 'Project ID', @@ -264,6 +380,14 @@ export const VercelBlock: BlockConfig = { condition: { field: 'operation', value: 'create_project' }, required: { field: 'operation', value: 'create_project' }, }, + { + id: 'updateProjectName', + title: 'New Project Name', + type: 'short-input', + placeholder: 'Rename the project (optional — leave blank to keep)', + condition: { field: 'operation', value: 'update_project' }, + mode: 'advanced', + }, { id: 'framework', title: 'Framework', @@ -306,7 +430,39 @@ export const VercelBlock: BlockConfig = { condition: { field: 'operation', value: ['create_project', 'update_project'] }, mode: 'advanced', }, + { + id: 'rootDirectory', + title: 'Root Directory', + type: 'short-input', + placeholder: 'Subdirectory of the repo to deploy from (optional)', + condition: { field: 'operation', value: ['create_project', 'update_project'] }, + mode: 'advanced', + }, + { + id: 'nodeVersion', + title: 'Node.js Version', + type: 'short-input', + placeholder: 'e.g. 22.x, 20.x, 18.x (optional)', + condition: { field: 'operation', value: ['create_project', 'update_project'] }, + mode: 'advanced', + }, + { + id: 'devCommand', + title: 'Dev Command', + type: 'short-input', + placeholder: 'Custom dev server command (optional)', + condition: { field: 'operation', value: ['create_project', 'update_project'] }, + mode: 'advanced', + }, + { + id: 'projectDomainsLimit', + title: 'Limit', + type: 'short-input', + placeholder: 'Maximum number of domains to return (optional)', + condition: { field: 'operation', value: 'list_project_domains' }, + mode: 'advanced', + }, { id: 'domainName', title: 'Domain', @@ -351,7 +507,7 @@ export const VercelBlock: BlockConfig = { title: 'Redirect To', type: 'short-input', placeholder: 'Target domain to redirect to (optional)', - condition: { field: 'operation', value: 'update_project_domain' }, + condition: { field: 'operation', value: ['update_project_domain', 'add_project_domain'] }, mode: 'advanced', }, { @@ -365,7 +521,7 @@ export const VercelBlock: BlockConfig = { { label: '307 (Temporary)', id: '307' }, { label: '308 (Permanent)', id: '308' }, ], - condition: { field: 'operation', value: 'update_project_domain' }, + condition: { field: 'operation', value: ['update_project_domain', 'add_project_domain'] }, mode: 'advanced', }, { @@ -373,7 +529,15 @@ export const VercelBlock: BlockConfig = { title: 'Git Branch', type: 'short-input', placeholder: 'Git branch to link the domain to (optional)', - condition: { field: 'operation', value: 'update_project_domain' }, + condition: { field: 'operation', value: ['update_project_domain', 'add_project_domain'] }, + mode: 'advanced', + }, + { + id: 'dnsRecordsLimit', + title: 'Limit', + type: 'short-input', + placeholder: 'Maximum number of records to return (optional)', + condition: { field: 'operation', value: 'list_dns_records' }, mode: 'advanced', }, @@ -422,6 +586,41 @@ export const VercelBlock: BlockConfig = { condition: { field: 'operation', value: ['create_env_var', 'update_env_var'] }, mode: 'advanced', }, + { + id: 'envGitBranch', + title: 'Git Branch', + type: 'short-input', + placeholder: 'Git branch to associate with the variable (requires preview target)', + condition: { field: 'operation', value: ['create_env_var', 'update_env_var'] }, + mode: 'advanced', + }, + { + id: 'envComment', + title: 'Comment', + type: 'short-input', + placeholder: 'Context for this variable (max 500 chars)', + condition: { field: 'operation', value: ['create_env_var', 'update_env_var'] }, + mode: 'advanced', + }, + { + id: 'envVarsDecrypt', + title: 'Decrypt Values', + type: 'dropdown', + options: [ + { label: 'No', id: '' }, + { label: 'Yes', id: 'true' }, + ], + condition: { field: 'operation', value: 'get_env_vars' }, + mode: 'advanced', + }, + { + id: 'envVarsGitBranch', + title: 'Git Branch', + type: 'short-input', + placeholder: 'Filter by git branch (requires preview target)', + condition: { field: 'operation', value: 'get_env_vars' }, + mode: 'advanced', + }, { id: 'recordName', @@ -445,6 +644,7 @@ export const VercelBlock: BlockConfig = { { label: 'ALIAS', id: 'ALIAS' }, { label: 'SRV', id: 'SRV' }, { label: 'CAA', id: 'CAA' }, + { label: 'HTTPS', id: 'HTTPS' }, ], condition: { field: 'operation', value: 'create_dns_record' }, required: { field: 'operation', value: 'create_dns_record' }, @@ -454,8 +654,148 @@ export const VercelBlock: BlockConfig = { title: 'Value', type: 'short-input', placeholder: 'Record value (e.g., IP address)', + condition: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: ['SRV', 'HTTPS'], not: true }, + }, + required: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: ['SRV', 'HTTPS'], not: true }, + }, + }, + { + id: 'recordMxPriority', + title: 'MX Priority', + type: 'short-input', + placeholder: 'Priority for the MX record', + condition: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'MX' }, + }, + required: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'MX' }, + }, + }, + { + id: 'srvTarget', + title: 'SRV Target', + type: 'short-input', + placeholder: 'Target hostname for the SRV record', + condition: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'SRV' }, + }, + required: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'SRV' }, + }, + }, + { + id: 'srvWeight', + title: 'SRV Weight', + type: 'short-input', + placeholder: 'Weight for the SRV record', + condition: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'SRV' }, + }, + required: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'SRV' }, + }, + }, + { + id: 'srvPort', + title: 'SRV Port', + type: 'short-input', + placeholder: 'Port for the SRV record', + condition: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'SRV' }, + }, + required: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'SRV' }, + }, + }, + { + id: 'srvPriority', + title: 'SRV Priority', + type: 'short-input', + placeholder: 'Priority for the SRV record', + condition: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'SRV' }, + }, + required: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'SRV' }, + }, + }, + { + id: 'httpsTarget', + title: 'HTTPS Target', + type: 'short-input', + placeholder: 'Target hostname for the HTTPS record', + condition: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'HTTPS' }, + }, + required: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'HTTPS' }, + }, + }, + { + id: 'httpsPriority', + title: 'HTTPS Priority', + type: 'short-input', + placeholder: 'Priority for the HTTPS record', + condition: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'HTTPS' }, + }, + required: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'HTTPS' }, + }, + }, + { + id: 'httpsParams', + title: 'HTTPS Params', + type: 'short-input', + placeholder: 'Optional service parameters (e.g., "alpn=h2,h3")', + condition: { + field: 'operation', + value: 'create_dns_record', + and: { field: 'recordType', value: 'HTTPS' }, + }, + mode: 'advanced', + }, + { + id: 'recordComment', + title: 'Comment', + type: 'short-input', + placeholder: 'Context for this DNS record (max 500 chars)', condition: { field: 'operation', value: 'create_dns_record' }, - required: { field: 'operation', value: 'create_dns_record' }, + mode: 'advanced', }, { id: 'recordId', @@ -495,8 +835,13 @@ export const VercelBlock: BlockConfig = { id: 'updateRecordValue', title: 'Value', type: 'short-input', - placeholder: 'New record value — leave blank to keep', - condition: { field: 'operation', value: 'update_dns_record' }, + placeholder: + 'New record value — leave blank to keep. Has no effect if the existing record is SRV or HTTPS; explicitly set Record Type to update those.', + condition: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: ['SRV', 'HTTPS'], not: true }, + }, }, { id: 'updateRecordTtl', @@ -514,6 +859,114 @@ export const VercelBlock: BlockConfig = { condition: { field: 'operation', value: 'update_dns_record' }, mode: 'advanced', }, + { + id: 'updateSrvTarget', + title: 'SRV Target', + type: 'short-input', + placeholder: 'Target hostname for the SRV record', + condition: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: 'SRV' }, + }, + required: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: 'SRV' }, + }, + }, + { + id: 'updateSrvWeight', + title: 'SRV Weight', + type: 'short-input', + placeholder: 'Weight for the SRV record', + condition: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: 'SRV' }, + }, + required: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: 'SRV' }, + }, + }, + { + id: 'updateSrvPort', + title: 'SRV Port', + type: 'short-input', + placeholder: 'Port for the SRV record', + condition: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: 'SRV' }, + }, + required: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: 'SRV' }, + }, + }, + { + id: 'updateSrvPriority', + title: 'SRV Priority', + type: 'short-input', + placeholder: 'Priority for the SRV record', + condition: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: 'SRV' }, + }, + required: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: 'SRV' }, + }, + }, + { + id: 'updateHttpsTarget', + title: 'HTTPS Target', + type: 'short-input', + placeholder: 'Target hostname for the HTTPS record', + condition: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: 'HTTPS' }, + }, + required: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: 'HTTPS' }, + }, + }, + { + id: 'updateHttpsPriority', + title: 'HTTPS Priority', + type: 'short-input', + placeholder: 'Priority for the HTTPS record', + condition: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: 'HTTPS' }, + }, + required: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: 'HTTPS' }, + }, + }, + { + id: 'updateHttpsParams', + title: 'HTTPS Params', + type: 'short-input', + placeholder: 'Optional service parameters (e.g., "alpn=h2,h3")', + condition: { + field: 'operation', + value: 'update_dns_record', + and: { field: 'updateRecordType', value: 'HTTPS' }, + }, + mode: 'advanced', + }, { id: 'updateRecordComment', title: 'Comment', @@ -547,6 +1000,14 @@ export const VercelBlock: BlockConfig = { condition: { field: 'operation', value: 'create_alias' }, required: { field: 'operation', value: 'create_alias' }, }, + { + id: 'aliasRedirect', + title: 'Redirect To', + type: 'short-input', + placeholder: 'Hostname to 307-redirect the alias to (optional)', + condition: { field: 'operation', value: 'create_alias' }, + mode: 'advanced', + }, { id: 'edgeConfigId', @@ -708,6 +1169,44 @@ export const VercelBlock: BlockConfig = { ], condition: { field: 'operation', value: 'update_check' }, }, + { + id: 'checkExternalId', + title: 'External ID', + type: 'short-input', + placeholder: 'External identifier for the check (optional)', + condition: { field: 'operation', value: ['create_check', 'update_check'] }, + mode: 'advanced', + }, + { + id: 'checkRerequestable', + title: 'Rerequestable', + type: 'dropdown', + options: [ + { label: 'No', id: '' }, + { label: 'Yes', id: 'true' }, + ], + condition: { field: 'operation', value: 'create_check' }, + mode: 'advanced', + }, + { + id: 'checkOutput', + title: 'Output', + type: 'code', + placeholder: '{"metrics":{"FCP":{"value":1200,"source":"web-vitals"}}}', + condition: { field: 'operation', value: 'update_check' }, + mode: 'advanced', + }, + { + id: 'checkAutoUpdate', + title: 'Auto Update', + type: 'dropdown', + options: [ + { label: 'No', id: '' }, + { label: 'Yes', id: 'true' }, + ], + condition: { field: 'operation', value: 'rerequest_check' }, + mode: 'advanced', + }, { id: 'teamIdParam', @@ -732,25 +1231,126 @@ export const VercelBlock: BlockConfig = { condition: { field: 'operation', value: 'list_team_members' }, mode: 'advanced', }, + { + id: 'teamMembersLimit', + title: 'Limit', + type: 'short-input', + placeholder: 'Maximum number of members to return (optional)', + condition: { field: 'operation', value: 'list_team_members' }, + mode: 'advanced', + }, + { + id: 'teamMembersSince', + title: 'Since', + type: 'short-input', + placeholder: 'Only members added since this timestamp, in ms (optional)', + condition: { field: 'operation', value: 'list_team_members' }, + mode: 'advanced', + }, + { + id: 'teamMembersUntil', + title: 'Until', + type: 'short-input', + placeholder: 'Only members added until this timestamp, in ms (optional)', + condition: { field: 'operation', value: 'list_team_members' }, + mode: 'advanced', + }, + { + id: 'teamMembersSearch', + title: 'Search', + type: 'short-input', + placeholder: 'Search members by name, username, or email (optional)', + condition: { field: 'operation', value: 'list_team_members' }, + mode: 'advanced', + }, + { + id: 'teamsLimit', + title: 'Limit', + type: 'short-input', + placeholder: 'Maximum number of teams to return (optional)', + condition: { field: 'operation', value: 'list_teams' }, + mode: 'advanced', + }, + { + id: 'teamsSince', + title: 'Since', + type: 'short-input', + placeholder: 'Only teams created since this timestamp, in ms (optional)', + condition: { field: 'operation', value: 'list_teams' }, + mode: 'advanced', + }, + { + id: 'teamsUntil', + title: 'Until', + type: 'short-input', + placeholder: 'Only teams created until this timestamp, in ms (optional)', + condition: { field: 'operation', value: 'list_teams' }, + mode: 'advanced', + }, { id: 'teamId', title: 'Team ID (Scope)', type: 'short-input', placeholder: 'Team ID to scope request (optional)', + condition: { + field: 'operation', + value: ['get_team', 'list_team_members', 'get_user', 'list_teams'], + not: true, + }, + mode: 'advanced', + }, + { + id: 'teamSlug', + title: 'Team Slug (Scope)', + type: 'short-input', + placeholder: 'Team slug to scope request, alternative to Team ID (optional)', condition: { field: 'operation', value: [ - 'get_team', - 'list_team_members', - 'get_user', + 'add_project_domain', + 'create_env_var', + 'create_project', + 'delete_env_var', + 'delete_project', + 'get_env_vars', + 'get_project', + 'list_project_domains', + 'list_projects', + 'pause_project', + 'remove_project_domain', + 'unpause_project', + 'update_env_var', + 'update_project_domain', + 'update_project', + 'verify_project_domain', + 'create_deployment', + 'get_deployment', + 'list_deployments', + 'cancel_deployment', + 'delete_deployment', + 'promote_deployment', + 'get_deployment_events', + 'list_deployment_files', 'create_check', 'get_check', 'list_checks', 'update_check', 'rerequest_check', + 'list_domains', + 'get_domain', + 'add_domain', + 'delete_domain', + 'get_domain_config', + 'list_dns_records', + 'create_dns_record', + 'update_dns_record', + 'delete_dns_record', + 'list_aliases', + 'get_alias', + 'create_alias', + 'delete_alias', ], - not: true, }, mode: 'advanced', }, @@ -829,23 +1429,61 @@ export const VercelBlock: BlockConfig = { const { apiKey, operation, + deploymentsProjectId, + deploymentsApp, + deploymentsSince, + deploymentsUntil, + deploymentsLimit, redeployId, deployTarget, + deploymentGitSource, + deploymentForceNew, + withGitRepoInfo, + eventsDirection, + eventsFollow, + eventsLimit, + eventsSince, + eventsUntil, projectName, + updateProjectName, domainName, + dnsRecordsLimit, + projectDomainsLimit, envKey, envValue, envTarget, envType, + envGitBranch, + envComment, + envVarsDecrypt, + envVarsGitBranch, + projectsFrom, + teamSlug, recordName, recordType, recordValue, recordId, + recordMxPriority, + srvTarget, + srvWeight, + srvPort, + srvPriority, + httpsTarget, + httpsPriority, + httpsParams, + recordComment, updateRecordName, updateRecordType, updateRecordValue, updateRecordTtl, updateRecordMxPriority, + updateSrvTarget, + updateSrvWeight, + updateSrvPort, + updateSrvPriority, + updateHttpsTarget, + updateHttpsPriority, + updateHttpsParams, updateRecordComment, updateDomainRedirect, updateDomainRedirectStatusCode, @@ -853,6 +1491,7 @@ export const VercelBlock: BlockConfig = { aliasId, aliasDeploymentId, aliasName, + aliasRedirect, edgeConfigId, edgeConfigSlug, edgeConfigItems, @@ -868,25 +1507,69 @@ export const VercelBlock: BlockConfig = { checkDetailsUrl, checkStatus, checkConclusion, + checkExternalId, + checkRerequestable, + checkOutput, + checkAutoUpdate, teamIdParam, memberRole, + teamMembersLimit, + teamMembersSince, + teamMembersUntil, + teamMembersSearch, + teamsLimit, + teamsSince, + teamsUntil, ...rest } = params - const base = { ...rest, apiKey } + const base = { ...rest, apiKey, ...(teamSlug ? { slug: teamSlug } : {}) } switch (operation) { + case 'list_deployments': + return { + ...base, + projectId: deploymentsProjectId || undefined, + ...(deploymentsApp ? { app: deploymentsApp } : {}), + ...(deploymentsSince ? { since: Number(deploymentsSince) } : {}), + ...(deploymentsUntil ? { until: Number(deploymentsUntil) } : {}), + ...(deploymentsLimit ? { limit: Number(deploymentsLimit) } : {}), + } + case 'get_deployment': + return { ...base, ...(withGitRepoInfo ? { withGitRepoInfo } : {}) } + case 'get_deployment_events': + return { + ...base, + ...(eventsDirection ? { direction: eventsDirection } : {}), + ...(eventsFollow ? { follow: Number(eventsFollow) } : {}), + ...(eventsLimit ? { limit: Number(eventsLimit) } : {}), + ...(eventsSince ? { since: Number(eventsSince) } : {}), + ...(eventsUntil ? { until: Number(eventsUntil) } : {}), + } case 'create_deployment': return { ...base, - ...(redeployId ? { deploymentId: redeployId } : {}), - ...(deployTarget ? { target: deployTarget } : {}), + deploymentId: redeployId || undefined, + target: deployTarget || undefined, + ...(deploymentGitSource ? { gitSource: deploymentGitSource } : {}), + ...(deploymentForceNew ? { forceNew: deploymentForceNew } : {}), } case 'create_project': return { ...base, name: projectName } case 'update_project': - return base + return { ...base, name: updateProjectName || undefined } + case 'list_projects': + return { ...base, ...(projectsFrom ? { from: projectsFrom } : {}) } case 'add_project_domain': + return { + ...base, + domain: domainName, + ...(updateDomainRedirect ? { redirect: updateDomainRedirect } : {}), + ...(updateDomainRedirectStatusCode + ? { redirectStatusCode: Number(updateDomainRedirectStatusCode) } + : {}), + ...(updateDomainGitBranch ? { gitBranch: updateDomainGitBranch } : {}), + } case 'remove_project_domain': case 'verify_project_domain': return { ...base, domain: domainName } @@ -896,7 +1579,7 @@ export const VercelBlock: BlockConfig = { domain: domainName, ...(updateDomainRedirect ? { redirect: updateDomainRedirect } : {}), ...(updateDomainRedirectStatusCode - ? { redirectStatusCode: updateDomainRedirectStatusCode } + ? { redirectStatusCode: Number(updateDomainRedirectStatusCode) } : {}), ...(updateDomainGitBranch ? { gitBranch: updateDomainGitBranch } : {}), } @@ -907,37 +1590,105 @@ export const VercelBlock: BlockConfig = { case 'add_domain': return { ...base, name: domainName } case 'list_dns_records': - return { ...base, domain: domainName } + return { + ...base, + domain: domainName, + ...(dnsRecordsLimit ? { limit: Number(dnsRecordsLimit) } : {}), + } + case 'list_project_domains': + return { + ...base, + ...(projectDomainsLimit ? { limit: Number(projectDomainsLimit) } : {}), + } case 'create_dns_record': - return { ...base, domain: domainName, recordName, recordType, value: recordValue } + return { + ...base, + domain: domainName, + recordName, + recordType, + ...(recordValue ? { value: recordValue } : {}), + ...(recordMxPriority !== '' && recordMxPriority != null + ? { mxPriority: Number(recordMxPriority) } + : {}), + ...(srvTarget ? { srvTarget } : {}), + ...(srvWeight !== '' && srvWeight != null ? { srvWeight: Number(srvWeight) } : {}), + ...(srvPort !== '' && srvPort != null ? { srvPort: Number(srvPort) } : {}), + ...(srvPriority !== '' && srvPriority != null + ? { srvPriority: Number(srvPriority) } + : {}), + ...(httpsTarget ? { httpsTarget } : {}), + ...(httpsPriority !== '' && httpsPriority != null + ? { httpsPriority: Number(httpsPriority) } + : {}), + ...(httpsParams ? { httpsParams } : {}), + ...(recordComment ? { comment: recordComment } : {}), + } case 'delete_dns_record': return { ...base, domain: domainName, recordId } case 'update_dns_record': return { ...base, recordId, - ...(updateRecordName ? { name: updateRecordName } : {}), + name: updateRecordName || undefined, ...(updateRecordType ? { type: updateRecordType } : {}), ...(updateRecordValue ? { value: updateRecordValue } : {}), ...(updateRecordTtl ? { ttl: updateRecordTtl } : {}), - ...(updateRecordMxPriority ? { mxPriority: updateRecordMxPriority } : {}), + ...(updateRecordMxPriority !== '' && updateRecordMxPriority != null + ? { mxPriority: updateRecordMxPriority } + : {}), + ...(updateSrvTarget ? { srvTarget: updateSrvTarget } : {}), + ...(updateSrvWeight !== '' && updateSrvWeight != null + ? { srvWeight: Number(updateSrvWeight) } + : {}), + ...(updateSrvPort !== '' && updateSrvPort != null + ? { srvPort: Number(updateSrvPort) } + : {}), + ...(updateSrvPriority !== '' && updateSrvPriority != null + ? { srvPriority: Number(updateSrvPriority) } + : {}), + ...(updateHttpsTarget ? { httpsTarget: updateHttpsTarget } : {}), + ...(updateHttpsPriority !== '' && updateHttpsPriority != null + ? { httpsPriority: Number(updateHttpsPriority) } + : {}), + ...(updateHttpsParams ? { httpsParams: updateHttpsParams } : {}), ...(updateRecordComment ? { comment: updateRecordComment } : {}), } + case 'get_env_vars': + return { + ...base, + ...(envVarsDecrypt ? { decrypt: envVarsDecrypt === 'true' } : {}), + ...(envVarsGitBranch ? { gitBranch: envVarsGitBranch } : {}), + } case 'create_env_var': - return { ...base, key: envKey, value: envValue, target: envTarget, type: envType } + return { + ...base, + key: envKey, + value: envValue, + target: envTarget, + type: envType, + ...(envGitBranch ? { gitBranch: envGitBranch } : {}), + ...(envComment ? { comment: envComment } : {}), + } case 'update_env_var': return { ...base, ...(envKey ? { key: envKey } : {}), ...(envValue ? { value: envValue } : {}), - ...(envTarget ? { target: envTarget } : {}), + target: envTarget || undefined, ...(envType ? { type: envType } : {}), + ...(envGitBranch ? { gitBranch: envGitBranch } : {}), + ...(envComment ? { comment: envComment } : {}), } case 'get_alias': case 'delete_alias': return { ...base, aliasId } case 'create_alias': - return { ...base, deploymentId: aliasDeploymentId, alias: aliasName } + return { + ...base, + deploymentId: aliasDeploymentId, + alias: aliasName, + ...(aliasRedirect ? { redirect: aliasRedirect } : {}), + } case 'get_edge_config': case 'get_edge_config_items': case 'delete_edge_config': @@ -964,10 +1715,18 @@ export const VercelBlock: BlockConfig = { blocking: checkBlocking === 'true', ...(checkPath ? { path: checkPath } : {}), ...(checkDetailsUrl ? { detailsUrl: checkDetailsUrl } : {}), + ...(checkExternalId ? { externalId: checkExternalId } : {}), + ...(checkRerequestable ? { rerequestable: checkRerequestable === 'true' } : {}), } case 'get_check': - case 'rerequest_check': return { ...base, deploymentId: checkDeploymentId, checkId } + case 'rerequest_check': + return { + ...base, + deploymentId: checkDeploymentId, + checkId, + ...(checkAutoUpdate ? { autoUpdate: checkAutoUpdate === 'true' } : {}), + } case 'list_checks': return { ...base, deploymentId: checkDeploymentId } case 'update_check': @@ -975,16 +1734,33 @@ export const VercelBlock: BlockConfig = { ...base, deploymentId: checkDeploymentId, checkId, - ...(checkName ? { name: checkName } : {}), + name: checkName || undefined, ...(checkStatus ? { status: checkStatus } : {}), ...(checkConclusion ? { conclusion: checkConclusion } : {}), ...(checkPath ? { path: checkPath } : {}), ...(checkDetailsUrl ? { detailsUrl: checkDetailsUrl } : {}), + ...(checkExternalId ? { externalId: checkExternalId } : {}), + ...(checkOutput ? { output: checkOutput } : {}), } case 'get_team': return { ...base, teamId: teamIdParam } case 'list_team_members': - return { ...base, teamId: teamIdParam, ...(memberRole ? { role: memberRole } : {}) } + return { + ...base, + teamId: teamIdParam, + ...(memberRole ? { role: memberRole } : {}), + ...(teamMembersLimit ? { limit: Number(teamMembersLimit) } : {}), + ...(teamMembersSince ? { since: Number(teamMembersSince) } : {}), + ...(teamMembersUntil ? { until: Number(teamMembersUntil) } : {}), + search: teamMembersSearch || undefined, + } + case 'list_teams': + return { + ...base, + ...(teamsLimit ? { limit: Number(teamsLimit) } : {}), + ...(teamsSince ? { since: Number(teamsSince) } : {}), + ...(teamsUntil ? { until: Number(teamsUntil) } : {}), + } default: return base } @@ -995,34 +1771,83 @@ export const VercelBlock: BlockConfig = { operation: { type: 'string', description: 'Operation to perform' }, apiKey: { type: 'string', description: 'Vercel access token' }, projectId: { type: 'string', description: 'Project ID or name' }, + deploymentsProjectId: { + type: 'string', + description: 'Filter deployments by project ID or name', + }, deploymentId: { type: 'string', description: 'Deployment ID or hostname' }, name: { type: 'string', description: 'Project name' }, projectName: { type: 'string', description: 'New project name' }, + updateProjectName: { type: 'string', description: 'Renamed project name for update_project' }, project: { type: 'string', description: 'Project ID override' }, redeployId: { type: 'string', description: 'Deployment ID to redeploy' }, target: { type: 'string', description: 'Target environment filter' }, deployTarget: { type: 'string', description: 'Deployment target environment' }, + deploymentGitSource: { type: 'string', description: 'JSON git source for the deployment' }, + deploymentForceNew: { type: 'string', description: 'Whether to force a new deployment' }, + withGitRepoInfo: { type: 'string', description: 'Whether to include git repo info' }, + eventsDirection: { type: 'string', description: 'Order of deployment events' }, + eventsFollow: { type: 'string', description: 'Whether to follow live deployment events' }, + eventsLimit: { type: 'string', description: 'Maximum number of deployment events to return' }, + eventsSince: { type: 'string', description: 'Only events after this timestamp' }, + eventsUntil: { type: 'string', description: 'Only events before this timestamp' }, state: { type: 'string', description: 'Deployment state filter' }, search: { type: 'string', description: 'Project search query' }, + projectsFrom: { type: 'string', description: 'Pagination continuation token' }, + deploymentsApp: { type: 'string', description: 'Filter deployments by deployment name' }, + deploymentsSince: { type: 'string', description: 'Only deployments after this timestamp' }, + deploymentsUntil: { type: 'string', description: 'Only deployments before this timestamp' }, + deploymentsLimit: { type: 'string', description: 'Maximum number of deployments to return' }, framework: { type: 'string', description: 'Project framework' }, buildCommand: { type: 'string', description: 'Build command' }, outputDirectory: { type: 'string', description: 'Output directory' }, installCommand: { type: 'string', description: 'Install command' }, + rootDirectory: { type: 'string', description: 'Root directory of the project' }, + nodeVersion: { type: 'string', description: 'Node.js version' }, + devCommand: { type: 'string', description: 'Dev command' }, domainName: { type: 'string', description: 'Domain name' }, + dnsRecordsLimit: { type: 'string', description: 'Maximum number of DNS records to return' }, + projectDomainsLimit: { + type: 'string', + description: 'Maximum number of project domains to return', + }, envId: { type: 'string', description: 'Environment variable ID' }, envKey: { type: 'string', description: 'Environment variable key' }, envValue: { type: 'string', description: 'Environment variable value' }, envTarget: { type: 'string', description: 'Target environments' }, envType: { type: 'string', description: 'Variable type' }, + envGitBranch: { type: 'string', description: 'Git branch for the environment variable' }, + envComment: { type: 'string', description: 'Comment for the environment variable' }, + envVarsDecrypt: { type: 'string', description: 'Whether to return decrypted values' }, + envVarsGitBranch: { type: 'string', description: 'Filter environment variables by git branch' }, recordName: { type: 'string', description: 'DNS record name' }, recordType: { type: 'string', description: 'DNS record type' }, recordValue: { type: 'string', description: 'DNS record value' }, recordId: { type: 'string', description: 'DNS record ID' }, + recordMxPriority: { type: 'string', description: 'Priority for MX records' }, + srvTarget: { type: 'string', description: 'Target hostname for SRV records' }, + srvWeight: { type: 'string', description: 'Weight for SRV records' }, + srvPort: { type: 'string', description: 'Port for SRV records' }, + srvPriority: { type: 'string', description: 'Priority for SRV records' }, + httpsTarget: { type: 'string', description: 'Target hostname for HTTPS records' }, + httpsPriority: { type: 'string', description: 'Priority for HTTPS records' }, + httpsParams: { type: 'string', description: 'Optional service parameters for HTTPS records' }, + recordComment: { type: 'string', description: 'Comment for the new DNS record' }, updateRecordName: { type: 'string', description: 'Updated DNS record name' }, updateRecordType: { type: 'string', description: 'Updated DNS record type' }, updateRecordValue: { type: 'string', description: 'Updated DNS record value' }, updateRecordTtl: { type: 'string', description: 'Updated DNS record TTL' }, updateRecordMxPriority: { type: 'string', description: 'Updated MX record priority' }, + updateSrvTarget: { type: 'string', description: 'Updated target hostname for SRV records' }, + updateSrvWeight: { type: 'string', description: 'Updated weight for SRV records' }, + updateSrvPort: { type: 'string', description: 'Updated port for SRV records' }, + updateSrvPriority: { type: 'string', description: 'Updated priority for SRV records' }, + updateHttpsTarget: { type: 'string', description: 'Updated target hostname for HTTPS records' }, + updateHttpsPriority: { type: 'string', description: 'Updated priority for HTTPS records' }, + updateHttpsParams: { + type: 'string', + description: 'Updated service parameters for HTTPS records', + }, updateRecordComment: { type: 'string', description: 'Updated DNS record comment' }, updateDomainRedirect: { type: 'string', description: 'Project domain redirect target' }, updateDomainRedirectStatusCode: { @@ -1033,12 +1858,24 @@ export const VercelBlock: BlockConfig = { aliasId: { type: 'string', description: 'Alias ID' }, aliasDeploymentId: { type: 'string', description: 'Deployment ID for alias' }, aliasName: { type: 'string', description: 'Alias domain' }, + aliasRedirect: { type: 'string', description: 'Hostname to 307-redirect the alias to' }, edgeConfigId: { type: 'string', description: 'Edge Config ID' }, edgeConfigSlug: { type: 'string', description: 'Edge Config slug' }, edgeConfigItems: { type: 'string', description: 'Edge Config items JSON' }, teamId: { type: 'string', description: 'Team ID for scoping' }, + teamSlug: { type: 'string', description: 'Team slug for scoping (alternative to Team ID)' }, teamIdParam: { type: 'string', description: 'Team ID parameter' }, memberRole: { type: 'string', description: 'Team member role filter' }, + teamMembersLimit: { type: 'string', description: 'Maximum number of team members to return' }, + teamMembersSince: { type: 'string', description: 'Only members added since this timestamp' }, + teamMembersUntil: { type: 'string', description: 'Only members added until this timestamp' }, + teamMembersSearch: { + type: 'string', + description: 'Search team members by name, username, or email', + }, + teamsLimit: { type: 'string', description: 'Maximum number of teams to return' }, + teamsSince: { type: 'string', description: 'Only teams created since this timestamp' }, + teamsUntil: { type: 'string', description: 'Only teams created until this timestamp' }, webhookId: { type: 'string', description: 'Webhook ID' }, webhookUrl: { type: 'string', description: 'Webhook URL' }, webhookEvents: { type: 'string', description: 'Comma-separated event names' }, @@ -1051,6 +1888,13 @@ export const VercelBlock: BlockConfig = { checkDetailsUrl: { type: 'string', description: 'URL for check details' }, checkStatus: { type: 'string', description: 'Check status' }, checkConclusion: { type: 'string', description: 'Check conclusion' }, + checkExternalId: { type: 'string', description: 'External identifier for the check' }, + checkRerequestable: { type: 'string', description: 'Whether the check can be rerequested' }, + checkOutput: { type: 'string', description: 'JSON check output metrics' }, + checkAutoUpdate: { + type: 'string', + description: 'Whether to mark the check as running immediately on rerequest', + }, }, outputs: { deployments: { @@ -1189,6 +2033,11 @@ export const VercelBlock: BlockConfig = { type: 'boolean', description: 'Whether more results are available', }, + nextFrom: { + type: 'string', + description: 'Continuation token to pass as From to fetch the next page of projects', + condition: { field: 'operation', value: 'list_projects' }, + }, }, } diff --git a/apps/sim/tools/vercel/add_domain.ts b/apps/sim/tools/vercel/add_domain.ts index 060730693e9..6dfb910bac5 100644 --- a/apps/sim/tools/vercel/add_domain.ts +++ b/apps/sim/tools/vercel/add_domain.ts @@ -26,12 +26,19 @@ export const vercelAddDomainTool: ToolConfig { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v7/domains${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/add_project_domain.ts b/apps/sim/tools/vercel/add_project_domain.ts index a89492bad5f..1e38aa00145 100644 --- a/apps/sim/tools/vercel/add_project_domain.ts +++ b/apps/sim/tools/vercel/add_project_domain.ts @@ -56,12 +56,19 @@ export const vercelAddProjectDomainTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelAddProjectDomainParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v10/projects/${params.projectId.trim()}/domains${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/cancel_deployment.ts b/apps/sim/tools/vercel/cancel_deployment.ts index e9a9150aece..d28af1cb9e2 100644 --- a/apps/sim/tools/vercel/cancel_deployment.ts +++ b/apps/sim/tools/vercel/cancel_deployment.ts @@ -32,12 +32,19 @@ export const vercelCancelDeploymentTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelCancelDeploymentParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v12/deployments/${params.deploymentId.trim()}/cancel${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/create_alias.ts b/apps/sim/tools/vercel/create_alias.ts index 8146005c0ec..3534db975d9 100644 --- a/apps/sim/tools/vercel/create_alias.ts +++ b/apps/sim/tools/vercel/create_alias.ts @@ -27,18 +27,32 @@ export const vercelCreateAliasTool: ToolConfig { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v2/deployments/${params.deploymentId.trim()}/aliases${qs ? `?${qs}` : ''}` }, @@ -47,9 +61,13 @@ export const vercelCreateAliasTool: ToolConfig ({ - alias: params.alias.trim(), - }), + body: (params: VercelCreateAliasParams) => { + const body: Record = { alias: params.alias.trim() } + if (params.redirect != null && params.redirect !== '') { + body.redirect = params.redirect.trim() + } + return body + }, }, transformResponse: async (response: Response) => { diff --git a/apps/sim/tools/vercel/create_check.ts b/apps/sim/tools/vercel/create_check.ts index 68c7f9b8b34..6f4ce6cd68b 100644 --- a/apps/sim/tools/vercel/create_check.ts +++ b/apps/sim/tools/vercel/create_check.ts @@ -62,12 +62,19 @@ export const vercelCreateCheckTool: ToolConfig { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v1/deployments/${params.deploymentId.trim()}/checks${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/create_deployment.ts b/apps/sim/tools/vercel/create_deployment.ts index a167ccc5cde..8fecd6fd339 100644 --- a/apps/sim/tools/vercel/create_deployment.ts +++ b/apps/sim/tools/vercel/create_deployment.ts @@ -64,6 +64,12 @@ export const vercelCreateDeploymentTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { @@ -71,6 +77,7 @@ export const vercelCreateDeploymentTool: ToolConfig< const query = new URLSearchParams() if (params.forceNew) query.set('forceNew', params.forceNew) if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v13/deployments${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/create_dns_record.ts b/apps/sim/tools/vercel/create_dns_record.ts index fdb64c93c24..86ab6abd533 100644 --- a/apps/sim/tools/vercel/create_dns_record.ts +++ b/apps/sim/tools/vercel/create_dns_record.ts @@ -40,9 +40,9 @@ export const vercelCreateDnsRecordTool: ToolConfig< }, value: { type: 'string', - required: true, + required: false, visibility: 'user-or-llm', - description: 'The value of the DNS record', + description: 'The value of the DNS record (not used for SRV/HTTPS records)', }, ttl: { type: 'number', @@ -56,18 +56,73 @@ export const vercelCreateDnsRecordTool: ToolConfig< visibility: 'user-or-llm', description: 'Priority for MX records', }, + srvTarget: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Target hostname for SRV records (required when recordType is SRV)', + }, + srvWeight: { + type: 'number', + required: false, + visibility: 'user-or-llm', + description: 'Weight for SRV records (required when recordType is SRV)', + }, + srvPort: { + type: 'number', + required: false, + visibility: 'user-or-llm', + description: 'Port for SRV records (required when recordType is SRV)', + }, + srvPriority: { + type: 'number', + required: false, + visibility: 'user-or-llm', + description: 'Priority for SRV records (required when recordType is SRV)', + }, + httpsTarget: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Target hostname for HTTPS records (required when recordType is HTTPS)', + }, + httpsPriority: { + type: 'number', + required: false, + visibility: 'user-or-llm', + description: 'Priority for HTTPS records (required when recordType is HTTPS)', + }, + httpsParams: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Optional service parameters for HTTPS records (e.g. "alpn=h2,h3")', + }, + comment: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'A comment to add context on what this DNS record is for (max 500 characters)', + }, teamId: { type: 'string', required: false, visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelCreateDnsRecordParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v2/domains/${params.domain.trim()}/records${qs ? `?${qs}` : ''}` }, @@ -77,13 +132,32 @@ export const vercelCreateDnsRecordTool: ToolConfig< 'Content-Type': 'application/json', }), body: (params: VercelCreateDnsRecordParams) => { + const type = params.recordType.trim().toUpperCase() const body: Record = { name: params.recordName.trim(), - type: params.recordType.trim(), - value: params.value.trim(), + type, } if (params.ttl != null) body.ttl = params.ttl - if (params.mxPriority != null) body.mxPriority = params.mxPriority + + if (type === 'SRV') { + body.srv = { + target: params.srvTarget?.trim(), + weight: params.srvWeight, + port: params.srvPort, + priority: params.srvPriority, + } + } else if (type === 'HTTPS') { + body.https = { + target: params.httpsTarget?.trim(), + priority: params.httpsPriority, + ...(params.httpsParams ? { params: params.httpsParams.trim() } : {}), + } + } else { + if (params.value != null) body.value = params.value.trim() + if (type === 'MX' && params.mxPriority != null) body.mxPriority = params.mxPriority + } + + if (params.comment != null && params.comment !== '') body.comment = params.comment return body }, }, diff --git a/apps/sim/tools/vercel/create_env_var.ts b/apps/sim/tools/vercel/create_env_var.ts index c7dc3c65661..75681ac1e3d 100644 --- a/apps/sim/tools/vercel/create_env_var.ts +++ b/apps/sim/tools/vercel/create_env_var.ts @@ -65,12 +65,19 @@ export const vercelCreateEnvVarTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelCreateEnvVarParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v10/projects/${params.projectId.trim()}/env${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/create_project.ts b/apps/sim/tools/vercel/create_project.ts index b05e4b83617..8f077fa97bc 100644 --- a/apps/sim/tools/vercel/create_project.ts +++ b/apps/sim/tools/vercel/create_project.ts @@ -53,18 +53,43 @@ export const vercelCreateProjectTool: ToolConfig< visibility: 'user-or-llm', description: 'Custom install command', }, + rootDirectory: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Subdirectory of the repository the project lives in (for monorepos)', + }, + nodeVersion: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Node.js version to use (e.g. 22.x, 20.x, 18.x)', + }, + devCommand: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Custom dev server command', + }, teamId: { type: 'string', required: false, visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelCreateProjectParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v11/projects${qs ? `?${qs}` : ''}` }, @@ -80,6 +105,9 @@ export const vercelCreateProjectTool: ToolConfig< if (params.buildCommand) body.buildCommand = params.buildCommand.trim() if (params.outputDirectory) body.outputDirectory = params.outputDirectory.trim() if (params.installCommand) body.installCommand = params.installCommand.trim() + if (params.rootDirectory) body.rootDirectory = params.rootDirectory.trim() + if (params.nodeVersion) body.nodeVersion = params.nodeVersion.trim() + if (params.devCommand) body.devCommand = params.devCommand.trim() return body }, }, diff --git a/apps/sim/tools/vercel/delete_alias.ts b/apps/sim/tools/vercel/delete_alias.ts index cc476199379..9bb6556a160 100644 --- a/apps/sim/tools/vercel/delete_alias.ts +++ b/apps/sim/tools/vercel/delete_alias.ts @@ -27,12 +27,19 @@ export const vercelDeleteAliasTool: ToolConfig { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v2/aliases/${params.aliasId.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/delete_deployment.ts b/apps/sim/tools/vercel/delete_deployment.ts index b2989b7f81c..175ace93e1b 100644 --- a/apps/sim/tools/vercel/delete_deployment.ts +++ b/apps/sim/tools/vercel/delete_deployment.ts @@ -32,12 +32,19 @@ export const vercelDeleteDeploymentTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelDeleteDeploymentParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const id = params.deploymentId.trim() if (id.includes('.')) { query.set('url', id) diff --git a/apps/sim/tools/vercel/delete_dns_record.ts b/apps/sim/tools/vercel/delete_dns_record.ts index 313df6192f9..397b71f2942 100644 --- a/apps/sim/tools/vercel/delete_dns_record.ts +++ b/apps/sim/tools/vercel/delete_dns_record.ts @@ -38,12 +38,19 @@ export const vercelDeleteDnsRecordTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelDeleteDnsRecordParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v2/domains/${params.domain.trim()}/records/${params.recordId.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/delete_domain.ts b/apps/sim/tools/vercel/delete_domain.ts index dc2ab080cc8..4839eb173b3 100644 --- a/apps/sim/tools/vercel/delete_domain.ts +++ b/apps/sim/tools/vercel/delete_domain.ts @@ -29,12 +29,19 @@ export const vercelDeleteDomainTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelDeleteDomainParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v6/domains/${params.domain.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/delete_env_var.ts b/apps/sim/tools/vercel/delete_env_var.ts index 1c2f7f0ece4..75c54490baa 100644 --- a/apps/sim/tools/vercel/delete_env_var.ts +++ b/apps/sim/tools/vercel/delete_env_var.ts @@ -35,12 +35,19 @@ export const vercelDeleteEnvVarTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelDeleteEnvVarParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v9/projects/${params.projectId.trim()}/env/${params.envId.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/delete_project.ts b/apps/sim/tools/vercel/delete_project.ts index 7e04e41cd8c..5165966ae1a 100644 --- a/apps/sim/tools/vercel/delete_project.ts +++ b/apps/sim/tools/vercel/delete_project.ts @@ -29,12 +29,19 @@ export const vercelDeleteProjectTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelDeleteProjectParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v9/projects/${params.projectId.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/get_alias.ts b/apps/sim/tools/vercel/get_alias.ts index 640b5e7b756..b0da8e89799 100644 --- a/apps/sim/tools/vercel/get_alias.ts +++ b/apps/sim/tools/vercel/get_alias.ts @@ -26,12 +26,19 @@ export const vercelGetAliasTool: ToolConfig { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v4/aliases/${params.aliasId.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/get_check.ts b/apps/sim/tools/vercel/get_check.ts index a02fda8a5c4..a169806b5bc 100644 --- a/apps/sim/tools/vercel/get_check.ts +++ b/apps/sim/tools/vercel/get_check.ts @@ -32,12 +32,19 @@ export const vercelGetCheckTool: ToolConfig { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v1/deployments/${params.deploymentId.trim()}/checks/${params.checkId.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/get_deployment.ts b/apps/sim/tools/vercel/get_deployment.ts index 248c25346f4..2c656267b30 100644 --- a/apps/sim/tools/vercel/get_deployment.ts +++ b/apps/sim/tools/vercel/get_deployment.ts @@ -35,6 +35,12 @@ export const vercelGetDeploymentTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { @@ -42,6 +48,7 @@ export const vercelGetDeploymentTool: ToolConfig< const query = new URLSearchParams() if (params.withGitRepoInfo) query.set('withGitRepoInfo', params.withGitRepoInfo) if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v13/deployments/${params.deploymentId.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/get_deployment_events.ts b/apps/sim/tools/vercel/get_deployment_events.ts index 5bffa02eb7a..0848cd72ada 100644 --- a/apps/sim/tools/vercel/get_deployment_events.ts +++ b/apps/sim/tools/vercel/get_deployment_events.ts @@ -62,6 +62,12 @@ export const vercelGetDeploymentEventsTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { @@ -73,6 +79,7 @@ export const vercelGetDeploymentEventsTool: ToolConfig< if (params.since !== undefined) query.set('since', String(params.since)) if (params.until !== undefined) query.set('until', String(params.until)) if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v3/deployments/${params.deploymentId.trim()}/events${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/get_domain.ts b/apps/sim/tools/vercel/get_domain.ts index 773581659ce..186fcc91e1f 100644 --- a/apps/sim/tools/vercel/get_domain.ts +++ b/apps/sim/tools/vercel/get_domain.ts @@ -26,12 +26,19 @@ export const vercelGetDomainTool: ToolConfig { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v5/domains/${params.domain.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/get_domain_config.ts b/apps/sim/tools/vercel/get_domain_config.ts index 14cbeb5d415..6ff50af4a5a 100644 --- a/apps/sim/tools/vercel/get_domain_config.ts +++ b/apps/sim/tools/vercel/get_domain_config.ts @@ -32,12 +32,19 @@ export const vercelGetDomainConfigTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelGetDomainConfigParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v6/domains/${params.domain.trim()}/config${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/get_env_vars.ts b/apps/sim/tools/vercel/get_env_vars.ts index 00e8c735a79..30750f9d9df 100644 --- a/apps/sim/tools/vercel/get_env_vars.ts +++ b/apps/sim/tools/vercel/get_env_vars.ts @@ -20,18 +20,40 @@ export const vercelGetEnvVarsTool: ToolConfig { const query = new URLSearchParams() + if (params.decrypt) query.set('decrypt', 'true') + if (params.gitBranch) query.set('gitBranch', params.gitBranch.trim()) if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v10/projects/${params.projectId.trim()}/env${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/get_project.ts b/apps/sim/tools/vercel/get_project.ts index 4fa8f3c401f..f5255a5ebab 100644 --- a/apps/sim/tools/vercel/get_project.ts +++ b/apps/sim/tools/vercel/get_project.ts @@ -26,12 +26,19 @@ export const vercelGetProjectTool: ToolConfig { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v9/projects/${params.projectId.trim()}${qs ? `?${qs}` : ''}` }, @@ -50,6 +57,8 @@ export const vercelGetProjectTool: ToolConfig { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v1/deployments/${params.deploymentId.trim()}/checks${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/list_deployment_files.ts b/apps/sim/tools/vercel/list_deployment_files.ts index c44c8e01b5b..edfda1f3f34 100644 --- a/apps/sim/tools/vercel/list_deployment_files.ts +++ b/apps/sim/tools/vercel/list_deployment_files.ts @@ -32,12 +32,19 @@ export const vercelListDeploymentFilesTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelListDeploymentFilesParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v6/deployments/${params.deploymentId.trim()}/files${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/list_deployments.ts b/apps/sim/tools/vercel/list_deployments.ts index e5e739d346f..be179952f4a 100644 --- a/apps/sim/tools/vercel/list_deployments.ts +++ b/apps/sim/tools/vercel/list_deployments.ts @@ -69,6 +69,12 @@ export const vercelListDeploymentsTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { @@ -82,6 +88,7 @@ export const vercelListDeploymentsTool: ToolConfig< if (params.until) query.set('until', String(params.until)) if (params.limit) query.set('limit', String(params.limit)) if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v7/deployments${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/list_dns_records.ts b/apps/sim/tools/vercel/list_dns_records.ts index f2a9106c24d..e18a955325f 100644 --- a/apps/sim/tools/vercel/list_dns_records.ts +++ b/apps/sim/tools/vercel/list_dns_records.ts @@ -35,6 +35,12 @@ export const vercelListDnsRecordsTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { @@ -42,6 +48,7 @@ export const vercelListDnsRecordsTool: ToolConfig< const query = new URLSearchParams() if (params.limit) query.set('limit', String(params.limit)) if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v5/domains/${params.domain.trim()}/records${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/list_domains.ts b/apps/sim/tools/vercel/list_domains.ts index c5ff697c920..775771f3470 100644 --- a/apps/sim/tools/vercel/list_domains.ts +++ b/apps/sim/tools/vercel/list_domains.ts @@ -27,6 +27,12 @@ export const vercelListDomainsTool: ToolConfig { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) if (params.limit) query.set('limit', String(params.limit)) const qs = query.toString() return `https://api.vercel.com/v9/projects/${params.projectId.trim()}/domains${qs ? `?${qs}` : ''}` diff --git a/apps/sim/tools/vercel/list_projects.ts b/apps/sim/tools/vercel/list_projects.ts index 12465171716..19ee34a8547 100644 --- a/apps/sim/tools/vercel/list_projects.ts +++ b/apps/sim/tools/vercel/list_projects.ts @@ -29,12 +29,25 @@ export const vercelListProjectsTool: ToolConfig< visibility: 'user-or-llm', description: 'Maximum number of projects to return', }, + from: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: + "Continuation token for pagination, taken from the previous response's pagination.next value. Query only projects updated after this timestamp or continuation token.", + }, teamId: { type: 'string', required: false, visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { @@ -42,7 +55,9 @@ export const vercelListProjectsTool: ToolConfig< const query = new URLSearchParams() if (params.search) query.set('search', params.search) if (params.limit) query.set('limit', String(params.limit)) + if (params.from) query.set('from', params.from.trim()) if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v10/projects${qs ? `?${qs}` : ''}` }, @@ -59,6 +74,8 @@ export const vercelListProjectsTool: ToolConfig< id: p.id, name: p.name, framework: p.framework ?? null, + rootDirectory: p.rootDirectory ?? null, + nodeVersion: p.nodeVersion ?? null, createdAt: p.createdAt, updatedAt: p.updatedAt, })) @@ -69,6 +86,7 @@ export const vercelListProjectsTool: ToolConfig< projects, count: projects.length, hasMore: data.pagination?.next != null, + nextFrom: data.pagination?.next != null ? String(data.pagination.next) : null, }, } }, @@ -83,6 +101,12 @@ export const vercelListProjectsTool: ToolConfig< id: { type: 'string', description: 'Project ID' }, name: { type: 'string', description: 'Project name' }, framework: { type: 'string', description: 'Framework', optional: true }, + rootDirectory: { + type: 'string', + description: 'Root directory of the project', + optional: true, + }, + nodeVersion: { type: 'string', description: 'Node.js version', optional: true }, createdAt: { type: 'number', description: 'Creation timestamp' }, updatedAt: { type: 'number', description: 'Last updated timestamp' }, }, @@ -96,5 +120,10 @@ export const vercelListProjectsTool: ToolConfig< type: 'boolean', description: 'Whether more projects are available', }, + nextFrom: { + type: 'string', + description: 'Continuation token to pass as `from` to fetch the next page', + optional: true, + }, }, } diff --git a/apps/sim/tools/vercel/pause_project.ts b/apps/sim/tools/vercel/pause_project.ts index e7e56f6b976..746291914f9 100644 --- a/apps/sim/tools/vercel/pause_project.ts +++ b/apps/sim/tools/vercel/pause_project.ts @@ -29,12 +29,19 @@ export const vercelPauseProjectTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelPauseProjectParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v1/projects/${params.projectId.trim()}/pause${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/promote_deployment.ts b/apps/sim/tools/vercel/promote_deployment.ts index f2b07b81915..b472912715f 100644 --- a/apps/sim/tools/vercel/promote_deployment.ts +++ b/apps/sim/tools/vercel/promote_deployment.ts @@ -38,12 +38,19 @@ export const vercelPromoteDeploymentTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelPromoteDeploymentParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v10/projects/${params.projectId.trim()}/promote/${params.deploymentId.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/remove_project_domain.ts b/apps/sim/tools/vercel/remove_project_domain.ts index e9b15caeb9e..26edc72faa6 100644 --- a/apps/sim/tools/vercel/remove_project_domain.ts +++ b/apps/sim/tools/vercel/remove_project_domain.ts @@ -38,12 +38,19 @@ export const vercelRemoveProjectDomainTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelRemoveProjectDomainParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v9/projects/${params.projectId.trim()}/domains/${params.domain.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/rerequest_check.ts b/apps/sim/tools/vercel/rerequest_check.ts index f0da658b586..dcd15a8ed78 100644 --- a/apps/sim/tools/vercel/rerequest_check.ts +++ b/apps/sim/tools/vercel/rerequest_check.ts @@ -35,12 +35,26 @@ export const vercelRerequestCheckTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, + autoUpdate: { + type: 'boolean', + required: false, + visibility: 'user-or-llm', + description: 'Whether to mark the check as running immediately on rerequest', + }, }, request: { url: (params: VercelRerequestCheckParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) + if (params.autoUpdate !== undefined) query.set('autoUpdate', String(params.autoUpdate)) const qs = query.toString() return `https://api.vercel.com/v1/deployments/${params.deploymentId.trim()}/checks/${params.checkId.trim()}/rerequest${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/types.ts b/apps/sim/tools/vercel/types.ts index 8e0f4f2b5ff..e5b6f65e756 100644 --- a/apps/sim/tools/vercel/types.ts +++ b/apps/sim/tools/vercel/types.ts @@ -23,6 +23,7 @@ export interface VercelListDeploymentsParams { until?: number limit?: number teamId?: string + slug?: string } export interface VercelGetDeploymentParams { @@ -30,19 +31,23 @@ export interface VercelGetDeploymentParams { deploymentId: string withGitRepoInfo?: string teamId?: string + slug?: string } export interface VercelListProjectsParams { apiKey: string search?: string limit?: number + from?: string teamId?: string + slug?: string } export interface VercelGetProjectParams { apiKey: string projectId: string teamId?: string + slug?: string } export interface VercelCreateDeploymentParams { @@ -54,18 +59,23 @@ export interface VercelCreateDeploymentParams { gitSource?: string forceNew?: string teamId?: string + slug?: string } export interface VercelListDomainsParams { apiKey: string limit?: number teamId?: string + slug?: string } export interface VercelGetEnvVarsParams { apiKey: string projectId: string + decrypt?: boolean + gitBranch?: string teamId?: string + slug?: string } export interface VercelListDeploymentsResponse extends ToolResponse { @@ -134,11 +144,14 @@ export interface VercelListProjectsResponse extends ToolResponse { id: string name: string framework: string | null + rootDirectory: string | null + nodeVersion: string | null createdAt: number updatedAt: number }> count: number hasMore: boolean + nextFrom: string | null } } @@ -147,6 +160,8 @@ export interface VercelGetProjectResponse extends ToolResponse { id: string name: string framework: string | null + rootDirectory: string | null + nodeVersion: string | null createdAt: number updatedAt: number link: { @@ -189,6 +204,10 @@ export interface VercelListDomainsResponse extends ToolResponse { boughtAt: number | null transferredAt: number | null creator: VercelDomainCreator | null + customNameservers: string[] + userId: string | null + teamId: string | null + transferStartedAt: number | null }> count: number hasMore: boolean @@ -216,6 +235,7 @@ export interface VercelCancelDeploymentParams { apiKey: string deploymentId: string teamId?: string + slug?: string } export interface VercelCancelDeploymentResponse extends ToolResponse { @@ -234,6 +254,7 @@ export interface VercelDeleteDeploymentParams { apiKey: string deploymentId: string teamId?: string + slug?: string } export interface VercelDeleteDeploymentResponse extends ToolResponse { @@ -252,6 +273,7 @@ export interface VercelGetDeploymentEventsParams { since?: number until?: number teamId?: string + slug?: string } export interface VercelGetDeploymentEventsResponse extends ToolResponse { @@ -281,6 +303,7 @@ export interface VercelCreateEnvVarParams { gitBranch?: string comment?: string teamId?: string + slug?: string } export interface VercelCreateEnvVarResponse extends ToolResponse { @@ -308,6 +331,7 @@ export interface VercelUpdateEnvVarParams { gitBranch?: string comment?: string teamId?: string + slug?: string } export interface VercelUpdateEnvVarResponse extends ToolResponse { @@ -329,6 +353,7 @@ export interface VercelDeleteEnvVarParams { projectId: string envId: string teamId?: string + slug?: string } export interface VercelDeleteEnvVarResponse extends ToolResponse { @@ -341,6 +366,7 @@ export interface VercelListDeploymentFilesParams { apiKey: string deploymentId: string teamId?: string + slug?: string } export interface VercelListDeploymentFilesResponse extends ToolResponse { @@ -365,7 +391,11 @@ export interface VercelCreateProjectParams { buildCommand?: string outputDirectory?: string installCommand?: string + rootDirectory?: string + nodeVersion?: string + devCommand?: string teamId?: string + slug?: string } export interface VercelCreateProjectResponse extends ToolResponse { @@ -386,7 +416,11 @@ export interface VercelUpdateProjectParams { buildCommand?: string outputDirectory?: string installCommand?: string + rootDirectory?: string + nodeVersion?: string + devCommand?: string teamId?: string + slug?: string } export interface VercelUpdateProjectResponse extends ToolResponse { @@ -402,6 +436,7 @@ export interface VercelDeleteProjectParams { apiKey: string projectId: string teamId?: string + slug?: string } export interface VercelDeleteProjectResponse extends ToolResponse { @@ -414,6 +449,7 @@ export interface VercelPauseProjectParams { apiKey: string projectId: string teamId?: string + slug?: string } export interface VercelPauseProjectResponse extends ToolResponse { @@ -428,6 +464,7 @@ export interface VercelUnpauseProjectParams { apiKey: string projectId: string teamId?: string + slug?: string } export interface VercelUnpauseProjectResponse extends ToolResponse { @@ -442,6 +479,7 @@ export interface VercelListProjectDomainsParams { apiKey: string projectId: string teamId?: string + slug?: string limit?: number } @@ -472,6 +510,7 @@ export interface VercelAddProjectDomainParams { redirectStatusCode?: number gitBranch?: string teamId?: string + slug?: string } export interface VercelAddProjectDomainResponse extends ToolResponse { @@ -494,6 +533,7 @@ export interface VercelRemoveProjectDomainParams { projectId: string domain: string teamId?: string + slug?: string } export interface VercelRemoveProjectDomainResponse extends ToolResponse { @@ -506,6 +546,7 @@ export interface VercelGetDomainParams { apiKey: string domain: string teamId?: string + slug?: string } export interface VercelGetDomainResponse extends ToolResponse { @@ -533,6 +574,7 @@ export interface VercelAddDomainParams { apiKey: string name: string teamId?: string + slug?: string } export interface VercelAddDomainResponse extends ToolResponse { @@ -557,6 +599,7 @@ export interface VercelDeleteDomainParams { apiKey: string domain: string teamId?: string + slug?: string } export interface VercelDeleteDomainResponse extends ToolResponse { @@ -570,6 +613,7 @@ export interface VercelGetDomainConfigParams { apiKey: string domain: string teamId?: string + slug?: string } export interface VercelGetDomainConfigResponse extends ToolResponse { @@ -587,10 +631,19 @@ export interface VercelCreateDnsRecordParams { domain: string recordName: string recordType: string - value: string + value?: string ttl?: number mxPriority?: number + srvTarget?: string + srvWeight?: number + srvPort?: number + srvPriority?: number + httpsTarget?: string + httpsPriority?: number + httpsParams?: string + comment?: string teamId?: string + slug?: string } export interface VercelCreateDnsRecordResponse extends ToolResponse { @@ -605,6 +658,7 @@ export interface VercelListDnsRecordsParams { domain: string limit?: number teamId?: string + slug?: string } export interface VercelListDnsRecordsResponse extends ToolResponse { @@ -633,6 +687,7 @@ export interface VercelDeleteDnsRecordParams { domain: string recordId: string teamId?: string + slug?: string } export interface VercelDeleteDnsRecordResponse extends ToolResponse { @@ -772,6 +827,7 @@ export interface VercelListAliasesParams { domain?: string limit?: number teamId?: string + slug?: string } export interface VercelListAliasesResponse extends ToolResponse { @@ -796,6 +852,7 @@ export interface VercelGetAliasParams { apiKey: string aliasId: string teamId?: string + slug?: string } export interface VercelGetAliasResponse extends ToolResponse { @@ -816,7 +873,9 @@ export interface VercelCreateAliasParams { apiKey: string deploymentId: string alias: string + redirect?: string teamId?: string + slug?: string } export interface VercelCreateAliasResponse extends ToolResponse { @@ -832,6 +891,7 @@ export interface VercelDeleteAliasParams { apiKey: string aliasId: string teamId?: string + slug?: string } export interface VercelDeleteAliasResponse extends ToolResponse { @@ -997,6 +1057,7 @@ export interface VercelCreateCheckParams { externalId?: string rerequestable?: boolean teamId?: string + slug?: string } export interface VercelCheckResponse extends ToolResponse { @@ -1025,12 +1086,14 @@ export interface VercelGetCheckParams { deploymentId: string checkId: string teamId?: string + slug?: string } export interface VercelListChecksParams { apiKey: string deploymentId: string teamId?: string + slug?: string } export interface VercelListChecksResponse extends ToolResponse { @@ -1069,6 +1132,7 @@ export interface VercelUpdateCheckParams { path?: string output?: string teamId?: string + slug?: string } export interface VercelRerequestCheckParams { @@ -1076,6 +1140,8 @@ export interface VercelRerequestCheckParams { deploymentId: string checkId: string teamId?: string + slug?: string + autoUpdate?: boolean } export interface VercelRerequestCheckResponse extends ToolResponse { @@ -1092,8 +1158,16 @@ export interface VercelUpdateDnsRecordParams { type?: string ttl?: number mxPriority?: number + srvTarget?: string + srvWeight?: number + srvPort?: number + srvPriority?: number + httpsTarget?: string + httpsPriority?: number + httpsParams?: string comment?: string teamId?: string + slug?: string } export interface VercelUpdateDnsRecordResponse extends ToolResponse { @@ -1149,6 +1223,7 @@ export interface VercelUpdateProjectDomainParams { redirectStatusCode?: number gitBranch?: string teamId?: string + slug?: string } export interface VercelUpdateProjectDomainResponse extends ToolResponse { @@ -1171,6 +1246,7 @@ export interface VercelVerifyProjectDomainParams { projectId: string domain: string teamId?: string + slug?: string } export interface VercelVerifyProjectDomainResponse extends ToolResponse { @@ -1192,6 +1268,7 @@ export interface VercelPromoteDeploymentParams { projectId: string deploymentId: string teamId?: string + slug?: string } export interface VercelPromoteDeploymentResponse extends ToolResponse { diff --git a/apps/sim/tools/vercel/unpause_project.ts b/apps/sim/tools/vercel/unpause_project.ts index 39e195cbed4..afe7e01f1ac 100644 --- a/apps/sim/tools/vercel/unpause_project.ts +++ b/apps/sim/tools/vercel/unpause_project.ts @@ -29,12 +29,19 @@ export const vercelUnpauseProjectTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelUnpauseProjectParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v1/projects/${params.projectId.trim()}/unpause${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/update_check.ts b/apps/sim/tools/vercel/update_check.ts index c348ad754aa..486b118f097 100644 --- a/apps/sim/tools/vercel/update_check.ts +++ b/apps/sim/tools/vercel/update_check.ts @@ -74,12 +74,19 @@ export const vercelUpdateCheckTool: ToolConfig { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v1/deployments/${params.deploymentId.trim()}/checks/${params.checkId.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/update_dns_record.ts b/apps/sim/tools/vercel/update_dns_record.ts index b84a3bb60eb..92a3852b552 100644 --- a/apps/sim/tools/vercel/update_dns_record.ts +++ b/apps/sim/tools/vercel/update_dns_record.ts @@ -56,6 +56,48 @@ export const vercelUpdateDnsRecordTool: ToolConfig< visibility: 'user-or-llm', description: 'Priority for MX records', }, + srvTarget: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Target hostname for SRV records (required together when updating SRV data)', + }, + srvWeight: { + type: 'number', + required: false, + visibility: 'user-or-llm', + description: 'Weight for SRV records (required together when updating SRV data)', + }, + srvPort: { + type: 'number', + required: false, + visibility: 'user-or-llm', + description: 'Port for SRV records (required together when updating SRV data)', + }, + srvPriority: { + type: 'number', + required: false, + visibility: 'user-or-llm', + description: 'Priority for SRV records (required together when updating SRV data)', + }, + httpsTarget: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Target hostname for HTTPS records (required together when updating HTTPS data)', + }, + httpsPriority: { + type: 'number', + required: false, + visibility: 'user-or-llm', + description: 'Priority for HTTPS records (required together when updating HTTPS data)', + }, + httpsParams: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Optional service parameters for HTTPS records (e.g. "alpn=h2,h3")', + }, comment: { type: 'string', required: false, @@ -68,12 +110,19 @@ export const vercelUpdateDnsRecordTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelUpdateDnsRecordParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v1/domains/records/${params.recordId.trim()}${qs ? `?${qs}` : ''}` }, @@ -85,16 +134,35 @@ export const vercelUpdateDnsRecordTool: ToolConfig< body: (params: VercelUpdateDnsRecordParams) => { const body: Record = {} if (params.name != null && params.name !== '') body.name = params.name - if (params.value != null && params.value !== '') body.value = params.value - if (params.type != null && params.type !== '') body.type = params.type + const type = + params.type != null && params.type !== '' ? params.type.trim().toUpperCase() : null + if (type != null) body.type = type if (params.ttl != null) { const ttl = Number(params.ttl) if (!Number.isNaN(ttl)) body.ttl = ttl } - if (params.mxPriority != null) { - const mxPriority = Number(params.mxPriority) - if (!Number.isNaN(mxPriority)) body.mxPriority = mxPriority + + if (type === 'SRV') { + body.srv = { + target: params.srvTarget?.trim(), + weight: params.srvWeight, + port: params.srvPort, + priority: params.srvPriority, + } + } else if (type === 'HTTPS') { + body.https = { + target: params.httpsTarget?.trim(), + priority: params.httpsPriority, + ...(params.httpsParams ? { params: params.httpsParams.trim() } : {}), + } + } else { + if (params.value != null && params.value !== '') body.value = params.value + if (params.mxPriority != null) { + const mxPriority = Number(params.mxPriority) + if (!Number.isNaN(mxPriority)) body.mxPriority = mxPriority + } } + if (params.comment != null && params.comment !== '') body.comment = params.comment return body }, diff --git a/apps/sim/tools/vercel/update_env_var.ts b/apps/sim/tools/vercel/update_env_var.ts index 15981e49877..d1ee50f99ef 100644 --- a/apps/sim/tools/vercel/update_env_var.ts +++ b/apps/sim/tools/vercel/update_env_var.ts @@ -71,12 +71,19 @@ export const vercelUpdateEnvVarTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelUpdateEnvVarParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v9/projects/${params.projectId.trim()}/env/${params.envId.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/update_project.ts b/apps/sim/tools/vercel/update_project.ts index ee76b1c485e..ef0af58750a 100644 --- a/apps/sim/tools/vercel/update_project.ts +++ b/apps/sim/tools/vercel/update_project.ts @@ -53,18 +53,43 @@ export const vercelUpdateProjectTool: ToolConfig< visibility: 'user-or-llm', description: 'Custom install command', }, + rootDirectory: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Subdirectory of the repository the project lives in (for monorepos)', + }, + nodeVersion: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Node.js version to use (e.g. 22.x, 20.x, 18.x)', + }, + devCommand: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Custom dev server command', + }, teamId: { type: 'string', required: false, visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelUpdateProjectParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v9/projects/${params.projectId.trim()}${qs ? `?${qs}` : ''}` }, @@ -80,6 +105,9 @@ export const vercelUpdateProjectTool: ToolConfig< if (params.buildCommand) body.buildCommand = params.buildCommand.trim() if (params.outputDirectory) body.outputDirectory = params.outputDirectory.trim() if (params.installCommand) body.installCommand = params.installCommand.trim() + if (params.rootDirectory) body.rootDirectory = params.rootDirectory.trim() + if (params.nodeVersion) body.nodeVersion = params.nodeVersion.trim() + if (params.devCommand) body.devCommand = params.devCommand.trim() return body }, }, diff --git a/apps/sim/tools/vercel/update_project_domain.ts b/apps/sim/tools/vercel/update_project_domain.ts index 050675160c2..76d3ca9b43b 100644 --- a/apps/sim/tools/vercel/update_project_domain.ts +++ b/apps/sim/tools/vercel/update_project_domain.ts @@ -56,12 +56,19 @@ export const vercelUpdateProjectDomainTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelUpdateProjectDomainParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v9/projects/${params.projectId.trim()}/domains/${params.domain.trim()}${qs ? `?${qs}` : ''}` }, diff --git a/apps/sim/tools/vercel/verify_project_domain.ts b/apps/sim/tools/vercel/verify_project_domain.ts index c1610018bbe..0ea5afe30fd 100644 --- a/apps/sim/tools/vercel/verify_project_domain.ts +++ b/apps/sim/tools/vercel/verify_project_domain.ts @@ -38,12 +38,19 @@ export const vercelVerifyProjectDomainTool: ToolConfig< visibility: 'user-or-llm', description: 'Team ID to scope the request', }, + slug: { + type: 'string', + required: false, + visibility: 'user-or-llm', + description: 'Team slug to scope the request (alternative to teamId)', + }, }, request: { url: (params: VercelVerifyProjectDomainParams) => { const query = new URLSearchParams() if (params.teamId) query.set('teamId', params.teamId.trim()) + if (params.slug) query.set('slug', params.slug.trim()) const qs = query.toString() return `https://api.vercel.com/v9/projects/${params.projectId.trim()}/domains/${params.domain.trim()}/verify${qs ? `?${qs}` : ''}` },