@unboundcx/sdk 2.7.6 → 2.8.0
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 +76 -43
- package/index.js +4 -1
- package/package.json +1 -1
- package/services/ai.js +16 -3
- package/services/engagementMetrics.js +153 -0
- package/services/messaging/CampaignsService.js +10 -0
- package/services/messaging/EmailAddressesService.js +89 -0
- package/services/messaging/EmailAnalyticsService.js +109 -0
- package/services/messaging/EmailDomainsService.js +252 -0
- package/services/messaging/EmailMailboxesService.js +458 -0
- package/services/messaging/EmailQueueService.js +96 -0
- package/services/messaging/EmailService.js +690 -0
- package/services/messaging/EmailSuppressionService.js +189 -0
- package/services/messaging/EmailTemplatesService.js +145 -0
- package/services/messaging/MessagingService.js +12 -0
- package/services/messaging/SmsService.js +75 -0
- package/services/messaging/SmsTemplatesService.js +124 -0
- package/services/messaging/TenDlcBrandsService.js +446 -0
- package/services/messaging/TenDlcCampaignManagementService.js +390 -0
- package/services/messaging/TenDlcCampaignsService.js +32 -0
- package/services/messaging/TollFreeCampaignsService.js +304 -0
- package/services/messaging.js +37 -1986
- package/services/objects.js +28 -38
- package/services/recordTypes.js +227 -4
- package/services/sipEndpoints.js +12 -12
- package/services/storage.js +226 -1
- package/services/video.js +59 -1
package/services/video.js
CHANGED
|
@@ -31,7 +31,12 @@ export class VideoService {
|
|
|
31
31
|
tokenType: 'cookie',
|
|
32
32
|
},
|
|
33
33
|
};
|
|
34
|
-
const result = await this.sdk._fetch(
|
|
34
|
+
const result = await this.sdk._fetch(
|
|
35
|
+
`/video/${room}/join`,
|
|
36
|
+
'POST',
|
|
37
|
+
params,
|
|
38
|
+
true,
|
|
39
|
+
);
|
|
35
40
|
return result;
|
|
36
41
|
}
|
|
37
42
|
|
|
@@ -143,6 +148,7 @@ export class VideoService {
|
|
|
143
148
|
startCameraMutedAfter,
|
|
144
149
|
startMicrophoneMuted,
|
|
145
150
|
startMicrophoneMutedAfter,
|
|
151
|
+
engagementSessionId,
|
|
146
152
|
}) {
|
|
147
153
|
this.sdk.validateParams(
|
|
148
154
|
{
|
|
@@ -160,6 +166,7 @@ export class VideoService {
|
|
|
160
166
|
startCameraMutedAfter,
|
|
161
167
|
startMicrophoneMuted,
|
|
162
168
|
startMicrophoneMutedAfter,
|
|
169
|
+
engagementSessionId,
|
|
163
170
|
},
|
|
164
171
|
{
|
|
165
172
|
name: { type: 'string', required: false },
|
|
@@ -176,6 +183,7 @@ export class VideoService {
|
|
|
176
183
|
startCameraMutedAfter: { type: 'number', required: false },
|
|
177
184
|
startMicrophoneMuted: { type: 'boolean', required: false },
|
|
178
185
|
startMicrophoneMutedAfter: { type: 'number', required: false },
|
|
186
|
+
engagementSessionId: { type: 'string', required: false },
|
|
179
187
|
},
|
|
180
188
|
);
|
|
181
189
|
const params = {
|
|
@@ -194,6 +202,7 @@ export class VideoService {
|
|
|
194
202
|
startCameraMutedAfter,
|
|
195
203
|
startMicrophoneMuted,
|
|
196
204
|
startMicrophoneMutedAfter,
|
|
205
|
+
engagementSessionId,
|
|
197
206
|
},
|
|
198
207
|
};
|
|
199
208
|
const result = await this.sdk._fetch(`/video`, 'POST', params);
|
|
@@ -410,4 +419,53 @@ export class VideoService {
|
|
|
410
419
|
);
|
|
411
420
|
return result;
|
|
412
421
|
}
|
|
422
|
+
|
|
423
|
+
async submitSurvey({
|
|
424
|
+
videoRoomId,
|
|
425
|
+
participantId,
|
|
426
|
+
email,
|
|
427
|
+
videoQuality,
|
|
428
|
+
audioQuality,
|
|
429
|
+
feedback,
|
|
430
|
+
}) {
|
|
431
|
+
this.sdk.validateParams(
|
|
432
|
+
{ videoRoomId },
|
|
433
|
+
{
|
|
434
|
+
videoRoomId: { type: 'string', required: true },
|
|
435
|
+
},
|
|
436
|
+
);
|
|
437
|
+
|
|
438
|
+
// Validate optional parameters
|
|
439
|
+
const validationSchema = {};
|
|
440
|
+
if (participantId !== undefined)
|
|
441
|
+
validationSchema.participantId = { type: 'string' };
|
|
442
|
+
if (email !== undefined) validationSchema.email = { type: 'string' };
|
|
443
|
+
if (videoQuality !== undefined)
|
|
444
|
+
validationSchema.videoQuality = { type: 'number' };
|
|
445
|
+
if (audioQuality !== undefined)
|
|
446
|
+
validationSchema.audioQuality = { type: 'number' };
|
|
447
|
+
if (feedback !== undefined) validationSchema.feedback = { type: 'string' };
|
|
448
|
+
|
|
449
|
+
const surveyData = {
|
|
450
|
+
participantId,
|
|
451
|
+
email,
|
|
452
|
+
videoQuality,
|
|
453
|
+
audioQuality,
|
|
454
|
+
feedback,
|
|
455
|
+
};
|
|
456
|
+
|
|
457
|
+
if (Object.keys(validationSchema).length > 0) {
|
|
458
|
+
this.sdk.validateParams(surveyData, validationSchema);
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
const params = {
|
|
462
|
+
body: {
|
|
463
|
+
videoRoomId,
|
|
464
|
+
...surveyData,
|
|
465
|
+
},
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
const result = await this.sdk._fetch('/video/survey', 'POST', params);
|
|
469
|
+
return result;
|
|
470
|
+
}
|
|
413
471
|
}
|