chore: import upstream snapshot with attribution
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
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
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
import type { CalendlyCancelEventParams, CalendlyCancelEventResponse } from '@/tools/calendly/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const cancelEventTool: ToolConfig<CalendlyCancelEventParams, CalendlyCancelEventResponse> = {
|
||||
id: 'calendly_cancel_event',
|
||||
name: 'Calendly Cancel Event',
|
||||
description: 'Cancel a scheduled event',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Calendly Personal Access Token',
|
||||
},
|
||||
eventUuid: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description:
|
||||
'Scheduled event UUID to cancel. Format: UUID (e.g., "abc123-def456") or full URI (e.g., "https://api.calendly.com/scheduled_events/abc123-def456")',
|
||||
},
|
||||
reason: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-only',
|
||||
description: 'Reason for cancellation (will be sent to invitees)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params: CalendlyCancelEventParams) => {
|
||||
const uuid = params.eventUuid.includes('/')
|
||||
? params.eventUuid.split('/').pop()
|
||||
: params.eventUuid
|
||||
return `https://api.calendly.com/scheduled_events/${uuid}/cancellation`
|
||||
},
|
||||
method: 'POST',
|
||||
headers: (params) => ({
|
||||
Authorization: `Bearer ${params.apiKey}`,
|
||||
'Content-Type': 'application/json',
|
||||
}),
|
||||
body: (params: CalendlyCancelEventParams) => {
|
||||
const body: any = {}
|
||||
|
||||
if (params.reason) {
|
||||
body.reason = params.reason
|
||||
}
|
||||
|
||||
return body
|
||||
},
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
|
||||
return {
|
||||
success: true,
|
||||
output: data,
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
resource: {
|
||||
type: 'object',
|
||||
description: 'Cancellation details',
|
||||
properties: {
|
||||
canceler_type: {
|
||||
type: 'string',
|
||||
description: 'Type of canceler (host or invitee)',
|
||||
},
|
||||
canceled_by: {
|
||||
type: 'string',
|
||||
description: 'Name of person who canceled',
|
||||
},
|
||||
reason: {
|
||||
type: 'string',
|
||||
description: 'Cancellation reason',
|
||||
},
|
||||
created_at: {
|
||||
type: 'string',
|
||||
description: 'ISO timestamp when event was canceled',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
import type {
|
||||
CalendlyCreateWebhookParams,
|
||||
CalendlyCreateWebhookResponse,
|
||||
} from '@/tools/calendly/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const createWebhookTool: ToolConfig<
|
||||
CalendlyCreateWebhookParams,
|
||||
CalendlyCreateWebhookResponse
|
||||
> = {
|
||||
id: 'calendly_create_webhook',
|
||||
name: 'Calendly Create Webhook',
|
||||
description: 'Create a new webhook subscription to receive real-time event notifications',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Calendly Personal Access Token',
|
||||
},
|
||||
url: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'URL to receive webhook events (must be HTTPS)',
|
||||
},
|
||||
events: {
|
||||
type: 'json',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description:
|
||||
'Array of event types to subscribe to (e.g., ["invitee.created", "invitee.canceled"])',
|
||||
},
|
||||
organization: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description:
|
||||
'Organization URI. Format: URI (e.g., "https://api.calendly.com/organizations/abc123-def456")',
|
||||
},
|
||||
user: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description:
|
||||
'User URI (required for user-scoped webhooks). Format: URI (e.g., "https://api.calendly.com/users/abc123-def456")',
|
||||
},
|
||||
scope: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Webhook scope. Format: "organization" or "user"',
|
||||
},
|
||||
signing_key: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-only',
|
||||
description: 'Optional signing key to verify webhook signatures',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: () => 'https://api.calendly.com/webhook_subscriptions',
|
||||
method: 'POST',
|
||||
headers: (params) => ({
|
||||
Authorization: `Bearer ${params.apiKey}`,
|
||||
'Content-Type': 'application/json',
|
||||
}),
|
||||
body: (params: CalendlyCreateWebhookParams) => {
|
||||
const body: any = {
|
||||
url: params.url,
|
||||
events: params.events,
|
||||
organization: params.organization,
|
||||
scope: params.scope,
|
||||
}
|
||||
|
||||
if (params.user && params.scope === 'user') {
|
||||
body.user = params.user
|
||||
}
|
||||
|
||||
if (params.signing_key) {
|
||||
body.signing_key = params.signing_key
|
||||
}
|
||||
|
||||
return body
|
||||
},
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
|
||||
return {
|
||||
success: true,
|
||||
output: data,
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
resource: {
|
||||
type: 'object',
|
||||
description: 'Created webhook subscription details',
|
||||
properties: {
|
||||
uri: {
|
||||
type: 'string',
|
||||
description: 'Canonical reference to the webhook',
|
||||
},
|
||||
callback_url: {
|
||||
type: 'string',
|
||||
description: 'URL receiving webhook events',
|
||||
},
|
||||
created_at: {
|
||||
type: 'string',
|
||||
description: 'ISO timestamp of creation',
|
||||
},
|
||||
updated_at: {
|
||||
type: 'string',
|
||||
description: 'ISO timestamp of last update',
|
||||
},
|
||||
state: {
|
||||
type: 'string',
|
||||
description: 'Webhook state (active by default)',
|
||||
},
|
||||
events: {
|
||||
type: 'array',
|
||||
items: { type: 'string' },
|
||||
description: 'Subscribed event types',
|
||||
},
|
||||
signing_key: {
|
||||
type: 'string',
|
||||
description: 'Key to verify webhook signatures',
|
||||
},
|
||||
scope: {
|
||||
type: 'string',
|
||||
description: 'Webhook scope',
|
||||
},
|
||||
organization: {
|
||||
type: 'string',
|
||||
description: 'Organization URI',
|
||||
},
|
||||
user: {
|
||||
type: 'string',
|
||||
description: 'User URI (for user-scoped webhooks)',
|
||||
},
|
||||
creator: {
|
||||
type: 'string',
|
||||
description: 'URI of user who created the webhook',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
import type {
|
||||
CalendlyDeleteWebhookParams,
|
||||
CalendlyDeleteWebhookResponse,
|
||||
} from '@/tools/calendly/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const deleteWebhookTool: ToolConfig<
|
||||
CalendlyDeleteWebhookParams,
|
||||
CalendlyDeleteWebhookResponse
|
||||
> = {
|
||||
id: 'calendly_delete_webhook',
|
||||
name: 'Calendly Delete Webhook',
|
||||
description: 'Delete a webhook subscription',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Calendly Personal Access Token',
|
||||
},
|
||||
webhookUuid: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description:
|
||||
'Webhook subscription UUID to delete. Format: UUID (e.g., "abc123-def456") or full URI (e.g., "https://api.calendly.com/webhook_subscriptions/abc123-def456")',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params: CalendlyDeleteWebhookParams) => {
|
||||
const uuid = params.webhookUuid.includes('/')
|
||||
? params.webhookUuid.split('/').pop()
|
||||
: params.webhookUuid
|
||||
return `https://api.calendly.com/webhook_subscriptions/${uuid}`
|
||||
},
|
||||
method: 'DELETE',
|
||||
headers: (params) => ({
|
||||
Authorization: `Bearer ${params.apiKey}`,
|
||||
'Content-Type': 'application/json',
|
||||
}),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
if (response.status === 204 || response.status === 200) {
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
deleted: true,
|
||||
message: 'Webhook subscription deleted successfully',
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
const data = await response.json()
|
||||
return {
|
||||
success: false,
|
||||
output: {
|
||||
deleted: false,
|
||||
message: data.message || 'Failed to delete webhook subscription',
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
deleted: {
|
||||
type: 'boolean',
|
||||
description: 'Whether the webhook was successfully deleted',
|
||||
},
|
||||
message: {
|
||||
type: 'string',
|
||||
description: 'Status message',
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
import type {
|
||||
CalendlyGetCurrentUserParams,
|
||||
CalendlyGetCurrentUserResponse,
|
||||
} from '@/tools/calendly/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const getCurrentUserTool: ToolConfig<
|
||||
CalendlyGetCurrentUserParams,
|
||||
CalendlyGetCurrentUserResponse
|
||||
> = {
|
||||
id: 'calendly_get_current_user',
|
||||
name: 'Calendly Get Current User',
|
||||
description: 'Get information about the currently authenticated Calendly user',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Calendly Personal Access Token',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: () => 'https://api.calendly.com/users/me',
|
||||
method: 'GET',
|
||||
headers: (params) => ({
|
||||
Authorization: `Bearer ${params.apiKey}`,
|
||||
'Content-Type': 'application/json',
|
||||
}),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
|
||||
return {
|
||||
success: true,
|
||||
output: data,
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
resource: {
|
||||
type: 'object',
|
||||
description: 'Current user information',
|
||||
properties: {
|
||||
uri: {
|
||||
type: 'string',
|
||||
description: 'Canonical reference to the user',
|
||||
},
|
||||
name: {
|
||||
type: 'string',
|
||||
description: 'User full name',
|
||||
},
|
||||
slug: {
|
||||
type: 'string',
|
||||
description: 'Unique identifier for the user in URLs',
|
||||
},
|
||||
email: {
|
||||
type: 'string',
|
||||
description: 'User email address',
|
||||
},
|
||||
scheduling_url: {
|
||||
type: 'string',
|
||||
description: "URL to the user's scheduling page",
|
||||
},
|
||||
timezone: {
|
||||
type: 'string',
|
||||
description: 'User timezone',
|
||||
},
|
||||
avatar_url: {
|
||||
type: 'string',
|
||||
description: 'URL to user avatar image',
|
||||
},
|
||||
created_at: {
|
||||
type: 'string',
|
||||
description: 'ISO timestamp when user was created',
|
||||
},
|
||||
updated_at: {
|
||||
type: 'string',
|
||||
description: 'ISO timestamp when user was last updated',
|
||||
},
|
||||
current_organization: {
|
||||
type: 'string',
|
||||
description: 'URI of current organization',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
import type {
|
||||
CalendlyGetEventTypeParams,
|
||||
CalendlyGetEventTypeResponse,
|
||||
} from '@/tools/calendly/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const getEventTypeTool: ToolConfig<
|
||||
CalendlyGetEventTypeParams,
|
||||
CalendlyGetEventTypeResponse
|
||||
> = {
|
||||
id: 'calendly_get_event_type',
|
||||
name: 'Calendly Get Event Type',
|
||||
description: 'Get detailed information about a specific event type',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Calendly Personal Access Token',
|
||||
},
|
||||
eventTypeUuid: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description:
|
||||
'Event type UUID. Format: UUID (e.g., "abc123-def456") or full URI (e.g., "https://api.calendly.com/event_types/abc123-def456")',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params: CalendlyGetEventTypeParams) => {
|
||||
const uuid = params.eventTypeUuid.includes('/')
|
||||
? params.eventTypeUuid.split('/').pop()
|
||||
: params.eventTypeUuid
|
||||
return `https://api.calendly.com/event_types/${uuid}`
|
||||
},
|
||||
method: 'GET',
|
||||
headers: (params) => ({
|
||||
Authorization: `Bearer ${params.apiKey}`,
|
||||
'Content-Type': 'application/json',
|
||||
}),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
|
||||
return {
|
||||
success: true,
|
||||
output: data,
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
resource: {
|
||||
type: 'object',
|
||||
description: 'Event type details',
|
||||
properties: {
|
||||
uri: { type: 'string', description: 'Canonical reference to the event type' },
|
||||
name: { type: 'string', description: 'Event type name' },
|
||||
active: { type: 'boolean', description: 'Whether the event type is active' },
|
||||
booking_method: { type: 'string', description: 'Booking method' },
|
||||
color: { type: 'string', description: 'Hex color code' },
|
||||
created_at: { type: 'string', description: 'ISO timestamp of creation' },
|
||||
custom_questions: {
|
||||
type: 'array',
|
||||
description: 'Custom questions for invitees',
|
||||
items: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
name: { type: 'string', description: 'Question text' },
|
||||
type: {
|
||||
type: 'string',
|
||||
description: 'Question type (text, single_select, multi_select, etc.)',
|
||||
},
|
||||
position: { type: 'number', description: 'Question order' },
|
||||
enabled: { type: 'boolean', description: 'Whether question is enabled' },
|
||||
required: { type: 'boolean', description: 'Whether question is required' },
|
||||
answer_choices: {
|
||||
type: 'array',
|
||||
items: { type: 'string' },
|
||||
description: 'Available answer choices',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
description_html: { type: 'string', description: 'HTML formatted description' },
|
||||
description_plain: { type: 'string', description: 'Plain text description' },
|
||||
duration: { type: 'number', description: 'Duration in minutes' },
|
||||
scheduling_url: { type: 'string', description: 'URL to scheduling page' },
|
||||
slug: { type: 'string', description: 'Unique identifier for URLs' },
|
||||
type: { type: 'string', description: 'Event type classification' },
|
||||
updated_at: { type: 'string', description: 'ISO timestamp of last update' },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
import type {
|
||||
CalendlyGetScheduledEventParams,
|
||||
CalendlyGetScheduledEventResponse,
|
||||
} from '@/tools/calendly/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const getScheduledEventTool: ToolConfig<
|
||||
CalendlyGetScheduledEventParams,
|
||||
CalendlyGetScheduledEventResponse
|
||||
> = {
|
||||
id: 'calendly_get_scheduled_event',
|
||||
name: 'Calendly Get Scheduled Event',
|
||||
description: 'Get detailed information about a specific scheduled event',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Calendly Personal Access Token',
|
||||
},
|
||||
eventUuid: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description:
|
||||
'Scheduled event UUID. Format: UUID (e.g., "abc123-def456") or full URI (e.g., "https://api.calendly.com/scheduled_events/abc123-def456")',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params: CalendlyGetScheduledEventParams) => {
|
||||
const uuid = params.eventUuid.includes('/')
|
||||
? params.eventUuid.split('/').pop()
|
||||
: params.eventUuid
|
||||
return `https://api.calendly.com/scheduled_events/${uuid}`
|
||||
},
|
||||
method: 'GET',
|
||||
headers: (params) => ({
|
||||
Authorization: `Bearer ${params.apiKey}`,
|
||||
'Content-Type': 'application/json',
|
||||
}),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
|
||||
return {
|
||||
success: true,
|
||||
output: data,
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
resource: {
|
||||
type: 'object',
|
||||
description: 'Scheduled event details',
|
||||
properties: {
|
||||
uri: { type: 'string', description: 'Canonical reference to the event' },
|
||||
name: { type: 'string', description: 'Event name' },
|
||||
status: { type: 'string', description: 'Event status (active or canceled)' },
|
||||
start_time: { type: 'string', description: 'ISO timestamp of event start' },
|
||||
end_time: { type: 'string', description: 'ISO timestamp of event end' },
|
||||
event_type: { type: 'string', description: 'URI of the event type' },
|
||||
location: {
|
||||
type: 'object',
|
||||
description: 'Event location details',
|
||||
properties: {
|
||||
type: { type: 'string', description: 'Location type' },
|
||||
location: { type: 'string', description: 'Location description' },
|
||||
join_url: { type: 'string', description: 'URL to join online meeting' },
|
||||
},
|
||||
},
|
||||
invitees_counter: {
|
||||
type: 'object',
|
||||
description: 'Invitee count information',
|
||||
properties: {
|
||||
total: { type: 'number', description: 'Total number of invitees' },
|
||||
active: { type: 'number', description: 'Number of active invitees' },
|
||||
limit: { type: 'number', description: 'Maximum number of invitees' },
|
||||
},
|
||||
},
|
||||
event_memberships: {
|
||||
type: 'array',
|
||||
description: 'Event hosts/members',
|
||||
items: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
user: { type: 'string', description: 'User URI' },
|
||||
user_email: { type: 'string', description: 'User email' },
|
||||
user_name: { type: 'string', description: 'User name' },
|
||||
},
|
||||
},
|
||||
},
|
||||
event_guests: {
|
||||
type: 'array',
|
||||
description: 'Additional guests',
|
||||
items: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
email: { type: 'string', description: 'Guest email' },
|
||||
created_at: { type: 'string', description: 'When guest was added' },
|
||||
updated_at: { type: 'string', description: 'When guest info was updated' },
|
||||
},
|
||||
},
|
||||
},
|
||||
created_at: { type: 'string', description: 'ISO timestamp of event creation' },
|
||||
updated_at: { type: 'string', description: 'ISO timestamp of last update' },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { cancelEventTool } from '@/tools/calendly/cancel_event'
|
||||
import { createWebhookTool } from '@/tools/calendly/create_webhook'
|
||||
import { deleteWebhookTool } from '@/tools/calendly/delete_webhook'
|
||||
import { getCurrentUserTool } from '@/tools/calendly/get_current_user'
|
||||
import { getEventTypeTool } from '@/tools/calendly/get_event_type'
|
||||
import { getScheduledEventTool } from '@/tools/calendly/get_scheduled_event'
|
||||
import { listEventInviteesTool } from '@/tools/calendly/list_event_invitees'
|
||||
import { listEventTypesTool } from '@/tools/calendly/list_event_types'
|
||||
import { listScheduledEventsTool } from '@/tools/calendly/list_scheduled_events'
|
||||
import { listWebhooksTool } from '@/tools/calendly/list_webhooks'
|
||||
|
||||
export const calendlyGetCurrentUserTool = getCurrentUserTool
|
||||
export const calendlyListEventTypesTool = listEventTypesTool
|
||||
export const calendlyGetEventTypeTool = getEventTypeTool
|
||||
export const calendlyListScheduledEventsTool = listScheduledEventsTool
|
||||
export const calendlyGetScheduledEventTool = getScheduledEventTool
|
||||
export const calendlyListEventInviteesTool = listEventInviteesTool
|
||||
export const calendlyCancelEventTool = cancelEventTool
|
||||
export const calendlyListWebhooksTool = listWebhooksTool
|
||||
export const calendlyCreateWebhookTool = createWebhookTool
|
||||
export const calendlyDeleteWebhookTool = deleteWebhookTool
|
||||
@@ -0,0 +1,157 @@
|
||||
import type {
|
||||
CalendlyListEventInviteesParams,
|
||||
CalendlyListEventInviteesResponse,
|
||||
} from '@/tools/calendly/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const listEventInviteesTool: ToolConfig<
|
||||
CalendlyListEventInviteesParams,
|
||||
CalendlyListEventInviteesResponse
|
||||
> = {
|
||||
id: 'calendly_list_event_invitees',
|
||||
name: 'Calendly List Event Invitees',
|
||||
description: 'Retrieve a list of invitees for a scheduled event',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Calendly Personal Access Token',
|
||||
},
|
||||
eventUuid: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description:
|
||||
'Scheduled event UUID. Format: UUID (e.g., "abc123-def456") or full URI (e.g., "https://api.calendly.com/scheduled_events/abc123-def456")',
|
||||
},
|
||||
count: {
|
||||
type: 'number',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Number of results per page. Format: integer (default: 20, max: 100)',
|
||||
},
|
||||
email: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-only',
|
||||
description: 'Filter invitees by email address',
|
||||
},
|
||||
pageToken: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description:
|
||||
'Page token for pagination. Format: opaque string from previous response next_page_token',
|
||||
},
|
||||
sort: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description:
|
||||
'Sort order for results. Format: "field:direction" (e.g., "created_at:asc", "created_at:desc")',
|
||||
},
|
||||
status: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Filter by status. Format: "active" or "canceled"',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params: CalendlyListEventInviteesParams) => {
|
||||
const uuid = params.eventUuid.includes('/')
|
||||
? params.eventUuid.split('/').pop()
|
||||
: params.eventUuid
|
||||
const url = `https://api.calendly.com/scheduled_events/${uuid}/invitees`
|
||||
const queryParams = []
|
||||
|
||||
if (params.count) {
|
||||
queryParams.push(`count=${Number(params.count)}`)
|
||||
}
|
||||
|
||||
if (params.email) {
|
||||
queryParams.push(`email=${encodeURIComponent(params.email)}`)
|
||||
}
|
||||
|
||||
if (params.pageToken) {
|
||||
queryParams.push(`page_token=${encodeURIComponent(params.pageToken)}`)
|
||||
}
|
||||
|
||||
if (params.sort) {
|
||||
queryParams.push(`sort=${encodeURIComponent(params.sort)}`)
|
||||
}
|
||||
|
||||
if (params.status) {
|
||||
queryParams.push(`status=${encodeURIComponent(params.status)}`)
|
||||
}
|
||||
|
||||
return queryParams.length > 0 ? `${url}?${queryParams.join('&')}` : url
|
||||
},
|
||||
method: 'GET',
|
||||
headers: (params) => ({
|
||||
Authorization: `Bearer ${params.apiKey}`,
|
||||
'Content-Type': 'application/json',
|
||||
}),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
|
||||
return {
|
||||
success: true,
|
||||
output: data,
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
collection: {
|
||||
type: 'array',
|
||||
description: 'Array of invitee objects',
|
||||
items: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
uri: { type: 'string', description: 'Canonical reference to the invitee' },
|
||||
email: { type: 'string', description: 'Invitee email address' },
|
||||
name: { type: 'string', description: 'Invitee full name' },
|
||||
first_name: { type: 'string', description: 'Invitee first name' },
|
||||
last_name: { type: 'string', description: 'Invitee last name' },
|
||||
status: { type: 'string', description: 'Invitee status (active or canceled)' },
|
||||
questions_and_answers: {
|
||||
type: 'array',
|
||||
description: 'Responses to custom questions',
|
||||
items: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
question: { type: 'string', description: 'Question text' },
|
||||
answer: { type: 'string', description: 'Invitee answer' },
|
||||
position: { type: 'number', description: 'Question order' },
|
||||
},
|
||||
},
|
||||
},
|
||||
timezone: { type: 'string', description: 'Invitee timezone' },
|
||||
event: { type: 'string', description: 'URI of the scheduled event' },
|
||||
created_at: { type: 'string', description: 'ISO timestamp when invitee was created' },
|
||||
updated_at: { type: 'string', description: 'ISO timestamp when invitee was updated' },
|
||||
cancel_url: { type: 'string', description: 'URL to cancel the booking' },
|
||||
reschedule_url: { type: 'string', description: 'URL to reschedule the booking' },
|
||||
rescheduled: { type: 'boolean', description: 'Whether invitee rescheduled' },
|
||||
},
|
||||
},
|
||||
},
|
||||
pagination: {
|
||||
type: 'object',
|
||||
description: 'Pagination information',
|
||||
properties: {
|
||||
count: { type: 'number', description: 'Number of results in this page' },
|
||||
next_page: { type: 'string', description: 'URL to next page (if available)' },
|
||||
previous_page: { type: 'string', description: 'URL to previous page (if available)' },
|
||||
next_page_token: { type: 'string', description: 'Token for next page' },
|
||||
previous_page_token: { type: 'string', description: 'Token for previous page' },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
import type {
|
||||
CalendlyListEventTypesParams,
|
||||
CalendlyListEventTypesResponse,
|
||||
} from '@/tools/calendly/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const listEventTypesTool: ToolConfig<
|
||||
CalendlyListEventTypesParams,
|
||||
CalendlyListEventTypesResponse
|
||||
> = {
|
||||
id: 'calendly_list_event_types',
|
||||
name: 'Calendly List Event Types',
|
||||
description: 'Retrieve a list of all event types for a user or organization',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Calendly Personal Access Token',
|
||||
},
|
||||
user: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description:
|
||||
'Return only event types that belong to this user. Format: URI (e.g., "https://api.calendly.com/users/abc123-def456")',
|
||||
},
|
||||
organization: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description:
|
||||
'Return only event types that belong to this organization. Format: URI (e.g., "https://api.calendly.com/organizations/abc123-def456")',
|
||||
},
|
||||
count: {
|
||||
type: 'number',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Number of results per page. Format: integer (default: 20, max: 100)',
|
||||
},
|
||||
pageToken: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description:
|
||||
'Page token for pagination. Format: opaque string from previous response next_page_token',
|
||||
},
|
||||
sort: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description:
|
||||
'Sort order for results. Format: "field:direction" (e.g., "name:asc", "name:desc")',
|
||||
},
|
||||
active: {
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
visibility: 'user-only',
|
||||
description:
|
||||
'When true, show only active event types. When false or unchecked, show all event types (both active and inactive).',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params: CalendlyListEventTypesParams) => {
|
||||
const url = 'https://api.calendly.com/event_types'
|
||||
const queryParams = []
|
||||
|
||||
if (params.user) {
|
||||
queryParams.push(`user=${encodeURIComponent(params.user)}`)
|
||||
}
|
||||
|
||||
if (params.organization) {
|
||||
queryParams.push(`organization=${encodeURIComponent(params.organization)}`)
|
||||
}
|
||||
|
||||
if (params.count) {
|
||||
queryParams.push(`count=${Number(params.count)}`)
|
||||
}
|
||||
|
||||
if (params.pageToken) {
|
||||
queryParams.push(`page_token=${encodeURIComponent(params.pageToken)}`)
|
||||
}
|
||||
|
||||
if (params.sort) {
|
||||
queryParams.push(`sort=${encodeURIComponent(params.sort)}`)
|
||||
}
|
||||
|
||||
if (params.active === true) {
|
||||
queryParams.push('active=true')
|
||||
}
|
||||
|
||||
return queryParams.length > 0 ? `${url}?${queryParams.join('&')}` : url
|
||||
},
|
||||
method: 'GET',
|
||||
headers: (params) => ({
|
||||
Authorization: `Bearer ${params.apiKey}`,
|
||||
'Content-Type': 'application/json',
|
||||
}),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
|
||||
return {
|
||||
success: true,
|
||||
output: data,
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
collection: {
|
||||
type: 'array',
|
||||
description: 'Array of event type objects',
|
||||
items: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
uri: { type: 'string', description: 'Canonical reference to the event type' },
|
||||
name: { type: 'string', description: 'Event type name' },
|
||||
active: { type: 'boolean', description: 'Whether the event type is active' },
|
||||
booking_method: {
|
||||
type: 'string',
|
||||
description: 'Booking method (e.g., "round_robin_or_collect", "collective")',
|
||||
},
|
||||
color: { type: 'string', description: 'Hex color code' },
|
||||
created_at: { type: 'string', description: 'ISO timestamp of creation' },
|
||||
description_html: { type: 'string', description: 'HTML formatted description' },
|
||||
description_plain: { type: 'string', description: 'Plain text description' },
|
||||
duration: { type: 'number', description: 'Duration in minutes' },
|
||||
scheduling_url: { type: 'string', description: 'URL to scheduling page' },
|
||||
slug: { type: 'string', description: 'Unique identifier for URLs' },
|
||||
type: { type: 'string', description: 'Event type classification' },
|
||||
updated_at: { type: 'string', description: 'ISO timestamp of last update' },
|
||||
},
|
||||
},
|
||||
},
|
||||
pagination: {
|
||||
type: 'object',
|
||||
description: 'Pagination information',
|
||||
properties: {
|
||||
count: { type: 'number', description: 'Number of results in this page' },
|
||||
next_page: { type: 'string', description: 'URL to next page (if available)' },
|
||||
previous_page: { type: 'string', description: 'URL to previous page (if available)' },
|
||||
next_page_token: { type: 'string', description: 'Token for next page' },
|
||||
previous_page_token: { type: 'string', description: 'Token for previous page' },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,204 @@
|
||||
import type {
|
||||
CalendlyListScheduledEventsParams,
|
||||
CalendlyListScheduledEventsResponse,
|
||||
} from '@/tools/calendly/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const listScheduledEventsTool: ToolConfig<
|
||||
CalendlyListScheduledEventsParams,
|
||||
CalendlyListScheduledEventsResponse
|
||||
> = {
|
||||
id: 'calendly_list_scheduled_events',
|
||||
name: 'Calendly List Scheduled Events',
|
||||
description: 'Retrieve a list of scheduled events for a user or organization',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Calendly Personal Access Token',
|
||||
},
|
||||
user: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description:
|
||||
'Return events that belong to this user. Either "user" or "organization" must be provided. Format: URI (e.g., "https://api.calendly.com/users/abc123-def456")',
|
||||
},
|
||||
organization: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description:
|
||||
'Return events that belong to this organization. Either "user" or "organization" must be provided. Format: URI (e.g., "https://api.calendly.com/organizations/abc123-def456")',
|
||||
},
|
||||
invitee_email: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-only',
|
||||
description: 'Return events where invitee has this email',
|
||||
},
|
||||
count: {
|
||||
type: 'number',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Number of results per page. Format: integer (default: 20, max: 100)',
|
||||
},
|
||||
max_start_time: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description:
|
||||
'Return events with start time before this time. Format: ISO 8601 (e.g., "2024-01-15T09:00:00Z")',
|
||||
},
|
||||
min_start_time: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description:
|
||||
'Return events with start time after this time. Format: ISO 8601 (e.g., "2024-01-01T00:00:00Z")',
|
||||
},
|
||||
pageToken: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description:
|
||||
'Page token for pagination. Format: opaque string from previous response next_page_token',
|
||||
},
|
||||
sort: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description:
|
||||
'Sort order for results. Format: "field:direction" (e.g., "start_time:asc", "start_time:desc")',
|
||||
},
|
||||
status: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Filter by status. Format: "active" or "canceled"',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params: CalendlyListScheduledEventsParams) => {
|
||||
const url = 'https://api.calendly.com/scheduled_events'
|
||||
const queryParams = []
|
||||
|
||||
if (!params.user && !params.organization) {
|
||||
throw new Error(
|
||||
'At least one of "user" or "organization" parameter is required. Please provide either a user URI or organization URI.'
|
||||
)
|
||||
}
|
||||
|
||||
if (params.user) {
|
||||
queryParams.push(`user=${encodeURIComponent(params.user)}`)
|
||||
}
|
||||
|
||||
if (params.organization) {
|
||||
queryParams.push(`organization=${encodeURIComponent(params.organization)}`)
|
||||
}
|
||||
|
||||
if (params.invitee_email) {
|
||||
queryParams.push(`invitee_email=${encodeURIComponent(params.invitee_email)}`)
|
||||
}
|
||||
|
||||
if (params.count) {
|
||||
queryParams.push(`count=${Number(params.count)}`)
|
||||
}
|
||||
|
||||
if (params.max_start_time) {
|
||||
queryParams.push(`max_start_time=${encodeURIComponent(params.max_start_time)}`)
|
||||
}
|
||||
|
||||
if (params.min_start_time) {
|
||||
queryParams.push(`min_start_time=${encodeURIComponent(params.min_start_time)}`)
|
||||
}
|
||||
|
||||
if (params.pageToken) {
|
||||
queryParams.push(`page_token=${encodeURIComponent(params.pageToken)}`)
|
||||
}
|
||||
|
||||
if (params.sort) {
|
||||
queryParams.push(`sort=${encodeURIComponent(params.sort)}`)
|
||||
}
|
||||
|
||||
if (params.status) {
|
||||
queryParams.push(`status=${encodeURIComponent(params.status)}`)
|
||||
}
|
||||
|
||||
return queryParams.length > 0 ? `${url}?${queryParams.join('&')}` : url
|
||||
},
|
||||
method: 'GET',
|
||||
headers: (params) => ({
|
||||
Authorization: `Bearer ${params.apiKey}`,
|
||||
'Content-Type': 'application/json',
|
||||
}),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
|
||||
return {
|
||||
success: true,
|
||||
output: data,
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
collection: {
|
||||
type: 'array',
|
||||
description: 'Array of scheduled event objects',
|
||||
items: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
uri: { type: 'string', description: 'Canonical reference to the event' },
|
||||
name: { type: 'string', description: 'Event name' },
|
||||
status: { type: 'string', description: 'Event status (active or canceled)' },
|
||||
start_time: { type: 'string', description: 'ISO timestamp of event start' },
|
||||
end_time: { type: 'string', description: 'ISO timestamp of event end' },
|
||||
event_type: { type: 'string', description: 'URI of the event type' },
|
||||
location: {
|
||||
type: 'object',
|
||||
description: 'Event location details',
|
||||
properties: {
|
||||
type: {
|
||||
type: 'string',
|
||||
description: 'Location type (e.g., "zoom", "google_meet", "physical")',
|
||||
},
|
||||
location: { type: 'string', description: 'Location description' },
|
||||
join_url: {
|
||||
type: 'string',
|
||||
description: 'URL to join online meeting (if applicable)',
|
||||
},
|
||||
},
|
||||
},
|
||||
invitees_counter: {
|
||||
type: 'object',
|
||||
description: 'Invitee count information',
|
||||
properties: {
|
||||
total: { type: 'number', description: 'Total number of invitees' },
|
||||
active: { type: 'number', description: 'Number of active invitees' },
|
||||
limit: { type: 'number', description: 'Maximum number of invitees' },
|
||||
},
|
||||
},
|
||||
created_at: { type: 'string', description: 'ISO timestamp of event creation' },
|
||||
updated_at: { type: 'string', description: 'ISO timestamp of last update' },
|
||||
},
|
||||
},
|
||||
},
|
||||
pagination: {
|
||||
type: 'object',
|
||||
description: 'Pagination information',
|
||||
properties: {
|
||||
count: { type: 'number', description: 'Number of results in this page' },
|
||||
next_page: { type: 'string', description: 'URL to next page (if available)' },
|
||||
previous_page: { type: 'string', description: 'URL to previous page (if available)' },
|
||||
next_page_token: { type: 'string', description: 'Token for next page' },
|
||||
previous_page_token: { type: 'string', description: 'Token for previous page' },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
import type {
|
||||
CalendlyListWebhooksParams,
|
||||
CalendlyListWebhooksResponse,
|
||||
} from '@/tools/calendly/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const listWebhooksTool: ToolConfig<
|
||||
CalendlyListWebhooksParams,
|
||||
CalendlyListWebhooksResponse
|
||||
> = {
|
||||
id: 'calendly_list_webhooks',
|
||||
name: 'Calendly List Webhooks',
|
||||
description: 'Retrieve a list of webhook subscriptions for an organization',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Calendly Personal Access Token',
|
||||
},
|
||||
organization: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description:
|
||||
'Organization URI to list webhooks for. Format: URI (e.g., "https://api.calendly.com/organizations/abc123-def456")',
|
||||
},
|
||||
count: {
|
||||
type: 'number',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Number of results per page. Format: integer (default: 20, max: 100)',
|
||||
},
|
||||
pageToken: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description:
|
||||
'Page token for pagination. Format: opaque string from previous response next_page_token',
|
||||
},
|
||||
scope: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Filter by scope. Format: "organization" or "user"',
|
||||
},
|
||||
user: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description:
|
||||
'Filter webhooks by user URI (for user-scoped webhooks). Format: URI (e.g., "https://api.calendly.com/users/abc123-def456")',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params: CalendlyListWebhooksParams) => {
|
||||
const url = 'https://api.calendly.com/webhook_subscriptions'
|
||||
const queryParams = []
|
||||
|
||||
queryParams.push(`organization=${encodeURIComponent(params.organization)}`)
|
||||
|
||||
if (params.count) {
|
||||
queryParams.push(`count=${Number(params.count)}`)
|
||||
}
|
||||
|
||||
if (params.pageToken) {
|
||||
queryParams.push(`page_token=${encodeURIComponent(params.pageToken)}`)
|
||||
}
|
||||
|
||||
if (params.scope) {
|
||||
queryParams.push(`scope=${encodeURIComponent(params.scope)}`)
|
||||
}
|
||||
|
||||
if (params.user) {
|
||||
queryParams.push(`user=${encodeURIComponent(params.user)}`)
|
||||
}
|
||||
|
||||
return `${url}?${queryParams.join('&')}`
|
||||
},
|
||||
method: 'GET',
|
||||
headers: (params) => ({
|
||||
Authorization: `Bearer ${params.apiKey}`,
|
||||
'Content-Type': 'application/json',
|
||||
}),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
|
||||
return {
|
||||
success: true,
|
||||
output: data,
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
collection: {
|
||||
type: 'array',
|
||||
description: 'Array of webhook subscription objects',
|
||||
items: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
uri: { type: 'string', description: 'Canonical reference to the webhook' },
|
||||
callback_url: { type: 'string', description: 'URL to receive webhook events' },
|
||||
created_at: { type: 'string', description: 'ISO timestamp of creation' },
|
||||
updated_at: { type: 'string', description: 'ISO timestamp of last update' },
|
||||
state: { type: 'string', description: 'Webhook state (active, disabled, etc.)' },
|
||||
events: {
|
||||
type: 'array',
|
||||
items: { type: 'string' },
|
||||
description: 'Event types this webhook subscribes to',
|
||||
},
|
||||
signing_key: { type: 'string', description: 'Key to verify webhook signatures' },
|
||||
scope: { type: 'string', description: 'Webhook scope (organization or user)' },
|
||||
organization: { type: 'string', description: 'Organization URI' },
|
||||
user: { type: 'string', description: 'User URI (for user-scoped webhooks)' },
|
||||
creator: { type: 'string', description: 'URI of user who created the webhook' },
|
||||
},
|
||||
},
|
||||
},
|
||||
pagination: {
|
||||
type: 'object',
|
||||
description: 'Pagination information',
|
||||
properties: {
|
||||
count: { type: 'number', description: 'Number of results in this page' },
|
||||
next_page: { type: 'string', description: 'URL to next page (if available)' },
|
||||
previous_page: { type: 'string', description: 'URL to previous page (if available)' },
|
||||
next_page_token: { type: 'string', description: 'Token for next page' },
|
||||
previous_page_token: { type: 'string', description: 'Token for previous page' },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,385 @@
|
||||
import type { ToolResponse } from '@/tools/types'
|
||||
|
||||
export interface CalendlyGetCurrentUserParams {
|
||||
apiKey: string
|
||||
}
|
||||
|
||||
export interface CalendlyGetCurrentUserResponse extends ToolResponse {
|
||||
output: {
|
||||
resource: {
|
||||
uri: string
|
||||
name: string
|
||||
slug: string
|
||||
email: string
|
||||
scheduling_url: string
|
||||
timezone: string
|
||||
avatar_url: string
|
||||
created_at: string
|
||||
updated_at: string
|
||||
current_organization: string
|
||||
resource_type: string
|
||||
locale: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export interface CalendlyListEventTypesParams {
|
||||
apiKey: string
|
||||
user?: string
|
||||
organization?: string
|
||||
count?: number
|
||||
pageToken?: string
|
||||
sort?: string
|
||||
active?: boolean
|
||||
}
|
||||
|
||||
export interface CalendlyListEventTypesResponse extends ToolResponse {
|
||||
output: {
|
||||
collection: Array<{
|
||||
uri: string
|
||||
name: string
|
||||
active: boolean
|
||||
booking_method: string
|
||||
color: string
|
||||
created_at: string
|
||||
description_html: string
|
||||
description_plain: string
|
||||
duration: number
|
||||
internal_note: string
|
||||
kind: string
|
||||
pooling_type: string
|
||||
profile: {
|
||||
name: string
|
||||
owner: string
|
||||
type: string
|
||||
}
|
||||
scheduling_url: string
|
||||
slug: string
|
||||
type: string
|
||||
updated_at: string
|
||||
}>
|
||||
pagination: {
|
||||
count: number
|
||||
next_page: string | null
|
||||
previous_page: string | null
|
||||
next_page_token: string | null
|
||||
previous_page_token: string | null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export interface CalendlyGetEventTypeParams {
|
||||
apiKey: string
|
||||
eventTypeUuid: string
|
||||
}
|
||||
|
||||
export interface CalendlyGetEventTypeResponse extends ToolResponse {
|
||||
output: {
|
||||
resource: {
|
||||
uri: string
|
||||
name: string
|
||||
active: boolean
|
||||
booking_method: string
|
||||
color: string
|
||||
created_at: string
|
||||
custom_questions: Array<{
|
||||
name: string
|
||||
type: string
|
||||
position: number
|
||||
enabled: boolean
|
||||
required: boolean
|
||||
answer_choices: string[]
|
||||
include_other: boolean
|
||||
}>
|
||||
deleted_at: string | null
|
||||
description_html: string
|
||||
description_plain: string
|
||||
duration: number
|
||||
internal_note: string
|
||||
kind: string
|
||||
pooling_type: string
|
||||
profile: {
|
||||
name: string
|
||||
owner: string
|
||||
type: string
|
||||
}
|
||||
scheduling_url: string
|
||||
slug: string
|
||||
type: string
|
||||
updated_at: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export interface CalendlyListScheduledEventsParams {
|
||||
apiKey: string
|
||||
user?: string
|
||||
organization?: string
|
||||
invitee_email?: string
|
||||
count?: number
|
||||
max_start_time?: string
|
||||
min_start_time?: string
|
||||
pageToken?: string
|
||||
sort?: string
|
||||
status?: string
|
||||
}
|
||||
|
||||
export interface CalendlyListScheduledEventsResponse extends ToolResponse {
|
||||
output: {
|
||||
collection: Array<{
|
||||
uri: string
|
||||
name: string
|
||||
status: string
|
||||
start_time: string
|
||||
end_time: string
|
||||
event_type: string
|
||||
location: {
|
||||
type: string
|
||||
location: string
|
||||
join_url?: string
|
||||
data?: Record<string, any>
|
||||
}
|
||||
invitees_counter: {
|
||||
total: number
|
||||
active: number
|
||||
limit: number
|
||||
}
|
||||
created_at: string
|
||||
updated_at: string
|
||||
event_memberships: Array<{
|
||||
user: string
|
||||
user_email: string
|
||||
user_name: string
|
||||
}>
|
||||
event_guests: Array<{
|
||||
email: string
|
||||
created_at: string
|
||||
updated_at: string
|
||||
}>
|
||||
cancellation?: {
|
||||
canceled_by: string
|
||||
reason: string
|
||||
canceler_type: string
|
||||
}
|
||||
}>
|
||||
pagination: {
|
||||
count: number
|
||||
next_page: string | null
|
||||
previous_page: string | null
|
||||
next_page_token: string | null
|
||||
previous_page_token: string | null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export interface CalendlyGetScheduledEventParams {
|
||||
apiKey: string
|
||||
eventUuid: string
|
||||
}
|
||||
|
||||
export interface CalendlyGetScheduledEventResponse extends ToolResponse {
|
||||
output: {
|
||||
resource: {
|
||||
uri: string
|
||||
name: string
|
||||
status: string
|
||||
start_time: string
|
||||
end_time: string
|
||||
event_type: string
|
||||
location: {
|
||||
type: string
|
||||
location: string
|
||||
join_url?: string
|
||||
data?: Record<string, any>
|
||||
}
|
||||
invitees_counter: {
|
||||
total: number
|
||||
active: number
|
||||
limit: number
|
||||
}
|
||||
created_at: string
|
||||
updated_at: string
|
||||
event_memberships: Array<{
|
||||
user: string
|
||||
user_email: string
|
||||
user_name: string
|
||||
}>
|
||||
event_guests: Array<{
|
||||
email: string
|
||||
created_at: string
|
||||
updated_at: string
|
||||
}>
|
||||
cancellation?: {
|
||||
canceled_by: string
|
||||
reason: string
|
||||
canceler_type: string
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export interface CalendlyListEventInviteesParams {
|
||||
apiKey: string
|
||||
eventUuid: string
|
||||
count?: number
|
||||
email?: string
|
||||
pageToken?: string
|
||||
sort?: string
|
||||
status?: string
|
||||
}
|
||||
|
||||
export interface CalendlyListEventInviteesResponse extends ToolResponse {
|
||||
output: {
|
||||
collection: Array<{
|
||||
uri: string
|
||||
email: string
|
||||
name: string
|
||||
first_name: string | null
|
||||
last_name: string | null
|
||||
status: string
|
||||
questions_and_answers: Array<{
|
||||
question: string
|
||||
answer: string
|
||||
position: number
|
||||
}>
|
||||
timezone: string
|
||||
event: string
|
||||
created_at: string
|
||||
updated_at: string
|
||||
tracking: {
|
||||
utm_campaign: string | null
|
||||
utm_source: string | null
|
||||
utm_medium: string | null
|
||||
utm_content: string | null
|
||||
utm_term: string | null
|
||||
salesforce_uuid: string | null
|
||||
}
|
||||
text_reminder_number: string | null
|
||||
rescheduled: boolean
|
||||
old_invitee: string | null
|
||||
new_invitee: string | null
|
||||
cancel_url: string
|
||||
reschedule_url: string
|
||||
cancellation?: {
|
||||
canceled_by: string
|
||||
reason: string
|
||||
canceler_type: string
|
||||
}
|
||||
payment?: {
|
||||
id: string
|
||||
provider: string
|
||||
amount: number
|
||||
currency: string
|
||||
terms: string
|
||||
successful: boolean
|
||||
}
|
||||
no_show?: {
|
||||
created_at: string
|
||||
}
|
||||
reconfirmation?: {
|
||||
created_at: string
|
||||
confirmed_at: string | null
|
||||
}
|
||||
}>
|
||||
pagination: {
|
||||
count: number
|
||||
next_page: string | null
|
||||
previous_page: string | null
|
||||
next_page_token: string | null
|
||||
previous_page_token: string | null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export interface CalendlyCancelEventParams {
|
||||
apiKey: string
|
||||
eventUuid: string
|
||||
reason?: string
|
||||
}
|
||||
|
||||
export interface CalendlyCancelEventResponse extends ToolResponse {
|
||||
output: {
|
||||
resource: {
|
||||
canceler_type: string
|
||||
canceled_by: string
|
||||
reason: string | null
|
||||
created_at: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export interface CalendlyListWebhooksParams {
|
||||
apiKey: string
|
||||
organization: string
|
||||
count?: number
|
||||
pageToken?: string
|
||||
scope?: string
|
||||
user?: string
|
||||
}
|
||||
|
||||
export interface CalendlyListWebhooksResponse extends ToolResponse {
|
||||
output: {
|
||||
collection: Array<{
|
||||
uri: string
|
||||
callback_url: string
|
||||
created_at: string
|
||||
updated_at: string
|
||||
retry_started_at: string | null
|
||||
state: string
|
||||
events: string[]
|
||||
signing_key: string
|
||||
scope: string
|
||||
organization: string
|
||||
user?: string
|
||||
creator: string
|
||||
}>
|
||||
pagination: {
|
||||
count: number
|
||||
next_page: string | null
|
||||
previous_page: string | null
|
||||
next_page_token: string | null
|
||||
previous_page_token: string | null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export interface CalendlyCreateWebhookParams {
|
||||
apiKey: string
|
||||
url: string
|
||||
events: string[]
|
||||
organization: string
|
||||
user?: string
|
||||
scope: string
|
||||
signing_key?: string
|
||||
}
|
||||
|
||||
export interface CalendlyCreateWebhookResponse extends ToolResponse {
|
||||
output: {
|
||||
resource: {
|
||||
uri: string
|
||||
callback_url: string
|
||||
created_at: string
|
||||
updated_at: string
|
||||
retry_started_at: string | null
|
||||
state: string
|
||||
events: string[]
|
||||
signing_key: string
|
||||
scope: string
|
||||
organization: string
|
||||
user?: string
|
||||
creator: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export interface CalendlyDeleteWebhookParams {
|
||||
apiKey: string
|
||||
webhookUuid: string
|
||||
}
|
||||
|
||||
export interface CalendlyDeleteWebhookResponse extends ToolResponse {
|
||||
output: {
|
||||
deleted: boolean
|
||||
message: string
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user