@riverbankcms/sdk 0.96.0 → 0.99.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/README.md +20 -1
- package/dist/{PreviewEditorSidebar-46VT4QVU.mjs → PreviewEditorSidebar-TPOKCCKY.mjs} +3 -3
- package/dist/{PreviewEditorUI-JD75GE5F.mjs → PreviewEditorUI-Y347GLC2.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-OGTXRQ4M.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +36 -36
- package/dist/_dts/api/src/billing.d.ts +2 -0
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +35 -1
- package/dist/_dts/api/src/bookingOperations.d.ts +246 -0
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +5 -1
- package/dist/_dts/api/src/contentRuntime.d.ts +109 -40
- package/dist/_dts/api/src/endpoints.d.ts +88 -0
- package/dist/_dts/api/src/index.d.ts +3 -2
- package/dist/_dts/api/src/public/endpoints.d.ts +1 -1
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +10 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +2 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +2 -1
- package/dist/_dts/api/src/siteOperations.d.ts +65 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +7 -1
- package/dist/_dts/billing/src/site-arrangements.d.ts +151 -0
- package/dist/_dts/billing/src/subscriptions/store.d.ts +2 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/resolveThumbnail.d.ts +2 -1
- package/dist/_dts/blocks/src/PageRenderer.d.ts +8 -1
- package/dist/_dts/blocks/src/bindings/types.d.ts +0 -4
- package/dist/_dts/blocks/src/client/site-chrome.d.ts +7 -0
- package/dist/_dts/blocks/src/contracts/index.d.ts +1 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +12 -12
- package/dist/_dts/blocks/src/primitives/content/primitives.d.ts +4 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/layout.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/weekly-slot-availability.d.ts +34 -0
- package/dist/_dts/blocks/src/system/componentFactory.d.ts +1 -0
- package/dist/_dts/blocks/src/system/constants/blockKinds.d.ts +1 -1
- package/dist/_dts/blocks/src/system/customize/facets.d.ts +2 -2
- package/dist/_dts/blocks/src/system/data/loaderEndpoints.d.ts +1 -1
- package/dist/_dts/blocks/src/system/data/prefetchBlockData.d.ts +4 -1
- package/dist/_dts/blocks/src/system/node/builder.d.ts +2 -0
- package/dist/_dts/blocks/src/system/node/schema.d.ts +13 -0
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/registry.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/components/booking/DatePicker.d.ts +6 -2
- package/dist/_dts/blocks/src/system/runtime/components/booking/SuccessMessage.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/components/booking/TimeSlotSelector.d.ts +10 -4
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAppointmentCheckoutVerification.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableSlots.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.state.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/usePaymentVerification.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/StepIndicator.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +8 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +133 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.client.controller.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.client.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.client.state.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.server.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.view.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +31 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/FeedbackMessage.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/{nodes/event-registration → shared/components}/SelectableOptionCard.d.ts +11 -2
- package/dist/_dts/blocks/src/system/runtime/shared/components/StepIndicator.d.ts +16 -5
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/shared/index.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.d.ts +5 -0
- package/dist/_dts/blocks/src/utils/date-formatting.d.ts +18 -2
- package/dist/_dts/content-editor/src/primitives/PreviewInlineTextEditor.d.ts +1 -1
- package/dist/_dts/content-editor/src/primitives/PreviewRichTextEditor.d.ts +1 -1
- package/dist/_dts/content-model/src/templates/defaults.d.ts +5 -5
- package/dist/_dts/content-model/src/templates/types.d.ts +2 -6
- package/dist/_dts/core/src/branded.d.ts +8 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +767 -20
- package/dist/_dts/field-primitives/src/bindings/index.d.ts +8 -0
- package/dist/_dts/sdk/src/__mocks__/next-cache.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/push/publishGuidance.d.ts +15 -0
- package/dist/_dts/sdk/src/cli/commands/push/scopes/commandBackedDatedOfferingScope.d.ts +2 -1
- package/dist/_dts/sdk/src/cli/commands/push/scopes/types.d.ts +3 -1
- package/dist/_dts/sdk/src/cli/commands/push/stale-resolution.d.ts +9 -3
- package/dist/_dts/sdk/src/cli/commands/push/workflowPlan.d.ts +34 -0
- package/dist/_dts/sdk/src/cli/commands/push.d.ts +13 -0
- package/dist/_dts/sdk/src/cli/commands/setup.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/config-loader.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/content/metadataStore.d.ts +29 -0
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +16 -14
- package/dist/_dts/sdk/src/cli/content/writer.d.ts +6 -4
- package/dist/_dts/sdk/src/cli/env-scope.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/helpers.d.ts +6 -7
- package/dist/_dts/sdk/src/cli/merge-remote/entryMergePush.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/merge-remote/entryMergeReport.d.ts +6 -18
- package/dist/_dts/sdk/src/cli/merge-remote/entrySnapshots.d.ts +2 -4
- package/dist/_dts/sdk/src/cli/merge-remote/pageMergePush.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/merge-remote/pageMergeReport.d.ts +6 -18
- package/dist/_dts/sdk/src/cli/merge-remote/pageSnapshots.d.ts +2 -4
- package/dist/_dts/sdk/src/cli/merge-remote/sharedBaseSnapshots.d.ts +32 -0
- package/dist/_dts/sdk/src/cli/merge-remote/sharedMergePlan.d.ts +27 -0
- package/dist/_dts/sdk/src/cli/merge-remote/sharedMergeReport.d.ts +63 -0
- package/dist/_dts/sdk/src/cli/push-config.d.ts +13 -2
- package/dist/_dts/sdk/src/cli/setup/setupPlan.d.ts +51 -0
- package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +21 -0
- package/dist/_dts/sdk/src/client/index.d.ts +6 -0
- package/dist/_dts/sdk/src/client/runtimeCachePolicy.d.ts +1 -1
- package/dist/_dts/sdk/src/client/types.d.ts +18 -2
- package/dist/_dts/sdk/src/config/types.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +3 -0
- package/dist/_dts/sdk/src/contracts/bindings.d.ts +3 -7
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +13 -0
- package/dist/_dts/sdk/src/data/prefetchBlockData.d.ts +6 -1
- package/dist/_dts/sdk/src/next/route-outcome-proxy.d.ts +3 -3
- package/dist/_dts/sdk/src/next/types.d.ts +19 -0
- package/dist/_dts/sdk/src/prebuild/loader.d.ts +8 -1
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +174 -78
- package/dist/_dts/sdk/src/public-api/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +4 -0
- package/dist/_dts/sdk/src/rendering/helpers/bindings.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +58 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +8 -0
- package/dist/_dts/sdk/src/rendering/hooks/usePage.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/index.d.ts +7 -7
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +18 -66
- package/dist/_dts/sdk/src/rendering/overrides.d.ts +2 -0
- package/dist/_dts/sdk/src/routing/resolveRoute.d.ts +18 -0
- package/dist/_dts/sdk/src/test/apiClient.d.ts +17 -0
- package/dist/_dts/sdk/src/test/bunDom.setup.d.ts +1 -0
- package/dist/_dts/sdk/src/test/env.d.ts +4 -0
- package/dist/_dts/sdk/src/types/block-kinds.d.ts +1 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +3 -3
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/interactive/generateBaseCSS.d.ts +6 -0
- package/dist/_dts/theme-core/src/status/contextualColors.d.ts +6 -0
- package/dist/_dts/theme-core/src/status/index.d.ts +1 -0
- package/dist/{chunk-VHIMXQ7Z.mjs → chunk-4HXF2QLH.mjs} +2 -2
- package/dist/{chunk-VTPPVAOL.mjs → chunk-EMJIT3ZJ.mjs} +1 -1
- package/dist/{chunk-4TLTV7OB.mjs → chunk-PM7HGDHM.mjs} +2 -2
- package/dist/{chunk-XMATDBXO.mjs → chunk-XO34WBBP.mjs} +2139 -1348
- package/dist/{chunk-EL55VV6Q.mjs → chunk-YGTTEVUM.mjs} +31 -10
- package/dist/{chunk-7ED5UNHL.mjs → chunk-YWTCCOSF.mjs} +117 -0
- package/dist/cli/index.mjs +2690 -1503
- package/dist/cli/init-docs/content/cli-reference.md +29 -1
- package/dist/cli/init-docs/content/getting-started.md +8 -0
- package/dist/cli/init-docs/content/workflow-agent-safe-sync.md +3 -1
- package/dist/cli/init-docs/content/workflow-preview-mode.md +6 -0
- package/dist/cli/init-docs/content/workflow-remote-setup.md +51 -0
- package/dist/client/{accordion-GUNXIIZR.mjs → accordion-QSUEYL4L.mjs} +2 -2
- package/dist/client/{bookingForm-AOU4VHP5.mjs → bookingForm-QYGAHPDP.mjs} +376 -302
- package/dist/client/bookings.mjs +795 -429
- package/dist/client/{carousel-4QSX2JPC.mjs → carousel-SM2LEWAU.mjs} +3 -3
- package/dist/client/{cart-JKN6C4ZB.mjs → cart-3N3SFKNQ.mjs} +7 -7
- package/dist/client/{checkout-YY6YMITW.mjs → checkout-YFAYPKPZ.mjs} +7 -7
- package/dist/client/{chunk-SY543WZ3.mjs → chunk-5DLGREUB.mjs} +1 -1
- package/dist/client/{chunk-A3YN7M3G.mjs → chunk-CLZ7NBSP.mjs} +147 -75
- package/dist/client/{chunk-GWCRCJLB.mjs → chunk-CYJ3MUFP.mjs} +18 -6
- package/dist/client/{chunk-JNE6UI6U.mjs → chunk-H3H3ODO7.mjs} +1 -1
- package/dist/client/{chunk-CPKMJVBD.mjs → chunk-HPEQ4YWW.mjs} +83 -109
- package/dist/client/{chunk-PCHACQEB.mjs → chunk-IIUIKJ4K.mjs} +15 -7
- package/dist/client/{chunk-TNGL2WJF.mjs → chunk-IOAHWAQG.mjs} +18 -0
- package/dist/client/{chunk-6H27K6AA.mjs → chunk-JTKBF3W2.mjs} +10 -4
- package/dist/client/{chunk-OLAOAZEO.mjs → chunk-K7KTSACR.mjs} +1 -1
- package/dist/client/{chunk-BFCJZODD.mjs → chunk-R32M5HFS.mjs} +6 -6
- package/dist/client/{chunk-VJROUYOQ.mjs → chunk-WEVT46PX.mjs} +3 -3
- package/dist/client/{chunk-H7A6PUGM.mjs → chunk-ZU65LTI3.mjs} +1 -1
- package/dist/client/client.mjs +5052 -4083
- package/dist/client/{courseRegistration-UU2KMPSQ.mjs → courseRegistration-LYBE7VVK.mjs} +7 -7
- package/dist/client/{eventCalendar-WIVNS2TM.mjs → eventCalendar-FMTB75X6.mjs} +9 -9
- package/dist/client/{eventCombined-P3G5MW4J.mjs → eventCombined-E4LUCJXT.mjs} +9 -9
- package/dist/client/{eventDetails-2VHJ2RDG.mjs → eventDetails-GELSRR4Z.mjs} +9 -9
- package/dist/client/{eventListing-TGO6JI3R.mjs → eventListing-TB623B6R.mjs} +9 -9
- package/dist/client/{eventRegistration-B46HEJES.mjs → eventRegistration-NRIKHXTI.mjs} +9 -9
- package/dist/client/{form-VKRTFUNQ.mjs → form-Y4U4IAXE.mjs} +3 -3
- package/dist/client/{headerSection-XUX4ZJLO.mjs → headerSection-QSOVV5P7.mjs} +3 -3
- package/dist/client/hooks.mjs +1776 -1355
- package/dist/client/{locationMap-NQFI5MJO.mjs → locationMap-QYCAHH7H.mjs} +3 -3
- package/dist/client/{newsletterForm-P2GETCQK.mjs → newsletterForm-NWHY5TBY.mjs} +3 -3
- package/dist/client/{productDetail-7NQ7O5IF.mjs → productDetail-FYDMU2CE.mjs} +7 -7
- package/dist/client/{productList-RX6ZJ7BL.mjs → productList-D76CGACQ.mjs} +7 -7
- package/dist/client/rendering/client.mjs +2990 -2470
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +3236 -2236
- package/dist/client/{shop-BHN5AKY6.mjs → shop-SOUACT5N.mjs} +7 -7
- package/dist/preview-next/before-render.mjs +117 -0
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/preview-next/middleware.mjs +117 -0
- package/dist/{sdk-runtime-X2LXQ5IC.mjs → sdk-runtime-XPVE3LBA.mjs} +6 -6
- package/dist/server/components.mjs +3115 -2484
- package/dist/server/config-template-validation.mjs +6 -2
- package/dist/server/config-validation.mjs +1961 -1580
- package/dist/server/config.mjs +1961 -1580
- package/dist/server/data.mjs +1762 -1352
- package/dist/server/index.mjs +266 -33
- package/dist/server/next/middleware.mjs +2 -2
- package/dist/server/next.mjs +3399 -2504
- package/dist/server/page-converter.mjs +1553 -1295
- package/dist/server/prebuild-loader.mjs +42 -23
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +3151 -2489
- package/dist/server/rendering.mjs +3363 -2555
- package/dist/server/routing.mjs +1877 -1388
- package/dist/server/server.mjs +2057 -1402
- package/dist/server/theme-bridge.mjs +597 -505
- package/dist/server/theme.mjs +5 -4
- package/dist/styles/index.css +499 -490
- package/package.json +6 -4
- package/dist/SdkPreviewModeRuntime-MJUSYUFB.mjs +0 -8
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { OutputContext } from '../output';
|
|
2
|
+
type MergeDecisionSubject<TSubject> = Readonly<{
|
|
3
|
+
kind: string;
|
|
4
|
+
subject: TSubject;
|
|
5
|
+
}>;
|
|
6
|
+
type ConflictCode<TDecision> = Extract<TDecision, {
|
|
7
|
+
kind: 'conflict';
|
|
8
|
+
}> extends {
|
|
9
|
+
conflict: {
|
|
10
|
+
code: infer TCode extends string;
|
|
11
|
+
};
|
|
12
|
+
} ? TCode : string;
|
|
13
|
+
type ReportDecisionLineKind<TDecision extends {
|
|
14
|
+
kind: string;
|
|
15
|
+
}> = Exclude<TDecision['kind'], 'auto_merge' | 'conflict' | 'unchanged'>;
|
|
16
|
+
export type RemoteMergeDecisionLabels<TDecision extends {
|
|
17
|
+
kind: string;
|
|
18
|
+
}> = {
|
|
19
|
+
readonly [TKind in ReportDecisionLineKind<TDecision>]: string;
|
|
20
|
+
};
|
|
21
|
+
export type RemoteMergeDecisionReport<TDecision extends {
|
|
22
|
+
kind: string;
|
|
23
|
+
}, TSubjectJson extends object> = Readonly<{
|
|
24
|
+
kind: TDecision['kind'];
|
|
25
|
+
} & TSubjectJson & {
|
|
26
|
+
localFieldPaths?: readonly string[];
|
|
27
|
+
remoteFieldPaths?: readonly string[];
|
|
28
|
+
conflict?: Readonly<{
|
|
29
|
+
code: ConflictCode<TDecision>;
|
|
30
|
+
fieldPath?: string;
|
|
31
|
+
message: string;
|
|
32
|
+
}>;
|
|
33
|
+
}>;
|
|
34
|
+
export type RemoteMergeJsonReport<TScope extends string, TSummary, TDecision extends {
|
|
35
|
+
kind: string;
|
|
36
|
+
}, TSubjectJson extends object> = Readonly<{
|
|
37
|
+
kind: 'push';
|
|
38
|
+
scope: TScope;
|
|
39
|
+
mergeRemote: true;
|
|
40
|
+
dryRun: boolean;
|
|
41
|
+
summary: TSummary;
|
|
42
|
+
decisions: readonly RemoteMergeDecisionReport<TDecision, TSubjectJson>[];
|
|
43
|
+
}>;
|
|
44
|
+
export type RemoteMergeReportConfig<TScope extends string, TSummary, TSubject, TSubjectJson extends object, TDecision extends MergeDecisionSubject<TSubject>> = Readonly<{
|
|
45
|
+
scope: TScope;
|
|
46
|
+
title: string;
|
|
47
|
+
summaryLines(summary: TSummary): readonly string[];
|
|
48
|
+
subjectLabel(subject: TSubject): string;
|
|
49
|
+
subjectJson(subject: TSubject): TSubjectJson;
|
|
50
|
+
decisionLabels: RemoteMergeDecisionLabels<TDecision>;
|
|
51
|
+
}>;
|
|
52
|
+
export declare function remoteMergeJsonReport<TScope extends string, TSummary, TSubject, TSubjectJson extends object, TDecision extends MergeDecisionSubject<TSubject>>(input: Readonly<{
|
|
53
|
+
config: RemoteMergeReportConfig<TScope, TSummary, TSubject, TSubjectJson, TDecision>;
|
|
54
|
+
decisions: readonly TDecision[];
|
|
55
|
+
dryRun: boolean;
|
|
56
|
+
summary: TSummary;
|
|
57
|
+
}>): RemoteMergeJsonReport<TScope, TSummary, TDecision, TSubjectJson>;
|
|
58
|
+
export declare function writeRemoteMergeHumanReport<TScope extends string, TSummary, TSubject, TSubjectJson extends object, TDecision extends MergeDecisionSubject<TSubject>>(output: Pick<OutputContext, 'info'>, config: RemoteMergeReportConfig<TScope, TSummary, TSubject, TSubjectJson, TDecision>, input: Readonly<{
|
|
59
|
+
decisions: readonly TDecision[];
|
|
60
|
+
dryRun: boolean;
|
|
61
|
+
summary: TSummary;
|
|
62
|
+
}>): void;
|
|
63
|
+
export {};
|
|
@@ -11,18 +11,29 @@ interface PushConfigOptions {
|
|
|
11
11
|
apiKey?: string;
|
|
12
12
|
dashboard: string;
|
|
13
13
|
forceContentTypes?: boolean;
|
|
14
|
+
dryRun?: boolean;
|
|
14
15
|
}
|
|
16
|
+
export type PushConfigActionResult = Readonly<{
|
|
17
|
+
success: true;
|
|
18
|
+
}> | Readonly<{
|
|
19
|
+
success: false;
|
|
20
|
+
}>;
|
|
15
21
|
type PushConfigResponse = NonNullable<APIEndpoints['pushSdkConfig']['response']>;
|
|
16
22
|
type PushConfigSync = NonNullable<PushConfigResponse['configSync']>;
|
|
17
23
|
type LegacyPushConfigSync = NonNullable<PushConfigResponse['sync']>;
|
|
18
24
|
type PushConfigDisplaySync = PushConfigSync | LegacyPushConfigSync;
|
|
19
25
|
type PushConfigSyncArea = 'contentTypes' | 'customBlocks' | 'templateBlocks' | 'settings' | 'ignoredDocuments' | 'pages' | 'entries' | 'navigationMenus';
|
|
20
|
-
type PushConfigSyncMessage = {
|
|
26
|
+
export type PushConfigSyncMessage = {
|
|
21
27
|
area: PushConfigSyncArea;
|
|
22
28
|
message: string;
|
|
23
29
|
};
|
|
24
30
|
export declare function collectPushConfigSyncErrors(sync: PushConfigDisplaySync): PushConfigSyncMessage[];
|
|
25
31
|
export declare function collectPushConfigSyncWarnings(sync: PushConfigDisplaySync): PushConfigSyncMessage[];
|
|
32
|
+
export declare function groupPushConfigSyncWarningsForHuman(warnings: readonly PushConfigSyncMessage[]): PushConfigSyncMessage[];
|
|
33
|
+
export declare function isPushConfigActionSuccess(result: PushConfigActionResult): result is Extract<PushConfigActionResult, {
|
|
34
|
+
success: true;
|
|
35
|
+
}>;
|
|
36
|
+
export declare function markFailedPushConfigCommandResult(result: PushConfigActionResult): void;
|
|
26
37
|
/**
|
|
27
38
|
* Main push-config action.
|
|
28
39
|
* Exported for reuse by `push --with-config`.
|
|
@@ -30,7 +41,7 @@ export declare function collectPushConfigSyncWarnings(sync: PushConfigDisplaySyn
|
|
|
30
41
|
export declare function pushConfigAction(output: OutputContext, options: PushConfigOptions & {
|
|
31
42
|
isRemote: boolean;
|
|
32
43
|
isJsonOutput?: boolean;
|
|
33
|
-
}): Promise<
|
|
44
|
+
}): Promise<PushConfigActionResult>;
|
|
34
45
|
/**
|
|
35
46
|
* push-config command definition
|
|
36
47
|
*/
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { EnvTarget } from '../helpers';
|
|
2
|
+
export type SetupOperation = 'create_site' | 'create_management_key' | 'grant_user_access' | 'configure_env' | 'verify_access';
|
|
3
|
+
export type SetupAuthority = 'dashboard_admin' | 'cms_repo_script' | 'sdk_management_key';
|
|
4
|
+
export type SetupPlanStep = Readonly<{
|
|
5
|
+
tag: 'admin_action';
|
|
6
|
+
operation: Exclude<SetupOperation, 'configure_env' | 'verify_access'>;
|
|
7
|
+
title: string;
|
|
8
|
+
detail: string;
|
|
9
|
+
allowedAuthorities: readonly Exclude<SetupAuthority, 'sdk_management_key'>[];
|
|
10
|
+
}> | Readonly<{
|
|
11
|
+
tag: 'local_env';
|
|
12
|
+
operation: 'configure_env';
|
|
13
|
+
title: string;
|
|
14
|
+
detail: string;
|
|
15
|
+
missingVariables: readonly string[];
|
|
16
|
+
exampleLines: readonly string[];
|
|
17
|
+
}> | Readonly<{
|
|
18
|
+
tag: 'cli_check';
|
|
19
|
+
operation: 'verify_access';
|
|
20
|
+
title: string;
|
|
21
|
+
detail: string;
|
|
22
|
+
commands: readonly string[];
|
|
23
|
+
}>;
|
|
24
|
+
export type SetupCapability = Readonly<{
|
|
25
|
+
authority: 'dashboard_admin';
|
|
26
|
+
can: readonly ('create_site' | 'create_management_key' | 'grant_user_access')[];
|
|
27
|
+
}> | Readonly<{
|
|
28
|
+
authority: 'cms_repo_script';
|
|
29
|
+
can: readonly ('create_site' | 'create_management_key' | 'grant_user_access')[];
|
|
30
|
+
requirement: string;
|
|
31
|
+
}> | Readonly<{
|
|
32
|
+
authority: 'sdk_management_key';
|
|
33
|
+
can: readonly ('verify_access')[];
|
|
34
|
+
cannot: readonly ('create_site' | 'create_management_key' | 'grant_user_access')[];
|
|
35
|
+
}>;
|
|
36
|
+
export interface SetupTargetStatus {
|
|
37
|
+
target: EnvTarget;
|
|
38
|
+
siteId: string | null;
|
|
39
|
+
dashboardUrl: string | null;
|
|
40
|
+
managementApiKeySet: boolean;
|
|
41
|
+
}
|
|
42
|
+
export interface SdkSetupPlan {
|
|
43
|
+
target: EnvTarget;
|
|
44
|
+
configured: boolean;
|
|
45
|
+
canMutatePrivilegedResources: false;
|
|
46
|
+
capabilities: readonly SetupCapability[];
|
|
47
|
+
steps: readonly SetupPlanStep[];
|
|
48
|
+
securityNotes: readonly string[];
|
|
49
|
+
}
|
|
50
|
+
export declare function planSdkSetup(status: SetupTargetStatus): SdkSetupPlan;
|
|
51
|
+
export declare function formatSdkSetupPlan(plan: SdkSetupPlan): string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type Result, type SiteId } from '../../../../core/src/index';
|
|
2
2
|
import { type DryRunReport, type SiteCommandBatch, type SiteCommandExecutionSuccess, type SiteCommandOf, type SiteCommandPlanFor, type SiteCommandRef, type SiteCommandType, type SiteCommandValidationError } from '../../../../site-commands/src/index';
|
|
3
|
+
import { type ManagementApiErrorRequest } from '../../client/management';
|
|
3
4
|
import type { EnvTarget } from '../helpers';
|
|
4
5
|
export type CliCommandBatchRefInput<TSource extends string = string> = Readonly<{
|
|
5
6
|
source: TSource;
|
|
@@ -11,6 +12,22 @@ export type CliCommandExecutionError<TCommandType extends SiteCommandType> = Rea
|
|
|
11
12
|
commandRef: SiteCommandRef;
|
|
12
13
|
commandType: TCommandType;
|
|
13
14
|
message: string;
|
|
15
|
+
detail?: CliCommandFailureDetail;
|
|
16
|
+
}>;
|
|
17
|
+
export type CliCommandFailureFieldError = Readonly<{
|
|
18
|
+
field: string;
|
|
19
|
+
message: string;
|
|
20
|
+
code?: string;
|
|
21
|
+
}>;
|
|
22
|
+
export type CliCommandFailureDetail = Readonly<{
|
|
23
|
+
tag: 'management_api';
|
|
24
|
+
code: string;
|
|
25
|
+
statusCode?: number;
|
|
26
|
+
request?: ManagementApiErrorRequest;
|
|
27
|
+
fieldErrors: readonly CliCommandFailureFieldError[];
|
|
28
|
+
details?: unknown;
|
|
29
|
+
}> | Readonly<{
|
|
30
|
+
tag: 'unknown';
|
|
14
31
|
}>;
|
|
15
32
|
export type CliCommandExecutionResult<TCommandType extends SiteCommandType> = Readonly<{
|
|
16
33
|
status: 'applied';
|
|
@@ -43,6 +60,7 @@ export type CliCommandReportedPlannedCommand<TCommand extends Readonly<{
|
|
|
43
60
|
export type CliCommandExecutionReportFailure<TSubject> = Readonly<{
|
|
44
61
|
identifier: string;
|
|
45
62
|
message: string;
|
|
63
|
+
detail?: CliCommandFailureDetail;
|
|
46
64
|
subject?: TSubject;
|
|
47
65
|
}>;
|
|
48
66
|
export type CliCommandOutcome<TSubject> = Readonly<{
|
|
@@ -56,6 +74,7 @@ export type CliCommandOutcome<TSubject> = Readonly<{
|
|
|
56
74
|
commandType: SiteCommandType;
|
|
57
75
|
identifier: string;
|
|
58
76
|
message: string;
|
|
77
|
+
detail?: CliCommandFailureDetail;
|
|
59
78
|
subject?: TSubject;
|
|
60
79
|
}> | Readonly<{
|
|
61
80
|
status: 'skipped_by_stop_policy';
|
|
@@ -97,6 +116,7 @@ export declare function createCliCommandBatchRef(input: CliCommandBatchRefInput)
|
|
|
97
116
|
export declare function formatSiteCommandValidationErrors(errors: readonly {
|
|
98
117
|
message: string;
|
|
99
118
|
}[]): string;
|
|
119
|
+
export declare function managementErrorDetail(error: unknown): CliCommandFailureDetail;
|
|
100
120
|
export declare function formatManagementError(error: unknown): string;
|
|
101
121
|
export declare function planCliCommandBatchForTypes<TCommandType extends SiteCommandType>(input: CliCommandBatchRefInput & Readonly<{
|
|
102
122
|
commands: readonly SiteCommandOf<TCommandType>[];
|
|
@@ -126,6 +146,7 @@ export declare function commandExecutionToReport<TCommand extends Readonly<{
|
|
|
126
146
|
export declare function commandCompileFailureToReport<TSubject>(input: Readonly<{
|
|
127
147
|
identifier: string;
|
|
128
148
|
message: string;
|
|
149
|
+
detail?: CliCommandFailureDetail;
|
|
129
150
|
subject?: TSubject;
|
|
130
151
|
warnings?: readonly string[];
|
|
131
152
|
}>): CliCommandExecutionReport<TSubject>;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { createBearerAPIClient, createInternalAPIClient } from '../../../api/src/public/index';
|
|
1
2
|
import type { RiverbankClient, RiverbankClientConfig } from './types';
|
|
3
|
+
export type RiverbankClientDeps = Readonly<{
|
|
4
|
+
createBearerAPIClient: typeof createBearerAPIClient;
|
|
5
|
+
createInternalAPIClient: typeof createInternalAPIClient;
|
|
6
|
+
}>;
|
|
2
7
|
/**
|
|
3
8
|
* Create a Riverbank CMS client for fetching content
|
|
4
9
|
*
|
|
@@ -13,6 +18,7 @@ import type { RiverbankClient, RiverbankClientConfig } from './types';
|
|
|
13
18
|
* ```
|
|
14
19
|
*/
|
|
15
20
|
export declare function createRiverbankClient(config: RiverbankClientConfig): RiverbankClient;
|
|
21
|
+
export declare function createRiverbankClientWithDeps(deps: RiverbankClientDeps, config: RiverbankClientConfig): RiverbankClient;
|
|
16
22
|
export type { ApiKeyType, GetPageParams, GetSiteParams, ResilienceConfig, ResilienceStatus, ResilientData, RiverbankClient, RiverbankClientConfig, SdkAuthConfig, } from './types';
|
|
17
23
|
export { getResilienceStatusFromError, RiverbankApiError } from './error';
|
|
18
24
|
export { CircuitOpenError } from './resilience';
|
|
@@ -34,7 +34,7 @@ export type ResolveRuntimeCachePolicyInput = Readonly<{
|
|
|
34
34
|
}>;
|
|
35
35
|
export declare function resolveRuntimeCachePolicy(input: ResolveRuntimeCachePolicyInput): RuntimeCachePolicy;
|
|
36
36
|
export type GetSiteRuntimeCacheParams = Readonly<Pick<GetSiteParams, 'id' | 'slug' | 'domain' | 'currentPath' | 'force'>>;
|
|
37
|
-
export type GetContentByPathRuntimeCacheParams = Readonly<Pick<GetPageParams, 'siteId' | 'path' | 'preview'>>;
|
|
37
|
+
export type GetContentByPathRuntimeCacheParams = Readonly<Pick<GetPageParams, 'siteId' | 'path' | 'preview' | 'contentContract'>>;
|
|
38
38
|
type KeyDeriverInputByEndpoint = Readonly<{
|
|
39
39
|
getSite: GetSiteRuntimeCacheParams;
|
|
40
40
|
getContentByPath: GetContentByPathRuntimeCacheParams;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { CheckRedirectResponse, EntriesResponse, EntryResponse, PageResponse, PublicBookingServicesResponse, PublicCoursesResponse, PublicFormResponse, PublicFormsResponse, PublicProductsResponse, PublicTeamMembersResponse, PublicMembershipsResponse, PublicPassesResponse, PublicEventDetailsResponse, PublicEventsResponse, ResolveEntrySubrouteResponse, ResolveEventOccurrenceResponse, RouteOutcomeResponse, RoutableContentResponse, SiteResponse, SitemapRoutesResponse, PublicProductCategorySelector } from '../public-api/contracts';
|
|
1
|
+
import type { CheckRedirectResponse, EntriesResponse, EntryResponse, PageResponse, PublicBookingServicesResponse, PublicWeeklySlotAvailabilityResponse, PublicCoursesResponse, PublicFormResponse, PublicFormsResponse, PublicProductsResponse, PublicTeamMembersResponse, PublicMembershipsResponse, PublicPassesResponse, PublicEventDetailsResponse, PublicEventsResponse, ResolveEntrySubrouteResponse, ResolveEventOccurrenceResponse, RouteDecisionResponse, RouteOutcomeResponse, RoutableContentResponse, SiteResponse, SitemapRoutesResponse, PublicProductCategorySelector } from '../public-api/contracts';
|
|
2
2
|
import type { PublishedRuntimeCacheAdapter, PublishedRuntimeCacheAdapterErrorKind } from './runtimeCachePolicy';
|
|
3
|
-
export type { CheckRedirectResponse, EntriesResponse, EntryResponse, PageResponse, PublicBookingServicesResponse, PublicCoursesResponse, PublicEventsResponse, PublicFormResponse, PublicFormsResponse, PublicProductsResponse, PublicTeamMembersResponse, PublicMembershipsResponse, PublicPassesResponse, PublicEventDetailsResponse, ResolveEntrySubrouteResponse, ResolveEventOccurrenceResponse, RouteOutcomeResponse, RoutableContentResponse, SiteResponse, SitemapRoutesResponse, } from '../public-api/contracts';
|
|
3
|
+
export type { CheckRedirectResponse, EntriesResponse, EntryResponse, PageResponse, PublicBookingServicesResponse, PublicWeeklySlotAvailabilityResponse, PublicCoursesResponse, PublicEventsResponse, PublicFormResponse, PublicFormsResponse, PublicProductsResponse, PublicTeamMembersResponse, PublicMembershipsResponse, PublicPassesResponse, PublicEventDetailsResponse, ResolveEntrySubrouteResponse, ResolveEventOccurrenceResponse, RouteDecisionResponse, RouteOutcomeResponse, RoutableContentResponse, SiteResponse, SitemapRoutesResponse, } from '../public-api/contracts';
|
|
4
4
|
/**
|
|
5
5
|
* Pagination metadata returned when `includeMeta: true`
|
|
6
6
|
*/
|
|
@@ -48,6 +48,7 @@ export type GetPageParams = {
|
|
|
48
48
|
siteId: string;
|
|
49
49
|
path: string;
|
|
50
50
|
preview?: boolean;
|
|
51
|
+
contentContract?: 'compat' | 'native';
|
|
51
52
|
} & SdkMethodOptions;
|
|
52
53
|
/**
|
|
53
54
|
* Base parameters for getEntries - shared across all overloads
|
|
@@ -456,6 +457,16 @@ export interface RiverbankClient {
|
|
|
456
457
|
siteId: string;
|
|
457
458
|
ids?: string;
|
|
458
459
|
} & SdkMethodOptions): Promise<PublicBookingServicesResponse>;
|
|
460
|
+
/**
|
|
461
|
+
* Fetch public weekly appointment slot availability for a service.
|
|
462
|
+
*/
|
|
463
|
+
getPublicWeeklySlotAvailability(params: {
|
|
464
|
+
siteId: string;
|
|
465
|
+
serviceId: string;
|
|
466
|
+
resourceId?: string;
|
|
467
|
+
horizonWeeks?: number;
|
|
468
|
+
timezone?: string;
|
|
469
|
+
} & SdkMethodOptions): Promise<PublicWeeklySlotAvailabilityResponse>;
|
|
459
470
|
/**
|
|
460
471
|
* List public events for a site (optionally time-filtered)
|
|
461
472
|
*/
|
|
@@ -609,6 +620,11 @@ export interface RiverbankClient {
|
|
|
609
620
|
path: string;
|
|
610
621
|
preview?: boolean;
|
|
611
622
|
} & SdkMethodOptions): Promise<RouteOutcomeResponse>;
|
|
623
|
+
resolveRouteDecision(params: {
|
|
624
|
+
siteId: string;
|
|
625
|
+
path: string;
|
|
626
|
+
preview?: boolean;
|
|
627
|
+
} & SdkMethodOptions): Promise<RouteDecisionResponse>;
|
|
612
628
|
/**
|
|
613
629
|
* Get all published routes for a site.
|
|
614
630
|
* Useful for static site generation (SSG) to enumerate all pages.
|
|
@@ -45,7 +45,7 @@ export type BlockCategory = 'marketing' | 'content' | 'blog' | 'media' | 'layout
|
|
|
45
45
|
*
|
|
46
46
|
* Re-exported from `@riverbankcms/blocks` (single source of truth).
|
|
47
47
|
*/
|
|
48
|
-
export declare const SUPPORTED_LOADER_ENDPOINTS: readonly ["listPublishedEntries", "getPublishedEntryPreview", "listPublicEvents", "getPublicEventDetails", "listPublicCourses", "listPublicRouteCandidates", "listPublicTeamMembers", "listPublicProducts", "listPublicPasses", "listPublicMemberships", "getPublicFormById", "getPublicBookingServices"];
|
|
48
|
+
export declare const SUPPORTED_LOADER_ENDPOINTS: readonly ["listPublishedEntries", "getPublishedEntryPreview", "listPublicEvents", "getPublicEventDetails", "listPublicCourses", "listPublicRouteCandidates", "listPublicTeamMembers", "listPublicProducts", "listPublicPasses", "listPublicMemberships", "getPublicFormById", "getPublicBookingServices", "getPublicWeeklySlotAvailability"];
|
|
49
49
|
export type SdkLoaderEndpoint = (typeof SUPPORTED_LOADER_ENDPOINTS)[number];
|
|
50
50
|
export type LoaderParamBinding = {
|
|
51
51
|
$bind: {
|
|
@@ -135,6 +135,7 @@ export declare const siteStyleConfigSchema: z.ZodOptional<z.ZodObject<{
|
|
|
135
135
|
export declare const sdkLoaderEndpointSchema: z.ZodEnum<{
|
|
136
136
|
getPublicFormById: "getPublicFormById";
|
|
137
137
|
getPublicBookingServices: "getPublicBookingServices";
|
|
138
|
+
getPublicWeeklySlotAvailability: "getPublicWeeklySlotAvailability";
|
|
138
139
|
listPublicEvents: "listPublicEvents";
|
|
139
140
|
listPublicPasses: "listPublicPasses";
|
|
140
141
|
listPublicCourses: "listPublicCourses";
|
|
@@ -223,6 +224,7 @@ export declare const sdkConfigLoaderSchema: z.ZodObject<{
|
|
|
223
224
|
endpoint: z.ZodEnum<{
|
|
224
225
|
getPublicFormById: "getPublicFormById";
|
|
225
226
|
getPublicBookingServices: "getPublicBookingServices";
|
|
227
|
+
getPublicWeeklySlotAvailability: "getPublicWeeklySlotAvailability";
|
|
226
228
|
listPublicEvents: "listPublicEvents";
|
|
227
229
|
listPublicPasses: "listPublicPasses";
|
|
228
230
|
listPublicCourses: "listPublicCourses";
|
|
@@ -287,6 +289,7 @@ export declare const sdkDataLoadersSchema: z.ZodOptional<z.ZodRecord<z.ZodString
|
|
|
287
289
|
endpoint: z.ZodEnum<{
|
|
288
290
|
getPublicFormById: "getPublicFormById";
|
|
289
291
|
getPublicBookingServices: "getPublicBookingServices";
|
|
292
|
+
getPublicWeeklySlotAvailability: "getPublicWeeklySlotAvailability";
|
|
290
293
|
listPublicEvents: "listPublicEvents";
|
|
291
294
|
listPublicPasses: "listPublicPasses";
|
|
292
295
|
listPublicCourses: "listPublicCourses";
|
|
@@ -6,20 +6,16 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Runtime implementations are delegated to `@riverbankcms/blocks/bindings`.
|
|
8
8
|
*/
|
|
9
|
+
import { type BindingTransformName as SharedBindingTransformName } from '../../../field-primitives/src/bindings/index';
|
|
9
10
|
export type BindingSource = 'field' | 'meta' | 'literal' | 'transform' | 'fallback';
|
|
10
|
-
/**
|
|
11
|
-
* Keep in sync with:
|
|
12
|
-
* - @riverbankcms/blocks `TRANSFORMS`
|
|
13
|
-
* - @riverbankcms/content-model `TEMPLATE_BINDING_TRANSFORMS`
|
|
14
|
-
*/
|
|
15
11
|
export declare const BINDING_TRANSFORMS: {
|
|
16
12
|
readonly RICHTEXT_FIRST_PARAGRAPH: "richtext.firstParagraph";
|
|
17
13
|
readonly DATE_FORMAT_SHORT: "date.formatShort";
|
|
18
14
|
readonly DATE_FORMAT_LONG: "date.formatLong";
|
|
19
15
|
readonly TEXT_INLINE_TEXT: "text.inlineText";
|
|
20
16
|
};
|
|
21
|
-
export type BindingTransformName =
|
|
22
|
-
export declare const BINDING_TRANSFORM_VALUES: [
|
|
17
|
+
export type BindingTransformName = SharedBindingTransformName;
|
|
18
|
+
export declare const BINDING_TRANSFORM_VALUES: [SharedBindingTransformName, ...SharedBindingTransformName[]];
|
|
23
19
|
export declare const BINDING_TRANSFORM_LIST: string;
|
|
24
20
|
export declare function describeInvalidBindingTransform(transform: string): string;
|
|
25
21
|
export type BindingDescriptor = {
|
|
@@ -642,6 +642,18 @@ export type AppointmentBookingContent = {
|
|
|
642
642
|
description?: unknown;
|
|
643
643
|
_sectionStyles?: SectionStylesContent;
|
|
644
644
|
};
|
|
645
|
+
export type WeeklySlotAvailabilityContent = {
|
|
646
|
+
serviceId: string;
|
|
647
|
+
resourceId?: string | null;
|
|
648
|
+
horizonWeeks?: string | null;
|
|
649
|
+
timezone?: string | null;
|
|
650
|
+
heading?: string | null;
|
|
651
|
+
description?: unknown;
|
|
652
|
+
emptyMessage?: string | null;
|
|
653
|
+
ctaText?: string | null;
|
|
654
|
+
ctaUrl?: string | null;
|
|
655
|
+
_sectionStyles?: SectionStylesContent;
|
|
656
|
+
};
|
|
645
657
|
export type BlogPostContent = {
|
|
646
658
|
title?: string | null;
|
|
647
659
|
postSlug?: string | null;
|
|
@@ -708,6 +720,7 @@ export type SystemBlockContentByFullKind = {
|
|
|
708
720
|
'block.form': FormBlockContent;
|
|
709
721
|
'block.contact-newsletter': ContactNewsletterContent;
|
|
710
722
|
'block.appointment-booking': AppointmentBookingContent;
|
|
723
|
+
'block.weekly-slot-availability': WeeklySlotAvailabilityContent;
|
|
711
724
|
'block.event-registration': EventRegistrationContent;
|
|
712
725
|
'block.event-details': EventDetailsContent;
|
|
713
726
|
'block.course-registration': CourseRegistrationContent;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { PageOutline } from '../contracts';
|
|
6
6
|
import type { SdkCustomBlock } from '../config/types';
|
|
7
|
-
import { SUPPORTED_LOADER_ENDPOINTS, type SupportedLoaderEndpoint } from '../../../blocks/src/system/data/index';
|
|
7
|
+
import { prefetchBlockData as prefetchBlockDataCore, normalizeLoaderParams, SUPPORTED_LOADER_ENDPOINTS, type SupportedLoaderEndpoint } from '../../../blocks/src/system/data/index';
|
|
8
8
|
import type { RiverbankClient } from '../client/types';
|
|
9
9
|
export type PrefetchContext = {
|
|
10
10
|
siteId?: string;
|
|
@@ -25,6 +25,10 @@ export type SdkPrefetchOptions = {
|
|
|
25
25
|
*/
|
|
26
26
|
customBlocks?: SdkCustomBlock[];
|
|
27
27
|
};
|
|
28
|
+
export type PrefetchBlockDataDeps = Readonly<{
|
|
29
|
+
prefetchBlockDataCore: typeof prefetchBlockDataCore;
|
|
30
|
+
normalizeLoaderParams: typeof normalizeLoaderParams;
|
|
31
|
+
}>;
|
|
28
32
|
/**
|
|
29
33
|
* Prefetch block data for SDK-based applications.
|
|
30
34
|
* Maps loader endpoints to corresponding SDK client methods.
|
|
@@ -52,3 +56,4 @@ export type SdkPrefetchOptions = {
|
|
|
52
56
|
* ```
|
|
53
57
|
*/
|
|
54
58
|
export declare function prefetchBlockData(page: PageOutline, context: PrefetchContext, client: RiverbankClient, options?: SdkPrefetchOptions): Promise<ResolvedBlockData>;
|
|
59
|
+
export declare function prefetchBlockDataWithDeps(deps: PrefetchBlockDataDeps, page: PageOutline, context: PrefetchContext, client: RiverbankClient, options?: SdkPrefetchOptions): Promise<ResolvedBlockData>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { NextResponse, type NextRequest } from 'next/server';
|
|
2
2
|
import type { RiverbankClient } from '../client/types';
|
|
3
|
-
import type {
|
|
3
|
+
import type { RouteDecisionResponse, RedirectHttpStatus } from '../public-api/contracts';
|
|
4
4
|
export type RouteOutcomeRedirectFailureContext = Readonly<{
|
|
5
5
|
siteId: string;
|
|
6
6
|
path: string;
|
|
7
7
|
preview: boolean;
|
|
8
8
|
}>;
|
|
9
9
|
export type HandleRouteOutcomeRedirectOptions = Readonly<{
|
|
10
|
-
client: Pick<RiverbankClient, '
|
|
10
|
+
client: Pick<RiverbankClient, 'resolveRouteDecision'>;
|
|
11
11
|
siteId: string;
|
|
12
12
|
onFailure?: (error: unknown, context: RouteOutcomeRedirectFailureContext) => void;
|
|
13
13
|
}>;
|
|
@@ -18,5 +18,5 @@ export type RouteOutcomeRedirectPlan = Readonly<{
|
|
|
18
18
|
destination: string;
|
|
19
19
|
status: RedirectHttpStatus;
|
|
20
20
|
}>;
|
|
21
|
-
export declare function planRouteOutcomeRedirect(outcome:
|
|
21
|
+
export declare function planRouteOutcomeRedirect(outcome: RouteDecisionResponse): RouteOutcomeRedirectPlan;
|
|
22
22
|
export declare function handleRouteOutcomeRedirect(request: NextRequest, options: HandleRouteOutcomeRedirectOptions): Promise<NextResponse | null>;
|
|
@@ -32,6 +32,14 @@ export interface CatchAllContext {
|
|
|
32
32
|
/** Search parameters from the URL (for filtering, pagination, etc.) */
|
|
33
33
|
searchParams: Record<string, string | string[] | undefined>;
|
|
34
34
|
}
|
|
35
|
+
export type CreateCatchAllContentContract = 'compat' | 'native';
|
|
36
|
+
export type CreateCatchAllContentContractResolverContext = Readonly<{
|
|
37
|
+
/** Resolved URL path being loaded, e.g. '/about'. */
|
|
38
|
+
path: string;
|
|
39
|
+
/** Whether preview mode is enabled for this catch-all instance. */
|
|
40
|
+
preview: boolean;
|
|
41
|
+
}>;
|
|
42
|
+
export type CreateCatchAllContentContractSelector = CreateCatchAllContentContract | ((context: CreateCatchAllContentContractResolverContext) => CreateCatchAllContentContract);
|
|
35
43
|
/**
|
|
36
44
|
* Configuration for runtime theme switching when `themes` is provided.
|
|
37
45
|
*
|
|
@@ -179,6 +187,17 @@ export type CreateCatchAllPageOptions = {
|
|
|
179
187
|
* ```
|
|
180
188
|
*/
|
|
181
189
|
preview?: boolean;
|
|
190
|
+
/**
|
|
191
|
+
* Selects the public content API contract used by the catch-all loader.
|
|
192
|
+
*
|
|
193
|
+
* Defaults to `compat`, preserving the long-standing page/entry response
|
|
194
|
+
* shape. Use `native` only after the target site and route are ready to
|
|
195
|
+
* receive native page-surface payloads. A resolver can opt in route-by-route
|
|
196
|
+
* during staged rollouts.
|
|
197
|
+
*
|
|
198
|
+
* @default 'compat'
|
|
199
|
+
*/
|
|
200
|
+
contentContract?: CreateCatchAllContentContractSelector;
|
|
182
201
|
/**
|
|
183
202
|
* Custom block component overrides for rendering.
|
|
184
203
|
* Keys can be full block kind ("block.hero") or short form ("hero").
|
|
@@ -10,6 +10,8 @@ export interface PrebuildLoaderConfig {
|
|
|
10
10
|
prebuildDir: string;
|
|
11
11
|
/** Maximum age in seconds for prebuild cache */
|
|
12
12
|
maxPrebuildAgeSec?: number;
|
|
13
|
+
/** Filesystem adapter for tests and non-standard runtimes. */
|
|
14
|
+
fileSystem?: PrebuildFileSystem;
|
|
13
15
|
}
|
|
14
16
|
export interface LoadResult<T> {
|
|
15
17
|
/** Loaded data */
|
|
@@ -17,11 +19,15 @@ export interface LoadResult<T> {
|
|
|
17
19
|
/** Age of prebuild in seconds */
|
|
18
20
|
prebuildAgeSec: number;
|
|
19
21
|
}
|
|
22
|
+
export interface PrebuildFileSystem {
|
|
23
|
+
existsSync(filePath: string): boolean;
|
|
24
|
+
readFileSync(filePath: string, encoding: 'utf-8'): string;
|
|
25
|
+
}
|
|
20
26
|
/**
|
|
21
27
|
* Check if we're running in a Node.js environment with filesystem access.
|
|
22
28
|
* Edge runtimes (Vercel Edge, Cloudflare Workers) don't have fs access.
|
|
23
29
|
*/
|
|
24
|
-
export declare function canUsePrebuild(): boolean;
|
|
30
|
+
export declare function canUsePrebuild(fileSystem?: PrebuildFileSystem): boolean;
|
|
25
31
|
/**
|
|
26
32
|
* Loader for reading data from the prebuild cache.
|
|
27
33
|
*
|
|
@@ -31,6 +37,7 @@ export declare function canUsePrebuild(): boolean;
|
|
|
31
37
|
export declare class PrebuildLoader {
|
|
32
38
|
private readonly prebuildDir;
|
|
33
39
|
private readonly maxPrebuildAgeSec;
|
|
40
|
+
private readonly fileSystem;
|
|
34
41
|
constructor(config: PrebuildLoaderConfig);
|
|
35
42
|
/**
|
|
36
43
|
* Check if prebuild is available and not expired.
|