@unboundcx/sdk 4.13.123 → 4.13.124
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/layouts.js +13 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unboundcx/sdk",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.124",
|
|
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/layouts.js
CHANGED
|
@@ -177,15 +177,24 @@ export class LayoutsService {
|
|
|
177
177
|
return result;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
async
|
|
180
|
+
async listSystem() {
|
|
181
|
+
const result = await internalRequest(this.sdk, '/layouts/system', 'GET', {});
|
|
182
|
+
return result;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// recordTypeId is only sent when provided -- cloning a GLOBAL system layout
|
|
186
|
+
// into a tenant row targets a specific record type.
|
|
187
|
+
async clone(id, { name, recordTypeId } = {}) {
|
|
181
188
|
this.sdk.validateParams(
|
|
182
189
|
{ id },
|
|
183
190
|
{ id: { type: 'string', required: true } },
|
|
184
191
|
);
|
|
185
192
|
|
|
186
|
-
const
|
|
187
|
-
|
|
188
|
-
|
|
193
|
+
const body = { name };
|
|
194
|
+
if (recordTypeId !== undefined && recordTypeId !== null) {
|
|
195
|
+
body.recordTypeId = recordTypeId;
|
|
196
|
+
}
|
|
197
|
+
const params = { body };
|
|
189
198
|
|
|
190
199
|
const result = await internalRequest(this.sdk, `/layouts/${id}/clone`, 'POST', params);
|
|
191
200
|
return result;
|