@unboundcx/sdk 4.13.169 → 4.13.171
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.171",
|
|
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",
|
|
@@ -97,4 +97,27 @@ export class JourneyDraftService {
|
|
|
97
97
|
'GET',
|
|
98
98
|
);
|
|
99
99
|
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Hide a non-current workflow version from the journey step list and
|
|
103
|
+
* from the step safety check. The current version is refused.
|
|
104
|
+
*
|
|
105
|
+
* @param {string} journeyId
|
|
106
|
+
* @param {string} versionId
|
|
107
|
+
* @returns {Promise<Object>} { id, name, archived }
|
|
108
|
+
*/
|
|
109
|
+
async archiveVersion(journeyId, versionId) {
|
|
110
|
+
this.sdk.validateParams(
|
|
111
|
+
{ journeyId, versionId },
|
|
112
|
+
{
|
|
113
|
+
journeyId: { type: 'string', required: true },
|
|
114
|
+
versionId: { type: 'string', required: true },
|
|
115
|
+
},
|
|
116
|
+
);
|
|
117
|
+
return await internalRequest(
|
|
118
|
+
this.sdk,
|
|
119
|
+
`/journeys/${journeyId}/versions/${versionId}/archive`,
|
|
120
|
+
'POST',
|
|
121
|
+
);
|
|
122
|
+
}
|
|
100
123
|
}
|
|
@@ -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
|
|