twilio-taskrouter 2.0.14 → 2.1.0
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/CHANGELOG.md +25 -1
- package/dist/docs/Activity.html +1 -1
- package/dist/docs/Channel.html +1 -1
- package/dist/docs/IncomingTransfer.html +1 -1
- package/dist/docs/OutgoingTransfer.html +1 -1
- package/dist/docs/Reservation.html +1 -1
- package/dist/docs/Supervisor.html +1 -1
- package/dist/docs/Task.html +1 -1
- package/dist/docs/TaskQueue.html +1 -1
- package/dist/docs/Transfers.html +1 -1
- package/dist/docs/Worker.html +1 -1
- package/dist/docs/Workspace.html +339 -1
- package/dist/docs/classes.list.html +1 -1
- package/dist/docs/global.html +738 -98
- package/dist/docs/index.html +1 -1
- package/dist/docs/quicksearch.html +1 -1
- package/dist/index.commonjs2.js +1 -1
- package/dist/index.commonjs2.js.LICENSE.txt +1 -1
- package/dist/index.window.js +2 -2
- package/dist/index.window.js.LICENSE.txt +1 -1
- package/dist/types.d.ts +26 -0
- package/package.json +8 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! twilio-taskrouter.js 2.0
|
|
1
|
+
/*! twilio-taskrouter.js 2.1.0 */
|
package/dist/types.d.ts
CHANGED
|
@@ -2,6 +2,26 @@ import { EventEmitter } from 'events';
|
|
|
2
2
|
import TypedEmitter from 'typed-emitter';
|
|
3
3
|
|
|
4
4
|
export as namespace TaskRouter;
|
|
5
|
+
|
|
6
|
+
type WorkerInfo = {
|
|
7
|
+
accountSid: string;
|
|
8
|
+
activityName: string;
|
|
9
|
+
activitySid: string;
|
|
10
|
+
attributes: Record<string, any>;
|
|
11
|
+
available: boolean;
|
|
12
|
+
dateCreated: Date | null;
|
|
13
|
+
dateStatusChanged: Date | null;
|
|
14
|
+
dateUpdated: Date;
|
|
15
|
+
name: string;
|
|
16
|
+
sid: string;
|
|
17
|
+
workspaceSid: string;
|
|
18
|
+
version: string;
|
|
19
|
+
workerSid: string;
|
|
20
|
+
workerActivitySid: string;
|
|
21
|
+
dateActivityChanged: Date | null;
|
|
22
|
+
friendlyName: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
5
25
|
export class Worker extends (EventEmitter as new () => TypedEmitter<WorkerEvents>) {
|
|
6
26
|
constructor(token: string, options?: WorkerOptions);
|
|
7
27
|
|
|
@@ -202,13 +222,19 @@ type FetchWorkersParams = {
|
|
|
202
222
|
MaxWorkers?: number;
|
|
203
223
|
};
|
|
204
224
|
|
|
225
|
+
type FetchWorkersInfoParams = FetchWorkersParams;
|
|
226
|
+
|
|
205
227
|
export class Workspace {
|
|
206
228
|
constructor(jwt: string, options?: Object, workspaceSid?: string);
|
|
207
229
|
readonly workspaceSid: string;
|
|
208
230
|
|
|
209
231
|
updateToken(newToken: string): void;
|
|
232
|
+
/** @deprecated use fetchWorkerInfo */
|
|
210
233
|
fetchWorker(workerSid: string): Promise<Worker>;
|
|
234
|
+
/** @deprecated use fetchWorkersInfo */
|
|
211
235
|
fetchWorkers(params?: FetchWorkersParams): Promise<Map<string, Worker>>;
|
|
236
|
+
fetchWorkerInfo(workerSid: string): Promise<WorkerInfo>;
|
|
237
|
+
fetchWorkersInfo(params?: FetchWorkersInfoParams): Promise<Map<string, WorkerInfo>>;
|
|
212
238
|
fetchTaskQueue(queueSid: string): Promise<TaskQueue>;
|
|
213
239
|
fetchTaskQueues(params?: FetchTaskQueuesParams): Promise<Map<string, TaskQueue>>;
|
|
214
240
|
fetchTask(taskSid: string): Promise<Task>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "twilio-taskrouter",
|
|
3
3
|
"title": "Twilio TaskRouter",
|
|
4
|
-
"version": "2.0
|
|
4
|
+
"version": "2.1.0",
|
|
5
5
|
"description": "Twilio TaskRouter JavaScript library",
|
|
6
6
|
"homepage": "https://www.twilio.com",
|
|
7
7
|
"author": "Wanjun Li <wli@twilio.com>",
|
|
@@ -56,9 +56,10 @@
|
|
|
56
56
|
"url": "https://github.com/twilio/twilio-taskrouter.js.git"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@babel/runtime": "
|
|
60
|
-
"axios": "^1.
|
|
59
|
+
"@babel/runtime": "7.26.10",
|
|
60
|
+
"axios": "^1.8.2",
|
|
61
61
|
"events": "3.3.0",
|
|
62
|
+
"graphql-ws": "^5.16.2",
|
|
62
63
|
"jwt-decode": "^3.1.2",
|
|
63
64
|
"lodash": "^4.17.21",
|
|
64
65
|
"loglevel": "^1.4.1",
|
|
@@ -67,6 +68,9 @@
|
|
|
67
68
|
"util": "^0.12.4",
|
|
68
69
|
"ws": "^8.17.1"
|
|
69
70
|
},
|
|
71
|
+
"peerDependencies": {
|
|
72
|
+
"graphql": ">=0.11 <=16"
|
|
73
|
+
},
|
|
70
74
|
"devDependencies": {
|
|
71
75
|
"@babel/core": "^7.16.0",
|
|
72
76
|
"@babel/plugin-transform-modules-commonjs": "^7.21.2",
|
|
@@ -86,6 +90,7 @@
|
|
|
86
90
|
"copy-webpack-plugin": "^6.4.1",
|
|
87
91
|
"dotenv": "16.0.1",
|
|
88
92
|
"eslint": "^7.32.0",
|
|
93
|
+
"graphql": "^14",
|
|
89
94
|
"ink-docstrap": "^1.3.2",
|
|
90
95
|
"isomorphic-fetch": "^3.0.0",
|
|
91
96
|
"jsdoc": "^3.6.7",
|