@unboundcx/sdk 4.13.59 → 4.13.60
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.60",
|
|
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",
|
|
@@ -1122,4 +1122,35 @@ export class TaskService {
|
|
|
1122
1122
|
{},
|
|
1123
1123
|
);
|
|
1124
1124
|
}
|
|
1125
|
+
|
|
1126
|
+
/**
|
|
1127
|
+
* Broadcast a typing indicator to the other participants (owner + joined
|
|
1128
|
+
* helpers) on a task's channel. Fire-and-forget signal, not persisted;
|
|
1129
|
+
* app1-socket forwards it to each participant as a `task_typing` event.
|
|
1130
|
+
*
|
|
1131
|
+
* @param {Object} options - Parameters
|
|
1132
|
+
* @param {string} options.taskId - The task ID (required)
|
|
1133
|
+
* @param {string} options.channel - 'sms' | 'email' | 'webchat' | 'team' (required)
|
|
1134
|
+
* @param {boolean} options.isTyping - Whether the caller is currently typing (required)
|
|
1135
|
+
* @returns {Promise<Object>} { ok: true }
|
|
1136
|
+
*/
|
|
1137
|
+
async typing(options = {}) {
|
|
1138
|
+
const { taskId, channel, isTyping } = options;
|
|
1139
|
+
|
|
1140
|
+
this.sdk.validateParams(
|
|
1141
|
+
{ taskId, channel, isTyping },
|
|
1142
|
+
{
|
|
1143
|
+
taskId: { type: 'string', required: true },
|
|
1144
|
+
channel: { type: 'string', required: true },
|
|
1145
|
+
isTyping: { type: 'boolean', required: true },
|
|
1146
|
+
},
|
|
1147
|
+
);
|
|
1148
|
+
|
|
1149
|
+
return await internalRequest(
|
|
1150
|
+
this.sdk,
|
|
1151
|
+
`/taskRouter/tasks/${taskId}/typing`,
|
|
1152
|
+
'POST',
|
|
1153
|
+
{ body: { channel, isTyping } },
|
|
1154
|
+
);
|
|
1155
|
+
}
|
|
1125
1156
|
}
|