@unboundcx/sdk 4.13.103 → 4.13.105
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 +1 -1
- package/services/workflows.js +6 -38
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unboundcx/sdk",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.105",
|
|
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",
|
package/services/workflows.js
CHANGED
|
@@ -7,25 +7,9 @@ export class WorkflowsService {
|
|
|
7
7
|
this.sessions = new WorkflowSessionsService(sdk);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
async
|
|
11
|
-
this.sdk.validateParams(
|
|
12
|
-
{ type },
|
|
13
|
-
{
|
|
14
|
-
type: { type: 'string', required: true },
|
|
15
|
-
},
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
const params = {
|
|
19
|
-
query: { type },
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const result = await internalRequest(this.sdk, '/workflows/settings', 'GET', params);
|
|
23
|
-
return result;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
async listModules() {
|
|
10
|
+
async listModules({ workflowType } = {}) {
|
|
27
11
|
const params = {
|
|
28
|
-
query: {},
|
|
12
|
+
query: workflowType ? { workflowType } : {},
|
|
29
13
|
};
|
|
30
14
|
|
|
31
15
|
const result = await internalRequest(this.sdk, '/workflows/modules', 'GET', params);
|
|
@@ -403,11 +387,10 @@ export class WorkflowSessionsService {
|
|
|
403
387
|
},
|
|
404
388
|
);
|
|
405
389
|
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
);
|
|
410
|
-
return result;
|
|
390
|
+
return this.sdk.objects.byId({
|
|
391
|
+
object: 'workflowSessions',
|
|
392
|
+
id: sessionId,
|
|
393
|
+
});
|
|
411
394
|
}
|
|
412
395
|
|
|
413
396
|
async update(sessionId, updateData) {
|
|
@@ -449,21 +432,6 @@ export class WorkflowSessionsService {
|
|
|
449
432
|
return result;
|
|
450
433
|
}
|
|
451
434
|
|
|
452
|
-
async delete(sessionId) {
|
|
453
|
-
this.sdk.validateParams(
|
|
454
|
-
{ sessionId },
|
|
455
|
-
{
|
|
456
|
-
sessionId: { type: 'string', required: true },
|
|
457
|
-
},
|
|
458
|
-
);
|
|
459
|
-
|
|
460
|
-
const result = await internalRequest(this.sdk,
|
|
461
|
-
`/workflows/sessions/${sessionId}`,
|
|
462
|
-
'DELETE',
|
|
463
|
-
);
|
|
464
|
-
return result;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
435
|
async logTranscript(sessionId, transcriptData) {
|
|
468
436
|
this.sdk.validateParams(
|
|
469
437
|
{ sessionId },
|