diff --git a/src/api/types/AssistantMessage.ts b/src/api/types/AssistantMessage.ts new file mode 100644 index 0000000..0a77d1e --- /dev/null +++ b/src/api/types/AssistantMessage.ts @@ -0,0 +1,18 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vapi from "../index"; + +export interface AssistantMessage { + /** This is the role of the message author */ + role: "assistant"; + /** This is the content of the assistant message */ + content?: string; + /** This is the refusal message generated by the model */ + refusal?: string; + /** This is the tool calls generated by the model */ + tool_calls?: Vapi.ToolCall[]; + /** This is an optional name for the participant */ + name?: string; +} diff --git a/src/api/types/BashTool.ts b/src/api/types/BashTool.ts index 21f835a..6deea17 100644 --- a/src/api/types/BashTool.ts +++ b/src/api/types/BashTool.ts @@ -24,6 +24,17 @@ export interface BashTool { type: "bash"; /** The sub type of tool. */ subType: "bash_20241022"; + /** + * This is the server where a `tool-calls` webhook will be sent. + * + * Notes: + * - Webhook is sent to this server when a tool call is made. + * - Webhook contains the call, assistant, and phone number objects. + * - Webhook contains the variables set on the assistant. + * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + * - Webhook expects a response with tool call result. + */ + server?: Vapi.Server; /** This is the unique identifier for the tool. */ id: string; /** This is the unique identifier for the organization that this tool belongs to. */ @@ -40,14 +51,6 @@ export interface BashTool { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; /** The name of the tool, fixed to 'bash' */ name: "bash"; } diff --git a/src/api/types/BashToolWithToolCall.ts b/src/api/types/BashToolWithToolCall.ts index 285a3cb..ce330cf 100644 --- a/src/api/types/BashToolWithToolCall.ts +++ b/src/api/types/BashToolWithToolCall.ts @@ -25,6 +25,17 @@ export interface BashToolWithToolCall { type: "bash"; /** The sub type of tool. */ subType: "bash_20241022"; + /** + * This is the server where a `tool-calls` webhook will be sent. + * + * Notes: + * - Webhook is sent to this server when a tool call is made. + * - Webhook contains the call, assistant, and phone number objects. + * - Webhook contains the variables set on the assistant. + * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + * - Webhook expects a response with tool call result. + */ + server?: Vapi.Server; toolCall: Vapi.ToolCall; /** The name of the tool, fixed to 'bash' */ name: "bash"; @@ -36,12 +47,4 @@ export interface BashToolWithToolCall { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/Chat.ts b/src/api/types/Chat.ts new file mode 100644 index 0000000..a61900e --- /dev/null +++ b/src/api/types/Chat.ts @@ -0,0 +1,44 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vapi from "../index"; + +export interface Chat { + /** This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. */ + assistantId?: string; + /** This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. */ + assistant?: Vapi.CreateAssistantDto; + /** This is the name of the chat. This is just for your own reference. */ + name?: string; + /** + * This is the ID of the session that will be used for the chat. + * Mutually exclusive with previousChatId. + */ + sessionId?: string; + /** Chat input as a string or an array of messages. When using message array, each message requires a role and content. */ + input?: Vapi.ChatInput; + /** + * This is a flag that determines whether the response should be streamed. + * When true, the response will be sent as chunks of text. + */ + stream?: boolean; + /** + * This is the ID of the chat that will be used as context for the new chat. + * The messages from the previous chat will be used as context. + * Mutually exclusive with sessionId. + */ + previousChatId?: string; + /** This is the unique identifier for the chat. */ + id: string; + /** This is the unique identifier for the org that this chat belongs to. */ + orgId: string; + /** Array of messages used as context for the chat */ + messages?: Vapi.ChatMessagesItem[]; + /** Output messages generated by the system in response to the input */ + output?: Vapi.ChatOutputItem[]; + /** This is the ISO 8601 date-time string of when the chat was created. */ + createdAt: string; + /** This is the ISO 8601 date-time string of when the chat was last updated. */ + updatedAt: string; +} diff --git a/src/api/types/ChatCompletionMessageMetadata.ts b/src/api/types/ChatCompletionMessageMetadata.ts deleted file mode 100644 index bf44d11..0000000 --- a/src/api/types/ChatCompletionMessageMetadata.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface ChatCompletionMessageMetadata { - taskName: string; - taskType: string; - taskOutput: string; - taskState?: Record; - nodeTrace?: string[]; -} diff --git a/src/api/types/ChatCompletionMessageWorkflows.ts b/src/api/types/ChatCompletionMessageWorkflows.ts deleted file mode 100644 index 29e381c..0000000 --- a/src/api/types/ChatCompletionMessageWorkflows.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Vapi from "../index"; - -export interface ChatCompletionMessageWorkflows { - role: Record; - content?: string | null; - metadata?: Vapi.ChatCompletionMessageMetadata; -} diff --git a/src/api/types/ChatCompletionsDto.ts b/src/api/types/ChatCompletionsDto.ts deleted file mode 100644 index 1440244..0000000 --- a/src/api/types/ChatCompletionsDto.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Vapi from "../index"; - -export interface ChatCompletionsDto { - messages: Vapi.ChatCompletionMessageWorkflows[]; - workflowId?: string; - workflow?: Vapi.CreateWorkflowDto; -} diff --git a/src/api/types/ChatInput.ts b/src/api/types/ChatInput.ts new file mode 100644 index 0000000..a813a88 --- /dev/null +++ b/src/api/types/ChatInput.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vapi from "../index"; + +/** + * Chat input as a string or an array of messages. When using message array, each message requires a role and content. + */ +export type ChatInput = string | Vapi.ChatInputItem[]; diff --git a/src/api/types/ChatInputItem.ts b/src/api/types/ChatInputItem.ts new file mode 100644 index 0000000..0cfc9ad --- /dev/null +++ b/src/api/types/ChatInputItem.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vapi from "../index"; + +export type ChatInputItem = + | Vapi.SystemMessage + | Vapi.UserMessage + | Vapi.AssistantMessage + | Vapi.ToolMessage + | Vapi.DeveloperMessage; diff --git a/src/api/types/ChatMessagesItem.ts b/src/api/types/ChatMessagesItem.ts new file mode 100644 index 0000000..4011d5b --- /dev/null +++ b/src/api/types/ChatMessagesItem.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vapi from "../index"; + +export type ChatMessagesItem = + | Vapi.SystemMessage + | Vapi.UserMessage + | Vapi.AssistantMessage + | Vapi.ToolMessage + | Vapi.DeveloperMessage; diff --git a/src/api/types/ChatOutputItem.ts b/src/api/types/ChatOutputItem.ts new file mode 100644 index 0000000..e332130 --- /dev/null +++ b/src/api/types/ChatOutputItem.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vapi from "../index"; + +export type ChatOutputItem = + | Vapi.SystemMessage + | Vapi.UserMessage + | Vapi.AssistantMessage + | Vapi.ToolMessage + | Vapi.DeveloperMessage; diff --git a/src/api/types/ChatPaginatedResponse.ts b/src/api/types/ChatPaginatedResponse.ts new file mode 100644 index 0000000..6bc7ae6 --- /dev/null +++ b/src/api/types/ChatPaginatedResponse.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vapi from "../index"; + +export interface ChatPaginatedResponse { + results: Vapi.Chat[]; + metadata: Vapi.PaginationMeta; +} diff --git a/src/api/types/ChatServiceResponse.ts b/src/api/types/ChatServiceResponse.ts deleted file mode 100644 index e84a8a1..0000000 --- a/src/api/types/ChatServiceResponse.ts +++ /dev/null @@ -1,5 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -export interface ChatServiceResponse {} diff --git a/src/api/types/ComputerTool.ts b/src/api/types/ComputerTool.ts index 8619971..12a3f64 100644 --- a/src/api/types/ComputerTool.ts +++ b/src/api/types/ComputerTool.ts @@ -24,6 +24,17 @@ export interface ComputerTool { type: "computer"; /** The sub type of tool. */ subType: "computer_20241022"; + /** + * This is the server where a `tool-calls` webhook will be sent. + * + * Notes: + * - Webhook is sent to this server when a tool call is made. + * - Webhook contains the call, assistant, and phone number objects. + * - Webhook contains the variables set on the assistant. + * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + * - Webhook expects a response with tool call result. + */ + server?: Vapi.Server; /** This is the unique identifier for the tool. */ id: string; /** This is the unique identifier for the organization that this tool belongs to. */ @@ -40,14 +51,6 @@ export interface ComputerTool { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; /** The name of the tool, fixed to 'computer' */ name: "computer"; /** The display width in pixels */ diff --git a/src/api/types/ComputerToolWithToolCall.ts b/src/api/types/ComputerToolWithToolCall.ts index 2e21ad4..f8d4506 100644 --- a/src/api/types/ComputerToolWithToolCall.ts +++ b/src/api/types/ComputerToolWithToolCall.ts @@ -25,6 +25,17 @@ export interface ComputerToolWithToolCall { type: "computer"; /** The sub type of tool. */ subType: "computer_20241022"; + /** + * This is the server where a `tool-calls` webhook will be sent. + * + * Notes: + * - Webhook is sent to this server when a tool call is made. + * - Webhook contains the call, assistant, and phone number objects. + * - Webhook contains the variables set on the assistant. + * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + * - Webhook expects a response with tool call result. + */ + server?: Vapi.Server; toolCall: Vapi.ToolCall; /** The name of the tool, fixed to 'computer' */ name: "computer"; @@ -42,12 +53,4 @@ export interface ComputerToolWithToolCall { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/CreateApiRequestToolDto.ts b/src/api/types/CreateApiRequestToolDto.ts index 1e1511f..3b1688f 100644 --- a/src/api/types/CreateApiRequestToolDto.ts +++ b/src/api/types/CreateApiRequestToolDto.ts @@ -37,7 +37,7 @@ export interface CreateApiRequestToolDto { /** This is where the request will be sent. */ url: string; /** This is the body of the request. */ - body: Vapi.JsonSchema; + body?: Vapi.JsonSchema; /** These are the headers to send in the request. */ headers?: Vapi.JsonSchema; /** @@ -54,12 +54,4 @@ export interface CreateApiRequestToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/CreateBashToolDto.ts b/src/api/types/CreateBashToolDto.ts index 45d20fa..e5e5a5a 100644 --- a/src/api/types/CreateBashToolDto.ts +++ b/src/api/types/CreateBashToolDto.ts @@ -24,6 +24,17 @@ export interface CreateBashToolDto { type: "bash"; /** The sub type of tool. */ subType: "bash_20241022"; + /** + * This is the server where a `tool-calls` webhook will be sent. + * + * Notes: + * - Webhook is sent to this server when a tool call is made. + * - Webhook contains the call, assistant, and phone number objects. + * - Webhook contains the variables set on the assistant. + * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + * - Webhook expects a response with tool call result. + */ + server?: Vapi.Server; /** The name of the tool, fixed to 'bash' */ name: "bash"; /** @@ -34,12 +45,4 @@ export interface CreateBashToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/CreateChatDto.ts b/src/api/types/CreateChatDto.ts new file mode 100644 index 0000000..8d8c7b9 --- /dev/null +++ b/src/api/types/CreateChatDto.ts @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vapi from "../index"; + +export interface CreateChatDto { + /** This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. */ + assistantId?: string; + /** This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. */ + assistant?: Vapi.CreateAssistantDto; + /** This is the name of the chat. This is just for your own reference. */ + name?: string; + /** + * This is the ID of the session that will be used for the chat. + * Mutually exclusive with previousChatId. + */ + sessionId?: string; + /** Chat input as a string or an array of messages. When using message array, each message requires a role and content. */ + input: Vapi.CreateChatDtoInput; + /** + * This is a flag that determines whether the response should be streamed. + * When true, the response will be sent as chunks of text. + */ + stream?: boolean; + /** + * This is the ID of the chat that will be used as context for the new chat. + * The messages from the previous chat will be used as context. + * Mutually exclusive with sessionId. + */ + previousChatId?: string; +} diff --git a/src/api/types/CreateChatDtoInput.ts b/src/api/types/CreateChatDtoInput.ts new file mode 100644 index 0000000..7c2b2cd --- /dev/null +++ b/src/api/types/CreateChatDtoInput.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vapi from "../index"; + +/** + * Chat input as a string or an array of messages. When using message array, each message requires a role and content. + */ +export type CreateChatDtoInput = string | Vapi.CreateChatDtoInputItem[]; diff --git a/src/api/types/CreateChatDtoInputItem.ts b/src/api/types/CreateChatDtoInputItem.ts new file mode 100644 index 0000000..ae152ef --- /dev/null +++ b/src/api/types/CreateChatDtoInputItem.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vapi from "../index"; + +export type CreateChatDtoInputItem = + | Vapi.SystemMessage + | Vapi.UserMessage + | Vapi.AssistantMessage + | Vapi.ToolMessage + | Vapi.DeveloperMessage; diff --git a/src/api/types/CreateChatStreamResponse.ts b/src/api/types/CreateChatStreamResponse.ts new file mode 100644 index 0000000..d07873a --- /dev/null +++ b/src/api/types/CreateChatStreamResponse.ts @@ -0,0 +1,15 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface CreateChatStreamResponse { + /** This is the unique identifier for the streaming response. */ + id: string; + /** + * This is the path to the content being updated. + * Format: `chat.output[{contentIndex}].content` where contentIndex identifies the specific content item. + */ + path: string; + /** This is the incremental content chunk being streamed. */ + delta: string; +} diff --git a/src/api/types/CreateComputerToolDto.ts b/src/api/types/CreateComputerToolDto.ts index 6ac637d..ca78345 100644 --- a/src/api/types/CreateComputerToolDto.ts +++ b/src/api/types/CreateComputerToolDto.ts @@ -24,6 +24,17 @@ export interface CreateComputerToolDto { type: "computer"; /** The sub type of tool. */ subType: "computer_20241022"; + /** + * This is the server where a `tool-calls` webhook will be sent. + * + * Notes: + * - Webhook is sent to this server when a tool call is made. + * - Webhook contains the call, assistant, and phone number objects. + * - Webhook contains the variables set on the assistant. + * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + * - Webhook expects a response with tool call result. + */ + server?: Vapi.Server; /** The name of the tool, fixed to 'computer' */ name: "computer"; /** The display width in pixels */ @@ -40,12 +51,4 @@ export interface CreateComputerToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/CreateDtmfToolDto.ts b/src/api/types/CreateDtmfToolDto.ts index c234b97..85e565e 100644 --- a/src/api/types/CreateDtmfToolDto.ts +++ b/src/api/types/CreateDtmfToolDto.ts @@ -30,12 +30,4 @@ export interface CreateDtmfToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/CreateEndCallToolDto.ts b/src/api/types/CreateEndCallToolDto.ts index 0035438..ace5bd0 100644 --- a/src/api/types/CreateEndCallToolDto.ts +++ b/src/api/types/CreateEndCallToolDto.ts @@ -30,12 +30,4 @@ export interface CreateEndCallToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/CreateFunctionToolDto.ts b/src/api/types/CreateFunctionToolDto.ts index f63d3d7..db66bcd 100644 --- a/src/api/types/CreateFunctionToolDto.ts +++ b/src/api/types/CreateFunctionToolDto.ts @@ -22,6 +22,17 @@ export interface CreateFunctionToolDto { */ messages?: Vapi.CreateFunctionToolDtoMessagesItem[]; type: "function"; + /** + * This is the server where a `tool-calls` webhook will be sent. + * + * Notes: + * - Webhook is sent to this server when a tool call is made. + * - Webhook contains the call, assistant, and phone number objects. + * - Webhook contains the variables set on the assistant. + * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + * - Webhook expects a response with tool call result. + */ + server?: Vapi.Server; /** * This is the function definition of the tool. * @@ -30,12 +41,4 @@ export interface CreateFunctionToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/CreateGhlToolDto.ts b/src/api/types/CreateGhlToolDto.ts index 90b887d..213e9c9 100644 --- a/src/api/types/CreateGhlToolDto.ts +++ b/src/api/types/CreateGhlToolDto.ts @@ -31,12 +31,4 @@ export interface CreateGhlToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/CreateGoHighLevelCalendarAvailabilityToolDto.ts b/src/api/types/CreateGoHighLevelCalendarAvailabilityToolDto.ts index 1e0bc61..13012c6 100644 --- a/src/api/types/CreateGoHighLevelCalendarAvailabilityToolDto.ts +++ b/src/api/types/CreateGoHighLevelCalendarAvailabilityToolDto.ts @@ -30,12 +30,4 @@ export interface CreateGoHighLevelCalendarAvailabilityToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/CreateGoHighLevelCalendarEventCreateToolDto.ts b/src/api/types/CreateGoHighLevelCalendarEventCreateToolDto.ts index c6b6390..3de735b 100644 --- a/src/api/types/CreateGoHighLevelCalendarEventCreateToolDto.ts +++ b/src/api/types/CreateGoHighLevelCalendarEventCreateToolDto.ts @@ -30,12 +30,4 @@ export interface CreateGoHighLevelCalendarEventCreateToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/CreateGoHighLevelContactCreateToolDto.ts b/src/api/types/CreateGoHighLevelContactCreateToolDto.ts index d17076f..db43d2f 100644 --- a/src/api/types/CreateGoHighLevelContactCreateToolDto.ts +++ b/src/api/types/CreateGoHighLevelContactCreateToolDto.ts @@ -30,12 +30,4 @@ export interface CreateGoHighLevelContactCreateToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/CreateGoHighLevelContactGetToolDto.ts b/src/api/types/CreateGoHighLevelContactGetToolDto.ts index 4e5adc8..e337a9c 100644 --- a/src/api/types/CreateGoHighLevelContactGetToolDto.ts +++ b/src/api/types/CreateGoHighLevelContactGetToolDto.ts @@ -30,12 +30,4 @@ export interface CreateGoHighLevelContactGetToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/CreateGoogleCalendarCheckAvailabilityToolDto.ts b/src/api/types/CreateGoogleCalendarCheckAvailabilityToolDto.ts index 51d58f7..1b0d941 100644 --- a/src/api/types/CreateGoogleCalendarCheckAvailabilityToolDto.ts +++ b/src/api/types/CreateGoogleCalendarCheckAvailabilityToolDto.ts @@ -30,12 +30,4 @@ export interface CreateGoogleCalendarCheckAvailabilityToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/CreateGoogleCalendarCreateEventToolDto.ts b/src/api/types/CreateGoogleCalendarCreateEventToolDto.ts index 789c9ad..e929c6f 100644 --- a/src/api/types/CreateGoogleCalendarCreateEventToolDto.ts +++ b/src/api/types/CreateGoogleCalendarCreateEventToolDto.ts @@ -30,12 +30,4 @@ export interface CreateGoogleCalendarCreateEventToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/CreateGoogleSheetsRowAppendToolDto.ts b/src/api/types/CreateGoogleSheetsRowAppendToolDto.ts index c4574d2..d75ba54 100644 --- a/src/api/types/CreateGoogleSheetsRowAppendToolDto.ts +++ b/src/api/types/CreateGoogleSheetsRowAppendToolDto.ts @@ -30,12 +30,4 @@ export interface CreateGoogleSheetsRowAppendToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/CreateMakeToolDto.ts b/src/api/types/CreateMakeToolDto.ts index 3953670..4878030 100644 --- a/src/api/types/CreateMakeToolDto.ts +++ b/src/api/types/CreateMakeToolDto.ts @@ -31,12 +31,4 @@ export interface CreateMakeToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/CreateMcpToolDto.ts b/src/api/types/CreateMcpToolDto.ts index 9bf8c55..322792e 100644 --- a/src/api/types/CreateMcpToolDto.ts +++ b/src/api/types/CreateMcpToolDto.ts @@ -22,6 +22,17 @@ export interface CreateMcpToolDto { */ messages?: Vapi.CreateMcpToolDtoMessagesItem[]; type: "mcp"; + /** + * This is the server where a `tool-calls` webhook will be sent. + * + * Notes: + * - Webhook is sent to this server when a tool call is made. + * - Webhook contains the call, assistant, and phone number objects. + * - Webhook contains the variables set on the assistant. + * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + * - Webhook expects a response with tool call result. + */ + server?: Vapi.Server; /** * This is the function definition of the tool. * @@ -30,12 +41,4 @@ export interface CreateMcpToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/CreateOutputToolDto.ts b/src/api/types/CreateOutputToolDto.ts index d581386..76621b8 100644 --- a/src/api/types/CreateOutputToolDto.ts +++ b/src/api/types/CreateOutputToolDto.ts @@ -30,12 +30,4 @@ export interface CreateOutputToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/CreateQueryToolDto.ts b/src/api/types/CreateQueryToolDto.ts index 8a82679..b83b6ff 100644 --- a/src/api/types/CreateQueryToolDto.ts +++ b/src/api/types/CreateQueryToolDto.ts @@ -32,12 +32,4 @@ export interface CreateQueryToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/CreateSessionDto.ts b/src/api/types/CreateSessionDto.ts new file mode 100644 index 0000000..95dc670 --- /dev/null +++ b/src/api/types/CreateSessionDto.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vapi from "../index"; + +export interface CreateSessionDto { + /** This is a user-defined name for the session. Maximum length is 40 characters. */ + name?: string; + /** This is the current status of the session. Can be either 'active' or 'completed'. */ + status?: Vapi.CreateSessionDtoStatus; + /** This is the ID of the assistant associated with this session. Use this when referencing an existing assistant. */ + assistantId?: string; + /** + * This is the assistant configuration for this session. Use this when creating a new assistant configuration. + * If assistantId is provided, this will be ignored. + */ + assistant?: Vapi.CreateAssistantDto; + /** Array of chat messages in the session */ + messages?: Vapi.CreateSessionDtoMessagesItem[]; + /** This is the customer information associated with this session. */ + customer?: Vapi.CreateCustomerDto; + /** This is the ID of the phone number associated with this session. */ + phoneNumberId?: string; + /** This is the phone number configuration for this session. */ + phoneNumber?: Vapi.ImportTwilioPhoneNumberDto; +} diff --git a/src/api/types/CreateSessionDtoMessagesItem.ts b/src/api/types/CreateSessionDtoMessagesItem.ts new file mode 100644 index 0000000..5dcb79d --- /dev/null +++ b/src/api/types/CreateSessionDtoMessagesItem.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vapi from "../index"; + +export type CreateSessionDtoMessagesItem = + | Vapi.SystemMessage + | Vapi.UserMessage + | Vapi.AssistantMessage + | Vapi.ToolMessage + | Vapi.DeveloperMessage; diff --git a/src/api/types/CreateSessionDtoStatus.ts b/src/api/types/CreateSessionDtoStatus.ts new file mode 100644 index 0000000..a7950b9 --- /dev/null +++ b/src/api/types/CreateSessionDtoStatus.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * This is the current status of the session. Can be either 'active' or 'completed'. + */ +export type CreateSessionDtoStatus = "active" | "completed"; +export const CreateSessionDtoStatus = { + Active: "active", + Completed: "completed", +} as const; diff --git a/src/api/types/CreateSlackSendMessageToolDto.ts b/src/api/types/CreateSlackSendMessageToolDto.ts index a7df496..35fb984 100644 --- a/src/api/types/CreateSlackSendMessageToolDto.ts +++ b/src/api/types/CreateSlackSendMessageToolDto.ts @@ -30,12 +30,4 @@ export interface CreateSlackSendMessageToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/CreateSmsToolDto.ts b/src/api/types/CreateSmsToolDto.ts index 23c53e2..5dc1a48 100644 --- a/src/api/types/CreateSmsToolDto.ts +++ b/src/api/types/CreateSmsToolDto.ts @@ -30,12 +30,4 @@ export interface CreateSmsToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/CreateTextEditorToolDto.ts b/src/api/types/CreateTextEditorToolDto.ts index 5a7e2f9..e624821 100644 --- a/src/api/types/CreateTextEditorToolDto.ts +++ b/src/api/types/CreateTextEditorToolDto.ts @@ -24,6 +24,17 @@ export interface CreateTextEditorToolDto { type: "textEditor"; /** The sub type of tool. */ subType: "text_editor_20241022"; + /** + * This is the server where a `tool-calls` webhook will be sent. + * + * Notes: + * - Webhook is sent to this server when a tool call is made. + * - Webhook contains the call, assistant, and phone number objects. + * - Webhook contains the variables set on the assistant. + * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + * - Webhook expects a response with tool call result. + */ + server?: Vapi.Server; /** The name of the tool, fixed to 'str_replace_editor' */ name: "str_replace_editor"; /** @@ -34,12 +45,4 @@ export interface CreateTextEditorToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/CreateTransferCallToolDto.ts b/src/api/types/CreateTransferCallToolDto.ts index 95faeed..307f50a 100644 --- a/src/api/types/CreateTransferCallToolDto.ts +++ b/src/api/types/CreateTransferCallToolDto.ts @@ -32,12 +32,4 @@ export interface CreateTransferCallToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/CreateVoicemailToolDto.ts b/src/api/types/CreateVoicemailToolDto.ts index 604ad49..86886fe 100644 --- a/src/api/types/CreateVoicemailToolDto.ts +++ b/src/api/types/CreateVoicemailToolDto.ts @@ -31,12 +31,4 @@ export interface CreateVoicemailToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/DeveloperMessage.ts b/src/api/types/DeveloperMessage.ts new file mode 100644 index 0000000..a904878 --- /dev/null +++ b/src/api/types/DeveloperMessage.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface DeveloperMessage { + /** This is the role of the message author */ + role: "developer"; + /** This is the content of the developer message */ + content: string; + /** This is an optional name for the participant */ + name?: string; +} diff --git a/src/api/types/DtmfTool.ts b/src/api/types/DtmfTool.ts index 889b051..78d320c 100644 --- a/src/api/types/DtmfTool.ts +++ b/src/api/types/DtmfTool.ts @@ -38,12 +38,4 @@ export interface DtmfTool { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/EndCallTool.ts b/src/api/types/EndCallTool.ts index 072338d..e8f4098 100644 --- a/src/api/types/EndCallTool.ts +++ b/src/api/types/EndCallTool.ts @@ -38,12 +38,4 @@ export interface EndCallTool { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/FallbackGoogleTranscriberModel.ts b/src/api/types/FallbackGoogleTranscriberModel.ts index 94583c0..cfad8bc 100644 --- a/src/api/types/FallbackGoogleTranscriberModel.ts +++ b/src/api/types/FallbackGoogleTranscriberModel.ts @@ -7,6 +7,7 @@ */ export type FallbackGoogleTranscriberModel = | "gemini-2.5-pro-preview-05-06" + | "gemini-2.5-flash-preview-05-20" | "gemini-2.5-flash-preview-04-17" | "gemini-2.0-flash-thinking-exp" | "gemini-2.0-pro-exp-02-05" @@ -22,6 +23,7 @@ export type FallbackGoogleTranscriberModel = | "gemini-1.0-pro"; export const FallbackGoogleTranscriberModel = { Gemini25ProPreview0506: "gemini-2.5-pro-preview-05-06", + Gemini25FlashPreview0520: "gemini-2.5-flash-preview-05-20", Gemini25FlashPreview0417: "gemini-2.5-flash-preview-04-17", Gemini20FlashThinkingExp: "gemini-2.0-flash-thinking-exp", Gemini20ProExp0205: "gemini-2.0-pro-exp-02-05", diff --git a/src/api/types/FunctionCallAssistantHookAction.ts b/src/api/types/FunctionCallAssistantHookAction.ts index 8c2ab69..7141ebb 100644 --- a/src/api/types/FunctionCallAssistantHookAction.ts +++ b/src/api/types/FunctionCallAssistantHookAction.ts @@ -23,6 +23,17 @@ export interface FunctionCallAssistantHookAction { messages?: Vapi.FunctionCallAssistantHookActionMessagesItem[]; /** The type of tool. "function" for Function tool. */ type: "function"; + /** + * This is the server where a `tool-calls` webhook will be sent. + * + * Notes: + * - Webhook is sent to this server when a tool call is made. + * - Webhook contains the call, assistant, and phone number objects. + * - Webhook contains the variables set on the assistant. + * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + * - Webhook expects a response with tool call result. + */ + server?: Vapi.Server; /** * This is the function definition of the tool. * @@ -31,12 +42,4 @@ export interface FunctionCallAssistantHookAction { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/FunctionTool.ts b/src/api/types/FunctionTool.ts index d267cc2..0283873 100644 --- a/src/api/types/FunctionTool.ts +++ b/src/api/types/FunctionTool.ts @@ -22,6 +22,17 @@ export interface FunctionTool { */ messages?: Vapi.FunctionToolMessagesItem[]; type: "function"; + /** + * This is the server where a `tool-calls` webhook will be sent. + * + * Notes: + * - Webhook is sent to this server when a tool call is made. + * - Webhook contains the call, assistant, and phone number objects. + * - Webhook contains the variables set on the assistant. + * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + * - Webhook expects a response with tool call result. + */ + server?: Vapi.Server; /** This is the unique identifier for the tool. */ id: string; /** This is the unique identifier for the organization that this tool belongs to. */ @@ -38,12 +49,4 @@ export interface FunctionTool { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/FunctionToolWithToolCall.ts b/src/api/types/FunctionToolWithToolCall.ts index 8a9616e..891f225 100644 --- a/src/api/types/FunctionToolWithToolCall.ts +++ b/src/api/types/FunctionToolWithToolCall.ts @@ -23,6 +23,17 @@ export interface FunctionToolWithToolCall { messages?: Vapi.FunctionToolWithToolCallMessagesItem[]; /** The type of tool. "function" for Function tool. */ type: "function"; + /** + * This is the server where a `tool-calls` webhook will be sent. + * + * Notes: + * - Webhook is sent to this server when a tool call is made. + * - Webhook contains the call, assistant, and phone number objects. + * - Webhook contains the variables set on the assistant. + * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + * - Webhook expects a response with tool call result. + */ + server?: Vapi.Server; toolCall: Vapi.ToolCall; /** * This is the function definition of the tool. @@ -32,12 +43,4 @@ export interface FunctionToolWithToolCall { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/GhlTool.ts b/src/api/types/GhlTool.ts index e6d8c5f..f7b08c9 100644 --- a/src/api/types/GhlTool.ts +++ b/src/api/types/GhlTool.ts @@ -38,13 +38,5 @@ export interface GhlTool { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; metadata: Vapi.GhlToolMetadata; } diff --git a/src/api/types/GhlToolWithToolCall.ts b/src/api/types/GhlToolWithToolCall.ts index fb502ec..bc14275 100644 --- a/src/api/types/GhlToolWithToolCall.ts +++ b/src/api/types/GhlToolWithToolCall.ts @@ -33,12 +33,4 @@ export interface GhlToolWithToolCall { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/GoHighLevelCalendarAvailabilityTool.ts b/src/api/types/GoHighLevelCalendarAvailabilityTool.ts index 87e529a..9e81e7c 100644 --- a/src/api/types/GoHighLevelCalendarAvailabilityTool.ts +++ b/src/api/types/GoHighLevelCalendarAvailabilityTool.ts @@ -38,12 +38,4 @@ export interface GoHighLevelCalendarAvailabilityTool { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/GoHighLevelCalendarAvailabilityToolWithToolCall.ts b/src/api/types/GoHighLevelCalendarAvailabilityToolWithToolCall.ts index 7c19a05..5b87aa5 100644 --- a/src/api/types/GoHighLevelCalendarAvailabilityToolWithToolCall.ts +++ b/src/api/types/GoHighLevelCalendarAvailabilityToolWithToolCall.ts @@ -32,12 +32,4 @@ export interface GoHighLevelCalendarAvailabilityToolWithToolCall { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/GoHighLevelCalendarEventCreateTool.ts b/src/api/types/GoHighLevelCalendarEventCreateTool.ts index 3f4b0ec..f2c8b87 100644 --- a/src/api/types/GoHighLevelCalendarEventCreateTool.ts +++ b/src/api/types/GoHighLevelCalendarEventCreateTool.ts @@ -38,12 +38,4 @@ export interface GoHighLevelCalendarEventCreateTool { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/GoHighLevelCalendarEventCreateToolWithToolCall.ts b/src/api/types/GoHighLevelCalendarEventCreateToolWithToolCall.ts index ea49410..f805122 100644 --- a/src/api/types/GoHighLevelCalendarEventCreateToolWithToolCall.ts +++ b/src/api/types/GoHighLevelCalendarEventCreateToolWithToolCall.ts @@ -32,12 +32,4 @@ export interface GoHighLevelCalendarEventCreateToolWithToolCall { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/GoHighLevelContactCreateTool.ts b/src/api/types/GoHighLevelContactCreateTool.ts index d622efc..2a29e08 100644 --- a/src/api/types/GoHighLevelContactCreateTool.ts +++ b/src/api/types/GoHighLevelContactCreateTool.ts @@ -38,12 +38,4 @@ export interface GoHighLevelContactCreateTool { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/GoHighLevelContactCreateToolWithToolCall.ts b/src/api/types/GoHighLevelContactCreateToolWithToolCall.ts index dd17204..860a523 100644 --- a/src/api/types/GoHighLevelContactCreateToolWithToolCall.ts +++ b/src/api/types/GoHighLevelContactCreateToolWithToolCall.ts @@ -32,12 +32,4 @@ export interface GoHighLevelContactCreateToolWithToolCall { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/GoHighLevelContactGetTool.ts b/src/api/types/GoHighLevelContactGetTool.ts index 8bcd0ba..68ffb84 100644 --- a/src/api/types/GoHighLevelContactGetTool.ts +++ b/src/api/types/GoHighLevelContactGetTool.ts @@ -38,12 +38,4 @@ export interface GoHighLevelContactGetTool { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/GoHighLevelContactGetToolWithToolCall.ts b/src/api/types/GoHighLevelContactGetToolWithToolCall.ts index 9add0ab..934b3ed 100644 --- a/src/api/types/GoHighLevelContactGetToolWithToolCall.ts +++ b/src/api/types/GoHighLevelContactGetToolWithToolCall.ts @@ -32,12 +32,4 @@ export interface GoHighLevelContactGetToolWithToolCall { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/GoogleCalendarCheckAvailabilityTool.ts b/src/api/types/GoogleCalendarCheckAvailabilityTool.ts index 7941390..6e53ca3 100644 --- a/src/api/types/GoogleCalendarCheckAvailabilityTool.ts +++ b/src/api/types/GoogleCalendarCheckAvailabilityTool.ts @@ -38,12 +38,4 @@ export interface GoogleCalendarCheckAvailabilityTool { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/GoogleCalendarCreateEventTool.ts b/src/api/types/GoogleCalendarCreateEventTool.ts index cc3e973..d66997f 100644 --- a/src/api/types/GoogleCalendarCreateEventTool.ts +++ b/src/api/types/GoogleCalendarCreateEventTool.ts @@ -38,12 +38,4 @@ export interface GoogleCalendarCreateEventTool { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/GoogleCalendarCreateEventToolWithToolCall.ts b/src/api/types/GoogleCalendarCreateEventToolWithToolCall.ts index 5745964..62f3f82 100644 --- a/src/api/types/GoogleCalendarCreateEventToolWithToolCall.ts +++ b/src/api/types/GoogleCalendarCreateEventToolWithToolCall.ts @@ -32,12 +32,4 @@ export interface GoogleCalendarCreateEventToolWithToolCall { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/GoogleModelModel.ts b/src/api/types/GoogleModelModel.ts index 11b2160..7a61f14 100644 --- a/src/api/types/GoogleModelModel.ts +++ b/src/api/types/GoogleModelModel.ts @@ -7,6 +7,7 @@ */ export type GoogleModelModel = | "gemini-2.5-pro-preview-05-06" + | "gemini-2.5-flash-preview-05-20" | "gemini-2.5-flash-preview-04-17" | "gemini-2.0-flash-thinking-exp" | "gemini-2.0-pro-exp-02-05" @@ -22,6 +23,7 @@ export type GoogleModelModel = | "gemini-1.0-pro"; export const GoogleModelModel = { Gemini25ProPreview0506: "gemini-2.5-pro-preview-05-06", + Gemini25FlashPreview0520: "gemini-2.5-flash-preview-05-20", Gemini25FlashPreview0417: "gemini-2.5-flash-preview-04-17", Gemini20FlashThinkingExp: "gemini-2.0-flash-thinking-exp", Gemini20ProExp0205: "gemini-2.0-pro-exp-02-05", diff --git a/src/api/types/GoogleSheetsRowAppendTool.ts b/src/api/types/GoogleSheetsRowAppendTool.ts index ab0494e..cda16b3 100644 --- a/src/api/types/GoogleSheetsRowAppendTool.ts +++ b/src/api/types/GoogleSheetsRowAppendTool.ts @@ -38,12 +38,4 @@ export interface GoogleSheetsRowAppendTool { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/GoogleSheetsRowAppendToolWithToolCall.ts b/src/api/types/GoogleSheetsRowAppendToolWithToolCall.ts index 7c44a8e..7718c7c 100644 --- a/src/api/types/GoogleSheetsRowAppendToolWithToolCall.ts +++ b/src/api/types/GoogleSheetsRowAppendToolWithToolCall.ts @@ -32,12 +32,4 @@ export interface GoogleSheetsRowAppendToolWithToolCall { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/GoogleTranscriberModel.ts b/src/api/types/GoogleTranscriberModel.ts index 08dab6e..c43b9a3 100644 --- a/src/api/types/GoogleTranscriberModel.ts +++ b/src/api/types/GoogleTranscriberModel.ts @@ -7,6 +7,7 @@ */ export type GoogleTranscriberModel = | "gemini-2.5-pro-preview-05-06" + | "gemini-2.5-flash-preview-05-20" | "gemini-2.5-flash-preview-04-17" | "gemini-2.0-flash-thinking-exp" | "gemini-2.0-pro-exp-02-05" @@ -22,6 +23,7 @@ export type GoogleTranscriberModel = | "gemini-1.0-pro"; export const GoogleTranscriberModel = { Gemini25ProPreview0506: "gemini-2.5-pro-preview-05-06", + Gemini25FlashPreview0520: "gemini-2.5-flash-preview-05-20", Gemini25FlashPreview0417: "gemini-2.5-flash-preview-04-17", Gemini20FlashThinkingExp: "gemini-2.0-flash-thinking-exp", Gemini20ProExp0205: "gemini-2.0-pro-exp-02-05", diff --git a/src/api/types/KnowledgeBaseModel.ts b/src/api/types/KnowledgeBaseModel.ts index 6a77ba1..9ee5074 100644 --- a/src/api/types/KnowledgeBaseModel.ts +++ b/src/api/types/KnowledgeBaseModel.ts @@ -7,6 +7,7 @@ */ export type KnowledgeBaseModel = | "gemini-2.5-pro-preview-05-06" + | "gemini-2.5-flash-preview-05-20" | "gemini-2.5-flash-preview-04-17" | "gemini-2.0-flash-thinking-exp" | "gemini-2.0-pro-exp-02-05" @@ -22,6 +23,7 @@ export type KnowledgeBaseModel = | "gemini-1.0-pro"; export const KnowledgeBaseModel = { Gemini25ProPreview0506: "gemini-2.5-pro-preview-05-06", + Gemini25FlashPreview0520: "gemini-2.5-flash-preview-05-20", Gemini25FlashPreview0417: "gemini-2.5-flash-preview-04-17", Gemini20FlashThinkingExp: "gemini-2.0-flash-thinking-exp", Gemini20ProExp0205: "gemini-2.0-pro-exp-02-05", diff --git a/src/api/types/MakeTool.ts b/src/api/types/MakeTool.ts index 3d58045..c6afc24 100644 --- a/src/api/types/MakeTool.ts +++ b/src/api/types/MakeTool.ts @@ -38,13 +38,5 @@ export interface MakeTool { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; metadata: Vapi.MakeToolMetadata; } diff --git a/src/api/types/MakeToolWithToolCall.ts b/src/api/types/MakeToolWithToolCall.ts index 6ef4680..dd5f398 100644 --- a/src/api/types/MakeToolWithToolCall.ts +++ b/src/api/types/MakeToolWithToolCall.ts @@ -33,12 +33,4 @@ export interface MakeToolWithToolCall { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/McpTool.ts b/src/api/types/McpTool.ts index fdea60d..1cc8c0c 100644 --- a/src/api/types/McpTool.ts +++ b/src/api/types/McpTool.ts @@ -22,6 +22,17 @@ export interface McpTool { */ messages?: Vapi.McpToolMessagesItem[]; type: "mcp"; + /** + * This is the server where a `tool-calls` webhook will be sent. + * + * Notes: + * - Webhook is sent to this server when a tool call is made. + * - Webhook contains the call, assistant, and phone number objects. + * - Webhook contains the variables set on the assistant. + * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + * - Webhook expects a response with tool call result. + */ + server?: Vapi.Server; /** This is the unique identifier for the tool. */ id: string; /** This is the unique identifier for the organization that this tool belongs to. */ @@ -38,12 +49,4 @@ export interface McpTool { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/OpenAiResponsesRequest.ts b/src/api/types/OpenAiResponsesRequest.ts new file mode 100644 index 0000000..97f8b97 --- /dev/null +++ b/src/api/types/OpenAiResponsesRequest.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vapi from "../index"; + +export interface OpenAiResponsesRequest { + /** This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. */ + assistantId?: string; + /** This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. */ + assistant?: Vapi.CreateAssistantDto; + /** This is the name of the chat. This is just for your own reference. */ + name?: string; + /** + * This is the ID of the session that will be used for the chat. + * Mutually exclusive with previousChatId. + */ + sessionId?: string; + /** Chat input as a string or an array of messages. When using message array, each message requires a role and content. */ + input: Vapi.OpenAiResponsesRequestInput; + /** Whether to stream the response or not. */ + stream?: boolean; + /** + * This is the ID of the chat that will be used as context for the new chat. + * The messages from the previous chat will be used as context. + * Mutually exclusive with sessionId. + */ + previousChatId?: string; +} diff --git a/src/api/types/OpenAiResponsesRequestInput.ts b/src/api/types/OpenAiResponsesRequestInput.ts new file mode 100644 index 0000000..14de784 --- /dev/null +++ b/src/api/types/OpenAiResponsesRequestInput.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vapi from "../index"; + +/** + * Chat input as a string or an array of messages. When using message array, each message requires a role and content. + */ +export type OpenAiResponsesRequestInput = string | Vapi.OpenAiResponsesRequestInputItem[]; diff --git a/src/api/types/OpenAiResponsesRequestInputItem.ts b/src/api/types/OpenAiResponsesRequestInputItem.ts new file mode 100644 index 0000000..f0f7a6a --- /dev/null +++ b/src/api/types/OpenAiResponsesRequestInputItem.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vapi from "../index"; + +export type OpenAiResponsesRequestInputItem = + | Vapi.SystemMessage + | Vapi.UserMessage + | Vapi.AssistantMessage + | Vapi.ToolMessage + | Vapi.DeveloperMessage; diff --git a/src/api/types/Org.ts b/src/api/types/Org.ts index e60bdb3..aa9186b 100644 --- a/src/api/types/Org.ts +++ b/src/api/types/Org.ts @@ -34,6 +34,8 @@ export interface Org { plan?: Vapi.OrgPlan; /** This is the secret key used for signing JWT tokens for the org. */ jwtSecret?: string; + /** This is the total number of call minutes used by this org across all time. */ + minutesUsed?: number; /** This is the name of the org. This is just for your own reference. */ name?: string; /** This is the channel of the org. There is the cluster the API traffic for the org will be directed. */ diff --git a/src/api/types/OutputTool.ts b/src/api/types/OutputTool.ts index 0cfea6a..554d913 100644 --- a/src/api/types/OutputTool.ts +++ b/src/api/types/OutputTool.ts @@ -38,12 +38,4 @@ export interface OutputTool { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/QueryTool.ts b/src/api/types/QueryTool.ts index e7897c7..d5808f3 100644 --- a/src/api/types/QueryTool.ts +++ b/src/api/types/QueryTool.ts @@ -40,12 +40,4 @@ export interface QueryTool { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/Session.ts b/src/api/types/Session.ts new file mode 100644 index 0000000..455387b --- /dev/null +++ b/src/api/types/Session.ts @@ -0,0 +1,35 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vapi from "../index"; + +export interface Session { + /** This is the unique identifier for the session. */ + id: string; + /** This is the unique identifier for the organization that owns this session. */ + orgId: string; + /** This is the ISO 8601 timestamp indicating when the session was created. */ + createdAt: string; + /** This is the ISO 8601 timestamp indicating when the session was last updated. */ + updatedAt: string; + /** This is a user-defined name for the session. Maximum length is 40 characters. */ + name?: string; + /** This is the current status of the session. Can be either 'active' or 'completed'. */ + status?: Vapi.SessionStatus; + /** This is the ID of the assistant associated with this session. Use this when referencing an existing assistant. */ + assistantId?: string; + /** + * This is the assistant configuration for this session. Use this when creating a new assistant configuration. + * If assistantId is provided, this will be ignored. + */ + assistant?: Vapi.CreateAssistantDto; + /** Array of chat messages in the session */ + messages?: Vapi.SessionMessagesItem[]; + /** This is the customer information associated with this session. */ + customer?: Vapi.CreateCustomerDto; + /** This is the ID of the phone number associated with this session. */ + phoneNumberId?: string; + /** This is the phone number configuration for this session. */ + phoneNumber?: Vapi.ImportTwilioPhoneNumberDto; +} diff --git a/src/api/types/SessionMessagesItem.ts b/src/api/types/SessionMessagesItem.ts new file mode 100644 index 0000000..0cb8c5c --- /dev/null +++ b/src/api/types/SessionMessagesItem.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vapi from "../index"; + +export type SessionMessagesItem = + | Vapi.SystemMessage + | Vapi.UserMessage + | Vapi.AssistantMessage + | Vapi.ToolMessage + | Vapi.DeveloperMessage; diff --git a/src/api/types/SessionPaginatedResponse.ts b/src/api/types/SessionPaginatedResponse.ts new file mode 100644 index 0000000..a88af11 --- /dev/null +++ b/src/api/types/SessionPaginatedResponse.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vapi from "../index"; + +export interface SessionPaginatedResponse { + results: Vapi.Session[]; + metadata: Vapi.PaginationMeta; +} diff --git a/src/api/types/SessionStatus.ts b/src/api/types/SessionStatus.ts new file mode 100644 index 0000000..e2c82f0 --- /dev/null +++ b/src/api/types/SessionStatus.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * This is the current status of the session. Can be either 'active' or 'completed'. + */ +export type SessionStatus = "active" | "completed"; +export const SessionStatus = { + Active: "active", + Completed: "completed", +} as const; diff --git a/src/api/types/SlackSendMessageTool.ts b/src/api/types/SlackSendMessageTool.ts index 79b9a3c..34fc041 100644 --- a/src/api/types/SlackSendMessageTool.ts +++ b/src/api/types/SlackSendMessageTool.ts @@ -38,12 +38,4 @@ export interface SlackSendMessageTool { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/SmsTool.ts b/src/api/types/SmsTool.ts index afe218b..2eab901 100644 --- a/src/api/types/SmsTool.ts +++ b/src/api/types/SmsTool.ts @@ -38,12 +38,4 @@ export interface SmsTool { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/SubscriptionType.ts b/src/api/types/SubscriptionType.ts index 7e13cdd..d2fa2a1 100644 --- a/src/api/types/SubscriptionType.ts +++ b/src/api/types/SubscriptionType.ts @@ -5,9 +5,13 @@ /** * This is the type / tier of the subscription. */ -export type SubscriptionType = "trial" | "pay-as-you-go" | "enterprise"; +export type SubscriptionType = "trial" | "pay-as-you-go" | "enterprise" | "agency" | "startup" | "growth" | "scale"; export const SubscriptionType = { Trial: "trial", PayAsYouGo: "pay-as-you-go", Enterprise: "enterprise", + Agency: "agency", + Startup: "startup", + Growth: "growth", + Scale: "scale", } as const; diff --git a/src/api/types/TextEditorTool.ts b/src/api/types/TextEditorTool.ts index 897ffb2..c9290de 100644 --- a/src/api/types/TextEditorTool.ts +++ b/src/api/types/TextEditorTool.ts @@ -24,6 +24,17 @@ export interface TextEditorTool { type: "textEditor"; /** The sub type of tool. */ subType: "text_editor_20241022"; + /** + * This is the server where a `tool-calls` webhook will be sent. + * + * Notes: + * - Webhook is sent to this server when a tool call is made. + * - Webhook contains the call, assistant, and phone number objects. + * - Webhook contains the variables set on the assistant. + * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + * - Webhook expects a response with tool call result. + */ + server?: Vapi.Server; /** This is the unique identifier for the tool. */ id: string; /** This is the unique identifier for the organization that this tool belongs to. */ @@ -40,14 +51,6 @@ export interface TextEditorTool { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; /** The name of the tool, fixed to 'str_replace_editor' */ name: "str_replace_editor"; } diff --git a/src/api/types/TextEditorToolWithToolCall.ts b/src/api/types/TextEditorToolWithToolCall.ts index f06119e..a8a5c1a 100644 --- a/src/api/types/TextEditorToolWithToolCall.ts +++ b/src/api/types/TextEditorToolWithToolCall.ts @@ -25,6 +25,17 @@ export interface TextEditorToolWithToolCall { type: "textEditor"; /** The sub type of tool. */ subType: "text_editor_20241022"; + /** + * This is the server where a `tool-calls` webhook will be sent. + * + * Notes: + * - Webhook is sent to this server when a tool call is made. + * - Webhook contains the call, assistant, and phone number objects. + * - Webhook contains the variables set on the assistant. + * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + * - Webhook expects a response with tool call result. + */ + server?: Vapi.Server; toolCall: Vapi.ToolCall; /** The name of the tool, fixed to 'str_replace_editor' */ name: "str_replace_editor"; @@ -36,12 +47,4 @@ export interface TextEditorToolWithToolCall { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/ToolCall.ts b/src/api/types/ToolCall.ts index bc797bd..da490ca 100644 --- a/src/api/types/ToolCall.ts +++ b/src/api/types/ToolCall.ts @@ -5,10 +5,10 @@ import * as Vapi from "../index"; export interface ToolCall { - /** This is the type of tool the model called. */ - type: "function"; - /** This is the function the model called. */ - function: Vapi.ToolCallFunction; - /** This is the unique identifier for the tool call. */ + /** This is the ID of the tool call */ id: string; + /** This is the type of tool */ + type: string; + /** This is the function that was called */ + function: Vapi.ToolCallFunction; } diff --git a/src/api/types/ToolCallFunction.ts b/src/api/types/ToolCallFunction.ts index c539b0e..425765d 100644 --- a/src/api/types/ToolCallFunction.ts +++ b/src/api/types/ToolCallFunction.ts @@ -3,8 +3,8 @@ */ export interface ToolCallFunction { - /** This is the name of the function the model called. */ + /** This is the arguments to call the function with */ + arguments: string; + /** This is the name of the function to call */ name: string; - /** These are the arguments that the function was called with. */ - arguments: Record; } diff --git a/src/api/types/ToolMessage.ts b/src/api/types/ToolMessage.ts new file mode 100644 index 0000000..349f015 --- /dev/null +++ b/src/api/types/ToolMessage.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface ToolMessage { + /** This is the role of the message author */ + role: "tool"; + /** This is the content of the tool message */ + content: string; + /** This is the ID of the tool call this message is responding to */ + tool_call_id: string; + /** This is an optional name for the participant */ + name?: string; +} diff --git a/src/api/types/TransferCallTool.ts b/src/api/types/TransferCallTool.ts index 5fb316d..602c655 100644 --- a/src/api/types/TransferCallTool.ts +++ b/src/api/types/TransferCallTool.ts @@ -40,12 +40,4 @@ export interface TransferCallTool { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/TransferPlan.ts b/src/api/types/TransferPlan.ts index d705844..301f105 100644 --- a/src/api/types/TransferPlan.ts +++ b/src/api/types/TransferPlan.ts @@ -46,6 +46,17 @@ export interface TransferPlan { * - If not provided, the default hold audio will be used. */ holdAudioUrl?: string; + /** + * This is the URL to an audio file played after the warm transfer message or summary is delivered to the destination party. + * It can be used to play a custom sound like 'beep' to notify that the transfer is complete. + * + * Usage: + * - Used only when `mode` is `warm-transfer-experimental`. + * - Used when transferring calls to play hold audio for the destination party. + * - Must be a publicly accessible URL to an audio file. + * - Supported formats: MP3 and WAV. + */ + transferCompleteAudioUrl?: string; /** * This is the TwiML instructions to execute on the destination call leg before connecting the customer. * diff --git a/src/api/types/UpdateBashToolDto.ts b/src/api/types/UpdateBashToolDto.ts index 4280bda..3e8035a 100644 --- a/src/api/types/UpdateBashToolDto.ts +++ b/src/api/types/UpdateBashToolDto.ts @@ -23,6 +23,17 @@ export interface UpdateBashToolDto { messages?: Vapi.UpdateBashToolDtoMessagesItem[]; /** The sub type of tool. */ subType?: "bash_20241022"; + /** + * This is the server where a `tool-calls` webhook will be sent. + * + * Notes: + * - Webhook is sent to this server when a tool call is made. + * - Webhook contains the call, assistant, and phone number objects. + * - Webhook contains the variables set on the assistant. + * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + * - Webhook expects a response with tool call result. + */ + server?: Vapi.Server; /** * This is the function definition of the tool. * @@ -31,14 +42,6 @@ export interface UpdateBashToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; /** The name of the tool, fixed to 'bash' */ name?: "bash"; } diff --git a/src/api/types/UpdateComputerToolDto.ts b/src/api/types/UpdateComputerToolDto.ts index 9223cad..cee69c2 100644 --- a/src/api/types/UpdateComputerToolDto.ts +++ b/src/api/types/UpdateComputerToolDto.ts @@ -23,6 +23,17 @@ export interface UpdateComputerToolDto { messages?: Vapi.UpdateComputerToolDtoMessagesItem[]; /** The sub type of tool. */ subType?: "computer_20241022"; + /** + * This is the server where a `tool-calls` webhook will be sent. + * + * Notes: + * - Webhook is sent to this server when a tool call is made. + * - Webhook contains the call, assistant, and phone number objects. + * - Webhook contains the variables set on the assistant. + * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + * - Webhook expects a response with tool call result. + */ + server?: Vapi.Server; /** * This is the function definition of the tool. * @@ -31,14 +42,6 @@ export interface UpdateComputerToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; /** The name of the tool, fixed to 'computer' */ name?: "computer"; /** The display width in pixels */ diff --git a/src/api/types/UpdateDtmfToolDto.ts b/src/api/types/UpdateDtmfToolDto.ts index 3ce784d..bcf9afe 100644 --- a/src/api/types/UpdateDtmfToolDto.ts +++ b/src/api/types/UpdateDtmfToolDto.ts @@ -29,12 +29,4 @@ export interface UpdateDtmfToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/UpdateEndCallToolDto.ts b/src/api/types/UpdateEndCallToolDto.ts index cc9083c..b404132 100644 --- a/src/api/types/UpdateEndCallToolDto.ts +++ b/src/api/types/UpdateEndCallToolDto.ts @@ -29,12 +29,4 @@ export interface UpdateEndCallToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/UpdateFunctionToolDto.ts b/src/api/types/UpdateFunctionToolDto.ts index 0c97e1b..60094c4 100644 --- a/src/api/types/UpdateFunctionToolDto.ts +++ b/src/api/types/UpdateFunctionToolDto.ts @@ -21,6 +21,17 @@ export interface UpdateFunctionToolDto { * 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?: Vapi.UpdateFunctionToolDtoMessagesItem[]; + /** + * This is the server where a `tool-calls` webhook will be sent. + * + * Notes: + * - Webhook is sent to this server when a tool call is made. + * - Webhook contains the call, assistant, and phone number objects. + * - Webhook contains the variables set on the assistant. + * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + * - Webhook expects a response with tool call result. + */ + server?: Vapi.Server; /** * This is the function definition of the tool. * @@ -29,12 +40,4 @@ export interface UpdateFunctionToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/UpdateGhlToolDto.ts b/src/api/types/UpdateGhlToolDto.ts index fee85db..0947768 100644 --- a/src/api/types/UpdateGhlToolDto.ts +++ b/src/api/types/UpdateGhlToolDto.ts @@ -29,13 +29,5 @@ export interface UpdateGhlToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; metadata?: Vapi.GhlToolMetadata; } diff --git a/src/api/types/UpdateGoHighLevelCalendarAvailabilityToolDto.ts b/src/api/types/UpdateGoHighLevelCalendarAvailabilityToolDto.ts index 187631a..26b6a51 100644 --- a/src/api/types/UpdateGoHighLevelCalendarAvailabilityToolDto.ts +++ b/src/api/types/UpdateGoHighLevelCalendarAvailabilityToolDto.ts @@ -29,12 +29,4 @@ export interface UpdateGoHighLevelCalendarAvailabilityToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/UpdateGoHighLevelCalendarEventCreateToolDto.ts b/src/api/types/UpdateGoHighLevelCalendarEventCreateToolDto.ts index 3d91c6d..9e01b3f 100644 --- a/src/api/types/UpdateGoHighLevelCalendarEventCreateToolDto.ts +++ b/src/api/types/UpdateGoHighLevelCalendarEventCreateToolDto.ts @@ -29,12 +29,4 @@ export interface UpdateGoHighLevelCalendarEventCreateToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/UpdateGoHighLevelContactCreateToolDto.ts b/src/api/types/UpdateGoHighLevelContactCreateToolDto.ts index 7e26295..d620af1 100644 --- a/src/api/types/UpdateGoHighLevelContactCreateToolDto.ts +++ b/src/api/types/UpdateGoHighLevelContactCreateToolDto.ts @@ -29,12 +29,4 @@ export interface UpdateGoHighLevelContactCreateToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/UpdateGoHighLevelContactGetToolDto.ts b/src/api/types/UpdateGoHighLevelContactGetToolDto.ts index 22e9333..bd9cd8e 100644 --- a/src/api/types/UpdateGoHighLevelContactGetToolDto.ts +++ b/src/api/types/UpdateGoHighLevelContactGetToolDto.ts @@ -29,12 +29,4 @@ export interface UpdateGoHighLevelContactGetToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/UpdateGoogleCalendarCheckAvailabilityToolDto.ts b/src/api/types/UpdateGoogleCalendarCheckAvailabilityToolDto.ts index bca98a4..ea3d008 100644 --- a/src/api/types/UpdateGoogleCalendarCheckAvailabilityToolDto.ts +++ b/src/api/types/UpdateGoogleCalendarCheckAvailabilityToolDto.ts @@ -29,12 +29,4 @@ export interface UpdateGoogleCalendarCheckAvailabilityToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/UpdateGoogleCalendarCreateEventToolDto.ts b/src/api/types/UpdateGoogleCalendarCreateEventToolDto.ts index b18278c..f3908aa 100644 --- a/src/api/types/UpdateGoogleCalendarCreateEventToolDto.ts +++ b/src/api/types/UpdateGoogleCalendarCreateEventToolDto.ts @@ -29,12 +29,4 @@ export interface UpdateGoogleCalendarCreateEventToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/UpdateGoogleSheetsRowAppendToolDto.ts b/src/api/types/UpdateGoogleSheetsRowAppendToolDto.ts index c11a961..8f57f60 100644 --- a/src/api/types/UpdateGoogleSheetsRowAppendToolDto.ts +++ b/src/api/types/UpdateGoogleSheetsRowAppendToolDto.ts @@ -29,12 +29,4 @@ export interface UpdateGoogleSheetsRowAppendToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/UpdateMakeToolDto.ts b/src/api/types/UpdateMakeToolDto.ts index c5b290e..6979c8e 100644 --- a/src/api/types/UpdateMakeToolDto.ts +++ b/src/api/types/UpdateMakeToolDto.ts @@ -29,13 +29,5 @@ export interface UpdateMakeToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; metadata?: Vapi.MakeToolMetadata; } diff --git a/src/api/types/UpdateMcpToolDto.ts b/src/api/types/UpdateMcpToolDto.ts index b16e20a..c9044d2 100644 --- a/src/api/types/UpdateMcpToolDto.ts +++ b/src/api/types/UpdateMcpToolDto.ts @@ -21,6 +21,17 @@ export interface UpdateMcpToolDto { * 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?: Vapi.UpdateMcpToolDtoMessagesItem[]; + /** + * This is the server where a `tool-calls` webhook will be sent. + * + * Notes: + * - Webhook is sent to this server when a tool call is made. + * - Webhook contains the call, assistant, and phone number objects. + * - Webhook contains the variables set on the assistant. + * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + * - Webhook expects a response with tool call result. + */ + server?: Vapi.Server; /** * This is the function definition of the tool. * @@ -29,12 +40,4 @@ export interface UpdateMcpToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/UpdateOutputToolDto.ts b/src/api/types/UpdateOutputToolDto.ts index 84b8b52..7417bc1 100644 --- a/src/api/types/UpdateOutputToolDto.ts +++ b/src/api/types/UpdateOutputToolDto.ts @@ -29,12 +29,4 @@ export interface UpdateOutputToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/UpdateQueryToolDto.ts b/src/api/types/UpdateQueryToolDto.ts index 2fe165e..38fe9e4 100644 --- a/src/api/types/UpdateQueryToolDto.ts +++ b/src/api/types/UpdateQueryToolDto.ts @@ -31,12 +31,4 @@ export interface UpdateQueryToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/UpdateSessionDto.ts b/src/api/types/UpdateSessionDto.ts new file mode 100644 index 0000000..5f680f6 --- /dev/null +++ b/src/api/types/UpdateSessionDto.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vapi from "../index"; + +export interface UpdateSessionDto { + /** This is the new name for the session. Maximum length is 40 characters. */ + name?: string; + /** This is the new status for the session. */ + status?: Vapi.UpdateSessionDtoStatus; + /** Array of updated chat messages */ + messages?: Vapi.UpdateSessionDtoMessagesItem[]; +} diff --git a/src/api/types/UpdateSessionDtoMessagesItem.ts b/src/api/types/UpdateSessionDtoMessagesItem.ts new file mode 100644 index 0000000..982cc23 --- /dev/null +++ b/src/api/types/UpdateSessionDtoMessagesItem.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as Vapi from "../index"; + +export type UpdateSessionDtoMessagesItem = + | Vapi.SystemMessage + | Vapi.UserMessage + | Vapi.AssistantMessage + | Vapi.ToolMessage + | Vapi.DeveloperMessage; diff --git a/src/api/types/UpdateSessionDtoStatus.ts b/src/api/types/UpdateSessionDtoStatus.ts new file mode 100644 index 0000000..064ab2c --- /dev/null +++ b/src/api/types/UpdateSessionDtoStatus.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * This is the new status for the session. + */ +export type UpdateSessionDtoStatus = "active" | "completed"; +export const UpdateSessionDtoStatus = { + Active: "active", + Completed: "completed", +} as const; diff --git a/src/api/types/UpdateSlackSendMessageToolDto.ts b/src/api/types/UpdateSlackSendMessageToolDto.ts index d700b92..28b54e2 100644 --- a/src/api/types/UpdateSlackSendMessageToolDto.ts +++ b/src/api/types/UpdateSlackSendMessageToolDto.ts @@ -29,12 +29,4 @@ export interface UpdateSlackSendMessageToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/UpdateSmsToolDto.ts b/src/api/types/UpdateSmsToolDto.ts index 36b50c8..ca7df6e 100644 --- a/src/api/types/UpdateSmsToolDto.ts +++ b/src/api/types/UpdateSmsToolDto.ts @@ -29,12 +29,4 @@ export interface UpdateSmsToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/UpdateTextEditorToolDto.ts b/src/api/types/UpdateTextEditorToolDto.ts index 010d7b6..5e78f51 100644 --- a/src/api/types/UpdateTextEditorToolDto.ts +++ b/src/api/types/UpdateTextEditorToolDto.ts @@ -23,6 +23,17 @@ export interface UpdateTextEditorToolDto { messages?: Vapi.UpdateTextEditorToolDtoMessagesItem[]; /** The sub type of tool. */ subType?: "text_editor_20241022"; + /** + * This is the server where a `tool-calls` webhook will be sent. + * + * Notes: + * - Webhook is sent to this server when a tool call is made. + * - Webhook contains the call, assistant, and phone number objects. + * - Webhook contains the variables set on the assistant. + * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}. + * - Webhook expects a response with tool call result. + */ + server?: Vapi.Server; /** * This is the function definition of the tool. * @@ -31,14 +42,6 @@ export interface UpdateTextEditorToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; /** The name of the tool, fixed to 'str_replace_editor' */ name?: "str_replace_editor"; } diff --git a/src/api/types/UpdateTransferCallToolDto.ts b/src/api/types/UpdateTransferCallToolDto.ts index de4f47c..566d586 100644 --- a/src/api/types/UpdateTransferCallToolDto.ts +++ b/src/api/types/UpdateTransferCallToolDto.ts @@ -31,12 +31,4 @@ export interface UpdateTransferCallToolDto { * 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?: Vapi.OpenAiFunction; - /** - * 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?: Vapi.Server; } diff --git a/src/api/types/index.ts b/src/api/types/index.ts index 3fa42b7..8554642 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -445,10 +445,36 @@ export * from "./PaginationMeta"; export * from "./CallPaginatedResponse"; export * from "./CreateOutboundCallDto"; export * from "./CreateWebCallDto"; -export * from "./ChatServiceResponse"; -export * from "./ChatCompletionMessageMetadata"; -export * from "./ChatCompletionMessageWorkflows"; -export * from "./ChatCompletionsDto"; +export * from "./DeveloperMessage"; +export * from "./SystemMessage"; +export * from "./UserMessage"; +export * from "./ToolCallFunction"; +export * from "./ToolCall"; +export * from "./AssistantMessage"; +export * from "./ToolMessage"; +export * from "./CreateChatStreamResponse"; +export * from "./ChatInputItem"; +export * from "./ChatInput"; +export * from "./ChatMessagesItem"; +export * from "./ChatOutputItem"; +export * from "./Chat"; +export * from "./ChatPaginatedResponse"; +export * from "./CreateChatDtoInputItem"; +export * from "./CreateChatDtoInput"; +export * from "./CreateChatDto"; +export * from "./OpenAiResponsesRequestInputItem"; +export * from "./OpenAiResponsesRequestInput"; +export * from "./OpenAiResponsesRequest"; +export * from "./CreateSessionDtoStatus"; +export * from "./CreateSessionDtoMessagesItem"; +export * from "./CreateSessionDto"; +export * from "./SessionStatus"; +export * from "./SessionMessagesItem"; +export * from "./Session"; +export * from "./SessionPaginatedResponse"; +export * from "./UpdateSessionDtoStatus"; +export * from "./UpdateSessionDtoMessagesItem"; +export * from "./UpdateSessionDto"; export * from "./AssistantTranscriber"; export * from "./AssistantModel"; export * from "./AssistantVoice"; @@ -863,8 +889,6 @@ export * from "./ClientMessageTranscriptType"; export * from "./ClientMessageTranscriptRole"; export * from "./ClientMessageTranscriptTranscriptType"; export * from "./ClientMessageTranscript"; -export * from "./ToolCallFunction"; -export * from "./ToolCall"; export * from "./ClientMessageToolCallsPhoneNumber"; export * from "./ClientMessageToolCallsToolWithToolCallListItem"; export * from "./ClientMessageToolCalls"; @@ -955,8 +979,6 @@ export * from "./ClientInboundMessageTransferDestination"; export * from "./ClientInboundMessageTransfer"; export * from "./ClientInboundMessageMessage"; export * from "./ClientInboundMessage"; -export * from "./UserMessage"; -export * from "./SystemMessage"; export * from "./BotMessage"; export * from "./ToolCallMessage"; export * from "./TransportCostProvider"; diff --git a/yarn.lock b/yarn.lock index 1680615..e36a843 100644 --- a/yarn.lock +++ b/yarn.lock @@ -20,43 +20,43 @@ picocolors "^1.1.1" "@babel/compat-data@^7.27.2": - version "7.27.2" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.27.2.tgz#4183f9e642fd84e74e3eea7ffa93a412e3b102c9" - integrity sha512-TUtMJYRPyUb/9aU8f3K0mjmjf6M9N5Woshn2CS6nqJSeJtTtQcpLUXjGt9vbF8ZGff0El99sWkLgzwW3VXnxZQ== + version "7.27.3" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.27.3.tgz#cc49c2ac222d69b889bf34c795f537c0c6311111" + integrity sha512-V42wFfx1ymFte+ecf6iXghnnP8kWTO+ZLXIyZq+1LAXHHvTZdVxicn4yiVYdYMGaCO3tmqub11AorKkv+iodqw== "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.27.1.tgz#89de51e86bd12246003e3524704c49541b16c3e6" - integrity sha512-IaaGWsQqfsQWVLqMn9OB92MNN7zukfVA4s7KKAI0KfrrDsZ0yhi5uV4baBuLuN7n3vsZpwP8asPPcVwApxvjBQ== + version "7.27.3" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.27.3.tgz#d7d05502bccede3cab36373ed142e6a1df554c2f" + integrity sha512-hyrN8ivxfvJ4i0fIJuV4EOlV0WDMz5Ui4StRTgVaAvWeiRCilXgwVvxJKtFQ3TKtHgJscB2YiXKGNJuVwhQMtA== dependencies: "@ampproject/remapping" "^2.2.0" "@babel/code-frame" "^7.27.1" - "@babel/generator" "^7.27.1" - "@babel/helper-compilation-targets" "^7.27.1" - "@babel/helper-module-transforms" "^7.27.1" - "@babel/helpers" "^7.27.1" - "@babel/parser" "^7.27.1" - "@babel/template" "^7.27.1" - "@babel/traverse" "^7.27.1" - "@babel/types" "^7.27.1" + "@babel/generator" "^7.27.3" + "@babel/helper-compilation-targets" "^7.27.2" + "@babel/helper-module-transforms" "^7.27.3" + "@babel/helpers" "^7.27.3" + "@babel/parser" "^7.27.3" + "@babel/template" "^7.27.2" + "@babel/traverse" "^7.27.3" + "@babel/types" "^7.27.3" convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.27.1", "@babel/generator@^7.7.2": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.27.1.tgz#862d4fad858f7208edd487c28b58144036b76230" - integrity sha512-UnJfnIpc/+JO0/+KRVQNGU+y5taA5vCbwN8+azkX6beii/ZF+enZJSOKo11ZSzGJjlNfJHfQtmQT8H+9TXPG2w== +"@babel/generator@^7.27.3", "@babel/generator@^7.7.2": + version "7.27.3" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.27.3.tgz#ef1c0f7cfe3b5fc8cbb9f6cc69f93441a68edefc" + integrity sha512-xnlJYj5zepml8NXtjkG0WquFUv8RskFqyFcVgTBp5k+NaA/8uw/K+OSVf8AMGw5e9HKP2ETd5xpK5MLZQD6b4Q== dependencies: - "@babel/parser" "^7.27.1" - "@babel/types" "^7.27.1" + "@babel/parser" "^7.27.3" + "@babel/types" "^7.27.3" "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.25" jsesc "^3.0.2" -"@babel/helper-compilation-targets@^7.27.1": +"@babel/helper-compilation-targets@^7.27.2": version "7.27.2" resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz#46a0f6efab808d51d29ce96858dd10ce8732733d" integrity sha512-2+1thGUUWWjLTYTHZWK1n8Yga0ijBz1XAhUXcKy81rd5g6yh7hGqMp45v7cadSbEHc9G3OTv45SyneRN3ps4DQ== @@ -75,14 +75,14 @@ "@babel/traverse" "^7.27.1" "@babel/types" "^7.27.1" -"@babel/helper-module-transforms@^7.27.1": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.27.1.tgz#e1663b8b71d2de948da5c4fb2a20ca4f3ec27a6f" - integrity sha512-9yHn519/8KvTU5BjTVEEeIM3w9/2yXNKoD82JifINImhpKkARMJKPP59kLo+BafpdN5zgNeIcS4jsGDmd3l58g== +"@babel/helper-module-transforms@^7.27.3": + version "7.27.3" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.27.3.tgz#db0bbcfba5802f9ef7870705a7ef8788508ede02" + integrity sha512-dSOvYwvyLsWBeIRyOeHXp5vPj5l1I011r52FM1+r1jCERv+aFXYk4whgQccYEGYxK2H3ZAIA8nuPkQ0HaUo3qg== dependencies: "@babel/helper-module-imports" "^7.27.1" "@babel/helper-validator-identifier" "^7.27.1" - "@babel/traverse" "^7.27.1" + "@babel/traverse" "^7.27.3" "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.27.1", "@babel/helper-plugin-utils@^7.8.0": version "7.27.1" @@ -104,20 +104,20 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz#fa52f5b1e7db1ab049445b421c4471303897702f" integrity sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg== -"@babel/helpers@^7.27.1": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.27.1.tgz#ffc27013038607cdba3288e692c3611c06a18aa4" - integrity sha512-FCvFTm0sWV8Fxhpp2McP5/W53GPllQ9QeQ7SiqGWjMf/LVG07lFa5+pgK05IRhVwtvafT22KF+ZSnM9I545CvQ== +"@babel/helpers@^7.27.3": + version "7.27.3" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.27.3.tgz#387d65d279290e22fe7a47a8ffcd2d0c0184edd0" + integrity sha512-h/eKy9agOya1IGuLaZ9tEUgz+uIRXcbtOhRtUyyMf8JFmn1iT13vnl/IGVWSkdOCG/pC57U4S1jnAabAavTMwg== dependencies: - "@babel/template" "^7.27.1" - "@babel/types" "^7.27.1" + "@babel/template" "^7.27.2" + "@babel/types" "^7.27.3" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.27.1", "@babel/parser@^7.27.2": - version "7.27.2" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.27.2.tgz#577518bedb17a2ce4212afd052e01f7df0941127" - integrity sha512-QYLs8299NA7WM/bZAdp+CviYYkVoYXlDW2rzliy3chxd1PQjej7JORuMJDJXJUb9g0TT+B99EwaVLKmX+sPXWw== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.27.2", "@babel/parser@^7.27.3": + version "7.27.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.27.3.tgz#1b7533f0d908ad2ac545c4d05cbe2fb6dc8cfaaf" + integrity sha512-xyYxRj6+tLNDTWi0KCBcZ9V7yg3/lwL9DWh9Uwh/RIVlIfFidggcgxKX3GCXwCiswwcGRawBKbEg2LG/Y8eJhw== dependencies: - "@babel/types" "^7.27.1" + "@babel/types" "^7.27.3" "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -238,7 +238,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.27.1" -"@babel/template@^7.27.1", "@babel/template@^7.3.3": +"@babel/template@^7.27.2", "@babel/template@^7.3.3": version "7.27.2" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.27.2.tgz#fa78ceed3c4e7b63ebf6cb39e5852fca45f6809d" integrity sha512-LPDZ85aEJyYSd18/DkjNh4/y1ntkE5KwUHWTiqgRxruuZL2F1yuHligVHLvcHY2vMHXttKFpJn6LwfI7cw7ODw== @@ -247,23 +247,23 @@ "@babel/parser" "^7.27.2" "@babel/types" "^7.27.1" -"@babel/traverse@^7.27.1": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.27.1.tgz#4db772902b133bbddd1c4f7a7ee47761c1b9f291" - integrity sha512-ZCYtZciz1IWJB4U61UPu4KEaqyfj+r5T1Q5mqPo+IBpcG9kHv30Z0aD8LXPgC1trYa6rK0orRyAhqUgk4MjmEg== +"@babel/traverse@^7.27.1", "@babel/traverse@^7.27.3": + version "7.27.3" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.27.3.tgz#8b62a6c2d10f9d921ba7339c90074708509cffae" + integrity sha512-lId/IfN/Ye1CIu8xG7oKBHXd2iNb2aW1ilPszzGcJug6M8RCKfVNcYhpI5+bMvFYjK7lXIM0R+a+6r8xhHp2FQ== dependencies: "@babel/code-frame" "^7.27.1" - "@babel/generator" "^7.27.1" - "@babel/parser" "^7.27.1" - "@babel/template" "^7.27.1" - "@babel/types" "^7.27.1" + "@babel/generator" "^7.27.3" + "@babel/parser" "^7.27.3" + "@babel/template" "^7.27.2" + "@babel/types" "^7.27.3" debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.27.1", "@babel/types@^7.3.3": - version "7.27.1" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.27.1.tgz#9defc53c16fc899e46941fc6901a9eea1c9d8560" - integrity sha512-+EzkxvLNfiUeKMgy/3luqfsCWFRXLb7U6wNQTk60tovuckwB15B191tJWvpp4HjiQWdJkCxO3Wbvc6jlk3Xb2Q== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.27.1", "@babel/types@^7.27.3", "@babel/types@^7.3.3": + version "7.27.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.27.3.tgz#c0257bedf33aad6aad1f406d35c44758321eb3ec" + integrity sha512-Y1GkI4ktrtvmawoSq+4FCVHNryea6uR+qUQy0AGxLSsjCX0nVmkYQMBLHDkXZuo5hGx7eYdnIaslsdBFm7zbUw== dependencies: "@babel/helper-string-parser" "^7.27.1" "@babel/helper-validator-identifier" "^7.27.1" @@ -656,16 +656,16 @@ form-data "^4.0.0" "@types/node@*": - version "22.15.21" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.15.21.tgz#196ef14fe20d87f7caf1e7b39832767f9a995b77" - integrity sha512-EV/37Td6c+MgKAbkcLG6vqZ2zEYHD7bvSrzqqs2RIhbA6w3x+Dqz8MZM3sP6kGTeLrdoOgKZe+Xja7tUB2DNkQ== + version "22.15.23" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.15.23.tgz#a0b7c03f951f1ffe381a6a345c68d80e48043dd0" + integrity sha512-7Ec1zaFPF4RJ0eXu1YT/xgiebqwqoJz8rYPDi/O2BcZ++Wpt0Kq9cl0eg6NN6bYbPnR67ZLo7St5Q3UK0SnARw== dependencies: undici-types "~6.21.0" "@types/node@^18.19.70": - version "18.19.103" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.103.tgz#9bbd31a54e240fc469cca409d7507ebc77536458" - integrity sha512-hHTHp+sEz6SxFsp+SA+Tqrua3AbmlAw+Y//aEwdHrdZkYVRWdvWD3y5uPZ0flYOkgskaFWqZ/YGFm3FaFQ0pRw== + version "18.19.104" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.104.tgz#a515c0c6ea7672473873e73a4cad3d216a081735" + integrity sha512-mqjoYx1RjmN61vjnHWfiWzAlwvBKutoUdm+kYLPnjI5DCh8ZqofUhaTbT3WLl7bt3itR8DuCf8ShnxI0JvIC3g== dependencies: undici-types "~5.26.4" @@ -675,9 +675,9 @@ integrity sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ== "@types/readable-stream@^4.0.18": - version "4.0.19" - resolved "https://registry.yarnpkg.com/@types/readable-stream/-/readable-stream-4.0.19.tgz#e2392f17a9e11aca6e6b21b537aa13bc96a57e46" - integrity sha512-6Tgd3lMocKwOul/kwAAgSebkhdMCLhRvcJ6CKHA6wdql2qNIwK6hw3Y4PZQxn9HcJogoC/1ZOmkFM7OZKH/VrA== + version "4.0.20" + resolved "https://registry.yarnpkg.com/@types/readable-stream/-/readable-stream-4.0.20.tgz#6104b683b4c4db12157b13dca74482b407c58dca" + integrity sha512-eLgbR5KwUh8+6pngBDxS32MymdCsCHnGtwHTrC0GDorbc7NbcnkZAWptDLgZiRk9VRas+B6TyRgPDucq4zRs8g== dependencies: "@types/node" "*" @@ -1309,9 +1309,9 @@ ejs@^3.1.10: jake "^10.8.5" electron-to-chromium@^1.5.149: - version "1.5.157" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.157.tgz#553b122522ac7bba6f1a0dd7d50b14f297736f75" - integrity sha512-/0ybgsQd1muo8QlnuTpKwtl0oX5YMlUGbm8xyqgDU00motRkKFFbUJySAQBWcY79rVqNLWIWa87BGVGClwAB2w== + version "1.5.159" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.159.tgz#b909c4a5dbd00674f18419199f71c945a199effe" + integrity sha512-CEvHptWAMV5p6GJ0Lq8aheyvVbfzVrv5mmidu1D3pidoVNkB3tTBsTMVtPJ+rzRK5oV229mCLz9Zj/hNvU8GBA== emittery@^0.13.1: version "0.13.1" @@ -2895,9 +2895,9 @@ terser-webpack-plugin@^5.3.11: terser "^5.31.1" terser@^5.31.1: - version "5.39.2" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.39.2.tgz#5a1626030724a672e2e5b5c9cd9070308c20e8f9" - integrity sha512-yEPUmWve+VA78bI71BW70Dh0TuV4HHd+I5SHOAfS1+QBOmvmCiiffgjR8ryyEd3KIfvPGFqoADt8LdQ6XpXIvg== + version "5.40.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.40.0.tgz#839a80db42bfee8340085f44ea99b5cba36c55c8" + integrity sha512-cfeKl/jjwSR5ar7d0FGmave9hFGJT8obyo0z+CrQOylLDbk7X81nPU6vq9VORa5jU30SkDnT2FXjLbR8HLP+xA== dependencies: "@jridgewell/source-map" "^0.3.3" acorn "^8.14.0"