@l7mp/tivadar-ai-api-sdk 0.2.6 → 0.2.8

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.
Files changed (66) hide show
  1. package/dist/api-client.d.ts +21 -1
  2. package/dist/api-client.js +16 -0
  3. package/dist/apis/InvitationsApi.d.ts +12 -0
  4. package/dist/apis/InvitationsApi.js +40 -0
  5. package/dist/apis/PhonebookApi.d.ts +133 -0
  6. package/dist/apis/PhonebookApi.js +434 -0
  7. package/dist/apis/index.d.ts +1 -0
  8. package/dist/apis/index.js +1 -0
  9. package/dist/esm/api-client.d.ts +21 -1
  10. package/dist/esm/api-client.js +16 -0
  11. package/dist/esm/apis/InvitationsApi.d.ts +12 -0
  12. package/dist/esm/apis/InvitationsApi.js +40 -0
  13. package/dist/esm/apis/PhonebookApi.d.ts +133 -0
  14. package/dist/esm/apis/PhonebookApi.js +430 -0
  15. package/dist/esm/apis/index.d.ts +1 -0
  16. package/dist/esm/apis/index.js +1 -0
  17. package/dist/esm/models/Phonebook.d.ts +56 -0
  18. package/dist/esm/models/Phonebook.js +59 -0
  19. package/dist/esm/models/PhonebookEntry.d.ts +89 -0
  20. package/dist/esm/models/PhonebookEntry.js +79 -0
  21. package/dist/esm/models/PhonebookEntryCreate.d.ts +50 -0
  22. package/dist/esm/models/PhonebookEntryCreate.js +51 -0
  23. package/dist/esm/models/PhonebookEntryUpdate.d.ts +50 -0
  24. package/dist/esm/models/PhonebookEntryUpdate.js +47 -0
  25. package/dist/esm/models/PhonebookImportResult.d.ts +57 -0
  26. package/dist/esm/models/PhonebookImportResult.js +60 -0
  27. package/dist/esm/models/PhonebookImportResultErrorsInner.d.ts +38 -0
  28. package/dist/esm/models/PhonebookImportResultErrorsInner.js +47 -0
  29. package/dist/esm/models/PhonebookUpdate.d.ts +32 -0
  30. package/dist/esm/models/PhonebookUpdate.js +41 -0
  31. package/dist/esm/models/VoiceAgentMetadata.d.ts +24 -0
  32. package/dist/esm/models/VoiceAgentMetadata.js +8 -0
  33. package/dist/esm/models/index.d.ts +7 -0
  34. package/dist/esm/models/index.js +7 -0
  35. package/dist/models/Phonebook.d.ts +56 -0
  36. package/dist/models/Phonebook.js +66 -0
  37. package/dist/models/PhonebookEntry.d.ts +89 -0
  38. package/dist/models/PhonebookEntry.js +87 -0
  39. package/dist/models/PhonebookEntryCreate.d.ts +50 -0
  40. package/dist/models/PhonebookEntryCreate.js +58 -0
  41. package/dist/models/PhonebookEntryUpdate.d.ts +50 -0
  42. package/dist/models/PhonebookEntryUpdate.js +54 -0
  43. package/dist/models/PhonebookImportResult.d.ts +57 -0
  44. package/dist/models/PhonebookImportResult.js +67 -0
  45. package/dist/models/PhonebookImportResultErrorsInner.d.ts +38 -0
  46. package/dist/models/PhonebookImportResultErrorsInner.js +54 -0
  47. package/dist/models/PhonebookUpdate.d.ts +32 -0
  48. package/dist/models/PhonebookUpdate.js +48 -0
  49. package/dist/models/VoiceAgentMetadata.d.ts +24 -0
  50. package/dist/models/VoiceAgentMetadata.js +8 -0
  51. package/dist/models/index.d.ts +7 -0
  52. package/dist/models/index.js +7 -0
  53. package/package.json +1 -1
  54. package/src/api-client.ts +35 -0
  55. package/src/apis/InvitationsApi.ts +57 -0
  56. package/src/apis/PhonebookApi.ts +599 -0
  57. package/src/apis/index.ts +1 -0
  58. package/src/models/Phonebook.ts +102 -0
  59. package/src/models/PhonebookEntry.ts +148 -0
  60. package/src/models/PhonebookEntryCreate.ts +91 -0
  61. package/src/models/PhonebookEntryUpdate.ts +89 -0
  62. package/src/models/PhonebookImportResult.ts +110 -0
  63. package/src/models/PhonebookImportResultErrorsInner.ts +75 -0
  64. package/src/models/PhonebookUpdate.ts +65 -0
  65. package/src/models/VoiceAgentMetadata.ts +32 -0
  66. package/src/models/index.ts +7 -0
