@unboundcx/sdk 4.13.31 → 4.13.34
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unboundcx/sdk",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.34",
|
|
4
4
|
"description": "Official JavaScript SDK for the Unbound API - A comprehensive toolkit for integrating with Unbound's communication, AI, and data management services",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -90,8 +90,8 @@ const KanbanSection = BaseSection.extend({
|
|
|
90
90
|
// timeline, not a table/kanban query. `sources` filters which item kinds
|
|
91
91
|
// the feed requests; default is every kind the API can produce.
|
|
92
92
|
export const TIMELINE_SOURCES = [
|
|
93
|
-
'web', 'ads', 'form', 'email', 'sms', 'call', 'ticket', 'note',
|
|
94
|
-
'program', 'file',
|
|
93
|
+
'web', 'ads', 'form', 'webchat', 'email', 'sms', 'call', 'ticket', 'note',
|
|
94
|
+
'score', 'program', 'file',
|
|
95
95
|
];
|
|
96
96
|
|
|
97
97
|
const TimelineSection = BaseSection.extend({
|
|
@@ -44,4 +44,27 @@ export class DealRegistrationsService {
|
|
|
44
44
|
body: { reason },
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Immediate staff-side conflict check against a prospect company, used by
|
|
50
|
+
* the create-mode form's Company lookup field to warn before submit —
|
|
51
|
+
* runs the same conflict engine the create handler stamps onto the
|
|
52
|
+
* record at save time, without creating anything. Session-less staff
|
|
53
|
+
* endpoint (checkApiAuth), not part of the portal registration flow.
|
|
54
|
+
* @param {string} companyId - company record id (the prospect, not the
|
|
55
|
+
* partner)
|
|
56
|
+
* @returns {Promise<Object>} { conflict: boolean, reasons: string[] }
|
|
57
|
+
*/
|
|
58
|
+
async conflictCheck(companyId) {
|
|
59
|
+
this.sdk.validateParams(
|
|
60
|
+
{ companyId },
|
|
61
|
+
{ companyId: { type: 'string', required: true } },
|
|
62
|
+
);
|
|
63
|
+
return internalRequest(
|
|
64
|
+
this.sdk,
|
|
65
|
+
'/deal-registrations/conflict-check',
|
|
66
|
+
'GET',
|
|
67
|
+
{ query: { companyId } },
|
|
68
|
+
);
|
|
69
|
+
}
|
|
47
70
|
}
|
|
@@ -96,9 +96,13 @@ export class MessageTemplatesCrudService {
|
|
|
96
96
|
*/
|
|
97
97
|
async list(options = {}) {
|
|
98
98
|
const { groupId } = options;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
99
|
+
// Omit unset groupId — URLSearchParams would send "undefined" and
|
|
100
|
+
// the API would 404 looking up that string as a group id.
|
|
101
|
+
const params = {};
|
|
102
|
+
if (groupId !== undefined && groupId !== null && groupId !== '') {
|
|
103
|
+
params.query = { groupId };
|
|
104
|
+
}
|
|
105
|
+
return internalRequest(this.sdk, '/messageTemplates/templates', 'GET', params);
|
|
102
106
|
}
|
|
103
107
|
|
|
104
108
|
/**
|
package/services/video.js
CHANGED
|
@@ -413,6 +413,31 @@ export class VideoService {
|
|
|
413
413
|
return result;
|
|
414
414
|
}
|
|
415
415
|
|
|
416
|
+
/**
|
|
417
|
+
* Send the brand-level Meet invite email to one or more addresses.
|
|
418
|
+
*
|
|
419
|
+
* @param {string} roomId
|
|
420
|
+
* @param {Object} input
|
|
421
|
+
* @param {string[]} input.to
|
|
422
|
+
* @param {string} [input.peopleId]
|
|
423
|
+
* @param {string} [input.engagementSessionId]
|
|
424
|
+
*/
|
|
425
|
+
async inviteByEmail(roomId, { to, peopleId, engagementSessionId } = {}) {
|
|
426
|
+
this.sdk.validateParams(
|
|
427
|
+
{ roomId, to },
|
|
428
|
+
{
|
|
429
|
+
roomId: { type: 'string', required: true },
|
|
430
|
+
to: { type: 'array', required: true },
|
|
431
|
+
},
|
|
432
|
+
);
|
|
433
|
+
const body = { to };
|
|
434
|
+
if (peopleId) body.peopleId = peopleId;
|
|
435
|
+
if (engagementSessionId) body.engagementSessionId = engagementSessionId;
|
|
436
|
+
return internalRequest(this.sdk, `/video/${roomId}/invite`, 'POST', {
|
|
437
|
+
body,
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
|
|
416
441
|
async placeCall(roomId, phoneNumber, callerIdNumber) {
|
|
417
442
|
this.sdk.validateParams(
|
|
418
443
|
{ roomId, phoneNumber, callerIdNumber },
|
package/services/webchat.js
CHANGED
|
@@ -133,8 +133,9 @@ export class WebchatConversationMessagesService {
|
|
|
133
133
|
* @param {string} widgetId
|
|
134
134
|
* @param {string} engagementSessionId
|
|
135
135
|
* @param {Object} options
|
|
136
|
-
* @param {string} options.message
|
|
136
|
+
* @param {string} [options.message]
|
|
137
137
|
* @param {Object} [options.media]
|
|
138
|
+
* @param {Object|Array} [options.card] - v1 chat card `{schemaVersion, blocks}` or a blocks array
|
|
138
139
|
* @returns {Promise<Object>}
|
|
139
140
|
*/
|
|
140
141
|
async send(widgetId, engagementSessionId, options) {
|
|
@@ -143,11 +144,15 @@ export class WebchatConversationMessagesService {
|
|
|
143
144
|
widgetId,
|
|
144
145
|
engagementSessionId,
|
|
145
146
|
message: options?.message,
|
|
147
|
+
media: options?.media,
|
|
148
|
+
card: options?.card,
|
|
146
149
|
},
|
|
147
150
|
{
|
|
148
151
|
widgetId: { type: 'string', required: true },
|
|
149
152
|
engagementSessionId: { type: 'string', required: true },
|
|
150
|
-
message: { type: 'string', required:
|
|
153
|
+
message: { type: 'string', required: false },
|
|
154
|
+
media: { type: 'object', required: false },
|
|
155
|
+
card: { type: 'object', required: false },
|
|
151
156
|
},
|
|
152
157
|
);
|
|
153
158
|
|