@unboundcx/sdk 4.13.112 → 4.13.113

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.112",
3
+ "version": "4.13.113",
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",
@@ -522,7 +522,14 @@ export class WorkflowSessionsService {
522
522
  return result;
523
523
  }
524
524
 
525
- async analytics(workflowVersionId, { startDate, endDate } = {}) {
525
+ // search: phone/email/name, same matching as sessions.list(). allVersions:
526
+ // widen the summary cards + abandoned-by-module to every version of this
527
+ // version's workflow (module/connector traffic on the canvas always
528
+ // stays scoped to workflowVersionId -- the canvas is per-version).
529
+ async analytics(
530
+ workflowVersionId,
531
+ { startDate, endDate, search, allVersions } = {},
532
+ ) {
526
533
  this.sdk.validateParams(
527
534
  { workflowVersionId, startDate, endDate },
528
535
  {
@@ -532,14 +539,14 @@ export class WorkflowSessionsService {
532
539
  },
533
540
  );
534
541
 
535
- const params = {
536
- query: { startDate, endDate },
537
- };
542
+ const query = { startDate, endDate };
543
+ if (search) query.search = search;
544
+ if (allVersions) query.allVersions = true;
538
545
 
539
546
  const result = await internalRequest(this.sdk,
540
547
  `/workflows/${workflowVersionId}/analytics`,
541
548
  'GET',
542
- params,
549
+ { query },
543
550
  );
544
551
  return result;
545
552
  }
@@ -588,6 +595,8 @@ export class WorkflowSessionsService {
588
595
  workflowItemId,
589
596
  fromItemId,
590
597
  toItemId,
598
+ startDate,
599
+ endDate,
591
600
  limit,
592
601
  before,
593
602
  } = {}) {
@@ -609,6 +618,8 @@ export class WorkflowSessionsService {
609
618
  if (workflowItemId) query.workflowItemId = workflowItemId;
610
619
  if (fromItemId) query.fromItemId = fromItemId;
611
620
  if (toItemId) query.toItemId = toItemId;
621
+ if (startDate) query.startDate = startDate;
622
+ if (endDate) query.endDate = endDate;
612
623
  if (limit) query.limit = limit;
613
624
  if (before) query.before = before;
614
625