d25d482dc2
Publish CLI Package / publish-npm (push) Waiting to run
Publish Python SDK / publish-pypi (push) Waiting to run
Publish TypeScript SDK / publish-npm (push) Waiting to run
CI / Migrate Dev DB (push) Has been skipped
CI / Detect Version (push) Has been cancelled
CI / Migrate DB (push) Has been cancelled
CI / Build Dev ECR (./docker/app.Dockerfile, ECR_APP) (push) Has been cancelled
CI / Build Dev ECR (./docker/db.Dockerfile, ECR_MIGRATIONS) (push) Has been cancelled
CI / Build Dev ECR (./docker/pii.Dockerfile, ECR_PII) (push) Has been cancelled
CI / Build Dev ECR (./docker/realtime.Dockerfile, ECR_REALTIME) (push) Has been cancelled
CI / Deploy Trigger.dev (Dev) (push) Has been cancelled
CI / Build AMD64 (./docker/app.Dockerfile, ECR_APP, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build AMD64 (./docker/db.Dockerfile, ECR_MIGRATIONS, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build AMD64 (./docker/pii.Dockerfile, ECR_PII, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build AMD64 (./docker/realtime.Dockerfile, ECR_REALTIME, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/app.Dockerfile, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/db.Dockerfile, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/pii.Dockerfile, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/realtime.Dockerfile, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Check Docs Changes (push) Has been cancelled
CI / Process Docs (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled
CI / Test and Build (push) Has been cancelled
156 lines
5.2 KiB
TypeScript
156 lines
5.2 KiB
TypeScript
import type { ToolConfig } from '@/tools/types'
|
|
import type { VercelListDomainsParams, VercelListDomainsResponse } from '@/tools/vercel/types'
|
|
|
|
export const vercelListDomainsTool: ToolConfig<VercelListDomainsParams, VercelListDomainsResponse> =
|
|
{
|
|
id: 'vercel_list_domains',
|
|
name: 'Vercel List Domains',
|
|
description: 'List all domains in a Vercel account or team',
|
|
version: '1.0.0',
|
|
|
|
params: {
|
|
apiKey: {
|
|
type: 'string',
|
|
required: true,
|
|
visibility: 'user-only',
|
|
description: 'Vercel Access Token',
|
|
},
|
|
limit: {
|
|
type: 'number',
|
|
required: false,
|
|
visibility: 'user-or-llm',
|
|
description: 'Maximum number of domains to return (default 20)',
|
|
},
|
|
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: VercelListDomainsParams) => {
|
|
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${qs ? `?${qs}` : ''}`
|
|
},
|
|
method: 'GET',
|
|
headers: (params: VercelListDomainsParams) => ({
|
|
Authorization: `Bearer ${params.apiKey}`,
|
|
'Content-Type': 'application/json',
|
|
}),
|
|
},
|
|
|
|
transformResponse: async (response: Response) => {
|
|
const data = await response.json()
|
|
const domains = (data.domains ?? []).map((d: any) => ({
|
|
id: d.id,
|
|
name: d.name,
|
|
verified: d.verified ?? false,
|
|
createdAt: d.createdAt,
|
|
expiresAt: d.expiresAt ?? null,
|
|
serviceType: d.serviceType ?? 'external',
|
|
nameservers: d.nameservers ?? [],
|
|
intendedNameservers: d.intendedNameservers ?? [],
|
|
renew: d.renew ?? false,
|
|
boughtAt: d.boughtAt ?? null,
|
|
transferredAt: d.transferredAt ?? null,
|
|
creator: d.creator
|
|
? {
|
|
id: d.creator.id ?? null,
|
|
username: d.creator.username ?? null,
|
|
email: d.creator.email ?? null,
|
|
}
|
|
: null,
|
|
customNameservers: d.customNameservers ?? [],
|
|
userId: d.userId ?? null,
|
|
teamId: d.teamId ?? null,
|
|
transferStartedAt: d.transferStartedAt ?? null,
|
|
}))
|
|
|
|
return {
|
|
success: true,
|
|
output: {
|
|
domains,
|
|
count: domains.length,
|
|
hasMore: data.pagination?.next != null,
|
|
},
|
|
}
|
|
},
|
|
|
|
outputs: {
|
|
domains: {
|
|
type: 'array',
|
|
description: 'List of domains',
|
|
items: {
|
|
type: 'object',
|
|
properties: {
|
|
id: { type: 'string', description: 'Domain ID' },
|
|
name: { type: 'string', description: 'Domain name' },
|
|
verified: { type: 'boolean', description: 'Whether domain is verified' },
|
|
createdAt: { type: 'number', description: 'Creation timestamp' },
|
|
expiresAt: { type: 'number', description: 'Expiration timestamp' },
|
|
serviceType: { type: 'string', description: 'Service type (zeit.world, external, na)' },
|
|
nameservers: {
|
|
type: 'array',
|
|
description: 'Current nameservers',
|
|
items: { type: 'string' },
|
|
},
|
|
intendedNameservers: {
|
|
type: 'array',
|
|
description: 'Intended nameservers',
|
|
items: { type: 'string' },
|
|
},
|
|
renew: { type: 'boolean', description: 'Whether auto-renewal is enabled' },
|
|
boughtAt: { type: 'number', description: 'Purchase timestamp' },
|
|
transferredAt: {
|
|
type: 'number',
|
|
description: 'Transfer completion timestamp',
|
|
optional: true,
|
|
},
|
|
creator: {
|
|
type: 'object',
|
|
description: 'Domain creator (id, username, email)',
|
|
optional: true,
|
|
properties: {
|
|
id: { type: 'string', description: 'Creator ID' },
|
|
username: { type: 'string', description: 'Creator username' },
|
|
email: { type: 'string', description: 'Creator email' },
|
|
},
|
|
},
|
|
customNameservers: {
|
|
type: 'array',
|
|
description: 'Custom nameservers',
|
|
items: { type: 'string' },
|
|
},
|
|
userId: { type: 'string', description: 'Owner user ID', optional: true },
|
|
teamId: { type: 'string', description: 'Owner team ID', optional: true },
|
|
transferStartedAt: {
|
|
type: 'number',
|
|
description: 'Transfer start timestamp',
|
|
optional: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
count: {
|
|
type: 'number',
|
|
description: 'Number of domains returned',
|
|
},
|
|
hasMore: {
|
|
type: 'boolean',
|
|
description: 'Whether more domains are available',
|
|
},
|
|
},
|
|
}
|