@bettercms-ai/sdk 1.41.1 → 1.42.0

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.d.cts CHANGED
@@ -4,7 +4,7 @@ export { ApiError, ApiKey, ApiKeyPermission, ApiKeyTokenType, AssertEqual, AuthS
4
4
  import { D as DeliveryFormField } from './read-client-TTj8g07j.cjs';
5
5
  export { a as BCMSClientError, E as BCMSErrorCodes, a as BetterCMSError, B as BetterCMSReadClient, C as CreateClientOptions, b as DeliveryForm, c as DeliveryFormFieldType, E as ErrorCodes, F as FormSubmitError, d as FormValue, e as FormValues, G as GetEntryOptions, L as ListEntriesOptions, f as ListPagesOptions, S as SubmitFormOptions, g as SubmitFormResult, h as asStringArray, i as createClient, j as formInitialValues, k as isMultiValueField, s as shouldShowField, l as submitForm, t as toggleOption } from './read-client-TTj8g07j.cjs';
6
6
  export { C as CONTENT_APPLIED, a as ContentAppliedMessage, E as EDITOR_FRAME_NAME, c as contentApplied, i as inEditor, o as onContentApplied } from './in-editor-D1vXPgJh.cjs';
7
- export { P as PORTABLE_TEXT_FORMAT, R as ResolvedHolder, a as RichTextValue, S as SearchHit, b as SearchOptions, T as TextOrRich, e as embeds, i as isRichText, l as lines, p as plain, c as portableText, r as resolved, d as rich, s as search } from './read-DWArctXs.cjs';
7
+ export { P as PORTABLE_TEXT_FORMAT, a as PublishedContent, R as ResolvedHolder, b as RichTextValue, S as SearchHit, c as SearchOptions, T as TextOrRich, e as embeds, i as isRichText, l as lines, p as plain, d as portableText, f as publishedContentFile, g as publishedEntry, r as readPublishedContent, h as resetPublishedContentCache, j as resolved, k as rich, s as search } from './read-HyRuGRBt.cjs';
8
8
  export { ResolvedSeo, SeoInput, SeoLocation, entrySeoInput, resolveSeo } from './seo.cjs';
9
9
  export { ImageFit, ImageFormat, ImageSource, ImageUrlBuilder, ImageUrlOptions, imageUrl, default as imageUrlBuilder, imageValueObjectPosition, imageValueUrl } from '@bettercms-ai/image-url';
10
10
 
@@ -357,7 +357,11 @@ declare function getManagedPage(client: ManagementClient, id: string): Promise<M
357
357
  * page-backed content entry (idempotent); for a dynamic page it upserts the entry
358
358
  * keyed by the page. Returns the resulting entry.
359
359
  */
360
- declare function setPageContent(client: ManagementClient, id: string, input: SetPageContentInput): Promise<ManagedContentEntry>;
360
+ declare function setPageContent(client: ManagementClient, id: string, input: SetPageContentInput,
361
+ /** `ifMatch`: the page version read (get_page) — required with `replace` over a field a section edits. */
362
+ opts?: {
363
+ ifMatch?: number;
364
+ }): Promise<ManagedContentEntry>;
361
365
  /** Append fields to a content model's schema (additive — rejects existing keys). */
362
366
  declare function addModelFields(client: ManagementClient, id: string, input: AddPageFieldsInput): Promise<ManagedContentModel>;
363
367
  /** List content entries (incl. drafts), optionally filtered by model/page/status. */
@@ -776,7 +780,9 @@ declare class BetterCMSManagementClient extends BetterCMSDeliveryClient {
776
780
  /** Append fields to an existing page (additive — the API rejects existing keys). */
777
781
  addPageFields(id: string, input: AddPageFieldsInput): Promise<ManagedPage>;
778
782
  /** Set a page's field VALUES — singleton pages get/update their one entry. */
779
- setPageContent(id: string, input: SetPageContentInput): Promise<ManagedContentEntry>;
783
+ setPageContent(id: string, input: SetPageContentInput, opts?: {
784
+ ifMatch?: number;
785
+ }): Promise<ManagedContentEntry>;
780
786
  /** Append fields to a content model (additive — rejects existing keys). */
781
787
  addModelFields(id: string, input: AddPageFieldsInput): Promise<ManagedContentModel>;
782
788
  createEntry(input: CreateEntryInput): Promise<ManagedContentEntry & EntryWriteWarnings>;
@@ -983,69 +989,6 @@ declare function resolveStega(node: StegaNode): {
983
989
  element: StegaNode;
984
990
  } | null;
985
991
 
986
- /**
987
- * The published content snapshot, read where the site RUNS — not bundled into it.
988
- *
989
- * Every BetterCMS build gets the published content as `bcms-content.json` in the project root,
990
- * and a server app hosted on BetterCMS runs with `BCMS_CONTENT_FILE` pointing at a copy the
991
- * platform rewrites on every publish. Read through this, a server-rendered page shows a publish
992
- * within seconds and the publish never rebuilds the site. Import the JSON instead (a JSON import,
993
- * `import.meta.glob`) and the bundle holds a frozen copy no publish can reach: the platform then
994
- * has to rebuild the whole site for every edit.
995
- *
996
- * - On a hosted server: `BCMS_CONTENT_FILE`, re-read when it changes (its time is asked on every call).
997
- * - At build time and in local dev: `<cwd>/bcms-content.json`, the snapshot the build was given.
998
- * - Anywhere without a filesystem (a browser, an edge runtime): `null`.
999
- *
1000
- * A file that cannot be read keeps the last good copy; never throws into a render.
1001
- * No `node:fs` import at module scope, so the SDK stays safe to bundle for the browser.
1002
- */
1003
- /** The snapshot's shape (`bcms-content/v1`, written by the platform's content fetch). */
1004
- interface PublishedContent {
1005
- generatedAt?: string;
1006
- apiUrl?: string | null;
1007
- workspace?: string;
1008
- projectId?: string | null;
1009
- /**
1010
- * Published entries by model slug, each row AS THE DELIVERY API SERVES IT: `id`, `slug`, `status`,
1011
- * `publishedAt`, `updatedAt`, `locale`, `translationOf`, `_meta`, and the field values under
1012
- * `data`. Read a value through {@link publishedEntry}, which answers either spelling.
1013
- */
1014
- collections?: Record<string, Array<Record<string, unknown> & {
1015
- slug?: string;
1016
- data?: Record<string, unknown>;
1017
- }>>;
1018
- pages?: unknown[];
1019
- components?: unknown[];
1020
- forms?: unknown[];
1021
- layout?: unknown;
1022
- [key: string]: unknown;
1023
- }
1024
- /** Where the published content is read from here, or null where there is no filesystem. */
1025
- declare function publishedContentFile(): string | null;
1026
- /**
1027
- * The published content snapshot, or null when there is none here (no file, no filesystem).
1028
- * Call it per render — it is cached and cheap — never once at module scope, which would freeze it.
1029
- */
1030
- declare function readPublishedContent<T extends PublishedContent = PublishedContent>(): T | null;
1031
- /**
1032
- * One published entry by its slug, searched across every collection (first match wins, in the
1033
- * snapshot's model order). Not keyed by model slug: a page's backing model is named by the CMS.
1034
- *
1035
- * 🔴 THE VALUES ARE ON THE ENTRY: `publishedEntry("home")?.title`. The snapshot holds each row as
1036
- * the delivery API serves it, values under `data`, and this used to hand that row back as it was
1037
- * while its own doc (and the skill that names it) said "the row carries its field values" — so
1038
- * `entry.title` was `undefined` and every field of a server-rendered page fell back to the copy in
1039
- * the code, on every publish. Both spellings are answered: the values at the top level and the
1040
- * row's own keys (`id`, `slug`, `status`, `data`, `_meta`, …) beside them, the row's winning where
1041
- * a field is named like one — that field is read through `.data`, as before.
1042
- */
1043
- declare function publishedEntry<T extends Record<string, unknown> = Record<string, unknown>>(slug: string): (T & {
1044
- slug: string;
1045
- }) | null;
1046
- /** Test seam: forget the cached snapshot. */
1047
- declare function resetPublishedContentCache(): void;
1048
-
1049
992
  /**
1050
993
  * Admin pages methods.
1051
994
  * @see openspec/changes/flo-6-backend-sdk-admin/specs/sdk-admin-client/spec.md
@@ -1321,4 +1264,4 @@ interface WebhookListResponse {
1321
1264
  };
1322
1265
  }
1323
1266
 
1324
- export { type AddPageFieldsInput, type ApiKeyUsage, type ApiKeyWithRaw, type AuthResult, BetterCMS, BetterCMSAdminClient, type BetterCMSAdminOptions, BetterCMSDeliveryClient, BetterCMSManagementClient, type BetterCMSManagementOptions, type BetterCMSSiteOptions, type CommandManagedLayoutInput, type CreateApiKeyInput, type CreateEntryInput, type CreateFormInput, type CreateManagedPageInput, type CreateModelInput, type CreatePageInput, type CreateWebhookInput, type CreateWorkspaceInput, DeliveryFormField, type ExtractionCandidate, type FormFieldInput, type FormListOptions, type GetManagedLayoutOptions, type ListContentAllOptions, type ListContentOptions, type ListEntriesFilter, type ManagedComponent, type ManagedComponentInput, type ManagedComponentSummary, type ManagedContentEntry, type ManagedContentModel, type ManagedForm, type ManagedFormInput, type ManagedLayoutClient, type ManagedLayoutDocument, type ManagedMediaAsset, type ManagedPage, type ManagementClient, type MediaListOptions, type MediaMetadata, type Member, type MemberRole, type ModelFieldset, type PageCreateReport, type PageListOptions, type PendingInvite, type PublishManagedLayoutInput, type PublishedContent, STEGA_OPEN, type SeoMeta, type SeoMetaInput, type SetPageContentInput, type StegaNode, type StegaPayload, type SubmissionListOptions, type UpdateApiKeyInput, type UpdateAssetInput, type UpdateEntryInput, type UpdateFormInput, type UpdateModelInput, type UpdatePageInput, type UpdateWebhookInput, type UpdateWorkspaceInput, type UploadAssetInput, type UploadedAsset, type Webhook, type WebhookAdvancedConfig, type WebhookEvent, type WebhookListResponse, type WebhookWithSecret, type WriteContentInput, addModelFields, addPageFields, commandManagedLayout, createApiKey, createEntry, createForm, createManagedPage, createModel, createPage, createWorkspace, decodeStega, deleteForm, deleteMedia, deletePage, deleteSubmission, deleteWorkspace, encodeStega, getApiKeyUsage, getEntry, getForm, getManagedLayout, getManagedPage, getMedia, getMember, getModel, getPage, getSubmission, getWorkspace, inviteMember, listApiKeys, listEntries, listForms, listManagedPages, listMedia, listMembers, listModels, listPages, listSubmissions, listWorkspaces, publishManagedLayout, publishPage, publishedContentFile, publishedEntry, readPublishedContent, regenerateApiKey, removeMember, resetPublishedContentCache, resolveStega, revokeApiKey, setPageContent, signIn, signInWithGithub, signInWithGoogle, signUp, stegaClean, stripStega, updateApiKey, updateEntry, updateForm, updateMemberRole, updateModel, updatePage, updatePageModel, updateWorkspace, uploadMedia };
1267
+ export { type AddPageFieldsInput, type ApiKeyUsage, type ApiKeyWithRaw, type AuthResult, BetterCMS, BetterCMSAdminClient, type BetterCMSAdminOptions, BetterCMSDeliveryClient, BetterCMSManagementClient, type BetterCMSManagementOptions, type BetterCMSSiteOptions, type CommandManagedLayoutInput, type CreateApiKeyInput, type CreateEntryInput, type CreateFormInput, type CreateManagedPageInput, type CreateModelInput, type CreatePageInput, type CreateWebhookInput, type CreateWorkspaceInput, DeliveryFormField, type ExtractionCandidate, type FormFieldInput, type FormListOptions, type GetManagedLayoutOptions, type ListContentAllOptions, type ListContentOptions, type ListEntriesFilter, type ManagedComponent, type ManagedComponentInput, type ManagedComponentSummary, type ManagedContentEntry, type ManagedContentModel, type ManagedForm, type ManagedFormInput, type ManagedLayoutClient, type ManagedLayoutDocument, type ManagedMediaAsset, type ManagedPage, type ManagementClient, type MediaListOptions, type MediaMetadata, type Member, type MemberRole, type ModelFieldset, type PageCreateReport, type PageListOptions, type PendingInvite, type PublishManagedLayoutInput, STEGA_OPEN, type SeoMeta, type SeoMetaInput, type SetPageContentInput, type StegaNode, type StegaPayload, type SubmissionListOptions, type UpdateApiKeyInput, type UpdateAssetInput, type UpdateEntryInput, type UpdateFormInput, type UpdateModelInput, type UpdatePageInput, type UpdateWebhookInput, type UpdateWorkspaceInput, type UploadAssetInput, type UploadedAsset, type Webhook, type WebhookAdvancedConfig, type WebhookEvent, type WebhookListResponse, type WebhookWithSecret, type WriteContentInput, addModelFields, addPageFields, commandManagedLayout, createApiKey, createEntry, createForm, createManagedPage, createModel, createPage, createWorkspace, decodeStega, deleteForm, deleteMedia, deletePage, deleteSubmission, deleteWorkspace, encodeStega, getApiKeyUsage, getEntry, getForm, getManagedLayout, getManagedPage, getMedia, getMember, getModel, getPage, getSubmission, getWorkspace, inviteMember, listApiKeys, listEntries, listForms, listManagedPages, listMedia, listMembers, listModels, listPages, listSubmissions, listWorkspaces, publishManagedLayout, publishPage, regenerateApiKey, removeMember, resolveStega, revokeApiKey, setPageContent, signIn, signInWithGithub, signInWithGoogle, signUp, stegaClean, stripStega, updateApiKey, updateEntry, updateForm, updateMemberRole, updateModel, updatePage, updatePageModel, updateWorkspace, uploadMedia };
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ export { ApiError, ApiKey, ApiKeyPermission, ApiKeyTokenType, AssertEqual, AuthS
4
4
  import { D as DeliveryFormField } from './read-client-TTj8g07j.js';
5
5
  export { a as BCMSClientError, E as BCMSErrorCodes, a as BetterCMSError, B as BetterCMSReadClient, C as CreateClientOptions, b as DeliveryForm, c as DeliveryFormFieldType, E as ErrorCodes, F as FormSubmitError, d as FormValue, e as FormValues, G as GetEntryOptions, L as ListEntriesOptions, f as ListPagesOptions, S as SubmitFormOptions, g as SubmitFormResult, h as asStringArray, i as createClient, j as formInitialValues, k as isMultiValueField, s as shouldShowField, l as submitForm, t as toggleOption } from './read-client-TTj8g07j.js';
6
6
  export { C as CONTENT_APPLIED, a as ContentAppliedMessage, E as EDITOR_FRAME_NAME, c as contentApplied, i as inEditor, o as onContentApplied } from './in-editor-D1vXPgJh.js';
7
- export { P as PORTABLE_TEXT_FORMAT, R as ResolvedHolder, a as RichTextValue, S as SearchHit, b as SearchOptions, T as TextOrRich, e as embeds, i as isRichText, l as lines, p as plain, c as portableText, r as resolved, d as rich, s as search } from './read-CZB0cP-f.js';
7
+ export { P as PORTABLE_TEXT_FORMAT, a as PublishedContent, R as ResolvedHolder, b as RichTextValue, S as SearchHit, c as SearchOptions, T as TextOrRich, e as embeds, i as isRichText, l as lines, p as plain, d as portableText, f as publishedContentFile, g as publishedEntry, r as readPublishedContent, h as resetPublishedContentCache, j as resolved, k as rich, s as search } from './read-CGBWVZQA.js';
8
8
  export { ResolvedSeo, SeoInput, SeoLocation, entrySeoInput, resolveSeo } from './seo.js';
9
9
  export { ImageFit, ImageFormat, ImageSource, ImageUrlBuilder, ImageUrlOptions, imageUrl, default as imageUrlBuilder, imageValueObjectPosition, imageValueUrl } from '@bettercms-ai/image-url';
10
10
 
@@ -357,7 +357,11 @@ declare function getManagedPage(client: ManagementClient, id: string): Promise<M
357
357
  * page-backed content entry (idempotent); for a dynamic page it upserts the entry
358
358
  * keyed by the page. Returns the resulting entry.
359
359
  */
360
- declare function setPageContent(client: ManagementClient, id: string, input: SetPageContentInput): Promise<ManagedContentEntry>;
360
+ declare function setPageContent(client: ManagementClient, id: string, input: SetPageContentInput,
361
+ /** `ifMatch`: the page version read (get_page) — required with `replace` over a field a section edits. */
362
+ opts?: {
363
+ ifMatch?: number;
364
+ }): Promise<ManagedContentEntry>;
361
365
  /** Append fields to a content model's schema (additive — rejects existing keys). */
362
366
  declare function addModelFields(client: ManagementClient, id: string, input: AddPageFieldsInput): Promise<ManagedContentModel>;
363
367
  /** List content entries (incl. drafts), optionally filtered by model/page/status. */
@@ -776,7 +780,9 @@ declare class BetterCMSManagementClient extends BetterCMSDeliveryClient {
776
780
  /** Append fields to an existing page (additive — the API rejects existing keys). */
777
781
  addPageFields(id: string, input: AddPageFieldsInput): Promise<ManagedPage>;
778
782
  /** Set a page's field VALUES — singleton pages get/update their one entry. */
779
- setPageContent(id: string, input: SetPageContentInput): Promise<ManagedContentEntry>;
783
+ setPageContent(id: string, input: SetPageContentInput, opts?: {
784
+ ifMatch?: number;
785
+ }): Promise<ManagedContentEntry>;
780
786
  /** Append fields to a content model (additive — rejects existing keys). */
781
787
  addModelFields(id: string, input: AddPageFieldsInput): Promise<ManagedContentModel>;
782
788
  createEntry(input: CreateEntryInput): Promise<ManagedContentEntry & EntryWriteWarnings>;
@@ -983,69 +989,6 @@ declare function resolveStega(node: StegaNode): {
983
989
  element: StegaNode;
984
990
  } | null;
985
991
 
986
- /**
987
- * The published content snapshot, read where the site RUNS — not bundled into it.
988
- *
989
- * Every BetterCMS build gets the published content as `bcms-content.json` in the project root,
990
- * and a server app hosted on BetterCMS runs with `BCMS_CONTENT_FILE` pointing at a copy the
991
- * platform rewrites on every publish. Read through this, a server-rendered page shows a publish
992
- * within seconds and the publish never rebuilds the site. Import the JSON instead (a JSON import,
993
- * `import.meta.glob`) and the bundle holds a frozen copy no publish can reach: the platform then
994
- * has to rebuild the whole site for every edit.
995
- *
996
- * - On a hosted server: `BCMS_CONTENT_FILE`, re-read when it changes (its time is asked on every call).
997
- * - At build time and in local dev: `<cwd>/bcms-content.json`, the snapshot the build was given.
998
- * - Anywhere without a filesystem (a browser, an edge runtime): `null`.
999
- *
1000
- * A file that cannot be read keeps the last good copy; never throws into a render.
1001
- * No `node:fs` import at module scope, so the SDK stays safe to bundle for the browser.
1002
- */
1003
- /** The snapshot's shape (`bcms-content/v1`, written by the platform's content fetch). */
1004
- interface PublishedContent {
1005
- generatedAt?: string;
1006
- apiUrl?: string | null;
1007
- workspace?: string;
1008
- projectId?: string | null;
1009
- /**
1010
- * Published entries by model slug, each row AS THE DELIVERY API SERVES IT: `id`, `slug`, `status`,
1011
- * `publishedAt`, `updatedAt`, `locale`, `translationOf`, `_meta`, and the field values under
1012
- * `data`. Read a value through {@link publishedEntry}, which answers either spelling.
1013
- */
1014
- collections?: Record<string, Array<Record<string, unknown> & {
1015
- slug?: string;
1016
- data?: Record<string, unknown>;
1017
- }>>;
1018
- pages?: unknown[];
1019
- components?: unknown[];
1020
- forms?: unknown[];
1021
- layout?: unknown;
1022
- [key: string]: unknown;
1023
- }
1024
- /** Where the published content is read from here, or null where there is no filesystem. */
1025
- declare function publishedContentFile(): string | null;
1026
- /**
1027
- * The published content snapshot, or null when there is none here (no file, no filesystem).
1028
- * Call it per render — it is cached and cheap — never once at module scope, which would freeze it.
1029
- */
1030
- declare function readPublishedContent<T extends PublishedContent = PublishedContent>(): T | null;
1031
- /**
1032
- * One published entry by its slug, searched across every collection (first match wins, in the
1033
- * snapshot's model order). Not keyed by model slug: a page's backing model is named by the CMS.
1034
- *
1035
- * 🔴 THE VALUES ARE ON THE ENTRY: `publishedEntry("home")?.title`. The snapshot holds each row as
1036
- * the delivery API serves it, values under `data`, and this used to hand that row back as it was
1037
- * while its own doc (and the skill that names it) said "the row carries its field values" — so
1038
- * `entry.title` was `undefined` and every field of a server-rendered page fell back to the copy in
1039
- * the code, on every publish. Both spellings are answered: the values at the top level and the
1040
- * row's own keys (`id`, `slug`, `status`, `data`, `_meta`, …) beside them, the row's winning where
1041
- * a field is named like one — that field is read through `.data`, as before.
1042
- */
1043
- declare function publishedEntry<T extends Record<string, unknown> = Record<string, unknown>>(slug: string): (T & {
1044
- slug: string;
1045
- }) | null;
1046
- /** Test seam: forget the cached snapshot. */
1047
- declare function resetPublishedContentCache(): void;
1048
-
1049
992
  /**
1050
993
  * Admin pages methods.
1051
994
  * @see openspec/changes/flo-6-backend-sdk-admin/specs/sdk-admin-client/spec.md
@@ -1321,4 +1264,4 @@ interface WebhookListResponse {
1321
1264
  };
1322
1265
  }
1323
1266
 
1324
- export { type AddPageFieldsInput, type ApiKeyUsage, type ApiKeyWithRaw, type AuthResult, BetterCMS, BetterCMSAdminClient, type BetterCMSAdminOptions, BetterCMSDeliveryClient, BetterCMSManagementClient, type BetterCMSManagementOptions, type BetterCMSSiteOptions, type CommandManagedLayoutInput, type CreateApiKeyInput, type CreateEntryInput, type CreateFormInput, type CreateManagedPageInput, type CreateModelInput, type CreatePageInput, type CreateWebhookInput, type CreateWorkspaceInput, DeliveryFormField, type ExtractionCandidate, type FormFieldInput, type FormListOptions, type GetManagedLayoutOptions, type ListContentAllOptions, type ListContentOptions, type ListEntriesFilter, type ManagedComponent, type ManagedComponentInput, type ManagedComponentSummary, type ManagedContentEntry, type ManagedContentModel, type ManagedForm, type ManagedFormInput, type ManagedLayoutClient, type ManagedLayoutDocument, type ManagedMediaAsset, type ManagedPage, type ManagementClient, type MediaListOptions, type MediaMetadata, type Member, type MemberRole, type ModelFieldset, type PageCreateReport, type PageListOptions, type PendingInvite, type PublishManagedLayoutInput, type PublishedContent, STEGA_OPEN, type SeoMeta, type SeoMetaInput, type SetPageContentInput, type StegaNode, type StegaPayload, type SubmissionListOptions, type UpdateApiKeyInput, type UpdateAssetInput, type UpdateEntryInput, type UpdateFormInput, type UpdateModelInput, type UpdatePageInput, type UpdateWebhookInput, type UpdateWorkspaceInput, type UploadAssetInput, type UploadedAsset, type Webhook, type WebhookAdvancedConfig, type WebhookEvent, type WebhookListResponse, type WebhookWithSecret, type WriteContentInput, addModelFields, addPageFields, commandManagedLayout, createApiKey, createEntry, createForm, createManagedPage, createModel, createPage, createWorkspace, decodeStega, deleteForm, deleteMedia, deletePage, deleteSubmission, deleteWorkspace, encodeStega, getApiKeyUsage, getEntry, getForm, getManagedLayout, getManagedPage, getMedia, getMember, getModel, getPage, getSubmission, getWorkspace, inviteMember, listApiKeys, listEntries, listForms, listManagedPages, listMedia, listMembers, listModels, listPages, listSubmissions, listWorkspaces, publishManagedLayout, publishPage, publishedContentFile, publishedEntry, readPublishedContent, regenerateApiKey, removeMember, resetPublishedContentCache, resolveStega, revokeApiKey, setPageContent, signIn, signInWithGithub, signInWithGoogle, signUp, stegaClean, stripStega, updateApiKey, updateEntry, updateForm, updateMemberRole, updateModel, updatePage, updatePageModel, updateWorkspace, uploadMedia };
1267
+ export { type AddPageFieldsInput, type ApiKeyUsage, type ApiKeyWithRaw, type AuthResult, BetterCMS, BetterCMSAdminClient, type BetterCMSAdminOptions, BetterCMSDeliveryClient, BetterCMSManagementClient, type BetterCMSManagementOptions, type BetterCMSSiteOptions, type CommandManagedLayoutInput, type CreateApiKeyInput, type CreateEntryInput, type CreateFormInput, type CreateManagedPageInput, type CreateModelInput, type CreatePageInput, type CreateWebhookInput, type CreateWorkspaceInput, DeliveryFormField, type ExtractionCandidate, type FormFieldInput, type FormListOptions, type GetManagedLayoutOptions, type ListContentAllOptions, type ListContentOptions, type ListEntriesFilter, type ManagedComponent, type ManagedComponentInput, type ManagedComponentSummary, type ManagedContentEntry, type ManagedContentModel, type ManagedForm, type ManagedFormInput, type ManagedLayoutClient, type ManagedLayoutDocument, type ManagedMediaAsset, type ManagedPage, type ManagementClient, type MediaListOptions, type MediaMetadata, type Member, type MemberRole, type ModelFieldset, type PageCreateReport, type PageListOptions, type PendingInvite, type PublishManagedLayoutInput, STEGA_OPEN, type SeoMeta, type SeoMetaInput, type SetPageContentInput, type StegaNode, type StegaPayload, type SubmissionListOptions, type UpdateApiKeyInput, type UpdateAssetInput, type UpdateEntryInput, type UpdateFormInput, type UpdateModelInput, type UpdatePageInput, type UpdateWebhookInput, type UpdateWorkspaceInput, type UploadAssetInput, type UploadedAsset, type Webhook, type WebhookAdvancedConfig, type WebhookEvent, type WebhookListResponse, type WebhookWithSecret, type WriteContentInput, addModelFields, addPageFields, commandManagedLayout, createApiKey, createEntry, createForm, createManagedPage, createModel, createPage, createWorkspace, decodeStega, deleteForm, deleteMedia, deletePage, deleteSubmission, deleteWorkspace, encodeStega, getApiKeyUsage, getEntry, getForm, getManagedLayout, getManagedPage, getMedia, getMember, getModel, getPage, getSubmission, getWorkspace, inviteMember, listApiKeys, listEntries, listForms, listManagedPages, listMedia, listMembers, listModels, listPages, listSubmissions, listWorkspaces, publishManagedLayout, publishPage, regenerateApiKey, removeMember, resolveStega, revokeApiKey, setPageContent, signIn, signInWithGithub, signInWithGoogle, signUp, stegaClean, stripStega, updateApiKey, updateEntry, updateForm, updateMemberRole, updateModel, updatePage, updatePageModel, updateWorkspace, uploadMedia };
package/dist/index.js CHANGED
@@ -484,10 +484,10 @@ async function getManagedPage(client, id) {
484
484
  );
485
485
  return res.data;
486
486
  }
487
- async function setPageContent(client, id, input) {
487
+ async function setPageContent(client, id, input, opts) {
488
488
  const res = await client.fetchJSON(
489
489
  client.url(`/management/pages/${id}/content`),
490
- { method: "PUT", body: JSON.stringify(input) }
490
+ { method: "PUT", body: JSON.stringify(input), headers: ifMatchHeaders(opts) }
491
491
  );
492
492
  return res.data;
493
493
  }
@@ -940,8 +940,8 @@ var BetterCMSManagementClient = class extends BetterCMSDeliveryClient {
940
940
  return addPageFields(this, id, input);
941
941
  }
942
942
  /** Set a page's field VALUES — singleton pages get/update their one entry. */
943
- setPageContent(id, input) {
944
- return setPageContent(this, id, input);
943
+ setPageContent(id, input, opts) {
944
+ return setPageContent(this, id, input, opts);
945
945
  }
946
946
  // ── Schema authoring (additive field append) ──────────────────────────────
947
947
  /** Append fields to a content model (additive — rejects existing keys). */