@riverbankcms/sdk 0.92.0 → 0.93.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/{PreviewEditorSidebar-3CI5MKV3.mjs → PreviewEditorSidebar-D3PAF7NW.mjs} +3 -3
- package/dist/{PreviewEditorUI-DKEP636I.mjs → PreviewEditorUI-G5JVJEIJ.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-NHTLRNQD.mjs +8 -0
- package/dist/_dts/api/src/common/envelope.d.ts +10 -0
- package/dist/_dts/api/src/index.d.ts +2 -2
- package/dist/_dts/api/src/request.d.ts +1 -1
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +1 -0
- package/dist/_dts/content-editor/src/controller/EntryControllerProvider.d.ts +14 -14
- package/dist/_dts/content-editor/src/controller/useEntrySyncHelpers.d.ts +1 -1
- package/dist/_dts/content-editor/src/hooks/useEntryActions.d.ts +5 -15
- package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +46 -0
- package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +43 -36
- package/dist/_dts/media-core/src/fileUploadFinalization.d.ts +29 -1
- package/dist/_dts/media-core/src/index.d.ts +1 -0
- package/dist/_dts/media-core/src/legacyMediaValue.d.ts +11 -0
- package/dist/_dts/media-react/src/hooks/useApiMediaUploader.d.ts +2 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/{chunk-UOMTCHZD.mjs → chunk-A63UXN3P.mjs} +21 -19
- package/dist/{chunk-U5YM4AWE.mjs → chunk-AJZGT6YG.mjs} +1 -1
- package/dist/{chunk-6D7PLF4M.mjs → chunk-AQ6RT6LZ.mjs} +2 -2
- package/dist/{chunk-ZA2S7H34.mjs → chunk-NT76QGIJ.mjs} +98 -1
- package/dist/{chunk-I6EOKV6B.mjs → chunk-PCNCETBI.mjs} +676 -386
- package/dist/{chunk-LERKJM3E.mjs → chunk-XIK2HYI3.mjs} +7 -7
- package/dist/cli/index.mjs +198 -87
- package/dist/client/{accordion-BUDH2G3S.mjs → accordion-RNQIPG55.mjs} +2 -2
- package/dist/client/{bookingForm-NQMCELVB.mjs → bookingForm-HYEEVRLP.mjs} +5 -5
- package/dist/client/{carousel-ONCEW6IJ.mjs → carousel-W7DQ3YPU.mjs} +3 -3
- package/dist/client/{cart-V2TCK2GI.mjs → cart-PXJ3SXXO.mjs} +6 -6
- package/dist/client/{checkout-ZI7SWNCS.mjs → checkout-X3JYSOXI.mjs} +6 -6
- package/dist/client/{chunk-R3CZQLXF.mjs → chunk-6SYGVVWA.mjs} +1 -1
- package/dist/client/{chunk-N2WJPTF7.mjs → chunk-DUOHLWLF.mjs} +3 -3
- package/dist/client/{chunk-KXYEKEV6.mjs → chunk-IXDSXF2D.mjs} +7 -7
- package/dist/client/{chunk-ZJDBOLX7.mjs → chunk-J6TMMMXW.mjs} +2 -2
- package/dist/client/{chunk-B5UC2D6X.mjs → chunk-JNE6UI6U.mjs} +1 -1
- package/dist/client/{chunk-QQNVQ62W.mjs → chunk-OLAOAZEO.mjs} +1 -1
- package/dist/client/{chunk-AUMRQ242.mjs → chunk-PICR3NTQ.mjs} +2 -2
- package/dist/client/{chunk-ERQDHUS2.mjs → chunk-Q47XGAGS.mjs} +1 -1
- package/dist/client/{chunk-HQWIJLYN.mjs → chunk-WERRJXNJ.mjs} +1 -1
- package/dist/client/{chunk-JXY6NHG6.mjs → chunk-YYVGSYBO.mjs} +5 -5
- package/dist/client/client.mjs +127 -17
- package/dist/client/{courseRegistration-JPWAQ6KM.mjs → courseRegistration-QZ67PVHO.mjs} +5 -5
- package/dist/client/{eventCalendar-QDOCHBBV.mjs → eventCalendar-V3BDHQNT.mjs} +8 -8
- package/dist/client/{eventCombined-ZS2CXSIE.mjs → eventCombined-XYFRN2RG.mjs} +8 -8
- package/dist/client/{eventDetails-5LOBMPLN.mjs → eventDetails-TFE5TWKV.mjs} +8 -8
- package/dist/client/{eventListing-SBGY4I3L.mjs → eventListing-IQ6AGWZ6.mjs} +8 -8
- package/dist/client/{eventRegistration-XGPIU3Z2.mjs → eventRegistration-WGJVFKQJ.mjs} +8 -8
- package/dist/client/{form-R7D4LZWW.mjs → form-6UZY6RUA.mjs} +2 -2
- package/dist/client/{headerSection-RRLYUCGC.mjs → headerSection-RSFXY6V3.mjs} +3 -3
- package/dist/client/hooks.mjs +35 -3
- package/dist/client/{locationMap-35ZJMRBZ.mjs → locationMap-24FH67I4.mjs} +3 -3
- package/dist/client/{newsletterForm-MJ2VCFUT.mjs → newsletterForm-QVL3MLTN.mjs} +2 -2
- package/dist/client/{productDetail-2O7YQNBX.mjs → productDetail-ZDYN3G4T.mjs} +6 -6
- package/dist/client/{productList-FDP5BH7W.mjs → productList-4BMJLQHZ.mjs} +6 -6
- package/dist/client/rendering/client.mjs +8 -0
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +69 -2
- package/dist/client/{shop-BGYJ3LDT.mjs → shop-U5C634FF.mjs} +6 -6
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/{sdk-runtime-B3TFXRXZ.mjs → sdk-runtime-VGV46WVB.mjs} +6 -6
- package/dist/server/components.mjs +121 -61
- package/dist/server/config-validation.mjs +35 -3
- package/dist/server/config.mjs +35 -3
- package/dist/server/data.mjs +35 -3
- package/dist/server/index.mjs +104 -29
- package/dist/server/next.mjs +183 -80
- package/dist/server/page-converter.mjs +3 -3
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +121 -61
- package/dist/server/rendering.mjs +121 -61
- package/dist/server/routing.mjs +102 -62
- package/dist/server/server.mjs +167 -92
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-BRGRDQFH.mjs +0 -8
- /package/dist/client/{chunk-GH6IIOOE.mjs → chunk-PCHACQEB.mjs} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { resolvePreviewDashboardSetupHandoff, buildPreviewDashboardSetupUrl, resolvePreviewSidebarChromeModel, resolvePreviewEditorGuidanceModel, previewWidgetOverrides, canInspectSiteStyle, mapContentSchemaToFormFields, PreviewFormProvider, usePreviewBlockCustomizeSelectionOptional, BlockEditor, canApplySiteStyle, useBlockCustomizeControls, MAX_QUICK_MANIFEST_FIELDS } from './chunk-
|
|
3
|
-
import { useEntryController, useEditorUiStoreInstance, useUISelector, resolvePreviewSidebarTab, unsafeAsEditorBlockId, Tabs, TabsList, TabsTrigger, Button, X, TabsContent, useEditorUiStore, deriveRouteMetadataPresentation, resolvePageRouteSlug, createManifestValidation, createStoreBackend, ManifestForm, previewAssistantEnabled, Collapsible, CollapsibleTrigger, ChevronRight, CollapsibleContent, ContentFieldsForm, usePreviewDesignCoordinator, useSiteChromeCustomizeOptional, resolveStyleConfiguratorInitialSnapshot, createStyleConfiguratorState, isPreviewingChange, createOptimisticActionRunner, syncStyleConfiguratorState, getCuratedSiteStyle, planSiteStylePreviewChange, openRow, previewSiteStyle, applyResolvedSelections, previewButtonPersonality, previewHeaderLayout, previewHeaderStyle, planSiteChromeLookSelection, previewFooterLook, buildSiteChromeLookModels, planSiteChromeFooterLayoutSelection, previewPaletteVariant, previewTypographyPreset, setTypographyBodyFontOverride, setTypographyHeadingFontOverride, clearTypographyFontOverrides, paletteOverridesSchema, setPaletteOverrides, toggleRow, cancelPreview, dismissWarnings, dismissNotices, deriveStyleConfiguratorCapabilities, buildApplySiteStyleSelectionBody, markApplyFailed, selectionSnapshotFromApplySiteStyleSelectionResponse, styleConfiguratorHistoryEntryForPersistedSelection, markApplySaved,
|
|
4
|
-
import { usePreviewAuth, getDashboardUrl } from './chunk-
|
|
2
|
+
import { resolvePreviewDashboardSetupHandoff, buildPreviewDashboardSetupUrl, resolvePreviewSidebarChromeModel, resolvePreviewEditorGuidanceModel, previewWidgetOverrides, canInspectSiteStyle, mapContentSchemaToFormFields, PreviewFormProvider, usePreviewBlockCustomizeSelectionOptional, BlockEditor, canApplySiteStyle, useBlockCustomizeControls, MAX_QUICK_MANIFEST_FIELDS } from './chunk-A63UXN3P.mjs';
|
|
3
|
+
import { useEntryController, useEditorUiStoreInstance, useUISelector, resolvePreviewSidebarTab, unsafeAsEditorBlockId, Tabs, TabsList, TabsTrigger, Button, X, TabsContent, useEditorUiStore, deriveRouteMetadataPresentation, resolvePageRouteSlug, createManifestValidation, createStoreBackend, ManifestForm, previewAssistantEnabled, Collapsible, CollapsibleTrigger, ChevronRight, CollapsibleContent, ContentFieldsForm, usePreviewDesignCoordinator, useSiteChromeCustomizeOptional, resolveStyleConfiguratorInitialSnapshot, createStyleConfiguratorState, isPreviewingChange, createOptimisticActionRunner, syncStyleConfiguratorState, getCuratedSiteStyle, planSiteStylePreviewChange, openRow, previewSiteStyle, applyResolvedSelections, previewButtonPersonality, previewHeaderLayout, previewHeaderStyle, planSiteChromeLookSelection, previewFooterLook, buildSiteChromeLookModels, planSiteChromeFooterLayoutSelection, previewPaletteVariant, previewTypographyPreset, setTypographyBodyFontOverride, setTypographyHeadingFontOverride, clearTypographyFontOverrides, paletteOverridesSchema, setPaletteOverrides, toggleRow, cancelPreview, dismissWarnings, dismissNotices, deriveStyleConfiguratorCapabilities, buildApplySiteStyleSelectionBody, markApplyFailed, selectionSnapshotFromApplySiteStyleSelectionResponse, styleConfiguratorHistoryEntryForPersistedSelection, markApplySaved, markApplySaving, findButtonPersonality, findPaletteVariant, findTypographyPreset, getHeaderLayout, getHeaderStyle, getFooterLayout, findFooterLook, cycleSiteChromeLookId, resolveContentTitle, foldSubroute, SUBROUTE_KINDS, Smartphone, Tablet, Monitor, Maximize2, cn, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuItem, listEntryPageContentSlots, ContentSpinner, Callout, CalloutDescription, curatedSiteStyles, ChevronLeft, cycleableSiteChromeOptions, requireEntriesForCuratedChoices, buttonPersonalities, typographyPresets, paletteVariants, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, FormRenderer, evaluateTypographyFontSlot, Separator, Surface, ColorPicker, Input } from './chunk-PCNCETBI.mjs';
|
|
4
|
+
import { usePreviewAuth, getDashboardUrl, unwrapResponse } from './chunk-NT76QGIJ.mjs';
|
|
5
5
|
import './chunk-R7POPVJR.mjs';
|
|
6
6
|
import { useMemo, useRef, useCallback, useEffect, useState, useTransition, useLayoutEffect, useSyncExternalStore, useId } from 'react';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { resolvePreviewChromeSurface, usePreviewPageDesignEditorState, PREVIEW_CHROME_PORTAL_CLASS_NAME, PREVIEW_CHROME_THEME_CLASS_NAME, applyPreviewChromeSurfaceToElement, setPreviewSidebarTab } from './chunk-
|
|
3
|
-
import { useEntryEditorController, useEditorUiStore, useMultiAutosave, usePreviewDesignHistoryOrder, useSiteChromeCustomizeOptional, selectPreviewDesignHistoryDomain, EditorChrome, previewDesignHistoryDomainForCommand, classifyHistoryShortcut, previewAssistantEnabled,
|
|
4
|
-
import { usePreviewAuth } from './chunk-
|
|
2
|
+
import { resolvePreviewChromeSurface, usePreviewPageDesignEditorState, PREVIEW_CHROME_PORTAL_CLASS_NAME, PREVIEW_CHROME_THEME_CLASS_NAME, applyPreviewChromeSurfaceToElement, setPreviewSidebarTab } from './chunk-AQ6RT6LZ.mjs';
|
|
3
|
+
import { useEntryEditorController, useEditorUiStore, useMultiAutosave, usePreviewDesignHistoryOrder, useSiteChromeCustomizeOptional, selectPreviewDesignHistoryDomain, EditorChrome, previewDesignHistoryDomainForCommand, classifyHistoryShortcut, previewAssistantEnabled, cn, Dialog, Button, Palette, DialogContent, DialogHeader, DialogTitle, DialogDescription, TriangleAlert, Pencil, Sparkles, useEditorUiStoreInstance } from './chunk-PCNCETBI.mjs';
|
|
4
|
+
import { usePreviewAuth, unwrapResponse } from './chunk-NT76QGIJ.mjs';
|
|
5
5
|
import './chunk-R7POPVJR.mjs';
|
|
6
6
|
import { useState, useMemo, useCallback, useEffect, useTransition } from 'react';
|
|
7
7
|
import { createPortal } from 'react-dom';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
export { SdkPreviewModeRuntime } from './chunk-XIK2HYI3.mjs';
|
|
3
|
+
import './chunk-AJZGT6YG.mjs';
|
|
4
|
+
import './chunk-A63UXN3P.mjs';
|
|
5
|
+
import './chunk-AQ6RT6LZ.mjs';
|
|
6
|
+
import './chunk-PCNCETBI.mjs';
|
|
7
|
+
import './chunk-NT76QGIJ.mjs';
|
|
8
|
+
import './chunk-R7POPVJR.mjs';
|
|
@@ -25,6 +25,8 @@ export interface ApiResponse<TData> {
|
|
|
25
25
|
meta: ResponseMeta;
|
|
26
26
|
}
|
|
27
27
|
export type ApiErrorCode = 'auth:unauthenticated' | 'auth:token_expired' | 'auth:token_invalid' | 'auth:forbidden' | 'auth:mfa_required' | 'auth:sudo_required' | 'auth:insufficient_permissions' | 'auth:impersonation_restricted' | 'validation:invalid_input' | 'validation:missing_field' | 'validation:invalid_format' | 'validation:payload_too_large' | 'resource:not_found' | 'resource:already_exists' | 'resource:conflict' | 'resource:gone' | 'rate_limit:exceeded' | 'billing:payment_required' | 'billing:plan_limit_exceeded' | 'billing:pass_redemption_failed' | 'server:internal_error' | 'server:unavailable' | 'external:service_error' | 'external:registrar_orphaned_contact_profile' | 'network:connection_error' | 'network:timeout' | 'network:dns_error';
|
|
28
|
+
export declare const API_ERROR_CODES: readonly ["auth:unauthenticated", "auth:token_expired", "auth:token_invalid", "auth:forbidden", "auth:mfa_required", "auth:sudo_required", "auth:insufficient_permissions", "auth:impersonation_restricted", "validation:invalid_input", "validation:missing_field", "validation:invalid_format", "validation:payload_too_large", "resource:not_found", "resource:already_exists", "resource:conflict", "resource:gone", "rate_limit:exceeded", "billing:payment_required", "billing:plan_limit_exceeded", "billing:pass_redemption_failed", "server:internal_error", "server:unavailable", "external:service_error", "external:registrar_orphaned_contact_profile", "network:connection_error", "network:timeout", "network:dns_error"];
|
|
29
|
+
export declare function isApiErrorCode(value: unknown): value is ApiErrorCode;
|
|
28
30
|
export interface FieldError {
|
|
29
31
|
field: string;
|
|
30
32
|
code: string;
|
|
@@ -44,6 +46,14 @@ export interface ApiError {
|
|
|
44
46
|
export type ApiResult<TData> = ApiResponse<TData> | ApiError;
|
|
45
47
|
export declare function isApiError(result: ApiResult<unknown>): result is ApiError;
|
|
46
48
|
export declare function isApiSuccess<T>(result: ApiResult<T>): result is ApiResponse<T>;
|
|
49
|
+
export type ApiEnvelopeErrorDetails = {
|
|
50
|
+
rawCode: string | null;
|
|
51
|
+
code: ApiErrorCode | null;
|
|
52
|
+
message: string | null;
|
|
53
|
+
status: number | null;
|
|
54
|
+
fieldErrors: FieldError[] | null;
|
|
55
|
+
};
|
|
56
|
+
export declare function extractApiEnvelopeErrorDetails(body: unknown): ApiEnvelopeErrorDetails;
|
|
47
57
|
/**
|
|
48
58
|
* Error class for API failures that can be thrown from unwrapResponse.
|
|
49
59
|
* Preserves all error metadata from the envelope.
|
|
@@ -17,7 +17,7 @@ export { parseMailchimpAudienceId, parseMailchimpConnectionId, } from "./mailchi
|
|
|
17
17
|
export type { GeneratedIconSetApplyRequest, GeneratedIconSetApplyResponse, GeneratedIconSetCandidate, GeneratedIconSetGenerateRequest, GeneratedIconSetGenerateResponse, GeneratedIconRenderAsset, GeneratedIconRenderAssetRef, GeneratedIconRenderAssetsRequest, GeneratedIconRenderAssetsResponse, SiteIconStyleGuidePayload, SiteIconStyleGuideResponse, SiteIconStyleStrokeRule, SiteIconStyleGuideUpdateRequest, } from "./siteIcons";
|
|
18
18
|
export { DEFAULT_LAUNCH_READINESS_INPUT, deriveLaunchReadiness, } from "./launchReadiness";
|
|
19
19
|
export { getDashboardBaseUrl, getDashboardUrl, getAbsoluteDashboardUrl, getCmsApiUrl, resolveApiBaseUrl, normalizeDashboardOrigin, deriveCmsApiUrlFromDashboardUrl, } from "./url";
|
|
20
|
-
export {
|
|
20
|
+
export { API_ERROR_CODES, ApiEnvelopeError, extractApiEnvelopeErrorDetails, isApiErrorCode, unwrapResponse, } from "./common/envelope";
|
|
21
21
|
export { createAuthenticatedApiClient, createInternalAPIClient, createServerAPIClient, createBearerAPIClient, ApiRequestError, } from "./request";
|
|
22
22
|
export { normalizeCmsApiKey } from "./env";
|
|
23
23
|
export * from "./bookingRefundOutcomes";
|
|
@@ -108,7 +108,7 @@ export { getSiteMembers, inviteSiteMember, linkCurrentUserPractitioner, updateSi
|
|
|
108
108
|
export { listAccountDomains, searchDomainsRequest, registerDomainRequest, assignDomainToSiteRequest, removeDomainRequest, retryDomainConfigRequest, getDomainDnsRequest, verifyDomainDnsRequest, retryNameserversRequest, updateRegisteredDomainContactRequest, setRegisteredDomainPrivacyRequest, setRegisteredDomainAutoRenewRequest, retryVercelRequest, retryResendRequest, } from "./domains";
|
|
109
109
|
export { startImpersonation, stopImpersonation, assignAdminRole, revokeAdminRole, adminChangePlan, listAdminInvites, createAdminInvite, revokeAdminInvite, createAdminUser, adminDeleteSite, adminDeleteUser, listAllowedDomains, addAllowedDomain, deleteAllowedDomain, listGscPropertiesAdmin, setGscPersistEnabled, startGscVerification, confirmGscVerification, runGscIngestionForSite, getPriceOverride, upsertPriceOverride, deletePriceOverride, } from "./admin";
|
|
110
110
|
export { enrollTotpFactor, verifyTotpFactor, activateTotpFactor, deleteMfaFactor, rotateBackupCodes, getBackupCodesOverview, enrollPhoneFactor, challengePhoneFactor, verifyPhoneFactor, acceptAdminInvite, } from "./auth";
|
|
111
|
-
export type { ApiResult, ApiResponse, ApiError, ApiErrorCode, FieldError, ResponseMeta, } from "./common/envelope";
|
|
111
|
+
export type { ApiResult, ApiResponse, ApiError, ApiErrorCode, ApiEnvelopeErrorDetails, FieldError, ResponseMeta, } from "./common/envelope";
|
|
112
112
|
export type { JsonPrimitive, JsonValue } from "./types";
|
|
113
113
|
export type { PublicEventLoaderParams, PublicRouteCandidate, PublicEventPriceDisplay, PublicCoursePriceDisplay, PublicEventScheduleScope, PublicEventSurfaceScope, } from "./types";
|
|
114
114
|
export type { APIEndpoint, APIEndpoints, PageBlockDesignSyncWarning, AiAPIEndpoints, LaunchReadinessAPIEndpoints, SiteMembersAPIEndpoints, SeoAPIEndpoints, RedirectsAPIEndpoints, AvailabilityAPIEndpoints, CalendarAPIEndpoints, ContentTypesAPIEndpoints, MediaAPIEndpoints, RiverbankSiteConfig, RiverbankSiteConfigInput, SdkWorkflowConfig, SdkWorkflowEntryDraftUpdatedCondition, SdkWorkflowEntryDraftUpdatedTrigger, SdkWorkflowManualTrigger, SdkWorkflowTrigger, SdkWorkflowConfirmation, GetEndpoint, HTTPMethod, APICallParamsStrict, CreateManualSiteRequest, CreateManualSiteResponse, ApiKeyRecord, PageRecord, NavigationMenuRecord, NavigationItemRecord, NavigationMenuWithItems, AccessPolicyContract, EntitledCustomerAccessScopeContract, AccessPolicyTag, CartLinkLabelConfig, CartLinkPayload, LinkPayload, InternalLinkRoutablePayload, NavigationLinkInput, RoutableContentItem, CreateMediaAssetBody, FileKindContract, FileKindTag, FileUseContract, FileUseTag, ImageFileFormat, MediaAssetResponse, MediaClassifyJobResponse, MediaJobSummaryResponse, MediaLabelSummary, MediaSettingsResponse, RenderableFileKindTag, StorageClass, UploadIntentContract, UploadIntentTag, BookingSettings, AppointmentStaffChangeNotificationSettings, AppointmentStaffNotificationSetupHealth, AppointmentStaffReminderSettings, BookingNotificationRule, BookingNotificationSettings, BookingNotificationUpdateKind, TeamMemberProfilePagePolicyMode, TeamMemberProfilePageSettings, BookingVerticalConfig, BookingCurrencyEditState, BookingSettingsEditorSnapshot, BookingSettingsResponse, BookingWaitlistSettings, BookingModuleToggles, BookingReminderOverrides, BookingDefaultImage, AppointmentFollowUpScopeIds, AppointmentFollowUpScopeMode, AppointmentFollowUpSettings, WaitlistMode, WaitlistOverride, EventBookingPolicyMode, EventBookingPolicy, EventBookingPolicies, UpdateBookingSettingsRequest, RefundEventAttendeeRequest, EventAttendeeRefundResult, RefundEventAttendeeResponse, RefundCourseEnrollmentRequest, CourseEnrollmentRefundResult, RefundCourseEnrollmentResponse, TransferEventAttendeeRequest, EventAttendeeTransferResult, TransferEventAttendeeResponse, DiscardTeamMemberProfileDraftResponse, PublishTeamMemberProfileRequest, PublishTeamMemberProfileResponse, CancelScheduledTeamMemberProfileResponse, ScheduleTeamMemberProfileRequest, ScheduleTeamMemberProfileResponse, TeamMemberProfileContentResponse, UnpublishTeamMemberProfileResponse, UpdateTeamMemberProfileContentRequest, UpdateTeamMemberProfilePolicyRequest, UpdateTeamMemberProfilePolicyResponse, UpdateTeamMemberProfileRouteMetadataRequest, UpdateTeamMemberProfileRouteMetadataResponse, OpsEventOccurrenceSummary, OpsOccurrenceAttendee, OpsListUpcomingEventOccurrencesResponse, OpsOccurrenceAttendeesResponse, OpsValidateEventTicketRequest, OpsValidateEventTicketResponse, OpsEventAttendeeCheckinUpdate, OpsUpdateEventAttendeeCheckinRequest, OpsUpdateEventAttendeeCheckinResponse, OpsEventAttendeeDetailsResponse, OpsCancelEventAttendeeRequest, OpsCancelEventAttendeeResult, OpsCancelEventAttendeeResponse, OpsRefundEventAttendeeResponse, EventAttendeeRefundHistoryItem, ListEventAttendeeRefundsResponse, CourseEnrollmentRefundHistoryItem, ListCourseEnrollmentRefundsResponse, EventAttendeeTransferHistoryItem, ListEventAttendeeTransfersResponse, EmailTemplateType, EmailTemplate, EmailTemplateInput, EventEmailTemplateType, EventEmailTemplate, GetEventSeriesEmailTemplatesResponse, UpdateEventSeriesEmailTemplatesRequest, UpdateEventSeriesEmailTemplatesResponse, GetEmailSettingsResponse, UpdateEmailSettingsRequest, UpdateEmailSettingsResponse, SendTestEmailRequest, SendTestEmailResponse, PreviewEmailTemplateRequest, PreviewEmailTemplateResponse, AvailabilityScheduleSettings, ServiceSpecificAvailabilityScheduleSettings, ListAvailabilityRulesResponse, WeeklyAvailabilityWindowInput, SetWeeklyAvailabilityRequest, SetWeeklyAvailabilityResponse, SetWeeklyAvailabilityIssue, AppointmentBlackout, CreateBlackoutRequest, ListBlackoutsResponse, CreateBlackoutResponse, DeleteBlackoutResponse, TimeSlot, GetAvailableSlotsQuery, GetAvailableSlotsResponse, CreateAppointmentRequest, CreateAppointmentResponse, BookingQuestionFormSummary, BookingQuestionRequirementScope, BookingRequirementConfigRequest, BookingRequirementConfigResponse, BookingRequirementTargetType, BookingQuestionsRequirementConfig, BookingRequirementValidityPolicy, ConsentRequirementConfig, PublicCreateBookingAppointmentRequest, AppointmentRecord, AppointmentStatus, BookingCustomerRecord, BookingSessionUpdateMeRequest, CourseStatus, MutableCourseStatus, CourseSessionInput, CreateCourseRequest, UpdateCourseRequest, DeleteCourseResponse, DeleteCourseProgramResponse, DuplicateCourseRequest, DuplicateCourseResponse, CourseSeriesRecord, CourseRecord, CreateCourseResponse, UpdateCourseResponse, CourseEnrollmentStatus, CourseEnrollmentPaymentMethod, CourseEnrollmentPaymentStatus, CourseEnrollmentRecord, CourseEnrollmentWithCustomer, ListCourseEnrollmentsResponse, CourseParticipantMessageStatus, GetParticipantMessageRecipientsRequest, ListParticipantMessageHistoryRequest, ParticipantMessageEmailReadiness, ParticipantMessageHistoryEntry, ParticipantMessageHistoryResponse, ParticipantMessageExcludedRecipientPreview, ParticipantMessageRecipientPreview, ParticipantMessageRecipientSummary, ParticipantMessageRecipientsResponse, ParticipantMessageSendResponse, ParticipantMessageTarget, ParticipantRecipientExclusionReason, SendParticipantMessageRequest, TestParticipantMessageRequest, TestParticipantMessageResponse, AddCourseEnrollmentRequest, AddCourseEnrollmentResponse, UpdateCourseEnrollmentRequest, UpdateCourseEnrollmentResponse, BookingCustomerWithCounts, BookingCustomerListItem, CustomerAggregateCoverage, CustomerAggregateSnapshot, CustomerBookingActivitySummary, CustomerFinancialCoverage, CustomerFinancialValue, CustomerLifecycleFlagCode, CustomerLifecycleSegmentCode, CustomerLifecycleSummary, CustomerWaitlistStatus, CustomerWaitlistSummary, CustomerSortColumn, CustomerFilter, ListBookingCustomersRequest, ListBookingCustomersResponse, CreateBookingCustomerRequest, CreateBookingCustomerResponse, CustomerContactChange, CustomerContactField, CustomerProfileRectificationSourceContext, CustomerProfileRectificationSourceSurface, RectifyBookingCustomerProfileRequest, RectifyBookingCustomerProfileResponse, BookingParticipantIdentityForRectification, ParticipantIdentityRectificationSourceContext, ParticipantIdentityRectificationSourceSurface, RectifyBookingParticipantIdentityRequest, RectifyBookingParticipantIdentityResponse, CustomerPassRecord, CustomerPassStatus, ListCustomerPassesResponse, SiteCustomerRecord, SiteCustomerPassRecord, ListSiteCustomerPassesRequest, ListSiteCustomerPassesResponse, CustomerPassRefundResult, CustomerPassRefundRecord, AdjustCustomerPassDetailsRequest, AdjustCustomerPassDetailsResponse, RefundCustomerPassRequest, RefundCustomerPassResponse, ListCustomerPassRefundsResponse, CustomerMembershipRecord, ListCustomerMembershipsResponse, CustomerMembershipStatus, SiteCustomerMembershipRecord, ListSiteCustomerMembershipsRequest, ListSiteCustomerMembershipsResponse, BookingPaymentKind, BookingPaymentStatus, BookingPaymentsView, BookingPaymentListItem, ListBookingPaymentsRequest, ListBookingPaymentsResponse, MoneyPeriodPreset, MoneyItemKind, MoneyPaymentsView, MoneyTimeSeriesGranularity, MoneyBreakdownDimension, MoneyNonCashUsageKind, MoneyReportIncompleteReason, MoneyFilterQuery, MoneyComparisonMetric, MoneyDateRange, MoneyReportSummary, MoneyTimeSeriesBucket, MoneyBreakdownRow, MoneyBreakdownSection, MoneyNonCashUsageRow, MoneyNonCashUsageSection, GetMoneyReportRequest, GetMoneyReportResponse, MoneyPaymentListItem, ListMoneyPaymentsRequest, ListMoneyPaymentsResponse, BookingActivityCategory, BookingActivityType, BookingActivityCursor, BookingActivityListItem, ListBookingActivityRequest, ListBookingActivityResponse, BookingLedgerKind, BookingLedgerDateBasis, BookingLedgerPeriodPreset, BookingLedgerCancellationMode, ExportBookingLedgerCsvRequest, DiscountCodeType, DiscountPerEmailLimit, DiscountMembershipDuration, DiscountEventScopeMode, DiscountScopeMode, ProductScopeMode, DiscountCodeRecord, DiscountCodeScopeIds, DiscountCodeDetails, AutoAppliedDiscountPreview, EventAutoApplyDiscountPreview, CreateDiscountCodeRequest, UpdateDiscountCodeRequest, ListDiscountCodesResponse, DiscountCodeResponse, DeleteDiscountCodeResponse, DiscountRedemptionStatus, DiscountRedemptionListItem, ListDiscountRedemptionsRequest, ListDiscountRedemptionsResponse, MembershipPaymentForRefund, ListCustomerMembershipPaymentsResponse, CancelCustomerMembershipAtPeriodEndResult, CustomerMembershipPaymentRefundResult, CustomerMembershipPaymentRefundRecord, RefundCustomerMembershipPaymentRequest, RefundCustomerMembershipPaymentResponse, ListCustomerMembershipPaymentRefundsResponse, CustomerAttendanceRecord, CustomerAttendancePayment, CustomerAttendanceLivePayment, CustomerAttendanceArchivedPayment, CustomerAttendancePaymentMethod, CustomerAttendancePaymentStatus, ListCustomerAttendancesRequest, ListCustomerAttendancesResponse, BookingCustomerCreditSummary, BookingCustomerCreditTransactionListItem, GetCustomerCreditResponse, AccountRevokeSessionsBody, AccountRevokeSessionsResponse, AccountUpdatePasswordBody, AccountUpdatePasswordResponse, AuthFieldKey, AuthSubmissionErrorReason, AuthSubmissionSuccess, AuthSubmissionError, AuthSubmissionResult, ReauthSubmissionResult, DomainAvailability, SiteDomainRecord, SiteDomainContactPayload, RegistrarLifecycleState, RegistrarLifecycleMutationOutcome, RegistrarLifecycleMutationOperation, RegistrarLifecycleMutationBase, RegistrarLifecycleMutationResponse, ExposedRegistrarLifecycleMutationResponse, RegistrarLifecycleResponse, RegistrarBooleanMutationRequest, RegistrarRenewalCostEstimate, RegistrarProviderName, RegistrarRenewalRiskReason, RegistrarRenewalManualReviewReason, RegistrarRenewalManualReviewReasonWithoutExpiry, RegistrarRenewalManualReviewReasonWithExpiry, RegistrarRenewalFailedReason, RegistrarRenewalPosture, RegistrarAccountBalance, RegistrarRenewalPostureResponse, LookupSiteDomainRequest, LookupSiteDomainResponse, RegisterSiteDomainRequest, RegisterSiteDomainResponse, AddCustomDomainRequest, AddCustomDomainResponse, SetHomepageRequest, SetHomepageResponse, ContentRouteRecord, SeoOverviewResponse, SeoOverviewQuery, SeoOverviewTimePoint, SeoRangePreset, PerformanceOverviewResponse, PerformanceOverviewQuery, PerformanceRangePreset, SeoSearchPagesQuery, SeoSearchPagesResponse, SeoSearchQueriesQuery, SeoSearchQueriesResponse, SeoSearchSummary, ContentEntryRecord, ContentEntrySummary, FormSummary, ContentEntryDetail, ScheduledContentEntryOrPageResponse, BookingsEventSeriesContentEditorResponse, PublishedContentEntryPreview, PublishedContentEntryPreviewResponse, PublishedPostPreview, PublishedPostPreviewResponse, ContentEntryListStage, ContentEntryListItem, ListPublishedEntriesResponse, ContentTypeTemplateSummary, PublicContentTypeFieldMeta, PublicContentTypeMeta, ListPublishedEntriesMeta, ContentTemplateSummary, ContentTemplateBlockSummary, ContentTemplateAddonSummary, ContentAddonDefinition, ContentTemplateDetailsResponse, UpdateContentTemplateBlockRequest, ApplyContentTemplateAddonRequest, StartImpersonationRequest, StartImpersonationResponse, StopImpersonationRequest, StopImpersonationResponse, UpsertAdminRoleRequest, RevokeAdminRoleRequest, AdminRoleMutationResponse, AdminProfileRole, DTOType, MfaFactorSummary, MfaOverviewPayload, MfaOverviewResponse, MfaTotpActivateRequest, MfaTotpEnrollResponse, MfaTotpVerifyRequest, MfaTotpVerifyResponse, MfaPhoneEnrollRequest, MfaPhoneEnrollResponse, MfaPhoneChallengeRequest, MfaPhoneChallengeResponse, MfaPhoneVerifyRequest, MfaBackupCodeSummary, MfaBackupCodesOverview, MfaBackupCodesOverviewResponse, MfaBackupCodesRotateResponse, CreateAdminInviteRequest, CreateAdminInviteResponse, CreateAdminUserRequest, CreateAdminUserResponse, ListAdminInvitesResponse, RevokeAdminInviteResponse, CreateAllowedDomainRequest, CreateAllowedDomainResponse, ListAllowedDomainsResponse, DeleteAllowedDomainResponse, AcceptAdminInviteRequest, AcceptAdminInviteResponse, AdminInvite, AllowedEmailDomain, AdminChangePlanRequest, AdminChangePlanResponse, ChangePlanRequest, ChangePlanResponse, BillingPriceOverride, AdminGetPriceOverrideQuery, AdminGetPriceOverrideResponse, AdminUpsertPriceOverrideRequest, AdminUpsertPriceOverrideResponse, AdminDeletePriceOverrideRequest, AdminDeletePriceOverrideResponse, DomainSearchResultResponse, AcceptedManagedDomainAddOnPricing, AnalyticsPreset, AnalyticsReportQuery, AnalyticsSeriesPoint, AnalyticsTopPage, AnalyticsReferrer, AnalyticsTotals, AnalyticsReportResponse, RegisterDomainRequestPayload, RegisterDomainResponse, DomainConfigResult, OperationalStaffSurfaces, SiteRole, StaffOperationalCapability, SiteMember, SiteMemberProfile, SiteInvitation, SiteAccessSummary, SitePlanSummaryResponse, ListSiteMembersResponse, InviteSiteMemberRequest, InviteSiteMemberResponse, UpdateSiteMemberRoleRequest, UpdateSiteMemberRoleResponse, RemoveSiteMemberResponse, RevokeSiteInvitationResponse, ResendSiteInvitationResponse, TransferSiteOwnershipRequest, TransferSiteOwnershipResponse, AcceptSiteInvitationRequest, AcceptSiteInvitationResponse, DevToolsImpersonationResponse, DevToolsSeedResponse, DowngradeRole, RoleDowngradeActualRole, SiteRoleDowngradeState, DevToolsGetSiteRoleDowngradeQuery, DevToolsSetSiteRoleDowngradeRequest, SitePagePayload, SiteBySlugResponse, BlockWithContentResponse, ContentDataResponse, BackupAccessImportResult, BackupImportResponse, PreviewKeyRecord, ApiKeyAccessLogRecord, ListSiteApiKeysResponse, CreateSiteApiKeyRequest, CreateSiteApiKeyResponse, RevokeSiteApiKeyResponse, GetSitePreviewKeyResponse, CreateSitePreviewKeyResponse, GetSiteApiKeyAccessLogsResponse, ApiKeyAccessLogsPagination, ManagementKeyRecord, ListManagementKeysResponse, CreateManagementKeyRequest, CreateManagementKeyResponse, RevokeManagementKeyRequest, RevokeManagementKeyResponse, EventPreset, EventOnlineDetails, EventOnlineDetailsInput, StaffAssignmentMode, EventSeriesRecord, CreateEventSeriesRequest, UpdateEventSeriesRequest, EventAttendeeRecord, BookingBeforeYouComeDeliveryIssue, BookingBeforeYouComeReadiness, BookingEventSeriesAttendeeGuest, BookingEventSeriesAttendee, BookingPaymentIssueReason, BookingPaymentAttentionSummary, EventOccurrenceRecord, EventOccurrenceOverrides, EventOccurrenceStatus, EventOccurrenceDeletionEligibility, EventOccurrenceListRecord, UpdateOccurrenceRequest, VenueRecord, VenueLocation, CreateVenueRequest, UpdateVenueRequest, DeleteVenueResponse, GeocodeVenueRequest, GeocodeVenueResponse, AiPlaygroundApplyRequest, AiPlaygroundApplyResponse, BillingStatusResponse, BillingCheckoutRequest, BillingCheckoutResponse, BillingSummaryResponse, BillingSummaryComponent, BillingSummaryComponentKind, BillingSummaryComponentSource, BillingSummaryBasePlanComponent, BillingSummarySiteComponent, BillingSummaryAddOnComponent, SiteBillingCostResponse, SitePurpose, AiBrandGuidelinesExample, SiteAiBrandGuidelinesPayload, SiteAiBrandGuidelinesResponse, SiteAiProfileEntityType, SiteAiProfileLocationMode, SiteAiProfilePayload, SiteAiProfileResponse, SiteBusinessAddressPayload, SiteBusinessAddressResponse, SiteContentSamplingStats, SiteContentSampledItem, AiBrandGuidelinesGenerationContextResponse, AiBrandGuidelinesGenerateRequest, AiBrandGuidelinesGenerateResponse, DeleteAccountRequest, DeleteAccountResponse, FontRecord, ExportBackupRequest, BackupPreviewRequest, BackupPreviewResponse, CreateBackupUploadUrlRequest, CreateBackupUploadUrlResponse, DeleteBackupUploadRequest, DeleteBackupUploadResponse, ImportBackupAsNewSiteRequest, ImportBackupAsNewSiteResponse, AdminSiteCostResponse, AdminUpdateSiteCostRequest, BulkOperationResult, SchedulePreviewRequest, SchedulePreviewResponse, AffectedOccurrence, ModifiedOccurrence, RegenerationSummary, AiGenerateSiteEntityType, AiGenerateSitePrimaryCta, AiGenerateSiteRequest, AiGenerateSiteResponse, AiSiteWizardIntakeTriageRequest, AiSiteWizardIntakeTriageResponse, AiSiteWizardTelemetryEvent, AiSiteWizardTelemetryRequest, AiSiteWizardTelemetryResponse, PublicOnboardingAttempt, PublicOnboardingAttemptPayload, PublicOnboardingLogoUploadRequest, PublicOnboardingLogoUploadResponse, PublicOnboardingLogoUploadUrlRequest, PublicOnboardingLogoUploadUrlResponse, PublicOnboardingAttemptStatus, PublicOnboardingSurfaceId, SiteGenerationScope, SiteGenerationFeatureKey, SiteWizardResumeSnapshot, SiteGenerationIntakePayload, SiteGenerationIntakeResponse, CalendarConnectionStatus, CalendarStatusResponse, DebugArtifact, DebugArtifacts, PageBlock, PageConverterOutput, PageConversionSuccess, PageConversionAttempt, PageConversionFailure, PageConversionResult, PageConvertResponse, PageConvertJobStatus, PageConvertJob, PageConvertJobEventType, PageConvertJobEvent, PageConvertJobsCreateRequest, PageConvertJobsCreateResponse, PageConvertJobsListResponse, PageConvertJobGetResponse, PageConvertJobRunResponse, PageConvertJobEventsResponse, NewsletterSettingsRecord, NewsletterSubscriberRecord, NewsletterListRecord, GetNewsletterSettingsResponse, UpdateNewsletterSettingsRequest, UpdateNewsletterSettingsResponse, ListNewsletterTagsResponse, ListNewsletterSubscribersResponse, UpsertNewsletterSubscriberRequest, UpsertNewsletterSubscriberResponse, ImportNewsletterSubscribersCsvResponse, ExportNewsletterSubscribersCsvResponse, GetNewsletterSubscriberResponse, UpdateNewsletterSubscriberRequest, UpdateNewsletterSubscriberResponse, DeleteNewsletterSubscriberResponse, AnonymizeNewsletterSubscriberResponse, ExportNewsletterSubscriberDataResponse, ListNewsletterListsResponse, CreateNewsletterListRequest, CreateNewsletterListResponse, UpdateNewsletterListRequest, UpdateNewsletterListResponse, DeleteNewsletterListResponse, ListNewsletterListMembersResponse, UpdateNewsletterListMembershipsRequest, UpdateNewsletterListMembershipsResponse, NewsletterTemplateRecord, ListNewsletterTemplatesResponse, CreateNewsletterTemplateRequest, CreateNewsletterTemplateResponse, GetNewsletterTemplateResponse, UpdateNewsletterTemplateRequest, UpdateNewsletterTemplateResponse, DeleteNewsletterTemplateResponse, PreviewNewsletterTemplateRequest, PreviewNewsletterTemplateResponse, NewsletterCampaignRecord, ListNewsletterCampaignsResponse, CreateNewsletterCampaignRequest, CreateNewsletterCampaignResponse, GetNewsletterCampaignResponse, UpdateNewsletterCampaignRequest, UpdateNewsletterCampaignResponse, DeleteNewsletterCampaignResponse, NewsletterCampaignRecipientsSummary, GetNewsletterCampaignRecipientsSummaryResponse, NewsletterCampaignStats, GetNewsletterCampaignStatsResponse, NewsletterSendJobRecord, NewsletterSendJobStatus, ListNewsletterSendJobsQuery, ListNewsletterSendJobsResponse, RetryNewsletterSendJobResponse, CancelNewsletterSendJobResponse, SiteLogActor, SiteContentActivityLogEntry, SiteFormSubmissionActivityLogEntry, SiteActivityLogEntry, ListSiteActivityLogsResponse, SiteEmailLogEntry, ListSiteEmailLogsResponse, SiteEmailEventLogEntry, ListSiteEmailEventLogsResponse, SitePublicErrorLogEntry, ListSitePublicErrorLogsResponse, } from "./types";
|
|
@@ -2,7 +2,7 @@ import type { SupabaseClient } from "@supabase/supabase-js";
|
|
|
2
2
|
import type { AuthHeaders } from "./token";
|
|
3
3
|
import type * as ApiTypes from "./types";
|
|
4
4
|
import { type CmsApiBaseUrl } from "./url";
|
|
5
|
-
import type
|
|
5
|
+
import { type ApiErrorCode, type ApiResult } from "./common/envelope";
|
|
6
6
|
export type { APICallParamsStrict, APIEndpoints, GetEndpoint, ApiAuthRequirement, ApiResponseKind, HTTPMethod, } from "./types";
|
|
7
7
|
/**
|
|
8
8
|
* Set the SDK version to be included in API request headers
|
|
@@ -189,6 +189,7 @@ export type RichTextFieldValidationPlan = PlanBase<"richText", "object", ObjectC
|
|
|
189
189
|
}>;
|
|
190
190
|
export type MediaFieldValidationPlan = PlanBase<"media", "object", ObjectConstraint> & Readonly<{
|
|
191
191
|
fieldType: "media" | "file";
|
|
192
|
+
legacyStringType: string;
|
|
192
193
|
}>;
|
|
193
194
|
export type LinkFieldValidationPlan = PlanBase<"link", "object", ObjectConstraint> & Readonly<{
|
|
194
195
|
fieldType: "link";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { type ContentEntrySnapshot, type ContentTypeSchema, type ToolbarState } from
|
|
2
|
-
import type { EditorBlockId } from
|
|
3
|
-
import type { BlockItem } from
|
|
4
|
-
import { type ReactNode } from
|
|
5
|
-
import { type PublishOptions } from
|
|
6
|
-
import { type ApiClient } from
|
|
7
|
-
import type { DraftWorkflowStatus } from
|
|
8
|
-
import { type EditorUiState } from
|
|
9
|
-
import type { ResolveBlockManifest } from
|
|
1
|
+
import { type ContentEntrySnapshot, type ContentTypeSchema, type ToolbarState } from '../../../content-model/src/index';
|
|
2
|
+
import type { EditorBlockId } from '../../../core/src/index';
|
|
3
|
+
import type { BlockItem } from '../../../editor-blocks/src/block-editor/types';
|
|
4
|
+
import { type ReactNode } from 'react';
|
|
5
|
+
import { type PublishOptions } from '../hooks/useEntryActions';
|
|
6
|
+
import { type ApiClient } from '../services';
|
|
7
|
+
import type { DraftWorkflowStatus } from '../types';
|
|
8
|
+
import { type EditorUiState } from '../ui/editorUiStore';
|
|
9
|
+
import type { ResolveBlockManifest } from '../ui/blockValidationView';
|
|
10
10
|
export type EntryControllerBlocksSlice = {
|
|
11
11
|
list: BlockItem[];
|
|
12
|
-
status:
|
|
12
|
+
status: 'idle' | 'loading' | 'error';
|
|
13
13
|
actions: {
|
|
14
14
|
setList: (next: BlockItem[]) => void;
|
|
15
15
|
};
|
|
@@ -75,7 +75,7 @@ type BaseInternalProps = {
|
|
|
75
75
|
entityLabel?: string | null;
|
|
76
76
|
initialEntry?: ContentEntrySnapshot | null;
|
|
77
77
|
/** Autosave mode (default: auto). Manual disables background autosave triggers. */
|
|
78
|
-
saveMode?:
|
|
78
|
+
saveMode?: 'auto' | 'manual';
|
|
79
79
|
/** Initial content values for content entries - used to hydrate content store */
|
|
80
80
|
initialContent?: Record<string, unknown> | null;
|
|
81
81
|
/** Published content values for content entries - used to detect unpublished changes */
|
|
@@ -85,13 +85,13 @@ type BaseInternalProps = {
|
|
|
85
85
|
resolveBlockManifest?: ResolveBlockManifest;
|
|
86
86
|
};
|
|
87
87
|
type PageInternalProps = BaseInternalProps & {
|
|
88
|
-
kind:
|
|
89
|
-
initialStatus?:
|
|
88
|
+
kind: 'page';
|
|
89
|
+
initialStatus?: 'draft' | 'scheduled' | 'published';
|
|
90
90
|
} & {
|
|
91
91
|
initialBlocks?: BlockItem[];
|
|
92
92
|
};
|
|
93
93
|
type ContentInternalProps = BaseInternalProps & {
|
|
94
|
-
kind:
|
|
94
|
+
kind: 'content';
|
|
95
95
|
initialBlocks?: BlockItem[];
|
|
96
96
|
};
|
|
97
97
|
type EntryControllerProviderProps = PageInternalProps | ContentInternalProps;
|
|
@@ -22,7 +22,7 @@ export declare function useEntrySyncHelpers({ uiStore, setErrorMessage, }: UseEn
|
|
|
22
22
|
resetFromSnapshot: (snapshot: {
|
|
23
23
|
baseline: Record<string, unknown>;
|
|
24
24
|
values: Record<string, unknown>;
|
|
25
|
-
}
|
|
25
|
+
}) => void;
|
|
26
26
|
handleMetadataAutosaveSuccess: (nextEntry: ContentEntrySnapshot) => void;
|
|
27
27
|
markAutosaveError: (error: unknown) => string;
|
|
28
28
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { type ContentEntrySnapshot, type RoutingHelpers } from
|
|
2
|
-
import type { EditorUiStoreInstance } from
|
|
3
|
-
import type { PublishEntryResult } from
|
|
1
|
+
import { type ContentEntrySnapshot, type RoutingHelpers } from '../../../content-model/src/index';
|
|
2
|
+
import type { EditorUiStoreInstance } from '../ui/editorUiStore';
|
|
3
|
+
import type { PublishEntryResult } from '../services/contentEntryServices';
|
|
4
4
|
/** Services interface for entry operations */
|
|
5
5
|
export type EntryServices = {
|
|
6
6
|
deleteEntry: () => Promise<void>;
|
|
7
7
|
};
|
|
8
8
|
export type PublishOptions = {
|
|
9
|
-
mode?:
|
|
9
|
+
mode?: 'default' | 'now';
|
|
10
10
|
};
|
|
11
11
|
/** Definition with services */
|
|
12
12
|
export type EntryDefinition = {
|
|
@@ -15,16 +15,6 @@ export type EntryDefinition = {
|
|
|
15
15
|
buildPayload?: (values: Record<string, unknown>, entry: ContentEntrySnapshot) => unknown;
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
|
-
/**
|
|
19
|
-
* Options for resetting from snapshot.
|
|
20
|
-
*/
|
|
21
|
-
export type ResetFromSnapshotOptions = {
|
|
22
|
-
/**
|
|
23
|
-
* When true, preserves current form values after reset.
|
|
24
|
-
* Useful after publish to keep the UI showing the just-published values.
|
|
25
|
-
*/
|
|
26
|
-
keepValues?: boolean;
|
|
27
|
-
};
|
|
28
18
|
export type EntryActionsOptions<TEntry extends ContentEntrySnapshot> = {
|
|
29
19
|
/** Current entry snapshot */
|
|
30
20
|
entry: TEntry;
|
|
@@ -55,7 +45,7 @@ export type EntryActionsOptions<TEntry extends ContentEntrySnapshot> = {
|
|
|
55
45
|
resetFromSnapshot: (snapshot: {
|
|
56
46
|
baseline: Record<string, unknown>;
|
|
57
47
|
values: Record<string, unknown>;
|
|
58
|
-
}
|
|
48
|
+
}) => void;
|
|
59
49
|
/** Function to set error message */
|
|
60
50
|
setErrorMessage: (message: string | null) => void;
|
|
61
51
|
};
|
|
@@ -59,6 +59,40 @@ export type EditorValueSnapshot<TValue extends EditorValueRecord | null> = Reado
|
|
|
59
59
|
publishedBaseline: TValue;
|
|
60
60
|
syncState: EditorSyncState;
|
|
61
61
|
}>;
|
|
62
|
+
export type EditorValuePublicationState<TValue extends EditorValueRecord | null> = Readonly<{
|
|
63
|
+
kind: 'empty';
|
|
64
|
+
hasUnpublishedChanges: false;
|
|
65
|
+
}> | Readonly<{
|
|
66
|
+
kind: 'unpublished-draft';
|
|
67
|
+
current: Exclude<TValue, null>;
|
|
68
|
+
hasUnpublishedChanges: true;
|
|
69
|
+
}> | Readonly<{
|
|
70
|
+
kind: 'published-clean';
|
|
71
|
+
published: Exclude<TValue, null>;
|
|
72
|
+
hasUnpublishedChanges: false;
|
|
73
|
+
}> | Readonly<{
|
|
74
|
+
kind: 'published-missing-current';
|
|
75
|
+
published: Exclude<TValue, null>;
|
|
76
|
+
hasUnpublishedChanges: true;
|
|
77
|
+
}> | Readonly<{
|
|
78
|
+
kind: 'published-with-unpublished-changes';
|
|
79
|
+
current: Exclude<TValue, null>;
|
|
80
|
+
published: Exclude<TValue, null>;
|
|
81
|
+
hasUnpublishedChanges: true;
|
|
82
|
+
}>;
|
|
83
|
+
export declare function deriveEditorValuePublicationState<TValue extends EditorValueRecord | null>(snapshot: EditorValueSnapshot<TValue>): EditorValuePublicationState<TValue>;
|
|
84
|
+
export type EditorPublishSuccessTransition = Readonly<{
|
|
85
|
+
metadata: Readonly<{
|
|
86
|
+
baseline: EditorMetadataValues | null;
|
|
87
|
+
current: EditorMetadataValues | null;
|
|
88
|
+
published: EditorMetadataValues | null;
|
|
89
|
+
}>;
|
|
90
|
+
content: Readonly<{
|
|
91
|
+
published: EditorContentValues | null;
|
|
92
|
+
versionAtPublishStart: number;
|
|
93
|
+
}>;
|
|
94
|
+
blockPublishedBaselines: readonly BlockPublishedBaselineInput[] | null;
|
|
95
|
+
}>;
|
|
62
96
|
type EditorMetadataSnapshot = EditorValueSnapshot<EditorMetadataValues | null>;
|
|
63
97
|
type EditorContentSnapshot = EditorValueSnapshot<EditorContentValues | null>;
|
|
64
98
|
export type EditorLinkedEntryMeta = Readonly<{
|
|
@@ -150,6 +184,9 @@ export type EditorSystemOperation = {
|
|
|
150
184
|
} | {
|
|
151
185
|
type: 'set-content-published-baseline';
|
|
152
186
|
published: EditorContentValues | null;
|
|
187
|
+
} | {
|
|
188
|
+
type: 'apply-publish-success';
|
|
189
|
+
transition: EditorPublishSuccessTransition;
|
|
153
190
|
} | {
|
|
154
191
|
type: 'autosave-metadata-succeeded';
|
|
155
192
|
savedValues: EditorMetadataValues | null;
|
|
@@ -242,6 +279,7 @@ export declare function hydrateMetadataSnapshot(snapshot: EditorHistorySnapshot,
|
|
|
242
279
|
export declare function hydrateContentSnapshot(snapshot: EditorHistorySnapshot, baseline: EditorContentValues | null, current?: EditorContentValues | null, published?: EditorContentValues | null): EditorHistorySnapshot;
|
|
243
280
|
export declare function setMetadataPublishedBaseline(snapshot: EditorHistorySnapshot, published: EditorMetadataValues | null): EditorHistorySnapshot;
|
|
244
281
|
export declare function setContentPublishedBaseline(snapshot: EditorHistorySnapshot, published: EditorContentValues | null): EditorHistorySnapshot;
|
|
282
|
+
export declare function applyPublishSuccessTransition(snapshot: EditorHistorySnapshot, transition: EditorPublishSuccessTransition): EditorHistorySnapshot;
|
|
245
283
|
export declare function autosaveMetadataSucceeded(snapshot: EditorHistorySnapshot, savedValues: EditorMetadataValues | null, acknowledgedVersion: number): EditorHistorySnapshot;
|
|
246
284
|
export declare function autosaveContentSucceeded(snapshot: EditorHistorySnapshot, savedValues: EditorContentValues | null, acknowledgedVersion: number): EditorHistorySnapshot;
|
|
247
285
|
export declare function autosaveMetadataFailed(snapshot: EditorHistorySnapshot, message?: string): EditorHistorySnapshot;
|
|
@@ -271,4 +309,12 @@ export declare function replaceEditorBlockList(snapshot: EditorHistorySnapshot,
|
|
|
271
309
|
export declare function getDraftSnapshot(snapshot: EditorHistorySnapshot, blockId: string): EditorDraftSnapshot | null;
|
|
272
310
|
export declare function inspectDrafts(snapshot: EditorHistorySnapshot): EditorDraftSnapshot[];
|
|
273
311
|
export declare function getLinkedEntrySnapshot(snapshot: EditorHistorySnapshot, entryId: string): EditorLinkedEntrySnapshot | null;
|
|
312
|
+
export type EditorDraftUnpublishedBlockChange = Readonly<{
|
|
313
|
+
blockId: EditorBlockId;
|
|
314
|
+
kind: string;
|
|
315
|
+
reason: 'missing_published' | 'missing_current' | 'different';
|
|
316
|
+
currentContent: EditorBlockValues | null;
|
|
317
|
+
publishedContent: EditorBlockValues | null;
|
|
318
|
+
}>;
|
|
319
|
+
export declare function getFirstUnpublishedDraftChange(snapshot: EditorHistorySnapshot): EditorDraftUnpublishedBlockChange | null;
|
|
274
320
|
export declare function hasUnpublishedDraftChanges(snapshot: EditorHistorySnapshot): boolean;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { type EditorUnpublishedState } from
|
|
2
|
-
import { type AutosaveState } from
|
|
3
|
-
import { type ArrayKeysState } from
|
|
4
|
-
import { type ViewportState } from
|
|
5
|
-
import { type AiOverlaysState } from
|
|
6
|
-
import { type EditorValueSnapshot, type EditorBlockItem, type EditorBlockId, type NormalizedEditorBlockItem, type DraftBlockBaselineInput, type DraftBlockBaselineUpdateMetaInput, type DraftBlockInitMetaInput, type EditorCommand, type EditorContentValues, type EditorDraftSnapshot, type EditorEffect, type EditorHistorySnapshot, type EditorLinkedEntrySnapshot, type EditorMetadataValues, type BlockPublishedBaselineInput } from
|
|
7
|
-
import { type HistoryState } from
|
|
8
|
-
import type { FocusRequest } from
|
|
9
|
-
import { type LinkedContentEntryId } from
|
|
10
|
-
import { type BlockDraftSaveability, type BlockDraftValidationIssue, type ResolveBlockManifest } from
|
|
11
|
-
export type { AutosaveStatusValue, AutosaveStatus, AutosaveHandle, AutosaveType, AutosaveType as AutosaveSchedulerKey, FocusRequest, ViewportMode, ViewportWidth, ZoomLevel, } from
|
|
12
|
-
export type { AutosaveState } from
|
|
13
|
-
export type { ArrayKeysState } from
|
|
14
|
-
export type { ViewportState } from
|
|
15
|
-
export type { EditorCommand, EditorBlockItem, EditorDraftSnapshot, EditorHistorySnapshot, EditorEffect, EditorLinkedEntrySnapshot, } from
|
|
1
|
+
import { type EditorUnpublishedState } from '../controller/deriveEditorUnpublishedState';
|
|
2
|
+
import { type AutosaveState } from './stores/autosaveStore';
|
|
3
|
+
import { type ArrayKeysState } from './stores/arrayKeysStore';
|
|
4
|
+
import { type ViewportState } from './stores/viewportStore';
|
|
5
|
+
import { type AiOverlaysState } from './stores/aiOverlaysSlice';
|
|
6
|
+
import { type EditorValueSnapshot, type EditorBlockItem, type EditorBlockId, type NormalizedEditorBlockItem, type DraftBlockBaselineInput, type DraftBlockBaselineUpdateMetaInput, type DraftBlockInitMetaInput, type EditorCommand, type EditorContentValues, type EditorDraftSnapshot, type EditorDraftUnpublishedBlockChange, type EditorEffect, type EditorHistorySnapshot, type EditorLinkedEntrySnapshot, type EditorMetadataValues, type BlockPublishedBaselineInput } from './editorHistory';
|
|
7
|
+
import { type HistoryState } from './editorHistory';
|
|
8
|
+
import type { FocusRequest } from './stores/types';
|
|
9
|
+
import { type LinkedContentEntryId } from '../linkedEntries/domain';
|
|
10
|
+
import { type BlockDraftSaveability, type BlockDraftValidationIssue, type ResolveBlockManifest } from './blockValidationView';
|
|
11
|
+
export type { AutosaveStatusValue, AutosaveStatus, AutosaveHandle, AutosaveType, AutosaveType as AutosaveSchedulerKey, FocusRequest, ViewportMode, ViewportWidth, ZoomLevel, } from './stores/types';
|
|
12
|
+
export type { AutosaveState } from './stores/autosaveStore';
|
|
13
|
+
export type { ArrayKeysState } from './stores/arrayKeysStore';
|
|
14
|
+
export type { ViewportState } from './stores/viewportStore';
|
|
15
|
+
export type { EditorCommand, EditorBlockItem, EditorDraftSnapshot, EditorHistorySnapshot, EditorEffect, EditorLinkedEntrySnapshot, } from './editorHistory';
|
|
16
16
|
export type MetadataSnapshot = EditorValueSnapshot<EditorMetadataValues | null>;
|
|
17
17
|
export type ContentSnapshot = EditorValueSnapshot<EditorContentValues | null>;
|
|
18
|
-
export type PreviewSidebarTab =
|
|
18
|
+
export type PreviewSidebarTab = 'editor' | 'assistant';
|
|
19
19
|
export type ActivePreviewField = (Readonly<{
|
|
20
|
-
kind:
|
|
20
|
+
kind: 'block';
|
|
21
21
|
blockId: EditorBlockId;
|
|
22
22
|
fieldPath: string;
|
|
23
23
|
}> | Readonly<{
|
|
24
|
-
kind:
|
|
24
|
+
kind: 'linked-entry';
|
|
25
25
|
entryId: LinkedContentEntryId;
|
|
26
26
|
fieldPath: string;
|
|
27
27
|
}>) | null;
|
|
@@ -51,17 +51,17 @@ export type MetadataState = {
|
|
|
51
51
|
autosaveFailed: (message?: string) => void;
|
|
52
52
|
clearError: () => void;
|
|
53
53
|
};
|
|
54
|
-
export type ContentState = Omit<MetadataState,
|
|
54
|
+
export type ContentState = Omit<MetadataState, 'getSnapshot'> & {
|
|
55
55
|
getSnapshot: () => ContentSnapshot;
|
|
56
56
|
};
|
|
57
57
|
export type PreviewInspection = Readonly<{
|
|
58
|
-
kind:
|
|
58
|
+
kind: 'none';
|
|
59
59
|
}> | Readonly<{
|
|
60
|
-
kind:
|
|
60
|
+
kind: 'block-customize';
|
|
61
61
|
blockId: EditorBlockId;
|
|
62
62
|
requestId: number;
|
|
63
63
|
}> | Readonly<{
|
|
64
|
-
kind:
|
|
64
|
+
kind: 'linked-entry';
|
|
65
65
|
entryId: LinkedContentEntryId;
|
|
66
66
|
requestId: number;
|
|
67
67
|
}>;
|
|
@@ -96,13 +96,13 @@ export type LinkedEntryState = {
|
|
|
96
96
|
};
|
|
97
97
|
export type EditorPreviewInspectorStore = {
|
|
98
98
|
getState: () => {
|
|
99
|
-
drafts: Pick<DraftsState,
|
|
99
|
+
drafts: Pick<DraftsState, 'inspect'>;
|
|
100
100
|
aiOverlays?: Readonly<{
|
|
101
|
-
viewMode: AiOverlaysState[
|
|
102
|
-
overrides: AiOverlaysState[
|
|
103
|
-
structure?: AiOverlaysState[
|
|
101
|
+
viewMode: AiOverlaysState['viewMode'];
|
|
102
|
+
overrides: AiOverlaysState['overrides'];
|
|
103
|
+
structure?: AiOverlaysState['structure'];
|
|
104
104
|
}>;
|
|
105
|
-
linkedEntries: Pick<LinkedEntryState,
|
|
105
|
+
linkedEntries: Pick<LinkedEntryState, 'inspect'>;
|
|
106
106
|
};
|
|
107
107
|
};
|
|
108
108
|
export type EditorHistoryState = HistoryState<EditorHistorySnapshot>;
|
|
@@ -148,13 +148,7 @@ export type DraftsState = {
|
|
|
148
148
|
getAtPath: <T = unknown>(blockId: EditorBlockId, path: string) => T | undefined;
|
|
149
149
|
updateBlockOrder: (blockIds: EditorBlockId[]) => void;
|
|
150
150
|
hasUnpublishedBlockChanges: () => boolean;
|
|
151
|
-
getFirstUnpublishedBlockChange: () =>
|
|
152
|
-
blockId: EditorBlockId;
|
|
153
|
-
kind: string;
|
|
154
|
-
reason: "missing_published" | "missing_current" | "different";
|
|
155
|
-
currentContent: Record<string, unknown> | null;
|
|
156
|
-
publishedContent: Record<string, unknown> | null;
|
|
157
|
-
} | null;
|
|
151
|
+
getFirstUnpublishedBlockChange: () => EditorDraftUnpublishedBlockChange | null;
|
|
158
152
|
markAllBlocksAsPublished: () => void;
|
|
159
153
|
onChange: (listener: (blockId: EditorBlockId) => void) => () => void;
|
|
160
154
|
};
|
|
@@ -166,6 +160,18 @@ type RestoreListener = (transition: {
|
|
|
166
160
|
next: EditorHistorySnapshot;
|
|
167
161
|
effects: readonly EditorEffect[];
|
|
168
162
|
}) => void;
|
|
163
|
+
export type ApplyPublishSuccessTransitionInput = Readonly<{
|
|
164
|
+
metadata: Readonly<{
|
|
165
|
+
baseline: Record<string, unknown> | null;
|
|
166
|
+
current: Record<string, unknown> | null;
|
|
167
|
+
published: Record<string, unknown> | null;
|
|
168
|
+
}>;
|
|
169
|
+
content: Readonly<{
|
|
170
|
+
published: Record<string, unknown> | null;
|
|
171
|
+
versionAtPublishStart: number;
|
|
172
|
+
}>;
|
|
173
|
+
blockPublishedBaselines: readonly BlockPublishedBaselineInput[] | null;
|
|
174
|
+
}>;
|
|
169
175
|
export type EditorUiState = {
|
|
170
176
|
drawerOpen: boolean;
|
|
171
177
|
previewSidebarTab: PreviewSidebarTab;
|
|
@@ -179,12 +185,13 @@ export type EditorUiState = {
|
|
|
179
185
|
inspectLinkedEntry: (entryId: string) => void;
|
|
180
186
|
clearPreviewInspection: () => void;
|
|
181
187
|
setActivePreviewField: (field: ActivePreviewField) => void;
|
|
182
|
-
requestFocus: (payload: Omit<NonNullable<FocusRequest>,
|
|
188
|
+
requestFocus: (payload: Omit<NonNullable<FocusRequest>, 'requestId'>) => void;
|
|
183
189
|
clearFocus: () => void;
|
|
184
190
|
setActiveBlockId: (id: EditorBlockId | null) => void;
|
|
185
|
-
getDraftSyncState: () =>
|
|
191
|
+
getDraftSyncState: () => 'baseline' | 'pending' | 'failed';
|
|
186
192
|
getUnpublishedState: () => EditorUnpublishedState;
|
|
187
193
|
hasAnyUnpublishedChanges: () => boolean;
|
|
194
|
+
applyPublishSuccessTransition: (transition: ApplyPublishSuccessTransitionInput) => void;
|
|
188
195
|
history: {
|
|
189
196
|
getState: () => EditorHistoryState;
|
|
190
197
|
canUndo: () => boolean;
|
|
@@ -13,7 +13,35 @@ export type FinalizableFileUploadSessionRecord = Omit<FileUploadSessionRecord, '
|
|
|
13
13
|
export type FinalizedFileUploadSessionRecord = Omit<FileUploadSessionRecord, 'state'> & {
|
|
14
14
|
readonly state: FinalizedUploadSessionState;
|
|
15
15
|
};
|
|
16
|
-
export type FileUploadFinalizationError =
|
|
16
|
+
export type FileUploadFinalizationError = {
|
|
17
|
+
readonly tag: 'checksum-mismatch';
|
|
18
|
+
} | {
|
|
19
|
+
readonly tag: 'checksum-missing';
|
|
20
|
+
} | {
|
|
21
|
+
readonly tag: 'declared-detected-mime-mismatch';
|
|
22
|
+
readonly declaredMimeType: DeclaredMimeType;
|
|
23
|
+
readonly detectedMimeType: DetectedMimeType;
|
|
24
|
+
readonly declaredKind: FileKind;
|
|
25
|
+
readonly detectedKind: FileKind;
|
|
26
|
+
} | {
|
|
27
|
+
readonly tag: 'file-too-large';
|
|
28
|
+
} | {
|
|
29
|
+
readonly tag: 'kind-not-allowed';
|
|
30
|
+
} | {
|
|
31
|
+
readonly tag: 'policy-intent-mismatch';
|
|
32
|
+
} | {
|
|
33
|
+
readonly tag: 'storage-bucket-mismatch';
|
|
34
|
+
} | {
|
|
35
|
+
readonly tag: 'storage-path-mismatch';
|
|
36
|
+
} | {
|
|
37
|
+
readonly tag: 'upload-session-expired';
|
|
38
|
+
} | {
|
|
39
|
+
readonly tag: 'upload-session-not-finalizable';
|
|
40
|
+
} | {
|
|
41
|
+
readonly tag: 'unsupported-declared-mime-type';
|
|
42
|
+
} | {
|
|
43
|
+
readonly tag: 'unsupported-detected-mime-type';
|
|
44
|
+
};
|
|
17
45
|
export type FileUploadFinalizationInput = {
|
|
18
46
|
readonly uploadSession: FileUploadSessionRecord;
|
|
19
47
|
readonly requestedStorageBucket: StorageBucketName;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type LegacyStringMediaFieldConfig = Readonly<{
|
|
2
|
+
type: 'media' | 'file';
|
|
3
|
+
mediaKinds?: readonly string[] | null;
|
|
4
|
+
fileKinds?: readonly string[] | null;
|
|
5
|
+
}>;
|
|
6
|
+
export type LegacyStringMediaValue = Readonly<{
|
|
7
|
+
type: string;
|
|
8
|
+
src: string;
|
|
9
|
+
}>;
|
|
10
|
+
export declare function legacyStringMediaTypeForField(field: LegacyStringMediaFieldConfig): string;
|
|
11
|
+
export declare function normalizeLegacyStringMediaValueForField(value: unknown, field: LegacyStringMediaFieldConfig): unknown;
|
|
@@ -34,6 +34,7 @@ export type UseApiMediaUploaderOptions = {
|
|
|
34
34
|
videoPrepIntent?: VideoPrepIntentResolver;
|
|
35
35
|
loadVideoPrep?: BrowserVideoPrepLoader;
|
|
36
36
|
onClassification?: ClassificationHook;
|
|
37
|
+
onUploadError?: (error: MediaUploaderError, file: File) => void;
|
|
37
38
|
logger?: LoggerLike;
|
|
38
39
|
};
|
|
39
|
-
export declare const useApiMediaUploader: ({ siteId, apiClient, autoClassify, uploadIntent, videoPrepIntent, loadVideoPrep, onClassification, logger: providedLogger, }: UseApiMediaUploaderOptions) => (file: File, onProgress?: UploadProgressHandler) => Promise<MediaAssetWithLabels>;
|
|
40
|
+
export declare const useApiMediaUploader: ({ siteId, apiClient, autoClassify, uploadIntent, videoPrepIntent, loadVideoPrep, onClassification, onUploadError, logger: providedLogger, }: UseApiMediaUploaderOptions) => (file: File, onProgress?: UploadProgressHandler) => Promise<MediaAssetWithLabels>;
|