@vapi-ai/web 1.0.167 → 1.0.168
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 +42 -27
- package/dist/api.d.ts +21 -9
- package/dist/vapi.js +0 -1
- package/package.json +1 -1
- package/vapi.ts +0 -1
package/api.ts
CHANGED
|
@@ -67,7 +67,14 @@ export interface CreateAssistantDTO {
|
|
|
67
67
|
* Basic Voices: davis, jenny, aria, steffan, sara, and jason.
|
|
68
68
|
*/
|
|
69
69
|
voice?:
|
|
70
|
+
| "davis"
|
|
71
|
+
| "jenny"
|
|
72
|
+
| "aria"
|
|
73
|
+
| "steffan"
|
|
74
|
+
| "sara"
|
|
75
|
+
| "jason"
|
|
70
76
|
| "burt"
|
|
77
|
+
| "andrea"
|
|
71
78
|
| "phillip"
|
|
72
79
|
| "steve"
|
|
73
80
|
| "joseph"
|
|
@@ -77,13 +84,7 @@ export interface CreateAssistantDTO {
|
|
|
77
84
|
| "drew"
|
|
78
85
|
| "paul"
|
|
79
86
|
| "mrb"
|
|
80
|
-
| "matilda"
|
|
81
|
-
| "davis"
|
|
82
|
-
| "jenny"
|
|
83
|
-
| "aria"
|
|
84
|
-
| "steffan"
|
|
85
|
-
| "sara"
|
|
86
|
-
| "jason";
|
|
87
|
+
| "matilda";
|
|
87
88
|
/** This is the assistant’s name, just for your own reference. */
|
|
88
89
|
name?: string;
|
|
89
90
|
/** This is the system prompt, which sets the objective and background before the call. */
|
|
@@ -94,8 +95,12 @@ export interface CreateAssistantDTO {
|
|
|
94
95
|
callbackUrl?: string;
|
|
95
96
|
/** This is the number the assistant will transfer to if it runs into any issues. */
|
|
96
97
|
forwardingPhoneNumber?: string;
|
|
97
|
-
/**
|
|
98
|
-
|
|
98
|
+
/** This is the first message that the assistant will say. If unspecified, it will wait for the user to speak. */
|
|
99
|
+
firstMessage?: string;
|
|
100
|
+
/** Whether the call should be recorded. */
|
|
101
|
+
recordingEnabled?: boolean;
|
|
102
|
+
/** Whether to leave a voicemail if a phone call isn't picked up. */
|
|
103
|
+
voicemailEnabled?: boolean;
|
|
99
104
|
}
|
|
100
105
|
|
|
101
106
|
export interface CreateOutboundCallDto {
|
|
@@ -132,7 +137,14 @@ export interface Assistant {
|
|
|
132
137
|
* Basic Voices: davis, jenny, aria, steffan, sara, and jason.
|
|
133
138
|
*/
|
|
134
139
|
voice?:
|
|
140
|
+
| "davis"
|
|
141
|
+
| "jenny"
|
|
142
|
+
| "aria"
|
|
143
|
+
| "steffan"
|
|
144
|
+
| "sara"
|
|
145
|
+
| "jason"
|
|
135
146
|
| "burt"
|
|
147
|
+
| "andrea"
|
|
136
148
|
| "phillip"
|
|
137
149
|
| "steve"
|
|
138
150
|
| "joseph"
|
|
@@ -142,13 +154,7 @@ export interface Assistant {
|
|
|
142
154
|
| "drew"
|
|
143
155
|
| "paul"
|
|
144
156
|
| "mrb"
|
|
145
|
-
| "matilda"
|
|
146
|
-
| "davis"
|
|
147
|
-
| "jenny"
|
|
148
|
-
| "aria"
|
|
149
|
-
| "steffan"
|
|
150
|
-
| "sara"
|
|
151
|
-
| "jason";
|
|
157
|
+
| "matilda";
|
|
152
158
|
/** Unique identifier for the assistant. */
|
|
153
159
|
id: string;
|
|
154
160
|
/** Unique identifier for the organization that this assistant belongs to. */
|
|
@@ -167,8 +173,12 @@ export interface Assistant {
|
|
|
167
173
|
callbackUrl?: string;
|
|
168
174
|
/** This is the number the assistant will transfer to if it runs into any issues. */
|
|
169
175
|
forwardingPhoneNumber?: string;
|
|
170
|
-
/**
|
|
171
|
-
|
|
176
|
+
/** This is the first message that the assistant will say. If unspecified, it will wait for the user to speak. */
|
|
177
|
+
firstMessage?: string;
|
|
178
|
+
/** Whether the call should be recorded. */
|
|
179
|
+
recordingEnabled?: boolean;
|
|
180
|
+
/** Whether to leave a voicemail if a phone call isn't picked up. */
|
|
181
|
+
voicemailEnabled?: boolean;
|
|
172
182
|
}
|
|
173
183
|
|
|
174
184
|
export interface UpdateAssistantDTO {
|
|
@@ -182,7 +192,14 @@ export interface UpdateAssistantDTO {
|
|
|
182
192
|
* Basic Voices: davis, jenny, aria, steffan, sara, and jason.
|
|
183
193
|
*/
|
|
184
194
|
voice?:
|
|
195
|
+
| "davis"
|
|
196
|
+
| "jenny"
|
|
197
|
+
| "aria"
|
|
198
|
+
| "steffan"
|
|
199
|
+
| "sara"
|
|
200
|
+
| "jason"
|
|
185
201
|
| "burt"
|
|
202
|
+
| "andrea"
|
|
186
203
|
| "phillip"
|
|
187
204
|
| "steve"
|
|
188
205
|
| "joseph"
|
|
@@ -192,13 +209,7 @@ export interface UpdateAssistantDTO {
|
|
|
192
209
|
| "drew"
|
|
193
210
|
| "paul"
|
|
194
211
|
| "mrb"
|
|
195
|
-
| "matilda"
|
|
196
|
-
| "davis"
|
|
197
|
-
| "jenny"
|
|
198
|
-
| "aria"
|
|
199
|
-
| "steffan"
|
|
200
|
-
| "sara"
|
|
201
|
-
| "jason";
|
|
212
|
+
| "matilda";
|
|
202
213
|
/** This is the assistant’s name, just for your own reference. */
|
|
203
214
|
name?: string;
|
|
204
215
|
/** This is the system prompt, which sets the objective and background before the call. */
|
|
@@ -209,8 +220,12 @@ export interface UpdateAssistantDTO {
|
|
|
209
220
|
callbackUrl?: string;
|
|
210
221
|
/** This is the number the assistant will transfer to if it runs into any issues. */
|
|
211
222
|
forwardingPhoneNumber?: string;
|
|
212
|
-
/**
|
|
213
|
-
|
|
223
|
+
/** This is the first message that the assistant will say. If unspecified, it will wait for the user to speak. */
|
|
224
|
+
firstMessage?: string;
|
|
225
|
+
/** Whether the call should be recorded. */
|
|
226
|
+
recordingEnabled?: boolean;
|
|
227
|
+
/** Whether to leave a voicemail if a phone call isn't picked up. */
|
|
228
|
+
voicemailEnabled?: boolean;
|
|
214
229
|
}
|
|
215
230
|
|
|
216
231
|
export interface BuyPhoneNumberDto {
|
package/dist/api.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export interface CreateAssistantDTO {
|
|
|
51
51
|
*
|
|
52
52
|
* Basic Voices: davis, jenny, aria, steffan, sara, and jason.
|
|
53
53
|
*/
|
|
54
|
-
voice?: "
|
|
54
|
+
voice?: "davis" | "jenny" | "aria" | "steffan" | "sara" | "jason" | "burt" | "andrea" | "phillip" | "steve" | "joseph" | "myra" | "paula" | "ryan" | "drew" | "paul" | "mrb" | "matilda";
|
|
55
55
|
/** This is the assistant’s name, just for your own reference. */
|
|
56
56
|
name?: string;
|
|
57
57
|
/** This is the system prompt, which sets the objective and background before the call. */
|
|
@@ -62,8 +62,12 @@ export interface CreateAssistantDTO {
|
|
|
62
62
|
callbackUrl?: string;
|
|
63
63
|
/** This is the number the assistant will transfer to if it runs into any issues. */
|
|
64
64
|
forwardingPhoneNumber?: string;
|
|
65
|
-
/**
|
|
66
|
-
|
|
65
|
+
/** This is the first message that the assistant will say. If unspecified, it will wait for the user to speak. */
|
|
66
|
+
firstMessage?: string;
|
|
67
|
+
/** Whether the call should be recorded. */
|
|
68
|
+
recordingEnabled?: boolean;
|
|
69
|
+
/** Whether to leave a voicemail if a phone call isn't picked up. */
|
|
70
|
+
voicemailEnabled?: boolean;
|
|
67
71
|
}
|
|
68
72
|
export interface CreateOutboundCallDto {
|
|
69
73
|
/** This is the assistant that will be used for the call. To create a transient assistant, use `assistant` instead. */
|
|
@@ -95,7 +99,7 @@ export interface Assistant {
|
|
|
95
99
|
*
|
|
96
100
|
* Basic Voices: davis, jenny, aria, steffan, sara, and jason.
|
|
97
101
|
*/
|
|
98
|
-
voice?: "
|
|
102
|
+
voice?: "davis" | "jenny" | "aria" | "steffan" | "sara" | "jason" | "burt" | "andrea" | "phillip" | "steve" | "joseph" | "myra" | "paula" | "ryan" | "drew" | "paul" | "mrb" | "matilda";
|
|
99
103
|
/** Unique identifier for the assistant. */
|
|
100
104
|
id: string;
|
|
101
105
|
/** Unique identifier for the organization that this assistant belongs to. */
|
|
@@ -114,8 +118,12 @@ export interface Assistant {
|
|
|
114
118
|
callbackUrl?: string;
|
|
115
119
|
/** This is the number the assistant will transfer to if it runs into any issues. */
|
|
116
120
|
forwardingPhoneNumber?: string;
|
|
117
|
-
/**
|
|
118
|
-
|
|
121
|
+
/** This is the first message that the assistant will say. If unspecified, it will wait for the user to speak. */
|
|
122
|
+
firstMessage?: string;
|
|
123
|
+
/** Whether the call should be recorded. */
|
|
124
|
+
recordingEnabled?: boolean;
|
|
125
|
+
/** Whether to leave a voicemail if a phone call isn't picked up. */
|
|
126
|
+
voicemailEnabled?: boolean;
|
|
119
127
|
}
|
|
120
128
|
export interface UpdateAssistantDTO {
|
|
121
129
|
/** This is the OpenAI model that will be used. */
|
|
@@ -127,7 +135,7 @@ export interface UpdateAssistantDTO {
|
|
|
127
135
|
*
|
|
128
136
|
* Basic Voices: davis, jenny, aria, steffan, sara, and jason.
|
|
129
137
|
*/
|
|
130
|
-
voice?: "
|
|
138
|
+
voice?: "davis" | "jenny" | "aria" | "steffan" | "sara" | "jason" | "burt" | "andrea" | "phillip" | "steve" | "joseph" | "myra" | "paula" | "ryan" | "drew" | "paul" | "mrb" | "matilda";
|
|
131
139
|
/** This is the assistant’s name, just for your own reference. */
|
|
132
140
|
name?: string;
|
|
133
141
|
/** This is the system prompt, which sets the objective and background before the call. */
|
|
@@ -138,8 +146,12 @@ export interface UpdateAssistantDTO {
|
|
|
138
146
|
callbackUrl?: string;
|
|
139
147
|
/** This is the number the assistant will transfer to if it runs into any issues. */
|
|
140
148
|
forwardingPhoneNumber?: string;
|
|
141
|
-
/**
|
|
142
|
-
|
|
149
|
+
/** This is the first message that the assistant will say. If unspecified, it will wait for the user to speak. */
|
|
150
|
+
firstMessage?: string;
|
|
151
|
+
/** Whether the call should be recorded. */
|
|
152
|
+
recordingEnabled?: boolean;
|
|
153
|
+
/** Whether to leave a voicemail if a phone call isn't picked up. */
|
|
154
|
+
voicemailEnabled?: boolean;
|
|
143
155
|
}
|
|
144
156
|
export interface BuyPhoneNumberDto {
|
|
145
157
|
/** This is the area code of the phone number to purchase. */
|
package/dist/vapi.js
CHANGED
|
@@ -34,7 +34,6 @@ class Vapi extends events_1.default {
|
|
|
34
34
|
(_a = this.call.iframe()) === null || _a === void 0 ? void 0 : _a.style.setProperty("display", "none");
|
|
35
35
|
this.call.join({ url });
|
|
36
36
|
this.call.on("active-speaker-change", (e) => e && this.handleSpeakerChange(e));
|
|
37
|
-
console.log("adddding");
|
|
38
37
|
this.call.startRemoteParticipantsAudioLevelObserver();
|
|
39
38
|
this.call.on("remote-participants-audio-level", (e) => {
|
|
40
39
|
console.log(e);
|
package/package.json
CHANGED
package/vapi.ts
CHANGED
|
@@ -44,7 +44,6 @@ export default class Vapi extends EventEmitter {
|
|
|
44
44
|
(e) => e && this.handleSpeakerChange(e)
|
|
45
45
|
);
|
|
46
46
|
|
|
47
|
-
console.log("adddding");
|
|
48
47
|
this.call.startRemoteParticipantsAudioLevelObserver();
|
|
49
48
|
this.call.on("remote-participants-audio-level", (e) => {
|
|
50
49
|
console.log(e);
|