@bettercms-ai/sdk 1.26.0 → 1.26.1
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/dist/index.cjs +9 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1397,7 +1397,8 @@ function createClient(options) {
|
|
|
1397
1397
|
depth: opts?.depth,
|
|
1398
1398
|
select: opts?.select?.join(","),
|
|
1399
1399
|
perspective: draft ? "draft" : void 0,
|
|
1400
|
-
stega: draft && stega ? "1" : void 0
|
|
1400
|
+
stega: draft && stega ? "1" : void 0,
|
|
1401
|
+
projectId: defaultProjectId
|
|
1401
1402
|
})}`;
|
|
1402
1403
|
return unwrap(await fetchJSON(url));
|
|
1403
1404
|
},
|
|
@@ -1409,7 +1410,8 @@ function createClient(options) {
|
|
|
1409
1410
|
depth: opts?.depth,
|
|
1410
1411
|
select: opts?.select?.join(","),
|
|
1411
1412
|
perspective: draft ? "draft" : void 0,
|
|
1412
|
-
stega: draft && stega ? "1" : void 0
|
|
1413
|
+
stega: draft && stega ? "1" : void 0,
|
|
1414
|
+
projectId: defaultProjectId
|
|
1413
1415
|
})}`;
|
|
1414
1416
|
return unwrap(await fetchJSON(url));
|
|
1415
1417
|
},
|
|
@@ -1443,19 +1445,21 @@ function createClient(options) {
|
|
|
1443
1445
|
async listPages(opts) {
|
|
1444
1446
|
const url = `${base}/pages${qs({
|
|
1445
1447
|
page: opts?.page,
|
|
1446
|
-
perPage: opts?.perPage
|
|
1448
|
+
perPage: opts?.perPage,
|
|
1449
|
+
projectId: defaultProjectId
|
|
1447
1450
|
})}`;
|
|
1448
1451
|
return unwrap(await fetchJSON(url));
|
|
1449
1452
|
},
|
|
1450
1453
|
async listComponents() {
|
|
1451
1454
|
const url = `${base}/components${qs({
|
|
1452
1455
|
perspective: draft ? "draft" : void 0,
|
|
1453
|
-
token: draft ? previewToken : void 0
|
|
1456
|
+
token: draft ? previewToken : void 0,
|
|
1457
|
+
projectId: defaultProjectId
|
|
1454
1458
|
})}`;
|
|
1455
1459
|
return unwrap(await fetchJSON(url));
|
|
1456
1460
|
},
|
|
1457
1461
|
async getLayout() {
|
|
1458
|
-
const url = `${base}/layout${draft ? "
|
|
1462
|
+
const url = `${base}/layout${qs({ perspective: draft ? "draft" : void 0, projectId: defaultProjectId })}`;
|
|
1459
1463
|
try {
|
|
1460
1464
|
return unwrap(await fetchJSON(url));
|
|
1461
1465
|
} catch (error) {
|