@unboundcx/sdk 4.13.100 → 4.13.101
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.101",
|
|
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",
|
|
@@ -46,6 +46,42 @@ export class CCService {
|
|
|
46
46
|
return result;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Queue-level human headcount by status -- same-queue-help-ping-plan.md
|
|
51
|
+
* WP1. The AI bot calls this to decide "hand to a human now" (someone
|
|
52
|
+
* available) vs "take a message" (nobody, or only wrap-up).
|
|
53
|
+
*
|
|
54
|
+
* @param {Object} options - Options
|
|
55
|
+
* @param {string} options.queueId - Queue ID
|
|
56
|
+
* @param {string} [options.taskId] - Task ID (forward-compat; unused today)
|
|
57
|
+
* @returns {Promise<Object>} result
|
|
58
|
+
* @returns {number} result.available - Workers currently `available`
|
|
59
|
+
* @returns {Object} result.byStatus - `{ available, wrapUp }` counts
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* const { available, byStatus } = await sdk.taskRouter.cc.getHumanAvailability({ queueId: 'queue_789' });
|
|
63
|
+
*/
|
|
64
|
+
async getHumanAvailability({ queueId, taskId } = {}) {
|
|
65
|
+
this.sdk.validateParams(
|
|
66
|
+
{ queueId, taskId },
|
|
67
|
+
{
|
|
68
|
+
queueId: { type: 'string', required: true },
|
|
69
|
+
taskId: { type: 'string', required: false },
|
|
70
|
+
},
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
const params = { query: {} };
|
|
74
|
+
if (taskId !== undefined) params.query.taskId = taskId;
|
|
75
|
+
|
|
76
|
+
const result = await internalRequest(
|
|
77
|
+
this.sdk,
|
|
78
|
+
`/taskRouter/queues/${queueId}/human-availability`,
|
|
79
|
+
'GET',
|
|
80
|
+
params,
|
|
81
|
+
);
|
|
82
|
+
return result;
|
|
83
|
+
}
|
|
84
|
+
|
|
49
85
|
/**
|
|
50
86
|
* Get a live Contact Center snapshot (KPIs, per-queue summaries, team roster
|
|
51
87
|
* with active tasks) scoped to a set of queues.
|