@vapi-ai/web 1.0.231 → 1.0.233
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 +640 -332
- package/dist/api.d.ts +398 -216
- package/dist/api.js +79 -27
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -1,3 +1,47 @@
|
|
|
1
|
+
export interface BetaVoice {
|
|
2
|
+
/**
|
|
3
|
+
* This is the voice provider that will be used.
|
|
4
|
+
*
|
|
5
|
+
* Pro Voices: `11labs`, `playht`
|
|
6
|
+
*
|
|
7
|
+
* Basic Voices: `rimeai`, `beta`
|
|
8
|
+
*/
|
|
9
|
+
provider: "beta";
|
|
10
|
+
/** This is the provider-specific ID that will be used. */
|
|
11
|
+
voiceId: string;
|
|
12
|
+
}
|
|
13
|
+
export interface CustomModel {
|
|
14
|
+
/**
|
|
15
|
+
* This is the provider that will be used for the model. Currently, only OpenAI and Custom LLM URLs are supported.
|
|
16
|
+
*
|
|
17
|
+
* If you have your own LLM, you can use the URL of your LLM endpoint here.
|
|
18
|
+
*/
|
|
19
|
+
provider: "custom";
|
|
20
|
+
/** These is the URL we'll POST during the conversation. */
|
|
21
|
+
url: string;
|
|
22
|
+
/** This sets the objective and understanding for the assistant. */
|
|
23
|
+
systemPrompt?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface DeepgramTranscriber {
|
|
26
|
+
/** This is the transcription provider that will be used. Currently, only Deepgram is supported. */
|
|
27
|
+
provider: "deepgram";
|
|
28
|
+
/** This is the Deepgram model that will be used. A list of models can be found here: https://developers.deepgram.com/docs/models-languages-overview */
|
|
29
|
+
model?: "nova-2" | "nova-2-general" | "nova-2-meeting" | "nova-2-phonecall" | "nova-2-finance" | "nova-2-conversationalai" | "nova-2-voicemail" | "nova-2-video" | "nova-2-medical" | "nova-2-drivethru" | "nova-2-automotive" | "nova-2-custom" | string;
|
|
30
|
+
/** These keywords are passed to the transcription model to help it pick up use-case specific words. Anything that may not be a common word, like your company name, should be added here. */
|
|
31
|
+
keywords?: string[];
|
|
32
|
+
}
|
|
33
|
+
export interface ElevenLabsVoice {
|
|
34
|
+
/**
|
|
35
|
+
* This is the voice provider that will be used.
|
|
36
|
+
*
|
|
37
|
+
* Pro Voices: `11labs`, `playht`
|
|
38
|
+
*
|
|
39
|
+
* Basic Voices: `rimeai`, `beta`
|
|
40
|
+
*/
|
|
41
|
+
provider: "11labs";
|
|
42
|
+
/** This is the provider-specific ID that will be used. */
|
|
43
|
+
voiceId: string;
|
|
44
|
+
}
|
|
1
45
|
export interface OpenAIFunctionParameterProperty {
|
|
2
46
|
type: "string" | "number" | "boolean";
|
|
3
47
|
enum?: string[];
|
|
@@ -29,61 +73,205 @@ export interface OpenAIFunction {
|
|
|
29
73
|
*/
|
|
30
74
|
parameters: OpenAIFunctionParameters;
|
|
31
75
|
}
|
|
32
|
-
export interface
|
|
76
|
+
export interface OpenAIModel {
|
|
77
|
+
/**
|
|
78
|
+
* This is the provider that will be used for the model. Currently, only OpenAI and Custom LLM URLs are supported.
|
|
79
|
+
*
|
|
80
|
+
* If you have your own LLM, you can use the URL of your LLM endpoint here.
|
|
81
|
+
*/
|
|
82
|
+
provider: "openai";
|
|
33
83
|
/** This is the OpenAI model that will be used. */
|
|
34
|
-
model
|
|
84
|
+
model: "gpt-4" | "gpt-3.5-turbo";
|
|
85
|
+
/** This sets the objective and understanding for the assistant. */
|
|
86
|
+
systemPrompt?: string;
|
|
87
|
+
/**
|
|
88
|
+
* This is the temperature that will be used for OpenAI calls.
|
|
89
|
+
* @min 0
|
|
90
|
+
* @max 2
|
|
91
|
+
*/
|
|
92
|
+
temperature?: number;
|
|
93
|
+
/** These are the functions that the assistant can execute during the call. */
|
|
94
|
+
functions?: OpenAIFunction[];
|
|
95
|
+
}
|
|
96
|
+
export interface PlayHTVoice {
|
|
97
|
+
/**
|
|
98
|
+
* This is the voice provider that will be used.
|
|
99
|
+
*
|
|
100
|
+
* Pro Voices: `11labs`, `playht`
|
|
101
|
+
*
|
|
102
|
+
* Basic Voices: `rimeai`, `beta`
|
|
103
|
+
*/
|
|
104
|
+
provider: "playht";
|
|
105
|
+
/** This is the provider-specific ID that will be used. */
|
|
106
|
+
voiceId: string;
|
|
107
|
+
}
|
|
108
|
+
export interface RimeAIVoice {
|
|
35
109
|
/**
|
|
36
|
-
* This is the voice that will be used.
|
|
110
|
+
* This is the voice provider that will be used.
|
|
37
111
|
*
|
|
38
|
-
* Pro Voices:
|
|
112
|
+
* Pro Voices: `11labs`, `playht`
|
|
39
113
|
*
|
|
40
|
-
* Basic Voices:
|
|
114
|
+
* Basic Voices: `rimeai`, `beta`
|
|
41
115
|
*/
|
|
42
|
-
|
|
116
|
+
provider: "rimeai";
|
|
117
|
+
/** This is the provider-specific ID that will be used. */
|
|
118
|
+
voiceId: string;
|
|
119
|
+
}
|
|
120
|
+
export interface CreateAssistantDTO {
|
|
121
|
+
/**
|
|
122
|
+
* This is the name of the assistant. This is just for your own reference.
|
|
123
|
+
* @maxLength 100
|
|
124
|
+
*/
|
|
125
|
+
name?: string;
|
|
126
|
+
/** These are the options for the assistant's transcriber. */
|
|
127
|
+
transcriber?: DeepgramTranscriber;
|
|
128
|
+
/** These are the options for the assistant's LLM. */
|
|
129
|
+
model?: "0" | "1" | "2" | OpenAIModel | CustomModel;
|
|
130
|
+
/**
|
|
131
|
+
* These are the options for the assistant's voice.
|
|
132
|
+
* @default "jennifer-playht"
|
|
133
|
+
*/
|
|
134
|
+
voice?: "jennifer-playht" | "melissa-playht" | "will-playht" | "chris-playht" | "matt-playht" | "jack-playht" | "ruby-playht" | "davis-playht" | "donna-playht" | "michael-playht" | "burt-11labs" | "andrea-11labs" | "phillip-11labs" | "steve-11labs" | "joseph-11labs" | "myra-11labs" | "paula-11labs" | "ryan-11labs" | "drew-11labs" | "paul-11labs" | "mrb-11labs" | "matilda-11labs" | "kai-rimeai" | "zion-rimeai" | "xavier-rimeai" | "marty-rimeai" | "hudson-rimeai" | "savannah-rimeai" | "colette-rimeai" | "daphne-rimeai" | "aurora-rimeai" | "nova-rimeai" | "apollo-beta" | "orion-beta" | "aurora-beta" | "asteria-beta" | "stella-beta" | "artemis-beta" | "andromeda-beta" | "atlas-beta" | ElevenLabsVoice | PlayHTVoice | RimeAIVoice | BetaVoice;
|
|
43
135
|
/**
|
|
44
136
|
* This sets the spoken language of the user. The assistant will do its best to respond in the same language.
|
|
45
|
-
* When using a language other than `en-*`, only
|
|
137
|
+
* When using a language other than `en-*`, only `11labs` voices will pronounce the words correctly. There will also be ~1sec of additional latency.
|
|
46
138
|
*/
|
|
47
139
|
language?: "en" | "en-US" | "en-AU" | "en-GB" | "en-NZ" | "en-IN" | "fr" | "fr-CA" | "de" | "hi" | "hi-Latn" | "pt" | "pt-BR" | "es" | "es-419";
|
|
140
|
+
/** This is the number to forward to if assistant runs into issues. */
|
|
141
|
+
forwardingPhoneNumber?: string;
|
|
142
|
+
/**
|
|
143
|
+
* This is the first message that the assistant will say.
|
|
144
|
+
*
|
|
145
|
+
* If unspecified, it will wait for the user to speak.
|
|
146
|
+
* @maxLength 1000
|
|
147
|
+
* @default "Hey there!"
|
|
148
|
+
*/
|
|
149
|
+
firstMessage?: string;
|
|
150
|
+
/**
|
|
151
|
+
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
152
|
+
*
|
|
153
|
+
* If unspecified, it will hang up.
|
|
154
|
+
* @maxLength 1000
|
|
155
|
+
*/
|
|
156
|
+
voicemailMessage?: string;
|
|
157
|
+
/**
|
|
158
|
+
* This is the message that the assistant will say if it ends the call.
|
|
159
|
+
*
|
|
160
|
+
* If unspecified, it will hang up without saying anything.
|
|
161
|
+
* @maxLength 400
|
|
162
|
+
*/
|
|
163
|
+
endCallMessage?: string;
|
|
164
|
+
/** This sets whether the user can interrupt the assistant while it's speaking. Defaults to true. */
|
|
165
|
+
interruptionsEnabled?: boolean;
|
|
166
|
+
/** This sets whether the assistant's calls are recorded. Defaults to true. */
|
|
167
|
+
recordingEnabled?: boolean;
|
|
168
|
+
/** This sets whether the assistant will be able to hang up the call. Defaults to false. */
|
|
169
|
+
endCallFunctionEnabled?: boolean;
|
|
170
|
+
/** This sets whether the assistant will use fillers like Well..., Okay cool..., etc. Defaults to true when using gpt-4. Else, defaults to false. */
|
|
171
|
+
fillersEnabled?: boolean;
|
|
172
|
+
}
|
|
173
|
+
export interface Assistant {
|
|
48
174
|
/**
|
|
49
175
|
* This is the name of the assistant. This is just for your own reference.
|
|
50
176
|
* @maxLength 100
|
|
51
177
|
*/
|
|
52
178
|
name?: string;
|
|
53
|
-
/**
|
|
54
|
-
|
|
55
|
-
/** These are the
|
|
56
|
-
|
|
179
|
+
/** These are the options for the assistant's transcriber. */
|
|
180
|
+
transcriber?: DeepgramTranscriber;
|
|
181
|
+
/** These are the options for the assistant's LLM. */
|
|
182
|
+
model?: "0" | "1" | "2" | OpenAIModel | CustomModel;
|
|
183
|
+
/**
|
|
184
|
+
* These are the options for the assistant's voice.
|
|
185
|
+
* @default "jennifer-playht"
|
|
186
|
+
*/
|
|
187
|
+
voice?: "jennifer-playht" | "melissa-playht" | "will-playht" | "chris-playht" | "matt-playht" | "jack-playht" | "ruby-playht" | "davis-playht" | "donna-playht" | "michael-playht" | "burt-11labs" | "andrea-11labs" | "phillip-11labs" | "steve-11labs" | "joseph-11labs" | "myra-11labs" | "paula-11labs" | "ryan-11labs" | "drew-11labs" | "paul-11labs" | "mrb-11labs" | "matilda-11labs" | "kai-rimeai" | "zion-rimeai" | "xavier-rimeai" | "marty-rimeai" | "hudson-rimeai" | "savannah-rimeai" | "colette-rimeai" | "daphne-rimeai" | "aurora-rimeai" | "nova-rimeai" | "apollo-beta" | "orion-beta" | "aurora-beta" | "asteria-beta" | "stella-beta" | "artemis-beta" | "andromeda-beta" | "atlas-beta" | ElevenLabsVoice | PlayHTVoice | RimeAIVoice | BetaVoice;
|
|
57
188
|
/**
|
|
58
|
-
* This
|
|
189
|
+
* This sets the spoken language of the user. The assistant will do its best to respond in the same language.
|
|
190
|
+
* When using a language other than `en-*`, only `11labs` voices will pronounce the words correctly. There will also be ~1sec of additional latency.
|
|
191
|
+
*/
|
|
192
|
+
language?: "en" | "en-US" | "en-AU" | "en-GB" | "en-NZ" | "en-IN" | "fr" | "fr-CA" | "de" | "hi" | "hi-Latn" | "pt" | "pt-BR" | "es" | "es-419";
|
|
193
|
+
/** This is the number to forward to if assistant runs into issues. */
|
|
194
|
+
forwardingPhoneNumber?: string;
|
|
195
|
+
/**
|
|
196
|
+
* This is the first message that the assistant will say.
|
|
59
197
|
*
|
|
60
|
-
*
|
|
198
|
+
* If unspecified, it will wait for the user to speak.
|
|
199
|
+
* @maxLength 1000
|
|
200
|
+
* @default "Hey there!"
|
|
61
201
|
*/
|
|
62
|
-
|
|
202
|
+
firstMessage?: string;
|
|
63
203
|
/**
|
|
64
|
-
*
|
|
204
|
+
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
65
205
|
*
|
|
66
|
-
*
|
|
206
|
+
* If unspecified, it will hang up.
|
|
207
|
+
* @maxLength 1000
|
|
208
|
+
*/
|
|
209
|
+
voicemailMessage?: string;
|
|
210
|
+
/**
|
|
211
|
+
* This is the message that the assistant will say if it ends the call.
|
|
67
212
|
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
|
|
213
|
+
* If unspecified, it will hang up without saying anything.
|
|
214
|
+
* @maxLength 400
|
|
215
|
+
*/
|
|
216
|
+
endCallMessage?: string;
|
|
217
|
+
/** This sets whether the user can interrupt the assistant while it's speaking. Defaults to true. */
|
|
218
|
+
interruptionsEnabled?: boolean;
|
|
219
|
+
/** This sets whether the assistant's calls are recorded. Defaults to true. */
|
|
220
|
+
recordingEnabled?: boolean;
|
|
221
|
+
/** This sets whether the assistant will be able to hang up the call. Defaults to false. */
|
|
222
|
+
endCallFunctionEnabled?: boolean;
|
|
223
|
+
/** This sets whether the assistant will use fillers like Well..., Okay cool..., etc. Defaults to true when using gpt-4. Else, defaults to false. */
|
|
224
|
+
fillersEnabled?: boolean;
|
|
225
|
+
/** This is the unique identifier for the assistant. */
|
|
226
|
+
id: string;
|
|
227
|
+
/** This is the unique identifier for the org that this assistant belongs to. */
|
|
228
|
+
orgId: string;
|
|
229
|
+
/**
|
|
230
|
+
* This is the ISO 8601 date-time string of when the assistant was created.
|
|
231
|
+
* @format date-time
|
|
232
|
+
*/
|
|
233
|
+
createdAt: string;
|
|
234
|
+
/**
|
|
235
|
+
* This is the ISO 8601 date-time string of when the assistant was last updated.
|
|
236
|
+
* @format date-time
|
|
237
|
+
*/
|
|
238
|
+
updatedAt: string;
|
|
239
|
+
}
|
|
240
|
+
export interface UpdateAssistantDTO {
|
|
241
|
+
/**
|
|
242
|
+
* This is the name of the assistant. This is just for your own reference.
|
|
243
|
+
* @maxLength 100
|
|
244
|
+
*/
|
|
245
|
+
name?: string;
|
|
246
|
+
/** These are the options for the assistant's transcriber. */
|
|
247
|
+
transcriber?: DeepgramTranscriber;
|
|
248
|
+
/** These are the options for the assistant's LLM. */
|
|
249
|
+
model?: "0" | "1" | "2" | OpenAIModel | CustomModel;
|
|
250
|
+
/**
|
|
251
|
+
* These are the options for the assistant's voice.
|
|
252
|
+
* @default "jennifer-playht"
|
|
71
253
|
*/
|
|
72
|
-
|
|
254
|
+
voice?: "jennifer-playht" | "melissa-playht" | "will-playht" | "chris-playht" | "matt-playht" | "jack-playht" | "ruby-playht" | "davis-playht" | "donna-playht" | "michael-playht" | "burt-11labs" | "andrea-11labs" | "phillip-11labs" | "steve-11labs" | "joseph-11labs" | "myra-11labs" | "paula-11labs" | "ryan-11labs" | "drew-11labs" | "paul-11labs" | "mrb-11labs" | "matilda-11labs" | "kai-rimeai" | "zion-rimeai" | "xavier-rimeai" | "marty-rimeai" | "hudson-rimeai" | "savannah-rimeai" | "colette-rimeai" | "daphne-rimeai" | "aurora-rimeai" | "nova-rimeai" | "apollo-beta" | "orion-beta" | "aurora-beta" | "asteria-beta" | "stella-beta" | "artemis-beta" | "andromeda-beta" | "atlas-beta" | ElevenLabsVoice | PlayHTVoice | RimeAIVoice | BetaVoice;
|
|
255
|
+
/**
|
|
256
|
+
* This sets the spoken language of the user. The assistant will do its best to respond in the same language.
|
|
257
|
+
* When using a language other than `en-*`, only `11labs` voices will pronounce the words correctly. There will also be ~1sec of additional latency.
|
|
258
|
+
*/
|
|
259
|
+
language?: "en" | "en-US" | "en-AU" | "en-GB" | "en-NZ" | "en-IN" | "fr" | "fr-CA" | "de" | "hi" | "hi-Latn" | "pt" | "pt-BR" | "es" | "es-419";
|
|
73
260
|
/** This is the number to forward to if assistant runs into issues. */
|
|
74
261
|
forwardingPhoneNumber?: string;
|
|
75
262
|
/**
|
|
76
263
|
* This is the first message that the assistant will say.
|
|
77
264
|
*
|
|
78
265
|
* If unspecified, it will wait for the user to speak.
|
|
79
|
-
* @maxLength
|
|
266
|
+
* @maxLength 1000
|
|
267
|
+
* @default "Hey there!"
|
|
80
268
|
*/
|
|
81
269
|
firstMessage?: string;
|
|
82
270
|
/**
|
|
83
271
|
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
84
272
|
*
|
|
85
273
|
* If unspecified, it will hang up.
|
|
86
|
-
* @maxLength
|
|
274
|
+
* @maxLength 1000
|
|
87
275
|
*/
|
|
88
276
|
voicemailMessage?: string;
|
|
89
277
|
/**
|
|
@@ -101,8 +289,6 @@ export interface CreateAssistantDTO {
|
|
|
101
289
|
endCallFunctionEnabled?: boolean;
|
|
102
290
|
/** This sets whether the assistant will use fillers like Well..., Okay cool..., etc. Defaults to true when using gpt-4. Else, defaults to false. */
|
|
103
291
|
fillersEnabled?: boolean;
|
|
104
|
-
/** These keywords are passed to the transcription model to help it pick up use-case specific words. Anything that may not be a common word, like your company name, should be added here. */
|
|
105
|
-
keywords?: string[];
|
|
106
292
|
}
|
|
107
293
|
export interface CreateCustomerDTO {
|
|
108
294
|
/** This is the number of the customer. */
|
|
@@ -133,7 +319,12 @@ export interface ImportTwilioPhoneNumberDTO {
|
|
|
133
319
|
assistantId?: string;
|
|
134
320
|
}
|
|
135
321
|
export interface Call {
|
|
322
|
+
/** This is the type of call. */
|
|
136
323
|
type?: "inboundPhoneCall" | "outboundPhoneCall" | "webCall";
|
|
324
|
+
/** This is the status of the call. */
|
|
325
|
+
status?: "queued" | "ringing" | "in-progress" | "forwarding" | "ended";
|
|
326
|
+
/** This is the explanation for how the call ended. */
|
|
327
|
+
endedReason?: "assistant-ended-call" | "assistant-error" | "assistant-forwarded-call" | "assistant-join-timed-out" | "assistant-not-found" | "manually-canceled" | "customer-busy" | "customer-ended-call" | "customer-did-not-answer" | "db-error" | "exceeded-max-duration" | "no-server-available" | "server-shutdown" | "silence-timed-out" | "twilio-failed-to-connect-call" | "twilio-closed-websocket" | "unknown-error" | "voicemail";
|
|
137
328
|
/** This is the unique identifier for the call. */
|
|
138
329
|
id: string;
|
|
139
330
|
/** This is the unique identifier for the org that this call belongs to. */
|
|
@@ -172,20 +363,12 @@ export interface Call {
|
|
|
172
363
|
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
173
364
|
*/
|
|
174
365
|
twilioCallSid?: string;
|
|
175
|
-
/**
|
|
176
|
-
* This is the current status of the call.
|
|
177
|
-
*
|
|
178
|
-
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
179
|
-
*/
|
|
180
|
-
twilioCallStatus?: string;
|
|
181
366
|
/**
|
|
182
367
|
* This is the URL of the call that the assistant will join.
|
|
183
368
|
*
|
|
184
369
|
* Only relevant for `webCall` type.
|
|
185
370
|
*/
|
|
186
371
|
webCallUrl?: string;
|
|
187
|
-
/** This is set if the call experienced an error. */
|
|
188
|
-
error?: string;
|
|
189
372
|
/** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
|
|
190
373
|
assistantId?: string;
|
|
191
374
|
/** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
|
|
@@ -216,11 +399,6 @@ export interface Call {
|
|
|
216
399
|
phoneNumber?: ImportTwilioPhoneNumberDTO;
|
|
217
400
|
}
|
|
218
401
|
export interface CreateOutboundCallDTO {
|
|
219
|
-
/**
|
|
220
|
-
* Use `customer` instead.
|
|
221
|
-
* @deprecated
|
|
222
|
-
*/
|
|
223
|
-
customerPhoneNumber?: string;
|
|
224
402
|
/** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
|
|
225
403
|
assistantId?: string;
|
|
226
404
|
/** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
|
|
@@ -256,86 +434,86 @@ export interface CreateWebCallDTO {
|
|
|
256
434
|
/** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
|
|
257
435
|
assistant?: CreateAssistantDTO;
|
|
258
436
|
}
|
|
259
|
-
export interface
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
/** This is
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
/** This is the unique identifier for the
|
|
437
|
+
export interface CreateTwilioCredentialDTO {
|
|
438
|
+
provider: "twilio";
|
|
439
|
+
/** This is hidden in the API responses. */
|
|
440
|
+
authToken: string;
|
|
441
|
+
accountSid: string;
|
|
442
|
+
}
|
|
443
|
+
export interface CreateDeepgramCredentialDTO {
|
|
444
|
+
provider: "deepgram";
|
|
445
|
+
/** This is hidden in the API responses. */
|
|
446
|
+
apiKey: string;
|
|
447
|
+
}
|
|
448
|
+
export interface CreateAzureCredentialDTO {
|
|
449
|
+
provider: "azure-openai";
|
|
450
|
+
/** This is hidden in the API responses. */
|
|
451
|
+
openAIKey: string;
|
|
452
|
+
openAIEndpoint: string;
|
|
453
|
+
}
|
|
454
|
+
export interface CreateElevenLabsCredentialDTO {
|
|
455
|
+
provider: "11labs";
|
|
456
|
+
/** This is hidden in the API responses. */
|
|
457
|
+
apiKey: string;
|
|
458
|
+
}
|
|
459
|
+
export interface CreatePlayHTCredentialDTO {
|
|
460
|
+
provider: "playht";
|
|
461
|
+
/** This is hidden in the API responses. */
|
|
462
|
+
apiKey: string;
|
|
463
|
+
userId: string;
|
|
464
|
+
}
|
|
465
|
+
export interface CreateRimeAICredentialDTO {
|
|
466
|
+
provider: "rimeai";
|
|
467
|
+
/** This is hidden in the API responses. */
|
|
468
|
+
apiKey: string;
|
|
469
|
+
}
|
|
470
|
+
export interface UpdateTwilioCredentialDTO {
|
|
471
|
+
provider: "twilio";
|
|
472
|
+
/** This is hidden in the API responses. */
|
|
473
|
+
authToken: string;
|
|
474
|
+
accountSid: string;
|
|
475
|
+
}
|
|
476
|
+
export interface UpdateDeepgramCredentialDTO {
|
|
477
|
+
provider: "deepgram";
|
|
478
|
+
/** This is hidden in the API responses. */
|
|
479
|
+
apiKey: string;
|
|
480
|
+
}
|
|
481
|
+
export interface UpdateAzureCredentialDTO {
|
|
482
|
+
provider: "azure-openai";
|
|
483
|
+
/** This is hidden in the API responses. */
|
|
484
|
+
openAIKey: string;
|
|
485
|
+
openAIEndpoint: string;
|
|
486
|
+
}
|
|
487
|
+
export interface UpdateElevenLabsCredentialDTO {
|
|
488
|
+
provider: "11labs";
|
|
489
|
+
/** This is hidden in the API responses. */
|
|
490
|
+
apiKey: string;
|
|
491
|
+
}
|
|
492
|
+
export interface UpdatePlayHTCredentialDTO {
|
|
493
|
+
provider: "playht";
|
|
494
|
+
/** This is hidden in the API responses. */
|
|
495
|
+
apiKey: string;
|
|
496
|
+
userId: string;
|
|
497
|
+
}
|
|
498
|
+
export interface UpdateRimeAICredentialDTO {
|
|
499
|
+
provider: "rimeai";
|
|
500
|
+
/** This is hidden in the API responses. */
|
|
501
|
+
apiKey: string;
|
|
502
|
+
}
|
|
503
|
+
export interface Credential {
|
|
504
|
+
/** This is hidden in the API responses. */
|
|
505
|
+
authToken?: string;
|
|
506
|
+
/** This is hidden in the API responses. */
|
|
507
|
+
apiKey?: string;
|
|
508
|
+
/** This is hidden in the API responses. */
|
|
509
|
+
openAIKey?: string;
|
|
510
|
+
provider: "twilio" | "deepgram" | "azure-openai" | "11labs" | "playht" | "rimeai";
|
|
511
|
+
/** This is the unique identifier for the credential. */
|
|
334
512
|
id: string;
|
|
335
|
-
/** This is the unique identifier for the org that this
|
|
513
|
+
/** This is the unique identifier for the org that this credential belongs to. */
|
|
336
514
|
orgId: string;
|
|
337
515
|
/**
|
|
338
|
-
* This is the ISO 8601 date-time string of when the
|
|
516
|
+
* This is the ISO 8601 date-time string of when the credential was created.
|
|
339
517
|
* @format date-time
|
|
340
518
|
*/
|
|
341
519
|
createdAt: string;
|
|
@@ -344,81 +522,9 @@ export interface Assistant {
|
|
|
344
522
|
* @format date-time
|
|
345
523
|
*/
|
|
346
524
|
updatedAt: string;
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
model?: "gpt-4" | "gpt-3.5-turbo";
|
|
351
|
-
/**
|
|
352
|
-
* This is the voice that will be used.
|
|
353
|
-
*
|
|
354
|
-
* Pro Voices: `*-11labs`, `*-playht`
|
|
355
|
-
*
|
|
356
|
-
* Basic Voices: `*-rimeai`
|
|
357
|
-
*/
|
|
358
|
-
voice?: "jennifer-playht" | "melissa-playht" | "will-playht" | "chris-playht" | "matt-playht" | "jack-playht" | "ruby-playht" | "davis-playht" | "donna-playht" | "michael-playht" | "burt-11labs" | "andrea-11labs" | "phillip-11labs" | "steve-11labs" | "joseph-11labs" | "myra-11labs" | "paula-11labs" | "ryan-11labs" | "drew-11labs" | "paul-11labs" | "mrb-11labs" | "matilda-11labs" | "kai-rimeai" | "zion-rimeai" | "xavier-rimeai" | "marty-rimeai" | "hudson-rimeai" | "savannah-rimeai" | "colette-rimeai" | "daphne-rimeai" | "aurora-rimeai" | "nova-rimeai" | "apollo-beta" | "orion-beta" | "aurora-beta" | "asteria-beta" | "stella-beta" | "artemis-beta" | "andromeda-beta" | "atlas-beta";
|
|
359
|
-
/**
|
|
360
|
-
* This sets the spoken language of the user. The assistant will do its best to respond in the same language.
|
|
361
|
-
* When using a language other than `en-*`, only `*-11labs` voices will pronounce the words correctly. There will also be ~1sec of additional latency.
|
|
362
|
-
*/
|
|
363
|
-
language?: "en" | "en-US" | "en-AU" | "en-GB" | "en-NZ" | "en-IN" | "fr" | "fr-CA" | "de" | "hi" | "hi-Latn" | "pt" | "pt-BR" | "es" | "es-419";
|
|
364
|
-
/**
|
|
365
|
-
* This is the name of the assistant. This is just for your own reference.
|
|
366
|
-
* @maxLength 100
|
|
367
|
-
*/
|
|
368
|
-
name?: string;
|
|
369
|
-
/** This sets the objective and understanding for the assistant. */
|
|
370
|
-
context?: string;
|
|
371
|
-
/** These are the functions that the assistant can execute during the call. */
|
|
372
|
-
functions?: OpenAIFunction[];
|
|
373
|
-
/**
|
|
374
|
-
* This is the URL Vapi will send GET / POST requests for retrieving context, function calling, and end-of-call reports.
|
|
375
|
-
*
|
|
376
|
-
* All requests will be sent with the `call` object among other things relevant to that callback. You can find more details in the Function Calling documentation.
|
|
377
|
-
*/
|
|
378
|
-
callbackUrl?: string;
|
|
379
|
-
/**
|
|
380
|
-
* If you are using a custom LLM, this is the URL Vapi will use instead of hitting OpenAI.
|
|
381
|
-
*
|
|
382
|
-
* A POST request will be sent with an array of messages, and the response should be like so:
|
|
383
|
-
*
|
|
384
|
-
* ```
|
|
385
|
-
* { message: "Oh hey! How are..." }
|
|
386
|
-
* ```
|
|
387
|
-
*/
|
|
388
|
-
customLlmUrl?: string;
|
|
389
|
-
/** This is the number to forward to if assistant runs into issues. */
|
|
390
|
-
forwardingPhoneNumber?: string;
|
|
391
|
-
/**
|
|
392
|
-
* This is the first message that the assistant will say.
|
|
393
|
-
*
|
|
394
|
-
* If unspecified, it will wait for the user to speak.
|
|
395
|
-
* @maxLength 400
|
|
396
|
-
*/
|
|
397
|
-
firstMessage?: string;
|
|
398
|
-
/**
|
|
399
|
-
* This is the message that the assistant will say if the call is forwarded to voicemail.
|
|
400
|
-
*
|
|
401
|
-
* If unspecified, it will hang up.
|
|
402
|
-
* @maxLength 400
|
|
403
|
-
*/
|
|
404
|
-
voicemailMessage?: string;
|
|
405
|
-
/**
|
|
406
|
-
* This is the message that the assistant will say if it ends the call.
|
|
407
|
-
*
|
|
408
|
-
* If unspecified, it will hang up without saying anything.
|
|
409
|
-
* @maxLength 400
|
|
410
|
-
*/
|
|
411
|
-
endCallMessage?: string;
|
|
412
|
-
/** This sets whether the user can interrupt the assistant while it's speaking. Defaults to true. */
|
|
413
|
-
interruptionsEnabled?: boolean;
|
|
414
|
-
/** This sets whether the assistant's calls are recorded. Defaults to true. */
|
|
415
|
-
recordingEnabled?: boolean;
|
|
416
|
-
/** This sets whether the assistant will be able to hang up the call. Defaults to false. */
|
|
417
|
-
endCallFunctionEnabled?: boolean;
|
|
418
|
-
/** This sets whether the assistant will use fillers like Well..., Okay cool..., etc. Defaults to true when using gpt-4. Else, defaults to false. */
|
|
419
|
-
fillersEnabled?: boolean;
|
|
420
|
-
/** These keywords are passed to the transcription model to help it pick up use-case specific words. Anything that may not be a common word, like your company name, should be added here. */
|
|
421
|
-
keywords?: string[];
|
|
525
|
+
accountSid?: string;
|
|
526
|
+
openAIEndpoint?: string;
|
|
527
|
+
userId?: string;
|
|
422
528
|
}
|
|
423
529
|
export interface BuyPhoneNumberDTO {
|
|
424
530
|
/**
|
|
@@ -569,6 +675,58 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
569
675
|
* API for building voice assistants
|
|
570
676
|
*/
|
|
571
677
|
export declare class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
|
678
|
+
assistant: {
|
|
679
|
+
/**
|
|
680
|
+
* No description
|
|
681
|
+
*
|
|
682
|
+
* @tags Assistants
|
|
683
|
+
* @name AssistantControllerCreate
|
|
684
|
+
* @summary Create Assistant
|
|
685
|
+
* @request POST:/assistant
|
|
686
|
+
* @secure
|
|
687
|
+
*/
|
|
688
|
+
assistantControllerCreate: (data: CreateAssistantDTO, params?: RequestParams) => Promise<HttpResponse<Assistant, any>>;
|
|
689
|
+
/**
|
|
690
|
+
* No description
|
|
691
|
+
*
|
|
692
|
+
* @tags Assistants
|
|
693
|
+
* @name AssistantControllerFindAll
|
|
694
|
+
* @summary List Assistants
|
|
695
|
+
* @request GET:/assistant
|
|
696
|
+
* @secure
|
|
697
|
+
*/
|
|
698
|
+
assistantControllerFindAll: (params?: RequestParams) => Promise<HttpResponse<Assistant[], any>>;
|
|
699
|
+
/**
|
|
700
|
+
* No description
|
|
701
|
+
*
|
|
702
|
+
* @tags Assistants
|
|
703
|
+
* @name AssistantControllerFindOne
|
|
704
|
+
* @summary Get Assistant
|
|
705
|
+
* @request GET:/assistant/{id}
|
|
706
|
+
* @secure
|
|
707
|
+
*/
|
|
708
|
+
assistantControllerFindOne: (id: string, params?: RequestParams) => Promise<HttpResponse<Assistant, any>>;
|
|
709
|
+
/**
|
|
710
|
+
* No description
|
|
711
|
+
*
|
|
712
|
+
* @tags Assistants
|
|
713
|
+
* @name AssistantControllerUpdate
|
|
714
|
+
* @summary Update Assistant
|
|
715
|
+
* @request PATCH:/assistant/{id}
|
|
716
|
+
* @secure
|
|
717
|
+
*/
|
|
718
|
+
assistantControllerUpdate: (id: string, data: UpdateAssistantDTO, params?: RequestParams) => Promise<HttpResponse<Assistant, any>>;
|
|
719
|
+
/**
|
|
720
|
+
* No description
|
|
721
|
+
*
|
|
722
|
+
* @tags Assistants
|
|
723
|
+
* @name AssistantControllerRemove
|
|
724
|
+
* @summary Delete Assistant
|
|
725
|
+
* @request DELETE:/assistant/{id}
|
|
726
|
+
* @secure
|
|
727
|
+
*/
|
|
728
|
+
assistantControllerRemove: (id: string, params?: RequestParams) => Promise<HttpResponse<Assistant, any>>;
|
|
729
|
+
};
|
|
572
730
|
call: {
|
|
573
731
|
/**
|
|
574
732
|
* No description
|
|
@@ -611,57 +769,81 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
611
769
|
*/
|
|
612
770
|
callControllerCreateWebCall: (data: CreateWebCallDTO, params?: RequestParams) => Promise<HttpResponse<Call, any>>;
|
|
613
771
|
};
|
|
614
|
-
|
|
772
|
+
credential: {
|
|
615
773
|
/**
|
|
616
774
|
* No description
|
|
617
775
|
*
|
|
618
|
-
* @tags
|
|
619
|
-
* @name
|
|
620
|
-
* @summary Create
|
|
621
|
-
* @request POST:/
|
|
776
|
+
* @tags Credentials
|
|
777
|
+
* @name CredentialControllerCreate
|
|
778
|
+
* @summary Create Credential
|
|
779
|
+
* @request POST:/credential
|
|
622
780
|
* @secure
|
|
623
781
|
*/
|
|
624
|
-
|
|
782
|
+
credentialControllerCreate: (data: ({
|
|
783
|
+
provider: "twilio";
|
|
784
|
+
} & CreateTwilioCredentialDTO) | ({
|
|
785
|
+
provider: "deepgram";
|
|
786
|
+
} & CreateDeepgramCredentialDTO) | ({
|
|
787
|
+
provider: "azure-openai";
|
|
788
|
+
} & CreateAzureCredentialDTO) | ({
|
|
789
|
+
provider: "11labs";
|
|
790
|
+
} & CreateElevenLabsCredentialDTO) | ({
|
|
791
|
+
provider: "playht";
|
|
792
|
+
} & CreatePlayHTCredentialDTO) | ({
|
|
793
|
+
provider: "rimeai";
|
|
794
|
+
} & CreateRimeAICredentialDTO), params?: RequestParams) => Promise<HttpResponse<Credential, any>>;
|
|
625
795
|
/**
|
|
626
796
|
* No description
|
|
627
797
|
*
|
|
628
|
-
* @tags
|
|
629
|
-
* @name
|
|
630
|
-
* @summary List
|
|
631
|
-
* @request GET:/
|
|
798
|
+
* @tags Credentials
|
|
799
|
+
* @name CredentialControllerFindAll
|
|
800
|
+
* @summary List Credentials
|
|
801
|
+
* @request GET:/credential
|
|
632
802
|
* @secure
|
|
633
803
|
*/
|
|
634
|
-
|
|
804
|
+
credentialControllerFindAll: (params?: RequestParams) => Promise<HttpResponse<Credential[], any>>;
|
|
635
805
|
/**
|
|
636
806
|
* No description
|
|
637
807
|
*
|
|
638
|
-
* @tags
|
|
639
|
-
* @name
|
|
640
|
-
* @summary Get
|
|
641
|
-
* @request GET:/
|
|
808
|
+
* @tags Credentials
|
|
809
|
+
* @name CredentialControllerFindOne
|
|
810
|
+
* @summary Get Credential
|
|
811
|
+
* @request GET:/credential/{id}
|
|
642
812
|
* @secure
|
|
643
813
|
*/
|
|
644
|
-
|
|
814
|
+
credentialControllerFindOne: (id: string, params?: RequestParams) => Promise<HttpResponse<Credential, any>>;
|
|
645
815
|
/**
|
|
646
816
|
* No description
|
|
647
817
|
*
|
|
648
|
-
* @tags
|
|
649
|
-
* @name
|
|
650
|
-
* @summary Update
|
|
651
|
-
* @request
|
|
818
|
+
* @tags Credentials
|
|
819
|
+
* @name CredentialControllerUpdate
|
|
820
|
+
* @summary Update Credential
|
|
821
|
+
* @request PUT:/credential/{id}
|
|
652
822
|
* @secure
|
|
653
823
|
*/
|
|
654
|
-
|
|
824
|
+
credentialControllerUpdate: (id: string, data: ({
|
|
825
|
+
provider: "twilio";
|
|
826
|
+
} & UpdateTwilioCredentialDTO) | ({
|
|
827
|
+
provider: "deepgram";
|
|
828
|
+
} & UpdateDeepgramCredentialDTO) | ({
|
|
829
|
+
provider: "azure-openai";
|
|
830
|
+
} & UpdateAzureCredentialDTO) | ({
|
|
831
|
+
provider: "11labs";
|
|
832
|
+
} & UpdateElevenLabsCredentialDTO) | ({
|
|
833
|
+
provider: "playht";
|
|
834
|
+
} & UpdatePlayHTCredentialDTO) | ({
|
|
835
|
+
provider: "rimeai";
|
|
836
|
+
} & UpdateRimeAICredentialDTO), params?: RequestParams) => Promise<HttpResponse<Credential, any>>;
|
|
655
837
|
/**
|
|
656
838
|
* No description
|
|
657
839
|
*
|
|
658
|
-
* @tags
|
|
659
|
-
* @name
|
|
660
|
-
* @summary Delete
|
|
661
|
-
* @request DELETE:/
|
|
840
|
+
* @tags Credentials
|
|
841
|
+
* @name CredentialControllerRemove
|
|
842
|
+
* @summary Delete Credential
|
|
843
|
+
* @request DELETE:/credential/{id}
|
|
662
844
|
* @secure
|
|
663
845
|
*/
|
|
664
|
-
|
|
846
|
+
credentialControllerRemove: (id: string, params?: RequestParams) => Promise<HttpResponse<Credential, any>>;
|
|
665
847
|
};
|
|
666
848
|
phoneNumber: {
|
|
667
849
|
/**
|
|
@@ -723,7 +905,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
723
905
|
* @request DELETE:/phone-number/{id}
|
|
724
906
|
* @secure
|
|
725
907
|
*/
|
|
726
|
-
phoneNumberControllerRemove: (id: string, params?: RequestParams) => Promise<HttpResponse<
|
|
908
|
+
phoneNumberControllerRemove: (id: string, params?: RequestParams) => Promise<HttpResponse<PhoneNumber, any>>;
|
|
727
909
|
};
|
|
728
910
|
}
|
|
729
911
|
export {};
|