@vapi-ai/web 1.0.253 → 1.0.256
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/README.md +21 -3
- package/api.ts +681 -229
- package/dist/api.d.ts +590 -212
- package/dist/api.js +470 -326
- package/dist/client.js +2 -11
- package/dist/vapi.js +90 -108
- package/package.json +2 -2
- package/tsconfig.json +1 -1
- package/vapi.ts +3 -1
package/dist/api.js
CHANGED
|
@@ -9,26 +9,6 @@
|
|
|
9
9
|
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
|
|
10
10
|
* ---------------------------------------------------------------
|
|
11
11
|
*/
|
|
12
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
22
|
-
var t = {};
|
|
23
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
24
|
-
t[p] = s[p];
|
|
25
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
26
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
27
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
28
|
-
t[p[i]] = s[p[i]];
|
|
29
|
-
}
|
|
30
|
-
return t;
|
|
31
|
-
};
|
|
32
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
13
|
exports.Api = exports.HttpClient = exports.ContentType = void 0;
|
|
34
14
|
var ContentType;
|
|
@@ -39,93 +19,23 @@ var ContentType;
|
|
|
39
19
|
ContentType["Text"] = "text/plain";
|
|
40
20
|
})(ContentType || (exports.ContentType = ContentType = {}));
|
|
41
21
|
class HttpClient {
|
|
22
|
+
baseUrl = "https://api.vapi.ai";
|
|
23
|
+
securityData = null;
|
|
24
|
+
securityWorker;
|
|
25
|
+
abortControllers = new Map();
|
|
26
|
+
customFetch = (...fetchParams) => fetch(...fetchParams);
|
|
27
|
+
baseApiParams = {
|
|
28
|
+
credentials: "same-origin",
|
|
29
|
+
headers: {},
|
|
30
|
+
redirect: "follow",
|
|
31
|
+
referrerPolicy: "no-referrer",
|
|
32
|
+
};
|
|
42
33
|
constructor(apiConfig = {}) {
|
|
43
|
-
this.baseUrl = "https://api.vapi.ai";
|
|
44
|
-
this.securityData = null;
|
|
45
|
-
this.abortControllers = new Map();
|
|
46
|
-
this.customFetch = (...fetchParams) => fetch(...fetchParams);
|
|
47
|
-
this.baseApiParams = {
|
|
48
|
-
credentials: "same-origin",
|
|
49
|
-
headers: {},
|
|
50
|
-
redirect: "follow",
|
|
51
|
-
referrerPolicy: "no-referrer",
|
|
52
|
-
};
|
|
53
|
-
this.setSecurityData = (data) => {
|
|
54
|
-
this.securityData = data;
|
|
55
|
-
};
|
|
56
|
-
this.contentFormatters = {
|
|
57
|
-
[ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input,
|
|
58
|
-
[ContentType.Text]: (input) => (input !== null && typeof input !== "string" ? JSON.stringify(input) : input),
|
|
59
|
-
[ContentType.FormData]: (input) => Object.keys(input || {}).reduce((formData, key) => {
|
|
60
|
-
const property = input[key];
|
|
61
|
-
formData.append(key, property instanceof Blob
|
|
62
|
-
? property
|
|
63
|
-
: typeof property === "object" && property !== null
|
|
64
|
-
? JSON.stringify(property)
|
|
65
|
-
: `${property}`);
|
|
66
|
-
return formData;
|
|
67
|
-
}, new FormData()),
|
|
68
|
-
[ContentType.UrlEncoded]: (input) => this.toQueryString(input),
|
|
69
|
-
};
|
|
70
|
-
this.createAbortSignal = (cancelToken) => {
|
|
71
|
-
if (this.abortControllers.has(cancelToken)) {
|
|
72
|
-
const abortController = this.abortControllers.get(cancelToken);
|
|
73
|
-
if (abortController) {
|
|
74
|
-
return abortController.signal;
|
|
75
|
-
}
|
|
76
|
-
return void 0;
|
|
77
|
-
}
|
|
78
|
-
const abortController = new AbortController();
|
|
79
|
-
this.abortControllers.set(cancelToken, abortController);
|
|
80
|
-
return abortController.signal;
|
|
81
|
-
};
|
|
82
|
-
this.abortRequest = (cancelToken) => {
|
|
83
|
-
const abortController = this.abortControllers.get(cancelToken);
|
|
84
|
-
if (abortController) {
|
|
85
|
-
abortController.abort();
|
|
86
|
-
this.abortControllers.delete(cancelToken);
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
this.request = (_a) => __awaiter(this, void 0, void 0, function* () {
|
|
90
|
-
var { body, secure, path, type, query, format, baseUrl, cancelToken } = _a, params = __rest(_a, ["body", "secure", "path", "type", "query", "format", "baseUrl", "cancelToken"]);
|
|
91
|
-
const secureParams = ((typeof secure === "boolean" ? secure : this.baseApiParams.secure) &&
|
|
92
|
-
this.securityWorker &&
|
|
93
|
-
(yield this.securityWorker(this.securityData))) ||
|
|
94
|
-
{};
|
|
95
|
-
const requestParams = this.mergeRequestParams(params, secureParams);
|
|
96
|
-
const queryString = query && this.toQueryString(query);
|
|
97
|
-
const payloadFormatter = this.contentFormatters[type || ContentType.Json];
|
|
98
|
-
const responseFormat = format || requestParams.format;
|
|
99
|
-
return this.customFetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, Object.assign(Object.assign({}, requestParams), { headers: Object.assign(Object.assign({}, (requestParams.headers || {})), (type && type !== ContentType.FormData ? { "Content-Type": type } : {})), signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null, body: typeof body === "undefined" || body === null ? null : payloadFormatter(body) })).then((response) => __awaiter(this, void 0, void 0, function* () {
|
|
100
|
-
const r = response;
|
|
101
|
-
r.data = null;
|
|
102
|
-
r.error = null;
|
|
103
|
-
const data = !responseFormat
|
|
104
|
-
? r
|
|
105
|
-
: yield response[responseFormat]()
|
|
106
|
-
.then((data) => {
|
|
107
|
-
if (r.ok) {
|
|
108
|
-
r.data = data;
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
r.error = data;
|
|
112
|
-
}
|
|
113
|
-
return r;
|
|
114
|
-
})
|
|
115
|
-
.catch((e) => {
|
|
116
|
-
r.error = e;
|
|
117
|
-
return r;
|
|
118
|
-
});
|
|
119
|
-
if (cancelToken) {
|
|
120
|
-
this.abortControllers.delete(cancelToken);
|
|
121
|
-
}
|
|
122
|
-
if (!response.ok)
|
|
123
|
-
throw data;
|
|
124
|
-
return data;
|
|
125
|
-
}));
|
|
126
|
-
});
|
|
127
34
|
Object.assign(this, apiConfig);
|
|
128
35
|
}
|
|
36
|
+
setSecurityData = (data) => {
|
|
37
|
+
this.securityData = data;
|
|
38
|
+
};
|
|
129
39
|
encodeQueryParam(key, value) {
|
|
130
40
|
const encodedKey = encodeURIComponent(key);
|
|
131
41
|
return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
|
|
@@ -148,9 +58,96 @@ class HttpClient {
|
|
|
148
58
|
const queryString = this.toQueryString(rawQuery);
|
|
149
59
|
return queryString ? `?${queryString}` : "";
|
|
150
60
|
}
|
|
61
|
+
contentFormatters = {
|
|
62
|
+
[ContentType.Json]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input,
|
|
63
|
+
[ContentType.Text]: (input) => (input !== null && typeof input !== "string" ? JSON.stringify(input) : input),
|
|
64
|
+
[ContentType.FormData]: (input) => Object.keys(input || {}).reduce((formData, key) => {
|
|
65
|
+
const property = input[key];
|
|
66
|
+
formData.append(key, property instanceof Blob
|
|
67
|
+
? property
|
|
68
|
+
: typeof property === "object" && property !== null
|
|
69
|
+
? JSON.stringify(property)
|
|
70
|
+
: `${property}`);
|
|
71
|
+
return formData;
|
|
72
|
+
}, new FormData()),
|
|
73
|
+
[ContentType.UrlEncoded]: (input) => this.toQueryString(input),
|
|
74
|
+
};
|
|
151
75
|
mergeRequestParams(params1, params2) {
|
|
152
|
-
return
|
|
76
|
+
return {
|
|
77
|
+
...this.baseApiParams,
|
|
78
|
+
...params1,
|
|
79
|
+
...(params2 || {}),
|
|
80
|
+
headers: {
|
|
81
|
+
...(this.baseApiParams.headers || {}),
|
|
82
|
+
...(params1.headers || {}),
|
|
83
|
+
...((params2 && params2.headers) || {}),
|
|
84
|
+
},
|
|
85
|
+
};
|
|
153
86
|
}
|
|
87
|
+
createAbortSignal = (cancelToken) => {
|
|
88
|
+
if (this.abortControllers.has(cancelToken)) {
|
|
89
|
+
const abortController = this.abortControllers.get(cancelToken);
|
|
90
|
+
if (abortController) {
|
|
91
|
+
return abortController.signal;
|
|
92
|
+
}
|
|
93
|
+
return void 0;
|
|
94
|
+
}
|
|
95
|
+
const abortController = new AbortController();
|
|
96
|
+
this.abortControllers.set(cancelToken, abortController);
|
|
97
|
+
return abortController.signal;
|
|
98
|
+
};
|
|
99
|
+
abortRequest = (cancelToken) => {
|
|
100
|
+
const abortController = this.abortControllers.get(cancelToken);
|
|
101
|
+
if (abortController) {
|
|
102
|
+
abortController.abort();
|
|
103
|
+
this.abortControllers.delete(cancelToken);
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
request = async ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }) => {
|
|
107
|
+
const secureParams = ((typeof secure === "boolean" ? secure : this.baseApiParams.secure) &&
|
|
108
|
+
this.securityWorker &&
|
|
109
|
+
(await this.securityWorker(this.securityData))) ||
|
|
110
|
+
{};
|
|
111
|
+
const requestParams = this.mergeRequestParams(params, secureParams);
|
|
112
|
+
const queryString = query && this.toQueryString(query);
|
|
113
|
+
const payloadFormatter = this.contentFormatters[type || ContentType.Json];
|
|
114
|
+
const responseFormat = format || requestParams.format;
|
|
115
|
+
return this.customFetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, {
|
|
116
|
+
...requestParams,
|
|
117
|
+
headers: {
|
|
118
|
+
...(requestParams.headers || {}),
|
|
119
|
+
...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}),
|
|
120
|
+
},
|
|
121
|
+
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
|
|
122
|
+
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
|
|
123
|
+
}).then(async (response) => {
|
|
124
|
+
const r = response;
|
|
125
|
+
r.data = null;
|
|
126
|
+
r.error = null;
|
|
127
|
+
const data = !responseFormat
|
|
128
|
+
? r
|
|
129
|
+
: await response[responseFormat]()
|
|
130
|
+
.then((data) => {
|
|
131
|
+
if (r.ok) {
|
|
132
|
+
r.data = data;
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
r.error = data;
|
|
136
|
+
}
|
|
137
|
+
return r;
|
|
138
|
+
})
|
|
139
|
+
.catch((e) => {
|
|
140
|
+
r.error = e;
|
|
141
|
+
return r;
|
|
142
|
+
});
|
|
143
|
+
if (cancelToken) {
|
|
144
|
+
this.abortControllers.delete(cancelToken);
|
|
145
|
+
}
|
|
146
|
+
if (!response.ok)
|
|
147
|
+
throw data;
|
|
148
|
+
return data;
|
|
149
|
+
});
|
|
150
|
+
};
|
|
154
151
|
}
|
|
155
152
|
exports.HttpClient = HttpClient;
|
|
156
153
|
/**
|
|
@@ -162,226 +159,373 @@ exports.HttpClient = HttpClient;
|
|
|
162
159
|
* API for building voice assistants
|
|
163
160
|
*/
|
|
164
161
|
class Api extends HttpClient {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
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
|
-
|
|
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
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
162
|
+
assistant = {
|
|
163
|
+
/**
|
|
164
|
+
* No description
|
|
165
|
+
*
|
|
166
|
+
* @tags Assistants
|
|
167
|
+
* @name AssistantControllerCreate
|
|
168
|
+
* @summary Create Assistant
|
|
169
|
+
* @request POST:/assistant
|
|
170
|
+
* @secure
|
|
171
|
+
*/
|
|
172
|
+
assistantControllerCreate: (data, params = {}) => this.request({
|
|
173
|
+
path: `/assistant`,
|
|
174
|
+
method: "POST",
|
|
175
|
+
body: data,
|
|
176
|
+
secure: true,
|
|
177
|
+
type: ContentType.Json,
|
|
178
|
+
format: "json",
|
|
179
|
+
...params,
|
|
180
|
+
}),
|
|
181
|
+
/**
|
|
182
|
+
* No description
|
|
183
|
+
*
|
|
184
|
+
* @tags Assistants
|
|
185
|
+
* @name AssistantControllerFindAll
|
|
186
|
+
* @summary List Assistants
|
|
187
|
+
* @request GET:/assistant
|
|
188
|
+
* @secure
|
|
189
|
+
*/
|
|
190
|
+
assistantControllerFindAll: (query, params = {}) => this.request({
|
|
191
|
+
path: `/assistant`,
|
|
192
|
+
method: "GET",
|
|
193
|
+
query: query,
|
|
194
|
+
secure: true,
|
|
195
|
+
format: "json",
|
|
196
|
+
...params,
|
|
197
|
+
}),
|
|
198
|
+
/**
|
|
199
|
+
* No description
|
|
200
|
+
*
|
|
201
|
+
* @tags Assistants
|
|
202
|
+
* @name AssistantControllerFindOne
|
|
203
|
+
* @summary Get Assistant
|
|
204
|
+
* @request GET:/assistant/{id}
|
|
205
|
+
* @secure
|
|
206
|
+
*/
|
|
207
|
+
assistantControllerFindOne: (id, params = {}) => this.request({
|
|
208
|
+
path: `/assistant/${id}`,
|
|
209
|
+
method: "GET",
|
|
210
|
+
secure: true,
|
|
211
|
+
format: "json",
|
|
212
|
+
...params,
|
|
213
|
+
}),
|
|
214
|
+
/**
|
|
215
|
+
* No description
|
|
216
|
+
*
|
|
217
|
+
* @tags Assistants
|
|
218
|
+
* @name AssistantControllerUpdate
|
|
219
|
+
* @summary Update Assistant
|
|
220
|
+
* @request PATCH:/assistant/{id}
|
|
221
|
+
* @secure
|
|
222
|
+
*/
|
|
223
|
+
assistantControllerUpdate: (id, data, params = {}) => this.request({
|
|
224
|
+
path: `/assistant/${id}`,
|
|
225
|
+
method: "PATCH",
|
|
226
|
+
body: data,
|
|
227
|
+
secure: true,
|
|
228
|
+
type: ContentType.Json,
|
|
229
|
+
format: "json",
|
|
230
|
+
...params,
|
|
231
|
+
}),
|
|
232
|
+
/**
|
|
233
|
+
* No description
|
|
234
|
+
*
|
|
235
|
+
* @tags Assistants
|
|
236
|
+
* @name AssistantControllerReplace
|
|
237
|
+
* @summary Replace Assistant
|
|
238
|
+
* @request PUT:/assistant/{id}
|
|
239
|
+
* @secure
|
|
240
|
+
*/
|
|
241
|
+
assistantControllerReplace: (id, data, params = {}) => this.request({
|
|
242
|
+
path: `/assistant/${id}`,
|
|
243
|
+
method: "PUT",
|
|
244
|
+
body: data,
|
|
245
|
+
secure: true,
|
|
246
|
+
type: ContentType.Json,
|
|
247
|
+
format: "json",
|
|
248
|
+
...params,
|
|
249
|
+
}),
|
|
250
|
+
/**
|
|
251
|
+
* No description
|
|
252
|
+
*
|
|
253
|
+
* @tags Assistants
|
|
254
|
+
* @name AssistantControllerRemove
|
|
255
|
+
* @summary Delete Assistant
|
|
256
|
+
* @request DELETE:/assistant/{id}
|
|
257
|
+
* @secure
|
|
258
|
+
*/
|
|
259
|
+
assistantControllerRemove: (id, params = {}) => this.request({
|
|
260
|
+
path: `/assistant/${id}`,
|
|
261
|
+
method: "DELETE",
|
|
262
|
+
secure: true,
|
|
263
|
+
format: "json",
|
|
264
|
+
...params,
|
|
265
|
+
}),
|
|
266
|
+
};
|
|
267
|
+
call = {
|
|
268
|
+
/**
|
|
269
|
+
* No description
|
|
270
|
+
*
|
|
271
|
+
* @tags Calls
|
|
272
|
+
* @name CallControllerFindAll
|
|
273
|
+
* @summary List Calls
|
|
274
|
+
* @request GET:/call
|
|
275
|
+
* @secure
|
|
276
|
+
*/
|
|
277
|
+
callControllerFindAll: (query, params = {}) => this.request({
|
|
278
|
+
path: `/call`,
|
|
279
|
+
method: "GET",
|
|
280
|
+
query: query,
|
|
281
|
+
secure: true,
|
|
282
|
+
format: "json",
|
|
283
|
+
...params,
|
|
284
|
+
}),
|
|
285
|
+
/**
|
|
286
|
+
* No description
|
|
287
|
+
*
|
|
288
|
+
* @tags Calls
|
|
289
|
+
* @name CallControllerFindOne
|
|
290
|
+
* @summary Get Call
|
|
291
|
+
* @request GET:/call/{id}
|
|
292
|
+
* @secure
|
|
293
|
+
*/
|
|
294
|
+
callControllerFindOne: (id, params = {}) => this.request({
|
|
295
|
+
path: `/call/${id}`,
|
|
296
|
+
method: "GET",
|
|
297
|
+
secure: true,
|
|
298
|
+
format: "json",
|
|
299
|
+
...params,
|
|
300
|
+
}),
|
|
301
|
+
/**
|
|
302
|
+
* No description
|
|
303
|
+
*
|
|
304
|
+
* @tags Calls
|
|
305
|
+
* @name CallControllerCreatePhoneCall
|
|
306
|
+
* @summary Create Phone Call
|
|
307
|
+
* @request POST:/call/phone
|
|
308
|
+
* @secure
|
|
309
|
+
*/
|
|
310
|
+
callControllerCreatePhoneCall: (data, params = {}) => this.request({
|
|
311
|
+
path: `/call/phone`,
|
|
312
|
+
method: "POST",
|
|
313
|
+
body: data,
|
|
314
|
+
secure: true,
|
|
315
|
+
type: ContentType.Json,
|
|
316
|
+
format: "json",
|
|
317
|
+
...params,
|
|
318
|
+
}),
|
|
319
|
+
/**
|
|
320
|
+
* No description
|
|
321
|
+
*
|
|
322
|
+
* @tags Calls
|
|
323
|
+
* @name CallControllerCreateWebCall
|
|
324
|
+
* @summary Create Web Call
|
|
325
|
+
* @request POST:/call/web
|
|
326
|
+
* @secure
|
|
327
|
+
*/
|
|
328
|
+
callControllerCreateWebCall: (data, params = {}) => this.request({
|
|
329
|
+
path: `/call/web`,
|
|
330
|
+
method: "POST",
|
|
331
|
+
body: data,
|
|
332
|
+
secure: true,
|
|
333
|
+
type: ContentType.Json,
|
|
334
|
+
format: "json",
|
|
335
|
+
...params,
|
|
336
|
+
}),
|
|
337
|
+
};
|
|
338
|
+
credential = {
|
|
339
|
+
/**
|
|
340
|
+
* No description
|
|
341
|
+
*
|
|
342
|
+
* @tags Credentials
|
|
343
|
+
* @name CredentialControllerCreate
|
|
344
|
+
* @summary Create Credential
|
|
345
|
+
* @request POST:/credential
|
|
346
|
+
* @secure
|
|
347
|
+
*/
|
|
348
|
+
credentialControllerCreate: (data, params = {}) => this.request({
|
|
349
|
+
path: `/credential`,
|
|
350
|
+
method: "POST",
|
|
351
|
+
body: data,
|
|
352
|
+
secure: true,
|
|
353
|
+
type: ContentType.Json,
|
|
354
|
+
format: "json",
|
|
355
|
+
...params,
|
|
356
|
+
}),
|
|
357
|
+
/**
|
|
358
|
+
* No description
|
|
359
|
+
*
|
|
360
|
+
* @tags Credentials
|
|
361
|
+
* @name CredentialControllerFindAll
|
|
362
|
+
* @summary List Credentials
|
|
363
|
+
* @request GET:/credential
|
|
364
|
+
* @secure
|
|
365
|
+
*/
|
|
366
|
+
credentialControllerFindAll: (query, params = {}) => this.request({
|
|
367
|
+
path: `/credential`,
|
|
368
|
+
method: "GET",
|
|
369
|
+
query: query,
|
|
370
|
+
secure: true,
|
|
371
|
+
format: "json",
|
|
372
|
+
...params,
|
|
373
|
+
}),
|
|
374
|
+
/**
|
|
375
|
+
* No description
|
|
376
|
+
*
|
|
377
|
+
* @tags Credentials
|
|
378
|
+
* @name CredentialControllerFindOne
|
|
379
|
+
* @summary Get Credential
|
|
380
|
+
* @request GET:/credential/{id}
|
|
381
|
+
* @secure
|
|
382
|
+
*/
|
|
383
|
+
credentialControllerFindOne: (id, params = {}) => this.request({
|
|
384
|
+
path: `/credential/${id}`,
|
|
385
|
+
method: "GET",
|
|
386
|
+
secure: true,
|
|
387
|
+
format: "json",
|
|
388
|
+
...params,
|
|
389
|
+
}),
|
|
390
|
+
/**
|
|
391
|
+
* No description
|
|
392
|
+
*
|
|
393
|
+
* @tags Credentials
|
|
394
|
+
* @name CredentialControllerUpdate
|
|
395
|
+
* @summary Update Credential
|
|
396
|
+
* @request PUT:/credential/{id}
|
|
397
|
+
* @secure
|
|
398
|
+
*/
|
|
399
|
+
credentialControllerUpdate: (id, data, params = {}) => this.request({
|
|
400
|
+
path: `/credential/${id}`,
|
|
401
|
+
method: "PUT",
|
|
402
|
+
body: data,
|
|
403
|
+
secure: true,
|
|
404
|
+
type: ContentType.Json,
|
|
405
|
+
format: "json",
|
|
406
|
+
...params,
|
|
407
|
+
}),
|
|
408
|
+
/**
|
|
409
|
+
* No description
|
|
410
|
+
*
|
|
411
|
+
* @tags Credentials
|
|
412
|
+
* @name CredentialControllerRemove
|
|
413
|
+
* @summary Delete Credential
|
|
414
|
+
* @request DELETE:/credential/{id}
|
|
415
|
+
* @secure
|
|
416
|
+
*/
|
|
417
|
+
credentialControllerRemove: (id, params = {}) => this.request({
|
|
418
|
+
path: `/credential/${id}`,
|
|
419
|
+
method: "DELETE",
|
|
420
|
+
secure: true,
|
|
421
|
+
format: "json",
|
|
422
|
+
...params,
|
|
423
|
+
}),
|
|
424
|
+
};
|
|
425
|
+
phoneNumber = {
|
|
426
|
+
/**
|
|
427
|
+
* No description
|
|
428
|
+
*
|
|
429
|
+
* @tags Phone Numbers
|
|
430
|
+
* @name PhoneNumberControllerBuy
|
|
431
|
+
* @summary Buy Phone Number
|
|
432
|
+
* @request POST:/phone-number/buy
|
|
433
|
+
* @secure
|
|
434
|
+
*/
|
|
435
|
+
phoneNumberControllerBuy: (data, params = {}) => this.request({
|
|
436
|
+
path: `/phone-number/buy`,
|
|
437
|
+
method: "POST",
|
|
438
|
+
body: data,
|
|
439
|
+
secure: true,
|
|
440
|
+
type: ContentType.Json,
|
|
441
|
+
format: "json",
|
|
442
|
+
...params,
|
|
443
|
+
}),
|
|
444
|
+
/**
|
|
445
|
+
* No description
|
|
446
|
+
*
|
|
447
|
+
* @tags Phone Numbers
|
|
448
|
+
* @name PhoneNumberControllerImport
|
|
449
|
+
* @summary Import Twilio Number
|
|
450
|
+
* @request POST:/phone-number/import
|
|
451
|
+
* @secure
|
|
452
|
+
*/
|
|
453
|
+
phoneNumberControllerImport: (data, params = {}) => this.request({
|
|
454
|
+
path: `/phone-number/import`,
|
|
455
|
+
method: "POST",
|
|
456
|
+
body: data,
|
|
457
|
+
secure: true,
|
|
458
|
+
type: ContentType.Json,
|
|
459
|
+
format: "json",
|
|
460
|
+
...params,
|
|
461
|
+
}),
|
|
462
|
+
/**
|
|
463
|
+
* No description
|
|
464
|
+
*
|
|
465
|
+
* @tags Phone Numbers
|
|
466
|
+
* @name PhoneNumberControllerFindAll
|
|
467
|
+
* @summary List Phone Numbers
|
|
468
|
+
* @request GET:/phone-number
|
|
469
|
+
* @secure
|
|
470
|
+
*/
|
|
471
|
+
phoneNumberControllerFindAll: (query, params = {}) => this.request({
|
|
472
|
+
path: `/phone-number`,
|
|
473
|
+
method: "GET",
|
|
474
|
+
query: query,
|
|
475
|
+
secure: true,
|
|
476
|
+
format: "json",
|
|
477
|
+
...params,
|
|
478
|
+
}),
|
|
479
|
+
/**
|
|
480
|
+
* No description
|
|
481
|
+
*
|
|
482
|
+
* @tags Phone Numbers
|
|
483
|
+
* @name PhoneNumberControllerFindOne
|
|
484
|
+
* @summary Get Phone Number
|
|
485
|
+
* @request GET:/phone-number/{id}
|
|
486
|
+
* @secure
|
|
487
|
+
*/
|
|
488
|
+
phoneNumberControllerFindOne: (id, params = {}) => this.request({
|
|
489
|
+
path: `/phone-number/${id}`,
|
|
490
|
+
method: "GET",
|
|
491
|
+
secure: true,
|
|
492
|
+
format: "json",
|
|
493
|
+
...params,
|
|
494
|
+
}),
|
|
495
|
+
/**
|
|
496
|
+
* No description
|
|
497
|
+
*
|
|
498
|
+
* @tags Phone Numbers
|
|
499
|
+
* @name PhoneNumberControllerUpdate
|
|
500
|
+
* @summary Update Phone Number
|
|
501
|
+
* @request PATCH:/phone-number/{id}
|
|
502
|
+
* @secure
|
|
503
|
+
*/
|
|
504
|
+
phoneNumberControllerUpdate: (id, data, params = {}) => this.request({
|
|
505
|
+
path: `/phone-number/${id}`,
|
|
506
|
+
method: "PATCH",
|
|
507
|
+
body: data,
|
|
508
|
+
secure: true,
|
|
509
|
+
type: ContentType.Json,
|
|
510
|
+
format: "json",
|
|
511
|
+
...params,
|
|
512
|
+
}),
|
|
513
|
+
/**
|
|
514
|
+
* No description
|
|
515
|
+
*
|
|
516
|
+
* @tags Phone Numbers
|
|
517
|
+
* @name PhoneNumberControllerRemove
|
|
518
|
+
* @summary Delete Phone Number
|
|
519
|
+
* @request DELETE:/phone-number/{id}
|
|
520
|
+
* @secure
|
|
521
|
+
*/
|
|
522
|
+
phoneNumberControllerRemove: (id, params = {}) => this.request({
|
|
523
|
+
path: `/phone-number/${id}`,
|
|
524
|
+
method: "DELETE",
|
|
525
|
+
secure: true,
|
|
526
|
+
format: "json",
|
|
527
|
+
...params,
|
|
528
|
+
}),
|
|
529
|
+
};
|
|
386
530
|
}
|
|
387
531
|
exports.Api = Api;
|