@@ -0,0 +1,434 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Tivadar AI Backend API
6
+ * Unified REST API for Tivadar AI Voice Agents platform
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.PhonebookApi = void 0;
26
+ const runtime = require("../runtime");
27
+ const index_1 = require("../models/index");
28
+ /**
29
+ *
30
+ */
31
+ class PhonebookApi extends runtime.BaseAPI {
32
+ /**
33
+ * Delete a phonebook entry
34
+ */
35
+ organizationsOrganizationIdPhonebookEntriesEntryIdDeleteRaw(requestParameters, initOverrides) {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ if (requestParameters['organizationId'] == null) {
38
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdPhonebookEntriesEntryIdDelete().');
39
+ }
40
+ if (requestParameters['entryId'] == null) {
41
+ throw new runtime.RequiredError('entryId', 'Required parameter "entryId" was null or undefined when calling organizationsOrganizationIdPhonebookEntriesEntryIdDelete().');
42
+ }
43
+ const queryParameters = {};
44
+ const headerParameters = {};
45
+ if (this.configuration && this.configuration.accessToken) {
46
+ const token = this.configuration.accessToken;
47
+ const tokenString = yield token("bearerAuth", []);
48
+ if (tokenString) {
49
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
50
+ }
51
+ }
52
+ let urlPath = `/organizations/{organizationId}/phonebook/entries/{entryId}`;
53
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
54
+ urlPath = urlPath.replace(`{${"entryId"}}`, encodeURIComponent(String(requestParameters['entryId'])));
55
+ const response = yield this.request({
56
+ path: urlPath,
57
+ method: 'DELETE',
58
+ headers: headerParameters,
59
+ query: queryParameters,
60
+ }, initOverrides);
61
+ return new runtime.VoidApiResponse(response);
62
+ });
63
+ }
64
+ /**
65
+ * Delete a phonebook entry
66
+ */
67
+ organizationsOrganizationIdPhonebookEntriesEntryIdDelete(requestParameters, initOverrides) {
68
+ return __awaiter(this, void 0, void 0, function* () {
69
+ yield this.organizationsOrganizationIdPhonebookEntriesEntryIdDeleteRaw(requestParameters, initOverrides);
70
+ });
71
+ }
72
+ /**
73
+ * Get a phonebook entry by ID
74
+ */
75
+ organizationsOrganizationIdPhonebookEntriesEntryIdGetRaw(requestParameters, initOverrides) {
76
+ return __awaiter(this, void 0, void 0, function* () {
77
+ if (requestParameters['organizationId'] == null) {
78
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdPhonebookEntriesEntryIdGet().');
79
+ }
80
+ if (requestParameters['entryId'] == null) {
81
+ throw new runtime.RequiredError('entryId', 'Required parameter "entryId" was null or undefined when calling organizationsOrganizationIdPhonebookEntriesEntryIdGet().');
82
+ }
83
+ const queryParameters = {};
84
+ const headerParameters = {};
85
+ if (this.configuration && this.configuration.accessToken) {
86
+ const token = this.configuration.accessToken;
87
+ const tokenString = yield token("bearerAuth", []);
88
+ if (tokenString) {
89
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
90
+ }
91
+ }
92
+ let urlPath = `/organizations/{organizationId}/phonebook/entries/{entryId}`;
93
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
94
+ urlPath = urlPath.replace(`{${"entryId"}}`, encodeURIComponent(String(requestParameters['entryId'])));
95
+ const response = yield this.request({
96
+ path: urlPath,
97
+ method: 'GET',
98
+ headers: headerParameters,
99
+ query: queryParameters,
100
+ }, initOverrides);
101
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PhonebookEntryFromJSON)(jsonValue));
102
+ });
103
+ }
104
+ /**
105
+ * Get a phonebook entry by ID
106
+ */
107
+ organizationsOrganizationIdPhonebookEntriesEntryIdGet(requestParameters, initOverrides) {
108
+ return __awaiter(this, void 0, void 0, function* () {
109
+ const response = yield this.organizationsOrganizationIdPhonebookEntriesEntryIdGetRaw(requestParameters, initOverrides);
110
+ return yield response.value();
111
+ });
112
+ }
113
+ /**
114
+ * Update a phonebook entry
115
+ */
116
+ organizationsOrganizationIdPhonebookEntriesEntryIdPatchRaw(requestParameters, initOverrides) {
117
+ return __awaiter(this, void 0, void 0, function* () {
118
+ if (requestParameters['organizationId'] == null) {
119
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdPhonebookEntriesEntryIdPatch().');
120
+ }
121
+ if (requestParameters['entryId'] == null) {
122
+ throw new runtime.RequiredError('entryId', 'Required parameter "entryId" was null or undefined when calling organizationsOrganizationIdPhonebookEntriesEntryIdPatch().');
123
+ }
124
+ if (requestParameters['phonebookEntryUpdate'] == null) {
125
+ throw new runtime.RequiredError('phonebookEntryUpdate', 'Required parameter "phonebookEntryUpdate" was null or undefined when calling organizationsOrganizationIdPhonebookEntriesEntryIdPatch().');
126
+ }
127
+ const queryParameters = {};
128
+ const headerParameters = {};
129
+ headerParameters['Content-Type'] = 'application/json';
130
+ if (this.configuration && this.configuration.accessToken) {
131
+ const token = this.configuration.accessToken;
132
+ const tokenString = yield token("bearerAuth", []);
133
+ if (tokenString) {
134
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
135
+ }
136
+ }
137
+ let urlPath = `/organizations/{organizationId}/phonebook/entries/{entryId}`;
138
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
139
+ urlPath = urlPath.replace(`{${"entryId"}}`, encodeURIComponent(String(requestParameters['entryId'])));
140
+ const response = yield this.request({
141
+ path: urlPath,
142
+ method: 'PATCH',
143
+ headers: headerParameters,
144
+ query: queryParameters,
145
+ body: (0, index_1.PhonebookEntryUpdateToJSON)(requestParameters['phonebookEntryUpdate']),
146
+ }, initOverrides);
147
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PhonebookEntryFromJSON)(jsonValue));
148
+ });
149
+ }
150
+ /**
151
+ * Update a phonebook entry
152
+ */
153
+ organizationsOrganizationIdPhonebookEntriesEntryIdPatch(requestParameters, initOverrides) {
154
+ return __awaiter(this, void 0, void 0, function* () {
155
+ const response = yield this.organizationsOrganizationIdPhonebookEntriesEntryIdPatchRaw(requestParameters, initOverrides);
156
+ return yield response.value();
157
+ });
158
+ }
159
+ /**
160
+ * Export phonebook entries as CSV
161
+ */
162
+ organizationsOrganizationIdPhonebookEntriesExportGetRaw(requestParameters, initOverrides) {
163
+ return __awaiter(this, void 0, void 0, function* () {
164
+ if (requestParameters['organizationId'] == null) {
165
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdPhonebookEntriesExportGet().');
166
+ }
167
+ const queryParameters = {};
168
+ const headerParameters = {};
169
+ if (this.configuration && this.configuration.accessToken) {
170
+ const token = this.configuration.accessToken;
171
+ const tokenString = yield token("bearerAuth", []);
172
+ if (tokenString) {
173
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
174
+ }
175
+ }
176
+ let urlPath = `/organizations/{organizationId}/phonebook/entries/export`;
177
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
178
+ const response = yield this.request({
179
+ path: urlPath,
180
+ method: 'GET',
181
+ headers: headerParameters,
182
+ query: queryParameters,
183
+ }, initOverrides);
184
+ if (this.isJsonMime(response.headers.get('content-type'))) {
185
+ return new runtime.JSONApiResponse(response);
186
+ }
187
+ else {
188
+ return new runtime.TextApiResponse(response);
189
+ }
190
+ });
191
+ }
192
+ /**
193
+ * Export phonebook entries as CSV
194
+ */
195
+ organizationsOrganizationIdPhonebookEntriesExportGet(requestParameters, initOverrides) {
196
+ return __awaiter(this, void 0, void 0, function* () {
197
+ const response = yield this.organizationsOrganizationIdPhonebookEntriesExportGetRaw(requestParameters, initOverrides);
198
+ return yield response.value();
199
+ });
200
+ }
201
+ /**
202
+ * List phonebook entries
203
+ */
204
+ organizationsOrganizationIdPhonebookEntriesGetRaw(requestParameters, initOverrides) {
205
+ return __awaiter(this, void 0, void 0, function* () {
206
+ if (requestParameters['organizationId'] == null) {
207
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdPhonebookEntriesGet().');
208
+ }
209
+ const queryParameters = {};
210
+ if (requestParameters['search'] != null) {
211
+ queryParameters['search'] = requestParameters['search'];
212
+ }
213
+ if (requestParameters['limit'] != null) {
214
+ queryParameters['limit'] = requestParameters['limit'];
215
+ }
216
+ if (requestParameters['offset'] != null) {
217
+ queryParameters['offset'] = requestParameters['offset'];
218
+ }
219
+ const headerParameters = {};
220
+ if (this.configuration && this.configuration.accessToken) {
221
+ const token = this.configuration.accessToken;
222
+ const tokenString = yield token("bearerAuth", []);
223
+ if (tokenString) {
224
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
225
+ }
226
+ }
227
+ let urlPath = `/organizations/{organizationId}/phonebook/entries`;
228
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
229
+ const response = yield this.request({
230
+ path: urlPath,
231
+ method: 'GET',
232
+ headers: headerParameters,
233
+ query: queryParameters,
234
+ }, initOverrides);
235
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.PhonebookEntryFromJSON));
236
+ });
237
+ }
238
+ /**
239
+ * List phonebook entries
240
+ */
241
+ organizationsOrganizationIdPhonebookEntriesGet(requestParameters, initOverrides) {
242
+ return __awaiter(this, void 0, void 0, function* () {
243
+ const response = yield this.organizationsOrganizationIdPhonebookEntriesGetRaw(requestParameters, initOverrides);
244
+ return yield response.value();
245
+ });
246
+ }
247
+ /**
248
+ * Upload a CSV file. The header row is required and must contain at least `phone` and `name` columns. Optional columns: `company`, `email`. Header aliases (case-insensitive): phone/phone_number/number, name/full_name/contact, company/organization, email/email_address. Existing entries with the same phone are updated; new ones are inserted.
249
+ * Import phonebook entries from a CSV file
250
+ */
251
+ organizationsOrganizationIdPhonebookEntriesImportPostRaw(requestParameters, initOverrides) {
252
+ return __awaiter(this, void 0, void 0, function* () {
253
+ if (requestParameters['organizationId'] == null) {
254
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdPhonebookEntriesImportPost().');
255
+ }
256
+ if (requestParameters['file'] == null) {
257
+ throw new runtime.RequiredError('file', 'Required parameter "file" was null or undefined when calling organizationsOrganizationIdPhonebookEntriesImportPost().');
258
+ }
259
+ const queryParameters = {};
260
+ const headerParameters = {};
261
+ if (this.configuration && this.configuration.accessToken) {
262
+ const token = this.configuration.accessToken;
263
+ const tokenString = yield token("bearerAuth", []);
264
+ if (tokenString) {
265
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
266
+ }
267
+ }
268
+ const consumes = [
269
+ { contentType: 'multipart/form-data' },
270
+ ];
271
+ // @ts-ignore: canConsumeForm may be unused
272
+ const canConsumeForm = runtime.canConsumeForm(consumes);
273
+ let formParams;
274
+ let useForm = false;
275
+ // use FormData to transmit files using content-type "multipart/form-data"
276
+ useForm = canConsumeForm;
277
+ if (useForm) {
278
+ formParams = new FormData();
279
+ }
280
+ else {
281
+ formParams = new URLSearchParams();
282
+ }
283
+ if (requestParameters['file'] != null) {
284
+ formParams.append('file', requestParameters['file']);
285
+ }
286
+ let urlPath = `/organizations/{organizationId}/phonebook/entries/import`;
287
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
288
+ const response = yield this.request({
289
+ path: urlPath,
290
+ method: 'POST',
291
+ headers: headerParameters,
292
+ query: queryParameters,
293
+ body: formParams,
294
+ }, initOverrides);
295
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PhonebookImportResultFromJSON)(jsonValue));
296
+ });
297
+ }
298
+ /**
299
+ * Upload a CSV file. The header row is required and must contain at least `phone` and `name` columns. Optional columns: `company`, `email`. Header aliases (case-insensitive): phone/phone_number/number, name/full_name/contact, company/organization, email/email_address. Existing entries with the same phone are updated; new ones are inserted.
300
+ * Import phonebook entries from a CSV file
301
+ */
302
+ organizationsOrganizationIdPhonebookEntriesImportPost(requestParameters, initOverrides) {
303
+ return __awaiter(this, void 0, void 0, function* () {
304
+ const response = yield this.organizationsOrganizationIdPhonebookEntriesImportPostRaw(requestParameters, initOverrides);
305
+ return yield response.value();
306
+ });
307
+ }
308
+ /**
309
+ * Create a phonebook entry
310
+ */
311
+ organizationsOrganizationIdPhonebookEntriesPostRaw(requestParameters, initOverrides) {
312
+ return __awaiter(this, void 0, void 0, function* () {
313
+ if (requestParameters['organizationId'] == null) {
314
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdPhonebookEntriesPost().');
315
+ }
316
+ if (requestParameters['phonebookEntryCreate'] == null) {
317
+ throw new runtime.RequiredError('phonebookEntryCreate', 'Required parameter "phonebookEntryCreate" was null or undefined when calling organizationsOrganizationIdPhonebookEntriesPost().');
318
+ }
319
+ const queryParameters = {};
320
+ const headerParameters = {};
321
+ headerParameters['Content-Type'] = 'application/json';
322
+ if (this.configuration && this.configuration.accessToken) {
323
+ const token = this.configuration.accessToken;
324
+ const tokenString = yield token("bearerAuth", []);
325
+ if (tokenString) {
326
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
327
+ }
328
+ }
329
+ let urlPath = `/organizations/{organizationId}/phonebook/entries`;
330
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
331
+ const response = yield this.request({
332
+ path: urlPath,
333
+ method: 'POST',
334
+ headers: headerParameters,
335
+ query: queryParameters,
336
+ body: (0, index_1.PhonebookEntryCreateToJSON)(requestParameters['phonebookEntryCreate']),
337
+ }, initOverrides);
338
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PhonebookEntryFromJSON)(jsonValue));
339
+ });
340
+ }
341
+ /**
342
+ * Create a phonebook entry
343
+ */
344
+ organizationsOrganizationIdPhonebookEntriesPost(requestParameters, initOverrides) {
345
+ return __awaiter(this, void 0, void 0, function* () {
346
+ const response = yield this.organizationsOrganizationIdPhonebookEntriesPostRaw(requestParameters, initOverrides);
347
+ return yield response.value();
348
+ });
349
+ }
350
+ /**
351
+ * Returns the phonebook record (lazily created on first access).
352
+ * Get the organization\'s phonebook settings
353
+ */
354
+ organizationsOrganizationIdPhonebookGetRaw(requestParameters, initOverrides) {
355
+ return __awaiter(this, void 0, void 0, function* () {
356
+ if (requestParameters['organizationId'] == null) {
357
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdPhonebookGet().');
358
+ }
359
+ const queryParameters = {};
360
+ const headerParameters = {};
361
+ if (this.configuration && this.configuration.accessToken) {
362
+ const token = this.configuration.accessToken;
363
+ const tokenString = yield token("bearerAuth", []);
364
+ if (tokenString) {
365
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
366
+ }
367
+ }
368
+ let urlPath = `/organizations/{organizationId}/phonebook`;
369
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
370
+ const response = yield this.request({
371
+ path: urlPath,
372
+ method: 'GET',
373
+ headers: headerParameters,
374
+ query: queryParameters,
375
+ }, initOverrides);
376
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PhonebookFromJSON)(jsonValue));
377
+ });
378
+ }
379
+ /**
380
+ * Returns the phonebook record (lazily created on first access).
381
+ * Get the organization\'s phonebook settings
382
+ */
383
+ organizationsOrganizationIdPhonebookGet(requestParameters, initOverrides) {
384
+ return __awaiter(this, void 0, void 0, function* () {
385
+ const response = yield this.organizationsOrganizationIdPhonebookGetRaw(requestParameters, initOverrides);
386
+ return yield response.value();
387
+ });
388
+ }
389
+ /**
390
+ * Update phonebook settings such as the auto_populate flag.
391
+ * Update phonebook settings
392
+ */
393
+ organizationsOrganizationIdPhonebookPatchRaw(requestParameters, initOverrides) {
394
+ return __awaiter(this, void 0, void 0, function* () {
395
+ if (requestParameters['organizationId'] == null) {
396
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdPhonebookPatch().');
397
+ }
398
+ if (requestParameters['phonebookUpdate'] == null) {
399
+ throw new runtime.RequiredError('phonebookUpdate', 'Required parameter "phonebookUpdate" was null or undefined when calling organizationsOrganizationIdPhonebookPatch().');
400
+ }
401
+ const queryParameters = {};
402
+ const headerParameters = {};
403
+ headerParameters['Content-Type'] = 'application/json';
404
+ if (this.configuration && this.configuration.accessToken) {
405
+ const token = this.configuration.accessToken;
406
+ const tokenString = yield token("bearerAuth", []);
407
+ if (tokenString) {
408
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
409
+ }
410
+ }
411
+ let urlPath = `/organizations/{organizationId}/phonebook`;
412
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
413
+ const response = yield this.request({
414
+ path: urlPath,
415
+ method: 'PATCH',
416
+ headers: headerParameters,
417
+ query: queryParameters,
418
+ body: (0, index_1.PhonebookUpdateToJSON)(requestParameters['phonebookUpdate']),
419
+ }, initOverrides);
420
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PhonebookFromJSON)(jsonValue));
421
+ });
422
+ }
423
+ /**
424
+ * Update phonebook settings such as the auto_populate flag.
425
+ * Update phonebook settings
426
+ */
427
+ organizationsOrganizationIdPhonebookPatch(requestParameters, initOverrides) {
428
+ return __awaiter(this, void 0, void 0, function* () {
429
+ const response = yield this.organizationsOrganizationIdPhonebookPatchRaw(requestParameters, initOverrides);
430
+ return yield response.value();
431
+ });
432
+ }
433
+ }
434
+ exports.PhonebookApi = PhonebookApi;
@@ -8,6 +8,7 @@ export * from './LLMProvidersApi';
8
8
  export * from './MembersApi';
