@vapi-ai/web 2.3.1 → 2.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/api.ts +1224 -1784
  2. package/dist/api.d.ts +767 -1666
  3. package/dist/api.js +15 -35
  4. package/package.json +1 -1
package/api.ts CHANGED
@@ -204,6 +204,15 @@ export interface Recording {
204
204
  mono?: Mono;
205
205
  }
206
206
 
207
+ export interface NodeArtifact {
208
+ /** This is the node id. */
209
+ nodeName?: string;
210
+ /** This is the messages that were spoken during the node. */
211
+ messages?: object[];
212
+ /** This is the object containing the variables extracted from the node. */
213
+ variables?: object;
214
+ }
215
+
207
216
  export interface Artifact {
208
217
  /** These are the messages that were spoken during the call. */
209
218
  messages?: (UserMessage | SystemMessage | BotMessage | ToolCallMessage | ToolCallResultMessage)[];
@@ -235,6 +244,10 @@ export interface Artifact {
235
244
  transcript?: string;
236
245
  /** This is the packet capture url for the call. This is only available for `phone` type calls where phone number's provider is `vapi` or `byo-phone-number`. */
237
246
  pcapUrl?: string;
247
+ /** This is the history of workflow nodes that were executed during the call. */
248
+ nodes?: NodeArtifact[];
249
+ /** This is the state of variables at the end of the workflow execution. */
250
+ variables?: object;
238
251
  }
239
252
 
240
253
  export interface FallbackTranscriberPlan {
@@ -266,6 +279,13 @@ export interface AssemblyAITranscriber {
266
279
  * @example 0.4
267
280
  */
268
281
  confidenceThreshold?: number;
282
+ /**
283
+ * Uses Assembly AI's new Universal Streaming API. See: https://www.assemblyai.com/docs/speech-to-text/universal-streaming
284
+ *
285
+ * @default false
286
+ * @example false
287
+ */
288
+ enableUniversalStreamingApi?: boolean;
269
289
  /** The WebSocket URL that the transcriber connects to. */
270
290
  realtimeUrl?: string;
271
291
  /** Add up to 2500 characters of custom vocabulary. */
@@ -937,7 +957,7 @@ export interface GladiaTranscriber {
937
957
  /** This is the transcription provider that will be used. */
938
958
  provider: 'gladia';
939
959
  /** This is the Gladia model that will be used. Default is 'fast' */
940
- model?: 'fast' | 'accurate';
960
+ model?: 'fast' | 'accurate' | 'solaria-1';
941
961
  /** Defines how the transcription model detects the audio language. Default value is 'automatic single language'. */
942
962
  languageBehaviour?: 'manual' | 'automatic single language' | 'automatic multiple languages';
943
963
  /** Defines the language to use for the transcription. Required when languageBehaviour is 'manual'. */
@@ -1041,6 +1061,107 @@ export interface GladiaTranscriber {
1041
1061
  | 'cy'
1042
1062
  | 'yi'
1043
1063
  | 'yo';
1064
+ /** Defines the languages to use for the transcription. Required when languageBehaviour is 'manual'. */
1065
+ languages?:
1066
+ | 'af'
1067
+ | 'sq'
1068
+ | 'am'
1069
+ | 'ar'
1070
+ | 'hy'
1071
+ | 'as'
1072
+ | 'az'
1073
+ | 'ba'
1074
+ | 'eu'
1075
+ | 'be'
1076
+ | 'bn'
1077
+ | 'bs'
1078
+ | 'br'
1079
+ | 'bg'
1080
+ | 'ca'
1081
+ | 'zh'
1082
+ | 'hr'
1083
+ | 'cs'
1084
+ | 'da'
1085
+ | 'nl'
1086
+ | 'en'
1087
+ | 'et'
1088
+ | 'fo'
1089
+ | 'fi'
1090
+ | 'fr'
1091
+ | 'gl'
1092
+ | 'ka'
1093
+ | 'de'
1094
+ | 'el'
1095
+ | 'gu'
1096
+ | 'ht'
1097
+ | 'ha'
1098
+ | 'haw'
1099
+ | 'he'
1100
+ | 'hi'
1101
+ | 'hu'
1102
+ | 'is'
1103
+ | 'id'
1104
+ | 'it'
1105
+ | 'ja'
1106
+ | 'jv'
1107
+ | 'kn'
1108
+ | 'kk'
1109
+ | 'km'
1110
+ | 'ko'
1111
+ | 'lo'
1112
+ | 'la'
1113
+ | 'lv'
1114
+ | 'ln'
1115
+ | 'lt'
1116
+ | 'lb'
1117
+ | 'mk'
1118
+ | 'mg'
1119
+ | 'ms'
1120
+ | 'ml'
1121
+ | 'mt'
1122
+ | 'mi'
1123
+ | 'mr'
1124
+ | 'mn'
1125
+ | 'my'
1126
+ | 'ne'
1127
+ | 'no'
1128
+ | 'nn'
1129
+ | 'oc'
1130
+ | 'ps'
1131
+ | 'fa'
1132
+ | 'pl'
1133
+ | 'pt'
1134
+ | 'pa'
1135
+ | 'ro'
1136
+ | 'ru'
1137
+ | 'sa'
1138
+ | 'sr'
1139
+ | 'sn'
1140
+ | 'sd'
1141
+ | 'si'
1142
+ | 'sk'
1143
+ | 'sl'
1144
+ | 'so'
1145
+ | 'es'
1146
+ | 'su'
1147
+ | 'sw'
1148
+ | 'sv'
1149
+ | 'tl'
1150
+ | 'tg'
1151
+ | 'ta'
1152
+ | 'tt'
1153
+ | 'te'
1154
+ | 'th'
1155
+ | 'bo'
1156
+ | 'tr'
1157
+ | 'tk'
1158
+ | 'uk'
1159
+ | 'ur'
1160
+ | 'uz'
1161
+ | 'vi'
1162
+ | 'cy'
1163
+ | 'yi'
1164
+ | 'yo';
1044
1165
  /**
1045
1166
  * Provides a custom vocabulary to the model to improve accuracy of transcribing context specific words, technical terms, names, etc. If empty, this argument is ignored.
1046
1167
  * ⚠️ Warning ⚠️: Please be aware that the transcription_hint field has a character limit of 600. If you provide a transcription_hint longer than 600 characters, it will be automatically truncated to meet this limit.
@@ -1254,6 +1375,7 @@ export interface GoogleTranscriber {
1254
1375
  /** This is the model that will be used for the transcription. */
1255
1376
  model?:
1256
1377
  | 'gemini-2.5-pro-preview-05-06'
1378
+ | 'gemini-2.5-flash-preview-05-20'
1257
1379
  | 'gemini-2.5-flash-preview-04-17'
1258
1380
  | 'gemini-2.0-flash-thinking-exp'
1259
1381
  | 'gemini-2.0-pro-exp-02-05'
@@ -1394,6 +1516,13 @@ export interface FallbackAssemblyAITranscriber {
1394
1516
  * @example 0.4
1395
1517
  */
1396
1518
  confidenceThreshold?: number;
1519
+ /**
1520
+ * Uses Assembly AI's new Universal Streaming API. See: https://www.assemblyai.com/docs/speech-to-text/universal-streaming
1521
+ *
1522
+ * @default false
1523
+ * @example false
1524
+ */
1525
+ enableUniversalStreamingApi?: boolean;
1397
1526
  /** The WebSocket URL that the transcriber connects to. */
1398
1527
  realtimeUrl?: string;
1399
1528
  /** Add up to 2500 characters of custom vocabulary. */
@@ -2003,7 +2132,7 @@ export interface FallbackGladiaTranscriber {
2003
2132
  /** This is the transcription provider that will be used. */
2004
2133
  provider: 'gladia';
2005
2134
  /** This is the Gladia model that will be used. Default is 'fast' */
2006
- model?: 'fast' | 'accurate';
2135
+ model?: 'fast' | 'accurate' | 'solaria-1';
2007
2136
  /** Defines how the transcription model detects the audio language. Default value is 'automatic single language'. */
2008
2137
  languageBehaviour?: 'manual' | 'automatic single language' | 'automatic multiple languages';
2009
2138
  /** Defines the language to use for the transcription. Required when languageBehaviour is 'manual'. */
@@ -2107,6 +2236,107 @@ export interface FallbackGladiaTranscriber {
2107
2236
  | 'cy'
2108
2237
  | 'yi'
2109
2238
  | 'yo';
2239
+ /** Defines the languages to use for the transcription. Required when languageBehaviour is 'manual'. */
2240
+ languages?:
2241
+ | 'af'
2242
+ | 'sq'
2243
+ | 'am'
2244
+ | 'ar'
2245
+ | 'hy'
2246
+ | 'as'
2247
+ | 'az'
2248
+ | 'ba'
2249
+ | 'eu'
2250
+ | 'be'
2251
+ | 'bn'
2252
+ | 'bs'
2253
+ | 'br'
2254
+ | 'bg'
2255
+ | 'ca'
2256
+ | 'zh'
2257
+ | 'hr'
2258
+ | 'cs'
2259
+ | 'da'
2260
+ | 'nl'
2261
+ | 'en'
2262
+ | 'et'
2263
+ | 'fo'
2264
+ | 'fi'
2265
+ | 'fr'
2266
+ | 'gl'
2267
+ | 'ka'
2268
+ | 'de'
2269
+ | 'el'
2270
+ | 'gu'
2271
+ | 'ht'
2272
+ | 'ha'
2273
+ | 'haw'
2274
+ | 'he'
2275
+ | 'hi'
2276
+ | 'hu'
2277
+ | 'is'
2278
+ | 'id'
2279
+ | 'it'
2280
+ | 'ja'
2281
+ | 'jv'
2282
+ | 'kn'
2283
+ | 'kk'
2284
+ | 'km'
2285
+ | 'ko'
2286
+ | 'lo'
2287
+ | 'la'
2288
+ | 'lv'
2289
+ | 'ln'
2290
+ | 'lt'
2291
+ | 'lb'
2292
+ | 'mk'
2293
+ | 'mg'
2294
+ | 'ms'
2295
+ | 'ml'
2296
+ | 'mt'
2297
+ | 'mi'
2298
+ | 'mr'
2299
+ | 'mn'
2300
+ | 'my'
2301
+ | 'ne'
2302
+ | 'no'
2303
+ | 'nn'
2304
+ | 'oc'
2305
+ | 'ps'
2306
+ | 'fa'
2307
+ | 'pl'
2308
+ | 'pt'
2309
+ | 'pa'
2310
+ | 'ro'
2311
+ | 'ru'
2312
+ | 'sa'
2313
+ | 'sr'
2314
+ | 'sn'
2315
+ | 'sd'
2316
+ | 'si'
2317
+ | 'sk'
2318
+ | 'sl'
2319
+ | 'so'
2320
+ | 'es'
2321
+ | 'su'
2322
+ | 'sw'
2323
+ | 'sv'
2324
+ | 'tl'
2325
+ | 'tg'
2326
+ | 'ta'
2327
+ | 'tt'
2328
+ | 'te'
2329
+ | 'th'
2330
+ | 'bo'
2331
+ | 'tr'
2332
+ | 'tk'
2333
+ | 'uk'
2334
+ | 'ur'
2335
+ | 'uz'
2336
+ | 'vi'
2337
+ | 'cy'
2338
+ | 'yi'
2339
+ | 'yo';
2110
2340
  /**
2111
2341
  * Provides a custom vocabulary to the model to improve accuracy of transcribing context specific words, technical terms, names, etc. If empty, this argument is ignored.
2112
2342
  * ⚠️ Warning ⚠️: Please be aware that the transcription_hint field has a character limit of 600. If you provide a transcription_hint longer than 600 characters, it will be automatically truncated to meet this limit.
@@ -2314,6 +2544,7 @@ export interface FallbackGoogleTranscriber {
2314
2544
  /** This is the model that will be used for the transcription. */
2315
2545
  model?:
2316
2546
  | 'gemini-2.5-pro-preview-05-06'
2547
+ | 'gemini-2.5-flash-preview-05-20'
2317
2548
  | 'gemini-2.5-flash-preview-04-17'
2318
2549
  | 'gemini-2.0-flash-thinking-exp'
2319
2550
  | 'gemini-2.0-pro-exp-02-05'
@@ -2855,8 +3086,6 @@ export interface JsonSchema {
2855
3086
  * This only makes sense if the type is "object".
2856
3087
  */
2857
3088
  required?: string[];
2858
- /** This is a regex that will be used to validate data in question. */
2859
- regex?: string;
2860
3089
  /** This the value that will be used in filling the property. */
2861
3090
  value?: string;
2862
3091
  /** This the target variable that will be filled with the value of this property. */
@@ -2910,17 +3139,6 @@ export interface OpenAIFunction {
2910
3139
  }
2911
3140
 
2912
3141
  export interface CreateDtmfToolDTO {
2913
- /**
2914
- * This determines if the tool is async.
2915
- *
2916
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
2917
- *
2918
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
2919
- *
2920
- * Defaults to synchronous (`false`).
2921
- * @example false
2922
- */
2923
- async?: boolean;
2924
3142
  /**
2925
3143
  * These are the messages that will be spoken to the user as the tool is running.
2926
3144
  *
@@ -2937,28 +3155,9 @@ export interface CreateDtmfToolDTO {
2937
3155
  * 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.
2938
3156
  */
2939
3157
  function?: OpenAIFunction;
2940
- /**
2941
- * This is the server that will be hit when this tool is requested by the model.
2942
- *
2943
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
2944
- *
2945
- * 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.
2946
- */
2947
- server?: Server;
2948
3158
  }
2949
3159
 
2950
3160
  export interface CreateEndCallToolDTO {
2951
- /**
2952
- * This determines if the tool is async.
2953
- *
2954
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
2955
- *
2956
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
2957
- *
2958
- * Defaults to synchronous (`false`).
2959
- * @example false
2960
- */
2961
- async?: boolean;
2962
3161
  /**
2963
3162
  * These are the messages that will be spoken to the user as the tool is running.
2964
3163
  *
@@ -2975,28 +3174,9 @@ export interface CreateEndCallToolDTO {
2975
3174
  * 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.
2976
3175
  */
2977
3176
  function?: OpenAIFunction;
2978
- /**
2979
- * This is the server that will be hit when this tool is requested by the model.
2980
- *
2981
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
2982
- *
2983
- * 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.
2984
- */
2985
- server?: Server;
2986
3177
  }
2987
3178
 
2988
3179
  export interface CreateVoicemailToolDTO {
2989
- /**
2990
- * This determines if the tool is async.
2991
- *
2992
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
2993
- *
2994
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
2995
- *
2996
- * Defaults to synchronous (`false`).
2997
- * @example false
2998
- */
2999
- async?: boolean;
3000
3180
  /**
3001
3181
  * These are the messages that will be spoken to the user as the tool is running.
3002
3182
  *
@@ -3016,52 +3196,48 @@ export interface CreateVoicemailToolDTO {
3016
3196
  * 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.
3017
3197
  */
3018
3198
  function?: OpenAIFunction;
3019
- /**
3020
- * This is the server that will be hit when this tool is requested by the model.
3021
- *
3022
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
3023
- *
3024
- * 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.
3025
- */
3026
- server?: Server;
3027
3199
  }
3028
3200
 
3029
3201
  export interface CreateFunctionToolDTO {
3030
3202
  /**
3031
- * This determines if the tool is async.
3032
- *
3033
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
3034
- *
3035
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
3203
+ * These are the messages that will be spoken to the user as the tool is running.
3036
3204
  *
3037
- * Defaults to synchronous (`false`).
3038
- * @example false
3039
- */
3040
- async?: boolean;
3041
- /**
3042
- * These are the messages that will be spoken to the user as the tool is running.
3043
- *
3044
- * 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.
3205
+ * 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.
3045
3206
  */
3046
3207
  messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
3047
3208
  /** The type of tool. "function" for Function tool. */
3048
3209
  type: 'function';
3049
3210
  /**
3050
- * This is the function definition of the tool.
3211
+ * This determines if the tool is async.
3051
3212
  *
3052
- * For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases.
3213
+ * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
3053
3214
  *
3054
- * 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.
3215
+ * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
3216
+ *
3217
+ * Defaults to synchronous (`false`).
3218
+ * @example false
3055
3219
  */
3056
- function?: OpenAIFunction;
3220
+ async?: boolean;
3057
3221
  /**
3058
- * This is the server that will be hit when this tool is requested by the model.
3059
3222
  *
3060
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
3223
+ * This is the server where a `tool-calls` webhook will be sent.
3061
3224
  *
3062
- * 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.
3225
+ * Notes:
3226
+ * - Webhook is sent to this server when a tool call is made.
3227
+ * - Webhook contains the call, assistant, and phone number objects.
3228
+ * - Webhook contains the variables set on the assistant.
3229
+ * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.
3230
+ * - Webhook expects a response with tool call result.
3063
3231
  */
3064
3232
  server?: Server;
3233
+ /**
3234
+ * This is the function definition of the tool.
3235
+ *
3236
+ * For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases.
3237
+ *
3238
+ * 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.
3239
+ */
3240
+ function?: OpenAIFunction;
3065
3241
  }
3066
3242
 
3067
3243
  export interface GhlToolMetadata {
@@ -3070,17 +3246,6 @@ export interface GhlToolMetadata {
3070
3246
  }
3071
3247
 
3072
3248
  export interface CreateGhlToolDTO {
3073
- /**
3074
- * This determines if the tool is async.
3075
- *
3076
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
3077
- *
3078
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
3079
- *
3080
- * Defaults to synchronous (`false`).
3081
- * @example false
3082
- */
3083
- async?: boolean;
3084
3249
  /**
3085
3250
  * These are the messages that will be spoken to the user as the tool is running.
3086
3251
  *
@@ -3098,14 +3263,6 @@ export interface CreateGhlToolDTO {
3098
3263
  * 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.
3099
3264
  */
3100
3265
  function?: OpenAIFunction;
3101
- /**
3102
- * This is the server that will be hit when this tool is requested by the model.
3103
- *
3104
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
3105
- *
3106
- * 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.
3107
- */
3108
- server?: Server;
3109
3266
  }
3110
3267
 
3111
3268
  export interface MakeToolMetadata {
@@ -3114,17 +3271,6 @@ export interface MakeToolMetadata {
3114
3271
  }
3115
3272
 
3116
3273
  export interface CreateMakeToolDTO {
3117
- /**
3118
- * This determines if the tool is async.
3119
- *
3120
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
3121
- *
3122
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
3123
- *
3124
- * Defaults to synchronous (`false`).
3125
- * @example false
3126
- */
3127
- async?: boolean;
3128
3274
  /**
3129
3275
  * These are the messages that will be spoken to the user as the tool is running.
3130
3276
  *
@@ -3142,14 +3288,6 @@ export interface CreateMakeToolDTO {
3142
3288
  * 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.
3143
3289
  */
3144
3290
  function?: OpenAIFunction;
3145
- /**
3146
- * This is the server that will be hit when this tool is requested by the model.
3147
- *
3148
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
3149
- *
3150
- * 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.
3151
- */
3152
- server?: Server;
3153
3291
  }
3154
3292
 
3155
3293
  export interface CustomMessage {
@@ -3375,6 +3513,15 @@ export interface TransferPlan {
3375
3513
  * - Used only when `mode` is `blind-transfer-add-summary-to-sip-header`, `warm-transfer-say-message`, `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`, or `warm-transfer-experimental`.
3376
3514
  */
3377
3515
  message?: string | CustomMessage;
3516
+ /**
3517
+ * This is the timeout in seconds for the warm-transfer-wait-for-operator-to-speak-first-and-then-say-message/summary
3518
+ *
3519
+ * @default 60
3520
+ * @min 1
3521
+ * @max 600
3522
+ * @default 60
3523
+ */
3524
+ timeout?: number;
3378
3525
  /**
3379
3526
  * This specifies the SIP verb to use while transferring the call.
3380
3527
  * - 'refer': Uses SIP REFER to transfer the call (default)
@@ -3394,6 +3541,17 @@ export interface TransferPlan {
3394
3541
  * - If not provided, the default hold audio will be used.
3395
3542
  */
3396
3543
  holdAudioUrl?: string;
3544
+ /**
3545
+ * This is the URL to an audio file played after the warm transfer message or summary is delivered to the destination party.
3546
+ * It can be used to play a custom sound like 'beep' to notify that the transfer is complete.
3547
+ *
3548
+ * Usage:
3549
+ * - Used only when `mode` is `warm-transfer-experimental`.
3550
+ * - Used when transferring calls to play hold audio for the destination party.
3551
+ * - Must be a publicly accessible URL to an audio file.
3552
+ * - Supported formats: MP3 and WAV.
3553
+ */
3554
+ transferCompleteAudioUrl?: string;
3397
3555
  /**
3398
3556
  * This is the TwiML instructions to execute on the destination call leg before connecting the customer.
3399
3557
  *
@@ -3522,17 +3680,6 @@ export interface TransferDestinationSip {
3522
3680
  }
3523
3681
 
3524
3682
  export interface CreateTransferCallToolDTO {
3525
- /**
3526
- * This determines if the tool is async.
3527
- *
3528
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
3529
- *
3530
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
3531
- *
3532
- * Defaults to synchronous (`false`).
3533
- * @example false
3534
- */
3535
- async?: boolean;
3536
3683
  /**
3537
3684
  * These are the messages that will be spoken to the user as the tool is running.
3538
3685
  *
@@ -3554,14 +3701,6 @@ export interface CreateTransferCallToolDTO {
3554
3701
  * 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.
3555
3702
  */
3556
3703
  function?: OpenAIFunction;
3557
- /**
3558
- * This is the server that will be hit when this tool is requested by the model.
3559
- *
3560
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
3561
- *
3562
- * 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.
3563
- */
3564
- server?: Server;
3565
3704
  }
3566
3705
 
3567
3706
  export interface CreateCustomKnowledgeBaseDTO {
@@ -3625,6 +3764,7 @@ export interface KnowledgeBase {
3625
3764
  /** The model to use for the knowledge base */
3626
3765
  model?:
3627
3766
  | 'gemini-2.5-pro-preview-05-06'
3767
+ | 'gemini-2.5-flash-preview-05-20'
3628
3768
  | 'gemini-2.5-flash-preview-04-17'
3629
3769
  | 'gemini-2.0-flash-thinking-exp'
3630
3770
  | 'gemini-2.0-pro-exp-02-05'
@@ -3645,17 +3785,6 @@ export interface KnowledgeBase {
3645
3785
  }
3646
3786
 
3647
3787
  export interface CreateQueryToolDTO {
3648
- /**
3649
- * This determines if the tool is async.
3650
- *
3651
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
3652
- *
3653
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
3654
- *
3655
- * Defaults to synchronous (`false`).
3656
- * @example false
3657
- */
3658
- async?: boolean;
3659
3788
  /**
3660
3789
  * These are the messages that will be spoken to the user as the tool is running.
3661
3790
  *
@@ -3674,28 +3803,9 @@ export interface CreateQueryToolDTO {
3674
3803
  * 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.
3675
3804
  */
3676
3805
  function?: OpenAIFunction;
3677
- /**
3678
- * This is the server that will be hit when this tool is requested by the model.
3679
- *
3680
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
3681
- *
3682
- * 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.
3683
- */
3684
- server?: Server;
3685
3806
  }
3686
3807
 
3687
3808
  export interface CreateGoogleCalendarCreateEventToolDTO {
3688
- /**
3689
- * This determines if the tool is async.
3690
- *
3691
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
3692
- *
3693
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
3694
- *
3695
- * Defaults to synchronous (`false`).
3696
- * @example false
3697
- */
3698
- async?: boolean;
3699
3809
  /**
3700
3810
  * These are the messages that will be spoken to the user as the tool is running.
3701
3811
  *
@@ -3712,28 +3822,9 @@ export interface CreateGoogleCalendarCreateEventToolDTO {
3712
3822
  * 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.
3713
3823
  */
3714
3824
  function?: OpenAIFunction;
3715
- /**
3716
- * This is the server that will be hit when this tool is requested by the model.
3717
- *
3718
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
3719
- *
3720
- * 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.
3721
- */
3722
- server?: Server;
3723
3825
  }
3724
3826
 
3725
3827
  export interface CreateGoogleSheetsRowAppendToolDTO {
3726
- /**
3727
- * This determines if the tool is async.
3728
- *
3729
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
3730
- *
3731
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
3732
- *
3733
- * Defaults to synchronous (`false`).
3734
- * @example false
3735
- */
3736
- async?: boolean;
3737
3828
  /**
3738
3829
  * These are the messages that will be spoken to the user as the tool is running.
3739
3830
  *
@@ -3750,28 +3841,9 @@ export interface CreateGoogleSheetsRowAppendToolDTO {
3750
3841
  * 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.
3751
3842
  */
3752
3843
  function?: OpenAIFunction;
3753
- /**
3754
- * This is the server that will be hit when this tool is requested by the model.
3755
- *
3756
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
3757
- *
3758
- * 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.
3759
- */
3760
- server?: Server;
3761
3844
  }
3762
3845
 
3763
3846
  export interface CreateGoogleCalendarCheckAvailabilityToolDTO {
3764
- /**
3765
- * This determines if the tool is async.
3766
- *
3767
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
3768
- *
3769
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
3770
- *
3771
- * Defaults to synchronous (`false`).
3772
- * @example false
3773
- */
3774
- async?: boolean;
3775
3847
  /**
3776
3848
  * These are the messages that will be spoken to the user as the tool is running.
3777
3849
  *
@@ -3788,28 +3860,9 @@ export interface CreateGoogleCalendarCheckAvailabilityToolDTO {
3788
3860
  * 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.
3789
3861
  */
3790
3862
  function?: OpenAIFunction;
3791
- /**
3792
- * This is the server that will be hit when this tool is requested by the model.
3793
- *
3794
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
3795
- *
3796
- * 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.
3797
- */
3798
- server?: Server;
3799
3863
  }
3800
3864
 
3801
3865
  export interface CreateSlackSendMessageToolDTO {
3802
- /**
3803
- * This determines if the tool is async.
3804
- *
3805
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
3806
- *
3807
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
3808
- *
3809
- * Defaults to synchronous (`false`).
3810
- * @example false
3811
- */
3812
- async?: boolean;
3813
3866
  /**
3814
3867
  * These are the messages that will be spoken to the user as the tool is running.
3815
3868
  *
@@ -3826,28 +3879,9 @@ export interface CreateSlackSendMessageToolDTO {
3826
3879
  * 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.
3827
3880
  */
3828
3881
  function?: OpenAIFunction;
3829
- /**
3830
- * This is the server that will be hit when this tool is requested by the model.
3831
- *
3832
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
3833
- *
3834
- * 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.
3835
- */
3836
- server?: Server;
3837
3882
  }
3838
3883
 
3839
3884
  export interface CreateMcpToolDTO {
3840
- /**
3841
- * This determines if the tool is async.
3842
- *
3843
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
3844
- *
3845
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
3846
- *
3847
- * Defaults to synchronous (`false`).
3848
- * @example false
3849
- */
3850
- async?: boolean;
3851
3885
  /**
3852
3886
  * These are the messages that will be spoken to the user as the tool is running.
3853
3887
  *
@@ -3857,35 +3891,28 @@ export interface CreateMcpToolDTO {
3857
3891
  /** The type of tool. "mcp" for MCP tool. */
3858
3892
  type: 'mcp';
3859
3893
  /**
3860
- * This is the function definition of the tool.
3861
3894
  *
3862
- * For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases.
3895
+ * This is the server where a `tool-calls` webhook will be sent.
3863
3896
  *
3864
- * 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.
3897
+ * Notes:
3898
+ * - Webhook is sent to this server when a tool call is made.
3899
+ * - Webhook contains the call, assistant, and phone number objects.
3900
+ * - Webhook contains the variables set on the assistant.
3901
+ * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.
3902
+ * - Webhook expects a response with tool call result.
3865
3903
  */
3866
- function?: OpenAIFunction;
3904
+ server?: Server;
3867
3905
  /**
3868
- * This is the server that will be hit when this tool is requested by the model.
3906
+ * This is the function definition of the tool.
3869
3907
  *
3870
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
3908
+ * For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases.
3871
3909
  *
3872
- * 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.
3910
+ * 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.
3873
3911
  */
3874
- server?: Server;
3912
+ function?: OpenAIFunction;
3875
3913
  }
3876
3914
 
3877
3915
  export interface CreateGoHighLevelCalendarAvailabilityToolDTO {
3878
- /**
3879
- * This determines if the tool is async.
3880
- *
3881
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
3882
- *
3883
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
3884
- *
3885
- * Defaults to synchronous (`false`).
3886
- * @example false
3887
- */
3888
- async?: boolean;
3889
3916
  /**
3890
3917
  * These are the messages that will be spoken to the user as the tool is running.
3891
3918
  *
@@ -3902,28 +3929,9 @@ export interface CreateGoHighLevelCalendarAvailabilityToolDTO {
3902
3929
  * 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.
3903
3930
  */
3904
3931
  function?: OpenAIFunction;
3905
- /**
3906
- * This is the server that will be hit when this tool is requested by the model.
3907
- *
3908
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
3909
- *
3910
- * 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.
3911
- */
3912
- server?: Server;
3913
3932
  }
3914
3933
 
3915
3934
  export interface CreateGoHighLevelCalendarEventCreateToolDTO {
3916
- /**
3917
- * This determines if the tool is async.
3918
- *
3919
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
3920
- *
3921
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
3922
- *
3923
- * Defaults to synchronous (`false`).
3924
- * @example false
3925
- */
3926
- async?: boolean;
3927
3935
  /**
3928
3936
  * These are the messages that will be spoken to the user as the tool is running.
3929
3937
  *
@@ -3940,28 +3948,9 @@ export interface CreateGoHighLevelCalendarEventCreateToolDTO {
3940
3948
  * 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.
3941
3949
  */
3942
3950
  function?: OpenAIFunction;
3943
- /**
3944
- * This is the server that will be hit when this tool is requested by the model.
3945
- *
3946
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
3947
- *
3948
- * 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.
3949
- */
3950
- server?: Server;
3951
3951
  }
3952
3952
 
3953
3953
  export interface CreateGoHighLevelContactCreateToolDTO {
3954
- /**
3955
- * This determines if the tool is async.
3956
- *
3957
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
3958
- *
3959
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
3960
- *
3961
- * Defaults to synchronous (`false`).
3962
- * @example false
3963
- */
3964
- async?: boolean;
3965
3954
  /**
3966
3955
  * These are the messages that will be spoken to the user as the tool is running.
3967
3956
  *
@@ -3978,28 +3967,9 @@ export interface CreateGoHighLevelContactCreateToolDTO {
3978
3967
  * 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.
3979
3968
  */
3980
3969
  function?: OpenAIFunction;
3981
- /**
3982
- * This is the server that will be hit when this tool is requested by the model.
3983
- *
3984
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
3985
- *
3986
- * 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.
3987
- */
3988
- server?: Server;
3989
3970
  }
3990
3971
 
3991
3972
  export interface CreateGoHighLevelContactGetToolDTO {
3992
- /**
3993
- * This determines if the tool is async.
3994
- *
3995
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
3996
- *
3997
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
3998
- *
3999
- * Defaults to synchronous (`false`).
4000
- * @example false
4001
- */
4002
- async?: boolean;
4003
3973
  /**
4004
3974
  * These are the messages that will be spoken to the user as the tool is running.
4005
3975
  *
@@ -4016,14 +3986,6 @@ export interface CreateGoHighLevelContactGetToolDTO {
4016
3986
  * 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.
4017
3987
  */
4018
3988
  function?: OpenAIFunction;
4019
- /**
4020
- * This is the server that will be hit when this tool is requested by the model.
4021
- *
4022
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
4023
- *
4024
- * 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.
4025
- */
4026
- server?: Server;
4027
3989
  }
4028
3990
 
4029
3991
  export interface AnyscaleModel {
@@ -4594,6 +4556,7 @@ export interface GoogleModel {
4594
4556
  /** This is the Google model that will be used. */
4595
4557
  model:
4596
4558
  | 'gemini-2.5-pro-preview-05-06'
4559
+ | 'gemini-2.5-flash-preview-05-20'
4597
4560
  | 'gemini-2.5-flash-preview-04-17'
4598
4561
  | 'gemini-2.0-flash-thinking-exp'
4599
4562
  | 'gemini-2.0-pro-exp-02-05'
@@ -4843,8 +4806,18 @@ export interface OpenAIModel {
4843
4806
  knowledgeBaseId?: string;
4844
4807
  /** This is the provider that will be used for the model. */
4845
4808
  provider: 'openai';
4846
- /** This is the OpenAI model that will be used. */
4809
+ /**
4810
+ * This is the OpenAI model that will be used.
4811
+ *
4812
+ * When using Vapi OpenAI or your own Azure Credentials, you have the option to specify the region for the selected model. This shouldn't be specified unless you have a specific reason to do so. Vapi will automatically find the fastest region that make sense.
4813
+ * This is helpful when you are required to comply with Data Residency rules. Learn more about Azure regions here https://azure.microsoft.com/en-us/explore/global-infrastructure/data-residency/.
4814
+ *
4815
+ * @default undefined
4816
+ */
4847
4817
  model:
4818
+ | 'gpt-4.1-2025-04-14'
4819
+ | 'gpt-4.1-mini-2025-04-14'
4820
+ | 'gpt-4.1-nano-2025-04-14'
4848
4821
  | 'gpt-4.1'
4849
4822
  | 'gpt-4.1-mini'
4850
4823
  | 'gpt-4.1-nano'
@@ -4877,12 +4850,75 @@ export interface OpenAIModel {
4877
4850
  | 'gpt-3.5-turbo-0125'
4878
4851
  | 'gpt-3.5-turbo-1106'
4879
4852
  | 'gpt-3.5-turbo-16k'
4880
- | 'gpt-3.5-turbo-0613';
4853
+ | 'gpt-3.5-turbo-0613'
4854
+ | 'gpt-4.1-2025-04-14:westus'
4855
+ | 'gpt-4.1-2025-04-14:eastus2'
4856
+ | 'gpt-4.1-2025-04-14:eastus'
4857
+ | 'gpt-4.1-2025-04-14:westus3'
4858
+ | 'gpt-4.1-2025-04-14:northcentralus'
4859
+ | 'gpt-4.1-2025-04-14:southcentralus'
4860
+ | 'gpt-4.1-mini-2025-04-14:westus'
4861
+ | 'gpt-4.1-mini-2025-04-14:eastus2'
4862
+ | 'gpt-4.1-mini-2025-04-14:eastus'
4863
+ | 'gpt-4.1-mini-2025-04-14:westus3'
4864
+ | 'gpt-4.1-mini-2025-04-14:northcentralus'
4865
+ | 'gpt-4.1-mini-2025-04-14:southcentralus'
4866
+ | 'gpt-4.1-nano-2025-04-14:westus'
4867
+ | 'gpt-4.1-nano-2025-04-14:eastus2'
4868
+ | 'gpt-4.1-nano-2025-04-14:westus3'
4869
+ | 'gpt-4.1-nano-2025-04-14:northcentralus'
4870
+ | 'gpt-4.1-nano-2025-04-14:southcentralus'
4871
+ | 'gpt-4o-2024-11-20:swedencentral'
4872
+ | 'gpt-4o-2024-11-20:westus'
4873
+ | 'gpt-4o-2024-11-20:eastus2'
4874
+ | 'gpt-4o-2024-11-20:eastus'
4875
+ | 'gpt-4o-2024-11-20:westus3'
4876
+ | 'gpt-4o-2024-11-20:southcentralus'
4877
+ | 'gpt-4o-2024-08-06:westus'
4878
+ | 'gpt-4o-2024-08-06:westus3'
4879
+ | 'gpt-4o-2024-08-06:eastus'
4880
+ | 'gpt-4o-2024-08-06:eastus2'
4881
+ | 'gpt-4o-2024-08-06:northcentralus'
4882
+ | 'gpt-4o-2024-08-06:southcentralus'
4883
+ | 'gpt-4o-mini-2024-07-18:westus'
4884
+ | 'gpt-4o-mini-2024-07-18:westus3'
4885
+ | 'gpt-4o-mini-2024-07-18:eastus'
4886
+ | 'gpt-4o-mini-2024-07-18:eastus2'
4887
+ | 'gpt-4o-mini-2024-07-18:northcentralus'
4888
+ | 'gpt-4o-mini-2024-07-18:southcentralus'
4889
+ | 'gpt-4o-2024-05-13:eastus2'
4890
+ | 'gpt-4o-2024-05-13:eastus'
4891
+ | 'gpt-4o-2024-05-13:northcentralus'
4892
+ | 'gpt-4o-2024-05-13:southcentralus'
4893
+ | 'gpt-4o-2024-05-13:westus3'
4894
+ | 'gpt-4o-2024-05-13:westus'
4895
+ | 'gpt-4-turbo-2024-04-09:eastus2'
4896
+ | 'gpt-4-0125-preview:eastus'
4897
+ | 'gpt-4-0125-preview:northcentralus'
4898
+ | 'gpt-4-0125-preview:southcentralus'
4899
+ | 'gpt-4-1106-preview:australia'
4900
+ | 'gpt-4-1106-preview:canadaeast'
4901
+ | 'gpt-4-1106-preview:france'
4902
+ | 'gpt-4-1106-preview:india'
4903
+ | 'gpt-4-1106-preview:norway'
4904
+ | 'gpt-4-1106-preview:swedencentral'
4905
+ | 'gpt-4-1106-preview:uk'
4906
+ | 'gpt-4-1106-preview:westus'
4907
+ | 'gpt-4-1106-preview:westus3'
4908
+ | 'gpt-4-0613:canadaeast'
4909
+ | 'gpt-3.5-turbo-0125:canadaeast'
4910
+ | 'gpt-3.5-turbo-0125:northcentralus'
4911
+ | 'gpt-3.5-turbo-0125:southcentralus'
4912
+ | 'gpt-3.5-turbo-1106:canadaeast'
4913
+ | 'gpt-3.5-turbo-1106:westus';
4881
4914
  /**
4882
4915
  * These are the fallback models that will be used if the primary model fails. This shouldn't be specified unless you have a specific reason to do so. Vapi will automatically find the fastest fallbacks that make sense.
4883
4916
  * @example ["gpt-4-0125-preview","gpt-4-0613"]
4884
4917
  */
4885
4918
  fallbackModels?:
4919
+ | 'gpt-4.1-2025-04-14'
4920
+ | 'gpt-4.1-mini-2025-04-14'
4921
+ | 'gpt-4.1-nano-2025-04-14'
4886
4922
  | 'gpt-4.1'
4887
4923
  | 'gpt-4.1-mini'
4888
4924
  | 'gpt-4.1-nano'
@@ -4915,7 +4951,78 @@ export interface OpenAIModel {
4915
4951
  | 'gpt-3.5-turbo-0125'
4916
4952
  | 'gpt-3.5-turbo-1106'
4917
4953
  | 'gpt-3.5-turbo-16k'
4918
- | 'gpt-3.5-turbo-0613';
4954
+ | 'gpt-3.5-turbo-0613'
4955
+ | 'gpt-4.1-2025-04-14:westus'
4956
+ | 'gpt-4.1-2025-04-14:eastus2'
4957
+ | 'gpt-4.1-2025-04-14:eastus'
4958
+ | 'gpt-4.1-2025-04-14:westus3'
4959
+ | 'gpt-4.1-2025-04-14:northcentralus'
4960
+ | 'gpt-4.1-2025-04-14:southcentralus'
4961
+ | 'gpt-4.1-mini-2025-04-14:westus'
4962
+ | 'gpt-4.1-mini-2025-04-14:eastus2'
4963
+ | 'gpt-4.1-mini-2025-04-14:eastus'
4964
+ | 'gpt-4.1-mini-2025-04-14:westus3'
4965
+ | 'gpt-4.1-mini-2025-04-14:northcentralus'
4966
+ | 'gpt-4.1-mini-2025-04-14:southcentralus'
4967
+ | 'gpt-4.1-nano-2025-04-14:westus'
4968
+ | 'gpt-4.1-nano-2025-04-14:eastus2'
4969
+ | 'gpt-4.1-nano-2025-04-14:westus3'
4970
+ | 'gpt-4.1-nano-2025-04-14:northcentralus'
4971
+ | 'gpt-4.1-nano-2025-04-14:southcentralus'
4972
+ | 'gpt-4o-2024-11-20:swedencentral'
4973
+ | 'gpt-4o-2024-11-20:westus'
4974
+ | 'gpt-4o-2024-11-20:eastus2'
4975
+ | 'gpt-4o-2024-11-20:eastus'
4976
+ | 'gpt-4o-2024-11-20:westus3'
4977
+ | 'gpt-4o-2024-11-20:southcentralus'
4978
+ | 'gpt-4o-2024-08-06:westus'
4979
+ | 'gpt-4o-2024-08-06:westus3'
4980
+ | 'gpt-4o-2024-08-06:eastus'
4981
+ | 'gpt-4o-2024-08-06:eastus2'
4982
+ | 'gpt-4o-2024-08-06:northcentralus'
4983
+ | 'gpt-4o-2024-08-06:southcentralus'
4984
+ | 'gpt-4o-mini-2024-07-18:westus'
4985
+ | 'gpt-4o-mini-2024-07-18:westus3'
4986
+ | 'gpt-4o-mini-2024-07-18:eastus'
4987
+ | 'gpt-4o-mini-2024-07-18:eastus2'
4988
+ | 'gpt-4o-mini-2024-07-18:northcentralus'
4989
+ | 'gpt-4o-mini-2024-07-18:southcentralus'
4990
+ | 'gpt-4o-2024-05-13:eastus2'
4991
+ | 'gpt-4o-2024-05-13:eastus'
4992
+ | 'gpt-4o-2024-05-13:northcentralus'
4993
+ | 'gpt-4o-2024-05-13:southcentralus'
4994
+ | 'gpt-4o-2024-05-13:westus3'
4995
+ | 'gpt-4o-2024-05-13:westus'
4996
+ | 'gpt-4-turbo-2024-04-09:eastus2'
4997
+ | 'gpt-4-0125-preview:eastus'
4998
+ | 'gpt-4-0125-preview:northcentralus'
4999
+ | 'gpt-4-0125-preview:southcentralus'
5000
+ | 'gpt-4-1106-preview:australia'
5001
+ | 'gpt-4-1106-preview:canadaeast'
5002
+ | 'gpt-4-1106-preview:france'
5003
+ | 'gpt-4-1106-preview:india'
5004
+ | 'gpt-4-1106-preview:norway'
5005
+ | 'gpt-4-1106-preview:swedencentral'
5006
+ | 'gpt-4-1106-preview:uk'
5007
+ | 'gpt-4-1106-preview:westus'
5008
+ | 'gpt-4-1106-preview:westus3'
5009
+ | 'gpt-4-0613:canadaeast'
5010
+ | 'gpt-3.5-turbo-0125:canadaeast'
5011
+ | 'gpt-3.5-turbo-0125:northcentralus'
5012
+ | 'gpt-3.5-turbo-0125:southcentralus'
5013
+ | 'gpt-3.5-turbo-1106:canadaeast'
5014
+ | 'gpt-3.5-turbo-1106:westus';
5015
+ /**
5016
+ * Azure OpenAI doesn't support `maxLength` right now https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/structured-outputs?tabs=python-secure%2Cdotnet-entra-id&pivots=programming-language-csharp#unsupported-type-specific-keywords. Need to strip.
5017
+ *
5018
+ * - `strip-parameters-with-unsupported-validation` will strip parameters with unsupported validation.
5019
+ * - `strip-unsupported-validation` will keep the parameters but strip unsupported validation.
5020
+ *
5021
+ * @default `strip-unsupported-validation`
5022
+ */
5023
+ toolStrictCompatibilityMode?:
5024
+ | 'strip-parameters-with-unsupported-validation'
5025
+ | 'strip-unsupported-validation';
4919
5026
  /**
4920
5027
  * This is the temperature that will be used for calls. Default is 0 to leverage caching for lower latency.
4921
5028
  * @min 0
@@ -5180,10 +5287,16 @@ export interface WorkflowOpenAIModel {
5180
5287
  /** This is the provider of the model (`openai`). */
5181
5288
  provider: 'openai';
5182
5289
  /**
5183
- * This is the specific OpenAI model that will be used.
5290
+ * This is the OpenAI model that will be used.
5291
+ *
5292
+ * When using Vapi OpenAI or your own Azure Credentials, you have the option to specify the region for the selected model. This shouldn't be specified unless you have a specific reason to do so. Vapi will automatically find the fastest region that make sense.
5293
+ * This is helpful when you are required to comply with Data Residency rules. Learn more about Azure regions here https://azure.microsoft.com/en-us/explore/global-infrastructure/data-residency/.
5184
5294
  * @maxLength 100
5185
5295
  */
5186
5296
  model:
5297
+ | 'gpt-4.1-2025-04-14'
5298
+ | 'gpt-4.1-mini-2025-04-14'
5299
+ | 'gpt-4.1-nano-2025-04-14'
5187
5300
  | 'gpt-4.1'
5188
5301
  | 'gpt-4.1-mini'
5189
5302
  | 'gpt-4.1-nano'
@@ -5216,7 +5329,67 @@ export interface WorkflowOpenAIModel {
5216
5329
  | 'gpt-3.5-turbo-0125'
5217
5330
  | 'gpt-3.5-turbo-1106'
5218
5331
  | 'gpt-3.5-turbo-16k'
5219
- | 'gpt-3.5-turbo-0613';
5332
+ | 'gpt-3.5-turbo-0613'
5333
+ | 'gpt-4.1-2025-04-14:westus'
5334
+ | 'gpt-4.1-2025-04-14:eastus2'
5335
+ | 'gpt-4.1-2025-04-14:eastus'
5336
+ | 'gpt-4.1-2025-04-14:westus3'
5337
+ | 'gpt-4.1-2025-04-14:northcentralus'
5338
+ | 'gpt-4.1-2025-04-14:southcentralus'
5339
+ | 'gpt-4.1-mini-2025-04-14:westus'
5340
+ | 'gpt-4.1-mini-2025-04-14:eastus2'
5341
+ | 'gpt-4.1-mini-2025-04-14:eastus'
5342
+ | 'gpt-4.1-mini-2025-04-14:westus3'
5343
+ | 'gpt-4.1-mini-2025-04-14:northcentralus'
5344
+ | 'gpt-4.1-mini-2025-04-14:southcentralus'
5345
+ | 'gpt-4.1-nano-2025-04-14:westus'
5346
+ | 'gpt-4.1-nano-2025-04-14:eastus2'
5347
+ | 'gpt-4.1-nano-2025-04-14:westus3'
5348
+ | 'gpt-4.1-nano-2025-04-14:northcentralus'
5349
+ | 'gpt-4.1-nano-2025-04-14:southcentralus'
5350
+ | 'gpt-4o-2024-11-20:swedencentral'
5351
+ | 'gpt-4o-2024-11-20:westus'
5352
+ | 'gpt-4o-2024-11-20:eastus2'
5353
+ | 'gpt-4o-2024-11-20:eastus'
5354
+ | 'gpt-4o-2024-11-20:westus3'
5355
+ | 'gpt-4o-2024-11-20:southcentralus'
5356
+ | 'gpt-4o-2024-08-06:westus'
5357
+ | 'gpt-4o-2024-08-06:westus3'
5358
+ | 'gpt-4o-2024-08-06:eastus'
5359
+ | 'gpt-4o-2024-08-06:eastus2'
5360
+ | 'gpt-4o-2024-08-06:northcentralus'
5361
+ | 'gpt-4o-2024-08-06:southcentralus'
5362
+ | 'gpt-4o-mini-2024-07-18:westus'
5363
+ | 'gpt-4o-mini-2024-07-18:westus3'
5364
+ | 'gpt-4o-mini-2024-07-18:eastus'
5365
+ | 'gpt-4o-mini-2024-07-18:eastus2'
5366
+ | 'gpt-4o-mini-2024-07-18:northcentralus'
5367
+ | 'gpt-4o-mini-2024-07-18:southcentralus'
5368
+ | 'gpt-4o-2024-05-13:eastus2'
5369
+ | 'gpt-4o-2024-05-13:eastus'
5370
+ | 'gpt-4o-2024-05-13:northcentralus'
5371
+ | 'gpt-4o-2024-05-13:southcentralus'
5372
+ | 'gpt-4o-2024-05-13:westus3'
5373
+ | 'gpt-4o-2024-05-13:westus'
5374
+ | 'gpt-4-turbo-2024-04-09:eastus2'
5375
+ | 'gpt-4-0125-preview:eastus'
5376
+ | 'gpt-4-0125-preview:northcentralus'
5377
+ | 'gpt-4-0125-preview:southcentralus'
5378
+ | 'gpt-4-1106-preview:australia'
5379
+ | 'gpt-4-1106-preview:canadaeast'
5380
+ | 'gpt-4-1106-preview:france'
5381
+ | 'gpt-4-1106-preview:india'
5382
+ | 'gpt-4-1106-preview:norway'
5383
+ | 'gpt-4-1106-preview:swedencentral'
5384
+ | 'gpt-4-1106-preview:uk'
5385
+ | 'gpt-4-1106-preview:westus'
5386
+ | 'gpt-4-1106-preview:westus3'
5387
+ | 'gpt-4-0613:canadaeast'
5388
+ | 'gpt-3.5-turbo-0125:canadaeast'
5389
+ | 'gpt-3.5-turbo-0125:northcentralus'
5390
+ | 'gpt-3.5-turbo-0125:southcentralus'
5391
+ | 'gpt-3.5-turbo-1106:canadaeast'
5392
+ | 'gpt-3.5-turbo-1106:westus';
5220
5393
  /**
5221
5394
  * This is the temperature of the model.
5222
5395
  * @min 0
@@ -5287,29 +5460,7 @@ export interface GlobalNodePlan {
5287
5460
  enterCondition?: string;
5288
5461
  }
5289
5462
 
5290
- export interface VariableExtractionSchema {
5291
- /**
5292
- * This is the type of output you'd like.
5293
- *
5294
- * `string`, `number`, `boolean` are primitive types.
5295
- */
5296
- type: 'string' | 'number' | 'integer' | 'boolean';
5297
- /**
5298
- * This is the title of the variable.
5299
- *
5300
- * It can only contain letters, numbers, and underscores.
5301
- * @pattern /^[a-zA-Z0-9_]+$/
5302
- */
5303
- title: string;
5304
- /** This is the description to help the model understand what it needs to output. */
5305
- description: string;
5306
- /** This is the enum values to choose from. Only used if the type is `string`. */
5307
- enum?: string[];
5308
- }
5309
-
5310
- export interface VariableExtractionPlan {
5311
- output: VariableExtractionSchema[];
5312
- }
5463
+ export type VariableExtractionPlan = object;
5313
5464
 
5314
5465
  export interface ConversationNode {
5315
5466
  /**
@@ -5442,11 +5593,12 @@ export interface Edge {
5442
5593
 
5443
5594
  export interface WorkflowUserEditable {
5444
5595
  nodes: (ConversationNode | ToolNode)[];
5445
- /** These are the options for the workflow's LLM. */
5446
5596
  model?: WorkflowOpenAIModel | WorkflowAnthropicModel;
5447
5597
  /** @maxLength 80 */
5448
5598
  name: string;
5449
5599
  edges: Edge[];
5600
+ /** @maxLength 5000 */
5601
+ globalPrompt?: string;
5450
5602
  }
5451
5603
 
5452
5604
  export interface VapiModel {
@@ -6684,63 +6836,17 @@ export interface VapiVoice {
6684
6836
  * @default 1
6685
6837
  */
6686
6838
  speed?: number;
6839
+ /** This is the plan for chunking the model output before it is sent to the voice provider. */
6840
+ chunkPlan?: ChunkPlan;
6841
+ /** This is the plan for voice provider fallbacks in the event that the primary voice provider fails. */
6842
+ fallbackPlan?: FallbackPlan;
6843
+ }
6844
+
6845
+ export interface FallbackAzureVoice {
6687
6846
  /**
6688
- * This is the language code (ISO 639-1) that will be used.
6689
- *
6690
- * @default 'en-US'
6691
- * @default "en-US"
6692
- */
6693
- language?:
6694
- | 'en-US'
6695
- | 'en-GB'
6696
- | 'en-AU'
6697
- | 'en-CA'
6698
- | 'ja'
6699
- | 'zh'
6700
- | 'de'
6701
- | 'hi'
6702
- | 'fr-FR'
6703
- | 'fr-CA'
6704
- | 'ko'
6705
- | 'pt-BR'
6706
- | 'pt-PT'
6707
- | 'it'
6708
- | 'es-ES'
6709
- | 'es-MX'
6710
- | 'id'
6711
- | 'nl'
6712
- | 'tr'
6713
- | 'fil'
6714
- | 'pl'
6715
- | 'sv'
6716
- | 'bg'
6717
- | 'ro'
6718
- | 'ar-SA'
6719
- | 'ar-AE'
6720
- | 'cs'
6721
- | 'el'
6722
- | 'fi'
6723
- | 'hr'
6724
- | 'ms'
6725
- | 'sk'
6726
- | 'da'
6727
- | 'ta'
6728
- | 'uk'
6729
- | 'ru'
6730
- | 'hu'
6731
- | 'no'
6732
- | 'vi';
6733
- /** This is the plan for chunking the model output before it is sent to the voice provider. */
6734
- chunkPlan?: ChunkPlan;
6735
- /** This is the plan for voice provider fallbacks in the event that the primary voice provider fails. */
6736
- fallbackPlan?: FallbackPlan;
6737
- }
6738
-
6739
- export interface FallbackAzureVoice {
6740
- /**
6741
- * This is the flag to toggle voice caching for the assistant.
6742
- * @default true
6743
- * @example true
6847
+ * This is the flag to toggle voice caching for the assistant.
6848
+ * @default true
6849
+ * @example true
6744
6850
  */
6745
6851
  cachingEnabled?: boolean;
6746
6852
  /** This is the voice provider that will be used. */
@@ -7505,52 +7611,6 @@ export interface FallbackVapiVoice {
7505
7611
  * @default 1
7506
7612
  */
7507
7613
  speed?: number;
7508
- /**
7509
- * This is the language code (ISO 639-1) that will be used.
7510
- *
7511
- * @default 'en-US'
7512
- * @default "en-US"
7513
- */
7514
- language?:
7515
- | 'en-US'
7516
- | 'en-GB'
7517
- | 'en-AU'
7518
- | 'en-CA'
7519
- | 'ja'
7520
- | 'zh'
7521
- | 'de'
7522
- | 'hi'
7523
- | 'fr-FR'
7524
- | 'fr-CA'
7525
- | 'ko'
7526
- | 'pt-BR'
7527
- | 'pt-PT'
7528
- | 'it'
7529
- | 'es-ES'
7530
- | 'es-MX'
7531
- | 'id'
7532
- | 'nl'
7533
- | 'tr'
7534
- | 'fil'
7535
- | 'pl'
7536
- | 'sv'
7537
- | 'bg'
7538
- | 'ro'
7539
- | 'ar-SA'
7540
- | 'ar-AE'
7541
- | 'cs'
7542
- | 'el'
7543
- | 'fi'
7544
- | 'hr'
7545
- | 'ms'
7546
- | 'sk'
7547
- | 'da'
7548
- | 'ta'
7549
- | 'uk'
7550
- | 'ru'
7551
- | 'hu'
7552
- | 'no'
7553
- | 'vi';
7554
7614
  /** This is the plan for chunking the model output before it is sent to the voice provider. */
7555
7615
  chunkPlan?: ChunkPlan;
7556
7616
  }
@@ -8461,25 +8521,37 @@ export interface TransferAssistantHookAction {
8461
8521
  }
8462
8522
 
8463
8523
  export interface FunctionCallAssistantHookAction {
8524
+ /**
8525
+ * These are the messages that will be spoken to the user as the tool is running.
8526
+ *
8527
+ * 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.
8528
+ */
8529
+ messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
8530
+ /** The type of tool. "function" for Function tool. */
8531
+ type: 'function';
8464
8532
  /**
8465
8533
  * This determines if the tool is async.
8466
8534
  *
8467
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
8535
+ * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
8468
8536
  *
8469
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
8537
+ * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
8470
8538
  *
8471
- * Defaults to synchronous (`false`).
8539
+ * Defaults to synchronous (`false`).
8472
8540
  * @example false
8473
8541
  */
8474
8542
  async?: boolean;
8475
8543
  /**
8476
- * These are the messages that will be spoken to the user as the tool is running.
8477
8544
  *
8478
- * 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.
8545
+ * This is the server where a `tool-calls` webhook will be sent.
8546
+ *
8547
+ * Notes:
8548
+ * - Webhook is sent to this server when a tool call is made.
8549
+ * - Webhook contains the call, assistant, and phone number objects.
8550
+ * - Webhook contains the variables set on the assistant.
8551
+ * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.
8552
+ * - Webhook expects a response with tool call result.
8479
8553
  */
8480
- messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
8481
- /** The type of tool. "function" for Function tool. */
8482
- type: 'function';
8554
+ server?: Server;
8483
8555
  /**
8484
8556
  * This is the function definition of the tool.
8485
8557
  *
@@ -8488,14 +8560,6 @@ export interface FunctionCallAssistantHookAction {
8488
8560
  * 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.
8489
8561
  */
8490
8562
  function?: OpenAIFunction;
8491
- /**
8492
- * This is the server that will be hit when this tool is requested by the model.
8493
- *
8494
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
8495
- *
8496
- * 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.
8497
- */
8498
- server?: Server;
8499
8563
  }
8500
8564
 
8501
8565
  export interface SayAssistantHookAction {
@@ -8868,6 +8932,13 @@ export interface SuccessEvaluationPlan {
8868
8932
  }
8869
8933
 
8870
8934
  export interface AnalysisPlan {
8935
+ /**
8936
+ * The minimum number of messages required to run the analysis plan.
8937
+ * If the number of messages is less than this, analysis will be skipped.
8938
+ * @default 2
8939
+ * @min 0
8940
+ */
8941
+ minMessagesThreshold?: number;
8871
8942
  /** This is the plan for generating the summary of the call. This outputs to `call.analysis.summary`. */
8872
8943
  summaryPlan?: SummaryPlan;
8873
8944
  /** This is the plan for generating the structured data from the call. This outputs to `call.analysis.structuredData`. */
@@ -10170,11 +10241,25 @@ export interface CreateSquadDTO {
10170
10241
 
10171
10242
  export interface CreateWorkflowDTO {
10172
10243
  nodes: (ConversationNode | ToolNode)[];
10173
- /** These are the options for the workflow's LLM. */
10174
10244
  model?: WorkflowOpenAIModel | WorkflowAnthropicModel;
10175
10245
  /** @maxLength 80 */
10176
10246
  name: string;
10177
10247
  edges: Edge[];
10248
+ /** @maxLength 5000 */
10249
+ globalPrompt?: string;
10250
+ }
10251
+
10252
+ export interface WorkflowOverrides {
10253
+ /**
10254
+ * These are values that will be used to replace the template variables in the workflow messages and other text-based fields.
10255
+ * This uses LiquidJS syntax. https://liquidjs.com/tutorials/intro-to-liquid.html
10256
+ *
10257
+ * So for example, `{{ name }}` will be replaced with the value of `name` in `variableValues`.
10258
+ * `{{"now" | date: "%b %d, %Y, %I:%M %p", "America/New_York"}}` will be replaced with the current date and time in New York.
10259
+ * Some VAPI reserved defaults:
10260
+ * - *customer* - the customer object
10261
+ */
10262
+ variableValues?: object;
10178
10263
  }
10179
10264
 
10180
10265
  export interface TransferPhoneNumberHookAction {
@@ -10454,6 +10539,7 @@ export interface Call {
10454
10539
  | 'call.in-progress.error-vapifault-transport-never-connected'
10455
10540
  | 'call.in-progress.error-vapifault-transport-connected-but-call-not-active'
10456
10541
  | 'call.in-progress.error-vapifault-call-started-but-connection-to-transport-missing'
10542
+ | 'call.in-progress.error-vapifault-worker-died'
10457
10543
  | 'call.in-progress.error-vapifault-openai-llm-failed'
10458
10544
  | 'call.in-progress.error-vapifault-azure-openai-llm-failed'
10459
10545
  | 'call.in-progress.error-vapifault-groq-llm-failed'
@@ -10841,7 +10927,12 @@ export interface Call {
10841
10927
  | 'phone-call-provider-closed-websocket'
10842
10928
  | 'call.forwarding.operator-busy'
10843
10929
  | 'silence-timed-out'
10844
- | 'call.in-progress.error-sip-telephony-provider-failed-to-connect-call'
10930
+ | 'call.in-progress.error-sip-inbound-call-failed-to-connect'
10931
+ | 'call.in-progress.error-providerfault-outbound-sip-403-forbidden'
10932
+ | 'call.in-progress.error-providerfault-outbound-sip-407-proxy-authentication-required'
10933
+ | 'call.in-progress.error-providerfault-outbound-sip-503-service-unavailable'
10934
+ | 'call.in-progress.error-providerfault-outbound-sip-480-temporarily-unavailable'
10935
+ | 'call.in-progress.error-sip-outbound-call-failed-to-connect'
10845
10936
  | 'call.ringing.hook-executed-say'
10846
10937
  | 'call.ringing.hook-executed-transfer'
10847
10938
  | 'twilio-failed-to-connect-call'
@@ -10932,8 +11023,6 @@ export interface Call {
10932
11023
  */
10933
11024
  squad?: CreateSquadDTO;
10934
11025
  /**
10935
- * [BETA] This feature is in active development. The API and behavior are subject to change as we refine it based on user feedback.
10936
- *
10937
11026
  * This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead.
10938
11027
  *
10939
11028
  * To start a call with:
@@ -10943,8 +11032,6 @@ export interface Call {
10943
11032
  */
10944
11033
  workflowId?: string;
10945
11034
  /**
10946
- * [BETA] This feature is in active development. The API and behavior are subject to change as we refine it based on user feedback.
10947
- *
10948
11035
  * This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead.
10949
11036
  *
10950
11037
  * To start a call with:
@@ -10953,6 +11040,8 @@ export interface Call {
10953
11040
  * - Workflow, use `workflow` or `workflowId`
10954
11041
  */
10955
11042
  workflow?: CreateWorkflowDTO;
11043
+ /** These are the overrides for the `workflow` or `workflowId`'s settings and template variables. */
11044
+ workflowOverrides?: WorkflowOverrides;
10956
11045
  /**
10957
11046
  * This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.
10958
11047
  *
@@ -11055,8 +11144,6 @@ export interface CreateCallDTO {
11055
11144
  */
11056
11145
  squad?: CreateSquadDTO;
11057
11146
  /**
11058
- * [BETA] This feature is in active development. The API and behavior are subject to change as we refine it based on user feedback.
11059
- *
11060
11147
  * This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead.
11061
11148
  *
11062
11149
  * To start a call with:
@@ -11066,8 +11153,6 @@ export interface CreateCallDTO {
11066
11153
  */
11067
11154
  workflowId?: string;
11068
11155
  /**
11069
- * [BETA] This feature is in active development. The API and behavior are subject to change as we refine it based on user feedback.
11070
- *
11071
11156
  * This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead.
11072
11157
  *
11073
11158
  * To start a call with:
@@ -11076,6 +11161,8 @@ export interface CreateCallDTO {
11076
11161
  * - Workflow, use `workflow` or `workflowId`
11077
11162
  */
11078
11163
  workflow?: CreateWorkflowDTO;
11164
+ /** These are the overrides for the `workflow` or `workflowId`'s settings and template variables. */
11165
+ workflowOverrides?: WorkflowOverrides;
11079
11166
  /**
11080
11167
  * This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.
11081
11168
  *
@@ -11168,8 +11255,6 @@ export interface CreateOutboundCallDTO {
11168
11255
  */
11169
11256
  squad?: CreateSquadDTO;
11170
11257
  /**
11171
- * [BETA] This feature is in active development. The API and behavior are subject to change as we refine it based on user feedback.
11172
- *
11173
11258
  * This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead.
11174
11259
  *
11175
11260
  * To start a call with:
@@ -11179,8 +11264,6 @@ export interface CreateOutboundCallDTO {
11179
11264
  */
11180
11265
  workflowId?: string;
11181
11266
  /**
11182
- * [BETA] This feature is in active development. The API and behavior are subject to change as we refine it based on user feedback.
11183
- *
11184
11267
  * This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead.
11185
11268
  *
11186
11269
  * To start a call with:
@@ -11189,6 +11272,8 @@ export interface CreateOutboundCallDTO {
11189
11272
  * - Workflow, use `workflow` or `workflowId`
11190
11273
  */
11191
11274
  workflow?: CreateWorkflowDTO;
11275
+ /** These are the overrides for the `workflow` or `workflowId`'s settings and template variables. */
11276
+ workflowOverrides?: WorkflowOverrides;
11192
11277
  /**
11193
11278
  * This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.
11194
11279
  *
@@ -11255,8 +11340,6 @@ export interface CreateWebCallDTO {
11255
11340
  */
11256
11341
  squad?: CreateSquadDTO;
11257
11342
  /**
11258
- * [BETA] This feature is in active development. The API and behavior are subject to change as we refine it based on user feedback.
11259
- *
11260
11343
  * This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead.
11261
11344
  *
11262
11345
  * To start a call with:
@@ -11266,8 +11349,6 @@ export interface CreateWebCallDTO {
11266
11349
  */
11267
11350
  workflowId?: string;
11268
11351
  /**
11269
- * [BETA] This feature is in active development. The API and behavior are subject to change as we refine it based on user feedback.
11270
- *
11271
11352
  * This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead.
11272
11353
  *
11273
11354
  * To start a call with:
@@ -11276,6 +11357,8 @@ export interface CreateWebCallDTO {
11276
11357
  * - Workflow, use `workflow` or `workflowId`
11277
11358
  */
11278
11359
  workflow?: CreateWorkflowDTO;
11360
+ /** These are the overrides for the `workflow` or `workflowId`'s settings and template variables. */
11361
+ workflowOverrides?: WorkflowOverrides;
11279
11362
  }
11280
11363
 
11281
11364
  export interface UpdateCallDTO {
@@ -11287,7 +11370,10 @@ export interface UpdateCallDTO {
11287
11370
  }
11288
11371
 
11289
11372
  export interface DeveloperMessage {
11290
- /** This is the role of the message author */
11373
+ /**
11374
+ * This is the role of the message author
11375
+ * @default "developer"
11376
+ */
11291
11377
  role: 'developer';
11292
11378
  /**
11293
11379
  * This is the content of the developer message
@@ -11347,7 +11433,10 @@ export interface ToolCall {
11347
11433
  }
11348
11434
 
11349
11435
  export interface AssistantMessage {
11350
- /** This is the role of the message author */
11436
+ /**
11437
+ * This is the role of the message author
11438
+ * @default "assistant"
11439
+ */
11351
11440
  role: 'assistant';
11352
11441
  /**
11353
11442
  * This is the content of the assistant message
@@ -11369,7 +11458,10 @@ export interface AssistantMessage {
11369
11458
  }
11370
11459
 
11371
11460
  export interface ToolMessage {
11372
- /** This is the role of the message author */
11461
+ /**
11462
+ * This is the role of the message author
11463
+ * @default "tool"
11464
+ */
11373
11465
  role: 'tool';
11374
11466
  /**
11375
11467
  * This is the content of the tool message
@@ -11385,17 +11477,14 @@ export interface ToolMessage {
11385
11477
  name?: string;
11386
11478
  }
11387
11479
 
11388
- export interface CreateChatStreamResponse {
11389
- /** This is the unique identifier for the streaming response. */
11390
- id: string;
11480
+ export interface FunctionCall {
11481
+ /** This is the arguments to call the function with */
11482
+ arguments: string;
11391
11483
  /**
11392
- * This is the path to the content being updated.
11393
- * Format: `chat.output[{contentIndex}].content` where contentIndex identifies the specific content item.
11394
- * @example "chat.output[0].content"
11484
+ * This is the name of the function to call
11485
+ * @maxLength 40
11395
11486
  */
11396
- path: string;
11397
- /** This is the incremental content chunk being streamed. */
11398
- delta: string;
11487
+ name: string;
11399
11488
  }
11400
11489
 
11401
11490
  export interface Chat {
@@ -11413,7 +11502,10 @@ export interface Chat {
11413
11502
  * Mutually exclusive with previousChatId.
11414
11503
  */
11415
11504
  sessionId?: string;
11416
- /** Chat input as a string or an array of messages. When using message array, each message requires a role and content. */
11505
+ /**
11506
+ * This is the input text for the chat.
11507
+ * Can be a string or an array of chat messages.
11508
+ */
11417
11509
  input?:
11418
11510
  | string
11419
11511
  | (SystemMessage | UserMessage | AssistantMessage | ToolMessage | DeveloperMessage)[];
@@ -11433,9 +11525,12 @@ export interface Chat {
11433
11525
  id: string;
11434
11526
  /** This is the unique identifier for the org that this chat belongs to. */
11435
11527
  orgId: string;
11436
- /** Array of messages used as context for the chat */
11528
+ /**
11529
+ * This is an array of messages used as context for the chat.
11530
+ * Used to provide message history for multi-turn conversations.
11531
+ */
11437
11532
  messages?: (SystemMessage | UserMessage | AssistantMessage | ToolMessage | DeveloperMessage)[];
11438
- /** Output messages generated by the system in response to the input */
11533
+ /** This is the output messages generated by the system in response to the input. */
11439
11534
  output?: (SystemMessage | UserMessage | AssistantMessage | ToolMessage | DeveloperMessage)[];
11440
11535
  /**
11441
11536
  * This is the ISO 8601 date-time string of when the chat was created.
@@ -11449,11 +11544,6 @@ export interface Chat {
11449
11544
  updatedAt: string;
11450
11545
  }
11451
11546
 
11452
- export interface ChatPaginatedResponse {
11453
- results: Chat[];
11454
- metadata: PaginationMeta;
11455
- }
11456
-
11457
11547
  export interface CreateChatDTO {
11458
11548
  /** This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. */
11459
11549
  assistantId?: string;
@@ -11469,7 +11559,11 @@ export interface CreateChatDTO {
11469
11559
  * Mutually exclusive with previousChatId.
11470
11560
  */
11471
11561
  sessionId?: string;
11472
- /** Chat input as a string or an array of messages. When using message array, each message requires a role and content. */
11562
+ /**
11563
+ * This is the input text for the chat.
11564
+ * Can be a string or an array of chat messages.
11565
+ * This field is REQUIRED for chat creation.
11566
+ */
11473
11567
  input:
11474
11568
  | string
11475
11569
  | (SystemMessage | UserMessage | AssistantMessage | ToolMessage | DeveloperMessage)[];
@@ -11487,6 +11581,86 @@ export interface CreateChatDTO {
11487
11581
  previousChatId?: string;
11488
11582
  }
11489
11583
 
11584
+ export interface GetChatPaginatedDTO {
11585
+ /** This is the unique identifier for the assistant that will be used for the chat. */
11586
+ assistantId?: string;
11587
+ /** This is the unique identifier for the workflow that will be used for the chat. */
11588
+ workflowId?: string;
11589
+ /** This is the unique identifier for the session that will be used for the chat. */
11590
+ sessionId?: string;
11591
+ /**
11592
+ * This is the page number to return. Defaults to 1.
11593
+ * @min 1
11594
+ */
11595
+ page?: number;
11596
+ /** This is the sort order for pagination. Defaults to 'DESC'. */
11597
+ sortOrder?: 'ASC' | 'DESC';
11598
+ /**
11599
+ * This is the maximum number of items to return. Defaults to 100.
11600
+ * @min 0
11601
+ * @max 1000
11602
+ */
11603
+ limit?: number;
11604
+ /**
11605
+ * This will return items where the createdAt is greater than the specified value.
11606
+ * @format date-time
11607
+ */
11608
+ createdAtGt?: string;
11609
+ /**
11610
+ * This will return items where the createdAt is less than the specified value.
11611
+ * @format date-time
11612
+ */
11613
+ createdAtLt?: string;
11614
+ /**
11615
+ * This will return items where the createdAt is greater than or equal to the specified value.
11616
+ * @format date-time
11617
+ */
11618
+ createdAtGe?: string;
11619
+ /**
11620
+ * This will return items where the createdAt is less than or equal to the specified value.
11621
+ * @format date-time
11622
+ */
11623
+ createdAtLe?: string;
11624
+ /**
11625
+ * This will return items where the updatedAt is greater than the specified value.
11626
+ * @format date-time
11627
+ */
11628
+ updatedAtGt?: string;
11629
+ /**
11630
+ * This will return items where the updatedAt is less than the specified value.
11631
+ * @format date-time
11632
+ */
11633
+ updatedAtLt?: string;
11634
+ /**
11635
+ * This will return items where the updatedAt is greater than or equal to the specified value.
11636
+ * @format date-time
11637
+ */
11638
+ updatedAtGe?: string;
11639
+ /**
11640
+ * This will return items where the updatedAt is less than or equal to the specified value.
11641
+ * @format date-time
11642
+ */
11643
+ updatedAtLe?: string;
11644
+ }
11645
+
11646
+ export interface ChatPaginatedResponse {
11647
+ results: Chat[];
11648
+ metadata: PaginationMeta;
11649
+ }
11650
+
11651
+ export interface CreateChatStreamResponse {
11652
+ /** This is the unique identifier for the streaming response. */
11653
+ id: string;
11654
+ /**
11655
+ * This is the path to the content being updated.
11656
+ * Format: `chat.output[{contentIndex}].content` where contentIndex identifies the specific content item.
11657
+ * @example "chat.output[0].content"
11658
+ */
11659
+ path: string;
11660
+ /** This is the incremental content chunk being streamed. */
11661
+ delta: string;
11662
+ }
11663
+
11490
11664
  export interface OpenAIResponsesRequest {
11491
11665
  /** This is the assistant that will be used for the chat. To use an existing assistant, use `assistantId` instead. */
11492
11666
  assistantId?: string;
@@ -11502,7 +11676,11 @@ export interface OpenAIResponsesRequest {
11502
11676
  * Mutually exclusive with previousChatId.
11503
11677
  */
11504
11678
  sessionId?: string;
11505
- /** Chat input as a string or an array of messages. When using message array, each message requires a role and content. */
11679
+ /**
11680
+ * This is the input text for the chat.
11681
+ * Can be a string or an array of chat messages.
11682
+ * This field is REQUIRED for chat creation.
11683
+ */
11506
11684
  input:
11507
11685
  | string
11508
11686
  | (SystemMessage | UserMessage | AssistantMessage | ToolMessage | DeveloperMessage)[];
@@ -11519,53 +11697,157 @@ export interface OpenAIResponsesRequest {
11519
11697
  previousChatId?: string;
11520
11698
  }
11521
11699
 
11522
- export interface CreateSessionDTO {
11700
+ export interface ResponseOutputText {
11523
11701
  /**
11524
- * This is a user-defined name for the session. Maximum length is 40 characters.
11525
- * @maxLength 40
11702
+ * Annotations in the text output
11703
+ * @default []
11526
11704
  */
11527
- name?: string;
11528
- /** This is the current status of the session. Can be either 'active' or 'completed'. */
11529
- status?: 'active' | 'completed';
11530
- /** This is the ID of the assistant associated with this session. Use this when referencing an existing assistant. */
11531
- assistantId?: string;
11705
+ annotations: object[];
11706
+ /** The text output from the model */
11707
+ text: string;
11532
11708
  /**
11533
- * This is the assistant configuration for this session. Use this when creating a new assistant configuration.
11534
- * If assistantId is provided, this will be ignored.
11709
+ * The type of the output text
11710
+ * @default "output_text"
11535
11711
  */
11536
- assistant?: CreateAssistantDTO;
11537
- /** Array of chat messages in the session */
11538
- messages?: (SystemMessage | UserMessage | AssistantMessage | ToolMessage | DeveloperMessage)[];
11539
- /** This is the customer information associated with this session. */
11540
- customer?: CreateCustomerDTO;
11541
- /** This is the ID of the phone number associated with this session. */
11542
- phoneNumberId?: string;
11543
- /** This is the phone number configuration for this session. */
11544
- phoneNumber?: ImportTwilioPhoneNumberDTO;
11712
+ type: 'output_text';
11545
11713
  }
11546
11714
 
11547
- export interface Session {
11548
- /** This is the unique identifier for the session. */
11715
+ export interface ResponseOutputMessage {
11716
+ /** The unique ID of the output message */
11549
11717
  id: string;
11550
- /** This is the unique identifier for the organization that owns this session. */
11551
- orgId: string;
11718
+ /** Content of the output message */
11719
+ content: ResponseOutputText[];
11552
11720
  /**
11553
- * This is the ISO 8601 timestamp indicating when the session was created.
11554
- * @format date-time
11721
+ * The role of the output message
11722
+ * @default "assistant"
11555
11723
  */
11556
- createdAt: string;
11724
+ role: 'assistant';
11725
+ /** The status of the message */
11726
+ status: 'in_progress' | 'completed' | 'incomplete';
11557
11727
  /**
11558
- * This is the ISO 8601 timestamp indicating when the session was last updated.
11559
- * @format date-time
11728
+ * The type of the output message
11729
+ * @default "message"
11560
11730
  */
11561
- updatedAt: string;
11731
+ type: 'message';
11732
+ }
11733
+
11734
+ export interface ResponseObject {
11735
+ /** Unique identifier for this Response */
11736
+ id: string;
11562
11737
  /**
11563
- * This is a user-defined name for the session. Maximum length is 40 characters.
11564
- * @maxLength 40
11738
+ * The object type
11739
+ * @default "response"
11565
11740
  */
11566
- name?: string;
11567
- /** This is the current status of the session. Can be either 'active' or 'completed'. */
11741
+ object: 'response';
11742
+ /** Unix timestamp (in seconds) of when this Response was created */
11743
+ created_at: number;
11744
+ /** Status of the response */
11745
+ status: 'completed' | 'failed' | 'in_progress' | 'incomplete';
11746
+ /**
11747
+ * Error message if the response failed
11748
+ * @default null
11749
+ */
11750
+ error?: string | null;
11751
+ /** Output messages from the model */
11752
+ output: ResponseOutputMessage[];
11753
+ }
11754
+
11755
+ export interface ResponseTextDeltaEvent {
11756
+ /** Index of the content part */
11757
+ content_index: number;
11758
+ /** Text delta being added */
11759
+ delta: string;
11760
+ /** ID of the output item */
11761
+ item_id: string;
11762
+ /** Index of the output item */
11763
+ output_index: number;
11764
+ /**
11765
+ * Event type
11766
+ * @default "response.output_text.delta"
11767
+ */
11768
+ type: 'response.output_text.delta';
11769
+ }
11770
+
11771
+ export interface ResponseTextDoneEvent {
11772
+ /** Index of the content part */
11773
+ content_index: number;
11774
+ /** ID of the output item */
11775
+ item_id: string;
11776
+ /** Index of the output item */
11777
+ output_index: number;
11778
+ /** Complete text content */
11779
+ text: string;
11780
+ /**
11781
+ * Event type
11782
+ * @default "response.output_text.done"
11783
+ */
11784
+ type: 'response.output_text.done';
11785
+ }
11786
+
11787
+ export interface ResponseCompletedEvent {
11788
+ /** The completed response */
11789
+ response: ResponseObject;
11790
+ /**
11791
+ * Event type
11792
+ * @default "response.completed"
11793
+ */
11794
+ type: 'response.completed';
11795
+ }
11796
+
11797
+ export interface ResponseErrorEvent {
11798
+ /**
11799
+ * Event type
11800
+ * @default "error"
11801
+ */
11802
+ type: 'error';
11803
+ /**
11804
+ * Error code
11805
+ * @example "ERR_SOMETHING"
11806
+ */
11807
+ code: string;
11808
+ /**
11809
+ * Error message
11810
+ * @example "Something went wrong"
11811
+ */
11812
+ message: string;
11813
+ /** Parameter that caused the error */
11814
+ param?: string | null;
11815
+ /**
11816
+ * Sequence number of the event
11817
+ * @example 1
11818
+ */
11819
+ sequence_number: number;
11820
+ }
11821
+
11822
+ export interface Session {
11823
+ /** This is the unique identifier for the session. */
11824
+ id: string;
11825
+ /** This is the unique identifier for the organization that owns this session. */
11826
+ orgId: string;
11827
+ /**
11828
+ * This is the ISO 8601 timestamp indicating when the session was created.
11829
+ * @format date-time
11830
+ */
11831
+ createdAt: string;
11832
+ /**
11833
+ * This is the ISO 8601 timestamp indicating when the session was last updated.
11834
+ * @format date-time
11835
+ */
11836
+ updatedAt: string;
11837
+ /**
11838
+ * This is a user-defined name for the session. Maximum length is 40 characters.
11839
+ * @maxLength 40
11840
+ */
11841
+ name?: string;
11842
+ /** This is the current status of the session. Can be either 'active' or 'completed'. */
11568
11843
  status?: 'active' | 'completed';
11844
+ /**
11845
+ * Session expiration time in seconds. Defaults to 24 hours (86400 seconds) if not set.
11846
+ * @min 60
11847
+ * @max 2592000
11848
+ * @example 86400
11849
+ */
11850
+ expirationSeconds?: number;
11569
11851
  /** This is the ID of the assistant associated with this session. Use this when referencing an existing assistant. */
11570
11852
  assistantId?: string;
11571
11853
  /**
@@ -11573,7 +11855,7 @@ export interface Session {
11573
11855
  * If assistantId is provided, this will be ignored.
11574
11856
  */
11575
11857
  assistant?: CreateAssistantDTO;
11576
- /** Array of chat messages in the session */
11858
+ /** This is an array of chat messages in the session. */
11577
11859
  messages?: (SystemMessage | UserMessage | AssistantMessage | ToolMessage | DeveloperMessage)[];
11578
11860
  /** This is the customer information associated with this session. */
11579
11861
  customer?: CreateCustomerDTO;
@@ -11583,9 +11865,36 @@ export interface Session {
11583
11865
  phoneNumber?: ImportTwilioPhoneNumberDTO;
11584
11866
  }
11585
11867
 
11586
- export interface SessionPaginatedResponse {
11587
- results: Session[];
11588
- metadata: PaginationMeta;
11868
+ export interface CreateSessionDTO {
11869
+ /**
11870
+ * This is a user-defined name for the session. Maximum length is 40 characters.
11871
+ * @maxLength 40
11872
+ */
11873
+ name?: string;
11874
+ /** This is the current status of the session. Can be either 'active' or 'completed'. */
11875
+ status?: 'active' | 'completed';
11876
+ /**
11877
+ * Session expiration time in seconds. Defaults to 24 hours (86400 seconds) if not set.
11878
+ * @min 60
11879
+ * @max 2592000
11880
+ * @example 86400
11881
+ */
11882
+ expirationSeconds?: number;
11883
+ /** This is the ID of the assistant associated with this session. Use this when referencing an existing assistant. */
11884
+ assistantId?: string;
11885
+ /**
11886
+ * This is the assistant configuration for this session. Use this when creating a new assistant configuration.
11887
+ * If assistantId is provided, this will be ignored.
11888
+ */
11889
+ assistant?: CreateAssistantDTO;
11890
+ /** This is an array of chat messages in the session. */
11891
+ messages?: (SystemMessage | UserMessage | AssistantMessage | ToolMessage | DeveloperMessage)[];
11892
+ /** This is the customer information associated with this session. */
11893
+ customer?: CreateCustomerDTO;
11894
+ /** This is the ID of the phone number associated with this session. */
11895
+ phoneNumberId?: string;
11896
+ /** This is the phone number configuration for this session. */
11897
+ phoneNumber?: ImportTwilioPhoneNumberDTO;
11589
11898
  }
11590
11899
 
11591
11900
  export interface UpdateSessionDTO {
@@ -11596,10 +11905,84 @@ export interface UpdateSessionDTO {
11596
11905
  name?: string;
11597
11906
  /** This is the new status for the session. */
11598
11907
  status?: 'active' | 'completed';
11599
- /** Array of updated chat messages */
11908
+ /**
11909
+ * Session expiration time in seconds. Defaults to 24 hours (86400 seconds) if not set.
11910
+ * @min 60
11911
+ * @max 2592000
11912
+ * @example 86400
11913
+ */
11914
+ expirationSeconds?: number;
11915
+ /** This is the updated array of chat messages. */
11600
11916
  messages?: (SystemMessage | UserMessage | AssistantMessage | ToolMessage | DeveloperMessage)[];
11601
11917
  }
11602
11918
 
11919
+ export interface GetSessionPaginatedDTO {
11920
+ /** This is the name of the session to filter by. */
11921
+ name?: string;
11922
+ /** This is the ID of the assistant to filter sessions by. */
11923
+ assistantId?: string;
11924
+ /** This is the ID of the workflow to filter sessions by. */
11925
+ workflowId?: string;
11926
+ /**
11927
+ * This is the page number to return. Defaults to 1.
11928
+ * @min 1
11929
+ */
11930
+ page?: number;
11931
+ /** This is the sort order for pagination. Defaults to 'DESC'. */
11932
+ sortOrder?: 'ASC' | 'DESC';
11933
+ /**
11934
+ * This is the maximum number of items to return. Defaults to 100.
11935
+ * @min 0
11936
+ * @max 1000
11937
+ */
11938
+ limit?: number;
11939
+ /**
11940
+ * This will return items where the createdAt is greater than the specified value.
11941
+ * @format date-time
11942
+ */
11943
+ createdAtGt?: string;
11944
+ /**
11945
+ * This will return items where the createdAt is less than the specified value.
11946
+ * @format date-time
11947
+ */
11948
+ createdAtLt?: string;
11949
+ /**
11950
+ * This will return items where the createdAt is greater than or equal to the specified value.
11951
+ * @format date-time
11952
+ */
11953
+ createdAtGe?: string;
11954
+ /**
11955
+ * This will return items where the createdAt is less than or equal to the specified value.
11956
+ * @format date-time
11957
+ */
11958
+ createdAtLe?: string;
11959
+ /**
11960
+ * This will return items where the updatedAt is greater than the specified value.
11961
+ * @format date-time
11962
+ */
11963
+ updatedAtGt?: string;
11964
+ /**
11965
+ * This will return items where the updatedAt is less than the specified value.
11966
+ * @format date-time
11967
+ */
11968
+ updatedAtLt?: string;
11969
+ /**
11970
+ * This will return items where the updatedAt is greater than or equal to the specified value.
11971
+ * @format date-time
11972
+ */
11973
+ updatedAtGe?: string;
11974
+ /**
11975
+ * This will return items where the updatedAt is less than or equal to the specified value.
11976
+ * @format date-time
11977
+ */
11978
+ updatedAtLe?: string;
11979
+ }
11980
+
11981
+ export interface SessionPaginatedResponse {
11982
+ results: Session[];
11983
+ metadata: PaginationMeta;
11984
+ }
11985
+
11603
11986
  export interface Assistant {
11604
11987
  /** These are the options for the assistant's transcriber. */
11605
11988
  transcriber?:
@@ -13544,17 +13927,6 @@ export interface PhoneNumberPaginatedResponse {
13544
13927
  }
13545
13928
 
13546
13929
  export interface DtmfTool {
13547
- /**
13548
- * This determines if the tool is async.
13549
- *
13550
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
13551
- *
13552
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
13553
- *
13554
- * Defaults to synchronous (`false`).
13555
- * @example false
13556
- */
13557
- async?: boolean;
13558
13930
  /**
13559
13931
  * These are the messages that will be spoken to the user as the tool is running.
13560
13932
  *
@@ -13585,28 +13957,9 @@ export interface DtmfTool {
13585
13957
  * 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.
13586
13958
  */
13587
13959
  function?: OpenAIFunction;
13588
- /**
13589
- * This is the server that will be hit when this tool is requested by the model.
13590
- *
13591
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
13592
- *
13593
- * 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.
13594
- */
13595
- server?: Server;
13596
13960
  }
13597
13961
 
13598
13962
  export interface EndCallTool {
13599
- /**
13600
- * This determines if the tool is async.
13601
- *
13602
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
13603
- *
13604
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
13605
- *
13606
- * Defaults to synchronous (`false`).
13607
- * @example false
13608
- */
13609
- async?: boolean;
13610
13963
  /**
13611
13964
  * These are the messages that will be spoken to the user as the tool is running.
13612
13965
  *
@@ -13637,36 +13990,40 @@ export interface EndCallTool {
13637
13990
  * 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.
13638
13991
  */
13639
13992
  function?: OpenAIFunction;
13640
- /**
13641
- * This is the server that will be hit when this tool is requested by the model.
13642
- *
13643
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
13644
- *
13645
- * 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.
13646
- */
13647
- server?: Server;
13648
13993
  }
13649
13994
 
13650
13995
  export interface FunctionTool {
13996
+ /**
13997
+ * These are the messages that will be spoken to the user as the tool is running.
13998
+ *
13999
+ * 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.
14000
+ */
14001
+ messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
14002
+ /** The type of tool. "function" for Function tool. */
14003
+ type: 'function';
13651
14004
  /**
13652
14005
  * This determines if the tool is async.
13653
14006
  *
13654
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
14007
+ * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
13655
14008
  *
13656
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
14009
+ * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
13657
14010
  *
13658
- * Defaults to synchronous (`false`).
14011
+ * Defaults to synchronous (`false`).
13659
14012
  * @example false
13660
14013
  */
13661
14014
  async?: boolean;
13662
14015
  /**
13663
- * These are the messages that will be spoken to the user as the tool is running.
13664
14016
  *
13665
- * 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.
14017
+ * This is the server where a `tool-calls` webhook will be sent.
14018
+ *
14019
+ * Notes:
14020
+ * - Webhook is sent to this server when a tool call is made.
14021
+ * - Webhook contains the call, assistant, and phone number objects.
14022
+ * - Webhook contains the variables set on the assistant.
14023
+ * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.
14024
+ * - Webhook expects a response with tool call result.
13666
14025
  */
13667
- messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
13668
- /** The type of tool. "function" for Function tool. */
13669
- type: 'function';
14026
+ server?: Server;
13670
14027
  /** This is the unique identifier for the tool. */
13671
14028
  id: string;
13672
14029
  /** This is the unique identifier for the organization that this tool belongs to. */
@@ -13689,28 +14046,9 @@ export interface FunctionTool {
13689
14046
  * 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.
13690
14047
  */
13691
14048
  function?: OpenAIFunction;
13692
- /**
13693
- * This is the server that will be hit when this tool is requested by the model.
13694
- *
13695
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
13696
- *
13697
- * 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.
13698
- */
13699
- server?: Server;
13700
14049
  }
13701
14050
 
13702
14051
  export interface GhlTool {
13703
- /**
13704
- * This determines if the tool is async.
13705
- *
13706
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
13707
- *
13708
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
13709
- *
13710
- * Defaults to synchronous (`false`).
13711
- * @example false
13712
- */
13713
- async?: boolean;
13714
14052
  /**
13715
14053
  * These are the messages that will be spoken to the user as the tool is running.
13716
14054
  *
@@ -13741,29 +14079,10 @@ export interface GhlTool {
13741
14079
  * 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.
13742
14080
  */
13743
14081
  function?: OpenAIFunction;
13744
- /**
13745
- * This is the server that will be hit when this tool is requested by the model.
13746
- *
13747
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
13748
- *
13749
- * 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.
13750
- */
13751
- server?: Server;
13752
14082
  metadata: GhlToolMetadata;
13753
14083
  }
13754
14084
 
13755
14085
  export interface MakeTool {
13756
- /**
13757
- * This determines if the tool is async.
13758
- *
13759
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
13760
- *
13761
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
13762
- *
13763
- * Defaults to synchronous (`false`).
13764
- * @example false
13765
- */
13766
- async?: boolean;
13767
14086
  /**
13768
14087
  * These are the messages that will be spoken to the user as the tool is running.
13769
14088
  *
@@ -13794,29 +14113,10 @@ export interface MakeTool {
13794
14113
  * 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.
13795
14114
  */
13796
14115
  function?: OpenAIFunction;
13797
- /**
13798
- * This is the server that will be hit when this tool is requested by the model.
13799
- *
13800
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
13801
- *
13802
- * 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.
13803
- */
13804
- server?: Server;
13805
14116
  metadata: MakeToolMetadata;
13806
14117
  }
13807
14118
 
13808
14119
  export interface TransferCallTool {
13809
- /**
13810
- * This determines if the tool is async.
13811
- *
13812
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
13813
- *
13814
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
13815
- *
13816
- * Defaults to synchronous (`false`).
13817
- * @example false
13818
- */
13819
- async?: boolean;
13820
14120
  /**
13821
14121
  * These are the messages that will be spoken to the user as the tool is running.
13822
14122
  *
@@ -13852,28 +14152,9 @@ export interface TransferCallTool {
13852
14152
  * 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.
13853
14153
  */
13854
14154
  function?: OpenAIFunction;
13855
- /**
13856
- * This is the server that will be hit when this tool is requested by the model.
13857
- *
13858
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
13859
- *
13860
- * 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.
13861
- */
13862
- server?: Server;
13863
14155
  }
13864
14156
 
13865
14157
  export interface OutputTool {
13866
- /**
13867
- * This determines if the tool is async.
13868
- *
13869
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
13870
- *
13871
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
13872
- *
13873
- * Defaults to synchronous (`false`).
13874
- * @example false
13875
- */
13876
- async?: boolean;
13877
14158
  /**
13878
14159
  * These are the messages that will be spoken to the user as the tool is running.
13879
14160
  *
@@ -13904,28 +14185,9 @@ export interface OutputTool {
13904
14185
  * 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.
13905
14186
  */
13906
14187
  function?: OpenAIFunction;
13907
- /**
13908
- * This is the server that will be hit when this tool is requested by the model.
13909
- *
13910
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
13911
- *
13912
- * 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.
13913
- */
13914
- server?: Server;
13915
14188
  }
13916
14189
 
13917
14190
  export interface BashTool {
13918
- /**
13919
- * This determines if the tool is async.
13920
- *
13921
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
13922
- *
13923
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
13924
- *
13925
- * Defaults to synchronous (`false`).
13926
- * @example false
13927
- */
13928
- async?: boolean;
13929
14191
  /**
13930
14192
  * These are the messages that will be spoken to the user as the tool is running.
13931
14193
  *
@@ -13936,6 +14198,18 @@ export interface BashTool {
13936
14198
  type: 'bash';
13937
14199
  /** The sub type of tool. */
13938
14200
  subType: 'bash_20241022';
14201
+ /**
14202
+ *
14203
+ * This is the server where a `tool-calls` webhook will be sent.
14204
+ *
14205
+ * Notes:
14206
+ * - Webhook is sent to this server when a tool call is made.
14207
+ * - Webhook contains the call, assistant, and phone number objects.
14208
+ * - Webhook contains the variables set on the assistant.
14209
+ * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.
14210
+ * - Webhook expects a response with tool call result.
14211
+ */
14212
+ server?: Server;
13939
14213
  /** This is the unique identifier for the tool. */
13940
14214
  id: string;
13941
14215
  /** This is the unique identifier for the organization that this tool belongs to. */
@@ -13958,14 +14232,6 @@ export interface BashTool {
13958
14232
  * 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.
13959
14233
  */
13960
14234
  function?: OpenAIFunction;
13961
- /**
13962
- * This is the server that will be hit when this tool is requested by the model.
13963
- *
13964
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
13965
- *
13966
- * 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.
13967
- */
13968
- server?: Server;
13969
14235
  /**
13970
14236
  * The name of the tool, fixed to 'bash'
13971
14237
  * @default "bash"
@@ -13974,17 +14240,6 @@ export interface BashTool {
13974
14240
  }
13975
14241
 
13976
14242
  export interface ComputerTool {
13977
- /**
13978
- * This determines if the tool is async.
13979
- *
13980
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
13981
- *
13982
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
13983
- *
13984
- * Defaults to synchronous (`false`).
13985
- * @example false
13986
- */
13987
- async?: boolean;
13988
14243
  /**
13989
14244
  * These are the messages that will be spoken to the user as the tool is running.
13990
14245
  *
@@ -13995,6 +14250,18 @@ export interface ComputerTool {
13995
14250
  type: 'computer';
13996
14251
  /** The sub type of tool. */
13997
14252
  subType: 'computer_20241022';
14253
+ /**
14254
+ *
14255
+ * This is the server where a `tool-calls` webhook will be sent.
14256
+ *
14257
+ * Notes:
14258
+ * - Webhook is sent to this server when a tool call is made.
14259
+ * - Webhook contains the call, assistant, and phone number objects.
14260
+ * - Webhook contains the variables set on the assistant.
14261
+ * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.
14262
+ * - Webhook expects a response with tool call result.
14263
+ */
14264
+ server?: Server;
13998
14265
  /** This is the unique identifier for the tool. */
13999
14266
  id: string;
14000
14267
  /** This is the unique identifier for the organization that this tool belongs to. */
@@ -14018,16 +14285,8 @@ export interface ComputerTool {
14018
14285
  */
14019
14286
  function?: OpenAIFunction;
14020
14287
  /**
14021
- * This is the server that will be hit when this tool is requested by the model.
14022
- *
14023
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
14024
- *
14025
- * 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.
14026
- */
14027
- server?: Server;
14028
- /**
14029
- * The name of the tool, fixed to 'computer'
14030
- * @default "computer"
14288
+ * The name of the tool, fixed to 'computer'
14289
+ * @default "computer"
14031
14290
  */
14032
14291
  name: 'computer';
14033
14292
  /** The display width in pixels */
@@ -14039,17 +14298,6 @@ export interface ComputerTool {
14039
14298
  }
14040
14299
 
14041
14300
  export interface TextEditorTool {
14042
- /**
14043
- * This determines if the tool is async.
14044
- *
14045
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
14046
- *
14047
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
14048
- *
14049
- * Defaults to synchronous (`false`).
14050
- * @example false
14051
- */
14052
- async?: boolean;
14053
14301
  /**
14054
14302
  * These are the messages that will be spoken to the user as the tool is running.
14055
14303
  *
@@ -14060,6 +14308,18 @@ export interface TextEditorTool {
14060
14308
  type: 'textEditor';
14061
14309
  /** The sub type of tool. */
14062
14310
  subType: 'text_editor_20241022';
14311
+ /**
14312
+ *
14313
+ * This is the server where a `tool-calls` webhook will be sent.
14314
+ *
14315
+ * Notes:
14316
+ * - Webhook is sent to this server when a tool call is made.
14317
+ * - Webhook contains the call, assistant, and phone number objects.
14318
+ * - Webhook contains the variables set on the assistant.
14319
+ * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.
14320
+ * - Webhook expects a response with tool call result.
14321
+ */
14322
+ server?: Server;
14063
14323
  /** This is the unique identifier for the tool. */
14064
14324
  id: string;
14065
14325
  /** This is the unique identifier for the organization that this tool belongs to. */
@@ -14082,14 +14342,6 @@ export interface TextEditorTool {
14082
14342
  * 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.
14083
14343
  */
14084
14344
  function?: OpenAIFunction;
14085
- /**
14086
- * This is the server that will be hit when this tool is requested by the model.
14087
- *
14088
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
14089
- *
14090
- * 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.
14091
- */
14092
- server?: Server;
14093
14345
  /**
14094
14346
  * The name of the tool, fixed to 'str_replace_editor'
14095
14347
  * @default "str_replace_editor"
@@ -14098,17 +14350,6 @@ export interface TextEditorTool {
14098
14350
  }
14099
14351
 
14100
14352
  export interface QueryTool {
14101
- /**
14102
- * This determines if the tool is async.
14103
- *
14104
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
14105
- *
14106
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
14107
- *
14108
- * Defaults to synchronous (`false`).
14109
- * @example false
14110
- */
14111
- async?: boolean;
14112
14353
  /**
14113
14354
  * These are the messages that will be spoken to the user as the tool is running.
14114
14355
  *
@@ -14141,28 +14382,9 @@ export interface QueryTool {
14141
14382
  * 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.
14142
14383
  */
14143
14384
  function?: OpenAIFunction;
14144
- /**
14145
- * This is the server that will be hit when this tool is requested by the model.
14146
- *
14147
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
14148
- *
14149
- * 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.
14150
- */
14151
- server?: Server;
14152
14385
  }
14153
14386
 
14154
14387
  export interface GoogleCalendarCreateEventTool {
14155
- /**
14156
- * This determines if the tool is async.
14157
- *
14158
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
14159
- *
14160
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
14161
- *
14162
- * Defaults to synchronous (`false`).
14163
- * @example false
14164
- */
14165
- async?: boolean;
14166
14388
  /**
14167
14389
  * These are the messages that will be spoken to the user as the tool is running.
14168
14390
  *
@@ -14193,28 +14415,9 @@ export interface GoogleCalendarCreateEventTool {
14193
14415
  * 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.
14194
14416
  */
14195
14417
  function?: OpenAIFunction;
14196
- /**
14197
- * This is the server that will be hit when this tool is requested by the model.
14198
- *
14199
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
14200
- *
14201
- * 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.
14202
- */
14203
- server?: Server;
14204
14418
  }
14205
14419
 
14206
14420
  export interface GoogleSheetsRowAppendTool {
14207
- /**
14208
- * This determines if the tool is async.
14209
- *
14210
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
14211
- *
14212
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
14213
- *
14214
- * Defaults to synchronous (`false`).
14215
- * @example false
14216
- */
14217
- async?: boolean;
14218
14421
  /**
14219
14422
  * These are the messages that will be spoken to the user as the tool is running.
14220
14423
  *
@@ -14245,28 +14448,9 @@ export interface GoogleSheetsRowAppendTool {
14245
14448
  * 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.
14246
14449
  */
14247
14450
  function?: OpenAIFunction;
14248
- /**
14249
- * This is the server that will be hit when this tool is requested by the model.
14250
- *
14251
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
14252
- *
14253
- * 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.
14254
- */
14255
- server?: Server;
14256
14451
  }
14257
14452
 
14258
14453
  export interface GoogleCalendarCheckAvailabilityTool {
14259
- /**
14260
- * This determines if the tool is async.
14261
- *
14262
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
14263
- *
14264
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
14265
- *
14266
- * Defaults to synchronous (`false`).
14267
- * @example false
14268
- */
14269
- async?: boolean;
14270
14454
  /**
14271
14455
  * These are the messages that will be spoken to the user as the tool is running.
14272
14456
  *
@@ -14297,28 +14481,9 @@ export interface GoogleCalendarCheckAvailabilityTool {
14297
14481
  * 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.
14298
14482
  */
14299
14483
  function?: OpenAIFunction;
14300
- /**
14301
- * This is the server that will be hit when this tool is requested by the model.
14302
- *
14303
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
14304
- *
14305
- * 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.
14306
- */
14307
- server?: Server;
14308
14484
  }
14309
14485
 
14310
14486
  export interface SlackSendMessageTool {
14311
- /**
14312
- * This determines if the tool is async.
14313
- *
14314
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
14315
- *
14316
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
14317
- *
14318
- * Defaults to synchronous (`false`).
14319
- * @example false
14320
- */
14321
- async?: boolean;
14322
14487
  /**
14323
14488
  * These are the messages that will be spoken to the user as the tool is running.
14324
14489
  *
@@ -14349,28 +14514,9 @@ export interface SlackSendMessageTool {
14349
14514
  * 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.
14350
14515
  */
14351
14516
  function?: OpenAIFunction;
14352
- /**
14353
- * This is the server that will be hit when this tool is requested by the model.
14354
- *
14355
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
14356
- *
14357
- * 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.
14358
- */
14359
- server?: Server;
14360
14517
  }
14361
14518
 
14362
14519
  export interface SmsTool {
14363
- /**
14364
- * This determines if the tool is async.
14365
- *
14366
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
14367
- *
14368
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
14369
- *
14370
- * Defaults to synchronous (`false`).
14371
- * @example false
14372
- */
14373
- async?: boolean;
14374
14520
  /**
14375
14521
  * These are the messages that will be spoken to the user as the tool is running.
14376
14522
  *
@@ -14401,28 +14547,9 @@ export interface SmsTool {
14401
14547
  * 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.
14402
14548
  */
14403
14549
  function?: OpenAIFunction;
14404
- /**
14405
- * This is the server that will be hit when this tool is requested by the model.
14406
- *
14407
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
14408
- *
14409
- * 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.
14410
- */
14411
- server?: Server;
14412
14550
  }
14413
14551
 
14414
14552
  export interface McpTool {
14415
- /**
14416
- * This determines if the tool is async.
14417
- *
14418
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
14419
- *
14420
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
14421
- *
14422
- * Defaults to synchronous (`false`).
14423
- * @example false
14424
- */
14425
- async?: boolean;
14426
14553
  /**
14427
14554
  * These are the messages that will be spoken to the user as the tool is running.
14428
14555
  *
@@ -14431,6 +14558,18 @@ export interface McpTool {
14431
14558
  messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
14432
14559
  /** The type of tool. "mcp" for MCP tool. */
14433
14560
  type: 'mcp';
14561
+ /**
14562
+ *
14563
+ * This is the server where a `tool-calls` webhook will be sent.
14564
+ *
14565
+ * Notes:
14566
+ * - Webhook is sent to this server when a tool call is made.
14567
+ * - Webhook contains the call, assistant, and phone number objects.
14568
+ * - Webhook contains the variables set on the assistant.
14569
+ * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.
14570
+ * - Webhook expects a response with tool call result.
14571
+ */
14572
+ server?: Server;
14434
14573
  /** This is the unique identifier for the tool. */
14435
14574
  id: string;
14436
14575
  /** This is the unique identifier for the organization that this tool belongs to. */
@@ -14453,28 +14592,9 @@ export interface McpTool {
14453
14592
  * 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.
14454
14593
  */
14455
14594
  function?: OpenAIFunction;
14456
- /**
14457
- * This is the server that will be hit when this tool is requested by the model.
14458
- *
14459
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
14460
- *
14461
- * 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.
14462
- */
14463
- server?: Server;
14464
14595
  }
14465
14596
 
14466
14597
  export interface GoHighLevelCalendarAvailabilityTool {
14467
- /**
14468
- * This determines if the tool is async.
14469
- *
14470
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
14471
- *
14472
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
14473
- *
14474
- * Defaults to synchronous (`false`).
14475
- * @example false
14476
- */
14477
- async?: boolean;
14478
14598
  /**
14479
14599
  * These are the messages that will be spoken to the user as the tool is running.
14480
14600
  *
@@ -14505,28 +14625,9 @@ export interface GoHighLevelCalendarAvailabilityTool {
14505
14625
  * 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.
14506
14626
  */
14507
14627
  function?: OpenAIFunction;
14508
- /**
14509
- * This is the server that will be hit when this tool is requested by the model.
14510
- *
14511
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
14512
- *
14513
- * 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.
14514
- */
14515
- server?: Server;
14516
14628
  }
14517
14629
 
14518
14630
  export interface GoHighLevelCalendarEventCreateTool {
14519
- /**
14520
- * This determines if the tool is async.
14521
- *
14522
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
14523
- *
14524
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
14525
- *
14526
- * Defaults to synchronous (`false`).
14527
- * @example false
14528
- */
14529
- async?: boolean;
14530
14631
  /**
14531
14632
  * These are the messages that will be spoken to the user as the tool is running.
14532
14633
  *
@@ -14557,28 +14658,9 @@ export interface GoHighLevelCalendarEventCreateTool {
14557
14658
  * 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.
14558
14659
  */
14559
14660
  function?: OpenAIFunction;
14560
- /**
14561
- * This is the server that will be hit when this tool is requested by the model.
14562
- *
14563
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
14564
- *
14565
- * 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.
14566
- */
14567
- server?: Server;
14568
14661
  }
14569
14662
 
14570
14663
  export interface GoHighLevelContactCreateTool {
14571
- /**
14572
- * This determines if the tool is async.
14573
- *
14574
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
14575
- *
14576
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
14577
- *
14578
- * Defaults to synchronous (`false`).
14579
- * @example false
14580
- */
14581
- async?: boolean;
14582
14664
  /**
14583
14665
  * These are the messages that will be spoken to the user as the tool is running.
14584
14666
  *
@@ -14609,28 +14691,9 @@ export interface GoHighLevelContactCreateTool {
14609
14691
  * 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.
14610
14692
  */
14611
14693
  function?: OpenAIFunction;
14612
- /**
14613
- * This is the server that will be hit when this tool is requested by the model.
14614
- *
14615
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
14616
- *
14617
- * 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.
14618
- */
14619
- server?: Server;
14620
14694
  }
14621
14695
 
14622
14696
  export interface GoHighLevelContactGetTool {
14623
- /**
14624
- * This determines if the tool is async.
14625
- *
14626
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
14627
- *
14628
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
14629
- *
14630
- * Defaults to synchronous (`false`).
14631
- * @example false
14632
- */
14633
- async?: boolean;
14634
14697
  /**
14635
14698
  * These are the messages that will be spoken to the user as the tool is running.
14636
14699
  *
@@ -14661,28 +14724,9 @@ export interface GoHighLevelContactGetTool {
14661
14724
  * 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.
14662
14725
  */
14663
14726
  function?: OpenAIFunction;
14664
- /**
14665
- * This is the server that will be hit when this tool is requested by the model.
14666
- *
14667
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
14668
- *
14669
- * 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.
14670
- */
14671
- server?: Server;
14672
14727
  }
14673
14728
 
14674
14729
  export interface CreateApiRequestToolDTO {
14675
- /**
14676
- * This determines if the tool is async.
14677
- *
14678
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
14679
- *
14680
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
14681
- *
14682
- * Defaults to synchronous (`false`).
14683
- * @example false
14684
- */
14685
- async?: boolean;
14686
14730
  /**
14687
14731
  * These are the messages that will be spoken to the user as the tool is running.
14688
14732
  *
@@ -14714,7 +14758,7 @@ export interface CreateApiRequestToolDTO {
14714
14758
  /** This is where the request will be sent. */
14715
14759
  url: string;
14716
14760
  /** This is the body of the request. */
14717
- body: JsonSchema;
14761
+ body?: JsonSchema;
14718
14762
  /** These are the headers to send in the request. */
14719
14763
  headers?: JsonSchema;
14720
14764
  /**
@@ -14731,28 +14775,9 @@ export interface CreateApiRequestToolDTO {
14731
14775
  * 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.
14732
14776
  */
14733
14777
  function?: OpenAIFunction;
14734
- /**
14735
- * This is the server that will be hit when this tool is requested by the model.
14736
- *
14737
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
14738
- *
14739
- * 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.
14740
- */
14741
- server?: Server;
14742
14778
  }
14743
14779
 
14744
14780
  export interface CreateOutputToolDTO {
14745
- /**
14746
- * This determines if the tool is async.
14747
- *
14748
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
14749
- *
14750
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
14751
- *
14752
- * Defaults to synchronous (`false`).
14753
- * @example false
14754
- */
14755
- async?: boolean;
14756
14781
  /**
14757
14782
  * These are the messages that will be spoken to the user as the tool is running.
14758
14783
  *
@@ -14769,28 +14794,9 @@ export interface CreateOutputToolDTO {
14769
14794
  * 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.
14770
14795
  */
14771
14796
  function?: OpenAIFunction;
14772
- /**
14773
- * This is the server that will be hit when this tool is requested by the model.
14774
- *
14775
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
14776
- *
14777
- * 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.
14778
- */
14779
- server?: Server;
14780
14797
  }
14781
14798
 
14782
14799
  export interface CreateBashToolDTO {
14783
- /**
14784
- * This determines if the tool is async.
14785
- *
14786
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
14787
- *
14788
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
14789
- *
14790
- * Defaults to synchronous (`false`).
14791
- * @example false
14792
- */
14793
- async?: boolean;
14794
14800
  /**
14795
14801
  * These are the messages that will be spoken to the user as the tool is running.
14796
14802
  *
@@ -14801,6 +14807,18 @@ export interface CreateBashToolDTO {
14801
14807
  type: 'bash';
14802
14808
  /** The sub type of tool. */
14803
14809
  subType: 'bash_20241022';
14810
+ /**
14811
+ *
14812
+ * This is the server where a `tool-calls` webhook will be sent.
14813
+ *
14814
+ * Notes:
14815
+ * - Webhook is sent to this server when a tool call is made.
14816
+ * - Webhook contains the call, assistant, and phone number objects.
14817
+ * - Webhook contains the variables set on the assistant.
14818
+ * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.
14819
+ * - Webhook expects a response with tool call result.
14820
+ */
14821
+ server?: Server;
14804
14822
  /**
14805
14823
  * The name of the tool, fixed to 'bash'
14806
14824
  * @default "bash"
@@ -14814,28 +14832,9 @@ export interface CreateBashToolDTO {
14814
14832
  * 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.
14815
14833
  */
14816
14834
  function?: OpenAIFunction;
14817
- /**
14818
- * This is the server that will be hit when this tool is requested by the model.
14819
- *
14820
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
14821
- *
14822
- * 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.
14823
- */
14824
- server?: Server;
14825
14835
  }
14826
14836
 
14827
14837
  export interface CreateComputerToolDTO {
14828
- /**
14829
- * This determines if the tool is async.
14830
- *
14831
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
14832
- *
14833
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
14834
- *
14835
- * Defaults to synchronous (`false`).
14836
- * @example false
14837
- */
14838
- async?: boolean;
14839
14838
  /**
14840
14839
  * These are the messages that will be spoken to the user as the tool is running.
14841
14840
  *
@@ -14846,6 +14845,18 @@ export interface CreateComputerToolDTO {
14846
14845
  type: 'computer';
14847
14846
  /** The sub type of tool. */
14848
14847
  subType: 'computer_20241022';
14848
+ /**
14849
+ *
14850
+ * This is the server where a `tool-calls` webhook will be sent.
14851
+ *
14852
+ * Notes:
14853
+ * - Webhook is sent to this server when a tool call is made.
14854
+ * - Webhook contains the call, assistant, and phone number objects.
14855
+ * - Webhook contains the variables set on the assistant.
14856
+ * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.
14857
+ * - Webhook expects a response with tool call result.
14858
+ */
14859
+ server?: Server;
14849
14860
  /**
14850
14861
  * The name of the tool, fixed to 'computer'
14851
14862
  * @default "computer"
@@ -14865,28 +14876,9 @@ export interface CreateComputerToolDTO {
14865
14876
  * 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.
14866
14877
  */
14867
14878
  function?: OpenAIFunction;
14868
- /**
14869
- * This is the server that will be hit when this tool is requested by the model.
14870
- *
14871
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
14872
- *
14873
- * 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.
14874
- */
14875
- server?: Server;
14876
14879
  }
14877
14880
 
14878
14881
  export interface CreateTextEditorToolDTO {
14879
- /**
14880
- * This determines if the tool is async.
14881
- *
14882
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
14883
- *
14884
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
14885
- *
14886
- * Defaults to synchronous (`false`).
14887
- * @example false
14888
- */
14889
- async?: boolean;
14890
14882
  /**
14891
14883
  * These are the messages that will be spoken to the user as the tool is running.
14892
14884
  *
@@ -14897,6 +14889,18 @@ export interface CreateTextEditorToolDTO {
14897
14889
  type: 'textEditor';
14898
14890
  /** The sub type of tool. */
14899
14891
  subType: 'text_editor_20241022';
14892
+ /**
14893
+ *
14894
+ * This is the server where a `tool-calls` webhook will be sent.
14895
+ *
14896
+ * Notes:
14897
+ * - Webhook is sent to this server when a tool call is made.
14898
+ * - Webhook contains the call, assistant, and phone number objects.
14899
+ * - Webhook contains the variables set on the assistant.
14900
+ * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.
14901
+ * - Webhook expects a response with tool call result.
14902
+ */
14903
+ server?: Server;
14900
14904
  /**
14901
14905
  * The name of the tool, fixed to 'str_replace_editor'
14902
14906
  * @default "str_replace_editor"
@@ -14910,30 +14914,11 @@ export interface CreateTextEditorToolDTO {
14910
14914
  * 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.
14911
14915
  */
14912
14916
  function?: OpenAIFunction;
14913
- /**
14914
- * This is the server that will be hit when this tool is requested by the model.
14915
- *
14916
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
14917
- *
14918
- * 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.
14919
- */
14920
- server?: Server;
14921
14917
  }
14922
14918
 
14923
14919
  export interface CreateSmsToolDTO {
14924
14920
  /**
14925
- * This determines if the tool is async.
14926
- *
14927
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
14928
- *
14929
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
14930
- *
14931
- * Defaults to synchronous (`false`).
14932
- * @example false
14933
- */
14934
- async?: boolean;
14935
- /**
14936
- * These are the messages that will be spoken to the user as the tool is running.
14921
+ * These are the messages that will be spoken to the user as the tool is running.
14937
14922
  *
14938
14923
  * 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.
14939
14924
  */
@@ -14948,28 +14933,9 @@ export interface CreateSmsToolDTO {
14948
14933
  * 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.
14949
14934
  */
14950
14935
  function?: OpenAIFunction;
14951
- /**
14952
- * This is the server that will be hit when this tool is requested by the model.
14953
- *
14954
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
14955
- *
14956
- * 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.
14957
- */
14958
- server?: Server;
14959
14936
  }
14960
14937
 
14961
14938
  export interface UpdateDtmfToolDTO {
14962
- /**
14963
- * This determines if the tool is async.
14964
- *
14965
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
14966
- *
14967
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
14968
- *
14969
- * Defaults to synchronous (`false`).
14970
- * @example false
14971
- */
14972
- async?: boolean;
14973
14939
  /**
14974
14940
  * These are the messages that will be spoken to the user as the tool is running.
14975
14941
  *
@@ -14984,28 +14950,9 @@ export interface UpdateDtmfToolDTO {
14984
14950
  * 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.
14985
14951
  */
14986
14952
  function?: OpenAIFunction;
14987
- /**
14988
- * This is the server that will be hit when this tool is requested by the model.
14989
- *
14990
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
14991
- *
14992
- * 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.
14993
- */
14994
- server?: Server;
14995
14953
  }
14996
14954
 
14997
14955
  export interface UpdateEndCallToolDTO {
14998
- /**
14999
- * This determines if the tool is async.
15000
- *
15001
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
15002
- *
15003
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
15004
- *
15005
- * Defaults to synchronous (`false`).
15006
- * @example false
15007
- */
15008
- async?: boolean;
15009
14956
  /**
15010
14957
  * These are the messages that will be spoken to the user as the tool is running.
15011
14958
  *
@@ -15020,34 +14967,38 @@ export interface UpdateEndCallToolDTO {
15020
14967
  * 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.
15021
14968
  */
15022
14969
  function?: OpenAIFunction;
15023
- /**
15024
- * This is the server that will be hit when this tool is requested by the model.
15025
- *
15026
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
15027
- *
15028
- * 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.
15029
- */
15030
- server?: Server;
15031
14970
  }
15032
14971
 
15033
14972
  export interface UpdateFunctionToolDTO {
14973
+ /**
14974
+ * These are the messages that will be spoken to the user as the tool is running.
14975
+ *
14976
+ * 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.
14977
+ */
14978
+ messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
15034
14979
  /**
15035
14980
  * This determines if the tool is async.
15036
14981
  *
15037
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
14982
+ * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
15038
14983
  *
15039
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
14984
+ * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
15040
14985
  *
15041
- * Defaults to synchronous (`false`).
14986
+ * Defaults to synchronous (`false`).
15042
14987
  * @example false
15043
14988
  */
15044
14989
  async?: boolean;
15045
14990
  /**
15046
- * These are the messages that will be spoken to the user as the tool is running.
15047
14991
  *
15048
- * 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.
14992
+ * This is the server where a `tool-calls` webhook will be sent.
14993
+ *
14994
+ * Notes:
14995
+ * - Webhook is sent to this server when a tool call is made.
14996
+ * - Webhook contains the call, assistant, and phone number objects.
14997
+ * - Webhook contains the variables set on the assistant.
14998
+ * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.
14999
+ * - Webhook expects a response with tool call result.
15049
15000
  */
15050
- messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
15001
+ server?: Server;
15051
15002
  /**
15052
15003
  * This is the function definition of the tool.
15053
15004
  *
@@ -15056,28 +15007,9 @@ export interface UpdateFunctionToolDTO {
15056
15007
  * 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.
15057
15008
  */
15058
15009
  function?: OpenAIFunction;
15059
- /**
15060
- * This is the server that will be hit when this tool is requested by the model.
15061
- *
15062
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
15063
- *
15064
- * 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.
15065
- */
15066
- server?: Server;
15067
15010
  }
15068
15011
 
15069
15012
  export interface UpdateGhlToolDTO {
15070
- /**
15071
- * This determines if the tool is async.
15072
- *
15073
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
15074
- *
15075
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
15076
- *
15077
- * Defaults to synchronous (`false`).
15078
- * @example false
15079
- */
15080
- async?: boolean;
15081
15013
  /**
15082
15014
  * These are the messages that will be spoken to the user as the tool is running.
15083
15015
  *
@@ -15092,29 +15024,10 @@ export interface UpdateGhlToolDTO {
15092
15024
  * 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.
15093
15025
  */
15094
15026
  function?: OpenAIFunction;
15095
- /**
15096
- * This is the server that will be hit when this tool is requested by the model.
15097
- *
15098
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
15099
- *
15100
- * 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.
15101
- */
15102
- server?: Server;
15103
15027
  metadata?: GhlToolMetadata;
15104
15028
  }
15105
15029
 
15106
15030
  export interface UpdateMakeToolDTO {
15107
- /**
15108
- * This determines if the tool is async.
15109
- *
15110
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
15111
- *
15112
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
15113
- *
15114
- * Defaults to synchronous (`false`).
15115
- * @example false
15116
- */
15117
- async?: boolean;
15118
15031
  /**
15119
15032
  * These are the messages that will be spoken to the user as the tool is running.
15120
15033
  *
@@ -15129,29 +15042,10 @@ export interface UpdateMakeToolDTO {
15129
15042
  * 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.
15130
15043
  */
15131
15044
  function?: OpenAIFunction;
15132
- /**
15133
- * This is the server that will be hit when this tool is requested by the model.
15134
- *
15135
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
15136
- *
15137
- * 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.
15138
- */
15139
- server?: Server;
15140
15045
  metadata?: MakeToolMetadata;
15141
15046
  }
15142
15047
 
15143
15048
  export interface UpdateTransferCallToolDTO {
15144
- /**
15145
- * This determines if the tool is async.
15146
- *
15147
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
15148
- *
15149
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
15150
- *
15151
- * Defaults to synchronous (`false`).
15152
- * @example false
15153
- */
15154
- async?: boolean;
15155
15049
  /**
15156
15050
  * These are the messages that will be spoken to the user as the tool is running.
15157
15051
  *
@@ -15172,28 +15066,9 @@ export interface UpdateTransferCallToolDTO {
15172
15066
  * 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.
15173
15067
  */
15174
15068
  function?: OpenAIFunction;
15175
- /**
15176
- * This is the server that will be hit when this tool is requested by the model.
15177
- *
15178
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
15179
- *
15180
- * 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.
15181
- */
15182
- server?: Server;
15183
15069
  }
15184
15070
 
15185
15071
  export interface UpdateOutputToolDTO {
15186
- /**
15187
- * This determines if the tool is async.
15188
- *
15189
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
15190
- *
15191
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
15192
- *
15193
- * Defaults to synchronous (`false`).
15194
- * @example false
15195
- */
15196
- async?: boolean;
15197
15072
  /**
15198
15073
  * These are the messages that will be spoken to the user as the tool is running.
15199
15074
  *
@@ -15208,28 +15083,9 @@ export interface UpdateOutputToolDTO {
15208
15083
  * 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.
15209
15084
  */
15210
15085
  function?: OpenAIFunction;
15211
- /**
15212
- * This is the server that will be hit when this tool is requested by the model.
15213
- *
15214
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
15215
- *
15216
- * 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.
15217
- */
15218
- server?: Server;
15219
15086
  }
15220
15087
 
15221
15088
  export interface UpdateBashToolDTO {
15222
- /**
15223
- * This determines if the tool is async.
15224
- *
15225
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
15226
- *
15227
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
15228
- *
15229
- * Defaults to synchronous (`false`).
15230
- * @example false
15231
- */
15232
- async?: boolean;
15233
15089
  /**
15234
15090
  * These are the messages that will be spoken to the user as the tool is running.
15235
15091
  *
@@ -15239,21 +15095,25 @@ export interface UpdateBashToolDTO {
15239
15095
  /** The sub type of tool. */
15240
15096
  subType?: 'bash_20241022';
15241
15097
  /**
15242
- * This is the function definition of the tool.
15243
15098
  *
15244
- * For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases.
15099
+ * This is the server where a `tool-calls` webhook will be sent.
15245
15100
  *
15246
- * 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.
15101
+ * Notes:
15102
+ * - Webhook is sent to this server when a tool call is made.
15103
+ * - Webhook contains the call, assistant, and phone number objects.
15104
+ * - Webhook contains the variables set on the assistant.
15105
+ * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.
15106
+ * - Webhook expects a response with tool call result.
15247
15107
  */
15248
- function?: OpenAIFunction;
15108
+ server?: Server;
15249
15109
  /**
15250
- * This is the server that will be hit when this tool is requested by the model.
15110
+ * This is the function definition of the tool.
15251
15111
  *
15252
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
15112
+ * For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases.
15253
15113
  *
15254
- * 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.
15114
+ * 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.
15255
15115
  */
15256
- server?: Server;
15116
+ function?: OpenAIFunction;
15257
15117
  /**
15258
15118
  * The name of the tool, fixed to 'bash'
15259
15119
  * @default "bash"
@@ -15262,17 +15122,6 @@ export interface UpdateBashToolDTO {
15262
15122
  }
15263
15123
 
15264
15124
  export interface UpdateComputerToolDTO {
15265
- /**
15266
- * This determines if the tool is async.
15267
- *
15268
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
15269
- *
15270
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
15271
- *
15272
- * Defaults to synchronous (`false`).
15273
- * @example false
15274
- */
15275
- async?: boolean;
15276
15125
  /**
15277
15126
  * These are the messages that will be spoken to the user as the tool is running.
15278
15127
  *
@@ -15282,21 +15131,25 @@ export interface UpdateComputerToolDTO {
15282
15131
  /** The sub type of tool. */
15283
15132
  subType?: 'computer_20241022';
15284
15133
  /**
15285
- * This is the function definition of the tool.
15286
15134
  *
15287
- * For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases.
15135
+ * This is the server where a `tool-calls` webhook will be sent.
15288
15136
  *
15289
- * 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.
15137
+ * Notes:
15138
+ * - Webhook is sent to this server when a tool call is made.
15139
+ * - Webhook contains the call, assistant, and phone number objects.
15140
+ * - Webhook contains the variables set on the assistant.
15141
+ * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.
15142
+ * - Webhook expects a response with tool call result.
15290
15143
  */
15291
- function?: OpenAIFunction;
15144
+ server?: Server;
15292
15145
  /**
15293
- * This is the server that will be hit when this tool is requested by the model.
15146
+ * This is the function definition of the tool.
15294
15147
  *
15295
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
15148
+ * For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases.
15296
15149
  *
15297
- * 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.
15150
+ * 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.
15298
15151
  */
15299
- server?: Server;
15152
+ function?: OpenAIFunction;
15300
15153
  /**
15301
15154
  * The name of the tool, fixed to 'computer'
15302
15155
  * @default "computer"
@@ -15311,17 +15164,6 @@ export interface UpdateComputerToolDTO {
15311
15164
  }
15312
15165
 
15313
15166
  export interface UpdateTextEditorToolDTO {
15314
- /**
15315
- * This determines if the tool is async.
15316
- *
15317
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
15318
- *
15319
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
15320
- *
15321
- * Defaults to synchronous (`false`).
15322
- * @example false
15323
- */
15324
- async?: boolean;
15325
15167
  /**
15326
15168
  * These are the messages that will be spoken to the user as the tool is running.
15327
15169
  *
@@ -15331,21 +15173,25 @@ export interface UpdateTextEditorToolDTO {
15331
15173
  /** The sub type of tool. */
15332
15174
  subType?: 'text_editor_20241022';
15333
15175
  /**
15334
- * This is the function definition of the tool.
15335
15176
  *
15336
- * For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases.
15177
+ * This is the server where a `tool-calls` webhook will be sent.
15337
15178
  *
15338
- * 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.
15179
+ * Notes:
15180
+ * - Webhook is sent to this server when a tool call is made.
15181
+ * - Webhook contains the call, assistant, and phone number objects.
15182
+ * - Webhook contains the variables set on the assistant.
15183
+ * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.
15184
+ * - Webhook expects a response with tool call result.
15339
15185
  */
15340
- function?: OpenAIFunction;
15186
+ server?: Server;
15341
15187
  /**
15342
- * This is the server that will be hit when this tool is requested by the model.
15188
+ * This is the function definition of the tool.
15343
15189
  *
15344
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
15190
+ * For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases.
15345
15191
  *
15346
- * 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.
15192
+ * 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.
15347
15193
  */
15348
- server?: Server;
15194
+ function?: OpenAIFunction;
15349
15195
  /**
15350
15196
  * The name of the tool, fixed to 'str_replace_editor'
15351
15197
  * @default "str_replace_editor"
@@ -15354,17 +15200,6 @@ export interface UpdateTextEditorToolDTO {
15354
15200
  }
15355
15201
 
15356
15202
  export interface UpdateQueryToolDTO {
15357
- /**
15358
- * This determines if the tool is async.
15359
- *
15360
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
15361
- *
15362
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
15363
- *
15364
- * Defaults to synchronous (`false`).
15365
- * @example false
15366
- */
15367
- async?: boolean;
15368
15203
  /**
15369
15204
  * These are the messages that will be spoken to the user as the tool is running.
15370
15205
  *
@@ -15381,28 +15216,9 @@ export interface UpdateQueryToolDTO {
15381
15216
  * 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.
15382
15217
  */
15383
15218
  function?: OpenAIFunction;
15384
- /**
15385
- * This is the server that will be hit when this tool is requested by the model.
15386
- *
15387
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
15388
- *
15389
- * 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.
15390
- */
15391
- server?: Server;
15392
15219
  }
15393
15220
 
15394
15221
  export interface UpdateGoogleCalendarCreateEventToolDTO {
15395
- /**
15396
- * This determines if the tool is async.
15397
- *
15398
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
15399
- *
15400
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
15401
- *
15402
- * Defaults to synchronous (`false`).
15403
- * @example false
15404
- */
15405
- async?: boolean;
15406
15222
  /**
15407
15223
  * These are the messages that will be spoken to the user as the tool is running.
15408
15224
  *
@@ -15417,28 +15233,9 @@ export interface UpdateGoogleCalendarCreateEventToolDTO {
15417
15233
  * 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.
15418
15234
  */
15419
15235
  function?: OpenAIFunction;
15420
- /**
15421
- * This is the server that will be hit when this tool is requested by the model.
15422
- *
15423
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
15424
- *
15425
- * 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.
15426
- */
15427
- server?: Server;
15428
15236
  }
15429
15237
 
15430
15238
  export interface UpdateGoogleSheetsRowAppendToolDTO {
15431
- /**
15432
- * This determines if the tool is async.
15433
- *
15434
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
15435
- *
15436
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
15437
- *
15438
- * Defaults to synchronous (`false`).
15439
- * @example false
15440
- */
15441
- async?: boolean;
15442
15239
  /**
15443
15240
  * These are the messages that will be spoken to the user as the tool is running.
15444
15241
  *
@@ -15453,28 +15250,9 @@ export interface UpdateGoogleSheetsRowAppendToolDTO {
15453
15250
  * 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.
15454
15251
  */
15455
15252
  function?: OpenAIFunction;
15456
- /**
15457
- * This is the server that will be hit when this tool is requested by the model.
15458
- *
15459
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
15460
- *
15461
- * 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.
15462
- */
15463
- server?: Server;
15464
15253
  }
15465
15254
 
15466
15255
  export interface UpdateGoogleCalendarCheckAvailabilityToolDTO {
15467
- /**
15468
- * This determines if the tool is async.
15469
- *
15470
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
15471
- *
15472
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
15473
- *
15474
- * Defaults to synchronous (`false`).
15475
- * @example false
15476
- */
15477
- async?: boolean;
15478
15256
  /**
15479
15257
  * These are the messages that will be spoken to the user as the tool is running.
15480
15258
  *
@@ -15489,28 +15267,9 @@ export interface UpdateGoogleCalendarCheckAvailabilityToolDTO {
15489
15267
  * 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.
15490
15268
  */
15491
15269
  function?: OpenAIFunction;
15492
- /**
15493
- * This is the server that will be hit when this tool is requested by the model.
15494
- *
15495
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
15496
- *
15497
- * 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.
15498
- */
15499
- server?: Server;
15500
15270
  }
15501
15271
 
15502
15272
  export interface UpdateSlackSendMessageToolDTO {
15503
- /**
15504
- * This determines if the tool is async.
15505
- *
15506
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
15507
- *
15508
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
15509
- *
15510
- * Defaults to synchronous (`false`).
15511
- * @example false
15512
- */
15513
- async?: boolean;
15514
15273
  /**
15515
15274
  * These are the messages that will be spoken to the user as the tool is running.
15516
15275
  *
@@ -15525,28 +15284,9 @@ export interface UpdateSlackSendMessageToolDTO {
15525
15284
  * 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.
15526
15285
  */
15527
15286
  function?: OpenAIFunction;
15528
- /**
15529
- * This is the server that will be hit when this tool is requested by the model.
15530
- *
15531
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
15532
- *
15533
- * 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.
15534
- */
15535
- server?: Server;
15536
15287
  }
15537
15288
 
15538
15289
  export interface UpdateSmsToolDTO {
15539
- /**
15540
- * This determines if the tool is async.
15541
- *
15542
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
15543
- *
15544
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
15545
- *
15546
- * Defaults to synchronous (`false`).
15547
- * @example false
15548
- */
15549
- async?: boolean;
15550
15290
  /**
15551
15291
  * These are the messages that will be spoken to the user as the tool is running.
15552
15292
  *
@@ -15561,28 +15301,9 @@ export interface UpdateSmsToolDTO {
15561
15301
  * 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.
15562
15302
  */
15563
15303
  function?: OpenAIFunction;
15564
- /**
15565
- * This is the server that will be hit when this tool is requested by the model.
15566
- *
15567
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
15568
- *
15569
- * 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.
15570
- */
15571
- server?: Server;
15572
15304
  }
15573
15305
 
15574
15306
  export interface UpdateMcpToolDTO {
15575
- /**
15576
- * This determines if the tool is async.
15577
- *
15578
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
15579
- *
15580
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
15581
- *
15582
- * Defaults to synchronous (`false`).
15583
- * @example false
15584
- */
15585
- async?: boolean;
15586
15307
  /**
15587
15308
  * These are the messages that will be spoken to the user as the tool is running.
15588
15309
  *
@@ -15590,41 +15311,17 @@ export interface UpdateMcpToolDTO {
15590
15311
  */
15591
15312
  messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
15592
15313
  /**
15593
- * This is the function definition of the tool.
15594
15314
  *
15595
- * For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases.
15315
+ * This is the server where a `tool-calls` webhook will be sent.
15596
15316
  *
15597
- * 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.
15598
- */
15599
- function?: OpenAIFunction;
15600
- /**
15601
- * This is the server that will be hit when this tool is requested by the model.
15602
- *
15603
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
15604
- *
15605
- * 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.
15317
+ * Notes:
15318
+ * - Webhook is sent to this server when a tool call is made.
15319
+ * - Webhook contains the call, assistant, and phone number objects.
15320
+ * - Webhook contains the variables set on the assistant.
15321
+ * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.
15322
+ * - Webhook expects a response with tool call result.
15606
15323
  */
15607
15324
  server?: Server;
15608
- }
15609
-
15610
- export interface UpdateGoHighLevelCalendarAvailabilityToolDTO {
15611
- /**
15612
- * This determines if the tool is async.
15613
- *
15614
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
15615
- *
15616
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
15617
- *
15618
- * Defaults to synchronous (`false`).
15619
- * @example false
15620
- */
15621
- async?: boolean;
15622
- /**
15623
- * These are the messages that will be spoken to the user as the tool is running.
15624
- *
15625
- * 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.
15626
- */
15627
- messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
15628
15325
  /**
15629
15326
  * This is the function definition of the tool.
15630
15327
  *
@@ -15633,28 +15330,9 @@ export interface UpdateGoHighLevelCalendarAvailabilityToolDTO {
15633
15330
  * 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.
15634
15331
  */
15635
15332
  function?: OpenAIFunction;
15636
- /**
15637
- * This is the server that will be hit when this tool is requested by the model.
15638
- *
15639
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
15640
- *
15641
- * 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.
15642
- */
15643
- server?: Server;
15644
15333
  }
15645
15334
 
15646
- export interface UpdateGoHighLevelCalendarEventCreateToolDTO {
15647
- /**
15648
- * This determines if the tool is async.
15649
- *
15650
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
15651
- *
15652
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
15653
- *
15654
- * Defaults to synchronous (`false`).
15655
- * @example false
15656
- */
15657
- async?: boolean;
15335
+ export interface UpdateGoHighLevelCalendarAvailabilityToolDTO {
15658
15336
  /**
15659
15337
  * These are the messages that will be spoken to the user as the tool is running.
15660
15338
  *
@@ -15669,28 +15347,26 @@ export interface UpdateGoHighLevelCalendarEventCreateToolDTO {
15669
15347
  * 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.
15670
15348
  */
15671
15349
  function?: OpenAIFunction;
15672
- /**
15673
- * This is the server that will be hit when this tool is requested by the model.
15674
- *
15675
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
15676
- *
15677
- * 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.
15678
- */
15679
- server?: Server;
15680
15350
  }
15681
15351
 
15682
- export interface UpdateGoHighLevelContactCreateToolDTO {
15352
+ export interface UpdateGoHighLevelCalendarEventCreateToolDTO {
15683
15353
  /**
15684
- * This determines if the tool is async.
15354
+ * These are the messages that will be spoken to the user as the tool is running.
15685
15355
  *
15686
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
15356
+ * 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.
15357
+ */
15358
+ messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
15359
+ /**
15360
+ * This is the function definition of the tool.
15687
15361
  *
15688
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
15362
+ * For `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases.
15689
15363
  *
15690
- * Defaults to synchronous (`false`).
15691
- * @example false
15364
+ * 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.
15692
15365
  */
15693
- async?: boolean;
15366
+ function?: OpenAIFunction;
15367
+ }
15368
+
15369
+ export interface UpdateGoHighLevelContactCreateToolDTO {
15694
15370
  /**
15695
15371
  * These are the messages that will be spoken to the user as the tool is running.
15696
15372
  *
@@ -15705,28 +15381,9 @@ export interface UpdateGoHighLevelContactCreateToolDTO {
15705
15381
  * 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.
15706
15382
  */
15707
15383
  function?: OpenAIFunction;
15708
- /**
15709
- * This is the server that will be hit when this tool is requested by the model.
15710
- *
15711
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
15712
- *
15713
- * 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.
15714
- */
15715
- server?: Server;
15716
15384
  }
15717
15385
 
15718
15386
  export interface UpdateGoHighLevelContactGetToolDTO {
15719
- /**
15720
- * This determines if the tool is async.
15721
- *
15722
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
15723
- *
15724
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
15725
- *
15726
- * Defaults to synchronous (`false`).
15727
- * @example false
15728
- */
15729
- async?: boolean;
15730
15387
  /**
15731
15388
  * These are the messages that will be spoken to the user as the tool is running.
15732
15389
  *
@@ -15741,14 +15398,6 @@ export interface UpdateGoHighLevelContactGetToolDTO {
15741
15398
  * 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.
15742
15399
  */
15743
15400
  function?: OpenAIFunction;
15744
- /**
15745
- * This is the server that will be hit when this tool is requested by the model.
15746
- *
15747
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
15748
- *
15749
- * 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.
15750
- */
15751
- server?: Server;
15752
15401
  }
15753
15402
 
15754
15403
  export interface CreateFileDTO {
@@ -16000,7 +15649,6 @@ export interface TrieveKnowledgeBaseImport {
16000
15649
 
16001
15650
  export interface Workflow {
16002
15651
  nodes: (ConversationNode | ToolNode)[];
16003
- /** These are the options for the workflow's LLM. */
16004
15652
  model?: WorkflowOpenAIModel | WorkflowAnthropicModel;
16005
15653
  id: string;
16006
15654
  orgId: string;
@@ -16011,15 +15659,18 @@ export interface Workflow {
16011
15659
  /** @maxLength 80 */
16012
15660
  name: string;
16013
15661
  edges: Edge[];
15662
+ /** @maxLength 5000 */
15663
+ globalPrompt?: string;
16014
15664
  }
16015
15665
 
16016
15666
  export interface UpdateWorkflowDTO {
16017
15667
  nodes?: (ConversationNode | ToolNode)[];
16018
- /** These are the options for the workflow's LLM. */
16019
15668
  model?: WorkflowOpenAIModel | WorkflowAnthropicModel;
16020
15669
  /** @maxLength 80 */
16021
15670
  name?: string;
16022
15671
  edges?: Edge[];
15672
+ /** @maxLength 5000 */
15673
+ globalPrompt?: string;
16023
15674
  }
16024
15675
 
16025
15676
  export interface Squad {
@@ -16515,23 +16166,6 @@ export interface UpdateTestSuiteRunDto {
16515
16166
  name?: string;
16516
16167
  }
16517
16168
 
16518
- export interface Metrics {
16519
- orgId: string;
16520
- rangeStart: string;
16521
- rangeEnd: string;
16522
- bill: number;
16523
- billWithinBillingLimit: boolean;
16524
- billDailyBreakdown: object;
16525
- callActive: number;
16526
- callActiveWithinConcurrencyLimit: boolean;
16527
- callMinutes: number;
16528
- callMinutesDailyBreakdown: object;
16529
- callMinutesAverage: number;
16530
- callMinutesAverageDailyBreakdown: object;
16531
- callCount: number;
16532
- callCountDailyBreakdown: object;
16533
- }
16534
-
16535
16169
  export interface TimeRange {
16536
16170
  /**
16537
16171
  * This is the time step for aggregations.
@@ -16817,7 +16451,7 @@ export interface Subscription {
16817
16451
  */
16818
16452
  updatedAt: string;
16819
16453
  /** This is the type / tier of the subscription. */
16820
- type: 'trial' | 'pay-as-you-go' | 'enterprise';
16454
+ type: 'trial' | 'pay-as-you-go' | 'enterprise' | 'agency' | 'startup' | 'growth' | 'scale';
16821
16455
  /**
16822
16456
  * This is the status of the subscription. Past due subscriptions are subscriptions
16823
16457
  * with past due payments.
@@ -16982,6 +16616,8 @@ export interface Org {
16982
16616
  plan?: OrgPlan;
16983
16617
  /** This is the secret key used for signing JWT tokens for the org. */
16984
16618
  jwtSecret?: string;
16619
+ /** This is the total number of call minutes used by this org across all time. */
16620
+ minutesUsed?: number;
16985
16621
  /**
16986
16622
  * This is the name of the org. This is just for your own reference.
16987
16623
  * @maxLength 40
@@ -20337,6 +19973,7 @@ export interface ServerMessageEndOfCallReport {
20337
19973
  | 'call.in-progress.error-vapifault-transport-never-connected'
20338
19974
  | 'call.in-progress.error-vapifault-transport-connected-but-call-not-active'
20339
19975
  | 'call.in-progress.error-vapifault-call-started-but-connection-to-transport-missing'
19976
+ | 'call.in-progress.error-vapifault-worker-died'
20340
19977
  | 'call.in-progress.error-vapifault-openai-llm-failed'
20341
19978
  | 'call.in-progress.error-vapifault-azure-openai-llm-failed'
20342
19979
  | 'call.in-progress.error-vapifault-groq-llm-failed'
@@ -20724,7 +20361,12 @@ export interface ServerMessageEndOfCallReport {
20724
20361
  | 'phone-call-provider-closed-websocket'
20725
20362
  | 'call.forwarding.operator-busy'
20726
20363
  | 'silence-timed-out'
20727
- | 'call.in-progress.error-sip-telephony-provider-failed-to-connect-call'
20364
+ | 'call.in-progress.error-sip-inbound-call-failed-to-connect'
20365
+ | 'call.in-progress.error-providerfault-outbound-sip-403-forbidden'
20366
+ | 'call.in-progress.error-providerfault-outbound-sip-407-proxy-authentication-required'
20367
+ | 'call.in-progress.error-providerfault-outbound-sip-503-service-unavailable'
20368
+ | 'call.in-progress.error-providerfault-outbound-sip-480-temporarily-unavailable'
20369
+ | 'call.in-progress.error-sip-outbound-call-failed-to-connect'
20728
20370
  | 'call.ringing.hook-executed-say'
20729
20371
  | 'call.ringing.hook-executed-transfer'
20730
20372
  | 'twilio-failed-to-connect-call'
@@ -21031,6 +20673,7 @@ export interface ServerMessageStatusUpdate {
21031
20673
  | 'call.in-progress.error-vapifault-transport-never-connected'
21032
20674
  | 'call.in-progress.error-vapifault-transport-connected-but-call-not-active'
21033
20675
  | 'call.in-progress.error-vapifault-call-started-but-connection-to-transport-missing'
20676
+ | 'call.in-progress.error-vapifault-worker-died'
21034
20677
  | 'call.in-progress.error-vapifault-openai-llm-failed'
21035
20678
  | 'call.in-progress.error-vapifault-azure-openai-llm-failed'
21036
20679
  | 'call.in-progress.error-vapifault-groq-llm-failed'
@@ -21418,7 +21061,12 @@ export interface ServerMessageStatusUpdate {
21418
21061
  | 'phone-call-provider-closed-websocket'
21419
21062
  | 'call.forwarding.operator-busy'
21420
21063
  | 'silence-timed-out'
21421
- | 'call.in-progress.error-sip-telephony-provider-failed-to-connect-call'
21064
+ | 'call.in-progress.error-sip-inbound-call-failed-to-connect'
21065
+ | 'call.in-progress.error-providerfault-outbound-sip-403-forbidden'
21066
+ | 'call.in-progress.error-providerfault-outbound-sip-407-proxy-authentication-required'
21067
+ | 'call.in-progress.error-providerfault-outbound-sip-503-service-unavailable'
21068
+ | 'call.in-progress.error-providerfault-outbound-sip-480-temporarily-unavailable'
21069
+ | 'call.in-progress.error-sip-outbound-call-failed-to-connect'
21422
21070
  | 'call.ringing.hook-executed-say'
21423
21071
  | 'call.ringing.hook-executed-transfer'
21424
21072
  | 'twilio-failed-to-connect-call'
@@ -21801,8 +21449,6 @@ export interface ServerMessageResponseAssistantRequest {
21801
21449
  */
21802
21450
  squad?: CreateSquadDTO;
21803
21451
  /**
21804
- * [BETA] This feature is in active development. The API and behavior are subject to change as we refine it based on user feedback.
21805
- *
21806
21452
  * This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead.
21807
21453
  *
21808
21454
  * To start a call with:
@@ -21812,8 +21458,6 @@ export interface ServerMessageResponseAssistantRequest {
21812
21458
  */
21813
21459
  workflowId?: string;
21814
21460
  /**
21815
- * [BETA] This feature is in active development. The API and behavior are subject to change as we refine it based on user feedback.
21816
- *
21817
21461
  * This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead.
21818
21462
  *
21819
21463
  * To start a call with:
@@ -21822,6 +21466,8 @@ export interface ServerMessageResponseAssistantRequest {
21822
21466
  * - Workflow, use `workflow` or `workflowId`
21823
21467
  */
21824
21468
  workflow?: CreateWorkflowDTO;
21469
+ /** These are the overrides for the `workflow` or `workflowId`'s settings and template variables. */
21470
+ workflowOverrides?: WorkflowOverrides;
21825
21471
  /**
21826
21472
  * This is the error if the call shouldn't be accepted. This is spoken to the customer.
21827
21473
  *
@@ -22183,25 +21829,37 @@ export interface KnowledgeBaseCost {
22183
21829
  }
22184
21830
 
22185
21831
  export interface FunctionToolWithToolCall {
21832
+ /**
21833
+ * These are the messages that will be spoken to the user as the tool is running.
21834
+ *
21835
+ * 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.
21836
+ */
21837
+ messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
21838
+ /** The type of tool. "function" for Function tool. */
21839
+ type: 'function';
22186
21840
  /**
22187
21841
  * This determines if the tool is async.
22188
21842
  *
22189
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
21843
+ * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
22190
21844
  *
22191
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
21845
+ * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
22192
21846
  *
22193
- * Defaults to synchronous (`false`).
21847
+ * Defaults to synchronous (`false`).
22194
21848
  * @example false
22195
21849
  */
22196
21850
  async?: boolean;
22197
21851
  /**
22198
- * These are the messages that will be spoken to the user as the tool is running.
22199
21852
  *
22200
- * 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.
21853
+ * This is the server where a `tool-calls` webhook will be sent.
21854
+ *
21855
+ * Notes:
21856
+ * - Webhook is sent to this server when a tool call is made.
21857
+ * - Webhook contains the call, assistant, and phone number objects.
21858
+ * - Webhook contains the variables set on the assistant.
21859
+ * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.
21860
+ * - Webhook expects a response with tool call result.
22201
21861
  */
22202
- messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
22203
- /** The type of tool. "function" for Function tool. */
22204
- type: 'function';
21862
+ server?: Server;
22205
21863
  toolCall: ToolCall;
22206
21864
  /**
22207
21865
  * This is the function definition of the tool.
@@ -22211,28 +21869,9 @@ export interface FunctionToolWithToolCall {
22211
21869
  * 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.
22212
21870
  */
22213
21871
  function?: OpenAIFunction;
22214
- /**
22215
- * This is the server that will be hit when this tool is requested by the model.
22216
- *
22217
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
22218
- *
22219
- * 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.
22220
- */
22221
- server?: Server;
22222
21872
  }
22223
21873
 
22224
21874
  export interface GhlToolWithToolCall {
22225
- /**
22226
- * This determines if the tool is async.
22227
- *
22228
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
22229
- *
22230
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
22231
- *
22232
- * Defaults to synchronous (`false`).
22233
- * @example false
22234
- */
22235
- async?: boolean;
22236
21875
  /**
22237
21876
  * These are the messages that will be spoken to the user as the tool is running.
22238
21877
  *
@@ -22251,28 +21890,9 @@ export interface GhlToolWithToolCall {
22251
21890
  * 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.
22252
21891
  */
22253
21892
  function?: OpenAIFunction;
22254
- /**
22255
- * This is the server that will be hit when this tool is requested by the model.
22256
- *
22257
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
22258
- *
22259
- * 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.
22260
- */
22261
- server?: Server;
22262
21893
  }
22263
21894
 
22264
21895
  export interface MakeToolWithToolCall {
22265
- /**
22266
- * This determines if the tool is async.
22267
- *
22268
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
22269
- *
22270
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
22271
- *
22272
- * Defaults to synchronous (`false`).
22273
- * @example false
22274
- */
22275
- async?: boolean;
22276
21896
  /**
22277
21897
  * These are the messages that will be spoken to the user as the tool is running.
22278
21898
  *
@@ -22291,28 +21911,9 @@ export interface MakeToolWithToolCall {
22291
21911
  * 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.
22292
21912
  */
22293
21913
  function?: OpenAIFunction;
22294
- /**
22295
- * This is the server that will be hit when this tool is requested by the model.
22296
- *
22297
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
22298
- *
22299
- * 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.
22300
- */
22301
- server?: Server;
22302
21914
  }
22303
21915
 
22304
21916
  export interface BashToolWithToolCall {
22305
- /**
22306
- * This determines if the tool is async.
22307
- *
22308
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
22309
- *
22310
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
22311
- *
22312
- * Defaults to synchronous (`false`).
22313
- * @example false
22314
- */
22315
- async?: boolean;
22316
21917
  /**
22317
21918
  * These are the messages that will be spoken to the user as the tool is running.
22318
21919
  *
@@ -22323,6 +21924,18 @@ export interface BashToolWithToolCall {
22323
21924
  type: 'bash';
22324
21925
  /** The sub type of tool. */
22325
21926
  subType: 'bash_20241022';
21927
+ /**
21928
+ *
21929
+ * This is the server where a `tool-calls` webhook will be sent.
21930
+ *
21931
+ * Notes:
21932
+ * - Webhook is sent to this server when a tool call is made.
21933
+ * - Webhook contains the call, assistant, and phone number objects.
21934
+ * - Webhook contains the variables set on the assistant.
21935
+ * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.
21936
+ * - Webhook expects a response with tool call result.
21937
+ */
21938
+ server?: Server;
22326
21939
  toolCall: ToolCall;
22327
21940
  /**
22328
21941
  * The name of the tool, fixed to 'bash'
@@ -22337,28 +21950,9 @@ export interface BashToolWithToolCall {
22337
21950
  * 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.
22338
21951
  */
22339
21952
  function?: OpenAIFunction;
22340
- /**
22341
- * This is the server that will be hit when this tool is requested by the model.
22342
- *
22343
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
22344
- *
22345
- * 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.
22346
- */
22347
- server?: Server;
22348
21953
  }
22349
21954
 
22350
21955
  export interface ComputerToolWithToolCall {
22351
- /**
22352
- * This determines if the tool is async.
22353
- *
22354
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
22355
- *
22356
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
22357
- *
22358
- * Defaults to synchronous (`false`).
22359
- * @example false
22360
- */
22361
- async?: boolean;
22362
21956
  /**
22363
21957
  * These are the messages that will be spoken to the user as the tool is running.
22364
21958
  *
@@ -22369,6 +21963,18 @@ export interface ComputerToolWithToolCall {
22369
21963
  type: 'computer';
22370
21964
  /** The sub type of tool. */
22371
21965
  subType: 'computer_20241022';
21966
+ /**
21967
+ *
21968
+ * This is the server where a `tool-calls` webhook will be sent.
21969
+ *
21970
+ * Notes:
21971
+ * - Webhook is sent to this server when a tool call is made.
21972
+ * - Webhook contains the call, assistant, and phone number objects.
21973
+ * - Webhook contains the variables set on the assistant.
21974
+ * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.
21975
+ * - Webhook expects a response with tool call result.
21976
+ */
21977
+ server?: Server;
22372
21978
  toolCall: ToolCall;
22373
21979
  /**
22374
21980
  * The name of the tool, fixed to 'computer'
@@ -22389,28 +21995,9 @@ export interface ComputerToolWithToolCall {
22389
21995
  * 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.
22390
21996
  */
22391
21997
  function?: OpenAIFunction;
22392
- /**
22393
- * This is the server that will be hit when this tool is requested by the model.
22394
- *
22395
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
22396
- *
22397
- * 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.
22398
- */
22399
- server?: Server;
22400
21998
  }
22401
21999
 
22402
22000
  export interface TextEditorToolWithToolCall {
22403
- /**
22404
- * This determines if the tool is async.
22405
- *
22406
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
22407
- *
22408
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
22409
- *
22410
- * Defaults to synchronous (`false`).
22411
- * @example false
22412
- */
22413
- async?: boolean;
22414
22001
  /**
22415
22002
  * These are the messages that will be spoken to the user as the tool is running.
22416
22003
  *
@@ -22421,6 +22008,18 @@ export interface TextEditorToolWithToolCall {
22421
22008
  type: 'textEditor';
22422
22009
  /** The sub type of tool. */
22423
22010
  subType: 'text_editor_20241022';
22011
+ /**
22012
+ *
22013
+ * This is the server where a `tool-calls` webhook will be sent.
22014
+ *
22015
+ * Notes:
22016
+ * - Webhook is sent to this server when a tool call is made.
22017
+ * - Webhook contains the call, assistant, and phone number objects.
22018
+ * - Webhook contains the variables set on the assistant.
22019
+ * - Webhook is sent to the first available URL in this order: {{tool.server.url}}, {{assistant.server.url}}, {{phoneNumber.server.url}}, {{org.server.url}}.
22020
+ * - Webhook expects a response with tool call result.
22021
+ */
22022
+ server?: Server;
22424
22023
  toolCall: ToolCall;
22425
22024
  /**
22426
22025
  * The name of the tool, fixed to 'str_replace_editor'
@@ -22435,28 +22034,9 @@ export interface TextEditorToolWithToolCall {
22435
22034
  * 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.
22436
22035
  */
22437
22036
  function?: OpenAIFunction;
22438
- /**
22439
- * This is the server that will be hit when this tool is requested by the model.
22440
- *
22441
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
22442
- *
22443
- * 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.
22444
- */
22445
- server?: Server;
22446
22037
  }
22447
22038
 
22448
22039
  export interface GoogleCalendarCreateEventToolWithToolCall {
22449
- /**
22450
- * This determines if the tool is async.
22451
- *
22452
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
22453
- *
22454
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
22455
- *
22456
- * Defaults to synchronous (`false`).
22457
- * @example false
22458
- */
22459
- async?: boolean;
22460
22040
  /**
22461
22041
  * These are the messages that will be spoken to the user as the tool is running.
22462
22042
  *
@@ -22474,28 +22054,9 @@ export interface GoogleCalendarCreateEventToolWithToolCall {
22474
22054
  * 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.
22475
22055
  */
22476
22056
  function?: OpenAIFunction;
22477
- /**
22478
- * This is the server that will be hit when this tool is requested by the model.
22479
- *
22480
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
22481
- *
22482
- * 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.
22483
- */
22484
- server?: Server;
22485
22057
  }
22486
22058
 
22487
22059
  export interface GoogleSheetsRowAppendToolWithToolCall {
22488
- /**
22489
- * This determines if the tool is async.
22490
- *
22491
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
22492
- *
22493
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
22494
- *
22495
- * Defaults to synchronous (`false`).
22496
- * @example false
22497
- */
22498
- async?: boolean;
22499
22060
  /**
22500
22061
  * These are the messages that will be spoken to the user as the tool is running.
22501
22062
  *
@@ -22513,28 +22074,9 @@ export interface GoogleSheetsRowAppendToolWithToolCall {
22513
22074
  * 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.
22514
22075
  */
22515
22076
  function?: OpenAIFunction;
22516
- /**
22517
- * This is the server that will be hit when this tool is requested by the model.
22518
- *
22519
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
22520
- *
22521
- * 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.
22522
- */
22523
- server?: Server;
22524
22077
  }
22525
22078
 
22526
22079
  export interface GoHighLevelCalendarAvailabilityToolWithToolCall {
22527
- /**
22528
- * This determines if the tool is async.
22529
- *
22530
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
22531
- *
22532
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
22533
- *
22534
- * Defaults to synchronous (`false`).
22535
- * @example false
22536
- */
22537
- async?: boolean;
22538
22080
  /**
22539
22081
  * These are the messages that will be spoken to the user as the tool is running.
22540
22082
  *
@@ -22552,28 +22094,9 @@ export interface GoHighLevelCalendarAvailabilityToolWithToolCall {
22552
22094
  * 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.
22553
22095
  */
22554
22096
  function?: OpenAIFunction;
22555
- /**
22556
- * This is the server that will be hit when this tool is requested by the model.
22557
- *
22558
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
22559
- *
22560
- * 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.
22561
- */
22562
- server?: Server;
22563
22097
  }
22564
22098
 
22565
22099
  export interface GoHighLevelCalendarEventCreateToolWithToolCall {
22566
- /**
22567
- * This determines if the tool is async.
22568
- *
22569
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
22570
- *
22571
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
22572
- *
22573
- * Defaults to synchronous (`false`).
22574
- * @example false
22575
- */
22576
- async?: boolean;
22577
22100
  /**
22578
22101
  * These are the messages that will be spoken to the user as the tool is running.
22579
22102
  *
@@ -22591,28 +22114,9 @@ export interface GoHighLevelCalendarEventCreateToolWithToolCall {
22591
22114
  * 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.
22592
22115
  */
22593
22116
  function?: OpenAIFunction;
22594
- /**
22595
- * This is the server that will be hit when this tool is requested by the model.
22596
- *
22597
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
22598
- *
22599
- * 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.
22600
- */
22601
- server?: Server;
22602
22117
  }
22603
22118
 
22604
22119
  export interface GoHighLevelContactCreateToolWithToolCall {
22605
- /**
22606
- * This determines if the tool is async.
22607
- *
22608
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
22609
- *
22610
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
22611
- *
22612
- * Defaults to synchronous (`false`).
22613
- * @example false
22614
- */
22615
- async?: boolean;
22616
22120
  /**
22617
22121
  * These are the messages that will be spoken to the user as the tool is running.
22618
22122
  *
@@ -22630,28 +22134,9 @@ export interface GoHighLevelContactCreateToolWithToolCall {
22630
22134
  * 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.
22631
22135
  */
22632
22136
  function?: OpenAIFunction;
22633
- /**
22634
- * This is the server that will be hit when this tool is requested by the model.
22635
- *
22636
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
22637
- *
22638
- * 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.
22639
- */
22640
- server?: Server;
22641
22137
  }
22642
22138
 
22643
22139
  export interface GoHighLevelContactGetToolWithToolCall {
22644
- /**
22645
- * This determines if the tool is async.
22646
- *
22647
- * If async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.
22648
- *
22649
- * If sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.
22650
- *
22651
- * Defaults to synchronous (`false`).
22652
- * @example false
22653
- */
22654
- async?: boolean;
22655
22140
  /**
22656
22141
  * These are the messages that will be spoken to the user as the tool is running.
22657
22142
  *
@@ -22669,14 +22154,6 @@ export interface GoHighLevelContactGetToolWithToolCall {
22669
22154
  * 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.
22670
22155
  */
22671
22156
  function?: OpenAIFunction;
22672
- /**
22673
- * This is the server that will be hit when this tool is requested by the model.
22674
- *
22675
- * All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
22676
- *
22677
- * 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.
22678
- */
22679
- server?: Server;
22680
22157
  }
22681
22158
 
22682
22159
  export type QueryParamsType = Record<string | number, any>;
@@ -23585,9 +23062,9 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
23585
23062
  /**
23586
23063
  * No description
23587
23064
  *
23588
- * @tags Chat
23065
+ * @tags Chats
23589
23066
  * @name ChatControllerListChats
23590
- * @summary List chats
23067
+ * @summary List Chats
23591
23068
  * @request GET:/chat
23592
23069
  * @secure
23593
23070
  */
@@ -23667,9 +23144,9 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
23667
23144
  /**
23668
23145
  * @description Creates a new chat. Requires at least one of: assistantId/assistant, sessionId, or previousChatId. Note: sessionId and previousChatId are mutually exclusive.
23669
23146
  *
23670
- * @tags Chat
23147
+ * @tags Chats
23671
23148
  * @name ChatControllerCreateChat
23672
- * @summary Create chat
23149
+ * @summary Create Chat
23673
23150
  * @request POST:/chat
23674
23151
  * @secure
23675
23152
  */
@@ -23687,9 +23164,9 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
23687
23164
  /**
23688
23165
  * No description
23689
23166
  *
23690
- * @tags Chat
23167
+ * @tags Chats
23691
23168
  * @name ChatControllerGetChat
23692
- * @summary Get a specific chat by ID
23169
+ * @summary Get Chat
23693
23170
  * @request GET:/chat/{id}
23694
23171
  * @secure
23695
23172
  */
@@ -23705,9 +23182,9 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
23705
23182
  /**
23706
23183
  * No description
23707
23184
  *
23708
- * @tags Chat
23185
+ * @tags Chats
23709
23186
  * @name ChatControllerDeleteChat
23710
- * @summary Delete chat
23187
+ * @summary Delete Chat
23711
23188
  * @request DELETE:/chat/{id}
23712
23189
  * @secure
23713
23190
  */
@@ -23723,14 +23200,21 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
23723
23200
  /**
23724
23201
  * No description
23725
23202
  *
23726
- * @tags Chat
23203
+ * @tags Chats
23727
23204
  * @name ChatControllerCreateOpenAiChat
23728
- * @summary Create chat using OpenAI Responses API format
23205
+ * @summary Create Chat (OpenAI Compatible)
23729
23206
  * @request POST:/chat/responses
23730
23207
  * @secure
23731
23208
  */
23732
23209
  chatControllerCreateOpenAiChat: (data: OpenAIResponsesRequest, params: RequestParams = {}) =>
23733
- this.request<any, any>({
23210
+ this.request<
23211
+ | ResponseObject
23212
+ | ResponseTextDeltaEvent
23213
+ | ResponseTextDoneEvent
23214
+ | ResponseCompletedEvent
23215
+ | ResponseErrorEvent,
23216
+ any
23217
+ >({
23734
23218
  path: `/chat/responses`,
23735
23219
  method: 'POST',
23736
23220
  body: data,
@@ -25383,7 +24867,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
25383
24867
  *
25384
24868
  * @tags Workflow
25385
24869
  * @name WorkflowControllerFindAll
25386
- * @summary [BETA] Get Workflows
24870
+ * @summary Get Workflows
25387
24871
  * @request GET:/workflow
25388
24872
  * @secure
25389
24873
  */
@@ -25401,7 +24885,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
25401
24885
  *
25402
24886
  * @tags Workflow
25403
24887
  * @name WorkflowControllerCreate
25404
- * @summary [BETA] Create Workflow
24888
+ * @summary Create Workflow
25405
24889
  * @request POST:/workflow
25406
24890
  * @secure
25407
24891
  */
@@ -25421,7 +24905,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
25421
24905
  *
25422
24906
  * @tags Workflow
25423
24907
  * @name WorkflowControllerFindOne
25424
- * @summary [BETA] Get Workflow
24908
+ * @summary Get Workflow
25425
24909
  * @request GET:/workflow/{id}
25426
24910
  * @secure
25427
24911
  */
@@ -25439,7 +24923,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
25439
24923
  *
25440
24924
  * @tags Workflow
25441
24925
  * @name WorkflowControllerDelete
25442
- * @summary [BETA] Delete Workflow
24926
+ * @summary Delete Workflow
25443
24927
  * @request DELETE:/workflow/{id}
25444
24928
  * @secure
25445
24929
  */
@@ -25457,7 +24941,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
25457
24941
  *
25458
24942
  * @tags Workflow
25459
24943
  * @name WorkflowControllerUpdate
25460
- * @summary [BETA] Update Workflow
24944
+ * @summary Update Workflow
25461
24945
  * @request PATCH:/workflow/{id}
25462
24946
  * @secure
25463
24947
  */
@@ -26139,50 +25623,6 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
26139
25623
  ...params,
26140
25624
  }),
26141
25625
  };
26142
- metrics = {
26143
- /**
26144
- * @description Use GET /metric instead
26145
- *
26146
- * @tags Analytics
26147
- * @name AnalyticsControllerFindAllDeprecated
26148
- * @summary List Billing Metrics
26149
- * @request GET:/metrics
26150
- * @deprecated
26151
- * @secure
26152
- */
26153
- analyticsControllerFindAllDeprecated: (
26154
- query?: {
26155
- /**
26156
- * Convert date & and time to provided timezone. https://popsql.com/learn-sql/postgresql/how-to-convert-utc-to-local-time-zone-in-postgresql
26157
- * @example "PST"
26158
- */
26159
- timezone?: string;
26160
- /**
26161
- * This will include calls with a createdAt timestamp greater than or equal to the specified value.
26162
- *
26163
- * If not provided, defaults to the org's current period start.
26164
- * @format date-time
26165
- */
26166
- rangeStart?: string;
26167
- /**
26168
- * This will include calls with a createdAt timestamp less than the specified value.
26169
- *
26170
- * If not provided, the default value will be the current timestamp.
26171
- * @format date-time
26172
- */
26173
- rangeEnd?: string;
26174
- },
26175
- params: RequestParams = {},
26176
- ) =>
26177
- this.request<Metrics[], any>({
26178
- path: `/metrics`,
26179
- method: 'GET',
26180
- query: query,
26181
- secure: true,
26182
- format: 'json',
26183
- ...params,
26184
- }),
26185
- };
26186
25626
  analytics = {
26187
25627
  /**
26188
25628
  * No description
@@ -28409,7 +27849,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
28409
27849
  },
28410
27850
  params: RequestParams = {},
28411
27851
  ) =>
28412
- this.request<SbcConfiguration, any>({
27852
+ this.request<VariableExtractionPlan, any>({
28413
27853
  path: `/${provider}/workflows`,
28414
27854
  method: 'GET',
28415
27855
  query: query,
@@ -28431,7 +27871,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
28431
27871
  workflowId: string,
28432
27872
  params: RequestParams = {},
28433
27873
  ) =>
28434
- this.request<SbcConfiguration, any>({
27874
+ this.request<VariableExtractionPlan, any>({
28435
27875
  path: `/${provider}/workflows/${workflowId}/hooks`,
28436
27876
  method: 'GET',
28437
27877
  secure: true,
@@ -28448,7 +27888,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
28448
27888
  * @secure
28449
27889
  */
28450
27890
  providerControllerGetLocations: (provider: 'make' | 'ghl', params: RequestParams = {}) =>
28451
- this.request<SbcConfiguration, any>({
27891
+ this.request<VariableExtractionPlan, any>({
28452
27892
  path: `/${provider}/locations`,
28453
27893
  method: 'GET',
28454
27894
  secure: true,