@unboundcx/sdk 4.8.9 → 4.8.11
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/base.js +71 -29
- package/index.js +6 -3
- package/package.json +1 -4
- package/services/ai/playbooks.js +22 -21
- package/services/ai/settings.js +4 -2
- package/services/ai/translate.js +3 -1
- package/services/ai/vocabulary.js +4 -3
- package/services/ai.js +21 -20
- package/services/chat.js +124 -48
- package/services/developerApis.js +174 -0
- package/services/directory.js +109 -12
- package/services/documents.js +11 -10
- package/services/engagementMetrics.js +2 -1
- package/services/enroll.js +16 -15
- package/services/externalOAuth.js +12 -11
- package/services/fax.js +4 -3
- package/services/generateId.js +3 -2
- package/services/googleCalendar.js +7 -6
- package/services/inbox.js +59 -11
- package/services/knowledgeBase.js +9 -8
- package/services/layouts.js +15 -14
- package/services/login.js +8 -7
- package/services/lookup.js +4 -3
- package/services/messaging/EmailAddressesService.js +5 -4
- package/services/messaging/EmailAnalyticsService.js +5 -4
- package/services/messaging/EmailDomainsService.js +8 -7
- package/services/messaging/EmailMailboxesService.js +59 -9
- package/services/messaging/EmailQueueService.js +2 -1
- package/services/messaging/EmailService.js +12 -11
- package/services/messaging/EmailSuppressionService.js +5 -4
- package/services/messaging/EmailTemplatesService.js +6 -5
- package/services/messaging/SmsService.js +3 -2
- package/services/messaging/SmsTemplatesService.js +6 -5
- package/services/messaging/TenDlcBrandsService.js +11 -10
- package/services/messaging/TenDlcCampaignManagementService.js +14 -13
- package/services/messaging/TenDlcCampaignsService.js +2 -1
- package/services/messaging/TollFreeCampaignsService.js +13 -12
- package/services/notes.js +7 -6
- package/services/objects.js +97 -36
- package/services/permissions.js +34 -33
- package/services/phoneNumbers.js +28 -27
- package/services/portals.js +8 -7
- package/services/recordTypes.js +12 -11
- package/services/search.js +2 -1
- package/services/sipEndpoints.js +8 -7
- package/services/storage.js +16 -15
- package/services/subscriptions.js +4 -3
- package/services/taskRouter/CCService.js +303 -0
- package/services/taskRouter/MetricsService.js +56 -1
- package/services/taskRouter/TaskRouterService.js +2 -0
- package/services/taskRouter/TaskService.js +13 -12
- package/services/taskRouter/WorkerService.js +9 -8
- package/services/triggers.js +9 -8
- package/services/verification.js +5 -4
- package/services/video.js +230 -45
- package/services/voice.js +40 -11
- package/services/workflows.js +22 -21
package/services/voice.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { internalRequest } from '../base.js';
|
|
1
2
|
export class VoiceService {
|
|
2
3
|
constructor(sdk) {
|
|
3
4
|
this.sdk = sdk;
|
|
@@ -18,7 +19,35 @@ export class VoiceService {
|
|
|
18
19
|
body: { callId, cdrId, action, direction },
|
|
19
20
|
};
|
|
20
21
|
|
|
21
|
-
const result = await this.sdk
|
|
22
|
+
const result = await internalRequest(this.sdk, `/voice/record/`, 'POST', params);
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
async transcription({
|
|
27
|
+
cdrId,
|
|
28
|
+
callId,
|
|
29
|
+
action = 'start',
|
|
30
|
+
direction = 'sendrecv',
|
|
31
|
+
}) {
|
|
32
|
+
this.sdk.validateParams(
|
|
33
|
+
{ callId, cdrId, action, direction },
|
|
34
|
+
{
|
|
35
|
+
cdrId: { type: 'string', required: false },
|
|
36
|
+
callId: { type: 'string', required: false },
|
|
37
|
+
action: { type: 'string', required: false },
|
|
38
|
+
direction: { type: 'string', required: false },
|
|
39
|
+
},
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
const params = {
|
|
43
|
+
body: { callId, cdrId, action, direction },
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const result = await internalRequest(this.sdk,
|
|
47
|
+
`/voice/transcription/`,
|
|
48
|
+
'POST',
|
|
49
|
+
params,
|
|
50
|
+
);
|
|
22
51
|
return result;
|
|
23
52
|
}
|
|
24
53
|
|
|
@@ -51,7 +80,7 @@ export class VoiceService {
|
|
|
51
80
|
},
|
|
52
81
|
};
|
|
53
82
|
|
|
54
|
-
const result = await this.sdk
|
|
83
|
+
const result = await internalRequest(this.sdk, '/voice/', 'POST', params);
|
|
55
84
|
return result;
|
|
56
85
|
}
|
|
57
86
|
|
|
@@ -115,7 +144,7 @@ export class VoiceService {
|
|
|
115
144
|
},
|
|
116
145
|
};
|
|
117
146
|
|
|
118
|
-
const result = await this.sdk
|
|
147
|
+
const result = await internalRequest(this.sdk, '/voice/replace', 'PUT', params);
|
|
119
148
|
return result;
|
|
120
149
|
}
|
|
121
150
|
|
|
@@ -147,7 +176,7 @@ export class VoiceService {
|
|
|
147
176
|
},
|
|
148
177
|
};
|
|
149
178
|
|
|
150
|
-
const result = await this.sdk
|
|
179
|
+
const result = await internalRequest(this.sdk, `/voice/hangup`, 'PUT', params);
|
|
151
180
|
return result;
|
|
152
181
|
}
|
|
153
182
|
|
|
@@ -173,7 +202,7 @@ export class VoiceService {
|
|
|
173
202
|
},
|
|
174
203
|
);
|
|
175
204
|
|
|
176
|
-
const result = await this.sdk
|
|
205
|
+
const result = await internalRequest(this.sdk, `/voice/cdr/${cdrId}/events`, 'GET');
|
|
177
206
|
return result;
|
|
178
207
|
}
|
|
179
208
|
|
|
@@ -191,7 +220,7 @@ export class VoiceService {
|
|
|
191
220
|
body: { channels },
|
|
192
221
|
};
|
|
193
222
|
|
|
194
|
-
const result = await this.sdk
|
|
223
|
+
const result = await internalRequest(this.sdk, '/voice/calls/hold', 'PUT', params);
|
|
195
224
|
return result;
|
|
196
225
|
}
|
|
197
226
|
|
|
@@ -209,7 +238,7 @@ export class VoiceService {
|
|
|
209
238
|
body: { action, direction },
|
|
210
239
|
};
|
|
211
240
|
|
|
212
|
-
const result = await this.sdk
|
|
241
|
+
const result = await internalRequest(this.sdk,
|
|
213
242
|
`/voice/calls/mute/${voiceChannelId}`,
|
|
214
243
|
'PUT',
|
|
215
244
|
params,
|
|
@@ -234,7 +263,7 @@ export class VoiceService {
|
|
|
234
263
|
body: { dtmf },
|
|
235
264
|
};
|
|
236
265
|
|
|
237
|
-
const result = await this.sdk
|
|
266
|
+
const result = await internalRequest(this.sdk,
|
|
238
267
|
`/voice/calls/dtmf/${voiceChannelId}`,
|
|
239
268
|
'POST',
|
|
240
269
|
params,
|
|
@@ -280,7 +309,7 @@ export class VoiceService {
|
|
|
280
309
|
body: bodyData,
|
|
281
310
|
};
|
|
282
311
|
|
|
283
|
-
const result = await this.sdk
|
|
312
|
+
const result = await internalRequest(this.sdk,
|
|
284
313
|
`/voice/calls/transcribe/${voiceChannelId}`,
|
|
285
314
|
'POST',
|
|
286
315
|
params,
|
|
@@ -323,7 +352,7 @@ export class VoiceService {
|
|
|
323
352
|
body: bodyData,
|
|
324
353
|
};
|
|
325
354
|
|
|
326
|
-
const result = await this.sdk
|
|
355
|
+
const result = await internalRequest(this.sdk,
|
|
327
356
|
'/voice/calls/transfer',
|
|
328
357
|
'POST',
|
|
329
358
|
params,
|
|
@@ -343,7 +372,7 @@ export class VoiceService {
|
|
|
343
372
|
body: { channels },
|
|
344
373
|
};
|
|
345
374
|
|
|
346
|
-
const result = await this.sdk
|
|
375
|
+
const result = await internalRequest(this.sdk,
|
|
347
376
|
'/voice/calls/conference',
|
|
348
377
|
'POST',
|
|
349
378
|
params,
|
package/services/workflows.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { internalRequest } from '../base.js';
|
|
1
2
|
export class WorkflowsService {
|
|
2
3
|
constructor(sdk) {
|
|
3
4
|
this.sdk = sdk;
|
|
@@ -18,7 +19,7 @@ export class WorkflowsService {
|
|
|
18
19
|
query: { type },
|
|
19
20
|
};
|
|
20
21
|
|
|
21
|
-
const result = await this.sdk
|
|
22
|
+
const result = await internalRequest(this.sdk, '/workflows/settings', 'GET', params);
|
|
22
23
|
return result;
|
|
23
24
|
}
|
|
24
25
|
|
|
@@ -27,12 +28,12 @@ export class WorkflowsService {
|
|
|
27
28
|
query: {},
|
|
28
29
|
};
|
|
29
30
|
|
|
30
|
-
const result = await this.sdk
|
|
31
|
+
const result = await internalRequest(this.sdk, '/workflows/modules', 'GET', params);
|
|
31
32
|
return result;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
async listFormulaFunctions() {
|
|
35
|
-
const result = await this.sdk
|
|
36
|
+
const result = await internalRequest(this.sdk,
|
|
36
37
|
'/workflows/formula-functions',
|
|
37
38
|
'GET',
|
|
38
39
|
);
|
|
@@ -40,7 +41,7 @@ export class WorkflowsService {
|
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
async getAvailableHolidaySets() {
|
|
43
|
-
const result = await this.sdk
|
|
44
|
+
const result = await internalRequest(this.sdk,
|
|
44
45
|
'/workflows/holiday-sets',
|
|
45
46
|
'GET',
|
|
46
47
|
);
|
|
@@ -59,7 +60,7 @@ export class WorkflowsService {
|
|
|
59
60
|
body: { webhookSettings },
|
|
60
61
|
};
|
|
61
62
|
|
|
62
|
-
const result = await this.sdk
|
|
63
|
+
const result = await internalRequest(this.sdk,
|
|
63
64
|
'/workflows/webhook/simulate',
|
|
64
65
|
'POST',
|
|
65
66
|
params,
|
|
@@ -79,7 +80,7 @@ export class WorkflowsService {
|
|
|
79
80
|
body: { lookupSettings },
|
|
80
81
|
};
|
|
81
82
|
|
|
82
|
-
const result = await this.sdk
|
|
83
|
+
const result = await internalRequest(this.sdk,
|
|
83
84
|
'/workflows/lookup/simulate',
|
|
84
85
|
'POST',
|
|
85
86
|
params,
|
|
@@ -99,7 +100,7 @@ export class WorkflowsService {
|
|
|
99
100
|
body: { timeControlSettings, testDateTime },
|
|
100
101
|
};
|
|
101
102
|
|
|
102
|
-
const result = await this.sdk
|
|
103
|
+
const result = await internalRequest(this.sdk,
|
|
103
104
|
'/workflows/timeControl/simulate',
|
|
104
105
|
'POST',
|
|
105
106
|
params,
|
|
@@ -129,7 +130,7 @@ export class WorkflowItemsService {
|
|
|
129
130
|
},
|
|
130
131
|
};
|
|
131
132
|
|
|
132
|
-
const result = await this.sdk
|
|
133
|
+
const result = await internalRequest(this.sdk,
|
|
133
134
|
'/object/workflowItems',
|
|
134
135
|
'DELETE',
|
|
135
136
|
params,
|
|
@@ -152,7 +153,7 @@ export class WorkflowItemsService {
|
|
|
152
153
|
},
|
|
153
154
|
};
|
|
154
155
|
|
|
155
|
-
const result = await this.sdk
|
|
156
|
+
const result = await internalRequest(this.sdk,
|
|
156
157
|
'/object/workflowItems',
|
|
157
158
|
'GET',
|
|
158
159
|
params,
|
|
@@ -205,7 +206,7 @@ export class WorkflowItemsService {
|
|
|
205
206
|
},
|
|
206
207
|
};
|
|
207
208
|
|
|
208
|
-
const result = await this.sdk
|
|
209
|
+
const result = await internalRequest(this.sdk,
|
|
209
210
|
'/object/workflowItems',
|
|
210
211
|
'POST',
|
|
211
212
|
params,
|
|
@@ -275,7 +276,7 @@ export class WorkflowItemsService {
|
|
|
275
276
|
},
|
|
276
277
|
};
|
|
277
278
|
|
|
278
|
-
const result = await this.sdk
|
|
279
|
+
const result = await internalRequest(this.sdk,
|
|
279
280
|
'/object/workflowItems',
|
|
280
281
|
'PUT',
|
|
281
282
|
params,
|
|
@@ -321,7 +322,7 @@ export class WorkflowConnectionsService {
|
|
|
321
322
|
},
|
|
322
323
|
};
|
|
323
324
|
|
|
324
|
-
const result = await this.sdk
|
|
325
|
+
const result = await internalRequest(this.sdk,
|
|
325
326
|
'/object/workflowItemConnections',
|
|
326
327
|
'DELETE',
|
|
327
328
|
params,
|
|
@@ -359,7 +360,7 @@ export class WorkflowConnectionsService {
|
|
|
359
360
|
},
|
|
360
361
|
};
|
|
361
362
|
|
|
362
|
-
const result = await this.sdk
|
|
363
|
+
const result = await internalRequest(this.sdk,
|
|
363
364
|
'/object/workflowItemConnections',
|
|
364
365
|
'POST',
|
|
365
366
|
params,
|
|
@@ -386,7 +387,7 @@ export class WorkflowSessionsService {
|
|
|
386
387
|
body: sessionData,
|
|
387
388
|
};
|
|
388
389
|
|
|
389
|
-
const result = await this.sdk
|
|
390
|
+
const result = await internalRequest(this.sdk,
|
|
390
391
|
`/workflows/session/${workflowVersionId}`,
|
|
391
392
|
'POST',
|
|
392
393
|
params,
|
|
@@ -402,7 +403,7 @@ export class WorkflowSessionsService {
|
|
|
402
403
|
},
|
|
403
404
|
);
|
|
404
405
|
|
|
405
|
-
const result = await this.sdk
|
|
406
|
+
const result = await internalRequest(this.sdk,
|
|
406
407
|
`/workflows/sessions/${sessionId}`,
|
|
407
408
|
'GET',
|
|
408
409
|
);
|
|
@@ -422,7 +423,7 @@ export class WorkflowSessionsService {
|
|
|
422
423
|
body: updateData,
|
|
423
424
|
};
|
|
424
425
|
|
|
425
|
-
const result = await this.sdk
|
|
426
|
+
const result = await internalRequest(this.sdk,
|
|
426
427
|
`/workflows/session/${sessionId}`,
|
|
427
428
|
'PUT',
|
|
428
429
|
params,
|
|
@@ -440,7 +441,7 @@ export class WorkflowSessionsService {
|
|
|
440
441
|
|
|
441
442
|
const params = {};
|
|
442
443
|
|
|
443
|
-
const result = await this.sdk
|
|
444
|
+
const result = await internalRequest(this.sdk,
|
|
444
445
|
`/workflows/session/${sessionId}/complete`,
|
|
445
446
|
'PUT',
|
|
446
447
|
params,
|
|
@@ -456,7 +457,7 @@ export class WorkflowSessionsService {
|
|
|
456
457
|
},
|
|
457
458
|
);
|
|
458
459
|
|
|
459
|
-
const result = await this.sdk
|
|
460
|
+
const result = await internalRequest(this.sdk,
|
|
460
461
|
`/workflows/sessions/${sessionId}`,
|
|
461
462
|
'DELETE',
|
|
462
463
|
);
|
|
@@ -475,7 +476,7 @@ export class WorkflowSessionsService {
|
|
|
475
476
|
body: transcriptData,
|
|
476
477
|
};
|
|
477
478
|
|
|
478
|
-
const result = await this.sdk
|
|
479
|
+
const result = await internalRequest(this.sdk,
|
|
479
480
|
`/workflows/session/${sessionId}/transcript`,
|
|
480
481
|
'POST',
|
|
481
482
|
params,
|
|
@@ -491,7 +492,7 @@ export class WorkflowSessionsService {
|
|
|
491
492
|
},
|
|
492
493
|
);
|
|
493
494
|
|
|
494
|
-
const result = await this.sdk
|
|
495
|
+
const result = await internalRequest(this.sdk,
|
|
495
496
|
`/workflows/session/${sessionId}/replay`,
|
|
496
497
|
'GET',
|
|
497
498
|
);
|
|
@@ -512,7 +513,7 @@ export class WorkflowSessionsService {
|
|
|
512
513
|
query: { startDate, endDate },
|
|
513
514
|
};
|
|
514
515
|
|
|
515
|
-
const result = await this.sdk
|
|
516
|
+
const result = await internalRequest(this.sdk,
|
|
516
517
|
`/workflows/${workflowVersionId}/analytics`,
|
|
517
518
|
'GET',
|
|
518
519
|
params,
|