@unboundcx/sdk 4.13.168 → 4.13.170

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.168",
3
+ "version": "4.13.170",
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",
@@ -353,12 +353,14 @@ export class JourneysService {
353
353
  * @param {string} id
354
354
  * @param {Object} [params]
355
355
  * @param {string} [params.name]
356
+ * @param {boolean} [params.copyRoster] Copy reps and managers when the destination queue differs
357
+ * @param {boolean} [params.copyMembers] Enrol current members fresh at the first step
356
358
  * @returns {Promise<Object>} New journey + workflow + draft version
357
359
  */
358
- async clone(id, { name } = {}) {
360
+ async clone(id, { name, copyRoster, copyMembers } = {}) {
359
361
  this.sdk.validateParams({ id }, { id: { type: 'string', required: true } });
360
362
  return await internalRequest(this.sdk, `/journeys/${id}/clone`, 'POST', {
361
- body: pickDefined({ name }),
363
+ body: pickDefined({ name, copyRoster, copyMembers }),
362
364
  });
363
365
  }
364
366
 
@@ -21,6 +21,25 @@ export class WorkflowsService {
21
21
  return result;
22
22
  }
23
23
 
24
+ // Places every module on a version. Main path goes down, branches sit
25
+ // beside the module they leave. Published versions are rejected.
26
+ async layoutVersion(workflowVersionId) {
27
+ this.sdk.validateParams(
28
+ { workflowVersionId },
29
+ {
30
+ workflowVersionId: { type: 'string', required: true },
31
+ },
32
+ );
33
+
34
+ const result = await internalRequest(
35
+ this.sdk,
36
+ `/workflows/${workflowVersionId}/layout`,
37
+ 'POST',
38
+ { body: {} },
39
+ );
40
+ return result;
41
+ }
42
+
24
43
  async listFormulaFunctions() {
25
44
  const result = await internalRequest(this.sdk,
26
45
  '/workflows/formula-functions',