@vapi-ai/web 1.0.212 → 1.0.214
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 +355 -135
- package/dist/api.d.ts +318 -95
- package/dist/api.js +30 -15
- package/dist/vapi.js +5 -2
- package/package.json +1 -1
- package/vapi.ts +5 -2
package/dist/api.d.ts
CHANGED
|
@@ -1,41 +1,22 @@
|
|
|
1
|
-
export interface PhoneCallParams {
|
|
2
|
-
callSid?: string;
|
|
3
|
-
status?: string[];
|
|
4
|
-
customerPhoneNumber: string;
|
|
5
|
-
twilioPhoneNumber: string;
|
|
6
|
-
twilioAccountSid: string;
|
|
7
|
-
twilioAuthToken: string;
|
|
8
|
-
}
|
|
9
|
-
export interface Call {
|
|
10
|
-
type: "inboundPhoneCall" | "outboundPhoneCall" | "webCall";
|
|
11
|
-
id: string;
|
|
12
|
-
orgId: string;
|
|
13
|
-
createdAt: string;
|
|
14
|
-
updatedAt: string;
|
|
15
|
-
assistantId?: string;
|
|
16
|
-
customerId?: string;
|
|
17
|
-
phoneNumberId?: string;
|
|
18
|
-
startedAt: string;
|
|
19
|
-
endedAt?: string;
|
|
20
|
-
transcript?: string;
|
|
21
|
-
recordingUrl?: string;
|
|
22
|
-
cost?: number;
|
|
23
|
-
summary?: string;
|
|
24
|
-
assistantParams?: object;
|
|
25
|
-
callParams?: PhoneCallParams;
|
|
26
|
-
}
|
|
27
1
|
export interface OpenAIFunctionParamaters {
|
|
28
2
|
type: string;
|
|
29
3
|
properties: object;
|
|
30
4
|
required?: string[];
|
|
31
5
|
}
|
|
32
6
|
export interface OpenAIFunction {
|
|
33
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* This is the the name of the function to be called.
|
|
9
|
+
*
|
|
10
|
+
* Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
|
|
11
|
+
* @maxLength 64
|
|
12
|
+
*/
|
|
34
13
|
name: string;
|
|
35
|
-
/** This is
|
|
14
|
+
/** This is the description of what the function does, used by the AI to choose when and how to call the function. */
|
|
36
15
|
description?: string;
|
|
37
16
|
/**
|
|
38
|
-
* These are the parameters the functions accepts, described as a JSON Schema object.
|
|
17
|
+
* These are the parameters the functions accepts, described as a JSON Schema object.
|
|
18
|
+
*
|
|
19
|
+
* 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.
|
|
39
20
|
*
|
|
40
21
|
* To describe a function that accepts no parameters, provide the value {"type": "object", "properties": {}}.
|
|
41
22
|
*/
|
|
@@ -47,46 +28,191 @@ export interface CreateAssistantDTO {
|
|
|
47
28
|
/**
|
|
48
29
|
* This is the voice that will be used.
|
|
49
30
|
*
|
|
50
|
-
* Pro Voices: `*-11labs`, `*-playht
|
|
31
|
+
* Pro Voices: `*-11labs`, `*-playht`
|
|
51
32
|
*
|
|
52
|
-
* Basic Voices: `*-
|
|
33
|
+
* Basic Voices: `*-rimeai`
|
|
34
|
+
*/
|
|
35
|
+
voice?: "jennifer-playht" | "melissa-playht" | "will-playht" | "jack-playht" | "ruby-playht" | "davis-playht" | "donna-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";
|
|
36
|
+
/**
|
|
37
|
+
* This is the name of the assistant. This is just for your own reference.
|
|
38
|
+
* @maxLength 40
|
|
53
39
|
*/
|
|
54
|
-
voice?: "davis-azure" | "jenny-azure" | "aria-azure" | "steffan-azure" | "sara-azure" | "jason-azure" | "burt-11labs" | "andrea-11labs" | "phillip-11labs" | "steve-11labs" | "joseph-11labs" | "myra-11labs" | "paula-11labs" | "ryan-11labs" | "drew-11labs" | "paul-11labs" | "mrb-11labs" | "matilda-11labs" | "jennifer-playht" | "melissa-playht" | "will-playht" | "jack-playht" | "ruby-playht" | "davis-playht" | "donna-playht" | "kai-rimeai" | "zion-rimeai" | "xavier-rimeai" | "marty-rimeai" | "hudson-rimeai" | "savannah-rimeai" | "colette-rimeai" | "daphne-rimeai" | "aurora-rimeai" | "nova-rimeai";
|
|
55
|
-
/** This is the assistant’s name, just for your own reference. */
|
|
56
40
|
name?: string;
|
|
57
|
-
/** This
|
|
41
|
+
/** This sets the objective and understanding for the assistant. */
|
|
58
42
|
context?: string;
|
|
59
43
|
/** These are the functions that the assistant can execute during the call. */
|
|
60
44
|
functions?: OpenAIFunction[];
|
|
61
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* This is the URL Vapi will send GET / POST requests for retrieving context, function calling, and end-of-call reports.
|
|
47
|
+
*
|
|
48
|
+
* All requests will be sent with customerPhoneNumber and all the assistant parameters. You can find more details in the Function Calling documentation.
|
|
49
|
+
*/
|
|
62
50
|
callbackUrl?: string;
|
|
63
|
-
/** This is the number
|
|
51
|
+
/** This is the number to forward to if assistant runs into issues. */
|
|
64
52
|
forwardingPhoneNumber?: string;
|
|
65
|
-
/**
|
|
53
|
+
/**
|
|
54
|
+
* This is the first message that the assistant will say.
|
|
55
|
+
*
|
|
56
|
+
* If unspecified, it will wait for the user to speak.
|
|
57
|
+
* @maxLength 280
|
|
58
|
+
*/
|
|
66
59
|
firstMessage?: string;
|
|
67
|
-
/**
|
|
60
|
+
/** This sets whether calls are recorded for the assistant. */
|
|
68
61
|
recordingEnabled?: boolean;
|
|
69
|
-
/**
|
|
62
|
+
/** This sets whether assistant leaves voicemails when call is not picked up. */
|
|
70
63
|
voicemailEnabled?: boolean;
|
|
71
64
|
}
|
|
72
|
-
export interface
|
|
73
|
-
/** This is the
|
|
65
|
+
export interface CreateCustomerDTO {
|
|
66
|
+
/** This is the number of the customer. */
|
|
67
|
+
number?: string;
|
|
68
|
+
/**
|
|
69
|
+
* This is the name of the customer. This is just for your own reference.
|
|
70
|
+
* @maxLength 40
|
|
71
|
+
*/
|
|
72
|
+
name?: string;
|
|
73
|
+
}
|
|
74
|
+
export interface ImportTwilioPhoneNumberDTO {
|
|
75
|
+
/** These are the digits of the phone number you own on your Twilio. */
|
|
76
|
+
twilioPhoneNumber: string;
|
|
77
|
+
/** This is your Twilio Account SID that will be used to handle this phone number. */
|
|
78
|
+
twilioAccountSid: string;
|
|
79
|
+
/** This is the Twilio Auth Token that will be used to handle this phone number. */
|
|
80
|
+
twilioAuthToken: string;
|
|
81
|
+
/**
|
|
82
|
+
* This is the name of the phone number. This is just for your own reference.
|
|
83
|
+
* @maxLength 40
|
|
84
|
+
*/
|
|
85
|
+
name?: string;
|
|
86
|
+
/**
|
|
87
|
+
* This is the assistant that will be used for incoming calls to this phone number.
|
|
88
|
+
*
|
|
89
|
+
* If this is not set, then the phone number will not handle incoming calls.
|
|
90
|
+
*/
|
|
91
|
+
assistantId?: string;
|
|
92
|
+
}
|
|
93
|
+
export interface Call {
|
|
94
|
+
type?: "inboundPhoneCall" | "outboundPhoneCall" | "webCall";
|
|
95
|
+
/** This is the unique identifier for the call. */
|
|
96
|
+
id: string;
|
|
97
|
+
/** This is the unique identifier for the org that this call belongs to. */
|
|
98
|
+
orgId: string;
|
|
99
|
+
/**
|
|
100
|
+
* This is the ISO 8601 date-time string of when the call was created.
|
|
101
|
+
* @format date-time
|
|
102
|
+
*/
|
|
103
|
+
createdAt: string;
|
|
104
|
+
/**
|
|
105
|
+
* This is the ISO 8601 date-time string of when the call was last updated.
|
|
106
|
+
* @format date-time
|
|
107
|
+
*/
|
|
108
|
+
updatedAt: string;
|
|
109
|
+
/**
|
|
110
|
+
* This is the ISO 8601 date-time string of when the call was started.
|
|
111
|
+
* @format date-time
|
|
112
|
+
*/
|
|
113
|
+
startedAt?: string;
|
|
114
|
+
/**
|
|
115
|
+
* This is the ISO 8601 date-time string of when the call was ended.
|
|
116
|
+
* @format date-time
|
|
117
|
+
*/
|
|
118
|
+
endedAt?: string;
|
|
119
|
+
/** This is the cost of the call in USD. */
|
|
120
|
+
cost?: number;
|
|
121
|
+
/** This is the transcript of the call. */
|
|
122
|
+
transcript?: string;
|
|
123
|
+
/** This is the URL of the recording of the call. */
|
|
124
|
+
recordingUrl?: string;
|
|
125
|
+
/** This is the summary of the call. */
|
|
126
|
+
summary?: string;
|
|
127
|
+
/**
|
|
128
|
+
* This is the callSid of the phone call.
|
|
129
|
+
*
|
|
130
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
131
|
+
*/
|
|
132
|
+
twilioCallSid?: string;
|
|
133
|
+
/**
|
|
134
|
+
* This is the current status of the call.
|
|
135
|
+
*
|
|
136
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
137
|
+
*/
|
|
138
|
+
twilioCallStatus?: string;
|
|
139
|
+
/**
|
|
140
|
+
* This is the URL of the call that the assistant will join.
|
|
141
|
+
*
|
|
142
|
+
* Only relevant for `webCall` type.
|
|
143
|
+
*/
|
|
144
|
+
webCallUrl?: string;
|
|
145
|
+
/** This is set if the call experienced an error. */
|
|
146
|
+
error?: string;
|
|
147
|
+
/** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
|
|
74
148
|
assistantId?: string;
|
|
75
149
|
/** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
|
|
76
150
|
assistant?: CreateAssistantDTO;
|
|
77
|
-
/**
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
151
|
+
/**
|
|
152
|
+
* This is the customer that will be called. To call a transient customer , use `customer` instead.
|
|
153
|
+
*
|
|
154
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
155
|
+
*/
|
|
156
|
+
customerId?: string;
|
|
157
|
+
/**
|
|
158
|
+
* This is the customer that will be called. To call an existing customer, use `customerId` instead.
|
|
159
|
+
*
|
|
160
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
161
|
+
*/
|
|
162
|
+
customer?: CreateCustomerDTO;
|
|
163
|
+
/**
|
|
164
|
+
* This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.
|
|
165
|
+
*
|
|
166
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
167
|
+
*/
|
|
168
|
+
phoneNumberId?: string;
|
|
169
|
+
/**
|
|
170
|
+
* This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead.
|
|
171
|
+
*
|
|
172
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
173
|
+
*/
|
|
174
|
+
phoneNumber?: ImportTwilioPhoneNumberDTO;
|
|
81
175
|
}
|
|
82
|
-
export interface
|
|
83
|
-
/**
|
|
176
|
+
export interface CreateOutboundCallDTO {
|
|
177
|
+
/**
|
|
178
|
+
* Use `customer` instead.
|
|
179
|
+
* @deprecated
|
|
180
|
+
*/
|
|
181
|
+
customerPhoneNumber?: string;
|
|
182
|
+
/** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
|
|
84
183
|
assistantId?: string;
|
|
85
184
|
/** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
|
|
86
185
|
assistant?: CreateAssistantDTO;
|
|
186
|
+
/**
|
|
187
|
+
* This is the customer that will be called. To call a transient customer , use `customer` instead.
|
|
188
|
+
*
|
|
189
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
190
|
+
*/
|
|
191
|
+
customerId?: string;
|
|
192
|
+
/**
|
|
193
|
+
* This is the customer that will be called. To call an existing customer, use `customerId` instead.
|
|
194
|
+
*
|
|
195
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
196
|
+
*/
|
|
197
|
+
customer?: CreateCustomerDTO;
|
|
198
|
+
/**
|
|
199
|
+
* This is the phone number that will be used for the call. To use a transient number, use `phoneNumber` instead.
|
|
200
|
+
*
|
|
201
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
202
|
+
*/
|
|
203
|
+
phoneNumberId?: string;
|
|
204
|
+
/**
|
|
205
|
+
* This is the phone number that will be used for the call. To use an existing number, use `phoneNumberId` instead.
|
|
206
|
+
*
|
|
207
|
+
* Only relevant for `outboundPhoneCall` and `inboundPhoneCall` type.
|
|
208
|
+
*/
|
|
209
|
+
phoneNumber?: ImportTwilioPhoneNumberDTO;
|
|
87
210
|
}
|
|
88
|
-
export interface
|
|
89
|
-
|
|
211
|
+
export interface CreateWebCallDTO {
|
|
212
|
+
/** This is the assistant that will be used for the call. To use a transient assistant, use `assistant` instead. */
|
|
213
|
+
assistantId?: string;
|
|
214
|
+
/** This is the assistant that will be used for the call. To use an existing assistant, use `assistantId` instead. */
|
|
215
|
+
assistant?: CreateAssistantDTO;
|
|
90
216
|
}
|
|
91
217
|
export interface Assistant {
|
|
92
218
|
/** This is the OpenAI model that will be used. */
|
|
@@ -94,35 +220,53 @@ export interface Assistant {
|
|
|
94
220
|
/**
|
|
95
221
|
* This is the voice that will be used.
|
|
96
222
|
*
|
|
97
|
-
* Pro Voices: `*-11labs`, `*-playht
|
|
223
|
+
* Pro Voices: `*-11labs`, `*-playht`
|
|
98
224
|
*
|
|
99
|
-
* Basic Voices: `*-
|
|
225
|
+
* Basic Voices: `*-rimeai`
|
|
226
|
+
*/
|
|
227
|
+
voice?: "jennifer-playht" | "melissa-playht" | "will-playht" | "jack-playht" | "ruby-playht" | "davis-playht" | "donna-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";
|
|
228
|
+
/**
|
|
229
|
+
* This is the name of the assistant. This is just for your own reference.
|
|
230
|
+
* @maxLength 40
|
|
100
231
|
*/
|
|
101
|
-
voice?: "davis-azure" | "jenny-azure" | "aria-azure" | "steffan-azure" | "sara-azure" | "jason-azure" | "burt-11labs" | "andrea-11labs" | "phillip-11labs" | "steve-11labs" | "joseph-11labs" | "myra-11labs" | "paula-11labs" | "ryan-11labs" | "drew-11labs" | "paul-11labs" | "mrb-11labs" | "matilda-11labs" | "jennifer-playht" | "melissa-playht" | "will-playht" | "jack-playht" | "ruby-playht" | "davis-playht" | "donna-playht" | "kai-rimeai" | "zion-rimeai" | "xavier-rimeai" | "marty-rimeai" | "hudson-rimeai" | "savannah-rimeai" | "colette-rimeai" | "daphne-rimeai" | "aurora-rimeai" | "nova-rimeai";
|
|
102
|
-
/** Unique identifier for the assistant. */
|
|
103
|
-
id: string;
|
|
104
|
-
/** Unique identifier for the organization that this assistant belongs to. */
|
|
105
|
-
orgId: string;
|
|
106
|
-
/** ISO 8601 date-time string of when the assistant was created. */
|
|
107
|
-
createdAt: string;
|
|
108
|
-
/** ISO 8601 date-time string of when the assistant was last updated. */
|
|
109
|
-
updatedAt: string;
|
|
110
|
-
/** This is the assistant’s name, just for your own reference. */
|
|
111
232
|
name?: string;
|
|
112
|
-
/** This
|
|
233
|
+
/** This sets the objective and understanding for the assistant. */
|
|
113
234
|
context?: string;
|
|
114
235
|
/** These are the functions that the assistant can execute during the call. */
|
|
115
236
|
functions?: OpenAIFunction[];
|
|
116
|
-
/**
|
|
237
|
+
/**
|
|
238
|
+
* This is the URL Vapi will send GET / POST requests for retrieving context, function calling, and end-of-call reports.
|
|
239
|
+
*
|
|
240
|
+
* All requests will be sent with customerPhoneNumber and all the assistant parameters. You can find more details in the Function Calling documentation.
|
|
241
|
+
*/
|
|
117
242
|
callbackUrl?: string;
|
|
118
|
-
/** This is the number
|
|
243
|
+
/** This is the number to forward to if assistant runs into issues. */
|
|
119
244
|
forwardingPhoneNumber?: string;
|
|
120
|
-
/**
|
|
245
|
+
/**
|
|
246
|
+
* This is the first message that the assistant will say.
|
|
247
|
+
*
|
|
248
|
+
* If unspecified, it will wait for the user to speak.
|
|
249
|
+
* @maxLength 280
|
|
250
|
+
*/
|
|
121
251
|
firstMessage?: string;
|
|
122
|
-
/**
|
|
252
|
+
/** This sets whether calls are recorded for the assistant. */
|
|
123
253
|
recordingEnabled?: boolean;
|
|
124
|
-
/**
|
|
254
|
+
/** This sets whether assistant leaves voicemails when call is not picked up. */
|
|
125
255
|
voicemailEnabled?: boolean;
|
|
256
|
+
/** This is the unique identifier for the assistant. */
|
|
257
|
+
id: string;
|
|
258
|
+
/** This is the unique identifier for the org that this assistant belongs to. */
|
|
259
|
+
orgId: string;
|
|
260
|
+
/**
|
|
261
|
+
* This is the ISO 8601 date-time string of when the assistant was created.
|
|
262
|
+
* @format date-time
|
|
263
|
+
*/
|
|
264
|
+
createdAt: string;
|
|
265
|
+
/**
|
|
266
|
+
* This is the ISO 8601 date-time string of when the assistant was last updated.
|
|
267
|
+
* @format date-time
|
|
268
|
+
*/
|
|
269
|
+
updatedAt: string;
|
|
126
270
|
}
|
|
127
271
|
export interface UpdateAssistantDTO {
|
|
128
272
|
/** This is the OpenAI model that will be used. */
|
|
@@ -130,53 +274,117 @@ export interface UpdateAssistantDTO {
|
|
|
130
274
|
/**
|
|
131
275
|
* This is the voice that will be used.
|
|
132
276
|
*
|
|
133
|
-
* Pro Voices: `*-11labs`, `*-playht
|
|
277
|
+
* Pro Voices: `*-11labs`, `*-playht`
|
|
134
278
|
*
|
|
135
|
-
* Basic Voices: `*-
|
|
279
|
+
* Basic Voices: `*-rimeai`
|
|
280
|
+
*/
|
|
281
|
+
voice?: "jennifer-playht" | "melissa-playht" | "will-playht" | "jack-playht" | "ruby-playht" | "davis-playht" | "donna-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";
|
|
282
|
+
/**
|
|
283
|
+
* This is the name of the assistant. This is just for your own reference.
|
|
284
|
+
* @maxLength 40
|
|
136
285
|
*/
|
|
137
|
-
voice?: "davis-azure" | "jenny-azure" | "aria-azure" | "steffan-azure" | "sara-azure" | "jason-azure" | "burt-11labs" | "andrea-11labs" | "phillip-11labs" | "steve-11labs" | "joseph-11labs" | "myra-11labs" | "paula-11labs" | "ryan-11labs" | "drew-11labs" | "paul-11labs" | "mrb-11labs" | "matilda-11labs" | "jennifer-playht" | "melissa-playht" | "will-playht" | "jack-playht" | "ruby-playht" | "davis-playht" | "donna-playht" | "kai-rimeai" | "zion-rimeai" | "xavier-rimeai" | "marty-rimeai" | "hudson-rimeai" | "savannah-rimeai" | "colette-rimeai" | "daphne-rimeai" | "aurora-rimeai" | "nova-rimeai";
|
|
138
|
-
/** This is the assistant’s name, just for your own reference. */
|
|
139
286
|
name?: string;
|
|
140
|
-
/** This
|
|
287
|
+
/** This sets the objective and understanding for the assistant. */
|
|
141
288
|
context?: string;
|
|
142
289
|
/** These are the functions that the assistant can execute during the call. */
|
|
143
290
|
functions?: OpenAIFunction[];
|
|
144
|
-
/**
|
|
291
|
+
/**
|
|
292
|
+
* This is the URL Vapi will send GET / POST requests for retrieving context, function calling, and end-of-call reports.
|
|
293
|
+
*
|
|
294
|
+
* All requests will be sent with customerPhoneNumber and all the assistant parameters. You can find more details in the Function Calling documentation.
|
|
295
|
+
*/
|
|
145
296
|
callbackUrl?: string;
|
|
146
|
-
/** This is the number
|
|
297
|
+
/** This is the number to forward to if assistant runs into issues. */
|
|
147
298
|
forwardingPhoneNumber?: string;
|
|
148
|
-
/**
|
|
299
|
+
/**
|
|
300
|
+
* This is the first message that the assistant will say.
|
|
301
|
+
*
|
|
302
|
+
* If unspecified, it will wait for the user to speak.
|
|
303
|
+
* @maxLength 280
|
|
304
|
+
*/
|
|
149
305
|
firstMessage?: string;
|
|
150
|
-
/**
|
|
306
|
+
/** This sets whether calls are recorded for the assistant. */
|
|
151
307
|
recordingEnabled?: boolean;
|
|
152
|
-
/**
|
|
308
|
+
/** This sets whether assistant leaves voicemails when call is not picked up. */
|
|
153
309
|
voicemailEnabled?: boolean;
|
|
154
310
|
}
|
|
155
|
-
export interface
|
|
156
|
-
/**
|
|
311
|
+
export interface BuyPhoneNumberDTO {
|
|
312
|
+
/**
|
|
313
|
+
* This is the area code of the phone number to purchase.
|
|
314
|
+
* @minLength 3
|
|
315
|
+
* @maxLength 3
|
|
316
|
+
*/
|
|
157
317
|
areaCode: string;
|
|
318
|
+
/**
|
|
319
|
+
* This is the name of the phone number. This is just for your own reference.
|
|
320
|
+
* @maxLength 40
|
|
321
|
+
*/
|
|
322
|
+
name?: string;
|
|
323
|
+
/**
|
|
324
|
+
* This is the assistant that will be used for incoming calls to this phone number.
|
|
325
|
+
*
|
|
326
|
+
* If this is not set, then the phone number will not handle incoming calls.
|
|
327
|
+
*/
|
|
158
328
|
assistantId?: string;
|
|
159
329
|
}
|
|
160
330
|
export interface PhoneNumber {
|
|
331
|
+
/** This is the unique identifier for the phone number. */
|
|
161
332
|
id: string;
|
|
333
|
+
/** This is the unique identifier for the org that this phone number belongs to. */
|
|
334
|
+
orgId: string;
|
|
335
|
+
/**
|
|
336
|
+
* This is the ISO 8601 date-time string of when the phone number was created.
|
|
337
|
+
* @format date-time
|
|
338
|
+
*/
|
|
162
339
|
createdAt: string;
|
|
340
|
+
/**
|
|
341
|
+
* This is the ISO 8601 date-time string of when the phone number was last updated.
|
|
342
|
+
* @format date-time
|
|
343
|
+
*/
|
|
163
344
|
updatedAt: string;
|
|
164
|
-
|
|
345
|
+
/** This is the subscription for the phone number. */
|
|
165
346
|
stripeSubscriptionId?: string;
|
|
347
|
+
/** This is the subscription's status. */
|
|
348
|
+
stripeSubscriptionStatus?: string;
|
|
349
|
+
/** This is the subscription's current period start. */
|
|
350
|
+
stripeSubscriptionCurrentPeriodStart?: string;
|
|
351
|
+
/** These are the digits of the phone number. */
|
|
166
352
|
number: string;
|
|
167
|
-
|
|
353
|
+
/**
|
|
354
|
+
* This is the Twilio Account SID for the phone number.
|
|
355
|
+
*
|
|
356
|
+
* This is for numbers not bought on Vapi.
|
|
357
|
+
*/
|
|
168
358
|
twilioAccountSid?: string;
|
|
359
|
+
/**
|
|
360
|
+
* This is the Twilio Auth Token for the phone number.
|
|
361
|
+
*
|
|
362
|
+
* This is for numbers not bought on Vapi.
|
|
363
|
+
*/
|
|
169
364
|
twilioAuthToken?: string;
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
365
|
+
/**
|
|
366
|
+
* This is the name of the phone number. This is just for your own reference.
|
|
367
|
+
* @maxLength 40
|
|
368
|
+
*/
|
|
369
|
+
name?: string;
|
|
370
|
+
/**
|
|
371
|
+
* This is the assistant that will be used for incoming calls to this phone number.
|
|
372
|
+
*
|
|
373
|
+
* If this is not set, then the phone number will not handle incoming calls.
|
|
374
|
+
*/
|
|
176
375
|
assistantId?: string;
|
|
177
376
|
}
|
|
178
|
-
export interface
|
|
179
|
-
/**
|
|
377
|
+
export interface UpdatePhoneNumberDTO {
|
|
378
|
+
/**
|
|
379
|
+
* This is the name of the phone number. This is just for your own reference.
|
|
380
|
+
* @maxLength 40
|
|
381
|
+
*/
|
|
382
|
+
name?: string;
|
|
383
|
+
/**
|
|
384
|
+
* This is the assistant that will be used for incoming calls to this phone number.
|
|
385
|
+
*
|
|
386
|
+
* If this is not set, then the phone number will not handle incoming calls.
|
|
387
|
+
*/
|
|
180
388
|
assistantId?: string;
|
|
181
389
|
}
|
|
182
390
|
export type QueryParamsType = Record<string | number, any>;
|
|
@@ -253,6 +461,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
253
461
|
* @name CallControllerFindAll
|
|
254
462
|
* @summary List Calls
|
|
255
463
|
* @request GET:/call
|
|
464
|
+
* @secure
|
|
256
465
|
*/
|
|
257
466
|
callControllerFindAll: (params?: RequestParams) => Promise<HttpResponse<Call[], any>>;
|
|
258
467
|
/**
|
|
@@ -262,6 +471,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
262
471
|
* @name CallControllerFindOne
|
|
263
472
|
* @summary Get Call
|
|
264
473
|
* @request GET:/call/{id}
|
|
474
|
+
* @secure
|
|
265
475
|
*/
|
|
266
476
|
callControllerFindOne: (id: string, params?: RequestParams) => Promise<HttpResponse<Call, any>>;
|
|
267
477
|
/**
|
|
@@ -271,8 +481,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
271
481
|
* @name CallControllerCreatePhoneCall
|
|
272
482
|
* @summary Create Phone Call
|
|
273
483
|
* @request POST:/call/phone
|
|
484
|
+
* @secure
|
|
274
485
|
*/
|
|
275
|
-
callControllerCreatePhoneCall: (data:
|
|
486
|
+
callControllerCreatePhoneCall: (data: CreateOutboundCallDTO, params?: RequestParams) => Promise<HttpResponse<Call, any>>;
|
|
276
487
|
/**
|
|
277
488
|
* No description
|
|
278
489
|
*
|
|
@@ -280,8 +491,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
280
491
|
* @name CallControllerCreateWebCall
|
|
281
492
|
* @summary Create Web Call
|
|
282
493
|
* @request POST:/call/web
|
|
494
|
+
* @secure
|
|
283
495
|
*/
|
|
284
|
-
callControllerCreateWebCall: (data:
|
|
496
|
+
callControllerCreateWebCall: (data: CreateWebCallDTO, params?: RequestParams) => Promise<HttpResponse<Call, any>>;
|
|
285
497
|
};
|
|
286
498
|
assistant: {
|
|
287
499
|
/**
|
|
@@ -291,6 +503,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
291
503
|
* @name AssistantControllerCreate
|
|
292
504
|
* @summary Create Assistant
|
|
293
505
|
* @request POST:/assistant
|
|
506
|
+
* @secure
|
|
294
507
|
*/
|
|
295
508
|
assistantControllerCreate: (data: CreateAssistantDTO, params?: RequestParams) => Promise<HttpResponse<Assistant, any>>;
|
|
296
509
|
/**
|
|
@@ -300,6 +513,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
300
513
|
* @name AssistantControllerFindAll
|
|
301
514
|
* @summary List Assistants
|
|
302
515
|
* @request GET:/assistant
|
|
516
|
+
* @secure
|
|
303
517
|
*/
|
|
304
518
|
assistantControllerFindAll: (params?: RequestParams) => Promise<HttpResponse<Assistant[], any>>;
|
|
305
519
|
/**
|
|
@@ -309,6 +523,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
309
523
|
* @name AssistantControllerFindOne
|
|
310
524
|
* @summary Get Assistant
|
|
311
525
|
* @request GET:/assistant/{id}
|
|
526
|
+
* @secure
|
|
312
527
|
*/
|
|
313
528
|
assistantControllerFindOne: (id: string, params?: RequestParams) => Promise<HttpResponse<Assistant, any>>;
|
|
314
529
|
/**
|
|
@@ -318,6 +533,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
318
533
|
* @name AssistantControllerUpdate
|
|
319
534
|
* @summary Update Assistant
|
|
320
535
|
* @request PATCH:/assistant/{id}
|
|
536
|
+
* @secure
|
|
321
537
|
*/
|
|
322
538
|
assistantControllerUpdate: (id: string, data: UpdateAssistantDTO, params?: RequestParams) => Promise<HttpResponse<Assistant, any>>;
|
|
323
539
|
/**
|
|
@@ -327,8 +543,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
327
543
|
* @name AssistantControllerRemove
|
|
328
544
|
* @summary Delete Assistant
|
|
329
545
|
* @request DELETE:/assistant/{id}
|
|
546
|
+
* @secure
|
|
330
547
|
*/
|
|
331
|
-
assistantControllerRemove: (id: string, params?: RequestParams) => Promise<HttpResponse<
|
|
548
|
+
assistantControllerRemove: (id: string, params?: RequestParams) => Promise<HttpResponse<Assistant, any>>;
|
|
332
549
|
};
|
|
333
550
|
phoneNumber: {
|
|
334
551
|
/**
|
|
@@ -338,8 +555,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
338
555
|
* @name PhoneNumberControllerBuy
|
|
339
556
|
* @summary Buy Phone Number
|
|
340
557
|
* @request POST:/phone-number/buy
|
|
558
|
+
* @secure
|
|
341
559
|
*/
|
|
342
|
-
phoneNumberControllerBuy: (data:
|
|
560
|
+
phoneNumberControllerBuy: (data: BuyPhoneNumberDTO, params?: RequestParams) => Promise<HttpResponse<PhoneNumber, any>>;
|
|
343
561
|
/**
|
|
344
562
|
* No description
|
|
345
563
|
*
|
|
@@ -347,8 +565,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
347
565
|
* @name PhoneNumberControllerImport
|
|
348
566
|
* @summary Import Twilio Number
|
|
349
567
|
* @request POST:/phone-number/import
|
|
568
|
+
* @secure
|
|
350
569
|
*/
|
|
351
|
-
phoneNumberControllerImport: (data:
|
|
570
|
+
phoneNumberControllerImport: (data: ImportTwilioPhoneNumberDTO, params?: RequestParams) => Promise<HttpResponse<PhoneNumber, any>>;
|
|
352
571
|
/**
|
|
353
572
|
* No description
|
|
354
573
|
*
|
|
@@ -356,6 +575,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
356
575
|
* @name PhoneNumberControllerFindAll
|
|
357
576
|
* @summary List Phone Numbers
|
|
358
577
|
* @request GET:/phone-number
|
|
578
|
+
* @secure
|
|
359
579
|
*/
|
|
360
580
|
phoneNumberControllerFindAll: (params?: RequestParams) => Promise<HttpResponse<PhoneNumber[], any>>;
|
|
361
581
|
/**
|
|
@@ -365,6 +585,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
365
585
|
* @name PhoneNumberControllerFindOne
|
|
366
586
|
* @summary Get Phone Number
|
|
367
587
|
* @request GET:/phone-number/{id}
|
|
588
|
+
* @secure
|
|
368
589
|
*/
|
|
369
590
|
phoneNumberControllerFindOne: (id: string, params?: RequestParams) => Promise<HttpResponse<PhoneNumber, any>>;
|
|
370
591
|
/**
|
|
@@ -374,8 +595,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
374
595
|
* @name PhoneNumberControllerUpdate
|
|
375
596
|
* @summary Update Phone Number
|
|
376
597
|
* @request PATCH:/phone-number/{id}
|
|
598
|
+
* @secure
|
|
377
599
|
*/
|
|
378
|
-
phoneNumberControllerUpdate: (id: string, data:
|
|
600
|
+
phoneNumberControllerUpdate: (id: string, data: UpdatePhoneNumberDTO, params?: RequestParams) => Promise<HttpResponse<PhoneNumber, any>>;
|
|
379
601
|
/**
|
|
380
602
|
* No description
|
|
381
603
|
*
|
|
@@ -383,6 +605,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
383
605
|
* @name PhoneNumberControllerRemove
|
|
384
606
|
* @summary Delete Phone Number
|
|
385
607
|
* @request DELETE:/phone-number/{id}
|
|
608
|
+
* @secure
|
|
386
609
|
*/
|
|
387
610
|
phoneNumberControllerRemove: (id: string, params?: RequestParams) => Promise<HttpResponse<void, any>>;
|
|
388
611
|
};
|