UNPKG

vapi-typescript-sdk

Version:
905 lines 460 kB
/** * This file was auto-generated by openapi-typescript. * Do not make direct changes to the file. */ export interface paths { "/call": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** List Calls */ get: operations["CallController_findAll"]; put?: never; /** Create Call */ post: operations["CallController_create"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/call/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** Get Call */ get: operations["CallController_findOne"]; put?: never; post?: never; /** Delete Call Data */ delete: operations["CallController_deleteCallData"]; options?: never; head?: never; /** Update Call */ patch: operations["CallController_update"]; trace?: never; }; "/assistant": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** List Assistants */ get: operations["AssistantController_findAll"]; put?: never; /** Create Assistant */ post: operations["AssistantController_create"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/assistant/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** Get Assistant */ get: operations["AssistantController_findOne"]; put?: never; post?: never; /** Delete Assistant */ delete: operations["AssistantController_remove"]; options?: never; head?: never; /** Update Assistant */ patch: operations["AssistantController_update"]; trace?: never; }; "/phone-number": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** List Phone Numbers */ get: operations["PhoneNumberController_findAll"]; put?: never; /** Create Phone Number */ post: operations["PhoneNumberController_create"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/phone-number/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** Get Phone Number */ get: operations["PhoneNumberController_findOne"]; put?: never; post?: never; /** Delete Phone Number */ delete: operations["PhoneNumberController_remove"]; options?: never; head?: never; /** Update Phone Number */ patch: operations["PhoneNumberController_update"]; trace?: never; }; "/squad": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** List Squads */ get: operations["SquadController_findAll"]; put?: never; /** Create Squad */ post: operations["SquadController_create"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/squad/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** Get Squad */ get: operations["SquadController_findOne"]; put?: never; post?: never; /** Delete Squad */ delete: operations["SquadController_remove"]; options?: never; head?: never; /** Update Squad */ patch: operations["SquadController_update"]; trace?: never; }; "/block": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** List Blocks */ get: operations["BlockController_findAll"]; put?: never; /** Create Block */ post: operations["BlockController_create"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/block/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** Get Block */ get: operations["BlockController_findOne"]; put?: never; post?: never; /** Delete Block */ delete: operations["BlockController_remove"]; options?: never; head?: never; /** Update Block */ patch: operations["BlockController_update"]; trace?: never; }; "/tool": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** List Tools */ get: operations["ToolController_findAll"]; put?: never; /** Create Tool */ post: operations["ToolController_create"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/tool/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** Get Tool */ get: operations["ToolController_findOne"]; put?: never; post?: never; /** Delete Tool */ delete: operations["ToolController_remove"]; options?: never; head?: never; /** Update Tool */ patch: operations["ToolController_update"]; trace?: never; }; "/file": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** List Files */ get: operations["FileController_findAll"]; put?: never; /** Upload File */ post: operations["FileController_create"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; "/file/{id}": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; /** Get File */ get: operations["FileController_findOne"]; put?: never; post?: never; /** Delete File */ delete: operations["FileController_remove"]; options?: never; head?: never; /** Update File */ patch: operations["FileController_update"]; trace?: never; }; "/analytics": { parameters: { query?: never; header?: never; path?: never; cookie?: never; }; get?: never; put?: never; /** Create Analytics Queries */ post: operations["AnalyticsController_query"]; delete?: never; options?: never; head?: never; patch?: never; trace?: never; }; } export type webhooks = Record<string, never>; export interface components { schemas: { DeepgramTranscriber: { /** * @description This is the transcription provider that will be used. * @enum {string} */ provider: "deepgram"; /** @description This is the Deepgram model that will be used. A list of models can be found here: https://developers.deepgram.com/docs/models-languages-overview */ model?: ("nova-2" | "nova-2-general" | "nova-2-meeting" | "nova-2-phonecall" | "nova-2-finance" | "nova-2-conversationalai" | "nova-2-voicemail" | "nova-2-video" | "nova-2-medical" | "nova-2-drivethru" | "nova-2-automotive" | "nova" | "nova-general" | "nova-phonecall" | "nova-medical" | "enhanced" | "enhanced-general" | "enhanced-meeting" | "enhanced-phonecall" | "enhanced-finance" | "base" | "base-general" | "base-meeting" | "base-phonecall" | "base-finance" | "base-conversationalai" | "base-voicemail" | "base-video") | string; /** * @description This is the language that will be set for the transcription. The list of languages Deepgram supports can be found here: https://developers.deepgram.com/docs/models-languages-overview * @enum {string} */ language?: "bg" | "ca" | "cs" | "da" | "da-DK" | "de" | "de-CH" | "el" | "en" | "en-AU" | "en-GB" | "en-IN" | "en-NZ" | "en-US" | "es" | "es-419" | "es-LATAM" | "et" | "fi" | "fr" | "fr-CA" | "hi" | "hi-Latn" | "hu" | "id" | "it" | "ja" | "ko" | "ko-KR" | "lt" | "lv" | "ms" | "multi" | "nl" | "nl-BE" | "no" | "pl" | "pt" | "pt-BR" | "ro" | "ru" | "sk" | "sv" | "sv-SE" | "ta" | "taq" | "th" | "th-TH" | "tr" | "uk" | "vi" | "zh" | "zh-CN" | "zh-Hans" | "zh-Hant" | "zh-TW"; /** * @description This will be use smart format option provided by Deepgram. It's default disabled because it can sometimes format numbers as times but it's getting better. * @example false */ smartFormat?: boolean; /** @description These keywords are passed to the transcription model to help it pick up use-case specific words. Anything that may not be a common word, like your company name, should be added here. */ keywords?: string[]; /** @description This is the timeout after which Deepgram will send transcription on user silence. You can read in-depth documentation here: https://developers.deepgram.com/docs/endpointing. * * Here are the most important bits: * - Defaults to 10. This is recommended for most use cases to optimize for latency. * - 10 can cause some missing transcriptions since because of the shorter context. This mostly happens for one-word utterances. For those uses cases, it's recommended to try 300. It will add a bit of latency but the quality and reliability of the experience will be better. * - If neither 10 nor 300 work, contact support@vapi.ai and we'll find another solution. * * @default 10 */ endpointing?: number; }; TalkscriberTranscriber: { /** * @description This is the transcription provider that will be used. * @enum {string} */ provider: "talkscriber"; /** * @description This is the model that will be used for the transcription. * @enum {string} */ model?: "whisper"; /** * @description This is the language that will be set for the transcription. The list of languages Whisper supports can be found here: https://github.com/openai/whisper/blob/main/whisper/tokenizer.py * @enum {string} */ language?: "en" | "zh" | "de" | "es" | "ru" | "ko" | "fr" | "ja" | "pt" | "tr" | "pl" | "ca" | "nl" | "ar" | "sv" | "it" | "id" | "hi" | "fi" | "vi" | "he" | "uk" | "el" | "ms" | "cs" | "ro" | "da" | "hu" | "ta" | "no" | "th" | "ur" | "hr" | "bg" | "lt" | "la" | "mi" | "ml" | "cy" | "sk" | "te" | "fa" | "lv" | "bn" | "sr" | "az" | "sl" | "kn" | "et" | "mk" | "br" | "eu" | "is" | "hy" | "ne" | "mn" | "bs" | "kk" | "sq" | "sw" | "gl" | "mr" | "pa" | "si" | "km" | "sn" | "yo" | "so" | "af" | "oc" | "ka" | "be" | "tg" | "sd" | "gu" | "am" | "yi" | "lo" | "uz" | "fo" | "ht" | "ps" | "tk" | "nn" | "mt" | "sa" | "lb" | "my" | "bo" | "tl" | "mg" | "as" | "tt" | "haw" | "ln" | "ha" | "ba" | "jw" | "su" | "yue"; }; GladiaTranscriber: { /** * @description This is the transcription provider that will be used. * @enum {string} */ provider: "gladia"; /** @description This is the Gladia model that will be used. Default is 'fast' */ model?: "fast" | "accurate"; /** @description Defines how the transcription model detects the audio language. Default value is 'automatic single language'. */ languageBehaviour?: "manual" | "automatic single language" | "automatic multiple languages"; /** * @description Defines the language to use for the transcription. Required when languageBehaviour is 'manual'. * @enum {string} */ language?: "af" | "sq" | "am" | "ar" | "hy" | "as" | "az" | "ba" | "eu" | "be" | "bn" | "bs" | "br" | "bg" | "ca" | "zh" | "hr" | "cs" | "da" | "nl" | "en" | "et" | "fo" | "fi" | "fr" | "gl" | "ka" | "de" | "el" | "gu" | "ht" | "ha" | "haw" | "he" | "hi" | "hu" | "is" | "id" | "it" | "ja" | "jp" | "jv" | "kn" | "kk" | "km" | "ko" | "lo" | "la" | "lv" | "ln" | "lt" | "lb" | "mk" | "mg" | "ms" | "ml" | "mt" | "mi" | "mr" | "mn" | "mymr" | "ne" | "no" | "nn" | "oc" | "ps" | "fa" | "pl" | "pt" | "pa" | "ro" | "ru" | "sa" | "sr" | "sn" | "sd" | "si" | "sk" | "sl" | "so" | "es" | "su" | "sw" | "sv" | "tl" | "tg" | "ta" | "tt" | "te" | "th" | "bo" | "tr" | "tk" | "uk" | "ur" | "uz" | "vi" | "cy" | "yi" | "yo"; /** * @description Provides a custom vocabulary to the model to improve accuracy of transcribing context specific words, technical terms, names, etc. If empty, this argument is ignored. * ⚠️ Warning ⚠️: Please be aware that the transcription_hint field has a character limit of 600. If you provide a transcription_hint longer than 600 characters, it will be automatically truncated to meet this limit. * @example custom vocabulary */ transcriptionHint?: string; /** * @description If prosody is true, you will get a transcription that can contain prosodies i.e. (laugh) (giggles) (malefic laugh) (toss) (music)… Default value is false. * @example false */ prosody?: boolean; /** * @description If true, audio will be pre-processed to improve accuracy but latency will increase. Default value is false. * @example false */ audioEnhancer?: boolean; }; Condition: { /** @description This is the value you want to compare against the parameter. */ value: string; /** * @description This is the operator you want to use to compare the parameter and value. * @enum {string} */ operator: "eq" | "neq" | "gt" | "gte" | "lt" | "lte"; /** @description This is the name of the parameter that you want to check. */ param: string; }; ToolMessageStart: { /** * @description This message is triggered when the tool call starts. * * This message is never triggered for async tools. * * If this message is not provided, one of the default filler messages "Hold on a sec", "One moment", "Just a sec", "Give me a moment" or "This'll just take a sec" will be used. * @enum {string} */ type: "request-start"; /** @description This is the content that the assistant says when this message is triggered. */ content: string; /** @description This is an optional array of conditions that the tool call arguments must meet in order for this message to be triggered. */ conditions?: components["schemas"]["Condition"][]; }; ToolMessageComplete: { /** * @description This message is triggered when the tool call is complete. * * This message is triggered immediately without waiting for your server to respond for async tool calls. * * If this message is not provided, the model will be requested to respond. * * If this message is provided, only this message will be spoken and the model will not be requested to come up with a response. It's an exclusive OR. * @enum {string} */ type: "request-complete"; /** * @description This is optional and defaults to "assistant". * * When role=assistant, `content` is said out loud. * * When role=system, `content` is passed to the model in a system message. Example: * system: default one * assistant: * user: * assistant: * user: * assistant: * user: * assistant: tool called * tool: your server response * <--- system prompt as hint * ---> model generates response which is spoken * This is useful when you want to provide a hint to the model about what to say next. * @enum {string} */ role?: "assistant" | "system"; /** * @description This is an optional boolean that if true, the call will end after the message is spoken. Default is false. * * This is ignored if `role` is set to `system`. * * @default false * @example false */ endCallAfterSpokenEnabled?: boolean; /** @description This is the content that the assistant says when this message is triggered. */ content: string; /** @description This is an optional array of conditions that the tool call arguments must meet in order for this message to be triggered. */ conditions?: components["schemas"]["Condition"][]; }; ToolMessageFailed: { /** * @description This message is triggered when the tool call fails. * * This message is never triggered for async tool calls. * * If this message is not provided, the model will be requested to respond. * * If this message is provided, only this message will be spoken and the model will not be requested to come up with a response. It's an exclusive OR. * @enum {string} */ type: "request-failed"; /** * @description This is an optional boolean that if true, the call will end after the message is spoken. Default is false. * * @default false * @example false */ endCallAfterSpokenEnabled?: boolean; /** @description This is the content that the assistant says when this message is triggered. */ content: string; /** @description This is an optional array of conditions that the tool call arguments must meet in order for this message to be triggered. */ conditions?: components["schemas"]["Condition"][]; }; ToolMessageDelayed: { /** * @description This message is triggered when the tool call is delayed. * * There are the two things that can trigger this message: * 1. The user talks with the assistant while your server is processing the request. Default is "Sorry, a few more seconds." * 2. The server doesn't respond within `timingMilliseconds`. * * This message is never triggered for async tool calls. * @enum {string} */ type: "request-response-delayed"; /** * @description The number of milliseconds to wait for the server response before saying this message. * @example 1000 */ timingMilliseconds?: number; /** @description This is the content that the assistant says when this message is triggered. */ content: string; /** @description This is an optional array of conditions that the tool call arguments must meet in order for this message to be triggered. */ conditions?: components["schemas"]["Condition"][]; }; JsonSchema: { /** * @description This is the type of output you'd like. * * `string`, `number`, `integer`, `boolean` are the primitive types and should be obvious. * * `array` and `object` are more interesting and quite powerful. They allow you to define nested structures. * * For `array`, you can define the schema of the items in the array using the `items` property. * * For `object`, you can define the properties of the object using the `properties` property. * @enum {string} */ type: "string" | "number" | "integer" | "boolean" | "array" | "object"; /** @description This is required if the type is "array". This is the schema of the items in the array. * * This is of type JsonSchema. However, Swagger doesn't support circular references. */ items?: Record<string, never>; /** @description This is required if the type is "object". This specifies the properties of the object. * * This is a map of string to JsonSchema. However, Swagger doesn't support circular references. */ properties?: Record<string, never>; /** @description This is the description to help the model understand what it needs to output. */ description?: string; /** @description This is a list of properties that are required. * * This only makes sense if the type is "object". */ required?: string[]; }; OpenAIFunctionParameters: { /** * @description This must be set to 'object'. It instructs the model to return a JSON object containing the function call properties. * @enum {string} */ type: "object"; /** @description This provides a description of the properties required by the function. * JSON Schema can be used to specify expectations for each property. * Refer to [this doc](https://ajv.js.org/json-schema.html#json-data-type) for a comprehensive guide on JSON Schema. */ properties: { [key: string]: components["schemas"]["JsonSchema"] | undefined; }; /** @description This specifies the properties that are required by the function. */ required?: string[]; }; OpenAIFunction: { /** @description This is the the name of the function to be called. * * Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. */ name: string; description?: string; /** @description These are the parameters the functions accepts, described as a JSON Schema object. * * See the [OpenAI guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema) for documentation about the format. * * Omitting parameters defines a function with an empty parameter list. */ parameters?: components["schemas"]["OpenAIFunctionParameters"]; }; Server: { /** * @description This is the timeout in seconds for the request to your server. Defaults to 20 seconds. * * @default 20 * @example 20 */ timeoutSeconds?: number; /** @description API endpoint to send requests to. */ url: string; /** @description This is the secret you can set that Vapi will send with every request to your server. Will be sent as a header called x-vapi-secret. * * Same precedence logic as server. */ secret?: string; }; CreateDtmfToolDTO: { /** * @description This determines if the tool is async. * * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. * * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. * * Defaults to synchronous (`false`). * @example false */ async?: boolean; /** @description These are the messages that will be spoken to the user as the tool is running. * * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. */ messages?: (components["schemas"]["ToolMessageStart"] | components["schemas"]["ToolMessageComplete"] | components["schemas"]["ToolMessageFailed"] | components["schemas"]["ToolMessageDelayed"])[]; /** * @description The type of tool. "dtmf" for DTMF tool. (enum property replaced by openapi-typescript) * @enum {string} */ type: "dtmf"; /** @description This is the function definition of the tool. * * For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases. * * An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument. */ function?: components["schemas"]["OpenAIFunction"]; /** @description This is the server that will be hit when this tool is requested by the model. * * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation. * * This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl. */ server?: components["schemas"]["Server"]; }; CreateEndCallToolDTO: { /** * @description This determines if the tool is async. * * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. * * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. * * Defaults to synchronous (`false`). * @example false */ async?: boolean; /** @description These are the messages that will be spoken to the user as the tool is running. * * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. */ messages?: (components["schemas"]["ToolMessageStart"] | components["schemas"]["ToolMessageComplete"] | components["schemas"]["ToolMessageFailed"] | components["schemas"]["ToolMessageDelayed"])[]; /** * @description The type of tool. "endCall" for End Call tool. (enum property replaced by openapi-typescript) * @enum {string} */ type: "endCall"; /** @description This is the function definition of the tool. * * For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases. * * An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument. */ function?: components["schemas"]["OpenAIFunction"]; /** @description This is the server that will be hit when this tool is requested by the model. * * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation. * * This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl. */ server?: components["schemas"]["Server"]; }; CreateVoicemailToolDTO: { /** * @description This determines if the tool is async. * * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. * * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. * * Defaults to synchronous (`false`). * @example false */ async?: boolean; /** @description These are the messages that will be spoken to the user as the tool is running. * * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. */ messages?: (components["schemas"]["ToolMessageStart"] | components["schemas"]["ToolMessageComplete"] | components["schemas"]["ToolMessageFailed"] | components["schemas"]["ToolMessageDelayed"])[]; /** * @description The type of tool. "voicemail". This uses the model itself to determine if a voicemil was reached. Can be used alternatively/alongside with TwilioVoicemailDetection * @enum {string} */ type: "voicemail"; /** @description This is the function definition of the tool. * * For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases. * * An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument. */ function?: components["schemas"]["OpenAIFunction"]; /** @description This is the server that will be hit when this tool is requested by the model. * * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation. * * This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl. */ server?: components["schemas"]["Server"]; }; CreateFunctionToolDTO: { /** * @description This determines if the tool is async. * * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. * * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. * * Defaults to synchronous (`false`). * @example false */ async?: boolean; /** @description These are the messages that will be spoken to the user as the tool is running. * * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. */ messages?: (components["schemas"]["ToolMessageStart"] | components["schemas"]["ToolMessageComplete"] | components["schemas"]["ToolMessageFailed"] | components["schemas"]["ToolMessageDelayed"])[]; /** * @description The type of tool. "function" for Function tool. (enum property replaced by openapi-typescript) * @enum {string} */ type: "function"; /** @description This is the function definition of the tool. * * For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases. * * An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument. */ function?: components["schemas"]["OpenAIFunction"]; /** @description This is the server that will be hit when this tool is requested by the model. * * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation. * * This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl. */ server?: components["schemas"]["Server"]; }; GhlToolMetadata: { workflowId?: string; locationId?: string; }; CreateGhlToolDTO: { /** * @description This determines if the tool is async. * * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. * * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. * * Defaults to synchronous (`false`). * @example false */ async?: boolean; /** @description These are the messages that will be spoken to the user as the tool is running. * * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. */ messages?: (components["schemas"]["ToolMessageStart"] | components["schemas"]["ToolMessageComplete"] | components["schemas"]["ToolMessageFailed"] | components["schemas"]["ToolMessageDelayed"])[]; /** * @description The type of tool. "ghl" for GHL tool. (enum property replaced by openapi-typescript) * @enum {string} */ type: "ghl"; metadata: components["schemas"]["GhlToolMetadata"]; /** @description This is the function definition of the tool. * * For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases. * * An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument. */ function?: components["schemas"]["OpenAIFunction"]; /** @description This is the server that will be hit when this tool is requested by the model. * * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation. * * This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl. */ server?: components["schemas"]["Server"]; }; MakeToolMetadata: { scenarioId?: number; triggerHookId?: number; }; CreateMakeToolDTO: { /** * @description This determines if the tool is async. * * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. * * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. * * Defaults to synchronous (`false`). * @example false */ async?: boolean; /** @description These are the messages that will be spoken to the user as the tool is running. * * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. */ messages?: (components["schemas"]["ToolMessageStart"] | components["schemas"]["ToolMessageComplete"] | components["schemas"]["ToolMessageFailed"] | components["schemas"]["ToolMessageDelayed"])[]; /** * @description The type of tool. "make" for Make tool. (enum property replaced by openapi-typescript) * @enum {string} */ type: "make"; metadata: components["schemas"]["MakeToolMetadata"]; /** @description This is the function definition of the tool. * * For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases. * * An example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument "reason". Then, in `messages` array, you can have many "request-complete" messages. One of these messages will be triggered if the `messages[].conditions` matches the "reason" argument. */ function?: components["schemas"]["OpenAIFunction"]; /** @description This is the server that will be hit when this tool is requested by the model. * * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation. * * This overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl. */ server?: components["schemas"]["Server"]; }; TransferDestinationAssistant: { /** @enum {string} */ type: "assistant"; /** * @description This is the mode to use for the transfer. Default is `rolling-history`. * * - `rolling-history`: This is the default mode. It keeps the entire conversation history and appends the new assistant's system message on transfer. * * Example: * * Pre-transfer: * system: assistant1 system message * assistant: assistant1 first message * user: hey, good morning * assistant: how can i help? * user: i need help with my account * assistant: (destination.message) * * Post-transfer: * system: assistant1 system message * assistant: assistant1 first message * user: hey, good morning * assistant: how can i help? * user: i need help with my account * assistant: (destination.message) * system: assistant2 system message * assistant: assistant2 first message (or model generated if firstMessageMode is set to `assistant-speaks-first-with-model-generated-message`) * * - `swap-system-message-in-history`: This replaces the original system message with the new assistant's system message on transfer. * * Example: * * Pre-transfer: * system: assistant1 system message * assistant: assistant1 first message * user: hey, good morning * assistant: how can i help? * user: i need help with my account * assistant: (destination.message) * * Post-transfer: * system: assistant2 system message * assistant: assistant1 first message * user: hey, good morning * assistant: how can i help? * user: i need help with my account * assistant: (destination.message) * assistant: assistant2 first message (or model generated if firstMessageMode is set to `assistant-speaks-first-with-model-generated-message`) * @enum {string} */ transferMode?: "rolling-history" | "swap-system-message-in-history"; /** @description This is the assistant to transfer the call to. */ assistantName: string; /** @description This is the message to say before transferring the call to the destination. * * If this is not provided and transfer tool messages is not provided, default is "Transferring the call now". * * If set to "", nothing is spoken. This is useful when you want to silently transfer. This is especially useful when transferring between assistants in a squad. In this scenario, you likely also want to set `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message` for the destination assistant. */ message?: string; /** @description This is the description of the destination, used by the AI to choose when and how to transfer the call. */ description?: string; }; TransferDestinationStep: { /** @enum {string} */ type: "step"; /** @description This is the step to transfer to. */ stepName: string; /** @description This is the message to say before transferring the call to the destination. * * If this is not provided and transfer tool messages is not provided, default is "Transferring the call now". * * If set to "", nothing is spoken. This is useful when you want to silently transfer. This is especially useful when transferring between assistants in a squad. In this scenario, you likely also want to set `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message` for the destination assistant. */ message?: string; /** @description This is the description of the destination, used by the AI to choose when and how to transfer the call. */ description?: string; }; TransferDestinationNumber: { /** @enum {string} */ type: "number"; /** * @description This is the flag to toggle the E164 check for the `number` field. This is an advanced property which should be used if you know your use case requires it. * * Use cases: * - `false`: To allow non-E164 numbers like `+001234567890`, `1234', or `abc`. This is useful for dialing out to non-E164 numbers on your SIP trunks. * - `true` (default): To allow only E164 numbers like `+14155551234`. This is for most standard PSTN calls. * * If `false`, the `number` is still required to only contain alphanumeric characters (regex: `/^\+?[a-zA-Z0-9]+$/`). * * @default true (E164 check is enabled) * @default true */ numberE164CheckEnabled: boolean; /** @description This is the phone number to transfer the call to. */ number: string; /** @description This is the extension to dial after transferring the call to the `number`. */ extension?: string; /** @description This is the message to say before transferring the call to the destination. * * If this is not provided and transfer tool messages is not provided, default is "Transferring the call now". * * If set to "", nothing is spoken. This is useful when you want to silently transfer. This is especially useful when transferring between assistants in a squad. In this scenario, you likely also want to set `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message` for the destination assistant. */ message?: string; /** @description This is the description of the destination, used by the AI to choose when and how to transfer the call. */ description?: string; }; TransferDestinationSip: { /** @enum {string} */ type: "sip"; /** @description This is the SIP URI to transfer the call to. */ sipUri: string; /** @description This is the message to say before transferring the call to the destination. * * If this is not provided and transfer tool messages is not provided, default is "Transferring the call now". * * If set to "", nothing is spoken. This is useful when you want to silently transfer. This is especially useful when transferring between assistants in a squad. In this scenario, you likely also want to set `assistant.firstMessageMode=assistant-speaks-first-with-model-generated-message` for the destination assistant. */ message?: string; /** @description This is the description of the destination, used by the AI to choose when and how to transfer the call. */ description?: string; }; CreateTransferCallToolDTO: { /** * @description This determines if the tool is async. * * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server. * * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server. * * Defaults to synchronous (`false`). * @example false */ async?: boolean; /** @description These are the messages that will be spoken to the user as the tool is running. * * For some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured. */ messages?: (components["schemas"]["ToolMessageStart"] | components["schemas"]["ToolMessageComplete"] | components["schemas"]["ToolMessageFailed"] | components["schemas"]["ToolMessageDelayed"])[]; /