@bettercms-ai/sdk 1.13.0 → 1.13.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 +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -680,6 +680,7 @@ interface SeoMeta {
|
|
|
680
680
|
|
|
681
681
|
type ManagedLayoutDocument = {
|
|
682
682
|
scope: "global";
|
|
683
|
+
copy?: "draft" | "published";
|
|
683
684
|
revision: number;
|
|
684
685
|
etag: string;
|
|
685
686
|
status: string;
|
|
@@ -687,6 +688,7 @@ type ManagedLayoutDocument = {
|
|
|
687
688
|
data: LayoutDataDocument;
|
|
688
689
|
} | {
|
|
689
690
|
scope: "page";
|
|
691
|
+
copy?: "draft" | "published";
|
|
690
692
|
pageId: string;
|
|
691
693
|
pageSlug: string;
|
|
692
694
|
revision: number;
|
|
@@ -703,6 +705,9 @@ interface ManagedLayoutClient {
|
|
|
703
705
|
interface GetManagedLayoutOptions {
|
|
704
706
|
scope?: "global" | "page";
|
|
705
707
|
pageId?: string;
|
|
708
|
+
/** Which copy to read — default draft. A publish claim verifies ONLY against the
|
|
709
|
+
* published copy; check the response's `copy` echo (FLO-1188). */
|
|
710
|
+
copy?: "draft" | "published";
|
|
706
711
|
/** Required when the management credential is workspace-scoped. */
|
|
707
712
|
projectId?: string;
|
|
708
713
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -680,6 +680,7 @@ interface SeoMeta {
|
|
|
680
680
|
|
|
681
681
|
type ManagedLayoutDocument = {
|
|
682
682
|
scope: "global";
|
|
683
|
+
copy?: "draft" | "published";
|
|
683
684
|
revision: number;
|
|
684
685
|
etag: string;
|
|
685
686
|
status: string;
|
|
@@ -687,6 +688,7 @@ type ManagedLayoutDocument = {
|
|
|
687
688
|
data: LayoutDataDocument;
|
|
688
689
|
} | {
|
|
689
690
|
scope: "page";
|
|
691
|
+
copy?: "draft" | "published";
|
|
690
692
|
pageId: string;
|
|
691
693
|
pageSlug: string;
|
|
692
694
|
revision: number;
|
|
@@ -703,6 +705,9 @@ interface ManagedLayoutClient {
|
|
|
703
705
|
interface GetManagedLayoutOptions {
|
|
704
706
|
scope?: "global" | "page";
|
|
705
707
|
pageId?: string;
|
|
708
|
+
/** Which copy to read — default draft. A publish claim verifies ONLY against the
|
|
709
|
+
* published copy; check the response's `copy` echo (FLO-1188). */
|
|
710
|
+
copy?: "draft" | "published";
|
|
706
711
|
/** Required when the management credential is workspace-scoped. */
|
|
707
712
|
projectId?: string;
|
|
708
713
|
}
|
package/dist/index.js
CHANGED
|
@@ -717,6 +717,7 @@ async function getManagedLayout(client, opts) {
|
|
|
717
717
|
const query = new URLSearchParams();
|
|
718
718
|
if (opts?.scope) query.set("scope", opts.scope);
|
|
719
719
|
if (opts?.pageId) query.set("pageId", opts.pageId);
|
|
720
|
+
if (opts?.copy) query.set("preview", opts.copy);
|
|
720
721
|
const result = await client.fetchJSON(
|
|
721
722
|
client.url(`/management/layout${query.size ? `?${query}` : ""}`),
|
|
722
723
|
opts?.projectId ? { headers: { "X-BCMS-Project": opts.projectId } } : void 0
|