@vapi-ai/web 1.0.211 → 1.0.213
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 +376 -138
- package/dist/api.d.ts +318 -95
- package/dist/api.js +30 -15
- package/dist/vapi.js +6 -2
- package/package.json +2 -2
- package/vapi.ts +6 -2
package/api.ts
CHANGED
|
@@ -9,34 +9,6 @@
|
|
|
9
9
|
* ---------------------------------------------------------------
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
export interface PhoneCallParams {
|
|
13
|
-
callSid?: string;
|
|
14
|
-
status?: string[];
|
|
15
|
-
customerPhoneNumber: string;
|
|
16
|
-
twilioPhoneNumber: string;
|
|
17
|
-
twilioAccountSid: string;
|
|
18
|
-
twilioAuthToken: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface Call {
|
|
22
|
-
type: "inboundPhoneCall" | "outboundPhoneCall" | "webCall";
|
|
23
|
-
id: string;
|
|
24
|
-
orgId: string;
|
|
25
|
-
createdAt: string;
|
|
26
|
-
updatedAt: string;
|
|
27
|
-
assistantId?: string;
|
|
28
|
-
customerId?: string;
|
|
29
|
-
phoneNumberId?: string;
|
|
30
|
-
startedAt: string;
|
|
31
|
-
endedAt?: string;
|
|
32
|
-
transcript?: string;
|
|
33
|
-
recordingUrl?: string;
|
|
34
|
-
cost?: number;
|
|
35
|
-
summary?: string;
|
|
36
|
-
assistantParams?: object;
|
|
37
|
-
callParams?: PhoneCallParams;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
12
|
export interface OpenAIFunctionParamaters {
|
|
41
13
|
type: string;
|
|
42
14
|
properties: object;
|
|
@@ -44,12 +16,19 @@ export interface OpenAIFunctionParamaters {
|
|
|
44
16
|
}
|
|
45
17
|
|
|
46
18
|
export interface OpenAIFunction {
|
|
47
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* This is the the name of the function to be called.
|
|
21
|
+
*
|
|
22
|
+
* Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
|
|
23
|
+
* @maxLength 64
|
|
24
|
+
*/
|
|
48
25
|
name: string;
|
|
49
|
-
/** This is
|
|
26
|
+
/** This is the description of what the function does, used by the AI to choose when and how to call the function. */
|
|
50
27
|
description?: string;
|
|
51
28
|
/**
|
|
52
|
-
* These are the parameters the functions accepts, described as a JSON Schema object.
|
|
29
|
+
* These are the parameters the functions accepts, described as a JSON Schema object.
|
|
30
|
+
*
|
|
31
|
+
* See the [OpenAI guide](https://platform.openai.com/docs/guides/gpt/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema) for documentation about the format.
|
|
53
32
|
*
|
|
54
33
|
* To describe a function that accepts no parameters, provide the value {"type": "object", "properties": {}}.
|
|
55
34
|
*/
|
|
@@ -62,17 +41,18 @@ export interface CreateAssistantDTO {
|
|
|
62
41
|
/**
|
|
63
42
|
* This is the voice that will be used.
|
|
64
43
|
*
|
|
65
|
-
* Pro Voices: `*-11labs`, `*-playht
|
|
44
|
+
* Pro Voices: `*-11labs`, `*-playht`
|
|
66
45
|
*
|
|
67
|
-
* Basic Voices: `*-azure`
|
|
46
|
+
* Basic Voices: `*-rimeai`, `*-azure`
|
|
68
47
|
*/
|
|
69
48
|
voice?:
|
|
70
|
-
| "
|
|
71
|
-
| "
|
|
72
|
-
| "
|
|
73
|
-
| "
|
|
74
|
-
| "
|
|
75
|
-
| "
|
|
49
|
+
| "jennifer-playht"
|
|
50
|
+
| "melissa-playht"
|
|
51
|
+
| "will-playht"
|
|
52
|
+
| "jack-playht"
|
|
53
|
+
| "ruby-playht"
|
|
54
|
+
| "davis-playht"
|
|
55
|
+
| "donna-playht"
|
|
76
56
|
| "burt-11labs"
|
|
77
57
|
| "andrea-11labs"
|
|
78
58
|
| "phillip-11labs"
|
|
@@ -85,13 +65,6 @@ export interface CreateAssistantDTO {
|
|
|
85
65
|
| "paul-11labs"
|
|
86
66
|
| "mrb-11labs"
|
|
87
67
|
| "matilda-11labs"
|
|
88
|
-
| "jennifer-playht"
|
|
89
|
-
| "melissa-playht"
|
|
90
|
-
| "will-playht"
|
|
91
|
-
| "jack-playht"
|
|
92
|
-
| "ruby-playht"
|
|
93
|
-
| "davis-playht"
|
|
94
|
-
| "donna-playht"
|
|
95
68
|
| "kai-rimeai"
|
|
96
69
|
| "zion-rimeai"
|
|
97
70
|
| "xavier-rimeai"
|
|
@@ -101,45 +74,198 @@ export interface CreateAssistantDTO {
|
|
|
101
74
|
| "colette-rimeai"
|
|
102
75
|
| "daphne-rimeai"
|
|
103
76
|
| "aurora-rimeai"
|
|
104
|
-
| "nova-rimeai"
|
|
105
|
-
|
|
77
|
+
| "nova-rimeai"
|
|
78
|
+
| "davis-azure"
|
|
79
|
+
| "jenny-azure"
|
|
80
|
+
| "aria-azure"
|
|
81
|
+
| "steffan-azure"
|
|
82
|
+
| "sara-azure"
|
|
83
|
+
| "jason-azure";
|
|
84
|
+
/**
|
|
85
|
+
* This is the name of the assistant. This is just for your own reference.
|
|
86
|
+
* @maxLength 40
|
|
87
|
+
*/
|
|
106
88
|
name?: string;
|
|
107
|
-
/** This
|
|
89
|
+
/** This sets the objective and understanding for the assistant. */
|
|
108
90
|
context?: string;
|
|
109
91
|
/** These are the functions that the assistant can execute during the call. */
|
|
110
92
|
functions?: OpenAIFunction[];
|
|
111
|
-
/**
|
|
93
|
+
/**
|
|
94
|
+
* This is the URL Vapi will send GET / POST requests for retrieving context, function calling, and end-of-call reports.
|
|
95
|
+
*
|
|
96
|
+
* All requests will be sent with customerPhoneNumber and all the assistant parameters. You can find more details in the Function Calling documentation.
|
|
97
|
+
*/
|
|
112
98
|
callbackUrl?: string;
|
|
113
|
-
/** This is the number
|
|
99
|
+
/** This is the number to forward to if assistant runs into issues. */
|
|
114
100
|
forwardingPhoneNumber?: string;
|
|
115
|
-
/**
|
|
101
|
+
/**
|
|
102
|
+
* This is the first message that the assistant will say.
|
|
103
|
+
*
|
|
104
|
+
* If unspecified, it will wait for the user to speak.
|
|
105
|
+
* @maxLength 280
|
|
106
|
+
*/
|
|
116
107
|
firstMessage?: string;
|
|
117
|
-
/**
|
|
108
|
+
/** This sets whether calls are recorded for the assistant. */
|
|
118
109
|
recordingEnabled?: boolean;
|
|
119
|
-
/**
|
|
110
|
+
/** This sets whether assistant leaves voicemails when call is not picked up. */
|
|
120
111
|
voicemailEnabled?: boolean;
|
|
121
112
|
}
|
|
122
113
|
|
|
123
|
-
export interface
|
|
124
|
-
/** This is the
|
|
114
|
+
export interface CreateCustomerDTO {
|
|
115
|
+
/** This is the number of the customer. */
|
|
116
|
+
number?: string;
|
|
117
|
+
/**
|
|
118
|
+
* This is the name of the customer. This is just for your own reference.
|
|
119
|
+
* @maxLength 40
|
|
120
|
+
*/
|
|
121
|
+
name?: string;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface ImportTwilioPhoneNumberDTO {
|
|
125
|
+
/** These are the digits of the phone number you own on your Twilio. */
|
|
126
|
+
twilioPhoneNumber: string;
|
|
127
|
+
/** This is your Twilio Account SID that will be used to handle this phone number. */
|
|
128
|
+
twilioAccountSid: string;
|
|
129
|
+
/** This is the Twilio Auth Token that will be used to handle this phone number. */
|
|
130
|
+
twilioAuthToken: string;
|
|
131
|
+
/**
|
|
132
|
+
* This is the name of the phone number. This is just for your own reference.
|
|
133
|
+
* @maxLength 40
|
|
134
|
+
*/
|
|
135
|
+
name?: string;
|
|
136
|
+
/**
|
|
137
|
+
* This is the assistant that will be used for incoming calls to this phone number.
|
|
138
|
+
*
|
|
139
|
+
* If this is not set, then the phone number will not handle incoming calls.
|
|
140
|
+
*/
|
|
141
|
+
assistantId?: string;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface Call {
|
|
145
|
+
type?: "inboundPhoneCall" | "outboundPhoneCall" | "webCall";
|
|
146
|
+
/** This is the unique identifier for the call. */
|
|
147
|
+
id: string;
|
|
148
|
+
/** This is the unique identifier for the org that this call belongs to. */
|
|
149
|
+
orgId: string;
|
|
150
|
+
/**
|
|
151
|
+
* This is the ISO 8601 date-time string of when the call was created.
|
|
152
|
+
* @format date-time
|
|
153
|
+
*/
|
|
154
|
+
createdAt: string;
|
|
155
|
+
/**
|
|
156
|
+
* This is the ISO 8601 date-time string of when the call was last updated.
|
|
157
|
+
* @format date-time
|
|
158
|
+
*/
|
|
159
|
+
updatedAt: string;
|
|
160
|
+
/**
|
|
161
|
+
* This is the ISO 8601 date-time string of when the call was started.
|
|
162
|
+
* @format date-time
|
|
163
|
+
*/
|
|
164
|
+
startedAt?: string;
|
|
165
|
+
/**
|
|
166
|
+
* This is the ISO 8601 date-time string of when the call was ended.
|
|
167
|
+
* @format date-time
|
|
168
|
+
*/
|
|
169
|
+
endedAt?: string;
|
|
170
|
+
/** This is the cost of the call in USD. */
|
|
171
|
+
cost?: number;
|
|
172
|
+
/** This is the transcript of the call. */
|
|
173
|
+
transcript?: string;
|
|
174
|
+
/** This is the URL of the recording of the call. */
|
|
175
|
+
recordingUrl?: string;
|
|
176
|
+
/** This is the summary of the call. */
|
|
177
|
+
summary?: string;
|
|
178
|
+
/**
|
|
179
|
+
* This is the callSid of the phone call.
|
|
180
|
+
*
|
|
181
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
182
|
+
*/
|
|
183
|
+
twilioCallSid?: string;
|
|
184
|
+
/**
|
|
185
|
+
* This is the current status of the call.
|
|
186
|
+
*
|
|
187
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
188
|
+
*/
|
|
189
|
+
twilioCallStatus?: string;
|
|
190
|
+
/**
|
|
191
|
+
* This is the URL of the call that the assistant will join.
|
|
192
|
+
*
|
|
193
|
+
* Only relevant for `webCall` type.
|
|
194
|
+
*/
|
|
195
|
+
webCallUrl?: string;
|
|
196
|
+
/** This is set if the call experienced an error. */
|
|
197
|
+
error?: string;
|
|
198
|
+
/** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
|
|
125
199
|
assistantId?: string;
|
|
126
200
|
/** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
|
|
127
201
|
assistant?: CreateAssistantDTO;
|
|
128
|
-
/**
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
202
|
+
/**
|
|
203
|
+
* This is the customer that will be called. To call a transient customer , use `customer` instead.
|
|
204
|
+
*
|
|
205
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
206
|
+
*/
|
|
207
|
+
customerId?: string;
|
|
208
|
+
/**
|
|
209
|
+
* This is the customer that will be called. To call an existing customer, use `customerId` instead.
|
|
210
|
+
*
|
|
211
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
212
|
+
*/
|
|
213
|
+
customer?: CreateCustomerDTO;
|
|
214
|
+
/**
|
|
215
|
+
* This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.
|
|
216
|
+
*
|
|
217
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
218
|
+
*/
|
|
219
|
+
phoneNumberId?: string;
|
|
220
|
+
/**
|
|
221
|
+
* This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead.
|
|
222
|
+
*
|
|
223
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
224
|
+
*/
|
|
225
|
+
phoneNumber?: ImportTwilioPhoneNumberDTO;
|
|
132
226
|
}
|
|
133
227
|
|
|
134
|
-
export interface
|
|
135
|
-
/**
|
|
228
|
+
export interface CreateOutboundCallDTO {
|
|
229
|
+
/**
|
|
230
|
+
* Use `customer` instead.
|
|
231
|
+
* @deprecated
|
|
232
|
+
*/
|
|
233
|
+
customerPhoneNumber?: string;
|
|
234
|
+
/** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
|
|
136
235
|
assistantId?: string;
|
|
137
236
|
/** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
|
|
138
237
|
assistant?: CreateAssistantDTO;
|
|
238
|
+
/**
|
|
239
|
+
* This is the customer that will be called. To call a transient customer , use `customer` instead.
|
|
240
|
+
*
|
|
241
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
242
|
+
*/
|
|
243
|
+
customerId?: string;
|
|
244
|
+
/**
|
|
245
|
+
* This is the customer that will be called. To call an existing customer, use `customerId` instead.
|
|
246
|
+
*
|
|
247
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
248
|
+
*/
|
|
249
|
+
customer?: CreateCustomerDTO;
|
|
250
|
+
/**
|
|
251
|
+
* This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.
|
|
252
|
+
*
|
|
253
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
254
|
+
*/
|
|
255
|
+
phoneNumberId?: string;
|
|
256
|
+
/**
|
|
257
|
+
* This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead.
|
|
258
|
+
*
|
|
259
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
260
|
+
*/
|
|
261
|
+
phoneNumber?: ImportTwilioPhoneNumberDTO;
|
|
139
262
|
}
|
|
140
263
|
|
|
141
|
-
export interface
|
|
142
|
-
|
|
264
|
+
export interface CreateWebCallDTO {
|
|
265
|
+
/** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
|
|
266
|
+
assistantId?: string;
|
|
267
|
+
/** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
|
|
268
|
+
assistant?: CreateAssistantDTO;
|
|
143
269
|
}
|
|
144
270
|
|
|
145
271
|
export interface Assistant {
|
|
@@ -148,17 +274,18 @@ export interface Assistant {
|
|
|
148
274
|
/**
|
|
149
275
|
* This is the voice that will be used.
|
|
150
276
|
*
|
|
151
|
-
* Pro Voices: `*-11labs`, `*-playht
|
|
277
|
+
* Pro Voices: `*-11labs`, `*-playht`
|
|
152
278
|
*
|
|
153
|
-
* Basic Voices: `*-azure`
|
|
279
|
+
* Basic Voices: `*-rimeai`, `*-azure`
|
|
154
280
|
*/
|
|
155
281
|
voice?:
|
|
156
|
-
| "
|
|
157
|
-
| "
|
|
158
|
-
| "
|
|
159
|
-
| "
|
|
160
|
-
| "
|
|
161
|
-
| "
|
|
282
|
+
| "jennifer-playht"
|
|
283
|
+
| "melissa-playht"
|
|
284
|
+
| "will-playht"
|
|
285
|
+
| "jack-playht"
|
|
286
|
+
| "ruby-playht"
|
|
287
|
+
| "davis-playht"
|
|
288
|
+
| "donna-playht"
|
|
162
289
|
| "burt-11labs"
|
|
163
290
|
| "andrea-11labs"
|
|
164
291
|
| "phillip-11labs"
|
|
@@ -171,13 +298,6 @@ export interface Assistant {
|
|
|
171
298
|
| "paul-11labs"
|
|
172
299
|
| "mrb-11labs"
|
|
173
300
|
| "matilda-11labs"
|
|
174
|
-
| "jennifer-playht"
|
|
175
|
-
| "melissa-playht"
|
|
176
|
-
| "will-playht"
|
|
177
|
-
| "jack-playht"
|
|
178
|
-
| "ruby-playht"
|
|
179
|
-
| "davis-playht"
|
|
180
|
-
| "donna-playht"
|
|
181
301
|
| "kai-rimeai"
|
|
182
302
|
| "zion-rimeai"
|
|
183
303
|
| "xavier-rimeai"
|
|
@@ -187,31 +307,55 @@ export interface Assistant {
|
|
|
187
307
|
| "colette-rimeai"
|
|
188
308
|
| "daphne-rimeai"
|
|
189
309
|
| "aurora-rimeai"
|
|
190
|
-
| "nova-rimeai"
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
|
|
199
|
-
|
|
310
|
+
| "nova-rimeai"
|
|
311
|
+
| "davis-azure"
|
|
312
|
+
| "jenny-azure"
|
|
313
|
+
| "aria-azure"
|
|
314
|
+
| "steffan-azure"
|
|
315
|
+
| "sara-azure"
|
|
316
|
+
| "jason-azure";
|
|
317
|
+
/**
|
|
318
|
+
* This is the name of the assistant. This is just for your own reference.
|
|
319
|
+
* @maxLength 40
|
|
320
|
+
*/
|
|
200
321
|
name?: string;
|
|
201
|
-
/** This
|
|
322
|
+
/** This sets the objective and understanding for the assistant. */
|
|
202
323
|
context?: string;
|
|
203
324
|
/** These are the functions that the assistant can execute during the call. */
|
|
204
325
|
functions?: OpenAIFunction[];
|
|
205
|
-
/**
|
|
326
|
+
/**
|
|
327
|
+
* This is the URL Vapi will send GET / POST requests for retrieving context, function calling, and end-of-call reports.
|
|
328
|
+
*
|
|
329
|
+
* All requests will be sent with customerPhoneNumber and all the assistant parameters. You can find more details in the Function Calling documentation.
|
|
330
|
+
*/
|
|
206
331
|
callbackUrl?: string;
|
|
207
|
-
/** This is the number
|
|
332
|
+
/** This is the number to forward to if assistant runs into issues. */
|
|
208
333
|
forwardingPhoneNumber?: string;
|
|
209
|
-
/**
|
|
334
|
+
/**
|
|
335
|
+
* This is the first message that the assistant will say.
|
|
336
|
+
*
|
|
337
|
+
* If unspecified, it will wait for the user to speak.
|
|
338
|
+
* @maxLength 280
|
|
339
|
+
*/
|
|
210
340
|
firstMessage?: string;
|
|
211
|
-
/**
|
|
341
|
+
/** This sets whether calls are recorded for the assistant. */
|
|
212
342
|
recordingEnabled?: boolean;
|
|
213
|
-
/**
|
|
343
|
+
/** This sets whether assistant leaves voicemails when call is not picked up. */
|
|
214
344
|
voicemailEnabled?: boolean;
|
|
345
|
+
/** This is the unique identifier for the assistant. */
|
|
346
|
+
id: string;
|
|
347
|
+
/** This is the unique identifier for the org that this assistant belongs to. */
|
|
348
|
+
orgId: string;
|
|
349
|
+
/**
|
|
350
|
+
* This is the ISO 8601 date-time string of when the assistant was created.
|
|
351
|
+
* @format date-time
|
|
352
|
+
*/
|
|
353
|
+
createdAt: string;
|
|
354
|
+
/**
|
|
355
|
+
* This is the ISO 8601 date-time string of when the assistant was last updated.
|
|
356
|
+
* @format date-time
|
|
357
|
+
*/
|
|
358
|
+
updatedAt: string;
|
|
215
359
|
}
|
|
216
360
|
|
|
217
361
|
export interface UpdateAssistantDTO {
|
|
@@ -220,17 +364,18 @@ export interface UpdateAssistantDTO {
|
|
|
220
364
|
/**
|
|
221
365
|
* This is the voice that will be used.
|
|
222
366
|
*
|
|
223
|
-
* Pro Voices: `*-11labs`, `*-playht
|
|
367
|
+
* Pro Voices: `*-11labs`, `*-playht`
|
|
224
368
|
*
|
|
225
|
-
* Basic Voices: `*-azure`
|
|
369
|
+
* Basic Voices: `*-rimeai`, `*-azure`
|
|
226
370
|
*/
|
|
227
371
|
voice?:
|
|
228
|
-
| "
|
|
229
|
-
| "
|
|
230
|
-
| "
|
|
231
|
-
| "
|
|
232
|
-
| "
|
|
233
|
-
| "
|
|
372
|
+
| "jennifer-playht"
|
|
373
|
+
| "melissa-playht"
|
|
374
|
+
| "will-playht"
|
|
375
|
+
| "jack-playht"
|
|
376
|
+
| "ruby-playht"
|
|
377
|
+
| "davis-playht"
|
|
378
|
+
| "donna-playht"
|
|
234
379
|
| "burt-11labs"
|
|
235
380
|
| "andrea-11labs"
|
|
236
381
|
| "phillip-11labs"
|
|
@@ -243,13 +388,6 @@ export interface UpdateAssistantDTO {
|
|
|
243
388
|
| "paul-11labs"
|
|
244
389
|
| "mrb-11labs"
|
|
245
390
|
| "matilda-11labs"
|
|
246
|
-
| "jennifer-playht"
|
|
247
|
-
| "melissa-playht"
|
|
248
|
-
| "will-playht"
|
|
249
|
-
| "jack-playht"
|
|
250
|
-
| "ruby-playht"
|
|
251
|
-
| "davis-playht"
|
|
252
|
-
| "donna-playht"
|
|
253
391
|
| "kai-rimeai"
|
|
254
392
|
| "zion-rimeai"
|
|
255
393
|
| "xavier-rimeai"
|
|
@@ -259,53 +397,122 @@ export interface UpdateAssistantDTO {
|
|
|
259
397
|
| "colette-rimeai"
|
|
260
398
|
| "daphne-rimeai"
|
|
261
399
|
| "aurora-rimeai"
|
|
262
|
-
| "nova-rimeai"
|
|
263
|
-
|
|
400
|
+
| "nova-rimeai"
|
|
401
|
+
| "davis-azure"
|
|
402
|
+
| "jenny-azure"
|
|
403
|
+
| "aria-azure"
|
|
404
|
+
| "steffan-azure"
|
|
405
|
+
| "sara-azure"
|
|
406
|
+
| "jason-azure";
|
|
407
|
+
/**
|
|
408
|
+
* This is the name of the assistant. This is just for your own reference.
|
|
409
|
+
* @maxLength 40
|
|
410
|
+
*/
|
|
264
411
|
name?: string;
|
|
265
|
-
/** This
|
|
412
|
+
/** This sets the objective and understanding for the assistant. */
|
|
266
413
|
context?: string;
|
|
267
414
|
/** These are the functions that the assistant can execute during the call. */
|
|
268
415
|
functions?: OpenAIFunction[];
|
|
269
|
-
/**
|
|
416
|
+
/**
|
|
417
|
+
* This is the URL Vapi will send GET / POST requests for retrieving context, function calling, and end-of-call reports.
|
|
418
|
+
*
|
|
419
|
+
* All requests will be sent with customerPhoneNumber and all the assistant parameters. You can find more details in the Function Calling documentation.
|
|
420
|
+
*/
|
|
270
421
|
callbackUrl?: string;
|
|
271
|
-
/** This is the number
|
|
422
|
+
/** This is the number to forward to if assistant runs into issues. */
|
|
272
423
|
forwardingPhoneNumber?: string;
|
|
273
|
-
/**
|
|
424
|
+
/**
|
|
425
|
+
* This is the first message that the assistant will say.
|
|
426
|
+
*
|
|
427
|
+
* If unspecified, it will wait for the user to speak.
|
|
428
|
+
* @maxLength 280
|
|
429
|
+
*/
|
|
274
430
|
firstMessage?: string;
|
|
275
|
-
/**
|
|
431
|
+
/** This sets whether calls are recorded for the assistant. */
|
|
276
432
|
recordingEnabled?: boolean;
|
|
277
|
-
/**
|
|
433
|
+
/** This sets whether assistant leaves voicemails when call is not picked up. */
|
|
278
434
|
voicemailEnabled?: boolean;
|
|
279
435
|
}
|
|
280
436
|
|
|
281
|
-
export interface
|
|
282
|
-
/**
|
|
437
|
+
export interface BuyPhoneNumberDTO {
|
|
438
|
+
/**
|
|
439
|
+
* This is the area code of the phone number to purchase.
|
|
440
|
+
* @minLength 3
|
|
441
|
+
* @maxLength 3
|
|
442
|
+
*/
|
|
283
443
|
areaCode: string;
|
|
444
|
+
/**
|
|
445
|
+
* This is the name of the phone number. This is just for your own reference.
|
|
446
|
+
* @maxLength 40
|
|
447
|
+
*/
|
|
448
|
+
name?: string;
|
|
449
|
+
/**
|
|
450
|
+
* This is the assistant that will be used for incoming calls to this phone number.
|
|
451
|
+
*
|
|
452
|
+
* If this is not set, then the phone number will not handle incoming calls.
|
|
453
|
+
*/
|
|
284
454
|
assistantId?: string;
|
|
285
455
|
}
|
|
286
456
|
|
|
287
457
|
export interface PhoneNumber {
|
|
458
|
+
/** This is the unique identifier for the phone number. */
|
|
288
459
|
id: string;
|
|
460
|
+
/** This is the unique identifier for the org that this phone number belongs to. */
|
|
461
|
+
orgId: string;
|
|
462
|
+
/**
|
|
463
|
+
* This is the ISO 8601 date-time string of when the phone number was created.
|
|
464
|
+
* @format date-time
|
|
465
|
+
*/
|
|
289
466
|
createdAt: string;
|
|
467
|
+
/**
|
|
468
|
+
* This is the ISO 8601 date-time string of when the phone number was last updated.
|
|
469
|
+
* @format date-time
|
|
470
|
+
*/
|
|
290
471
|
updatedAt: string;
|
|
291
|
-
|
|
472
|
+
/** This is the subscription for the phone number. */
|
|
292
473
|
stripeSubscriptionId?: string;
|
|
474
|
+
/** This is the subscription's status. */
|
|
475
|
+
stripeSubscriptionStatus?: string;
|
|
476
|
+
/** This is the subscription's current period start. */
|
|
477
|
+
stripeSubscriptionCurrentPeriodStart?: string;
|
|
478
|
+
/** These are the digits of the phone number. */
|
|
293
479
|
number: string;
|
|
294
|
-
|
|
480
|
+
/**
|
|
481
|
+
* This is the Twilio Account SID for the phone number.
|
|
482
|
+
*
|
|
483
|
+
* This is for numbers not bought on Vapi.
|
|
484
|
+
*/
|
|
295
485
|
twilioAccountSid?: string;
|
|
486
|
+
/**
|
|
487
|
+
* This is the Twilio Auth Token for the phone number.
|
|
488
|
+
*
|
|
489
|
+
* This is for numbers not bought on Vapi.
|
|
490
|
+
*/
|
|
296
491
|
twilioAuthToken?: string;
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
492
|
+
/**
|
|
493
|
+
* This is the name of the phone number. This is just for your own reference.
|
|
494
|
+
* @maxLength 40
|
|
495
|
+
*/
|
|
496
|
+
name?: string;
|
|
497
|
+
/**
|
|
498
|
+
* This is the assistant that will be used for incoming calls to this phone number.
|
|
499
|
+
*
|
|
500
|
+
* If this is not set, then the phone number will not handle incoming calls.
|
|
501
|
+
*/
|
|
304
502
|
assistantId?: string;
|
|
305
503
|
}
|
|
306
504
|
|
|
307
|
-
export interface
|
|
308
|
-
/**
|
|
505
|
+
export interface UpdatePhoneNumberDTO {
|
|
506
|
+
/**
|
|
507
|
+
* This is the name of the phone number. This is just for your own reference.
|
|
508
|
+
* @maxLength 40
|
|
509
|
+
*/
|
|
510
|
+
name?: string;
|
|
511
|
+
/**
|
|
512
|
+
* This is the assistant that will be used for incoming calls to this phone number.
|
|
513
|
+
*
|
|
514
|
+
* If this is not set, then the phone number will not handle incoming calls.
|
|
515
|
+
*/
|
|
309
516
|
assistantId?: string;
|
|
310
517
|
}
|
|
311
518
|
|
|
@@ -535,11 +742,13 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
535
742
|
* @name CallControllerFindAll
|
|
536
743
|
* @summary List Calls
|
|
537
744
|
* @request GET:/call
|
|
745
|
+
* @secure
|
|
538
746
|
*/
|
|
539
747
|
callControllerFindAll: (params: RequestParams = {}) =>
|
|
540
748
|
this.request<Call[], any>({
|
|
541
749
|
path: `/call`,
|
|
542
750
|
method: "GET",
|
|
751
|
+
secure: true,
|
|
543
752
|
format: "json",
|
|
544
753
|
...params,
|
|
545
754
|
}),
|
|
@@ -551,11 +760,13 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
551
760
|
* @name CallControllerFindOne
|
|
552
761
|
* @summary Get Call
|
|
553
762
|
* @request GET:/call/{id}
|
|
763
|
+
* @secure
|
|
554
764
|
*/
|
|
555
765
|
callControllerFindOne: (id: string, params: RequestParams = {}) =>
|
|
556
766
|
this.request<Call, any>({
|
|
557
767
|
path: `/call/${id}`,
|
|
558
768
|
method: "GET",
|
|
769
|
+
secure: true,
|
|
559
770
|
format: "json",
|
|
560
771
|
...params,
|
|
561
772
|
}),
|
|
@@ -567,12 +778,14 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
567
778
|
* @name CallControllerCreatePhoneCall
|
|
568
779
|
* @summary Create Phone Call
|
|
569
780
|
* @request POST:/call/phone
|
|
781
|
+
* @secure
|
|
570
782
|
*/
|
|
571
|
-
callControllerCreatePhoneCall: (data:
|
|
783
|
+
callControllerCreatePhoneCall: (data: CreateOutboundCallDTO, params: RequestParams = {}) =>
|
|
572
784
|
this.request<Call, any>({
|
|
573
785
|
path: `/call/phone`,
|
|
574
786
|
method: "POST",
|
|
575
787
|
body: data,
|
|
788
|
+
secure: true,
|
|
576
789
|
type: ContentType.Json,
|
|
577
790
|
format: "json",
|
|
578
791
|
...params,
|
|
@@ -585,12 +798,14 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
585
798
|
* @name CallControllerCreateWebCall
|
|
586
799
|
* @summary Create Web Call
|
|
587
800
|
* @request POST:/call/web
|
|
801
|
+
* @secure
|
|
588
802
|
*/
|
|
589
|
-
callControllerCreateWebCall: (data:
|
|
590
|
-
this.request<
|
|
803
|
+
callControllerCreateWebCall: (data: CreateWebCallDTO, params: RequestParams = {}) =>
|
|
804
|
+
this.request<Call, any>({
|
|
591
805
|
path: `/call/web`,
|
|
592
806
|
method: "POST",
|
|
593
807
|
body: data,
|
|
808
|
+
secure: true,
|
|
594
809
|
type: ContentType.Json,
|
|
595
810
|
format: "json",
|
|
596
811
|
...params,
|
|
@@ -604,12 +819,14 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
604
819
|
* @name AssistantControllerCreate
|
|
605
820
|
* @summary Create Assistant
|
|
606
821
|
* @request POST:/assistant
|
|
822
|
+
* @secure
|
|
607
823
|
*/
|
|
608
824
|
assistantControllerCreate: (data: CreateAssistantDTO, params: RequestParams = {}) =>
|
|
609
825
|
this.request<Assistant, any>({
|
|
610
826
|
path: `/assistant`,
|
|
611
827
|
method: "POST",
|
|
612
828
|
body: data,
|
|
829
|
+
secure: true,
|
|
613
830
|
type: ContentType.Json,
|
|
614
831
|
format: "json",
|
|
615
832
|
...params,
|
|
@@ -622,11 +839,13 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
622
839
|
* @name AssistantControllerFindAll
|
|
623
840
|
* @summary List Assistants
|
|
624
841
|
* @request GET:/assistant
|
|
842
|
+
* @secure
|
|
625
843
|
*/
|
|
626
844
|
assistantControllerFindAll: (params: RequestParams = {}) =>
|
|
627
845
|
this.request<Assistant[], any>({
|
|
628
846
|
path: `/assistant`,
|
|
629
847
|
method: "GET",
|
|
848
|
+
secure: true,
|
|
630
849
|
format: "json",
|
|
631
850
|
...params,
|
|
632
851
|
}),
|
|
@@ -638,11 +857,13 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
638
857
|
* @name AssistantControllerFindOne
|
|
639
858
|
* @summary Get Assistant
|
|
640
859
|
* @request GET:/assistant/{id}
|
|
860
|
+
* @secure
|
|
641
861
|
*/
|
|
642
862
|
assistantControllerFindOne: (id: string, params: RequestParams = {}) =>
|
|
643
863
|
this.request<Assistant, any>({
|
|
644
864
|
path: `/assistant/${id}`,
|
|
645
865
|
method: "GET",
|
|
866
|
+
secure: true,
|
|
646
867
|
format: "json",
|
|
647
868
|
...params,
|
|
648
869
|
}),
|
|
@@ -654,12 +875,14 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
654
875
|
* @name AssistantControllerUpdate
|
|
655
876
|
* @summary Update Assistant
|
|
656
877
|
* @request PATCH:/assistant/{id}
|
|
878
|
+
* @secure
|
|
657
879
|
*/
|
|
658
880
|
assistantControllerUpdate: (id: string, data: UpdateAssistantDTO, params: RequestParams = {}) =>
|
|
659
881
|
this.request<Assistant, any>({
|
|
660
882
|
path: `/assistant/${id}`,
|
|
661
883
|
method: "PATCH",
|
|
662
884
|
body: data,
|
|
885
|
+
secure: true,
|
|
663
886
|
type: ContentType.Json,
|
|
664
887
|
format: "json",
|
|
665
888
|
...params,
|
|
@@ -672,11 +895,14 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
672
895
|
* @name AssistantControllerRemove
|
|
673
896
|
* @summary Delete Assistant
|
|
674
897
|
* @request DELETE:/assistant/{id}
|
|
898
|
+
* @secure
|
|
675
899
|
*/
|
|
676
900
|
assistantControllerRemove: (id: string, params: RequestParams = {}) =>
|
|
677
|
-
this.request<
|
|
901
|
+
this.request<Assistant, any>({
|
|
678
902
|
path: `/assistant/${id}`,
|
|
679
903
|
method: "DELETE",
|
|
904
|
+
secure: true,
|
|
905
|
+
format: "json",
|
|
680
906
|
...params,
|
|
681
907
|
}),
|
|
682
908
|
};
|
|
@@ -688,12 +914,14 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
688
914
|
* @name PhoneNumberControllerBuy
|
|
689
915
|
* @summary Buy Phone Number
|
|
690
916
|
* @request POST:/phone-number/buy
|
|
917
|
+
* @secure
|
|
691
918
|
*/
|
|
692
|
-
phoneNumberControllerBuy: (data:
|
|
919
|
+
phoneNumberControllerBuy: (data: BuyPhoneNumberDTO, params: RequestParams = {}) =>
|
|
693
920
|
this.request<PhoneNumber, any>({
|
|
694
921
|
path: `/phone-number/buy`,
|
|
695
922
|
method: "POST",
|
|
696
923
|
body: data,
|
|
924
|
+
secure: true,
|
|
697
925
|
type: ContentType.Json,
|
|
698
926
|
format: "json",
|
|
699
927
|
...params,
|
|
@@ -706,12 +934,14 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
706
934
|
* @name PhoneNumberControllerImport
|
|
707
935
|
* @summary Import Twilio Number
|
|
708
936
|
* @request POST:/phone-number/import
|
|
937
|
+
* @secure
|
|
709
938
|
*/
|
|
710
|
-
phoneNumberControllerImport: (data:
|
|
939
|
+
phoneNumberControllerImport: (data: ImportTwilioPhoneNumberDTO, params: RequestParams = {}) =>
|
|
711
940
|
this.request<PhoneNumber, any>({
|
|
712
941
|
path: `/phone-number/import`,
|
|
713
942
|
method: "POST",
|
|
714
943
|
body: data,
|
|
944
|
+
secure: true,
|
|
715
945
|
type: ContentType.Json,
|
|
716
946
|
format: "json",
|
|
717
947
|
...params,
|
|
@@ -724,11 +954,13 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
724
954
|
* @name PhoneNumberControllerFindAll
|
|
725
955
|
* @summary List Phone Numbers
|
|
726
956
|
* @request GET:/phone-number
|
|
957
|
+
* @secure
|
|
727
958
|
*/
|
|
728
959
|
phoneNumberControllerFindAll: (params: RequestParams = {}) =>
|
|
729
960
|
this.request<PhoneNumber[], any>({
|
|
730
961
|
path: `/phone-number`,
|
|
731
962
|
method: "GET",
|
|
963
|
+
secure: true,
|
|
732
964
|
format: "json",
|
|
733
965
|
...params,
|
|
734
966
|
}),
|
|
@@ -740,11 +972,13 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
740
972
|
* @name PhoneNumberControllerFindOne
|
|
741
973
|
* @summary Get Phone Number
|
|
742
974
|
* @request GET:/phone-number/{id}
|
|
975
|
+
* @secure
|
|
743
976
|
*/
|
|
744
977
|
phoneNumberControllerFindOne: (id: string, params: RequestParams = {}) =>
|
|
745
978
|
this.request<PhoneNumber, any>({
|
|
746
979
|
path: `/phone-number/${id}`,
|
|
747
980
|
method: "GET",
|
|
981
|
+
secure: true,
|
|
748
982
|
format: "json",
|
|
749
983
|
...params,
|
|
750
984
|
}),
|
|
@@ -756,12 +990,14 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
756
990
|
* @name PhoneNumberControllerUpdate
|
|
757
991
|
* @summary Update Phone Number
|
|
758
992
|
* @request PATCH:/phone-number/{id}
|
|
993
|
+
* @secure
|
|
759
994
|
*/
|
|
760
|
-
phoneNumberControllerUpdate: (id: string, data:
|
|
995
|
+
phoneNumberControllerUpdate: (id: string, data: UpdatePhoneNumberDTO, params: RequestParams = {}) =>
|
|
761
996
|
this.request<PhoneNumber, any>({
|
|
762
997
|
path: `/phone-number/${id}`,
|
|
763
998
|
method: "PATCH",
|
|
764
999
|
body: data,
|
|
1000
|
+
secure: true,
|
|
765
1001
|
type: ContentType.Json,
|
|
766
1002
|
format: "json",
|
|
767
1003
|
...params,
|
|
@@ -774,11 +1010,13 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|
|
774
1010
|
* @name PhoneNumberControllerRemove
|
|
775
1011
|
* @summary Delete Phone Number
|
|
776
1012
|
* @request DELETE:/phone-number/{id}
|
|
1013
|
+
* @secure
|
|
777
1014
|
*/
|
|
778
1015
|
phoneNumberControllerRemove: (id: string, params: RequestParams = {}) =>
|
|
779
1016
|
this.request<void, any>({
|
|
780
1017
|
path: `/phone-number/${id}`,
|
|
781
1018
|
method: "DELETE",
|
|
1019
|
+
secure: true,
|
|
782
1020
|
...params,
|
|
783
1021
|
}),
|
|
784
1022
|
};
|