@unboundcx/sdk 4.13.157 → 4.13.159

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.157",
3
+ "version": "4.13.159",
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",
@@ -204,6 +204,7 @@ export class PlaybooksService {
204
204
  * @param {boolean} [options.requiredForPass=false] - Whether required for pass
205
205
  * @param {string} [options.visibility] - 'live' or 'reviewOnly'
206
206
  * @param {string} [options.recordTypeId] - Record type ID
207
+ * @param {string} [options.criteriaMode] - How multiple criteria combine: 'all' or 'any'
207
208
  * @returns {Promise<Object>} Created goal with id
208
209
  *
209
210
  * @example
@@ -212,7 +213,8 @@ export class PlaybooksService {
212
213
  * goal: 'Identify customer pain points',
213
214
  * description: 'Agent should discover at least 2 pain points',
214
215
  * scoreType: 'scale',
215
- * weight: 25
216
+ * weight: 25,
217
+ * criteriaMode: 'any'
216
218
  * });
217
219
  */
218
220
  async createPlaybookGoal({
@@ -231,6 +233,7 @@ export class PlaybooksService {
231
233
  windowTurns,
232
234
  visibility,
233
235
  recordTypeId,
236
+ criteriaMode,
234
237
  }) {
235
238
  this.sdk.validateParams(
236
239
  {
@@ -246,6 +249,7 @@ export class PlaybooksService {
246
249
  role,
247
250
  signal,
248
251
  recordTypeId,
252
+ criteriaMode,
249
253
  },
250
254
  {
251
255
  playbookId: { type: "string", required: true },
@@ -263,6 +267,7 @@ export class PlaybooksService {
263
267
  windowTurns: { type: "number", required: false },
264
268
  visibility: { type: "string", required: false },
265
269
  recordTypeId: { type: "string", required: false },
270
+ criteriaMode: { type: "string", required: false },
266
271
  },
267
272
  );
268
273
 
@@ -282,6 +287,7 @@ export class PlaybooksService {
282
287
  windowTurns,
283
288
  visibility,
284
289
  recordTypeId,
290
+ ...(criteriaMode !== undefined ? { criteriaMode } : {}),
285
291
  },
286
292
  };
287
293
 
@@ -366,13 +372,15 @@ export class PlaybooksService {
366
372
  * @param {boolean} [options.requiredForPass] - Whether required for pass
367
373
  * @param {string} [options.visibility] - 'live' or 'reviewOnly'
368
374
  * @param {string} [options.recordTypeId] - Record type ID
375
+ * @param {string} [options.criteriaMode] - How multiple criteria combine: 'all' or 'any'
369
376
  * @returns {Promise<Object>} Updated goal object
370
377
  *
371
378
  * @example
372
379
  * const updated = await sdk.ai.playbooks.updatePlaybookGoal({
373
380
  * goalId: 'goal_789',
374
381
  * weight: 30,
375
- * description: 'Updated description'
382
+ * description: 'Updated description',
383
+ * criteriaMode: 'all'
376
384
  * });
377
385
  */
378
386
  async updatePlaybookGoal({
@@ -390,6 +398,7 @@ export class PlaybooksService {
390
398
  windowTurns,
391
399
  visibility,
392
400
  recordTypeId,
401
+ criteriaMode,
393
402
  }) {
394
403
  this.sdk.validateParams(
395
404
  {
@@ -404,6 +413,7 @@ export class PlaybooksService {
404
413
  role,
405
414
  signal,
406
415
  recordTypeId,
416
+ criteriaMode,
407
417
  },
408
418
  {
409
419
  goalId: { type: "string", required: true },
@@ -420,6 +430,7 @@ export class PlaybooksService {
420
430
  windowTurns: { type: "number", required: false },
421
431
  visibility: { type: "string", required: false },
422
432
  recordTypeId: { type: "string", required: false },
433
+ criteriaMode: { type: "string", required: false },
423
434
  },
424
435
  );
425
436
 
@@ -438,6 +449,7 @@ export class PlaybooksService {
438
449
  windowTurns,
439
450
  visibility,
440
451
  recordTypeId,
452
+ ...(criteriaMode !== undefined ? { criteriaMode } : {}),
441
453
  },
442
454
  };
443
455
 
package/services/video.js CHANGED
@@ -1135,6 +1135,32 @@ export class VideoService {
1135
1135
  return result;
1136
1136
  }
1137
1137
 
1138
+ /**
1139
+ * Host-only: (re)generate the post-meeting AI summary from the saved
1140
+ * transcript. Use when a meeting has a transcript but no summary (the
1141
+ * post-close job failed), or to refresh a stale one. Creates a new
1142
+ * summary; prior host edits are superseded.
1143
+ * @param {string} roomId - The video room ID
1144
+ * @returns {Promise<{summary: Object|null, reason?: 'too_short'|'no_transcript', wordCount?: number}>}
1145
+ * Same shape as getSummary(); `summary` is null with a `reason` when
1146
+ * there was nothing to summarize.
1147
+ */
1148
+ async regenerateSummary(roomId) {
1149
+ this.sdk.validateParams(
1150
+ { roomId },
1151
+ {
1152
+ roomId: { type: 'string', required: true },
1153
+ },
1154
+ );
1155
+
1156
+ const result = await internalRequest(
1157
+ this.sdk,
1158
+ `/video/${roomId}/summary/regenerate`,
1159
+ 'POST',
1160
+ );
1161
+ return result;
1162
+ }
1163
+
1138
1164
  /**
1139
1165
  * Host-only edit of a video room's post-meeting AI summary
1140
1166
  * @param {string} roomId - The video room ID