@vapi-ai/web 2.2.7 → 2.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api.ts +959 -893
- package/dist/api.d.ts +830 -582
- package/dist/api.js +17 -0
- package/package.json +3 -2
package/api.ts
CHANGED
|
@@ -184,19 +184,53 @@ export interface OpenAIMessage {
|
|
|
184
184
|
role: 'assistant' | 'function' | 'user' | 'system' | 'tool';
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
+
export interface Mono {
|
|
188
|
+
/** This is the combined recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`. */
|
|
189
|
+
combinedUrl?: string;
|
|
190
|
+
/** This is the mono recording url for the assistant. To enable, set `assistant.artifactPlan.recordingEnabled`. */
|
|
191
|
+
assistantUrl?: string;
|
|
192
|
+
/** This is the mono recording url for the customer. To enable, set `assistant.artifactPlan.recordingEnabled`. */
|
|
193
|
+
customerUrl?: string;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export interface Recording {
|
|
197
|
+
/** This is the stereo recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`. */
|
|
198
|
+
stereoUrl?: string;
|
|
199
|
+
/** This is the video recording url for the call. To enable, set `assistant.artifactPlan.videoRecordingEnabled`. */
|
|
200
|
+
videoUrl?: string;
|
|
201
|
+
/** This is video recording start delay in ms. To enable, set `assistant.artifactPlan.videoRecordingEnabled`. This can be used to align the playback of the recording with artifact.messages timestamps. */
|
|
202
|
+
videoRecordingStartDelaySeconds?: number;
|
|
203
|
+
/** This is the mono recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`. */
|
|
204
|
+
mono?: Mono;
|
|
205
|
+
}
|
|
206
|
+
|
|
187
207
|
export interface Artifact {
|
|
188
208
|
/** These are the messages that were spoken during the call. */
|
|
189
209
|
messages?: (UserMessage | SystemMessage | BotMessage | ToolCallMessage | ToolCallResultMessage)[];
|
|
190
210
|
/** These are the messages that were spoken during the call, formatted for OpenAI. */
|
|
191
211
|
messagesOpenAIFormatted?: OpenAIMessage[];
|
|
192
|
-
/**
|
|
212
|
+
/**
|
|
213
|
+
* This is the recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.
|
|
214
|
+
* @deprecated
|
|
215
|
+
*/
|
|
193
216
|
recordingUrl?: string;
|
|
194
|
-
/**
|
|
217
|
+
/**
|
|
218
|
+
* This is the stereo recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`.
|
|
219
|
+
* @deprecated
|
|
220
|
+
*/
|
|
195
221
|
stereoRecordingUrl?: string;
|
|
196
|
-
/**
|
|
222
|
+
/**
|
|
223
|
+
* This is video recording url for the call. To enable, set `assistant.artifactPlan.videoRecordingEnabled`.
|
|
224
|
+
* @deprecated
|
|
225
|
+
*/
|
|
197
226
|
videoRecordingUrl?: string;
|
|
198
|
-
/**
|
|
227
|
+
/**
|
|
228
|
+
* This is video recording start delay in ms. To enable, set `assistant.artifactPlan.videoRecordingEnabled`. This can be used to align the playback of the recording with artifact.messages timestamps.
|
|
229
|
+
* @deprecated
|
|
230
|
+
*/
|
|
199
231
|
videoRecordingStartDelaySeconds?: number;
|
|
232
|
+
/** This is the recording url for the call. To enable, set `assistant.artifactPlan.recordingEnabled`. */
|
|
233
|
+
recording?: Recording;
|
|
200
234
|
/** This is the transcript of the call. This is derived from `artifact.messages` but provided for convenience. */
|
|
201
235
|
transcript?: string;
|
|
202
236
|
/** 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`. */
|
|
@@ -1221,6 +1255,7 @@ export interface GoogleTranscriber {
|
|
|
1221
1255
|
provider: 'google';
|
|
1222
1256
|
/** This is the model that will be used for the transcription. */
|
|
1223
1257
|
model?:
|
|
1258
|
+
| 'gemini-2.5-flash-preview-04-17'
|
|
1224
1259
|
| 'gemini-2.0-flash-thinking-exp'
|
|
1225
1260
|
| 'gemini-2.0-pro-exp-02-05'
|
|
1226
1261
|
| 'gemini-2.0-flash'
|
|
@@ -2279,6 +2314,7 @@ export interface FallbackGoogleTranscriber {
|
|
|
2279
2314
|
provider: 'google';
|
|
2280
2315
|
/** This is the model that will be used for the transcription. */
|
|
2281
2316
|
model?:
|
|
2317
|
+
| 'gemini-2.5-flash-preview-04-17'
|
|
2282
2318
|
| 'gemini-2.0-flash-thinking-exp'
|
|
2283
2319
|
| 'gemini-2.0-pro-exp-02-05'
|
|
2284
2320
|
| 'gemini-2.0-flash'
|
|
@@ -3264,6 +3300,20 @@ export interface TransferDestinationStep {
|
|
|
3264
3300
|
description?: string;
|
|
3265
3301
|
}
|
|
3266
3302
|
|
|
3303
|
+
export interface TransferFallbackPlan {
|
|
3304
|
+
/** This is the message the assistant will deliver to the customer if the transfer fails. */
|
|
3305
|
+
message: string | CustomMessage;
|
|
3306
|
+
/**
|
|
3307
|
+
* This controls what happens after delivering the failure message to the customer.
|
|
3308
|
+
* - true: End the call after delivering the failure message (default)
|
|
3309
|
+
* - false: Keep the assistant on the call to continue handling the customer's request
|
|
3310
|
+
*
|
|
3311
|
+
* @default true
|
|
3312
|
+
* @default true
|
|
3313
|
+
*/
|
|
3314
|
+
endCallEnabled?: boolean;
|
|
3315
|
+
}
|
|
3316
|
+
|
|
3267
3317
|
export interface SummaryPlan {
|
|
3268
3318
|
/**
|
|
3269
3319
|
* These are the messages used to generate the summary.
|
|
@@ -3320,6 +3370,7 @@ export interface TransferPlan {
|
|
|
3320
3370
|
* - `warm-transfer-wait-for-operator-to-speak-first-and-then-say-message`: The assistant dials the destination, waits for the operator to speak, delivers the `message` to the destination party, and then connects the customer.
|
|
3321
3371
|
* - `warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary`: The assistant dials the destination, waits for the operator to speak, provides a summary of the call to the destination party, and then connects the customer.
|
|
3322
3372
|
* - `warm-transfer-twiml`: The assistant dials the destination, executes the twiml instructions on the destination call leg, connects the customer, and leaves the call.
|
|
3373
|
+
* - `warm-transfer-experimental`: The assistant puts the customer on hold, dials the destination, and if the destination answers (and is human), delivers a message or summary before connecting the customer. If the destination is unreachable or not human (e.g., with voicemail detection), the assistant delivers the `fallbackMessage` to the customer and optionally ends the call.
|
|
3323
3374
|
*
|
|
3324
3375
|
* @default 'blind-transfer'
|
|
3325
3376
|
*/
|
|
@@ -3330,12 +3381,13 @@ export interface TransferPlan {
|
|
|
3330
3381
|
| 'warm-transfer-say-summary'
|
|
3331
3382
|
| 'warm-transfer-twiml'
|
|
3332
3383
|
| 'warm-transfer-wait-for-operator-to-speak-first-and-then-say-message'
|
|
3333
|
-
| 'warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary'
|
|
3384
|
+
| 'warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary'
|
|
3385
|
+
| 'warm-transfer-experimental';
|
|
3334
3386
|
/**
|
|
3335
3387
|
* This is the message the assistant will deliver to the destination party before connecting the customer.
|
|
3336
3388
|
*
|
|
3337
3389
|
* Usage:
|
|
3338
|
-
* - Used only when `mode` is `blind-transfer-add-summary-to-sip-header`, `warm-transfer-say-message
|
|
3390
|
+
* - 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`.
|
|
3339
3391
|
*/
|
|
3340
3392
|
message?: string | CustomMessage;
|
|
3341
3393
|
/**
|
|
@@ -3346,6 +3398,17 @@ export interface TransferPlan {
|
|
|
3346
3398
|
* @default "refer"
|
|
3347
3399
|
*/
|
|
3348
3400
|
sipVerb?: 'refer' | 'bye' | 'dial';
|
|
3401
|
+
/**
|
|
3402
|
+
* This is the URL to an audio file played while the customer is on hold during transfer.
|
|
3403
|
+
*
|
|
3404
|
+
* Usage:
|
|
3405
|
+
* - Used only when `mode` is `warm-transfer-experimental`.
|
|
3406
|
+
* - Used when transferring calls to play hold audio for the customer.
|
|
3407
|
+
* - Must be a publicly accessible URL to an audio file.
|
|
3408
|
+
* - Supported formats: MP3 and WAV.
|
|
3409
|
+
* - If not provided, the default hold audio will be used.
|
|
3410
|
+
*/
|
|
3411
|
+
holdAudioUrl?: string;
|
|
3349
3412
|
/**
|
|
3350
3413
|
* This is the TwiML instructions to execute on the destination call leg before connecting the customer.
|
|
3351
3414
|
*
|
|
@@ -3367,9 +3430,23 @@ export interface TransferPlan {
|
|
|
3367
3430
|
* This is the plan for generating a summary of the call to present to the destination party.
|
|
3368
3431
|
*
|
|
3369
3432
|
* Usage:
|
|
3370
|
-
* - Used only when `mode` is `blind-transfer-add-summary-to-sip-header` or `warm-transfer-say-summary` or `warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary`.
|
|
3433
|
+
* - Used only when `mode` is `blind-transfer-add-summary-to-sip-header` or `warm-transfer-say-summary` or `warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary` or `warm-transfer-experimental`.
|
|
3371
3434
|
*/
|
|
3372
3435
|
summaryPlan?: SummaryPlan;
|
|
3436
|
+
/**
|
|
3437
|
+
* This flag includes the sipHeaders from above in the refer to sip uri as url encoded query params.
|
|
3438
|
+
*
|
|
3439
|
+
* @default false
|
|
3440
|
+
*/
|
|
3441
|
+
sipHeadersInReferToEnabled?: boolean;
|
|
3442
|
+
/**
|
|
3443
|
+
* This configures the fallback plan when the transfer fails (destination unreachable, busy, or not human).
|
|
3444
|
+
*
|
|
3445
|
+
* Usage:
|
|
3446
|
+
* - Used only when `mode` is `warm-transfer-experimental`.
|
|
3447
|
+
* - If not provided when using `warm-transfer-experimental`, a default message will be used.
|
|
3448
|
+
*/
|
|
3449
|
+
fallbackPlan?: TransferFallbackPlan;
|
|
3373
3450
|
}
|
|
3374
3451
|
|
|
3375
3452
|
export interface TransferDestinationNumber {
|
|
@@ -3563,6 +3640,7 @@ export interface KnowledgeBase {
|
|
|
3563
3640
|
provider: 'google';
|
|
3564
3641
|
/** The model to use for the knowledge base */
|
|
3565
3642
|
model?:
|
|
3643
|
+
| 'gemini-2.5-flash-preview-04-17'
|
|
3566
3644
|
| 'gemini-2.0-flash-thinking-exp'
|
|
3567
3645
|
| 'gemini-2.0-pro-exp-02-05'
|
|
3568
3646
|
| 'gemini-2.0-flash'
|
|
@@ -4289,6 +4367,7 @@ export interface GoogleModel {
|
|
|
4289
4367
|
knowledgeBaseId?: string;
|
|
4290
4368
|
/** This is the Google model that will be used. */
|
|
4291
4369
|
model:
|
|
4370
|
+
| 'gemini-2.5-flash-preview-04-17'
|
|
4292
4371
|
| 'gemini-2.0-flash-thinking-exp'
|
|
4293
4372
|
| 'gemini-2.0-pro-exp-02-05'
|
|
4294
4373
|
| 'gemini-2.0-flash'
|
|
@@ -4815,6 +4894,125 @@ export interface TogetherAIModel {
|
|
|
4815
4894
|
numFastTurns?: number;
|
|
4816
4895
|
}
|
|
4817
4896
|
|
|
4897
|
+
export interface Start {
|
|
4898
|
+
type: 'start';
|
|
4899
|
+
/** @maxLength 80 */
|
|
4900
|
+
name: string;
|
|
4901
|
+
/** This is for metadata you want to store on the task. */
|
|
4902
|
+
metadata?: object;
|
|
4903
|
+
}
|
|
4904
|
+
|
|
4905
|
+
export interface Assistant {
|
|
4906
|
+
type: 'assistant';
|
|
4907
|
+
assistantId: string;
|
|
4908
|
+
/** @maxLength 80 */
|
|
4909
|
+
name: string;
|
|
4910
|
+
/** This is for metadata you want to store on the task. */
|
|
4911
|
+
metadata?: object;
|
|
4912
|
+
}
|
|
4913
|
+
|
|
4914
|
+
export interface Say {
|
|
4915
|
+
type: 'say';
|
|
4916
|
+
/** @maxLength 1000 */
|
|
4917
|
+
exact?: string;
|
|
4918
|
+
/** @maxLength 1000 */
|
|
4919
|
+
prompt?: string;
|
|
4920
|
+
/** @maxLength 80 */
|
|
4921
|
+
name: string;
|
|
4922
|
+
/** This is for metadata you want to store on the task. */
|
|
4923
|
+
metadata?: object;
|
|
4924
|
+
}
|
|
4925
|
+
|
|
4926
|
+
export interface SayHook {
|
|
4927
|
+
type: 'say';
|
|
4928
|
+
/** This is for metadata you want to store on the task. */
|
|
4929
|
+
metadata?: object;
|
|
4930
|
+
/** @maxLength 1000 */
|
|
4931
|
+
exact?: string;
|
|
4932
|
+
/** @maxLength 1000 */
|
|
4933
|
+
prompt?: string;
|
|
4934
|
+
}
|
|
4935
|
+
|
|
4936
|
+
export interface Hook {
|
|
4937
|
+
/** @maxLength 80 */
|
|
4938
|
+
on: 'task.start' | 'task.output.confirmation' | 'task.delayed';
|
|
4939
|
+
do: SayHook[];
|
|
4940
|
+
}
|
|
4941
|
+
|
|
4942
|
+
export interface Gather {
|
|
4943
|
+
type: 'gather';
|
|
4944
|
+
output: JsonSchema;
|
|
4945
|
+
/** This is whether or not the workflow should read back the gathered data to the user, and ask about its correctness. */
|
|
4946
|
+
confirmContent?: boolean;
|
|
4947
|
+
/**
|
|
4948
|
+
* This is a list of hooks for a task.
|
|
4949
|
+
* Each hook is a list of tasks to run on a trigger (such as on start, on failure, etc).
|
|
4950
|
+
* Only Say is supported for now.
|
|
4951
|
+
*/
|
|
4952
|
+
hooks?: Hook[];
|
|
4953
|
+
/** This is the number of times we should try to gather the information from the user before we failover to the fail path. An example of this would be a user refusing to give their phone number for privacy reasons, and then going down a different path on account of this */
|
|
4954
|
+
maxRetries?: number;
|
|
4955
|
+
/** This is a liquid templating string. On the first call to Gather, the template will be filled out with variables from the context, and will be spoken verbatim to the user. An example would be "Base on your zipcode, it looks like you could be in one of these counties: {{ counties | join: ", " }}. Which one do you live in?" */
|
|
4956
|
+
literalTemplate?: string;
|
|
4957
|
+
/** @maxLength 80 */
|
|
4958
|
+
name: string;
|
|
4959
|
+
/** This is for metadata you want to store on the task. */
|
|
4960
|
+
metadata?: object;
|
|
4961
|
+
}
|
|
4962
|
+
|
|
4963
|
+
export interface ApiRequest {
|
|
4964
|
+
type: 'apiRequest';
|
|
4965
|
+
method: 'POST' | 'GET';
|
|
4966
|
+
/** Api endpoint to send requests to. */
|
|
4967
|
+
url: string;
|
|
4968
|
+
/**
|
|
4969
|
+
* These are the custom headers to include in the Api Request sent.
|
|
4970
|
+
*
|
|
4971
|
+
* Each key-value pair represents a header name and its value.
|
|
4972
|
+
*/
|
|
4973
|
+
headers?: JsonSchema;
|
|
4974
|
+
/**
|
|
4975
|
+
* This defined the JSON body of your Api Request. For example, if `body_schema`
|
|
4976
|
+
* included "my_field": "my_gather_statement.user_age", then the json body sent to the server would have that particular value assign to it.
|
|
4977
|
+
* Right now, only data from gather statements are supported.
|
|
4978
|
+
*/
|
|
4979
|
+
body?: JsonSchema;
|
|
4980
|
+
/**
|
|
4981
|
+
* This is the mode of the Api Request.
|
|
4982
|
+
* We only support BLOCKING and BACKGROUND for now.
|
|
4983
|
+
*/
|
|
4984
|
+
mode: 'blocking' | 'background';
|
|
4985
|
+
/**
|
|
4986
|
+
* This is a list of hooks for a task.
|
|
4987
|
+
* Each hook is a list of tasks to run on a trigger (such as on start, on failure, etc).
|
|
4988
|
+
* Only Say is supported for now.
|
|
4989
|
+
*/
|
|
4990
|
+
hooks?: Hook[];
|
|
4991
|
+
/** This is the schema for the outputs of the Api Request. */
|
|
4992
|
+
output?: JsonSchema;
|
|
4993
|
+
/** @maxLength 80 */
|
|
4994
|
+
name: string;
|
|
4995
|
+
/** This is for metadata you want to store on the task. */
|
|
4996
|
+
metadata?: object;
|
|
4997
|
+
}
|
|
4998
|
+
|
|
4999
|
+
export interface Hangup {
|
|
5000
|
+
type: 'hangup';
|
|
5001
|
+
/** @maxLength 80 */
|
|
5002
|
+
name: string;
|
|
5003
|
+
/** This is for metadata you want to store on the task. */
|
|
5004
|
+
metadata?: object;
|
|
5005
|
+
}
|
|
5006
|
+
|
|
5007
|
+
export interface Transfer {
|
|
5008
|
+
type: 'transfer';
|
|
5009
|
+
destination: object;
|
|
5010
|
+
/** @maxLength 80 */
|
|
5011
|
+
name: string;
|
|
5012
|
+
/** This is for metadata you want to store on the task. */
|
|
5013
|
+
metadata?: object;
|
|
5014
|
+
}
|
|
5015
|
+
|
|
4818
5016
|
export interface AIEdgeCondition {
|
|
4819
5017
|
type: 'ai';
|
|
4820
5018
|
/**
|
|
@@ -4826,7 +5024,7 @@ export interface AIEdgeCondition {
|
|
|
4826
5024
|
|
|
4827
5025
|
export interface LogicEdgeCondition {
|
|
4828
5026
|
type: 'logic';
|
|
4829
|
-
/** @maxLength
|
|
5027
|
+
/** @maxLength 1000 */
|
|
4830
5028
|
liquid: string;
|
|
4831
5029
|
}
|
|
4832
5030
|
|
|
@@ -4844,8 +5042,8 @@ export interface Edge {
|
|
|
4844
5042
|
metadata?: object;
|
|
4845
5043
|
}
|
|
4846
5044
|
|
|
4847
|
-
export interface
|
|
4848
|
-
nodes: (Say | Gather | ApiRequest | Hangup | Transfer)[];
|
|
5045
|
+
export interface WorkflowUserEditable {
|
|
5046
|
+
nodes: (Start | Assistant | Say | Gather | ApiRequest | Hangup | Transfer)[];
|
|
4849
5047
|
/** These are the options for the workflow's LLM. */
|
|
4850
5048
|
model?:
|
|
4851
5049
|
| AnthropicModel
|
|
@@ -4862,12 +5060,6 @@ export interface Workflow {
|
|
|
4862
5060
|
| PerplexityAIModel
|
|
4863
5061
|
| TogetherAIModel
|
|
4864
5062
|
| XaiModel;
|
|
4865
|
-
id: string;
|
|
4866
|
-
orgId: string;
|
|
4867
|
-
/** @format date-time */
|
|
4868
|
-
createdAt: string;
|
|
4869
|
-
/** @format date-time */
|
|
4870
|
-
updatedAt: string;
|
|
4871
5063
|
/** @maxLength 80 */
|
|
4872
5064
|
name: string;
|
|
4873
5065
|
edges: Edge[];
|
|
@@ -4909,7 +5101,7 @@ export interface VapiModel {
|
|
|
4909
5101
|
/** This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead. */
|
|
4910
5102
|
workflowId?: string;
|
|
4911
5103
|
/** This is the workflow that will be used for the call. To use an existing workflow, use `workflowId` instead. */
|
|
4912
|
-
workflow?:
|
|
5104
|
+
workflow?: WorkflowUserEditable;
|
|
4913
5105
|
/** This is the name of the model. Ex. cognitivecomputations/dolphin-mixtral-8x7b */
|
|
4914
5106
|
model: string;
|
|
4915
5107
|
/**
|
|
@@ -7714,7 +7906,11 @@ export interface CreateTogetherAICredentialDTO {
|
|
|
7714
7906
|
export interface CreateTwilioCredentialDTO {
|
|
7715
7907
|
provider: 'twilio';
|
|
7716
7908
|
/** This is not returned in the API. */
|
|
7717
|
-
authToken
|
|
7909
|
+
authToken?: string;
|
|
7910
|
+
/** This is not returned in the API. */
|
|
7911
|
+
apiKey?: string;
|
|
7912
|
+
/** This is not returned in the API. */
|
|
7913
|
+
apiSecret?: string;
|
|
7718
7914
|
accountSid: string;
|
|
7719
7915
|
/**
|
|
7720
7916
|
* This is the name of credential. This is just for your reference.
|
|
@@ -7818,93 +8014,196 @@ export interface TransferAssistantHookAction {
|
|
|
7818
8014
|
destination?: TransferDestinationNumber | TransferDestinationSip;
|
|
7819
8015
|
}
|
|
7820
8016
|
|
|
7821
|
-
export interface
|
|
7822
|
-
/** This is the provider to use for voicemail detection. */
|
|
7823
|
-
provider: 'google';
|
|
8017
|
+
export interface FunctionCallAssistantHookAction {
|
|
7824
8018
|
/**
|
|
7825
|
-
* This
|
|
8019
|
+
* This determines if the tool is async.
|
|
7826
8020
|
*
|
|
7827
|
-
*
|
|
7828
|
-
* @min 5
|
|
7829
|
-
* @max 60
|
|
7830
|
-
* @default 25
|
|
7831
|
-
*/
|
|
7832
|
-
voicemailExpectedDurationSeconds: number;
|
|
7833
|
-
}
|
|
7834
|
-
|
|
7835
|
-
export interface OpenAIVoicemailDetectionPlan {
|
|
7836
|
-
/** This is the provider to use for voicemail detection. */
|
|
7837
|
-
provider: 'openai';
|
|
7838
|
-
/**
|
|
7839
|
-
* This is how long should we listen in order to determine if we were sent to voicemail or not?
|
|
8021
|
+
* 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.
|
|
7840
8022
|
*
|
|
7841
|
-
*
|
|
7842
|
-
* @min 5
|
|
7843
|
-
* @max 60
|
|
7844
|
-
* @default 25
|
|
7845
|
-
*/
|
|
7846
|
-
voicemailExpectedDurationSeconds: number;
|
|
7847
|
-
}
|
|
7848
|
-
|
|
7849
|
-
export interface TwilioVoicemailDetectionPlan {
|
|
7850
|
-
/** This is the provider to use for voicemail detection. */
|
|
7851
|
-
provider: 'twilio';
|
|
7852
|
-
/**
|
|
7853
|
-
* These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence'].
|
|
8023
|
+
* 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.
|
|
7854
8024
|
*
|
|
7855
|
-
*
|
|
7856
|
-
* @example
|
|
8025
|
+
* Defaults to synchronous (`false`).
|
|
8026
|
+
* @example false
|
|
7857
8027
|
*/
|
|
7858
|
-
|
|
7859
|
-
| 'machine_start'
|
|
7860
|
-
| 'human'
|
|
7861
|
-
| 'fax'
|
|
7862
|
-
| 'unknown'
|
|
7863
|
-
| 'machine_end_beep'
|
|
7864
|
-
| 'machine_end_silence'
|
|
7865
|
-
| 'machine_end_other';
|
|
8028
|
+
async?: boolean;
|
|
7866
8029
|
/**
|
|
7867
|
-
*
|
|
8030
|
+
* These are the messages that will be spoken to the user as the tool is running.
|
|
7868
8031
|
*
|
|
7869
|
-
*
|
|
8032
|
+
* 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.
|
|
7870
8033
|
*/
|
|
7871
|
-
|
|
8034
|
+
messages?: (ToolMessageStart | ToolMessageComplete | ToolMessageFailed | ToolMessageDelayed)[];
|
|
8035
|
+
/** The type of tool. "function" for Function tool. */
|
|
8036
|
+
type: 'function';
|
|
7872
8037
|
/**
|
|
7873
|
-
*
|
|
7874
|
-
*
|
|
7875
|
-
* Increasing this value will provide the engine more time to make a determination. This can be useful when DetectMessageEnd is provided in the MachineDetection parameter and there is an expectation of long answering machine greetings that can exceed 30 seconds.
|
|
7876
|
-
*
|
|
7877
|
-
* Decreasing this value will reduce the amount of time the engine has to make a determination. This can be particularly useful when the Enable option is provided in the MachineDetection parameter and you want to limit the time for initial detection.
|
|
8038
|
+
* This is the function definition of the tool.
|
|
7878
8039
|
*
|
|
7879
|
-
*
|
|
8040
|
+
* 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.
|
|
7880
8041
|
*
|
|
7881
|
-
*
|
|
7882
|
-
* @min 3
|
|
7883
|
-
* @max 59
|
|
8042
|
+
* 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.
|
|
7884
8043
|
*/
|
|
7885
|
-
|
|
8044
|
+
function?: OpenAIFunction;
|
|
7886
8045
|
/**
|
|
7887
|
-
*
|
|
7888
|
-
*
|
|
7889
|
-
* Increasing this value will reduce the chance of a False Machine (detected machine, actually human) for a long human greeting (e.g., a business greeting) but increase the time it takes to detect a machine.
|
|
7890
|
-
*
|
|
7891
|
-
* Decreasing this value will reduce the chances of a False Human (detected human, actually machine) for short voicemail greetings. The value of this parameter may need to be reduced by more than 1000ms to detect very short voicemail greetings. A reduction of that significance can result in increased False Machine detections. Adjusting the MachineDetectionSpeechEndThreshold is likely the better approach for short voicemails. Decreasing MachineDetectionSpeechThreshold will also reduce the time it takes to detect a machine.
|
|
8046
|
+
* This is the server that will be hit when this tool is requested by the model.
|
|
7892
8047
|
*
|
|
7893
|
-
*
|
|
8048
|
+
* All requests will be sent with the call object among other things. You can find more details in the Server URL documentation.
|
|
7894
8049
|
*
|
|
7895
|
-
*
|
|
7896
|
-
* @min 1000
|
|
7897
|
-
* @max 6000
|
|
8050
|
+
* 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.
|
|
7898
8051
|
*/
|
|
7899
|
-
|
|
8052
|
+
server?: Server;
|
|
8053
|
+
}
|
|
8054
|
+
|
|
8055
|
+
export interface AssistantHookFilter {
|
|
7900
8056
|
/**
|
|
7901
|
-
*
|
|
7902
|
-
*
|
|
7903
|
-
|
|
7904
|
-
|
|
7905
|
-
|
|
7906
|
-
*
|
|
7907
|
-
*
|
|
8057
|
+
* This is the type of filter - currently only "oneOf" is supported
|
|
8058
|
+
* @maxLength 1000
|
|
8059
|
+
*/
|
|
8060
|
+
type: 'oneOf';
|
|
8061
|
+
/**
|
|
8062
|
+
* This is the key to filter on (e.g. "call.endedReason")
|
|
8063
|
+
* @maxLength 1000
|
|
8064
|
+
*/
|
|
8065
|
+
key: string;
|
|
8066
|
+
/** This is the array of possible values to match against */
|
|
8067
|
+
oneOf: string[];
|
|
8068
|
+
}
|
|
8069
|
+
|
|
8070
|
+
export interface AssistantHookCallEnding {
|
|
8071
|
+
/**
|
|
8072
|
+
* This is the event that triggers this hook
|
|
8073
|
+
* @maxLength 1000
|
|
8074
|
+
*/
|
|
8075
|
+
on: 'call.ending';
|
|
8076
|
+
/** This is the set of actions to perform when the hook triggers */
|
|
8077
|
+
do: (TransferAssistantHookAction | FunctionCallAssistantHookAction)[];
|
|
8078
|
+
/** This is the set of filters that must match for the hook to trigger */
|
|
8079
|
+
filters?: AssistantHookFilter[];
|
|
8080
|
+
}
|
|
8081
|
+
|
|
8082
|
+
export interface VoicemailDetectionBackoffPlan {
|
|
8083
|
+
/**
|
|
8084
|
+
* This is the number of seconds to wait before starting the first retry attempt.
|
|
8085
|
+
* @min 0
|
|
8086
|
+
* @default 5
|
|
8087
|
+
*/
|
|
8088
|
+
startAtSeconds?: number;
|
|
8089
|
+
/**
|
|
8090
|
+
* This is the interval in seconds between retry attempts.
|
|
8091
|
+
* @min 2.5
|
|
8092
|
+
* @default 5
|
|
8093
|
+
*/
|
|
8094
|
+
frequencySeconds?: number;
|
|
8095
|
+
/**
|
|
8096
|
+
* This is the maximum number of retry attempts before giving up.
|
|
8097
|
+
* @min 1
|
|
8098
|
+
* @max 10
|
|
8099
|
+
* @default 6
|
|
8100
|
+
*/
|
|
8101
|
+
maxRetries?: number;
|
|
8102
|
+
}
|
|
8103
|
+
|
|
8104
|
+
export interface GoogleVoicemailDetectionPlan {
|
|
8105
|
+
/**
|
|
8106
|
+
* This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message
|
|
8107
|
+
*
|
|
8108
|
+
* - If we detect a voicemail beep before this, we will speak the message at that point.
|
|
8109
|
+
*
|
|
8110
|
+
* - Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.
|
|
8111
|
+
*
|
|
8112
|
+
* @default 30
|
|
8113
|
+
* @min 0
|
|
8114
|
+
* @max 60
|
|
8115
|
+
* @min 0
|
|
8116
|
+
* @max 30
|
|
8117
|
+
* @default 30
|
|
8118
|
+
*/
|
|
8119
|
+
beepMaxAwaitSeconds?: number;
|
|
8120
|
+
/** This is the provider to use for voicemail detection. */
|
|
8121
|
+
provider: 'google';
|
|
8122
|
+
/** This is the backoff plan for the voicemail detection. */
|
|
8123
|
+
backoffPlan?: VoicemailDetectionBackoffPlan;
|
|
8124
|
+
}
|
|
8125
|
+
|
|
8126
|
+
export interface OpenAIVoicemailDetectionPlan {
|
|
8127
|
+
/**
|
|
8128
|
+
* This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message
|
|
8129
|
+
*
|
|
8130
|
+
* - If we detect a voicemail beep before this, we will speak the message at that point.
|
|
8131
|
+
*
|
|
8132
|
+
* - Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.
|
|
8133
|
+
*
|
|
8134
|
+
* @default 30
|
|
8135
|
+
* @min 0
|
|
8136
|
+
* @max 60
|
|
8137
|
+
* @min 0
|
|
8138
|
+
* @max 30
|
|
8139
|
+
* @default 30
|
|
8140
|
+
*/
|
|
8141
|
+
beepMaxAwaitSeconds?: number;
|
|
8142
|
+
/** This is the provider to use for voicemail detection. */
|
|
8143
|
+
provider: 'openai';
|
|
8144
|
+
/** This is the backoff plan for the voicemail detection. */
|
|
8145
|
+
backoffPlan?: VoicemailDetectionBackoffPlan;
|
|
8146
|
+
}
|
|
8147
|
+
|
|
8148
|
+
export interface TwilioVoicemailDetectionPlan {
|
|
8149
|
+
/** This is the provider to use for voicemail detection. */
|
|
8150
|
+
provider: 'twilio';
|
|
8151
|
+
/**
|
|
8152
|
+
* These are the AMD messages from Twilio that are considered as voicemail. Default is ['machine_end_beep', 'machine_end_silence'].
|
|
8153
|
+
*
|
|
8154
|
+
* @default {Array} ['machine_end_beep', 'machine_end_silence']
|
|
8155
|
+
* @example ["machine_end_beep","machine_end_silence"]
|
|
8156
|
+
*/
|
|
8157
|
+
voicemailDetectionTypes?:
|
|
8158
|
+
| 'machine_start'
|
|
8159
|
+
| 'human'
|
|
8160
|
+
| 'fax'
|
|
8161
|
+
| 'unknown'
|
|
8162
|
+
| 'machine_end_beep'
|
|
8163
|
+
| 'machine_end_silence'
|
|
8164
|
+
| 'machine_end_other';
|
|
8165
|
+
/**
|
|
8166
|
+
* This sets whether the assistant should detect voicemail. Defaults to true.
|
|
8167
|
+
*
|
|
8168
|
+
* @default true
|
|
8169
|
+
*/
|
|
8170
|
+
enabled?: boolean;
|
|
8171
|
+
/**
|
|
8172
|
+
* The number of seconds that Twilio should attempt to perform answering machine detection before timing out and returning AnsweredBy as unknown. Default is 30 seconds.
|
|
8173
|
+
*
|
|
8174
|
+
* Increasing this value will provide the engine more time to make a determination. This can be useful when DetectMessageEnd is provided in the MachineDetection parameter and there is an expectation of long answering machine greetings that can exceed 30 seconds.
|
|
8175
|
+
*
|
|
8176
|
+
* Decreasing this value will reduce the amount of time the engine has to make a determination. This can be particularly useful when the Enable option is provided in the MachineDetection parameter and you want to limit the time for initial detection.
|
|
8177
|
+
*
|
|
8178
|
+
* Check the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.
|
|
8179
|
+
*
|
|
8180
|
+
* @default 30
|
|
8181
|
+
* @min 3
|
|
8182
|
+
* @max 59
|
|
8183
|
+
*/
|
|
8184
|
+
machineDetectionTimeout?: number;
|
|
8185
|
+
/**
|
|
8186
|
+
* The number of milliseconds that is used as the measuring stick for the length of the speech activity. Durations lower than this value will be interpreted as a human, longer as a machine. Default is 2400 milliseconds.
|
|
8187
|
+
*
|
|
8188
|
+
* Increasing this value will reduce the chance of a False Machine (detected machine, actually human) for a long human greeting (e.g., a business greeting) but increase the time it takes to detect a machine.
|
|
8189
|
+
*
|
|
8190
|
+
* Decreasing this value will reduce the chances of a False Human (detected human, actually machine) for short voicemail greetings. The value of this parameter may need to be reduced by more than 1000ms to detect very short voicemail greetings. A reduction of that significance can result in increased False Machine detections. Adjusting the MachineDetectionSpeechEndThreshold is likely the better approach for short voicemails. Decreasing MachineDetectionSpeechThreshold will also reduce the time it takes to detect a machine.
|
|
8191
|
+
*
|
|
8192
|
+
* Check the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.
|
|
8193
|
+
*
|
|
8194
|
+
* @default 2400
|
|
8195
|
+
* @min 1000
|
|
8196
|
+
* @max 6000
|
|
8197
|
+
*/
|
|
8198
|
+
machineDetectionSpeechThreshold?: number;
|
|
8199
|
+
/**
|
|
8200
|
+
* The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Default is 1200 milliseconds.
|
|
8201
|
+
*
|
|
8202
|
+
* Increasing this value will typically be used to better address the short voicemail greeting scenarios. For short voicemails, there is typically 1000-2000ms of audio followed by 1200-2400ms of silence and then additional audio before the beep. Increasing the MachineDetectionSpeechEndThreshold to ~2500ms will treat the 1200-2400ms of silence as a gap in the greeting but not the end of the greeting and will result in a machine detection. The downsides of such a change include:
|
|
8203
|
+
* - Increasing the delay for human detection by the amount you increase this parameter, e.g., a change of 1200ms to 2500ms increases human detection delay by 1300ms.
|
|
8204
|
+
* - Cases where a human has two utterances separated by a period of silence (e.g. a "Hello", then 2000ms of silence, and another "Hello") may be interpreted as a machine.
|
|
8205
|
+
*
|
|
8206
|
+
* Decreasing this value will result in faster human detection. The consequence is that it can lead to increased False Human (detected human, actually machine) detections because a silence gap in a voicemail greeting (not necessarily just in short voicemail scenarios) can be incorrectly interpreted as the end of speech.
|
|
7908
8207
|
*
|
|
7909
8208
|
* Check the [Twilio docs](https://www.twilio.com/docs/voice/answering-machine-detection#optional-api-tuning-parameters) for more info.
|
|
7910
8209
|
*
|
|
@@ -7929,6 +8228,28 @@ export interface TwilioVoicemailDetectionPlan {
|
|
|
7929
8228
|
machineDetectionSilenceTimeout?: number;
|
|
7930
8229
|
}
|
|
7931
8230
|
|
|
8231
|
+
export interface VapiVoicemailDetectionPlan {
|
|
8232
|
+
/**
|
|
8233
|
+
* This is the maximum duration from the start of the call that we will wait for a voicemail beep, before speaking our message
|
|
8234
|
+
*
|
|
8235
|
+
* - If we detect a voicemail beep before this, we will speak the message at that point.
|
|
8236
|
+
*
|
|
8237
|
+
* - Setting too low a value means that the bot will start speaking its voicemail message too early. If it does so before the actual beep, it will get cut off. You should definitely tune this to your use case.
|
|
8238
|
+
*
|
|
8239
|
+
* @default 30
|
|
8240
|
+
* @min 0
|
|
8241
|
+
* @max 60
|
|
8242
|
+
* @min 0
|
|
8243
|
+
* @max 30
|
|
8244
|
+
* @default 30
|
|
8245
|
+
*/
|
|
8246
|
+
beepMaxAwaitSeconds?: number;
|
|
8247
|
+
/** This is the provider to use for voicemail detection. */
|
|
8248
|
+
provider: 'vapi';
|
|
8249
|
+
/** This is the backoff plan for the voicemail detection. */
|
|
8250
|
+
backoffPlan?: VoicemailDetectionBackoffPlan;
|
|
8251
|
+
}
|
|
8252
|
+
|
|
7932
8253
|
export interface CompliancePlan {
|
|
7933
8254
|
/**
|
|
7934
8255
|
* When this is enabled, no logs, recordings, or transcriptions will be stored.
|
|
@@ -8341,7 +8662,7 @@ export interface StartSpeakingPlan {
|
|
|
8341
8662
|
* @deprecated
|
|
8342
8663
|
* @example false
|
|
8343
8664
|
*/
|
|
8344
|
-
smartEndpointingEnabled?:
|
|
8665
|
+
smartEndpointingEnabled?: boolean | 'livekit';
|
|
8345
8666
|
/**
|
|
8346
8667
|
* This is the plan for smart endpointing. Pick between Vapi smart endpointing or LiveKit smart endpointing (or nothing). We strongly recommend using livekit endpointing when working in English. LiveKit endpointing is not supported in other languages, yet.
|
|
8347
8668
|
*
|
|
@@ -8469,35 +8790,6 @@ export interface MonitorPlan {
|
|
|
8469
8790
|
controlEnabled?: boolean;
|
|
8470
8791
|
}
|
|
8471
8792
|
|
|
8472
|
-
export interface AssistantHookFilter {
|
|
8473
|
-
/**
|
|
8474
|
-
* This is the type of filter - currently only "oneOf" is supported
|
|
8475
|
-
* @maxLength 1000
|
|
8476
|
-
*/
|
|
8477
|
-
type: 'oneOf';
|
|
8478
|
-
/**
|
|
8479
|
-
* This is the key to filter on (e.g. "call.endedReason")
|
|
8480
|
-
* @maxLength 1000
|
|
8481
|
-
*/
|
|
8482
|
-
key: string;
|
|
8483
|
-
/** This is the array of possible values to match against */
|
|
8484
|
-
oneOf: string[];
|
|
8485
|
-
}
|
|
8486
|
-
|
|
8487
|
-
export type AssistantHookActionBase = object;
|
|
8488
|
-
|
|
8489
|
-
export interface AssistantHooks {
|
|
8490
|
-
/**
|
|
8491
|
-
* This is the event that triggers this hook
|
|
8492
|
-
* @maxLength 1000
|
|
8493
|
-
*/
|
|
8494
|
-
on: 'call.ending';
|
|
8495
|
-
/** This is the set of filters that must match for the hook to trigger */
|
|
8496
|
-
filters?: AssistantHookFilter[];
|
|
8497
|
-
/** This is the set of actions to perform when the hook triggers */
|
|
8498
|
-
do: AssistantHookActionBase[];
|
|
8499
|
-
}
|
|
8500
|
-
|
|
8501
8793
|
export interface KeypadInputPlan {
|
|
8502
8794
|
/**
|
|
8503
8795
|
* This keeps track of whether the user has enabled keypad input.
|
|
@@ -8604,51 +8896,10 @@ export interface CreateAssistantDTO {
|
|
|
8604
8896
|
voicemailDetection?:
|
|
8605
8897
|
| GoogleVoicemailDetectionPlan
|
|
8606
8898
|
| OpenAIVoicemailDetectionPlan
|
|
8607
|
-
| TwilioVoicemailDetectionPlan
|
|
8608
|
-
|
|
8609
|
-
|
|
8610
|
-
|
|
8611
|
-
*/
|
|
8612
|
-
clientMessages?:
|
|
8613
|
-
| 'conversation-update'
|
|
8614
|
-
| 'function-call'
|
|
8615
|
-
| 'function-call-result'
|
|
8616
|
-
| 'hang'
|
|
8617
|
-
| 'language-changed'
|
|
8618
|
-
| 'metadata'
|
|
8619
|
-
| 'model-output'
|
|
8620
|
-
| 'speech-update'
|
|
8621
|
-
| 'status-update'
|
|
8622
|
-
| 'transcript'
|
|
8623
|
-
| 'tool-calls'
|
|
8624
|
-
| 'tool-calls-result'
|
|
8625
|
-
| 'tool.completed'
|
|
8626
|
-
| 'transfer-update'
|
|
8627
|
-
| 'user-interrupted'
|
|
8628
|
-
| 'voice-input'
|
|
8629
|
-
| 'workflow.node.started';
|
|
8630
|
-
/**
|
|
8631
|
-
* These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,user-interrupted. You can check the shape of the messages in ServerMessage schema.
|
|
8632
|
-
* @example ["conversation-update","end-of-call-report","function-call","hang","speech-update","status-update","tool-calls","transfer-destination-request","user-interrupted"]
|
|
8633
|
-
*/
|
|
8634
|
-
serverMessages?:
|
|
8635
|
-
| 'conversation-update'
|
|
8636
|
-
| 'end-of-call-report'
|
|
8637
|
-
| 'function-call'
|
|
8638
|
-
| 'hang'
|
|
8639
|
-
| 'language-changed'
|
|
8640
|
-
| 'language-change-detected'
|
|
8641
|
-
| 'model-output'
|
|
8642
|
-
| 'phone-call-control'
|
|
8643
|
-
| 'speech-update'
|
|
8644
|
-
| 'status-update'
|
|
8645
|
-
| 'transcript'
|
|
8646
|
-
| "transcript[transcriptType='final']"
|
|
8647
|
-
| 'tool-calls'
|
|
8648
|
-
| 'transfer-destination-request'
|
|
8649
|
-
| 'transfer-update'
|
|
8650
|
-
| 'user-interrupted'
|
|
8651
|
-
| 'voice-input';
|
|
8899
|
+
| TwilioVoicemailDetectionPlan
|
|
8900
|
+
| VapiVoicemailDetectionPlan;
|
|
8901
|
+
clientMessages: object[][];
|
|
8902
|
+
serverMessages: object[][];
|
|
8652
8903
|
/**
|
|
8653
8904
|
* How many seconds of silence to wait before ending the call. Defaults to 30.
|
|
8654
8905
|
*
|
|
@@ -8842,6 +9093,8 @@ export interface CreateAssistantDTO {
|
|
|
8842
9093
|
provider: 'slack.oauth2-authorization';
|
|
8843
9094
|
} & CreateSlackOAuth2AuthorizationCredentialDTO)
|
|
8844
9095
|
)[];
|
|
9096
|
+
/** This is a set of actions that will be performed on certain events. */
|
|
9097
|
+
hooks?: AssistantHookCallEnding[];
|
|
8845
9098
|
/**
|
|
8846
9099
|
* This is the name of the assistant.
|
|
8847
9100
|
*
|
|
@@ -8924,8 +9177,6 @@ export interface CreateAssistantDTO {
|
|
|
8924
9177
|
* 3. org.serverUrl
|
|
8925
9178
|
*/
|
|
8926
9179
|
server?: Server;
|
|
8927
|
-
/** This is a set of actions that will be performed on certain events. */
|
|
8928
|
-
hooks?: AssistantHooks[];
|
|
8929
9180
|
keypadInputPlan?: KeypadInputPlan;
|
|
8930
9181
|
}
|
|
8931
9182
|
|
|
@@ -9010,51 +9261,10 @@ export interface AssistantOverrides {
|
|
|
9010
9261
|
voicemailDetection?:
|
|
9011
9262
|
| GoogleVoicemailDetectionPlan
|
|
9012
9263
|
| OpenAIVoicemailDetectionPlan
|
|
9013
|
-
| TwilioVoicemailDetectionPlan
|
|
9014
|
-
|
|
9015
|
-
|
|
9016
|
-
|
|
9017
|
-
*/
|
|
9018
|
-
clientMessages?:
|
|
9019
|
-
| 'conversation-update'
|
|
9020
|
-
| 'function-call'
|
|
9021
|
-
| 'function-call-result'
|
|
9022
|
-
| 'hang'
|
|
9023
|
-
| 'language-changed'
|
|
9024
|
-
| 'metadata'
|
|
9025
|
-
| 'model-output'
|
|
9026
|
-
| 'speech-update'
|
|
9027
|
-
| 'status-update'
|
|
9028
|
-
| 'transcript'
|
|
9029
|
-
| 'tool-calls'
|
|
9030
|
-
| 'tool-calls-result'
|
|
9031
|
-
| 'tool.completed'
|
|
9032
|
-
| 'transfer-update'
|
|
9033
|
-
| 'user-interrupted'
|
|
9034
|
-
| 'voice-input'
|
|
9035
|
-
| 'workflow.node.started';
|
|
9036
|
-
/**
|
|
9037
|
-
* These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,user-interrupted. You can check the shape of the messages in ServerMessage schema.
|
|
9038
|
-
* @example ["conversation-update","end-of-call-report","function-call","hang","speech-update","status-update","tool-calls","transfer-destination-request","user-interrupted"]
|
|
9039
|
-
*/
|
|
9040
|
-
serverMessages?:
|
|
9041
|
-
| 'conversation-update'
|
|
9042
|
-
| 'end-of-call-report'
|
|
9043
|
-
| 'function-call'
|
|
9044
|
-
| 'hang'
|
|
9045
|
-
| 'language-changed'
|
|
9046
|
-
| 'language-change-detected'
|
|
9047
|
-
| 'model-output'
|
|
9048
|
-
| 'phone-call-control'
|
|
9049
|
-
| 'speech-update'
|
|
9050
|
-
| 'status-update'
|
|
9051
|
-
| 'transcript'
|
|
9052
|
-
| "transcript[transcriptType='final']"
|
|
9053
|
-
| 'tool-calls'
|
|
9054
|
-
| 'transfer-destination-request'
|
|
9055
|
-
| 'transfer-update'
|
|
9056
|
-
| 'user-interrupted'
|
|
9057
|
-
| 'voice-input';
|
|
9264
|
+
| TwilioVoicemailDetectionPlan
|
|
9265
|
+
| VapiVoicemailDetectionPlan;
|
|
9266
|
+
clientMessages: object[][];
|
|
9267
|
+
serverMessages: object[][];
|
|
9058
9268
|
/**
|
|
9059
9269
|
* How many seconds of silence to wait before ending the call. Defaults to 30.
|
|
9060
9270
|
*
|
|
@@ -9248,6 +9458,8 @@ export interface AssistantOverrides {
|
|
|
9248
9458
|
provider: 'slack.oauth2-authorization';
|
|
9249
9459
|
} & CreateSlackOAuth2AuthorizationCredentialDTO)
|
|
9250
9460
|
)[];
|
|
9461
|
+
/** This is a set of actions that will be performed on certain events. */
|
|
9462
|
+
hooks?: AssistantHookCallEnding[];
|
|
9251
9463
|
/**
|
|
9252
9464
|
* These are values that will be used to replace the template variables in the assistant messages and other text-based fields.
|
|
9253
9465
|
* This uses LiquidJS syntax. https://liquidjs.com/tutorials/intro-to-liquid.html
|
|
@@ -9340,8 +9552,6 @@ export interface AssistantOverrides {
|
|
|
9340
9552
|
* 3. org.serverUrl
|
|
9341
9553
|
*/
|
|
9342
9554
|
server?: Server;
|
|
9343
|
-
/** This is a set of actions that will be performed on certain events. */
|
|
9344
|
-
hooks?: AssistantHooks[];
|
|
9345
9555
|
keypadInputPlan?: KeypadInputPlan;
|
|
9346
9556
|
}
|
|
9347
9557
|
|
|
@@ -9377,6 +9587,46 @@ export interface CreateSquadDTO {
|
|
|
9377
9587
|
membersOverrides?: AssistantOverrides;
|
|
9378
9588
|
}
|
|
9379
9589
|
|
|
9590
|
+
export interface CreateWorkflowDTO {
|
|
9591
|
+
nodes: (Start | Assistant | Say | Gather | ApiRequest | Hangup | Transfer)[];
|
|
9592
|
+
/** These are the options for the workflow's LLM. */
|
|
9593
|
+
model?:
|
|
9594
|
+
| AnthropicModel
|
|
9595
|
+
| AnyscaleModel
|
|
9596
|
+
| CerebrasModel
|
|
9597
|
+
| CustomLLMModel
|
|
9598
|
+
| DeepInfraModel
|
|
9599
|
+
| DeepSeekModel
|
|
9600
|
+
| GoogleModel
|
|
9601
|
+
| GroqModel
|
|
9602
|
+
| InflectionAIModel
|
|
9603
|
+
| OpenAIModel
|
|
9604
|
+
| OpenRouterModel
|
|
9605
|
+
| PerplexityAIModel
|
|
9606
|
+
| TogetherAIModel
|
|
9607
|
+
| XaiModel;
|
|
9608
|
+
/** @maxLength 80 */
|
|
9609
|
+
name: string;
|
|
9610
|
+
edges: Edge[];
|
|
9611
|
+
}
|
|
9612
|
+
|
|
9613
|
+
export interface TransferPhoneNumberHookAction {
|
|
9614
|
+
/** This is the type of action - must be "transfer" */
|
|
9615
|
+
type: 'transfer';
|
|
9616
|
+
/** This is the destination details for the transfer - can be a phone number or SIP URI */
|
|
9617
|
+
destination?: TransferDestinationNumber | TransferDestinationSip;
|
|
9618
|
+
}
|
|
9619
|
+
|
|
9620
|
+
export interface SayPhoneNumberHookAction {
|
|
9621
|
+
/** This is the type of action - must be "say" */
|
|
9622
|
+
type: 'say';
|
|
9623
|
+
/**
|
|
9624
|
+
* This is the message to say
|
|
9625
|
+
* @maxLength 4000
|
|
9626
|
+
*/
|
|
9627
|
+
exact: string;
|
|
9628
|
+
}
|
|
9629
|
+
|
|
9380
9630
|
export interface PhoneNumberHookCallRinging {
|
|
9381
9631
|
/**
|
|
9382
9632
|
* This is the event to trigger the hook on
|
|
@@ -9384,7 +9634,7 @@ export interface PhoneNumberHookCallRinging {
|
|
|
9384
9634
|
*/
|
|
9385
9635
|
on: 'call.ringing';
|
|
9386
9636
|
/** This is the set of actions to perform when the hook triggers */
|
|
9387
|
-
do:
|
|
9637
|
+
do: (TransferPhoneNumberHookAction | SayPhoneNumberHookAction)[];
|
|
9388
9638
|
}
|
|
9389
9639
|
|
|
9390
9640
|
export interface ImportTwilioPhoneNumberDTO {
|
|
@@ -9399,6 +9649,16 @@ export interface ImportTwilioPhoneNumberDTO {
|
|
|
9399
9649
|
fallbackDestination?: TransferDestinationNumber | TransferDestinationSip;
|
|
9400
9650
|
/** This is the hooks that will be used for incoming calls to this phone number. */
|
|
9401
9651
|
hooks?: PhoneNumberHookCallRinging[];
|
|
9652
|
+
/**
|
|
9653
|
+
* Controls whether Vapi sets the messaging webhook URL on the Twilio number during import.
|
|
9654
|
+
*
|
|
9655
|
+
* If set to `false`, Vapi will not update the Twilio messaging URL, leaving it as is.
|
|
9656
|
+
* If `true` or omitted (default), Vapi will configure both the voice and messaging URLs.
|
|
9657
|
+
*
|
|
9658
|
+
* @default true
|
|
9659
|
+
* @default true
|
|
9660
|
+
*/
|
|
9661
|
+
smsEnabled?: boolean;
|
|
9402
9662
|
/**
|
|
9403
9663
|
* These are the digits of the phone number you own on your Twilio.
|
|
9404
9664
|
* @deprecated
|
|
@@ -9407,7 +9667,11 @@ export interface ImportTwilioPhoneNumberDTO {
|
|
|
9407
9667
|
/** This is your Twilio Account SID that will be used to handle this phone number. */
|
|
9408
9668
|
twilioAccountSid: string;
|
|
9409
9669
|
/** This is the Twilio Auth Token that will be used to handle this phone number. */
|
|
9410
|
-
twilioAuthToken
|
|
9670
|
+
twilioAuthToken?: string;
|
|
9671
|
+
/** This is the Twilio API Key that will be used to handle this phone number. If AuthToken is provided, this will be ignored. */
|
|
9672
|
+
twilioApiKey?: string;
|
|
9673
|
+
/** This is the Twilio API Secret that will be used to handle this phone number. If AuthToken is provided, this will be ignored. */
|
|
9674
|
+
twilioApiSecret?: string;
|
|
9411
9675
|
/**
|
|
9412
9676
|
* This is the name of the phone number. This is just for your own reference.
|
|
9413
9677
|
* @maxLength 40
|
|
@@ -9416,13 +9680,19 @@ export interface ImportTwilioPhoneNumberDTO {
|
|
|
9416
9680
|
/**
|
|
9417
9681
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
9418
9682
|
*
|
|
9419
|
-
* If neither `assistantId` nor `
|
|
9683
|
+
* If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
9420
9684
|
*/
|
|
9421
9685
|
assistantId?: string;
|
|
9686
|
+
/**
|
|
9687
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
9688
|
+
*
|
|
9689
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
9690
|
+
*/
|
|
9691
|
+
workflowId?: string;
|
|
9422
9692
|
/**
|
|
9423
9693
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
9424
9694
|
*
|
|
9425
|
-
* If neither `assistantId` nor `
|
|
9695
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
9426
9696
|
*/
|
|
9427
9697
|
squadId?: string;
|
|
9428
9698
|
/**
|
|
@@ -9504,6 +9774,7 @@ export interface Call {
|
|
|
9504
9774
|
| VapiCost
|
|
9505
9775
|
| VoicemailDetectionCost
|
|
9506
9776
|
| AnalysisCost
|
|
9777
|
+
| KnowledgeBaseCost
|
|
9507
9778
|
)[];
|
|
9508
9779
|
messages?: (UserMessage | SystemMessage | BotMessage | ToolCallMessage | ToolCallResultMessage)[];
|
|
9509
9780
|
/**
|
|
@@ -10053,16 +10324,56 @@ export interface Call {
|
|
|
10053
10324
|
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
10054
10325
|
*/
|
|
10055
10326
|
phoneCallProviderId?: string;
|
|
10056
|
-
/**
|
|
10327
|
+
/**
|
|
10328
|
+
* This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead.
|
|
10329
|
+
* Usage:
|
|
10330
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
10331
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
10332
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
10333
|
+
*/
|
|
10057
10334
|
assistantId?: string;
|
|
10058
|
-
/**
|
|
10335
|
+
/**
|
|
10336
|
+
* This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.
|
|
10337
|
+
* Usage:
|
|
10338
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
10339
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
10340
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
10341
|
+
*/
|
|
10059
10342
|
assistant?: CreateAssistantDTO;
|
|
10060
10343
|
/** These are the overrides for the `assistant` or `assistantId`'s settings and template variables. */
|
|
10061
10344
|
assistantOverrides?: AssistantOverrides;
|
|
10062
|
-
/**
|
|
10345
|
+
/**
|
|
10346
|
+
* This is the squad that will be used for the call. To use a transient squad, use `squad` instead.
|
|
10347
|
+
* Usage:
|
|
10348
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
10349
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
10350
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
10351
|
+
*/
|
|
10063
10352
|
squadId?: string;
|
|
10064
|
-
/**
|
|
10353
|
+
/**
|
|
10354
|
+
* This is a squad that will be used for the call. To use an existing squad, use `squadId` instead.
|
|
10355
|
+
* Usage:
|
|
10356
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
10357
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
10358
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
10359
|
+
*/
|
|
10065
10360
|
squad?: CreateSquadDTO;
|
|
10361
|
+
/**
|
|
10362
|
+
* This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead.
|
|
10363
|
+
* Usage:
|
|
10364
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
10365
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
10366
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
10367
|
+
*/
|
|
10368
|
+
workflowId?: string;
|
|
10369
|
+
/**
|
|
10370
|
+
* This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead.
|
|
10371
|
+
* Usage:
|
|
10372
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
10373
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
10374
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
10375
|
+
*/
|
|
10376
|
+
workflow?: CreateWorkflowDTO;
|
|
10066
10377
|
/**
|
|
10067
10378
|
* This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.
|
|
10068
10379
|
*
|
|
@@ -10126,18 +10437,58 @@ export interface CreateCallDTO {
|
|
|
10126
10437
|
schedulePlan?: SchedulePlan;
|
|
10127
10438
|
/** This is the transport of the call. */
|
|
10128
10439
|
transport?: object;
|
|
10129
|
-
/**
|
|
10440
|
+
/**
|
|
10441
|
+
* This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead.
|
|
10442
|
+
* Usage:
|
|
10443
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
10444
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
10445
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
10446
|
+
*/
|
|
10130
10447
|
assistantId?: string;
|
|
10131
|
-
/**
|
|
10448
|
+
/**
|
|
10449
|
+
* This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.
|
|
10450
|
+
* Usage:
|
|
10451
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
10452
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
10453
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
10454
|
+
*/
|
|
10132
10455
|
assistant?: CreateAssistantDTO;
|
|
10133
10456
|
/** These are the overrides for the `assistant` or `assistantId`'s settings and template variables. */
|
|
10134
10457
|
assistantOverrides?: AssistantOverrides;
|
|
10135
|
-
/**
|
|
10458
|
+
/**
|
|
10459
|
+
* This is the squad that will be used for the call. To use a transient squad, use `squad` instead.
|
|
10460
|
+
* Usage:
|
|
10461
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
10462
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
10463
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
10464
|
+
*/
|
|
10136
10465
|
squadId?: string;
|
|
10137
|
-
/** This is a squad that will be used for the call. To use an existing squad, use `squadId` instead. */
|
|
10138
|
-
squad?: CreateSquadDTO;
|
|
10139
10466
|
/**
|
|
10140
|
-
* This is
|
|
10467
|
+
* This is a squad that will be used for the call. To use an existing squad, use `squadId` instead.
|
|
10468
|
+
* Usage:
|
|
10469
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
10470
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
10471
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
10472
|
+
*/
|
|
10473
|
+
squad?: CreateSquadDTO;
|
|
10474
|
+
/**
|
|
10475
|
+
* This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead.
|
|
10476
|
+
* Usage:
|
|
10477
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
10478
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
10479
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
10480
|
+
*/
|
|
10481
|
+
workflowId?: string;
|
|
10482
|
+
/**
|
|
10483
|
+
* This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead.
|
|
10484
|
+
* Usage:
|
|
10485
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
10486
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
10487
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
10488
|
+
*/
|
|
10489
|
+
workflow?: CreateWorkflowDTO;
|
|
10490
|
+
/**
|
|
10491
|
+
* This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.
|
|
10141
10492
|
*
|
|
10142
10493
|
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
10143
10494
|
*/
|
|
@@ -10189,16 +10540,56 @@ export interface CreateOutboundCallDTO {
|
|
|
10189
10540
|
schedulePlan?: SchedulePlan;
|
|
10190
10541
|
/** This is the transport of the call. */
|
|
10191
10542
|
transport?: object;
|
|
10192
|
-
/**
|
|
10543
|
+
/**
|
|
10544
|
+
* This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead.
|
|
10545
|
+
* Usage:
|
|
10546
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
10547
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
10548
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
10549
|
+
*/
|
|
10193
10550
|
assistantId?: string;
|
|
10194
|
-
/**
|
|
10551
|
+
/**
|
|
10552
|
+
* This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.
|
|
10553
|
+
* Usage:
|
|
10554
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
10555
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
10556
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
10557
|
+
*/
|
|
10195
10558
|
assistant?: CreateAssistantDTO;
|
|
10196
10559
|
/** These are the overrides for the `assistant` or `assistantId`'s settings and template variables. */
|
|
10197
10560
|
assistantOverrides?: AssistantOverrides;
|
|
10198
|
-
/**
|
|
10561
|
+
/**
|
|
10562
|
+
* This is the squad that will be used for the call. To use a transient squad, use `squad` instead.
|
|
10563
|
+
* Usage:
|
|
10564
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
10565
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
10566
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
10567
|
+
*/
|
|
10199
10568
|
squadId?: string;
|
|
10200
|
-
/**
|
|
10569
|
+
/**
|
|
10570
|
+
* This is a squad that will be used for the call. To use an existing squad, use `squadId` instead.
|
|
10571
|
+
* Usage:
|
|
10572
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
10573
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
10574
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
10575
|
+
*/
|
|
10201
10576
|
squad?: CreateSquadDTO;
|
|
10577
|
+
/**
|
|
10578
|
+
* This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead.
|
|
10579
|
+
* Usage:
|
|
10580
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
10581
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
10582
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
10583
|
+
*/
|
|
10584
|
+
workflowId?: string;
|
|
10585
|
+
/**
|
|
10586
|
+
* This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead.
|
|
10587
|
+
* Usage:
|
|
10588
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
10589
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
10590
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
10591
|
+
*/
|
|
10592
|
+
workflow?: CreateWorkflowDTO;
|
|
10202
10593
|
/**
|
|
10203
10594
|
* This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.
|
|
10204
10595
|
*
|
|
@@ -10218,599 +10609,94 @@ export interface CreateOutboundCallDTO {
|
|
|
10218
10609
|
*/
|
|
10219
10610
|
customerId?: string;
|
|
10220
10611
|
/**
|
|
10221
|
-
* This is the customer that will be called. To call an existing customer, use `customerId` instead.
|
|
10222
|
-
*
|
|
10223
|
-
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
10224
|
-
*/
|
|
10225
|
-
customer?: CreateCustomerDTO;
|
|
10226
|
-
}
|
|
10227
|
-
|
|
10228
|
-
export interface CreateWebCallDTO {
|
|
10229
|
-
/** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
|
|
10230
|
-
assistantId?: string;
|
|
10231
|
-
/** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
|
|
10232
|
-
assistant?: CreateAssistantDTO;
|
|
10233
|
-
/** These are the overrides for the `assistant` or `assistantId`'s settings and template variables. */
|
|
10234
|
-
assistantOverrides?: AssistantOverrides;
|
|
10235
|
-
/** This is the squad that will be used for the call. To use a transient squad, use `squad` instead. */
|
|
10236
|
-
squadId?: string;
|
|
10237
|
-
/** This is a squad that will be used for the call. To use an existing squad, use `squadId` instead. */
|
|
10238
|
-
squad?: CreateSquadDTO;
|
|
10239
|
-
}
|
|
10240
|
-
|
|
10241
|
-
export interface UpdateCallDTO {
|
|
10242
|
-
/**
|
|
10243
|
-
* This is the name of the call. This is just for your own reference.
|
|
10244
|
-
* @maxLength 40
|
|
10245
|
-
*/
|
|
10246
|
-
name?: string;
|
|
10247
|
-
}
|
|
10248
|
-
|
|
10249
|
-
export type ChatServiceResponse = object;
|
|
10250
|
-
|
|
10251
|
-
export interface ChatCompletionMessageMetadata {
|
|
10252
|
-
taskName: string;
|
|
10253
|
-
taskType: string;
|
|
10254
|
-
taskOutput: string;
|
|
10255
|
-
taskState?: object;
|
|
10256
|
-
nodeTrace?: string[];
|
|
10257
|
-
}
|
|
10258
|
-
|
|
10259
|
-
export interface ChatCompletionMessageWorkflows {
|
|
10260
|
-
role: object;
|
|
10261
|
-
content: string | null;
|
|
10262
|
-
metadata?: ChatCompletionMessageMetadata;
|
|
10263
|
-
}
|
|
10264
|
-
|
|
10265
|
-
export interface Say {
|
|
10266
|
-
type: 'say';
|
|
10267
|
-
/** @maxLength 1000 */
|
|
10268
|
-
exact?: string;
|
|
10269
|
-
/** @maxLength 1000 */
|
|
10270
|
-
prompt?: string;
|
|
10271
|
-
/** @maxLength 80 */
|
|
10272
|
-
name: string;
|
|
10273
|
-
/** This is for metadata you want to store on the task. */
|
|
10274
|
-
metadata?: object;
|
|
10275
|
-
}
|
|
10276
|
-
|
|
10277
|
-
export interface SayHook {
|
|
10278
|
-
type: 'say';
|
|
10279
|
-
/** This is for metadata you want to store on the task. */
|
|
10280
|
-
metadata?: object;
|
|
10281
|
-
/** @maxLength 1000 */
|
|
10282
|
-
exact?: string;
|
|
10283
|
-
/** @maxLength 1000 */
|
|
10284
|
-
prompt?: string;
|
|
10285
|
-
}
|
|
10286
|
-
|
|
10287
|
-
export interface Hook {
|
|
10288
|
-
/** @maxLength 80 */
|
|
10289
|
-
on: 'task.start' | 'task.output.confirmation' | 'task.delayed';
|
|
10290
|
-
do: SayHook[];
|
|
10291
|
-
}
|
|
10292
|
-
|
|
10293
|
-
export interface Gather {
|
|
10294
|
-
type: 'gather';
|
|
10295
|
-
output: JsonSchema;
|
|
10296
|
-
/** This is whether or not the workflow should read back the gathered data to the user, and ask about its correctness. */
|
|
10297
|
-
confirmContent?: boolean;
|
|
10298
|
-
/**
|
|
10299
|
-
* This is a list of hooks for a task.
|
|
10300
|
-
* Each hook is a list of tasks to run on a trigger (such as on start, on failure, etc).
|
|
10301
|
-
* Only Say is supported for now.
|
|
10302
|
-
*/
|
|
10303
|
-
hooks?: Hook[];
|
|
10304
|
-
/** This is the number of times we should try to gather the information from the user before we failover to the fail path. An example of this would be a user refusing to give their phone number for privacy reasons, and then going down a different path on account of this */
|
|
10305
|
-
maxRetries?: number;
|
|
10306
|
-
/** This is a liquid templating string. On the first call to Gather, the template will be filled out with variables from the context, and will be spoken verbatim to the user. An example would be "Base on your zipcode, it looks like you could be in one of these counties: {{ counties | join: ", " }}. Which one do you live in?" */
|
|
10307
|
-
literalTemplate?: string;
|
|
10308
|
-
/** @maxLength 80 */
|
|
10309
|
-
name: string;
|
|
10310
|
-
/** This is for metadata you want to store on the task. */
|
|
10311
|
-
metadata?: object;
|
|
10312
|
-
}
|
|
10313
|
-
|
|
10314
|
-
export interface ApiRequest {
|
|
10315
|
-
type: 'apiRequest';
|
|
10316
|
-
method: 'POST' | 'GET';
|
|
10317
|
-
/** Api endpoint to send requests to. */
|
|
10318
|
-
url: string;
|
|
10319
|
-
/**
|
|
10320
|
-
* These are the custom headers to include in the Api Request sent.
|
|
10321
|
-
*
|
|
10322
|
-
* Each key-value pair represents a header name and its value.
|
|
10323
|
-
*/
|
|
10324
|
-
headers?: JsonSchema;
|
|
10325
|
-
/**
|
|
10326
|
-
* This defined the JSON body of your Api Request. For example, if `body_schema`
|
|
10327
|
-
* included "my_field": "my_gather_statement.user_age", then the json body sent to the server would have that particular value assign to it.
|
|
10328
|
-
* Right now, only data from gather statements are supported.
|
|
10329
|
-
*/
|
|
10330
|
-
body?: JsonSchema;
|
|
10331
|
-
/**
|
|
10332
|
-
* This is the mode of the Api Request.
|
|
10333
|
-
* We only support BLOCKING and BACKGROUND for now.
|
|
10334
|
-
*/
|
|
10335
|
-
mode: 'blocking' | 'background';
|
|
10336
|
-
/**
|
|
10337
|
-
* This is a list of hooks for a task.
|
|
10338
|
-
* Each hook is a list of tasks to run on a trigger (such as on start, on failure, etc).
|
|
10339
|
-
* Only Say is supported for now.
|
|
10340
|
-
*/
|
|
10341
|
-
hooks?: Hook[];
|
|
10342
|
-
/** This is the schema for the outputs of the Api Request. */
|
|
10343
|
-
output?: JsonSchema;
|
|
10344
|
-
/** @maxLength 80 */
|
|
10345
|
-
name: string;
|
|
10346
|
-
/** This is for metadata you want to store on the task. */
|
|
10347
|
-
metadata?: object;
|
|
10348
|
-
}
|
|
10349
|
-
|
|
10350
|
-
export interface Hangup {
|
|
10351
|
-
type: 'hangup';
|
|
10352
|
-
/** @maxLength 80 */
|
|
10353
|
-
name: string;
|
|
10354
|
-
/** This is for metadata you want to store on the task. */
|
|
10355
|
-
metadata?: object;
|
|
10356
|
-
}
|
|
10357
|
-
|
|
10358
|
-
export interface Transfer {
|
|
10359
|
-
type: 'transfer';
|
|
10360
|
-
destination: object;
|
|
10361
|
-
/** @maxLength 80 */
|
|
10362
|
-
name: string;
|
|
10363
|
-
/** This is for metadata you want to store on the task. */
|
|
10364
|
-
metadata?: object;
|
|
10365
|
-
}
|
|
10366
|
-
|
|
10367
|
-
export interface CreateWorkflowDTO {
|
|
10368
|
-
nodes: (Say | Gather | ApiRequest | Hangup | Transfer)[];
|
|
10369
|
-
/** These are the options for the workflow's LLM. */
|
|
10370
|
-
model?:
|
|
10371
|
-
| AnthropicModel
|
|
10372
|
-
| AnyscaleModel
|
|
10373
|
-
| CerebrasModel
|
|
10374
|
-
| CustomLLMModel
|
|
10375
|
-
| DeepInfraModel
|
|
10376
|
-
| DeepSeekModel
|
|
10377
|
-
| GoogleModel
|
|
10378
|
-
| GroqModel
|
|
10379
|
-
| InflectionAIModel
|
|
10380
|
-
| OpenAIModel
|
|
10381
|
-
| OpenRouterModel
|
|
10382
|
-
| PerplexityAIModel
|
|
10383
|
-
| TogetherAIModel
|
|
10384
|
-
| XaiModel;
|
|
10385
|
-
/** @maxLength 80 */
|
|
10386
|
-
name: string;
|
|
10387
|
-
edges: Edge[];
|
|
10388
|
-
}
|
|
10389
|
-
|
|
10390
|
-
export interface ChatCompletionsDTO {
|
|
10391
|
-
messages: ChatCompletionMessageWorkflows[];
|
|
10392
|
-
workflowId?: string;
|
|
10393
|
-
workflow?: CreateWorkflowDTO;
|
|
10394
|
-
}
|
|
10395
|
-
|
|
10396
|
-
export interface Assistant {
|
|
10397
|
-
/** These are the options for the assistant's transcriber. */
|
|
10398
|
-
transcriber?:
|
|
10399
|
-
| AssemblyAITranscriber
|
|
10400
|
-
| AzureSpeechTranscriber
|
|
10401
|
-
| CustomTranscriber
|
|
10402
|
-
| DeepgramTranscriber
|
|
10403
|
-
| ElevenLabsTranscriber
|
|
10404
|
-
| GladiaTranscriber
|
|
10405
|
-
| SpeechmaticsTranscriber
|
|
10406
|
-
| TalkscriberTranscriber
|
|
10407
|
-
| GoogleTranscriber
|
|
10408
|
-
| OpenAITranscriber;
|
|
10409
|
-
/** These are the options for the assistant's LLM. */
|
|
10410
|
-
model?:
|
|
10411
|
-
| AnyscaleModel
|
|
10412
|
-
| AnthropicModel
|
|
10413
|
-
| CerebrasModel
|
|
10414
|
-
| CustomLLMModel
|
|
10415
|
-
| DeepInfraModel
|
|
10416
|
-
| DeepSeekModel
|
|
10417
|
-
| GoogleModel
|
|
10418
|
-
| GroqModel
|
|
10419
|
-
| InflectionAIModel
|
|
10420
|
-
| OpenAIModel
|
|
10421
|
-
| OpenRouterModel
|
|
10422
|
-
| PerplexityAIModel
|
|
10423
|
-
| TogetherAIModel
|
|
10424
|
-
| VapiModel
|
|
10425
|
-
| XaiModel;
|
|
10426
|
-
/**
|
|
10427
|
-
* These are the options for the assistant's voice.
|
|
10428
|
-
* @default {"provider":"playht","voiceId":"jennifer"}
|
|
10429
|
-
*/
|
|
10430
|
-
voice?:
|
|
10431
|
-
| AzureVoice
|
|
10432
|
-
| CartesiaVoice
|
|
10433
|
-
| CustomVoice
|
|
10434
|
-
| DeepgramVoice
|
|
10435
|
-
| ElevenLabsVoice
|
|
10436
|
-
| HumeVoice
|
|
10437
|
-
| LMNTVoice
|
|
10438
|
-
| NeuphonicVoice
|
|
10439
|
-
| OpenAIVoice
|
|
10440
|
-
| PlayHTVoice
|
|
10441
|
-
| RimeAIVoice
|
|
10442
|
-
| SmallestAIVoice
|
|
10443
|
-
| TavusVoice
|
|
10444
|
-
| VapiVoice;
|
|
10445
|
-
/**
|
|
10446
|
-
* This is the first message that the assistant will say. This can also be a URL to a containerized audio file (mp3, wav, etc.).
|
|
10447
|
-
*
|
|
10448
|
-
* If unspecified, assistant will wait for user to speak and use the model to respond once they speak.
|
|
10449
|
-
* @example "Hello! How can I help you today?"
|
|
10450
|
-
*/
|
|
10451
|
-
firstMessage?: string;
|
|
10452
|
-
/** @default false */
|
|
10453
|
-
firstMessageInterruptionsEnabled?: boolean;
|
|
10454
|
-
/**
|
|
10455
|
-
* This is the mode for the first message. Default is 'assistant-speaks-first'.
|
|
10456
|
-
*
|
|
10457
|
-
* Use:
|
|
10458
|
-
* - 'assistant-speaks-first' to have the assistant speak first.
|
|
10459
|
-
* - 'assistant-waits-for-user' to have the assistant wait for the user to speak first.
|
|
10460
|
-
* - 'assistant-speaks-first-with-model-generated-message' to have the assistant speak first with a message generated by the model based on the conversation state. (`assistant.model.messages` at call start, `call.messages` at squad transfer points).
|
|
10461
|
-
*
|
|
10462
|
-
* @default 'assistant-speaks-first'
|
|
10463
|
-
* @example "assistant-speaks-first"
|
|
10464
|
-
*/
|
|
10465
|
-
firstMessageMode?:
|
|
10466
|
-
| 'assistant-speaks-first'
|
|
10467
|
-
| 'assistant-speaks-first-with-model-generated-message'
|
|
10468
|
-
| 'assistant-waits-for-user';
|
|
10469
|
-
/**
|
|
10470
|
-
* These are the settings to configure or disable voicemail detection. Alternatively, voicemail detection can be configured using the model.tools=[VoicemailTool].
|
|
10471
|
-
* This uses Twilio's built-in detection while the VoicemailTool relies on the model to detect if a voicemail was reached.
|
|
10472
|
-
* You can use neither of them, one of them, or both of them. By default, Twilio built-in detection is enabled while VoicemailTool is not.
|
|
10473
|
-
*/
|
|
10474
|
-
voicemailDetection?:
|
|
10475
|
-
| GoogleVoicemailDetectionPlan
|
|
10476
|
-
| OpenAIVoicemailDetectionPlan
|
|
10477
|
-
| TwilioVoicemailDetectionPlan;
|
|
10478
|
-
/**
|
|
10479
|
-
* These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transfer-update,transcript,tool-calls,user-interrupted,voice-input,workflow.node.started. You can check the shape of the messages in ClientMessage schema.
|
|
10480
|
-
* @example ["conversation-update","function-call","hang","model-output","speech-update","status-update","transfer-update","transcript","tool-calls","user-interrupted","voice-input","workflow.node.started"]
|
|
10481
|
-
*/
|
|
10482
|
-
clientMessages?:
|
|
10483
|
-
| 'conversation-update'
|
|
10484
|
-
| 'function-call'
|
|
10485
|
-
| 'function-call-result'
|
|
10486
|
-
| 'hang'
|
|
10487
|
-
| 'language-changed'
|
|
10488
|
-
| 'metadata'
|
|
10489
|
-
| 'model-output'
|
|
10490
|
-
| 'speech-update'
|
|
10491
|
-
| 'status-update'
|
|
10492
|
-
| 'transcript'
|
|
10493
|
-
| 'tool-calls'
|
|
10494
|
-
| 'tool-calls-result'
|
|
10495
|
-
| 'tool.completed'
|
|
10496
|
-
| 'transfer-update'
|
|
10497
|
-
| 'user-interrupted'
|
|
10498
|
-
| 'voice-input'
|
|
10499
|
-
| 'workflow.node.started';
|
|
10500
|
-
/**
|
|
10501
|
-
* These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,user-interrupted. You can check the shape of the messages in ServerMessage schema.
|
|
10502
|
-
* @example ["conversation-update","end-of-call-report","function-call","hang","speech-update","status-update","tool-calls","transfer-destination-request","user-interrupted"]
|
|
10503
|
-
*/
|
|
10504
|
-
serverMessages?:
|
|
10505
|
-
| 'conversation-update'
|
|
10506
|
-
| 'end-of-call-report'
|
|
10507
|
-
| 'function-call'
|
|
10508
|
-
| 'hang'
|
|
10509
|
-
| 'language-changed'
|
|
10510
|
-
| 'language-change-detected'
|
|
10511
|
-
| 'model-output'
|
|
10512
|
-
| 'phone-call-control'
|
|
10513
|
-
| 'speech-update'
|
|
10514
|
-
| 'status-update'
|
|
10515
|
-
| 'transcript'
|
|
10516
|
-
| "transcript[transcriptType='final']"
|
|
10517
|
-
| 'tool-calls'
|
|
10518
|
-
| 'transfer-destination-request'
|
|
10519
|
-
| 'transfer-update'
|
|
10520
|
-
| 'user-interrupted'
|
|
10521
|
-
| 'voice-input';
|
|
10522
|
-
/**
|
|
10523
|
-
* How many seconds of silence to wait before ending the call. Defaults to 30.
|
|
10524
|
-
*
|
|
10525
|
-
* @default 30
|
|
10526
|
-
* @min 10
|
|
10527
|
-
* @max 3600
|
|
10528
|
-
* @example 30
|
|
10529
|
-
*/
|
|
10530
|
-
silenceTimeoutSeconds?: number;
|
|
10531
|
-
/**
|
|
10532
|
-
* This is the maximum number of seconds that the call will last. When the call reaches this duration, it will be ended.
|
|
10533
|
-
*
|
|
10534
|
-
* @default 600 (10 minutes)
|
|
10535
|
-
* @min 10
|
|
10536
|
-
* @max 43200
|
|
10537
|
-
* @example 600
|
|
10538
|
-
*/
|
|
10539
|
-
maxDurationSeconds?: number;
|
|
10540
|
-
/**
|
|
10541
|
-
* This is the background sound in the call. Default for phone calls is 'office' and default for web calls is 'off'.
|
|
10542
|
-
* You can also provide a custom sound by providing a URL to an audio file.
|
|
10543
|
-
* @maxLength 1000
|
|
10544
|
-
*/
|
|
10545
|
-
backgroundSound?: 'off' | 'office' | string;
|
|
10546
|
-
/**
|
|
10547
|
-
* This enables filtering of noise and background speech while the user is talking.
|
|
10548
|
-
*
|
|
10549
|
-
* Default `false` while in beta.
|
|
10550
|
-
*
|
|
10551
|
-
* @default false
|
|
10552
|
-
* @example false
|
|
10553
|
-
*/
|
|
10554
|
-
backgroundDenoisingEnabled?: boolean;
|
|
10555
|
-
/**
|
|
10556
|
-
* This determines whether the model's output is used in conversation history rather than the transcription of assistant's speech.
|
|
10557
|
-
*
|
|
10558
|
-
* Default `false` while in beta.
|
|
10559
|
-
*
|
|
10560
|
-
* @default false
|
|
10561
|
-
* @example false
|
|
10562
|
-
*/
|
|
10563
|
-
modelOutputInMessagesEnabled?: boolean;
|
|
10564
|
-
/** These are the configurations to be passed to the transport providers of assistant's calls, like Twilio. You can store multiple configurations for different transport providers. For a call, only the configuration matching the call transport provider is used. */
|
|
10565
|
-
transportConfigurations?: TransportConfigurationTwilio[];
|
|
10566
|
-
/**
|
|
10567
|
-
* This is the plan for observability configuration of assistant's calls.
|
|
10568
|
-
* Currently supports Langfuse for tracing and monitoring.
|
|
10569
|
-
*/
|
|
10570
|
-
observabilityPlan?: LangfuseObservabilityPlan;
|
|
10571
|
-
/** These are dynamic credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can supplement an additional credentials using this. Dynamic credentials override existing credentials. */
|
|
10572
|
-
credentials?: (
|
|
10573
|
-
| ({
|
|
10574
|
-
provider: '11labs';
|
|
10575
|
-
} & CreateElevenLabsCredentialDTO)
|
|
10576
|
-
| ({
|
|
10577
|
-
provider: 'anthropic';
|
|
10578
|
-
} & CreateAnthropicCredentialDTO)
|
|
10579
|
-
| ({
|
|
10580
|
-
provider: 'anyscale';
|
|
10581
|
-
} & CreateAnyscaleCredentialDTO)
|
|
10582
|
-
| ({
|
|
10583
|
-
provider: 'assembly-ai';
|
|
10584
|
-
} & CreateAssemblyAICredentialDTO)
|
|
10585
|
-
| ({
|
|
10586
|
-
provider: 'azure-openai';
|
|
10587
|
-
} & CreateAzureOpenAICredentialDTO)
|
|
10588
|
-
| ({
|
|
10589
|
-
provider: 'azure';
|
|
10590
|
-
} & CreateAzureCredentialDTO)
|
|
10591
|
-
| ({
|
|
10592
|
-
provider: 'byo-sip-trunk';
|
|
10593
|
-
} & CreateByoSipTrunkCredentialDTO)
|
|
10594
|
-
| ({
|
|
10595
|
-
provider: 'cartesia';
|
|
10596
|
-
} & CreateCartesiaCredentialDTO)
|
|
10597
|
-
| ({
|
|
10598
|
-
provider: 'cerebras';
|
|
10599
|
-
} & CreateCerebrasCredentialDTO)
|
|
10600
|
-
| ({
|
|
10601
|
-
provider: 'cloudflare';
|
|
10602
|
-
} & CreateCloudflareCredentialDTO)
|
|
10603
|
-
| ({
|
|
10604
|
-
provider: 'custom-llm';
|
|
10605
|
-
} & CreateCustomLLMCredentialDTO)
|
|
10606
|
-
| ({
|
|
10607
|
-
provider: 'deepgram';
|
|
10608
|
-
} & CreateDeepgramCredentialDTO)
|
|
10609
|
-
| ({
|
|
10610
|
-
provider: 'deepinfra';
|
|
10611
|
-
} & CreateDeepInfraCredentialDTO)
|
|
10612
|
-
| ({
|
|
10613
|
-
provider: 'deep-seek';
|
|
10614
|
-
} & CreateDeepSeekCredentialDTO)
|
|
10615
|
-
| ({
|
|
10616
|
-
provider: 'gcp';
|
|
10617
|
-
} & CreateGcpCredentialDTO)
|
|
10618
|
-
| ({
|
|
10619
|
-
provider: 'gladia';
|
|
10620
|
-
} & CreateGladiaCredentialDTO)
|
|
10621
|
-
| ({
|
|
10622
|
-
provider: 'gohighlevel';
|
|
10623
|
-
} & CreateGoHighLevelCredentialDTO)
|
|
10624
|
-
| ({
|
|
10625
|
-
provider: 'google';
|
|
10626
|
-
} & CreateGoogleCredentialDTO)
|
|
10627
|
-
| ({
|
|
10628
|
-
provider: 'groq';
|
|
10629
|
-
} & CreateGroqCredentialDTO)
|
|
10630
|
-
| ({
|
|
10631
|
-
provider: 'inflection-ai';
|
|
10632
|
-
} & CreateInflectionAICredentialDTO)
|
|
10633
|
-
| ({
|
|
10634
|
-
provider: 'langfuse';
|
|
10635
|
-
} & CreateLangfuseCredentialDTO)
|
|
10636
|
-
| ({
|
|
10637
|
-
provider: 'lmnt';
|
|
10638
|
-
} & CreateLmntCredentialDTO)
|
|
10639
|
-
| ({
|
|
10640
|
-
provider: 'make';
|
|
10641
|
-
} & CreateMakeCredentialDTO)
|
|
10642
|
-
| ({
|
|
10643
|
-
provider: 'openai';
|
|
10644
|
-
} & CreateOpenAICredentialDTO)
|
|
10645
|
-
| ({
|
|
10646
|
-
provider: 'openrouter';
|
|
10647
|
-
} & CreateOpenRouterCredentialDTO)
|
|
10648
|
-
| ({
|
|
10649
|
-
provider: 'perplexity-ai';
|
|
10650
|
-
} & CreatePerplexityAICredentialDTO)
|
|
10651
|
-
| ({
|
|
10652
|
-
provider: 'playht';
|
|
10653
|
-
} & CreatePlayHTCredentialDTO)
|
|
10654
|
-
| ({
|
|
10655
|
-
provider: 'rime-ai';
|
|
10656
|
-
} & CreateRimeAICredentialDTO)
|
|
10657
|
-
| ({
|
|
10658
|
-
provider: 'runpod';
|
|
10659
|
-
} & CreateRunpodCredentialDTO)
|
|
10660
|
-
| ({
|
|
10661
|
-
provider: 's3';
|
|
10662
|
-
} & CreateS3CredentialDTO)
|
|
10663
|
-
| ({
|
|
10664
|
-
provider: 'supabase';
|
|
10665
|
-
} & CreateSupabaseCredentialDTO)
|
|
10666
|
-
| ({
|
|
10667
|
-
provider: 'smallest-ai';
|
|
10668
|
-
} & CreateSmallestAICredentialDTO)
|
|
10669
|
-
| ({
|
|
10670
|
-
provider: 'tavus';
|
|
10671
|
-
} & CreateTavusCredentialDTO)
|
|
10672
|
-
| ({
|
|
10673
|
-
provider: 'together-ai';
|
|
10674
|
-
} & CreateTogetherAICredentialDTO)
|
|
10675
|
-
| ({
|
|
10676
|
-
provider: 'twilio';
|
|
10677
|
-
} & CreateTwilioCredentialDTO)
|
|
10678
|
-
| ({
|
|
10679
|
-
provider: 'vonage';
|
|
10680
|
-
} & CreateVonageCredentialDTO)
|
|
10681
|
-
| ({
|
|
10682
|
-
provider: 'webhook';
|
|
10683
|
-
} & CreateWebhookCredentialDTO)
|
|
10684
|
-
| ({
|
|
10685
|
-
provider: 'xai';
|
|
10686
|
-
} & CreateXAiCredentialDTO)
|
|
10687
|
-
| ({
|
|
10688
|
-
provider: 'neuphonic';
|
|
10689
|
-
} & CreateNeuphonicCredentialDTO)
|
|
10690
|
-
| ({
|
|
10691
|
-
provider: 'hume';
|
|
10692
|
-
} & CreateHumeCredentialDTO)
|
|
10693
|
-
| ({
|
|
10694
|
-
provider: 'mistral';
|
|
10695
|
-
} & CreateMistralCredentialDTO)
|
|
10696
|
-
| ({
|
|
10697
|
-
provider: 'speechmatics';
|
|
10698
|
-
} & CreateSpeechmaticsCredentialDTO)
|
|
10699
|
-
| ({
|
|
10700
|
-
provider: 'trieve';
|
|
10701
|
-
} & CreateTrieveCredentialDTO)
|
|
10702
|
-
| ({
|
|
10703
|
-
provider: 'google.calendar.oauth2-client';
|
|
10704
|
-
} & CreateGoogleCalendarOAuth2ClientCredentialDTO)
|
|
10705
|
-
| ({
|
|
10706
|
-
provider: 'google.calendar.oauth2-authorization';
|
|
10707
|
-
} & CreateGoogleCalendarOAuth2AuthorizationCredentialDTO)
|
|
10708
|
-
| ({
|
|
10709
|
-
provider: 'google.sheets.oauth2-authorization';
|
|
10710
|
-
} & CreateGoogleSheetsOAuth2AuthorizationCredentialDTO)
|
|
10711
|
-
| ({
|
|
10712
|
-
provider: 'slack.oauth2-authorization';
|
|
10713
|
-
} & CreateSlackOAuth2AuthorizationCredentialDTO)
|
|
10714
|
-
)[];
|
|
10715
|
-
/**
|
|
10716
|
-
* This is the name of the assistant.
|
|
10717
|
-
*
|
|
10718
|
-
* This is required when you want to transfer between assistants in a call.
|
|
10719
|
-
* @maxLength 40
|
|
10720
|
-
*/
|
|
10721
|
-
name?: string;
|
|
10722
|
-
/**
|
|
10723
|
-
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
10724
|
-
*
|
|
10725
|
-
* If unspecified, it will hang up.
|
|
10726
|
-
* @maxLength 1000
|
|
10727
|
-
*/
|
|
10728
|
-
voicemailMessage?: string;
|
|
10729
|
-
/**
|
|
10730
|
-
* This is the message that the assistant will say if it ends the call.
|
|
10731
|
-
*
|
|
10732
|
-
* If unspecified, it will hang up without saying anything.
|
|
10733
|
-
* @maxLength 1000
|
|
10734
|
-
*/
|
|
10735
|
-
endCallMessage?: string;
|
|
10736
|
-
/** This list contains phrases that, if spoken by the assistant, will trigger the call to be hung up. Case insensitive. */
|
|
10737
|
-
endCallPhrases?: string[];
|
|
10738
|
-
compliancePlan?: CompliancePlan;
|
|
10739
|
-
/** This is for metadata you want to store on the assistant. */
|
|
10740
|
-
metadata?: object;
|
|
10741
|
-
/** This is the plan for analysis of assistant's calls. Stored in `call.analysis`. */
|
|
10742
|
-
analysisPlan?: AnalysisPlan;
|
|
10743
|
-
/**
|
|
10744
|
-
* This is the plan for artifacts generated during assistant's calls. Stored in `call.artifact`.
|
|
10612
|
+
* This is the customer that will be called. To call an existing customer, use `customerId` instead.
|
|
10745
10613
|
*
|
|
10746
|
-
*
|
|
10614
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
10747
10615
|
*/
|
|
10748
|
-
|
|
10616
|
+
customer?: CreateCustomerDTO;
|
|
10617
|
+
}
|
|
10618
|
+
|
|
10619
|
+
export interface CreateWebCallDTO {
|
|
10749
10620
|
/**
|
|
10750
|
-
* This is the
|
|
10751
|
-
*
|
|
10752
|
-
*
|
|
10621
|
+
* This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead.
|
|
10622
|
+
* Usage:
|
|
10623
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
10624
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
10625
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
10753
10626
|
*/
|
|
10754
|
-
|
|
10627
|
+
assistantId?: string;
|
|
10755
10628
|
/**
|
|
10756
|
-
* This is the
|
|
10757
|
-
*
|
|
10758
|
-
*
|
|
10759
|
-
*
|
|
10760
|
-
*
|
|
10761
|
-
* - The assistant is so fast that it's actually interrupting the customer.
|
|
10629
|
+
* This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead.
|
|
10630
|
+
* Usage:
|
|
10631
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
10632
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
10633
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
10762
10634
|
*/
|
|
10763
|
-
|
|
10635
|
+
assistant?: CreateAssistantDTO;
|
|
10636
|
+
/** These are the overrides for the `assistant` or `assistantId`'s settings and template variables. */
|
|
10637
|
+
assistantOverrides?: AssistantOverrides;
|
|
10764
10638
|
/**
|
|
10765
|
-
* This is the
|
|
10766
|
-
*
|
|
10767
|
-
*
|
|
10768
|
-
*
|
|
10769
|
-
*
|
|
10770
|
-
* - The assistant is getting interrupted by phrases that are just acknowledgments.
|
|
10771
|
-
* - The assistant is getting interrupted by background noises.
|
|
10772
|
-
* - The assistant is not properly stopping -- it starts talking right after getting interrupted.
|
|
10639
|
+
* This is the squad that will be used for the call. To use a transient squad, use `squad` instead.
|
|
10640
|
+
* Usage:
|
|
10641
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
10642
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
10643
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
10773
10644
|
*/
|
|
10774
|
-
|
|
10645
|
+
squadId?: string;
|
|
10775
10646
|
/**
|
|
10776
|
-
* This is
|
|
10777
|
-
*
|
|
10647
|
+
* This is a squad that will be used for the call. To use an existing squad, use `squadId` instead.
|
|
10778
10648
|
* Usage:
|
|
10779
|
-
*
|
|
10780
|
-
*
|
|
10781
|
-
*
|
|
10782
|
-
* Note, `serverMessages`, `clientMessages`, `serverUrl` and `serverUrlSecret` are currently at the root level but will be moved to `monitorPlan` in the future. Will remain backwards compatible
|
|
10649
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
10650
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
10651
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
10783
10652
|
*/
|
|
10784
|
-
|
|
10785
|
-
/** These are the credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can provide a subset using this. */
|
|
10786
|
-
credentialIds?: string[];
|
|
10653
|
+
squad?: CreateSquadDTO;
|
|
10787
10654
|
/**
|
|
10788
|
-
* This is
|
|
10789
|
-
*
|
|
10790
|
-
*
|
|
10791
|
-
*
|
|
10792
|
-
*
|
|
10793
|
-
* 2. phoneNumber.serverUrl
|
|
10794
|
-
* 3. org.serverUrl
|
|
10655
|
+
* This is the workflow that will be used for the call. To use a transient workflow, use `workflow` instead.
|
|
10656
|
+
* Usage:
|
|
10657
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
10658
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
10659
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
10795
10660
|
*/
|
|
10796
|
-
|
|
10797
|
-
/** This is a set of actions that will be performed on certain events. */
|
|
10798
|
-
hooks?: AssistantHooks[];
|
|
10799
|
-
keypadInputPlan?: KeypadInputPlan;
|
|
10800
|
-
/** This is the unique identifier for the assistant. */
|
|
10801
|
-
id: string;
|
|
10802
|
-
/** This is the unique identifier for the org that this assistant belongs to. */
|
|
10803
|
-
orgId: string;
|
|
10661
|
+
workflowId?: string;
|
|
10804
10662
|
/**
|
|
10805
|
-
* This is
|
|
10806
|
-
*
|
|
10663
|
+
* This is a workflow that will be used for the call. To use an existing workflow, use `workflowId` instead.
|
|
10664
|
+
* Usage:
|
|
10665
|
+
* To start the call with Assistant as entrypoint, use assistant or assistantId
|
|
10666
|
+
* To start the call with Squad as entrypoint, use squad or squadId
|
|
10667
|
+
* To start the call with Workflow as entrypoint, use workflow or workflowId
|
|
10807
10668
|
*/
|
|
10808
|
-
|
|
10669
|
+
workflow?: CreateWorkflowDTO;
|
|
10670
|
+
}
|
|
10671
|
+
|
|
10672
|
+
export interface UpdateCallDTO {
|
|
10809
10673
|
/**
|
|
10810
|
-
* This is the
|
|
10811
|
-
* @
|
|
10674
|
+
* This is the name of the call. This is just for your own reference.
|
|
10675
|
+
* @maxLength 40
|
|
10812
10676
|
*/
|
|
10813
|
-
|
|
10677
|
+
name?: string;
|
|
10678
|
+
}
|
|
10679
|
+
|
|
10680
|
+
export type ChatServiceResponse = object;
|
|
10681
|
+
|
|
10682
|
+
export interface ChatCompletionMessageMetadata {
|
|
10683
|
+
taskName: string;
|
|
10684
|
+
taskType: string;
|
|
10685
|
+
taskOutput: string;
|
|
10686
|
+
taskState?: object;
|
|
10687
|
+
nodeTrace?: string[];
|
|
10688
|
+
}
|
|
10689
|
+
|
|
10690
|
+
export interface ChatCompletionMessageWorkflows {
|
|
10691
|
+
role: object;
|
|
10692
|
+
content: string | null;
|
|
10693
|
+
metadata?: ChatCompletionMessageMetadata;
|
|
10694
|
+
}
|
|
10695
|
+
|
|
10696
|
+
export interface ChatCompletionsDTO {
|
|
10697
|
+
messages: ChatCompletionMessageWorkflows[];
|
|
10698
|
+
workflowId?: string;
|
|
10699
|
+
workflow?: CreateWorkflowDTO;
|
|
10814
10700
|
}
|
|
10815
10701
|
|
|
10816
10702
|
export interface AssistantPaginatedResponse {
|
|
@@ -10818,6 +10704,12 @@ export interface AssistantPaginatedResponse {
|
|
|
10818
10704
|
metadata: PaginationMeta;
|
|
10819
10705
|
}
|
|
10820
10706
|
|
|
10707
|
+
export interface AssistantVersionPaginatedResponse {
|
|
10708
|
+
results: any[];
|
|
10709
|
+
metadata: PaginationMeta;
|
|
10710
|
+
nextPageState?: string;
|
|
10711
|
+
}
|
|
10712
|
+
|
|
10821
10713
|
export interface UpdateAssistantDTO {
|
|
10822
10714
|
/** These are the options for the assistant's transcriber. */
|
|
10823
10715
|
transcriber?:
|
|
@@ -10899,51 +10791,10 @@ export interface UpdateAssistantDTO {
|
|
|
10899
10791
|
voicemailDetection?:
|
|
10900
10792
|
| GoogleVoicemailDetectionPlan
|
|
10901
10793
|
| OpenAIVoicemailDetectionPlan
|
|
10902
|
-
| TwilioVoicemailDetectionPlan
|
|
10903
|
-
|
|
10904
|
-
|
|
10905
|
-
|
|
10906
|
-
*/
|
|
10907
|
-
clientMessages?:
|
|
10908
|
-
| 'conversation-update'
|
|
10909
|
-
| 'function-call'
|
|
10910
|
-
| 'function-call-result'
|
|
10911
|
-
| 'hang'
|
|
10912
|
-
| 'language-changed'
|
|
10913
|
-
| 'metadata'
|
|
10914
|
-
| 'model-output'
|
|
10915
|
-
| 'speech-update'
|
|
10916
|
-
| 'status-update'
|
|
10917
|
-
| 'transcript'
|
|
10918
|
-
| 'tool-calls'
|
|
10919
|
-
| 'tool-calls-result'
|
|
10920
|
-
| 'tool.completed'
|
|
10921
|
-
| 'transfer-update'
|
|
10922
|
-
| 'user-interrupted'
|
|
10923
|
-
| 'voice-input'
|
|
10924
|
-
| 'workflow.node.started';
|
|
10925
|
-
/**
|
|
10926
|
-
* These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,user-interrupted. You can check the shape of the messages in ServerMessage schema.
|
|
10927
|
-
* @example ["conversation-update","end-of-call-report","function-call","hang","speech-update","status-update","tool-calls","transfer-destination-request","user-interrupted"]
|
|
10928
|
-
*/
|
|
10929
|
-
serverMessages?:
|
|
10930
|
-
| 'conversation-update'
|
|
10931
|
-
| 'end-of-call-report'
|
|
10932
|
-
| 'function-call'
|
|
10933
|
-
| 'hang'
|
|
10934
|
-
| 'language-changed'
|
|
10935
|
-
| 'language-change-detected'
|
|
10936
|
-
| 'model-output'
|
|
10937
|
-
| 'phone-call-control'
|
|
10938
|
-
| 'speech-update'
|
|
10939
|
-
| 'status-update'
|
|
10940
|
-
| 'transcript'
|
|
10941
|
-
| "transcript[transcriptType='final']"
|
|
10942
|
-
| 'tool-calls'
|
|
10943
|
-
| 'transfer-destination-request'
|
|
10944
|
-
| 'transfer-update'
|
|
10945
|
-
| 'user-interrupted'
|
|
10946
|
-
| 'voice-input';
|
|
10794
|
+
| TwilioVoicemailDetectionPlan
|
|
10795
|
+
| VapiVoicemailDetectionPlan;
|
|
10796
|
+
clientMessages: object[][];
|
|
10797
|
+
serverMessages: object[][];
|
|
10947
10798
|
/**
|
|
10948
10799
|
* How many seconds of silence to wait before ending the call. Defaults to 30.
|
|
10949
10800
|
*
|
|
@@ -11137,6 +10988,8 @@ export interface UpdateAssistantDTO {
|
|
|
11137
10988
|
provider: 'slack.oauth2-authorization';
|
|
11138
10989
|
} & CreateSlackOAuth2AuthorizationCredentialDTO)
|
|
11139
10990
|
)[];
|
|
10991
|
+
/** This is a set of actions that will be performed on certain events. */
|
|
10992
|
+
hooks?: AssistantHookCallEnding[];
|
|
11140
10993
|
/**
|
|
11141
10994
|
* This is the name of the assistant.
|
|
11142
10995
|
*
|
|
@@ -11219,8 +11072,6 @@ export interface UpdateAssistantDTO {
|
|
|
11219
11072
|
* 3. org.serverUrl
|
|
11220
11073
|
*/
|
|
11221
11074
|
server?: Server;
|
|
11222
|
-
/** This is a set of actions that will be performed on certain events. */
|
|
11223
|
-
hooks?: AssistantHooks[];
|
|
11224
11075
|
keypadInputPlan?: KeypadInputPlan;
|
|
11225
11076
|
}
|
|
11226
11077
|
|
|
@@ -11275,13 +11126,19 @@ export interface ByoPhoneNumber {
|
|
|
11275
11126
|
/**
|
|
11276
11127
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
11277
11128
|
*
|
|
11278
|
-
* If neither `assistantId` nor `
|
|
11129
|
+
* If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11279
11130
|
*/
|
|
11280
11131
|
assistantId?: string;
|
|
11132
|
+
/**
|
|
11133
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
11134
|
+
*
|
|
11135
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11136
|
+
*/
|
|
11137
|
+
workflowId?: string;
|
|
11281
11138
|
/**
|
|
11282
11139
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
11283
11140
|
*
|
|
11284
|
-
* If neither `assistantId` nor `
|
|
11141
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11285
11142
|
*/
|
|
11286
11143
|
squadId?: string;
|
|
11287
11144
|
/**
|
|
@@ -11322,6 +11179,16 @@ export interface TwilioPhoneNumber {
|
|
|
11322
11179
|
hooks?: PhoneNumberHookCallRinging[];
|
|
11323
11180
|
/** This is to use numbers bought on Twilio. */
|
|
11324
11181
|
provider: 'twilio';
|
|
11182
|
+
/**
|
|
11183
|
+
* Controls whether Vapi sets the messaging webhook URL on the Twilio number during import.
|
|
11184
|
+
*
|
|
11185
|
+
* If set to `false`, Vapi will not update the Twilio messaging URL, leaving it as is.
|
|
11186
|
+
* If `true` or omitted (default), Vapi will configure both the voice and messaging URLs.
|
|
11187
|
+
*
|
|
11188
|
+
* @default true
|
|
11189
|
+
* @default true
|
|
11190
|
+
*/
|
|
11191
|
+
smsEnabled?: boolean;
|
|
11325
11192
|
/** This is the unique identifier for the phone number. */
|
|
11326
11193
|
id: string;
|
|
11327
11194
|
/** This is the unique identifier for the org that this phone number belongs to. */
|
|
@@ -11338,6 +11205,12 @@ export interface TwilioPhoneNumber {
|
|
|
11338
11205
|
updatedAt: string;
|
|
11339
11206
|
/** This is the status of the phone number. */
|
|
11340
11207
|
status?: 'active' | 'activating' | 'blocked';
|
|
11208
|
+
/** This is the Twilio Auth Token for the phone number. */
|
|
11209
|
+
twilioAuthToken?: string;
|
|
11210
|
+
/** This is the Twilio API Key for the phone number. */
|
|
11211
|
+
twilioApiKey?: string;
|
|
11212
|
+
/** This is the Twilio API Secret for the phone number. */
|
|
11213
|
+
twilioApiSecret?: string;
|
|
11341
11214
|
/**
|
|
11342
11215
|
* This is the name of the phone number. This is just for your own reference.
|
|
11343
11216
|
* @maxLength 40
|
|
@@ -11346,13 +11219,19 @@ export interface TwilioPhoneNumber {
|
|
|
11346
11219
|
/**
|
|
11347
11220
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
11348
11221
|
*
|
|
11349
|
-
* If neither `assistantId` nor `
|
|
11222
|
+
* If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11350
11223
|
*/
|
|
11351
11224
|
assistantId?: string;
|
|
11225
|
+
/**
|
|
11226
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
11227
|
+
*
|
|
11228
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11229
|
+
*/
|
|
11230
|
+
workflowId?: string;
|
|
11352
11231
|
/**
|
|
11353
11232
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
11354
11233
|
*
|
|
11355
|
-
* If neither `assistantId` nor `
|
|
11234
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11356
11235
|
*/
|
|
11357
11236
|
squadId?: string;
|
|
11358
11237
|
/**
|
|
@@ -11369,8 +11248,6 @@ export interface TwilioPhoneNumber {
|
|
|
11369
11248
|
number: string;
|
|
11370
11249
|
/** This is the Twilio Account SID for the phone number. */
|
|
11371
11250
|
twilioAccountSid: string;
|
|
11372
|
-
/** This is the Twilio Auth Token for the phone number. */
|
|
11373
|
-
twilioAuthToken: string;
|
|
11374
11251
|
}
|
|
11375
11252
|
|
|
11376
11253
|
export interface VonagePhoneNumber {
|
|
@@ -11411,13 +11288,19 @@ export interface VonagePhoneNumber {
|
|
|
11411
11288
|
/**
|
|
11412
11289
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
11413
11290
|
*
|
|
11414
|
-
* If neither `assistantId` nor `
|
|
11291
|
+
* If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11415
11292
|
*/
|
|
11416
11293
|
assistantId?: string;
|
|
11294
|
+
/**
|
|
11295
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
11296
|
+
*
|
|
11297
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11298
|
+
*/
|
|
11299
|
+
workflowId?: string;
|
|
11417
11300
|
/**
|
|
11418
11301
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
11419
11302
|
*
|
|
11420
|
-
* If neither `assistantId` nor `
|
|
11303
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11421
11304
|
*/
|
|
11422
11305
|
squadId?: string;
|
|
11423
11306
|
/**
|
|
@@ -11493,13 +11376,19 @@ export interface VapiPhoneNumber {
|
|
|
11493
11376
|
/**
|
|
11494
11377
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
11495
11378
|
*
|
|
11496
|
-
* If neither `assistantId` nor `
|
|
11379
|
+
* If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11497
11380
|
*/
|
|
11498
11381
|
assistantId?: string;
|
|
11382
|
+
/**
|
|
11383
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
11384
|
+
*
|
|
11385
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11386
|
+
*/
|
|
11387
|
+
workflowId?: string;
|
|
11499
11388
|
/**
|
|
11500
11389
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
11501
11390
|
*
|
|
11502
|
-
* If neither `assistantId` nor `
|
|
11391
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11503
11392
|
*/
|
|
11504
11393
|
squadId?: string;
|
|
11505
11394
|
/**
|
|
@@ -11570,13 +11459,19 @@ export interface TelnyxPhoneNumber {
|
|
|
11570
11459
|
/**
|
|
11571
11460
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
11572
11461
|
*
|
|
11573
|
-
* If neither `assistantId` nor `
|
|
11462
|
+
* If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11574
11463
|
*/
|
|
11575
11464
|
assistantId?: string;
|
|
11465
|
+
/**
|
|
11466
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
11467
|
+
*
|
|
11468
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11469
|
+
*/
|
|
11470
|
+
workflowId?: string;
|
|
11576
11471
|
/**
|
|
11577
11472
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
11578
11473
|
*
|
|
11579
|
-
* If neither `assistantId` nor `
|
|
11474
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11580
11475
|
*/
|
|
11581
11476
|
squadId?: string;
|
|
11582
11477
|
/**
|
|
@@ -11642,13 +11537,19 @@ export interface CreateByoPhoneNumberDTO {
|
|
|
11642
11537
|
/**
|
|
11643
11538
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
11644
11539
|
*
|
|
11645
|
-
* If neither `assistantId` nor `
|
|
11540
|
+
* If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11646
11541
|
*/
|
|
11647
11542
|
assistantId?: string;
|
|
11543
|
+
/**
|
|
11544
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
11545
|
+
*
|
|
11546
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11547
|
+
*/
|
|
11548
|
+
workflowId?: string;
|
|
11648
11549
|
/**
|
|
11649
11550
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
11650
11551
|
*
|
|
11651
|
-
* If neither `assistantId` nor `
|
|
11552
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11652
11553
|
*/
|
|
11653
11554
|
squadId?: string;
|
|
11654
11555
|
/**
|
|
@@ -11677,12 +11578,26 @@ export interface CreateTwilioPhoneNumberDTO {
|
|
|
11677
11578
|
hooks?: PhoneNumberHookCallRinging[];
|
|
11678
11579
|
/** This is to use numbers bought on Twilio. */
|
|
11679
11580
|
provider: 'twilio';
|
|
11581
|
+
/**
|
|
11582
|
+
* Controls whether Vapi sets the messaging webhook URL on the Twilio number during import.
|
|
11583
|
+
*
|
|
11584
|
+
* If set to `false`, Vapi will not update the Twilio messaging URL, leaving it as is.
|
|
11585
|
+
* If `true` or omitted (default), Vapi will configure both the voice and messaging URLs.
|
|
11586
|
+
*
|
|
11587
|
+
* @default true
|
|
11588
|
+
* @default true
|
|
11589
|
+
*/
|
|
11590
|
+
smsEnabled?: boolean;
|
|
11680
11591
|
/** These are the digits of the phone number you own on your Twilio. */
|
|
11681
11592
|
number: string;
|
|
11682
11593
|
/** This is the Twilio Account SID for the phone number. */
|
|
11683
11594
|
twilioAccountSid: string;
|
|
11684
11595
|
/** This is the Twilio Auth Token for the phone number. */
|
|
11685
|
-
twilioAuthToken
|
|
11596
|
+
twilioAuthToken?: string;
|
|
11597
|
+
/** This is the Twilio API Key for the phone number. */
|
|
11598
|
+
twilioApiKey?: string;
|
|
11599
|
+
/** This is the Twilio API Secret for the phone number. */
|
|
11600
|
+
twilioApiSecret?: string;
|
|
11686
11601
|
/**
|
|
11687
11602
|
* This is the name of the phone number. This is just for your own reference.
|
|
11688
11603
|
* @maxLength 40
|
|
@@ -11691,13 +11606,19 @@ export interface CreateTwilioPhoneNumberDTO {
|
|
|
11691
11606
|
/**
|
|
11692
11607
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
11693
11608
|
*
|
|
11694
|
-
* If neither `assistantId` nor `
|
|
11609
|
+
* If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11695
11610
|
*/
|
|
11696
11611
|
assistantId?: string;
|
|
11612
|
+
/**
|
|
11613
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
11614
|
+
*
|
|
11615
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11616
|
+
*/
|
|
11617
|
+
workflowId?: string;
|
|
11697
11618
|
/**
|
|
11698
11619
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
11699
11620
|
*
|
|
11700
|
-
* If neither `assistantId` nor `
|
|
11621
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11701
11622
|
*/
|
|
11702
11623
|
squadId?: string;
|
|
11703
11624
|
/**
|
|
@@ -11738,13 +11659,19 @@ export interface CreateVonagePhoneNumberDTO {
|
|
|
11738
11659
|
/**
|
|
11739
11660
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
11740
11661
|
*
|
|
11741
|
-
* If neither `assistantId` nor `
|
|
11662
|
+
* If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11742
11663
|
*/
|
|
11743
11664
|
assistantId?: string;
|
|
11665
|
+
/**
|
|
11666
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
11667
|
+
*
|
|
11668
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11669
|
+
*/
|
|
11670
|
+
workflowId?: string;
|
|
11744
11671
|
/**
|
|
11745
11672
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
11746
11673
|
*
|
|
11747
|
-
* If neither `assistantId` nor `
|
|
11674
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11748
11675
|
*/
|
|
11749
11676
|
squadId?: string;
|
|
11750
11677
|
/**
|
|
@@ -11799,13 +11726,19 @@ export interface CreateVapiPhoneNumberDTO {
|
|
|
11799
11726
|
/**
|
|
11800
11727
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
11801
11728
|
*
|
|
11802
|
-
* If neither `assistantId` nor `
|
|
11729
|
+
* If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11803
11730
|
*/
|
|
11804
11731
|
assistantId?: string;
|
|
11732
|
+
/**
|
|
11733
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
11734
|
+
*
|
|
11735
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11736
|
+
*/
|
|
11737
|
+
workflowId?: string;
|
|
11805
11738
|
/**
|
|
11806
11739
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
11807
11740
|
*
|
|
11808
|
-
* If neither `assistantId` nor `
|
|
11741
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11809
11742
|
*/
|
|
11810
11743
|
squadId?: string;
|
|
11811
11744
|
/**
|
|
@@ -11846,13 +11779,19 @@ export interface CreateTelnyxPhoneNumberDTO {
|
|
|
11846
11779
|
/**
|
|
11847
11780
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
11848
11781
|
*
|
|
11849
|
-
* If neither `assistantId` nor `
|
|
11782
|
+
* If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11850
11783
|
*/
|
|
11851
11784
|
assistantId?: string;
|
|
11785
|
+
/**
|
|
11786
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
11787
|
+
*
|
|
11788
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11789
|
+
*/
|
|
11790
|
+
workflowId?: string;
|
|
11852
11791
|
/**
|
|
11853
11792
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
11854
11793
|
*
|
|
11855
|
-
* If neither `assistantId` nor `
|
|
11794
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11856
11795
|
*/
|
|
11857
11796
|
squadId?: string;
|
|
11858
11797
|
/**
|
|
@@ -11900,13 +11839,19 @@ export interface UpdateByoPhoneNumberDTO {
|
|
|
11900
11839
|
/**
|
|
11901
11840
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
11902
11841
|
*
|
|
11903
|
-
* If neither `assistantId` nor `
|
|
11842
|
+
* If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11904
11843
|
*/
|
|
11905
11844
|
assistantId?: string;
|
|
11845
|
+
/**
|
|
11846
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
11847
|
+
*
|
|
11848
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11849
|
+
*/
|
|
11850
|
+
workflowId?: string;
|
|
11906
11851
|
/**
|
|
11907
11852
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
11908
11853
|
*
|
|
11909
|
-
* If neither `assistantId` nor `
|
|
11854
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11910
11855
|
*/
|
|
11911
11856
|
squadId?: string;
|
|
11912
11857
|
/**
|
|
@@ -11945,6 +11890,16 @@ export interface UpdateTwilioPhoneNumberDTO {
|
|
|
11945
11890
|
fallbackDestination?: TransferDestinationNumber | TransferDestinationSip;
|
|
11946
11891
|
/** This is the hooks that will be used for incoming calls to this phone number. */
|
|
11947
11892
|
hooks?: PhoneNumberHookCallRinging[];
|
|
11893
|
+
/**
|
|
11894
|
+
* Controls whether Vapi sets the messaging webhook URL on the Twilio number during import.
|
|
11895
|
+
*
|
|
11896
|
+
* If set to `false`, Vapi will not update the Twilio messaging URL, leaving it as is.
|
|
11897
|
+
* If `true` or omitted (default), Vapi will configure both the voice and messaging URLs.
|
|
11898
|
+
*
|
|
11899
|
+
* @default true
|
|
11900
|
+
* @default true
|
|
11901
|
+
*/
|
|
11902
|
+
smsEnabled?: boolean;
|
|
11948
11903
|
/**
|
|
11949
11904
|
* This is the name of the phone number. This is just for your own reference.
|
|
11950
11905
|
* @maxLength 40
|
|
@@ -11953,13 +11908,19 @@ export interface UpdateTwilioPhoneNumberDTO {
|
|
|
11953
11908
|
/**
|
|
11954
11909
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
11955
11910
|
*
|
|
11956
|
-
* If neither `assistantId` nor `
|
|
11911
|
+
* If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11957
11912
|
*/
|
|
11958
11913
|
assistantId?: string;
|
|
11914
|
+
/**
|
|
11915
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
11916
|
+
*
|
|
11917
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11918
|
+
*/
|
|
11919
|
+
workflowId?: string;
|
|
11959
11920
|
/**
|
|
11960
11921
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
11961
11922
|
*
|
|
11962
|
-
* If neither `assistantId` nor `
|
|
11923
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11963
11924
|
*/
|
|
11964
11925
|
squadId?: string;
|
|
11965
11926
|
/**
|
|
@@ -11978,6 +11939,10 @@ export interface UpdateTwilioPhoneNumberDTO {
|
|
|
11978
11939
|
twilioAccountSid?: string;
|
|
11979
11940
|
/** This is the Twilio Auth Token for the phone number. */
|
|
11980
11941
|
twilioAuthToken?: string;
|
|
11942
|
+
/** This is the Twilio API Key for the phone number. */
|
|
11943
|
+
twilioApiKey?: string;
|
|
11944
|
+
/** This is the Twilio API Secret for the phone number. */
|
|
11945
|
+
twilioApiSecret?: string;
|
|
11981
11946
|
}
|
|
11982
11947
|
|
|
11983
11948
|
export interface UpdateVonagePhoneNumberDTO {
|
|
@@ -12000,13 +11965,19 @@ export interface UpdateVonagePhoneNumberDTO {
|
|
|
12000
11965
|
/**
|
|
12001
11966
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
12002
11967
|
*
|
|
12003
|
-
* If neither `assistantId` nor `
|
|
11968
|
+
* If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
12004
11969
|
*/
|
|
12005
11970
|
assistantId?: string;
|
|
11971
|
+
/**
|
|
11972
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
11973
|
+
*
|
|
11974
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
11975
|
+
*/
|
|
11976
|
+
workflowId?: string;
|
|
12006
11977
|
/**
|
|
12007
11978
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
12008
11979
|
*
|
|
12009
|
-
* If neither `assistantId` nor `
|
|
11980
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
12010
11981
|
*/
|
|
12011
11982
|
squadId?: string;
|
|
12012
11983
|
/**
|
|
@@ -12045,13 +12016,19 @@ export interface UpdateVapiPhoneNumberDTO {
|
|
|
12045
12016
|
/**
|
|
12046
12017
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
12047
12018
|
*
|
|
12048
|
-
* If neither `assistantId` nor `
|
|
12019
|
+
* If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
12049
12020
|
*/
|
|
12050
12021
|
assistantId?: string;
|
|
12022
|
+
/**
|
|
12023
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
12024
|
+
*
|
|
12025
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
12026
|
+
*/
|
|
12027
|
+
workflowId?: string;
|
|
12051
12028
|
/**
|
|
12052
12029
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
12053
12030
|
*
|
|
12054
|
-
* If neither `assistantId` nor `
|
|
12031
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
12055
12032
|
*/
|
|
12056
12033
|
squadId?: string;
|
|
12057
12034
|
/**
|
|
@@ -12098,13 +12075,19 @@ export interface UpdateTelnyxPhoneNumberDTO {
|
|
|
12098
12075
|
/**
|
|
12099
12076
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
12100
12077
|
*
|
|
12101
|
-
* If neither `assistantId` nor `
|
|
12078
|
+
* If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
12102
12079
|
*/
|
|
12103
12080
|
assistantId?: string;
|
|
12081
|
+
/**
|
|
12082
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
12083
|
+
*
|
|
12084
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
12085
|
+
*/
|
|
12086
|
+
workflowId?: string;
|
|
12104
12087
|
/**
|
|
12105
12088
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
12106
12089
|
*
|
|
12107
|
-
* If neither `assistantId` nor `
|
|
12090
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
12108
12091
|
*/
|
|
12109
12092
|
squadId?: string;
|
|
12110
12093
|
/**
|
|
@@ -12150,13 +12133,19 @@ export interface ImportVonagePhoneNumberDTO {
|
|
|
12150
12133
|
/**
|
|
12151
12134
|
* This is the assistant that will be used for incoming calls to this phone number.
|
|
12152
12135
|
*
|
|
12153
|
-
* If neither `assistantId` nor `
|
|
12136
|
+
* If neither `assistantId`, `squadId` nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
12154
12137
|
*/
|
|
12155
12138
|
assistantId?: string;
|
|
12139
|
+
/**
|
|
12140
|
+
* This is the workflow that will be used for incoming calls to this phone number.
|
|
12141
|
+
*
|
|
12142
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
12143
|
+
*/
|
|
12144
|
+
workflowId?: string;
|
|
12156
12145
|
/**
|
|
12157
12146
|
* This is the squad that will be used for incoming calls to this phone number.
|
|
12158
12147
|
*
|
|
12159
|
-
* If neither `assistantId` nor `
|
|
12148
|
+
* If neither `assistantId`, `squadId`, nor `workflowId` is set, `assistant-request` will be sent to your Server URL. Check `ServerMessage` and `ServerMessageResponse` for the shape of the message and response that is expected.
|
|
12160
12149
|
*/
|
|
12161
12150
|
squadId?: string;
|
|
12162
12151
|
/**
|
|
@@ -14257,8 +14246,37 @@ export interface TrieveKnowledgeBaseImport {
|
|
|
14257
14246
|
providerId: string;
|
|
14258
14247
|
}
|
|
14259
14248
|
|
|
14249
|
+
export interface Workflow {
|
|
14250
|
+
nodes: (Start | Assistant | Say | Gather | ApiRequest | Hangup | Transfer)[];
|
|
14251
|
+
/** These are the options for the workflow's LLM. */
|
|
14252
|
+
model?:
|
|
14253
|
+
| AnthropicModel
|
|
14254
|
+
| AnyscaleModel
|
|
14255
|
+
| CerebrasModel
|
|
14256
|
+
| CustomLLMModel
|
|
14257
|
+
| DeepInfraModel
|
|
14258
|
+
| DeepSeekModel
|
|
14259
|
+
| GoogleModel
|
|
14260
|
+
| GroqModel
|
|
14261
|
+
| InflectionAIModel
|
|
14262
|
+
| OpenAIModel
|
|
14263
|
+
| OpenRouterModel
|
|
14264
|
+
| PerplexityAIModel
|
|
14265
|
+
| TogetherAIModel
|
|
14266
|
+
| XaiModel;
|
|
14267
|
+
id: string;
|
|
14268
|
+
orgId: string;
|
|
14269
|
+
/** @format date-time */
|
|
14270
|
+
createdAt: string;
|
|
14271
|
+
/** @format date-time */
|
|
14272
|
+
updatedAt: string;
|
|
14273
|
+
/** @maxLength 80 */
|
|
14274
|
+
name: string;
|
|
14275
|
+
edges: Edge[];
|
|
14276
|
+
}
|
|
14277
|
+
|
|
14260
14278
|
export interface UpdateWorkflowDTO {
|
|
14261
|
-
nodes?: (Say | Gather | ApiRequest | Hangup | Transfer)[];
|
|
14279
|
+
nodes?: (Start | Assistant | Say | Gather | ApiRequest | Hangup | Transfer)[];
|
|
14262
14280
|
/** These are the options for the workflow's LLM. */
|
|
14263
14281
|
model?:
|
|
14264
14282
|
| AnthropicModel
|
|
@@ -14661,7 +14679,7 @@ export interface TestSuiteTestScorerAI {
|
|
|
14661
14679
|
type: 'ai';
|
|
14662
14680
|
/**
|
|
14663
14681
|
* This is the rubric used by the AI scorer.
|
|
14664
|
-
* @maxLength
|
|
14682
|
+
* @maxLength 10000
|
|
14665
14683
|
*/
|
|
14666
14684
|
rubric: string;
|
|
14667
14685
|
}
|
|
@@ -14691,7 +14709,7 @@ export interface TestSuiteRunScorerAI {
|
|
|
14691
14709
|
reasoning: string;
|
|
14692
14710
|
/**
|
|
14693
14711
|
* This is the rubric used by the AI scorer.
|
|
14694
|
-
* @maxLength
|
|
14712
|
+
* @maxLength 10000
|
|
14695
14713
|
*/
|
|
14696
14714
|
rubric: string;
|
|
14697
14715
|
}
|
|
@@ -16628,7 +16646,11 @@ export interface TrieveCredential {
|
|
|
16628
16646
|
export interface TwilioCredential {
|
|
16629
16647
|
provider: 'twilio';
|
|
16630
16648
|
/** This is not returned in the API. */
|
|
16631
|
-
authToken
|
|
16649
|
+
authToken?: string;
|
|
16650
|
+
/** This is not returned in the API. */
|
|
16651
|
+
apiKey?: string;
|
|
16652
|
+
/** This is not returned in the API. */
|
|
16653
|
+
apiSecret?: string;
|
|
16632
16654
|
/** This is the unique identifier for the credential. */
|
|
16633
16655
|
id: string;
|
|
16634
16656
|
/** This is the unique identifier for the org that this credential belongs to. */
|
|
@@ -17546,6 +17568,10 @@ export interface UpdateTrieveCredentialDTO {
|
|
|
17546
17568
|
export interface UpdateTwilioCredentialDTO {
|
|
17547
17569
|
/** This is not returned in the API. */
|
|
17548
17570
|
authToken?: string;
|
|
17571
|
+
/** This is not returned in the API. */
|
|
17572
|
+
apiKey?: string;
|
|
17573
|
+
/** This is not returned in the API. */
|
|
17574
|
+
apiSecret?: string;
|
|
17549
17575
|
/**
|
|
17550
17576
|
* This is the name of credential. This is just for your reference.
|
|
17551
17577
|
* @minLength 1
|
|
@@ -20546,7 +20572,7 @@ export interface VoicemailDetectionCost {
|
|
|
20546
20572
|
/** This is the model that was used to perform the analysis. */
|
|
20547
20573
|
model: object;
|
|
20548
20574
|
/** This is the provider that was used to detect the voicemail. */
|
|
20549
|
-
provider: 'twilio' | 'google' | 'openai';
|
|
20575
|
+
provider: 'twilio' | 'google' | 'openai' | 'vapi';
|
|
20550
20576
|
/** This is the number of prompt text tokens used in the voicemail detection. */
|
|
20551
20577
|
promptTextTokens: number;
|
|
20552
20578
|
/** This is the number of prompt audio tokens used in the voicemail detection. */
|
|
@@ -20559,6 +20585,19 @@ export interface VoicemailDetectionCost {
|
|
|
20559
20585
|
cost: number;
|
|
20560
20586
|
}
|
|
20561
20587
|
|
|
20588
|
+
export interface KnowledgeBaseCost {
|
|
20589
|
+
/** This is the type of cost, always 'knowledge-base' for this class. */
|
|
20590
|
+
type: 'knowledge-base';
|
|
20591
|
+
/** This is the model that was used for processing the knowledge base. */
|
|
20592
|
+
model: object;
|
|
20593
|
+
/** This is the number of prompt tokens used in the knowledge base query. */
|
|
20594
|
+
promptTokens: number;
|
|
20595
|
+
/** This is the number of completion tokens generated in the knowledge base query. */
|
|
20596
|
+
completionTokens: number;
|
|
20597
|
+
/** This is the cost of the component in USD. */
|
|
20598
|
+
cost: number;
|
|
20599
|
+
}
|
|
20600
|
+
|
|
20562
20601
|
export interface FunctionToolWithToolCall {
|
|
20563
20602
|
/**
|
|
20564
20603
|
* This determines if the tool is async.
|
|
@@ -21882,6 +21921,33 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
21882
21921
|
format: 'json',
|
|
21883
21922
|
...params,
|
|
21884
21923
|
}),
|
|
21924
|
+
|
|
21925
|
+
/**
|
|
21926
|
+
* No description
|
|
21927
|
+
*
|
|
21928
|
+
* @tags Assistants
|
|
21929
|
+
* @name AssistantControllerFindVersions
|
|
21930
|
+
* @summary List Assistant Versions
|
|
21931
|
+
* @request GET:/assistant/{id}/version
|
|
21932
|
+
* @secure
|
|
21933
|
+
*/
|
|
21934
|
+
assistantControllerFindVersions: (
|
|
21935
|
+
id: string,
|
|
21936
|
+
query?: {
|
|
21937
|
+
page?: number;
|
|
21938
|
+
limit?: number;
|
|
21939
|
+
pageState?: string;
|
|
21940
|
+
},
|
|
21941
|
+
params: RequestParams = {},
|
|
21942
|
+
) =>
|
|
21943
|
+
this.request<AssistantVersionPaginatedResponse, any>({
|
|
21944
|
+
path: `/assistant/${id}/version`,
|
|
21945
|
+
method: 'GET',
|
|
21946
|
+
query: query,
|
|
21947
|
+
secure: true,
|
|
21948
|
+
format: 'json',
|
|
21949
|
+
...params,
|
|
21950
|
+
}),
|
|
21885
21951
|
};
|
|
21886
21952
|
phoneNumber = {
|
|
21887
21953
|
/**
|