@bettercms-ai/sdk 1.34.0 → 1.36.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/draft.cjs +32 -0
- package/dist/draft.cjs.map +1 -1
- package/dist/draft.d.cts +15 -1
- package/dist/draft.d.ts +15 -1
- package/dist/draft.js +29 -0
- package/dist/draft.js.map +1 -1
- package/dist/index.cjs +7 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -5
- package/dist/index.d.ts +24 -5
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/{read-ndf2I3D4.d.cts → read-client-tNsCHy0p.d.cts} +1 -37
- package/dist/{read-ndf2I3D4.d.ts → read-client-tNsCHy0p.d.ts} +1 -37
- package/dist/read.d.cts +39 -1
- package/dist/read.d.ts +39 -1
- package/dist/sections.cjs +516 -0
- package/dist/sections.cjs.map +1 -0
- package/dist/sections.d.cts +49 -0
- package/dist/sections.d.ts +49 -0
- package/dist/sections.js +486 -0
- package/dist/sections.js.map +1 -0
- package/package.json +7 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as _bettercms_ai_types from '@bettercms-ai/types';
|
|
2
|
-
import { ContentPageResult, Content, DeliveredLayout, ContentModelField, Fieldset, ComponentPreview, LayoutStructureDocument, LayoutDataDocument, PageLayoutOverrideDocument, ManagementLayoutCommand, AuthUser, AuthSession, SignInInput, SignUpInput, Page, MediaAsset, FormField, Form, FormSubmission, Workspace, ApiKey, ApiKeyPermission, ApiKeyTokenType } from '@bettercms-ai/types';
|
|
3
|
-
export { ApiError, ApiKey, ApiKeyPermission, ApiKeyTokenType, AssertEqual, AuthSession, AuthUser, BetterCMSErrorCode, BlockType, ButtonBlock, ButtonProps, ColumnsBlock, ColumnsProps, Content, ContentBlock, ContentEntry, ContentModel, ContentModelField, ContentPageResult, ContentResponse, DeepReadonly, DeliveryComponent, DeliveryEntry, DeliveryList, DeliveryPage, Form, FormBlock, FormField, FormProps, FormSubmission, HeadingBlock, HeadingProps, ImageBlock, ImageProps, MediaAsset, Page, PageMetaJson, PaginatedResult, Perspective, Redirect, SignInInput, SignUpInput, SiteSeoDefaults, SpacerBlock, SpacerProps, TextBlock, TextProps, VideoBlock, VideoProps, Workspace, getBlockType, isBlock } from '@bettercms-ai/types';
|
|
4
|
-
import { D as DeliveryFormField } from './read-
|
|
5
|
-
export {
|
|
2
|
+
import { ContentPageResult, Content, DeliveredLayout, ContentModelField, Fieldset, ComponentPreview, LayoutStructureDocument, LayoutDataDocument, PageLayoutOverrideDocument, ManagementLayoutCommand, AuthUser, AuthSession, SignInInput, SignUpInput, RichTextEmbeds, Page, MediaAsset, FormField, Form, FormSubmission, Workspace, ApiKey, ApiKeyPermission, ApiKeyTokenType } from '@bettercms-ai/types';
|
|
3
|
+
export { ApiError, ApiKey, ApiKeyPermission, ApiKeyTokenType, AssertEqual, AuthSession, AuthUser, BetterCMSErrorCode, BlockType, ButtonBlock, ButtonProps, ColumnsBlock, ColumnsProps, Content, ContentBlock, ContentEntry, ContentModel, ContentModelField, ContentPageResult, ContentResponse, DeepReadonly, DeliveryComponent, DeliveryEntry, DeliveryList, DeliveryPage, EmbedCard, Form, FormBlock, FormField, FormProps, FormSubmission, HeadingBlock, HeadingProps, ImageBlock, ImageProps, MediaAsset, Page, PageMetaJson, PaginatedResult, Perspective, Redirect, RichTextEmbeds, SignInInput, SignUpInput, SiteSeoDefaults, SpacerBlock, SpacerProps, TextBlock, TextProps, VideoBlock, VideoProps, Workspace, getBlockType, isBlock } from '@bettercms-ai/types';
|
|
4
|
+
import { D as DeliveryFormField } from './read-client-tNsCHy0p.cjs';
|
|
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-tNsCHy0p.cjs';
|
|
6
6
|
export { ResolvedSeo, SeoInput, SeoLocation, entrySeoInput, resolveSeo } from './seo.cjs';
|
|
7
|
+
export { SearchHit, SearchOptions, search } from './read.cjs';
|
|
7
8
|
export { ImageFit, ImageFormat, ImageSource, ImageUrlBuilder, ImageUrlOptions, imageUrl, default as imageUrlBuilder, imageValueObjectPosition, imageValueUrl } from '@bettercms-ai/image-url';
|
|
8
9
|
|
|
9
10
|
/**
|
|
@@ -401,6 +402,8 @@ declare function updateEntry(client: ManagementClient, id: string, input: Update
|
|
|
401
402
|
interface ManagedComponent {
|
|
402
403
|
id: string;
|
|
403
404
|
projectId: string | null;
|
|
405
|
+
/** Whose block it is (list rows only). @see ManagedComponentSummary.ownership */
|
|
406
|
+
ownership?: "page" | "shared" | "project";
|
|
404
407
|
allowedOn: string[];
|
|
405
408
|
name: string;
|
|
406
409
|
slug: string;
|
|
@@ -508,6 +511,8 @@ interface ManagedComponentSummary {
|
|
|
508
511
|
groupName: string | null;
|
|
509
512
|
updatedAt: string | null;
|
|
510
513
|
builtin?: boolean;
|
|
514
|
+
/** Whose block it is: one page's own (`page`), a deliberately `shared` one, or the `project`'s. */
|
|
515
|
+
ownership?: "page" | "shared" | "project";
|
|
511
516
|
}
|
|
512
517
|
/**
|
|
513
518
|
* A set of sections that repeat across the project's pages, proposed as one component.
|
|
@@ -1033,6 +1038,7 @@ declare function onContentApplied(handler: (message: ContentAppliedMessage) => v
|
|
|
1033
1038
|
* <h1 dangerouslySetInnerHTML={{ __html: rich(f.heroTitle) }}/> // React
|
|
1034
1039
|
* seo({ title: plain(page.heroTitle) })
|
|
1035
1040
|
*/
|
|
1041
|
+
|
|
1036
1042
|
/**
|
|
1037
1043
|
* A block in a Body field's `doc`. Bounded vocabulary — the server only emits what it can
|
|
1038
1044
|
* parse back, so an unknown `type` means your SDK is older than the content, not that the
|
|
@@ -1069,6 +1075,13 @@ interface RichTextValue {
|
|
|
1069
1075
|
* field that is always there.
|
|
1070
1076
|
*/
|
|
1071
1077
|
readonly doc?: DocValue;
|
|
1078
|
+
/**
|
|
1079
|
+
* The embeds the server resolved when it built `html`: X cards keyed by canonical url (X's
|
|
1080
|
+
* script, when a site opts in, is the page's, never the value's). `html` already holds each card, so `rich()` never needs this; it is
|
|
1081
|
+
* for renderers of the STRUCTURE (`<PortableText embeds={…}>`). Absent on a value with no embed
|
|
1082
|
+
* and on any envelope written before it existed: read it through `embeds()`.
|
|
1083
|
+
*/
|
|
1084
|
+
readonly embeds?: RichTextEmbeds;
|
|
1072
1085
|
}
|
|
1073
1086
|
/** The marker on a Portable Text envelope. `format` is a plain string, never a union — see below. */
|
|
1074
1087
|
declare const PORTABLE_TEXT_FORMAT = "portable-text-1";
|
|
@@ -1088,6 +1101,12 @@ declare const PORTABLE_TEXT_FORMAT = "portable-text-1";
|
|
|
1088
1101
|
* the opt-in for consumers that want to render structure with `@portabletext/react` instead.
|
|
1089
1102
|
*/
|
|
1090
1103
|
declare function portableText(value: TextOrRich): readonly unknown[] | null;
|
|
1104
|
+
/**
|
|
1105
|
+
* The value's resolved embeds, for a renderer of its structure (`<PortableText embeds>`), or null:
|
|
1106
|
+
* a bare string, a value with no embed, or an envelope written before embeds existed. Additive,
|
|
1107
|
+
* like `portableText()`: `rich()` reads `html`, which already holds the cards.
|
|
1108
|
+
*/
|
|
1109
|
+
declare function embeds(value: TextOrRich): RichTextEmbeds | null;
|
|
1091
1110
|
/**
|
|
1092
1111
|
* A field that may arrive as either shape. Type author-editable text fields with this and the
|
|
1093
1112
|
* compiler routes you through `plain()`/`rich()`, so a type switch in the CMS can never reach
|
|
@@ -1487,4 +1506,4 @@ interface FramedWindow {
|
|
|
1487
1506
|
/** True inside the editor's canvas. Safe where there is no window (a server render): false. */
|
|
1488
1507
|
declare function inEditor(win?: FramedWindow | undefined): boolean;
|
|
1489
1508
|
|
|
1490
|
-
export { type AddPageFieldsInput, type ApiKeyUsage, type ApiKeyWithRaw, type AuthResult, BetterCMS, BetterCMSAdminClient, type BetterCMSAdminOptions, BetterCMSDeliveryClient, BetterCMSManagementClient, type BetterCMSManagementOptions, type BetterCMSSiteOptions, CONTENT_APPLIED, type CommandManagedLayoutInput, type ContentAppliedMessage, type CreateApiKeyInput, type CreateEntryInput, type CreateFormInput, type CreateManagedPageInput, type CreateModelInput, type CreatePageInput, type CreateWebhookInput, type CreateWorkspaceInput, DeliveryFormField, EDITOR_FRAME_NAME, 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, PORTABLE_TEXT_FORMAT, type PageCreateReport, type PageListOptions, type PendingInvite, type PublishManagedLayoutInput, type PublishedContent, type RichTextValue, STEGA_OPEN, type SeoMeta, type SeoMetaInput, type SetPageContentInput, type StegaNode, type StegaPayload, type SubmissionListOptions, type TextOrRich, 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, contentApplied, 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, inEditor, inviteMember, isRichText, lines, listApiKeys, listEntries, listForms, listManagedPages, listMedia, listMembers, listModels, listPages, listSubmissions, listWorkspaces, onContentApplied, plain, portableText, publishManagedLayout, publishPage, publishedContentFile, publishedEntry, readPublishedContent, regenerateApiKey, removeMember, resetPublishedContentCache, resolveStega, revokeApiKey, rich, setPageContent, signIn, signInWithGithub, signInWithGoogle, signUp, stegaClean, stripStega, updateApiKey, updateEntry, updateForm, updateMemberRole, updateModel, updatePage, updatePageModel, updateWorkspace, uploadMedia };
|
|
1509
|
+
export { type AddPageFieldsInput, type ApiKeyUsage, type ApiKeyWithRaw, type AuthResult, BetterCMS, BetterCMSAdminClient, type BetterCMSAdminOptions, BetterCMSDeliveryClient, BetterCMSManagementClient, type BetterCMSManagementOptions, type BetterCMSSiteOptions, CONTENT_APPLIED, type CommandManagedLayoutInput, type ContentAppliedMessage, type CreateApiKeyInput, type CreateEntryInput, type CreateFormInput, type CreateManagedPageInput, type CreateModelInput, type CreatePageInput, type CreateWebhookInput, type CreateWorkspaceInput, DeliveryFormField, EDITOR_FRAME_NAME, 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, PORTABLE_TEXT_FORMAT, type PageCreateReport, type PageListOptions, type PendingInvite, type PublishManagedLayoutInput, type PublishedContent, type RichTextValue, STEGA_OPEN, type SeoMeta, type SeoMetaInput, type SetPageContentInput, type StegaNode, type StegaPayload, type SubmissionListOptions, type TextOrRich, 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, contentApplied, createApiKey, createEntry, createForm, createManagedPage, createModel, createPage, createWorkspace, decodeStega, deleteForm, deleteMedia, deletePage, deleteSubmission, deleteWorkspace, embeds, encodeStega, getApiKeyUsage, getEntry, getForm, getManagedLayout, getManagedPage, getMedia, getMember, getModel, getPage, getSubmission, getWorkspace, inEditor, inviteMember, isRichText, lines, listApiKeys, listEntries, listForms, listManagedPages, listMedia, listMembers, listModels, listPages, listSubmissions, listWorkspaces, onContentApplied, plain, portableText, publishManagedLayout, publishPage, publishedContentFile, publishedEntry, readPublishedContent, regenerateApiKey, removeMember, resetPublishedContentCache, resolveStega, revokeApiKey, rich, setPageContent, signIn, signInWithGithub, signInWithGoogle, signUp, stegaClean, stripStega, updateApiKey, updateEntry, updateForm, updateMemberRole, updateModel, updatePage, updatePageModel, updateWorkspace, uploadMedia };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as _bettercms_ai_types from '@bettercms-ai/types';
|
|
2
|
-
import { ContentPageResult, Content, DeliveredLayout, ContentModelField, Fieldset, ComponentPreview, LayoutStructureDocument, LayoutDataDocument, PageLayoutOverrideDocument, ManagementLayoutCommand, AuthUser, AuthSession, SignInInput, SignUpInput, Page, MediaAsset, FormField, Form, FormSubmission, Workspace, ApiKey, ApiKeyPermission, ApiKeyTokenType } from '@bettercms-ai/types';
|
|
3
|
-
export { ApiError, ApiKey, ApiKeyPermission, ApiKeyTokenType, AssertEqual, AuthSession, AuthUser, BetterCMSErrorCode, BlockType, ButtonBlock, ButtonProps, ColumnsBlock, ColumnsProps, Content, ContentBlock, ContentEntry, ContentModel, ContentModelField, ContentPageResult, ContentResponse, DeepReadonly, DeliveryComponent, DeliveryEntry, DeliveryList, DeliveryPage, Form, FormBlock, FormField, FormProps, FormSubmission, HeadingBlock, HeadingProps, ImageBlock, ImageProps, MediaAsset, Page, PageMetaJson, PaginatedResult, Perspective, Redirect, SignInInput, SignUpInput, SiteSeoDefaults, SpacerBlock, SpacerProps, TextBlock, TextProps, VideoBlock, VideoProps, Workspace, getBlockType, isBlock } from '@bettercms-ai/types';
|
|
4
|
-
import { D as DeliveryFormField } from './read-
|
|
5
|
-
export {
|
|
2
|
+
import { ContentPageResult, Content, DeliveredLayout, ContentModelField, Fieldset, ComponentPreview, LayoutStructureDocument, LayoutDataDocument, PageLayoutOverrideDocument, ManagementLayoutCommand, AuthUser, AuthSession, SignInInput, SignUpInput, RichTextEmbeds, Page, MediaAsset, FormField, Form, FormSubmission, Workspace, ApiKey, ApiKeyPermission, ApiKeyTokenType } from '@bettercms-ai/types';
|
|
3
|
+
export { ApiError, ApiKey, ApiKeyPermission, ApiKeyTokenType, AssertEqual, AuthSession, AuthUser, BetterCMSErrorCode, BlockType, ButtonBlock, ButtonProps, ColumnsBlock, ColumnsProps, Content, ContentBlock, ContentEntry, ContentModel, ContentModelField, ContentPageResult, ContentResponse, DeepReadonly, DeliveryComponent, DeliveryEntry, DeliveryList, DeliveryPage, EmbedCard, Form, FormBlock, FormField, FormProps, FormSubmission, HeadingBlock, HeadingProps, ImageBlock, ImageProps, MediaAsset, Page, PageMetaJson, PaginatedResult, Perspective, Redirect, RichTextEmbeds, SignInInput, SignUpInput, SiteSeoDefaults, SpacerBlock, SpacerProps, TextBlock, TextProps, VideoBlock, VideoProps, Workspace, getBlockType, isBlock } from '@bettercms-ai/types';
|
|
4
|
+
import { D as DeliveryFormField } from './read-client-tNsCHy0p.js';
|
|
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-tNsCHy0p.js';
|
|
6
6
|
export { ResolvedSeo, SeoInput, SeoLocation, entrySeoInput, resolveSeo } from './seo.js';
|
|
7
|
+
export { SearchHit, SearchOptions, search } from './read.js';
|
|
7
8
|
export { ImageFit, ImageFormat, ImageSource, ImageUrlBuilder, ImageUrlOptions, imageUrl, default as imageUrlBuilder, imageValueObjectPosition, imageValueUrl } from '@bettercms-ai/image-url';
|
|
8
9
|
|
|
9
10
|
/**
|
|
@@ -401,6 +402,8 @@ declare function updateEntry(client: ManagementClient, id: string, input: Update
|
|
|
401
402
|
interface ManagedComponent {
|
|
402
403
|
id: string;
|
|
403
404
|
projectId: string | null;
|
|
405
|
+
/** Whose block it is (list rows only). @see ManagedComponentSummary.ownership */
|
|
406
|
+
ownership?: "page" | "shared" | "project";
|
|
404
407
|
allowedOn: string[];
|
|
405
408
|
name: string;
|
|
406
409
|
slug: string;
|
|
@@ -508,6 +511,8 @@ interface ManagedComponentSummary {
|
|
|
508
511
|
groupName: string | null;
|
|
509
512
|
updatedAt: string | null;
|
|
510
513
|
builtin?: boolean;
|
|
514
|
+
/** Whose block it is: one page's own (`page`), a deliberately `shared` one, or the `project`'s. */
|
|
515
|
+
ownership?: "page" | "shared" | "project";
|
|
511
516
|
}
|
|
512
517
|
/**
|
|
513
518
|
* A set of sections that repeat across the project's pages, proposed as one component.
|
|
@@ -1033,6 +1038,7 @@ declare function onContentApplied(handler: (message: ContentAppliedMessage) => v
|
|
|
1033
1038
|
* <h1 dangerouslySetInnerHTML={{ __html: rich(f.heroTitle) }}/> // React
|
|
1034
1039
|
* seo({ title: plain(page.heroTitle) })
|
|
1035
1040
|
*/
|
|
1041
|
+
|
|
1036
1042
|
/**
|
|
1037
1043
|
* A block in a Body field's `doc`. Bounded vocabulary — the server only emits what it can
|
|
1038
1044
|
* parse back, so an unknown `type` means your SDK is older than the content, not that the
|
|
@@ -1069,6 +1075,13 @@ interface RichTextValue {
|
|
|
1069
1075
|
* field that is always there.
|
|
1070
1076
|
*/
|
|
1071
1077
|
readonly doc?: DocValue;
|
|
1078
|
+
/**
|
|
1079
|
+
* The embeds the server resolved when it built `html`: X cards keyed by canonical url (X's
|
|
1080
|
+
* script, when a site opts in, is the page's, never the value's). `html` already holds each card, so `rich()` never needs this; it is
|
|
1081
|
+
* for renderers of the STRUCTURE (`<PortableText embeds={…}>`). Absent on a value with no embed
|
|
1082
|
+
* and on any envelope written before it existed: read it through `embeds()`.
|
|
1083
|
+
*/
|
|
1084
|
+
readonly embeds?: RichTextEmbeds;
|
|
1072
1085
|
}
|
|
1073
1086
|
/** The marker on a Portable Text envelope. `format` is a plain string, never a union — see below. */
|
|
1074
1087
|
declare const PORTABLE_TEXT_FORMAT = "portable-text-1";
|
|
@@ -1088,6 +1101,12 @@ declare const PORTABLE_TEXT_FORMAT = "portable-text-1";
|
|
|
1088
1101
|
* the opt-in for consumers that want to render structure with `@portabletext/react` instead.
|
|
1089
1102
|
*/
|
|
1090
1103
|
declare function portableText(value: TextOrRich): readonly unknown[] | null;
|
|
1104
|
+
/**
|
|
1105
|
+
* The value's resolved embeds, for a renderer of its structure (`<PortableText embeds>`), or null:
|
|
1106
|
+
* a bare string, a value with no embed, or an envelope written before embeds existed. Additive,
|
|
1107
|
+
* like `portableText()`: `rich()` reads `html`, which already holds the cards.
|
|
1108
|
+
*/
|
|
1109
|
+
declare function embeds(value: TextOrRich): RichTextEmbeds | null;
|
|
1091
1110
|
/**
|
|
1092
1111
|
* A field that may arrive as either shape. Type author-editable text fields with this and the
|
|
1093
1112
|
* compiler routes you through `plain()`/`rich()`, so a type switch in the CMS can never reach
|
|
@@ -1487,4 +1506,4 @@ interface FramedWindow {
|
|
|
1487
1506
|
/** True inside the editor's canvas. Safe where there is no window (a server render): false. */
|
|
1488
1507
|
declare function inEditor(win?: FramedWindow | undefined): boolean;
|
|
1489
1508
|
|
|
1490
|
-
export { type AddPageFieldsInput, type ApiKeyUsage, type ApiKeyWithRaw, type AuthResult, BetterCMS, BetterCMSAdminClient, type BetterCMSAdminOptions, BetterCMSDeliveryClient, BetterCMSManagementClient, type BetterCMSManagementOptions, type BetterCMSSiteOptions, CONTENT_APPLIED, type CommandManagedLayoutInput, type ContentAppliedMessage, type CreateApiKeyInput, type CreateEntryInput, type CreateFormInput, type CreateManagedPageInput, type CreateModelInput, type CreatePageInput, type CreateWebhookInput, type CreateWorkspaceInput, DeliveryFormField, EDITOR_FRAME_NAME, 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, PORTABLE_TEXT_FORMAT, type PageCreateReport, type PageListOptions, type PendingInvite, type PublishManagedLayoutInput, type PublishedContent, type RichTextValue, STEGA_OPEN, type SeoMeta, type SeoMetaInput, type SetPageContentInput, type StegaNode, type StegaPayload, type SubmissionListOptions, type TextOrRich, 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, contentApplied, 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, inEditor, inviteMember, isRichText, lines, listApiKeys, listEntries, listForms, listManagedPages, listMedia, listMembers, listModels, listPages, listSubmissions, listWorkspaces, onContentApplied, plain, portableText, publishManagedLayout, publishPage, publishedContentFile, publishedEntry, readPublishedContent, regenerateApiKey, removeMember, resetPublishedContentCache, resolveStega, revokeApiKey, rich, setPageContent, signIn, signInWithGithub, signInWithGoogle, signUp, stegaClean, stripStega, updateApiKey, updateEntry, updateForm, updateMemberRole, updateModel, updatePage, updatePageModel, updateWorkspace, uploadMedia };
|
|
1509
|
+
export { type AddPageFieldsInput, type ApiKeyUsage, type ApiKeyWithRaw, type AuthResult, BetterCMS, BetterCMSAdminClient, type BetterCMSAdminOptions, BetterCMSDeliveryClient, BetterCMSManagementClient, type BetterCMSManagementOptions, type BetterCMSSiteOptions, CONTENT_APPLIED, type CommandManagedLayoutInput, type ContentAppliedMessage, type CreateApiKeyInput, type CreateEntryInput, type CreateFormInput, type CreateManagedPageInput, type CreateModelInput, type CreatePageInput, type CreateWebhookInput, type CreateWorkspaceInput, DeliveryFormField, EDITOR_FRAME_NAME, 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, PORTABLE_TEXT_FORMAT, type PageCreateReport, type PageListOptions, type PendingInvite, type PublishManagedLayoutInput, type PublishedContent, type RichTextValue, STEGA_OPEN, type SeoMeta, type SeoMetaInput, type SetPageContentInput, type StegaNode, type StegaPayload, type SubmissionListOptions, type TextOrRich, 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, contentApplied, createApiKey, createEntry, createForm, createManagedPage, createModel, createPage, createWorkspace, decodeStega, deleteForm, deleteMedia, deletePage, deleteSubmission, deleteWorkspace, embeds, encodeStega, getApiKeyUsage, getEntry, getForm, getManagedLayout, getManagedPage, getMedia, getMember, getModel, getPage, getSubmission, getWorkspace, inEditor, inviteMember, isRichText, lines, listApiKeys, listEntries, listForms, listManagedPages, listMedia, listMembers, listModels, listPages, listSubmissions, listWorkspaces, onContentApplied, plain, portableText, publishManagedLayout, publishPage, publishedContentFile, publishedEntry, readPublishedContent, regenerateApiKey, removeMember, resetPublishedContentCache, resolveStega, revokeApiKey, rich, setPageContent, signIn, signInWithGithub, signInWithGoogle, signUp, stegaClean, stripStega, updateApiKey, updateEntry, updateForm, updateMemberRole, updateModel, updatePage, updatePageModel, updateWorkspace, uploadMedia };
|
package/dist/index.js
CHANGED
|
@@ -1449,6 +1449,11 @@ function portableText(value) {
|
|
|
1449
1449
|
const v = value;
|
|
1450
1450
|
return v.format === PORTABLE_TEXT_FORMAT && Array.isArray(v.value) ? v.value : null;
|
|
1451
1451
|
}
|
|
1452
|
+
function embeds(value) {
|
|
1453
|
+
if (!isRichText(value)) return null;
|
|
1454
|
+
const e = value.embeds;
|
|
1455
|
+
return typeof e === "object" && e !== null && typeof e.cards === "object" && e.cards !== null ? e : null;
|
|
1456
|
+
}
|
|
1452
1457
|
function isRichText(value) {
|
|
1453
1458
|
return typeof value === "object" && value !== null && !Array.isArray(value) && ("html" in value || "format" in value);
|
|
1454
1459
|
}
|
|
@@ -2002,6 +2007,7 @@ export {
|
|
|
2002
2007
|
deletePage,
|
|
2003
2008
|
deleteSubmission,
|
|
2004
2009
|
deleteWorkspace,
|
|
2010
|
+
embeds,
|
|
2005
2011
|
encodeStega,
|
|
2006
2012
|
entrySeoInput,
|
|
2007
2013
|
formInitialValues,
|