elevenlabs-voice-agent-mcp 1.0.15 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +202 -23
- package/dist/__tests__/mocks/fixtures.d.ts +136 -0
- package/dist/__tests__/mocks/fixtures.d.ts.map +1 -0
- package/dist/__tests__/mocks/fixtures.js +393 -0
- package/dist/__tests__/mocks/fixtures.js.map +1 -0
- package/dist/__tests__/schemas/schemas.test.d.ts +7 -0
- package/dist/__tests__/schemas/schemas.test.d.ts.map +1 -0
- package/dist/__tests__/schemas/schemas.test.js +537 -0
- package/dist/__tests__/schemas/schemas.test.js.map +1 -0
- package/dist/__tests__/services/elevenlabs-api.test.d.ts +7 -0
- package/dist/__tests__/services/elevenlabs-api.test.d.ts.map +1 -0
- package/dist/__tests__/services/elevenlabs-api.test.js +272 -0
- package/dist/__tests__/services/elevenlabs-api.test.js.map +1 -0
- package/dist/__tests__/services/formatters.test.d.ts +7 -0
- package/dist/__tests__/services/formatters.test.d.ts.map +1 -0
- package/dist/__tests__/services/formatters.test.js +387 -0
- package/dist/__tests__/services/formatters.test.js.map +1 -0
- package/dist/__tests__/setup.d.ts +7 -0
- package/dist/__tests__/setup.d.ts.map +1 -0
- package/dist/__tests__/setup.js +25 -0
- package/dist/__tests__/setup.js.map +1 -0
- package/dist/__tests__/tools/agent-tools.test.d.ts +7 -0
- package/dist/__tests__/tools/agent-tools.test.d.ts.map +1 -0
- package/dist/__tests__/tools/agent-tools.test.js +343 -0
- package/dist/__tests__/tools/agent-tools.test.js.map +1 -0
- package/dist/__tests__/tools/batch-calling-tools.test.d.ts +7 -0
- package/dist/__tests__/tools/batch-calling-tools.test.d.ts.map +1 -0
- package/dist/__tests__/tools/batch-calling-tools.test.js +236 -0
- package/dist/__tests__/tools/batch-calling-tools.test.js.map +1 -0
- package/dist/__tests__/tools/conversation-tools.test.d.ts +7 -0
- package/dist/__tests__/tools/conversation-tools.test.d.ts.map +1 -0
- package/dist/__tests__/tools/conversation-tools.test.js +212 -0
- package/dist/__tests__/tools/conversation-tools.test.js.map +1 -0
- package/dist/__tests__/tools/knowledge-tools.test.d.ts +7 -0
- package/dist/__tests__/tools/knowledge-tools.test.d.ts.map +1 -0
- package/dist/__tests__/tools/knowledge-tools.test.js +209 -0
- package/dist/__tests__/tools/knowledge-tools.test.js.map +1 -0
- package/dist/__tests__/tools/outbound-tools.test.d.ts +7 -0
- package/dist/__tests__/tools/outbound-tools.test.d.ts.map +1 -0
- package/dist/__tests__/tools/outbound-tools.test.js +194 -0
- package/dist/__tests__/tools/outbound-tools.test.js.map +1 -0
- package/dist/__tests__/tools/phone-number-tools.test.d.ts +7 -0
- package/dist/__tests__/tools/phone-number-tools.test.d.ts.map +1 -0
- package/dist/__tests__/tools/phone-number-tools.test.js +314 -0
- package/dist/__tests__/tools/phone-number-tools.test.js.map +1 -0
- package/dist/__tests__/tools/tool-tools.test.d.ts +7 -0
- package/dist/__tests__/tools/tool-tools.test.d.ts.map +1 -0
- package/dist/__tests__/tools/tool-tools.test.js +287 -0
- package/dist/__tests__/tools/tool-tools.test.js.map +1 -0
- package/dist/__tests__/tools/utility-tools.test.d.ts +7 -0
- package/dist/__tests__/tools/utility-tools.test.d.ts.map +1 -0
- package/dist/__tests__/tools/utility-tools.test.js +207 -0
- package/dist/__tests__/tools/utility-tools.test.js.map +1 -0
- package/dist/__tests__/utils/error-handlers.test.d.ts +7 -0
- package/dist/__tests__/utils/error-handlers.test.d.ts.map +1 -0
- package/dist/__tests__/utils/error-handlers.test.js +237 -0
- package/dist/__tests__/utils/error-handlers.test.js.map +1 -0
- package/dist/__tests__/utils/phone-normalizer.test.d.ts +7 -0
- package/dist/__tests__/utils/phone-normalizer.test.d.ts.map +1 -0
- package/dist/__tests__/utils/phone-normalizer.test.js +224 -0
- package/dist/__tests__/utils/phone-normalizer.test.js.map +1 -0
- package/dist/__tests__/utils/truncation.test.d.ts +7 -0
- package/dist/__tests__/utils/truncation.test.d.ts.map +1 -0
- package/dist/__tests__/utils/truncation.test.js +208 -0
- package/dist/__tests__/utils/truncation.test.js.map +1 -0
- package/dist/constants.d.ts +128 -4
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +150 -24
- package/dist/constants.js.map +1 -1
- package/dist/index.d.ts +13 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -3
- package/dist/index.js.map +1 -1
- package/dist/schemas/agent-schemas.d.ts +23 -8
- package/dist/schemas/agent-schemas.d.ts.map +1 -1
- package/dist/schemas/agent-schemas.js +23 -8
- package/dist/schemas/agent-schemas.js.map +1 -1
- package/dist/schemas/batch-calling-schemas.d.ts +24 -9
- package/dist/schemas/batch-calling-schemas.d.ts.map +1 -1
- package/dist/schemas/batch-calling-schemas.js +24 -9
- package/dist/schemas/batch-calling-schemas.js.map +1 -1
- package/dist/schemas/common-schemas.d.ts +45 -13
- package/dist/schemas/common-schemas.d.ts.map +1 -1
- package/dist/schemas/common-schemas.js +45 -13
- package/dist/schemas/common-schemas.js.map +1 -1
- package/dist/schemas/conversation-schemas.d.ts +12 -5
- package/dist/schemas/conversation-schemas.d.ts.map +1 -1
- package/dist/schemas/conversation-schemas.js +12 -5
- package/dist/schemas/conversation-schemas.js.map +1 -1
- package/dist/schemas/outbound-schemas.d.ts +23 -8
- package/dist/schemas/outbound-schemas.d.ts.map +1 -1
- package/dist/schemas/outbound-schemas.js +23 -8
- package/dist/schemas/outbound-schemas.js.map +1 -1
- package/dist/schemas/phone-number-schemas.d.ts +37 -14
- package/dist/schemas/phone-number-schemas.d.ts.map +1 -1
- package/dist/schemas/phone-number-schemas.js +37 -14
- package/dist/schemas/phone-number-schemas.js.map +1 -1
- package/dist/schemas/tool-schemas.d.ts +27 -9
- package/dist/schemas/tool-schemas.d.ts.map +1 -1
- package/dist/schemas/tool-schemas.js +34 -11
- package/dist/schemas/tool-schemas.js.map +1 -1
- package/dist/services/elevenlabs-api.d.ts +108 -14
- package/dist/services/elevenlabs-api.d.ts.map +1 -1
- package/dist/services/elevenlabs-api.js +108 -14
- package/dist/services/elevenlabs-api.js.map +1 -1
- package/dist/services/formatters.d.ts +147 -21
- package/dist/services/formatters.d.ts.map +1 -1
- package/dist/services/formatters.js +147 -21
- package/dist/services/formatters.js.map +1 -1
- package/dist/tools/agent-tools.d.ts +5 -3
- package/dist/tools/agent-tools.d.ts.map +1 -1
- package/dist/tools/agent-tools.js +5 -3
- package/dist/tools/agent-tools.js.map +1 -1
- package/dist/tools/batch-calling-tools.d.ts +5 -3
- package/dist/tools/batch-calling-tools.d.ts.map +1 -1
- package/dist/tools/batch-calling-tools.js +5 -3
- package/dist/tools/batch-calling-tools.js.map +1 -1
- package/dist/tools/conversation-tools.d.ts +5 -3
- package/dist/tools/conversation-tools.d.ts.map +1 -1
- package/dist/tools/conversation-tools.js +5 -3
- package/dist/tools/conversation-tools.js.map +1 -1
- package/dist/tools/knowledge-tools.d.ts +5 -3
- package/dist/tools/knowledge-tools.d.ts.map +1 -1
- package/dist/tools/knowledge-tools.js +5 -3
- package/dist/tools/knowledge-tools.js.map +1 -1
- package/dist/tools/outbound-tools.d.ts +5 -3
- package/dist/tools/outbound-tools.d.ts.map +1 -1
- package/dist/tools/outbound-tools.js +5 -3
- package/dist/tools/outbound-tools.js.map +1 -1
- package/dist/tools/phone-number-tools.d.ts +5 -4
- package/dist/tools/phone-number-tools.d.ts.map +1 -1
- package/dist/tools/phone-number-tools.js +5 -4
- package/dist/tools/phone-number-tools.js.map +1 -1
- package/dist/tools/tool-tools.d.ts +5 -3
- package/dist/tools/tool-tools.d.ts.map +1 -1
- package/dist/tools/tool-tools.js +5 -3
- package/dist/tools/tool-tools.js.map +1 -1
- package/dist/tools/utility-tools.d.ts +5 -3
- package/dist/tools/utility-tools.d.ts.map +1 -1
- package/dist/tools/utility-tools.js +5 -3
- package/dist/tools/utility-tools.js.map +1 -1
- package/dist/types.d.ts +457 -10
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +15 -3
- package/dist/types.js.map +1 -1
- package/dist/utils/error-handlers.d.ts +47 -14
- package/dist/utils/error-handlers.d.ts.map +1 -1
- package/dist/utils/error-handlers.js +47 -14
- package/dist/utils/error-handlers.js.map +1 -1
- package/dist/utils/phone-normalizer.d.ts +43 -22
- package/dist/utils/phone-normalizer.d.ts.map +1 -1
- package/dist/utils/phone-normalizer.js +43 -22
- package/dist/utils/phone-normalizer.js.map +1 -1
- package/dist/utils/truncation.d.ts +46 -22
- package/dist/utils/truncation.d.ts.map +1 -1
- package/dist/utils/truncation.js +46 -22
- package/dist/utils/truncation.js.map +1 -1
- package/package.json +10 -4
package/dist/index.js
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* ElevenLabs Voice Agent MCP Server
|
|
3
|
+
* @fileoverview ElevenLabs Voice Agent MCP Server
|
|
4
|
+
* @description Main entry point for the MCP server providing tools for voice agent development.
|
|
5
|
+
* This server implements the Model Context Protocol (MCP) to expose 23 specialized tools
|
|
6
|
+
* for creating, configuring, testing, monitoring, and deploying ElevenLabs Voice Agents.
|
|
4
7
|
*
|
|
5
|
-
*
|
|
8
|
+
* @requires @modelcontextprotocol/sdk
|
|
9
|
+
* @requires axios
|
|
10
|
+
* @requires zod
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // Start the server (stdio transport)
|
|
14
|
+
* $ ELEVENLABS_API_KEY=your_key node dist/index.js
|
|
15
|
+
*
|
|
16
|
+
* @module index
|
|
6
17
|
*/
|
|
7
18
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
8
19
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
@@ -17,7 +28,20 @@ import { elevenlabs_start_outbound_call } from "./tools/outbound-tools.js";
|
|
|
17
28
|
import { elevenlabs_submit_batch_call, elevenlabs_list_batch_calls, elevenlabs_get_batch_call } from "./tools/batch-calling-tools.js";
|
|
18
29
|
import { elevenlabs_list_phone_numbers, elevenlabs_get_phone_number, elevenlabs_import_phone_number, elevenlabs_update_phone_number, elevenlabs_delete_phone_number } from "./tools/phone-number-tools.js";
|
|
19
30
|
/**
|
|
20
|
-
*
|
|
31
|
+
* Initializes and starts the MCP server.
|
|
32
|
+
* @description Sets up the MCP server with all available tools and connects
|
|
33
|
+
* to the stdio transport for communication with MCP clients.
|
|
34
|
+
*
|
|
35
|
+
* The function:
|
|
36
|
+
* 1. Validates the ELEVENLABS_API_KEY environment variable
|
|
37
|
+
* 2. Creates an MCP server instance
|
|
38
|
+
* 3. Registers all 23 tools organized by tier
|
|
39
|
+
* 4. Connects to stdio transport for client communication
|
|
40
|
+
*
|
|
41
|
+
* @async
|
|
42
|
+
* @returns {Promise<void>}
|
|
43
|
+
* @throws {Error} If ELEVENLABS_API_KEY is not set
|
|
44
|
+
* @throws {Error} If server initialization fails
|
|
21
45
|
*/
|
|
22
46
|
async function main() {
|
|
23
47
|
// Validate API key on startup
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,mBAAmB;AACnB,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACvB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAE3E,OAAO,EACL,8BAA8B,EAC9B,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,uBAAu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zod validation schemas for agent-related operations
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* @fileoverview Zod validation schemas for agent-related operations
|
|
3
|
+
* @description Provides strict input validation for creating, updating, and managing agents.
|
|
4
|
+
* These schemas define the expected input structure for agent CRUD operations.
|
|
5
|
+
* @module schemas/agent-schemas
|
|
5
6
|
*/
|
|
6
7
|
import { z } from "zod";
|
|
7
8
|
/**
|
|
8
|
-
* Schema for creating a new agent
|
|
9
|
+
* Schema for creating a new voice agent.
|
|
10
|
+
* @description Validates all input parameters for the elevenlabs_create_agent tool.
|
|
11
|
+
* Includes agent configuration, voice settings, and widget customization.
|
|
12
|
+
* @type {z.ZodObject}
|
|
9
13
|
*/
|
|
10
14
|
export declare const CreateAgentSchema: z.ZodObject<{
|
|
11
15
|
name: z.ZodString;
|
|
@@ -66,7 +70,9 @@ export declare const CreateAgentSchema: z.ZodObject<{
|
|
|
66
70
|
response_format: z.ZodDefault<z.ZodNativeEnum<typeof import("../types.js").ResponseFormat>>;
|
|
67
71
|
}, z.ZodTypeAny, "passthrough">>;
|
|
68
72
|
/**
|
|
69
|
-
* Schema for
|
|
73
|
+
* Schema for retrieving an agent by ID.
|
|
74
|
+
* @description Validates input for the elevenlabs_get_agent tool.
|
|
75
|
+
* @type {z.ZodObject}
|
|
70
76
|
*/
|
|
71
77
|
export declare const GetAgentSchema: z.ZodObject<{
|
|
72
78
|
agent_id: z.ZodString;
|
|
@@ -79,7 +85,10 @@ export declare const GetAgentSchema: z.ZodObject<{
|
|
|
79
85
|
response_format: z.ZodDefault<z.ZodNativeEnum<typeof import("../types.js").ResponseFormat>>;
|
|
80
86
|
}, z.ZodTypeAny, "passthrough">>;
|
|
81
87
|
/**
|
|
82
|
-
* Schema for updating an agent
|
|
88
|
+
* Schema for updating an existing agent.
|
|
89
|
+
* @description Validates input for the elevenlabs_update_agent tool.
|
|
90
|
+
* All fields except agent_id are optional - only provided fields are updated.
|
|
91
|
+
* @type {z.ZodObject}
|
|
83
92
|
*/
|
|
84
93
|
export declare const UpdateAgentSchema: z.ZodObject<{
|
|
85
94
|
agent_id: z.ZodString;
|
|
@@ -143,7 +152,10 @@ export declare const UpdateAgentSchema: z.ZodObject<{
|
|
|
143
152
|
response_format: z.ZodDefault<z.ZodNativeEnum<typeof import("../types.js").ResponseFormat>>;
|
|
144
153
|
}, z.ZodTypeAny, "passthrough">>;
|
|
145
154
|
/**
|
|
146
|
-
* Schema for deleting an agent
|
|
155
|
+
* Schema for deleting an agent.
|
|
156
|
+
* @description Validates input for the elevenlabs_delete_agent tool.
|
|
157
|
+
* This is a destructive operation that cannot be undone.
|
|
158
|
+
* @type {z.ZodObject}
|
|
147
159
|
*/
|
|
148
160
|
export declare const DeleteAgentSchema: z.ZodObject<{
|
|
149
161
|
agent_id: z.ZodString;
|
|
@@ -153,7 +165,10 @@ export declare const DeleteAgentSchema: z.ZodObject<{
|
|
|
153
165
|
agent_id: z.ZodString;
|
|
154
166
|
}, z.ZodTypeAny, "passthrough">>;
|
|
155
167
|
/**
|
|
156
|
-
* Schema for listing agents
|
|
168
|
+
* Schema for listing agents with pagination.
|
|
169
|
+
* @description Validates input for the elevenlabs_list_agents tool.
|
|
170
|
+
* Supports pagination via limit and offset parameters.
|
|
171
|
+
* @type {z.ZodObject}
|
|
157
172
|
*/
|
|
158
173
|
export declare const ListAgentsSchema: z.ZodObject<{
|
|
159
174
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/agent-schemas.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"agent-schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/agent-schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoBxB;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAyFd,CAAC;AAEjB;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;;;;;;;gCAGX,CAAC;AAEjB;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAyFd,CAAC;AAEjB;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;;;;;;gCAEd,CAAC;AAEjB;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;gCAIb,CAAC"}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Zod validation schemas for agent-related operations
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* @fileoverview Zod validation schemas for agent-related operations
|
|
3
|
+
* @description Provides strict input validation for creating, updating, and managing agents.
|
|
4
|
+
* These schemas define the expected input structure for agent CRUD operations.
|
|
5
|
+
* @module schemas/agent-schemas
|
|
5
6
|
*/
|
|
6
7
|
import { z } from "zod";
|
|
7
8
|
import { SUPPORTED_LLMS, SUPPORTED_VOICE_MODELS, SUPPORTED_LANGUAGES, DEFAULT_LLM, DEFAULT_VOICE_MODEL, DEFAULT_VOICE_ID, DEFAULT_LANGUAGE } from "../constants.js";
|
|
8
9
|
import { ResponseFormatSchema, LimitSchema, OffsetSchema, AgentIdSchema, VoiceIdSchema, ColorSchema, URLSchema } from "./common-schemas.js";
|
|
9
10
|
/**
|
|
10
|
-
* Schema for creating a new agent
|
|
11
|
+
* Schema for creating a new voice agent.
|
|
12
|
+
* @description Validates all input parameters for the elevenlabs_create_agent tool.
|
|
13
|
+
* Includes agent configuration, voice settings, and widget customization.
|
|
14
|
+
* @type {z.ZodObject}
|
|
11
15
|
*/
|
|
12
16
|
export const CreateAgentSchema = z.object({
|
|
13
17
|
name: z.string()
|
|
@@ -83,14 +87,19 @@ export const CreateAgentSchema = z.object({
|
|
|
83
87
|
response_format: ResponseFormatSchema
|
|
84
88
|
}).passthrough();
|
|
85
89
|
/**
|
|
86
|
-
* Schema for
|
|
90
|
+
* Schema for retrieving an agent by ID.
|
|
91
|
+
* @description Validates input for the elevenlabs_get_agent tool.
|
|
92
|
+
* @type {z.ZodObject}
|
|
87
93
|
*/
|
|
88
94
|
export const GetAgentSchema = z.object({
|
|
89
95
|
agent_id: AgentIdSchema,
|
|
90
96
|
response_format: ResponseFormatSchema
|
|
91
97
|
}).passthrough();
|
|
92
98
|
/**
|
|
93
|
-
* Schema for updating an agent
|
|
99
|
+
* Schema for updating an existing agent.
|
|
100
|
+
* @description Validates input for the elevenlabs_update_agent tool.
|
|
101
|
+
* All fields except agent_id are optional - only provided fields are updated.
|
|
102
|
+
* @type {z.ZodObject}
|
|
94
103
|
*/
|
|
95
104
|
export const UpdateAgentSchema = z.object({
|
|
96
105
|
agent_id: AgentIdSchema,
|
|
@@ -165,13 +174,19 @@ export const UpdateAgentSchema = z.object({
|
|
|
165
174
|
response_format: ResponseFormatSchema
|
|
166
175
|
}).passthrough();
|
|
167
176
|
/**
|
|
168
|
-
* Schema for deleting an agent
|
|
177
|
+
* Schema for deleting an agent.
|
|
178
|
+
* @description Validates input for the elevenlabs_delete_agent tool.
|
|
179
|
+
* This is a destructive operation that cannot be undone.
|
|
180
|
+
* @type {z.ZodObject}
|
|
169
181
|
*/
|
|
170
182
|
export const DeleteAgentSchema = z.object({
|
|
171
183
|
agent_id: AgentIdSchema
|
|
172
184
|
}).passthrough();
|
|
173
185
|
/**
|
|
174
|
-
* Schema for listing agents
|
|
186
|
+
* Schema for listing agents with pagination.
|
|
187
|
+
* @description Validates input for the elevenlabs_list_agents tool.
|
|
188
|
+
* Supports pagination via limit and offset parameters.
|
|
189
|
+
* @type {z.ZodObject}
|
|
175
190
|
*/
|
|
176
191
|
export const ListAgentsSchema = z.object({
|
|
177
192
|
limit: LimitSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-schemas.js","sourceRoot":"","sources":["../../src/schemas/agent-schemas.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"agent-schemas.js","sourceRoot":"","sources":["../../src/schemas/agent-schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,mBAAmB,EACnB,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,oBAAoB,EACpB,WAAW,EACX,YAAY,EACZ,aAAa,EACb,aAAa,EACb,WAAW,EACX,SAAS,EACV,MAAM,qBAAqB,CAAC;AAE7B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;SACb,GAAG,CAAC,CAAC,EAAE,wBAAwB,CAAC;SAChC,GAAG,CAAC,GAAG,EAAE,qCAAqC,CAAC;SAC/C,QAAQ,CAAC,2DAA2D,CAAC;IAExE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;SACf,GAAG,CAAC,EAAE,EAAE,uCAAuC,CAAC;SAChD,GAAG,CAAC,IAAI,EAAE,wCAAwC,CAAC;SACnD,QAAQ,CAAC,uDAAuD,CAAC;IAEpE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;SACZ,GAAG,CAAC,CAAC,EAAE,4BAA4B,CAAC;SACpC,OAAO,CAAC,WAAW,CAAC;SACpB,QAAQ,CAAC,kCAAkC,WAAW,sBAAsB,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,sDAAsD,CAAC;IAE/J,QAAQ,EAAE,aAAa;SACpB,OAAO,CAAC,gBAAgB,CAAC;SACzB,QAAQ,CAAC,iCAAiC,gBAAgB,YAAY,CAAC;IAE1E,WAAW,EAAE,CAAC,CAAC,IAAI,CAA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AAC,CAAC,EAAE,2CAA2C,CAAC;SACnD,GAAG,CAAC,GAAG,EAAE,2CAA2C,CAAC;SACrD,QAAQ,EAAE;SACV,QAAQ,CAAC,+CAA+C,CAAC;IAE5D,YAAY,EAAE,WAAW,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;IAErE,iBAAiB,EAAE,SAAS,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;IAE7E,eAAe,EAAE,oBAAoB;CACtC,CAAC,CAAC,WAAW,EAAE,CAAC;AAEjB;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,QAAQ,EAAE,aAAa;CACxB,CAAC,CAAC,WAAW,EAAE,CAAC;AAEjB;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,KAAK,EAAE,WAAW;IAClB,MAAM,EAAE,YAAY;IACpB,eAAe,EAAE,oBAAoB;CACtC,CAAC,CAAC,WAAW,EAAE,CAAC"}
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Zod validation schemas for batch calling operations
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* @fileoverview Zod validation schemas for batch calling operations
|
|
3
|
+
* @description Provides strict input validation for submitting batch call jobs,
|
|
4
|
+
* listing batch calls, and retrieving batch call details. Supports up to 10,000
|
|
5
|
+
* recipients per batch with per-recipient personalization.
|
|
6
|
+
* @module schemas/batch-calling-schemas
|
|
6
7
|
*/
|
|
7
8
|
import { z } from "zod";
|
|
8
9
|
/**
|
|
9
|
-
* Batch ID schema
|
|
10
|
+
* Batch ID validation schema.
|
|
11
|
+
* @description Validates ElevenLabs batch job identifiers.
|
|
12
|
+
* @type {z.ZodString}
|
|
10
13
|
*/
|
|
11
14
|
export declare const BatchIdSchema: z.ZodString;
|
|
12
15
|
/**
|
|
13
|
-
* Recipient schema for batch calling
|
|
16
|
+
* Recipient schema for batch calling.
|
|
17
|
+
* @description Validates a single recipient in a batch call job.
|
|
18
|
+
* Either phone_number or whatsapp_user_id must be provided.
|
|
19
|
+
* @type {z.ZodObject}
|
|
14
20
|
*/
|
|
15
21
|
export declare const OutboundCallRecipientSchema: z.ZodEffects<z.ZodObject<{
|
|
16
22
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -39,7 +45,10 @@ export declare const OutboundCallRecipientSchema: z.ZodEffects<z.ZodObject<{
|
|
|
39
45
|
whatsapp_user_id?: string | undefined;
|
|
40
46
|
}>;
|
|
41
47
|
/**
|
|
42
|
-
* Schema for submitting a batch call job
|
|
48
|
+
* Schema for submitting a batch call job.
|
|
49
|
+
* @description Validates input for the elevenlabs_submit_batch_call operation.
|
|
50
|
+
* Supports 1-10,000 recipients with optional scheduling.
|
|
51
|
+
* @type {z.ZodObject}
|
|
43
52
|
*/
|
|
44
53
|
export declare const SubmitBatchCallSchema: z.ZodObject<{
|
|
45
54
|
call_name: z.ZodString;
|
|
@@ -139,7 +148,10 @@ export declare const SubmitBatchCallSchema: z.ZodObject<{
|
|
|
139
148
|
response_format: z.ZodDefault<z.ZodNativeEnum<typeof import("../types.js").ResponseFormat>>;
|
|
140
149
|
}, z.ZodTypeAny, "passthrough">>;
|
|
141
150
|
/**
|
|
142
|
-
* Schema for listing batch calls
|
|
151
|
+
* Schema for listing batch calls in a workspace.
|
|
152
|
+
* @description Validates input for the elevenlabs_list_batch_calls operation.
|
|
153
|
+
* Uses cursor-based pagination via last_doc parameter.
|
|
154
|
+
* @type {z.ZodObject}
|
|
143
155
|
*/
|
|
144
156
|
export declare const ListBatchCallsSchema: z.ZodObject<{
|
|
145
157
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
@@ -155,7 +167,10 @@ export declare const ListBatchCallsSchema: z.ZodObject<{
|
|
|
155
167
|
response_format: z.ZodDefault<z.ZodNativeEnum<typeof import("../types.js").ResponseFormat>>;
|
|
156
168
|
}, z.ZodTypeAny, "passthrough">>;
|
|
157
169
|
/**
|
|
158
|
-
* Schema for getting batch call
|
|
170
|
+
* Schema for getting detailed batch call information.
|
|
171
|
+
* @description Validates input for the elevenlabs_get_batch_call operation.
|
|
172
|
+
* Returns batch metadata and all recipient statuses.
|
|
173
|
+
* @type {z.ZodObject}
|
|
159
174
|
*/
|
|
160
175
|
export declare const GetBatchCallSchema: z.ZodObject<{
|
|
161
176
|
batch_id: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batch-calling-schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/batch-calling-schemas.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"batch-calling-schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/batch-calling-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;GAIG;AACH,eAAO,MAAM,aAAa,aAG6B,CAAC;AAExD;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;EAqBvC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAwBlB,CAAC;AAEjB;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;gCASjB,CAAC;AAEjB;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;gCAIf,CAAC"}
|
|
@@ -1,21 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Zod validation schemas for batch calling operations
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* @fileoverview Zod validation schemas for batch calling operations
|
|
3
|
+
* @description Provides strict input validation for submitting batch call jobs,
|
|
4
|
+
* listing batch calls, and retrieving batch call details. Supports up to 10,000
|
|
5
|
+
* recipients per batch with per-recipient personalization.
|
|
6
|
+
* @module schemas/batch-calling-schemas
|
|
6
7
|
*/
|
|
7
8
|
import { z } from "zod";
|
|
8
9
|
import { ResponseFormatSchema, AgentIdSchema, LimitSchema } from "./common-schemas.js";
|
|
9
10
|
import { PhoneNumberSchema, PhoneNumberIdSchema } from "./outbound-schemas.js";
|
|
10
11
|
/**
|
|
11
|
-
* Batch ID schema
|
|
12
|
+
* Batch ID validation schema.
|
|
13
|
+
* @description Validates ElevenLabs batch job identifiers.
|
|
14
|
+
* @type {z.ZodString}
|
|
12
15
|
*/
|
|
13
16
|
export const BatchIdSchema = z.string()
|
|
14
17
|
.min(1, "Batch ID is required")
|
|
15
18
|
.regex(/^[a-zA-Z0-9_-]+$/, "Batch ID must contain only alphanumeric characters, hyphens, and underscores")
|
|
16
19
|
.describe("Unique identifier for the batch call job");
|
|
17
20
|
/**
|
|
18
|
-
* Recipient schema for batch calling
|
|
21
|
+
* Recipient schema for batch calling.
|
|
22
|
+
* @description Validates a single recipient in a batch call job.
|
|
23
|
+
* Either phone_number or whatsapp_user_id must be provided.
|
|
24
|
+
* @type {z.ZodObject}
|
|
19
25
|
*/
|
|
20
26
|
export const OutboundCallRecipientSchema = z.object({
|
|
21
27
|
id: z.string()
|
|
@@ -34,7 +40,10 @@ export const OutboundCallRecipientSchema = z.object({
|
|
|
34
40
|
message: "Either phone_number or whatsapp_user_id must be provided"
|
|
35
41
|
});
|
|
36
42
|
/**
|
|
37
|
-
* Schema for submitting a batch call job
|
|
43
|
+
* Schema for submitting a batch call job.
|
|
44
|
+
* @description Validates input for the elevenlabs_submit_batch_call operation.
|
|
45
|
+
* Supports 1-10,000 recipients with optional scheduling.
|
|
46
|
+
* @type {z.ZodObject}
|
|
38
47
|
*/
|
|
39
48
|
export const SubmitBatchCallSchema = z.object({
|
|
40
49
|
call_name: z.string()
|
|
@@ -57,7 +66,10 @@ export const SubmitBatchCallSchema = z.object({
|
|
|
57
66
|
response_format: ResponseFormatSchema
|
|
58
67
|
}).passthrough();
|
|
59
68
|
/**
|
|
60
|
-
* Schema for listing batch calls
|
|
69
|
+
* Schema for listing batch calls in a workspace.
|
|
70
|
+
* @description Validates input for the elevenlabs_list_batch_calls operation.
|
|
71
|
+
* Uses cursor-based pagination via last_doc parameter.
|
|
72
|
+
* @type {z.ZodObject}
|
|
61
73
|
*/
|
|
62
74
|
export const ListBatchCallsSchema = z.object({
|
|
63
75
|
limit: LimitSchema,
|
|
@@ -68,7 +80,10 @@ export const ListBatchCallsSchema = z.object({
|
|
|
68
80
|
response_format: ResponseFormatSchema
|
|
69
81
|
}).passthrough();
|
|
70
82
|
/**
|
|
71
|
-
* Schema for getting batch call
|
|
83
|
+
* Schema for getting detailed batch call information.
|
|
84
|
+
* @description Validates input for the elevenlabs_get_batch_call operation.
|
|
85
|
+
* Returns batch metadata and all recipient statuses.
|
|
86
|
+
* @type {z.ZodObject}
|
|
72
87
|
*/
|
|
73
88
|
export const GetBatchCallSchema = z.object({
|
|
74
89
|
batch_id: BatchIdSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batch-calling-schemas.js","sourceRoot":"","sources":["../../src/schemas/batch-calling-schemas.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"batch-calling-schemas.js","sourceRoot":"","sources":["../../src/schemas/batch-calling-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE/E;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,EAAE;KACpC,GAAG,CAAC,CAAC,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AAE;SAC5B,GAAG,CAAC,yCAAyC,CAAC;SAC9C,QAAQ,CAAC,sCAAsC,CAAC;SAChD,QAAQ,EAAE;SACV,QAAQ,CAAC,oEAAoE,CAAC;IAEjF,qBAAqB,EAAE,mBAAmB;SACvC,QAAQ,EAAE;SACV,QAAQ,CAAC,6CAA6C,CAAC;IAE1D,eAAe,EAAE,oBAAoB;CACtC,CAAC,CAAC,WAAW,EAAE,CAAC;AAEjB;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,KAAK,EAAE,WAAW;IAElB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;SACjB,QAAQ,EAAE;SACV,QAAQ,EAAE;SACV,QAAQ,CAAC,0CAA0C,CAAC;IAEvD,eAAe,EAAE,oBAAoB;CACtC,CAAC,CAAC,WAAW,EAAE,CAAC;AAEjB;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,QAAQ,EAAE,aAAa;IAEvB,eAAe,EAAE,oBAAoB;CACtC,CAAC,CAAC,WAAW,EAAE,CAAC"}
|
|
@@ -1,45 +1,77 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Common Zod validation schemas
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* @fileoverview Common Zod validation schemas
|
|
3
|
+
* @description Shared schemas used across multiple tools for pagination,
|
|
4
|
+
* formatting, and common parameters. These schemas ensure consistent
|
|
5
|
+
* validation behavior across all MCP tools.
|
|
6
|
+
* @module schemas/common-schemas
|
|
6
7
|
*/
|
|
7
8
|
import { z } from "zod";
|
|
8
9
|
import { ResponseFormat } from "../types.js";
|
|
9
10
|
/**
|
|
10
|
-
* Response format schema
|
|
11
|
+
* Response format schema for MCP tool outputs.
|
|
12
|
+
* @description Validates the output format preference. Accepts 'json' for
|
|
13
|
+
* structured data or 'markdown' (default) for human-readable output.
|
|
14
|
+
* @type {z.ZodDefault<z.ZodNativeEnum<typeof ResponseFormat>>}
|
|
11
15
|
*/
|
|
12
16
|
export declare const ResponseFormatSchema: z.ZodDefault<z.ZodNativeEnum<typeof ResponseFormat>>;
|
|
13
17
|
/**
|
|
14
|
-
* Pagination limit schema
|
|
18
|
+
* Pagination limit schema.
|
|
19
|
+
* @description Validates the number of items to return in a paginated request.
|
|
20
|
+
* Enforces a range of 1 to MAX_LIMIT (100) with a default of DEFAULT_LIMIT (20).
|
|
21
|
+
* @type {z.ZodDefault<z.ZodNumber>}
|
|
15
22
|
*/
|
|
16
23
|
export declare const LimitSchema: z.ZodDefault<z.ZodNumber>;
|
|
17
24
|
/**
|
|
18
|
-
* Pagination offset schema
|
|
25
|
+
* Pagination offset schema.
|
|
26
|
+
* @description Validates the number of items to skip for pagination.
|
|
27
|
+
* Must be 0 or greater, defaults to 0.
|
|
28
|
+
* @type {z.ZodDefault<z.ZodNumber>}
|
|
19
29
|
*/
|
|
20
30
|
export declare const OffsetSchema: z.ZodDefault<z.ZodNumber>;
|
|
21
31
|
/**
|
|
22
|
-
* Agent ID schema
|
|
32
|
+
* Agent ID validation schema.
|
|
33
|
+
* @description Validates ElevenLabs agent identifiers. Must be non-empty
|
|
34
|
+
* and contain only alphanumeric characters, hyphens, and underscores.
|
|
35
|
+
* @type {z.ZodString}
|
|
36
|
+
* @example
|
|
37
|
+
* AgentIdSchema.parse("ag_abc123"); // Valid
|
|
38
|
+
* AgentIdSchema.parse(""); // Throws validation error
|
|
23
39
|
*/
|
|
24
40
|
export declare const AgentIdSchema: z.ZodString;
|
|
25
41
|
/**
|
|
26
|
-
* Conversation ID schema
|
|
42
|
+
* Conversation ID validation schema.
|
|
43
|
+
* @description Validates ElevenLabs conversation identifiers. Must be non-empty
|
|
44
|
+
* and contain only alphanumeric characters, hyphens, and underscores.
|
|
45
|
+
* @type {z.ZodString}
|
|
27
46
|
*/
|
|
28
47
|
export declare const ConversationIdSchema: z.ZodString;
|
|
29
48
|
/**
|
|
30
|
-
* Voice ID schema
|
|
49
|
+
* Voice ID validation schema.
|
|
50
|
+
* @description Validates ElevenLabs voice identifiers. Must be non-empty.
|
|
51
|
+
* @type {z.ZodString}
|
|
52
|
+
* @example
|
|
53
|
+
* VoiceIdSchema.parse("21m00Tcm4TlvDq8ikWAM"); // Valid - Rachel voice
|
|
31
54
|
*/
|
|
32
55
|
export declare const VoiceIdSchema: z.ZodString;
|
|
33
56
|
/**
|
|
34
|
-
* URL schema
|
|
57
|
+
* URL validation schema.
|
|
58
|
+
* @description Validates HTTP or HTTPS URLs.
|
|
59
|
+
* @type {z.ZodString}
|
|
35
60
|
*/
|
|
36
61
|
export declare const URLSchema: z.ZodString;
|
|
37
62
|
/**
|
|
38
|
-
*
|
|
63
|
+
* Hex color code validation schema.
|
|
64
|
+
* @description Validates CSS hex color codes in 6-character format.
|
|
65
|
+
* @type {z.ZodString}
|
|
66
|
+
* @example
|
|
67
|
+
* ColorSchema.parse("#FF5733"); // Valid
|
|
68
|
+
* ColorSchema.parse("#FFF"); // Invalid - must be 6 characters
|
|
39
69
|
*/
|
|
40
70
|
export declare const ColorSchema: z.ZodString;
|
|
41
71
|
/**
|
|
42
|
-
* Date range schema
|
|
72
|
+
* Date range filter schema.
|
|
73
|
+
* @description Optional schema for filtering by date range with ISO 8601 timestamps.
|
|
74
|
+
* @type {z.ZodOptional<z.ZodObject>}
|
|
43
75
|
*/
|
|
44
76
|
export declare const DateRangeSchema: z.ZodOptional<z.ZodObject<{
|
|
45
77
|
start: z.ZodOptional<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common-schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/common-schemas.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"common-schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/common-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,sDAIhC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,WAAW,2BAKoE,CAAC;AAE7F;;;;;GAKG;AACH,eAAO,MAAM,YAAY,2BAIyC,CAAC;AAEnE;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,aAGwC,CAAC;AAEnE;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,aAG0C,CAAC;AAE5E;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,aAEkD,CAAC;AAE7E;;;;GAIG;AACH,eAAO,MAAM,SAAS,aAEkB,CAAC;AAEzC;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,aAEuB,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;;;;;GAGwB,CAAC"}
|
|
@@ -1,20 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Common Zod validation schemas
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* @fileoverview Common Zod validation schemas
|
|
3
|
+
* @description Shared schemas used across multiple tools for pagination,
|
|
4
|
+
* formatting, and common parameters. These schemas ensure consistent
|
|
5
|
+
* validation behavior across all MCP tools.
|
|
6
|
+
* @module schemas/common-schemas
|
|
6
7
|
*/
|
|
7
8
|
import { z } from "zod";
|
|
8
9
|
import { DEFAULT_LIMIT, MAX_LIMIT } from "../constants.js";
|
|
9
10
|
import { ResponseFormat } from "../types.js";
|
|
10
11
|
/**
|
|
11
|
-
* Response format schema
|
|
12
|
+
* Response format schema for MCP tool outputs.
|
|
13
|
+
* @description Validates the output format preference. Accepts 'json' for
|
|
14
|
+
* structured data or 'markdown' (default) for human-readable output.
|
|
15
|
+
* @type {z.ZodDefault<z.ZodNativeEnum<typeof ResponseFormat>>}
|
|
12
16
|
*/
|
|
13
17
|
export const ResponseFormatSchema = z.nativeEnum(ResponseFormat, {
|
|
14
18
|
errorMap: () => ({ message: "Format must be 'json' or 'markdown'" })
|
|
15
19
|
}).default(ResponseFormat.MARKDOWN).describe("Output format: 'markdown' for human-readable or 'json' for structured data");
|
|
16
20
|
/**
|
|
17
|
-
* Pagination limit schema
|
|
21
|
+
* Pagination limit schema.
|
|
22
|
+
* @description Validates the number of items to return in a paginated request.
|
|
23
|
+
* Enforces a range of 1 to MAX_LIMIT (100) with a default of DEFAULT_LIMIT (20).
|
|
24
|
+
* @type {z.ZodDefault<z.ZodNumber>}
|
|
18
25
|
*/
|
|
19
26
|
export const LimitSchema = z.number()
|
|
20
27
|
.int("Limit must be an integer")
|
|
@@ -23,7 +30,10 @@ export const LimitSchema = z.number()
|
|
|
23
30
|
.default(DEFAULT_LIMIT)
|
|
24
31
|
.describe(`Maximum number of items to return (1-${MAX_LIMIT}, default: ${DEFAULT_LIMIT})`);
|
|
25
32
|
/**
|
|
26
|
-
* Pagination offset schema
|
|
33
|
+
* Pagination offset schema.
|
|
34
|
+
* @description Validates the number of items to skip for pagination.
|
|
35
|
+
* Must be 0 or greater, defaults to 0.
|
|
36
|
+
* @type {z.ZodDefault<z.ZodNumber>}
|
|
27
37
|
*/
|
|
28
38
|
export const OffsetSchema = z.number()
|
|
29
39
|
.int("Offset must be an integer")
|
|
@@ -31,39 +41,61 @@ export const OffsetSchema = z.number()
|
|
|
31
41
|
.default(0)
|
|
32
42
|
.describe("Number of items to skip for pagination (default: 0)");
|
|
33
43
|
/**
|
|
34
|
-
* Agent ID schema
|
|
44
|
+
* Agent ID validation schema.
|
|
45
|
+
* @description Validates ElevenLabs agent identifiers. Must be non-empty
|
|
46
|
+
* and contain only alphanumeric characters, hyphens, and underscores.
|
|
47
|
+
* @type {z.ZodString}
|
|
48
|
+
* @example
|
|
49
|
+
* AgentIdSchema.parse("ag_abc123"); // Valid
|
|
50
|
+
* AgentIdSchema.parse(""); // Throws validation error
|
|
35
51
|
*/
|
|
36
52
|
export const AgentIdSchema = z.string()
|
|
37
53
|
.min(1, "Agent ID is required")
|
|
38
54
|
.regex(/^[a-zA-Z0-9_-]+$/, "Agent ID must contain only alphanumeric characters, hyphens, and underscores")
|
|
39
55
|
.describe("Unique identifier for the agent (e.g., 'ag_abc123')");
|
|
40
56
|
/**
|
|
41
|
-
* Conversation ID schema
|
|
57
|
+
* Conversation ID validation schema.
|
|
58
|
+
* @description Validates ElevenLabs conversation identifiers. Must be non-empty
|
|
59
|
+
* and contain only alphanumeric characters, hyphens, and underscores.
|
|
60
|
+
* @type {z.ZodString}
|
|
42
61
|
*/
|
|
43
62
|
export const ConversationIdSchema = z.string()
|
|
44
63
|
.min(1, "Conversation ID is required")
|
|
45
64
|
.regex(/^[a-zA-Z0-9_-]+$/, "Conversation ID must contain only alphanumeric characters, hyphens, and underscores")
|
|
46
65
|
.describe("Unique identifier for the conversation (e.g., 'conv_xyz789')");
|
|
47
66
|
/**
|
|
48
|
-
* Voice ID schema
|
|
67
|
+
* Voice ID validation schema.
|
|
68
|
+
* @description Validates ElevenLabs voice identifiers. Must be non-empty.
|
|
69
|
+
* @type {z.ZodString}
|
|
70
|
+
* @example
|
|
71
|
+
* VoiceIdSchema.parse("21m00Tcm4TlvDq8ikWAM"); // Valid - Rachel voice
|
|
49
72
|
*/
|
|
50
73
|
export const VoiceIdSchema = z.string()
|
|
51
74
|
.min(1, "Voice ID is required")
|
|
52
75
|
.describe("ElevenLabs voice ID (e.g., '21m00Tcm4TlvDq8ikWAM' for Rachel)");
|
|
53
76
|
/**
|
|
54
|
-
* URL schema
|
|
77
|
+
* URL validation schema.
|
|
78
|
+
* @description Validates HTTP or HTTPS URLs.
|
|
79
|
+
* @type {z.ZodString}
|
|
55
80
|
*/
|
|
56
81
|
export const URLSchema = z.string()
|
|
57
82
|
.url("Must be a valid URL")
|
|
58
83
|
.describe("A valid HTTP or HTTPS URL");
|
|
59
84
|
/**
|
|
60
|
-
*
|
|
85
|
+
* Hex color code validation schema.
|
|
86
|
+
* @description Validates CSS hex color codes in 6-character format.
|
|
87
|
+
* @type {z.ZodString}
|
|
88
|
+
* @example
|
|
89
|
+
* ColorSchema.parse("#FF5733"); // Valid
|
|
90
|
+
* ColorSchema.parse("#FFF"); // Invalid - must be 6 characters
|
|
61
91
|
*/
|
|
62
92
|
export const ColorSchema = z.string()
|
|
63
93
|
.regex(/^#[0-9A-Fa-f]{6}$/, "Must be a valid hex color (e.g., #FF5733)")
|
|
64
94
|
.describe("Hex color code (e.g., '#FF5733')");
|
|
65
95
|
/**
|
|
66
|
-
* Date range schema
|
|
96
|
+
* Date range filter schema.
|
|
97
|
+
* @description Optional schema for filtering by date range with ISO 8601 timestamps.
|
|
98
|
+
* @type {z.ZodOptional<z.ZodObject>}
|
|
67
99
|
*/
|
|
68
100
|
export const DateRangeSchema = z.object({
|
|
69
101
|
start: z.string().datetime().optional().describe("Start date in ISO 8601 format"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common-schemas.js","sourceRoot":"","sources":["../../src/schemas/common-schemas.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"common-schemas.js","sourceRoot":"","sources":["../../src/schemas/common-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,UAAU,CAAC,cAAc,EAAE;IAC/D,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,qCAAqC,EAAE,CAAC;CACrE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAC1C,4EAA4E,CAC7E,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,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;GAOG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,EAAE;KAClC,KAAK,CAAC,mBAAmB,EAAE,2CAA2C,CAAC;KACvE,QAAQ,CAAC,kCAAkC,CAAC,CAAC;AAEhD;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;IACjF,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;CAC9E,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC,CAAC"}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Zod validation schemas for conversation operations
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* @fileoverview Zod validation schemas for conversation operations
|
|
3
|
+
* @description Provides strict input validation for retrieving and managing conversations.
|
|
4
|
+
* These schemas define expected input for conversation listing and retrieval.
|
|
5
|
+
* @module schemas/conversation-schemas
|
|
5
6
|
*/
|
|
6
7
|
import { z } from "zod";
|
|
7
8
|
/**
|
|
8
|
-
* Schema for
|
|
9
|
+
* Schema for retrieving a single conversation.
|
|
10
|
+
* @description Validates input for the elevenlabs_get_conversation operation.
|
|
11
|
+
* Returns full transcript and analysis data.
|
|
12
|
+
* @type {z.ZodObject}
|
|
9
13
|
*/
|
|
10
14
|
export declare const GetConversationSchema: z.ZodObject<{
|
|
11
15
|
conversation_id: z.ZodString;
|
|
@@ -18,7 +22,10 @@ export declare const GetConversationSchema: z.ZodObject<{
|
|
|
18
22
|
response_format: z.ZodDefault<z.ZodNativeEnum<typeof import("../types.js").ResponseFormat>>;
|
|
19
23
|
}, z.ZodTypeAny, "passthrough">>;
|
|
20
24
|
/**
|
|
21
|
-
* Schema for listing conversations
|
|
25
|
+
* Schema for listing conversations with filtering.
|
|
26
|
+
* @description Validates input for the elevenlabs_list_conversations operation.
|
|
27
|
+
* Supports filtering by agent, status, and date range with pagination.
|
|
28
|
+
* @type {z.ZodObject}
|
|
22
29
|
*/
|
|
23
30
|
export declare const ListConversationsSchema: z.ZodObject<{
|
|
24
31
|
agent_id: z.ZodOptional<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/conversation-schemas.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"conversation-schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/conversation-schemas.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;gCAGlB,CAAC;AAEjB;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAgBpB,CAAC"}
|