9
9
  export * from './NotificationsApi';
10
10
  export * from './OrganizationsApi';
11
+ export * from './PhonebookApi';
11
12
  export * from './PlaygroundApi';
12
13
  export * from './ProfileApi';
13
14
  export * from './RAGApi';
@@ -26,6 +26,7 @@ __exportStar(require("./LLMProvidersApi"), exports);
26
26
  __exportStar(require("./MembersApi"), exports);
27
27
  __exportStar(require("./NotificationsApi"), exports);
28
28
  __exportStar(require("./OrganizationsApi"), exports);
29
+ __exportStar(require("./PhonebookApi"), exports);
29
30
  __exportStar(require("./PlaygroundApi"), exports);
30
31
  __exportStar(require("./ProfileApi"), exports);
31
32
  __exportStar(require("./RAGApi"), exports);
@@ -18,7 +18,8 @@ import { TTSProvidersApi } from "./apis/TTSProvidersApi";
18
18
  import { SubscriptionApi } from "./apis/SubscriptionApi";
19
19
  import { VoiceAgentsApi } from "./apis/VoiceAgentsApi";
20
20
  import { ToolsApi } from "./apis/ToolsApi";
21
- import type { CallCreate, CallUpdate, NotificationScope, NotificationSeverity, NotificationType, VoiceAgentCreate, VoiceAgentUpdate, ChatAgentCreate, ChatAgentUpdate, Calendar, CalendarCreate, CalendarUpdate, CalendarEventCreate, CalendarEventUpdate, InvitationAccept, InvitationCreate, RagConfigCreate, SipTrunkCreate, DispatchRuleCreate, PhoneNumberCreate, OrganizationCreate, CreateCheckoutSessionRequest, CancelSubscriptionRequest, UpdatePlanRequest, PauseSubscriptionRequest, BillingPortalRequest, UserPreferencesUpdate, AgentToolUpsert } from "./models";
21
+ import { PhonebookApi } from "./apis/PhonebookApi";
22
+ import type { CallCreate, CallUpdate, NotificationScope, NotificationSeverity, NotificationType, VoiceAgentCreate, VoiceAgentUpdate, ChatAgentCreate, ChatAgentUpdate, Calendar, CalendarCreate, CalendarUpdate, CalendarEventCreate, CalendarEventUpdate, InvitationAccept, InvitationCreate, RagConfigCreate, SipTrunkCreate, DispatchRuleCreate, PhoneNumberCreate, OrganizationCreate, CreateCheckoutSessionRequest, CancelSubscriptionRequest, UpdatePlanRequest, PauseSubscriptionRequest, BillingPortalRequest, UserPreferencesUpdate, AgentToolUpsert, PhonebookUpdate, PhonebookEntryCreate, PhonebookEntryUpdate } from "./models";
22
23
  export interface ApiClientConfig {
23
24
  baseUrl: string;
24
25
  options?: {
@@ -72,6 +73,7 @@ export declare class Api {
72
73
  accept: (invitationAccept: InvitationAccept, options?: RequestInit) => ReturnType<InvitationsApi["invitationsAcceptPost"]>;
73
74
  list: (organizationId: string, options?: RequestInit) => ReturnType<InvitationsApi["organizationsOrganizationIdInvitationsGet"]>;
74
75
  create: (organizationId: string, invitationCreate: InvitationCreate, options?: RequestInit) => ReturnType<InvitationsApi["organizationsOrganizationIdInvitationsPost"]>;
76
+ cancel: (organizationId: string, invitationId: number, options?: RequestInit) => ReturnType<InvitationsApi["organizationsOrganizationIdInvitationsInvitationIdDelete"]>;
75
77
  };
76
78
  readonly recordings: {
77
79
  get: (organizationId: string, callId: string, options?: RequestInit) => ReturnType<RecordingsApi["organizationsOrganizationIdRecordingsCallIdGet"]>;
@@ -157,6 +159,23 @@ export declare class Api {
157
159
  upsertForAgent: (organizationId: string, voiceAgentId: string, toolName: string, agentToolUpsert: AgentToolUpsert, options?: RequestInit) => ReturnType<ToolsApi["organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePut"]>;
158
160
  removeFromAgent: (organizationId: string, voiceAgentId: string, toolName: string, options?: RequestInit) => ReturnType<ToolsApi["organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDelete"]>;
159
161
  };
162
+ readonly phonebook: {
163
+ get: (organizationId: string, options?: RequestInit) => ReturnType<PhonebookApi["organizationsOrganizationIdPhonebookGet"]>;
164
+ update: (organizationId: string, phonebookUpdate: PhonebookUpdate, options?: RequestInit) => ReturnType<PhonebookApi["organizationsOrganizationIdPhonebookPatch"]>;
165
+ entries: {
166
+ list: (organizationId: string, params?: {
167
+ search?: string;
168
+ limit?: number;
169
+ offset?: number;
170
+ }, options?: RequestInit) => ReturnType<PhonebookApi["organizationsOrganizationIdPhonebookEntriesGet"]>;
171
+ get: (organizationId: string, entryId: string, options?: RequestInit) => ReturnType<PhonebookApi["organizationsOrganizationIdPhonebookEntriesEntryIdGet"]>;
172
+ create: (organizationId: string, phonebookEntryCreate: PhonebookEntryCreate, options?: RequestInit) => ReturnType<PhonebookApi["organizationsOrganizationIdPhonebookEntriesPost"]>;
173
+ update: (organizationId: string, entryId: string, phonebookEntryUpdate: PhonebookEntryUpdate, options?: RequestInit) => ReturnType<PhonebookApi["organizationsOrganizationIdPhonebookEntriesEntryIdPatch"]>;
174
+ delete: (organizationId: string, entryId: string, options?: RequestInit) => ReturnType<PhonebookApi["organizationsOrganizationIdPhonebookEntriesEntryIdDelete"]>;
175
+ import: (organizationId: string, file: Blob, options?: RequestInit) => ReturnType<PhonebookApi["organizationsOrganizationIdPhonebookEntriesImportPost"]>;
176
+ export: (organizationId: string, options?: RequestInit) => ReturnType<PhonebookApi["organizationsOrganizationIdPhonebookEntriesExportGet"]>;
177
+ };
178
+ };
160
179
  private readonly callsApi;
161
180
  private readonly voiceAgentsApi;
162
181
  private readonly chatAgentsApi;
@@ -177,6 +196,7 @@ export declare class Api {
177
196
  private readonly sttProvidersApi;
178
197
  private readonly ttsProvidersApi;
179
198
  private readonly toolsApi;
199
+ private readonly phonebookApi;
180
200
  private readonly _auth;
181
201
  constructor(config: ApiClientConfig);
182
202
  /**
@@ -27,6 +27,7 @@ import { TTSProvidersApi } from "./apis/TTSProvidersApi";
27
27
  import { SubscriptionApi } from "./apis/SubscriptionApi";
28
28
  import { VoiceAgentsApi } from "./apis/VoiceAgentsApi";
29
29
  import { ToolsApi } from "./apis/ToolsApi";
30
+ import { PhonebookApi } from "./apis/PhonebookApi";
30
31
  import { Configuration } from "./runtime";
31
32
  export class Api {
32
33
  constructor(config) {
@@ -66,6 +67,7 @@ export class Api {
66
67
  this.sttProvidersApi = new STTProvidersApi(configuration);
67
68
  this.ttsProvidersApi = new TTSProvidersApi(configuration);
68
69
  this.toolsApi = new ToolsApi(configuration);
70
+ this.phonebookApi = new PhonebookApi(configuration);
69
71
  this.calls = {
70
72
  list: (organizationId, voiceAgentId, sandbox, options) => this.callsApi.organizationsOrganizationIdCallsGet({ organizationId, voiceAgentId, sandbox }, options),
71
73
  get: (organizationId, callId, options) => this.callsApi.organizationsOrganizationIdCallsCallIdGet({ organizationId, callId }, options),
@@ -116,6 +118,7 @@ export class Api {
116
118
  accept: (invitationAccept, options) => this.invitationsApi.invitationsAcceptPost({ invitationAccept }, options),
117
119
  list: (organizationId, options) => this.invitationsApi.organizationsOrganizationIdInvitationsGet({ organizationId }, options),
118
120
  create: (organizationId, invitationCreate, options) => this.invitationsApi.organizationsOrganizationIdInvitationsPost({ organizationId, invitationCreate }, options),
121
+ cancel: (organizationId, invitationId, options) => this.invitationsApi.organizationsOrganizationIdInvitationsInvitationIdDelete({ organizationId, invitationId }, options),
119
122
  };
120
123
  this.recordings = {
121
124
  get: (organizationId, callId, options) => this.recordingsApi.organizationsOrganizationIdRecordingsCallIdGet({ organizationId, callId }, options),
@@ -195,6 +198,19 @@ export class Api {
195
198
  upsertForAgent: (organizationId, voiceAgentId, toolName, agentToolUpsert, options) => this.toolsApi.organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNamePut({ organizationId, voiceAgentId, toolName, agentToolUpsert }, options),
196
199
  removeFromAgent: (organizationId, voiceAgentId, toolName, options) => this.toolsApi.organizationsOrganizationIdVoiceAgentsVoiceAgentIdToolsToolNameDelete({ organizationId, voiceAgentId, toolName }, options),
197
200
  };
201
+ this.phonebook = {
202
+ get: (organizationId, options) => this.phonebookApi.organizationsOrganizationIdPhonebookGet({ organizationId }, options),
203
+ update: (organizationId, phonebookUpdate, options) => this.phonebookApi.organizationsOrganizationIdPhonebookPatch({ organizationId, phonebookUpdate }, options),
204
+ entries: {
205
+ list: (organizationId, params, options) => this.phonebookApi.organizationsOrganizationIdPhonebookEntriesGet({ organizationId, search: params === null || params === void 0 ? void 0 : params.search, limit: params === null || params === void 0 ? void 0 : params.limit, offset: params === null || params === void 0 ? void 0 : params.offset }, options),
206
+ get: (organizationId, entryId, options) => this.phonebookApi.organizationsOrganizationIdPhonebookEntriesEntryIdGet({ organizationId, entryId }, options),
207
+ create: (organizationId, phonebookEntryCreate, options) => this.phonebookApi.organizationsOrganizationIdPhonebookEntriesPost({ organizationId, phonebookEntryCreate }, options),
208
+ update: (organizationId, entryId, phonebookEntryUpdate, options) => this.phonebookApi.organizationsOrganizationIdPhonebookEntriesEntryIdPatch({ organizationId, entryId, phonebookEntryUpdate }, options),
209
+ delete: (organizationId, entryId, options) => this.phonebookApi.organizationsOrganizationIdPhonebookEntriesEntryIdDelete({ organizationId, entryId }, options),
210
+ import: (organizationId, file, options) => this.phonebookApi.organizationsOrganizationIdPhonebookEntriesImportPost({ organizationId, file }, options),
211
+ export: (organizationId, options) => this.phonebookApi.organizationsOrganizationIdPhonebookEntriesExportGet({ organizationId }, options),
212
+ },
213
+ };
198
214
  }
199
215
  /**
200
216
  * Set the Bearer token for Authorization header.
@@ -17,6 +17,10 @@ export interface InvitationsAcceptPostRequest {
17
17
  export interface OrganizationsOrganizationIdInvitationsGetRequest {
18
18
  organizationId: string;
19
19
  }
20
+ export interface OrganizationsOrganizationIdInvitationsInvitationIdDeleteRequest {
21
+ organizationId: string;
22
+ invitationId: number;
23
+ }
20
24
  export interface OrganizationsOrganizationIdInvitationsPostRequest {
21
25
  organizationId: string;
22
26
  invitationCreate: InvitationCreate;
@@ -41,6 +45,14 @@ export declare class InvitationsApi extends runtime.BaseAPI {
41
45
  * List all invitations for an organization
42
46
  */
43
47
  organizationsOrganizationIdInvitationsGet(requestParameters: OrganizationsOrganizationIdInvitationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<InvitationResponse>>;
48
+ /**
49
+ * Cancel (delete) a pending invitation
50
+ */
51
+ organizationsOrganizationIdInvitationsInvitationIdDeleteRaw(requestParameters: OrganizationsOrganizationIdInvitationsInvitationIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
52
+ /**
53
+ * Cancel (delete) a pending invitation
54
+ */
55
+ organizationsOrganizationIdInvitationsInvitationIdDelete(requestParameters: OrganizationsOrganizationIdInvitationsInvitationIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
44
56
  /**
45
57
  * Create a new invitation
46
58
  */
@@ -101,6 +101,46 @@ export class InvitationsApi extends runtime.BaseAPI {
101
101
  return yield response.value();
102
102
  });
103
103
  }
104
+ /**
105
+ * Cancel (delete) a pending invitation
106
+ */
107
+ organizationsOrganizationIdInvitationsInvitationIdDeleteRaw(requestParameters, initOverrides) {
108
+ return __awaiter(this, void 0, void 0, function* () {
109
+ if (requestParameters['organizationId'] == null) {
110
+ throw new runtime.RequiredError('organizationId', 'Required parameter "organizationId" was null or undefined when calling organizationsOrganizationIdInvitationsInvitationIdDelete().');
111
+ }
112
+ if (requestParameters['invitationId'] == null) {
113
+ throw new runtime.RequiredError('invitationId', 'Required parameter "invitationId" was null or undefined when calling organizationsOrganizationIdInvitationsInvitationIdDelete().');
114
+ }
115
+ const queryParameters = {};
116
+ const headerParameters = {};
117
+ if (this.configuration && this.configuration.accessToken) {
118
+ const token = this.configuration.accessToken;
119
+ const tokenString = yield token("bearerAuth", []);
120
+ if (tokenString) {
121
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
122
+ }
123
+ }
124
+ let urlPath = `/organizations/{organizationId}/invitations/{invitationId}`;
125
+ urlPath = urlPath.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters['organizationId'])));
126
+ urlPath = urlPath.replace(`{${"invitationId"}}`, encodeURIComponent(String(requestParameters['invitationId'])));
127
+ const response = yield this.request({
128
+ path: urlPath,
129
+ method: 'DELETE',
130
+ headers: headerParameters,
131
+ query: queryParameters,
132
+ }, initOverrides);
133
+ return new runtime.VoidApiResponse(response);
134
+ });
135
+ }
136
+ /**
137
+ * Cancel (delete) a pending invitation
138
+ */
139
+ organizationsOrganizationIdInvitationsInvitationIdDelete(requestParameters, initOverrides) {
140
+ return __awaiter(this, void 0, void 0, function* () {
141
+ yield this.organizationsOrganizationIdInvitationsInvitationIdDeleteRaw(requestParameters, initOverrides);
142
+ });
143
+ }
104
144
  /**
105
145
  * Create a new invitation
106
146
  */