@unboundcx/sdk 4.13.166 → 4.13.167

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.166",
3
+ "version": "4.13.167",
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",
@@ -42,9 +42,12 @@ export class JourneyWorklistService {
42
42
  * @param {'due'|'overdue'|'upcoming'} [opts.bucket]
43
43
  * @param {string} [opts.stepType]
44
44
  * @param {string} [opts.journeyId]
45
+ * @param {string} [opts.workerId] another rep's worker id. Allowed only
46
+ * for a manager of that task's sales queue. The response is then
47
+ * `{ readOnly: true }` and omits pool tasks.
45
48
  * @param {number} [opts.page]
46
49
  * @param {number} [opts.pageSize]
47
- * @returns {Promise<{data: JourneyWorklistTask[]}>}
50
+ * @returns {Promise<{data: JourneyWorklistTask[], readOnly: boolean, reps: {workerId: string, userId: string, name: string, isSelf: boolean}[]}>}
48
51
  */
49
52
  async list(opts = {}) {
50
53
  return await internalRequest(this.sdk, '/journeys/worklist', 'GET', {
@@ -71,4 +74,19 @@ export class JourneyWorklistService {
71
74
  { body: pickDefined(filter) },
72
75
  );
73
76
  }
77
+
78
+ /**
79
+ * Put a worklist touch back to pending when the rep closes it without
80
+ * sending or calling. Keeps the owner. Server refuses once an action
81
+ * was taken.
82
+ *
83
+ * @param {Object} body
84
+ * @param {string} body.taskId
85
+ * @returns {Promise<{data: JourneyWorklistTask}>}
86
+ */
87
+ async release({ taskId } = {}) {
88
+ return await internalRequest(this.sdk, '/journeys/worklist/release', 'POST', {
89
+ body: { taskId },
90
+ });
91
+ }
74
92
  }