@riverbankcms/sdk 0.78.2 → 0.80.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 +80 -0
- package/dist/PreviewEditorSidebar-QZG37QIF.mjs +2655 -0
- package/dist/{PreviewEditorUI-CS5P4N3P.mjs → PreviewEditorUI-AXIKSMZA.mjs} +27 -4
- package/dist/SdkPreviewModeRuntime-XE5M4UKM.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +56 -0
- package/dist/_dts/api/src/endpoints.d.ts +79 -0
- package/dist/_dts/api/src/index.d.ts +6 -4
- package/dist/_dts/api/src/media.d.ts +8 -1
- package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +1 -1
- package/dist/_dts/api/src/navigation/dashboardSiteNav.d.ts +8 -8
- package/dist/_dts/api/src/navigation/identity.d.ts +59 -0
- package/dist/_dts/api/src/navigation.d.ts +2 -0
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +4 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +1 -0
- package/dist/_dts/api/src/siteIcons.d.ts +128 -0
- package/dist/_dts/api/src/siteInfrastructure.d.ts +124 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +16 -0
- package/dist/_dts/api/src/siteOnboarding.d.ts +13 -0
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +17 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +6 -1
- package/dist/_dts/api/src/types.d.ts +1 -1
- package/dist/_dts/api/src/webhooks.d.ts +239 -0
- package/dist/_dts/block-form/src/client/index.d.ts +2 -0
- package/dist/_dts/block-form/src/index.d.ts +2 -0
- package/dist/_dts/block-form/src/utils/evaluateVisibility.d.ts +2 -1
- package/dist/_dts/blocks/src/client/header.d.ts +1 -1
- package/dist/_dts/blocks/src/client.d.ts +12 -12
- package/dist/_dts/blocks/src/index.d.ts +5 -1
- package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/cart.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/collection.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/events/event-listing.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/events/event-spotlight.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +4 -1
- package/dist/_dts/blocks/src/system/blocks/faq.d.ts +294 -289
- package/dist/_dts/blocks/src/system/blocks/feature-card-icons.d.ts +57 -0
- package/dist/_dts/blocks/src/system/blocks/feature-cards.d.ts +4 -0
- package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +22 -22
- package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/testimonials.d.ts +13 -1
- package/dist/_dts/blocks/src/system/customize/backgrounds.d.ts +179 -0
- package/dist/_dts/blocks/src/system/fields/boxStyles.d.ts +4 -2
- package/dist/_dts/blocks/src/system/fragments/library/faqHeading.d.ts +1 -0
- package/dist/_dts/blocks/src/system/fragments/library/testimonialsCarousel.d.ts +10 -0
- package/dist/_dts/blocks/src/system/helpers/resolveBackground.d.ts +3 -1
- package/dist/_dts/blocks/src/system/icons/ids.d.ts +13 -0
- package/dist/_dts/blocks/src/system/icons/index.d.ts +6 -0
- package/dist/_dts/blocks/src/system/icons/presets.d.ts +4 -0
- package/dist/_dts/blocks/src/system/icons/registry.d.ts +18 -0
- package/dist/_dts/blocks/src/system/icons/semantic.d.ts +239 -0
- package/dist/_dts/blocks/src/system/icons/value.d.ts +94 -0
- package/dist/_dts/blocks/src/system/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +4 -1
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +23 -0
- package/dist/_dts/blocks/src/system/node/fragments/headingDecoration.d.ts +1 -4
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +7 -7
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/header/enhanceHeaderSection.d.ts +10 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +5 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.server.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventSpotlight.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventCard.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventDetailModal.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModals.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/feature-card-icon.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/header-section.client.d.ts +2 -2
- package/dist/_dts/blocks/src/system/transforms/registry/boxStyles.d.ts +3 -0
- package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +9 -0
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +14 -1
- package/dist/_dts/content-model/src/contentManifest.d.ts +3 -1
- package/dist/_dts/core/src/branded.d.ts +6 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +200 -3
- package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +8 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardBody.d.ts +8 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardHeader.d.ts +8 -2
- package/dist/_dts/editor-blocks/src/block-editor/FeatureCardIconsPanel.d.ts +17 -0
- package/dist/_dts/editor-blocks/src/block-editor/GeneratedIconSetDialog.d.ts +42 -0
- package/dist/_dts/editor-blocks/src/block-editor/SortableBlockItem.d.ts +7 -1
- package/dist/_dts/editor-blocks/src/block-editor/featureCardIconActions.d.ts +82 -0
- package/dist/_dts/editor-blocks/src/index.d.ts +2 -0
- package/dist/_dts/editor-blocks/src/widgets/icon-picker/IconPickerField.d.ts +1 -1
- package/dist/_dts/media-core/src/fileDomain.d.ts +8 -1
- package/dist/_dts/media-editor/src/MediaEditor.d.ts +3 -2
- package/dist/_dts/media-react/src/components/MediaLibrary.d.ts +2 -1
- package/dist/_dts/media-react/src/components/MediaPickerMini.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/blocks/BlockToolbar.d.ts +5 -1
- package/dist/_dts/preview-next/src/client/blocks/previewCustomizeActions.d.ts +17 -0
- package/dist/_dts/preview-next/src/client/blocks/previewCustomizeControlPlan.d.ts +24 -0
- package/dist/_dts/preview-next/src/client/blocks/useBlockCustomizeControls.d.ts +34 -0
- package/dist/_dts/preview-next/src/client/preview/PageBlockEditorPanel.d.ts +2 -5
- package/dist/_dts/preview-next/src/client/preview/PageDesignEditorStateContext.d.ts +8 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewBlockCustomizeSelectionContext.d.ts +20 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewOpenEditorButton.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/preview/SelectedBlockCustomizePanel.d.ts +13 -0
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeEditorDraftPatch.d.ts +13 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeHistory.d.ts +6 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeRuntimePatch.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/preview/storeTypes.d.ts +4 -0
- package/dist/_dts/preview-next/src/client/widgets/widgetOverrides.d.ts +3 -1
- package/dist/_dts/sdk/src/cli/commands/webhooks.d.ts +44 -0
- package/dist/_dts/sdk/src/cli/navigationIdentity.d.ts +11 -0
- package/dist/_dts/sdk/src/cli/site-commands/navigationCommands.d.ts +4 -0
- package/dist/_dts/sdk/src/cli/site-commands/oneOffCommands.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/sync/diff.d.ts +9 -0
- package/dist/_dts/sdk/src/client/management/index.d.ts +1 -1
- package/dist/_dts/sdk/src/client/management/types.d.ts +58 -0
- package/dist/_dts/sdk/src/client/management/webhooks.d.ts +3 -0
- package/dist/_dts/sdk/src/config/field-definitions.d.ts +3 -1
- package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +24 -4
- package/dist/_dts/sdk/src/next/index.d.ts +1 -1
- package/dist/_dts/sdk/src/next/revalidate.d.ts +26 -5
- package/dist/_dts/sdk/src/next/static-params.d.ts +28 -3
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -1
- package/dist/_dts/sdk/src/public-api/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/sdk/src/webhooks/index.d.ts +1 -1
- package/dist/_dts/sdk/src/webhooks/verify.d.ts +6 -102
- package/dist/_dts/site-commands/src/commands.d.ts +3 -0
- package/dist/_dts/theme-core/src/accordions/siteStyleDefaults.d.ts +220 -0
- package/dist/_dts/theme-core/src/accordions/types.d.ts +45 -2
- package/dist/_dts/theme-core/src/blockOverrides.d.ts +8 -0
- package/dist/_dts/theme-core/src/blocks/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/blocks/vars/testimonials.d.ts +4 -1
- package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/cards/core.d.ts +20 -0
- package/dist/_dts/theme-core/src/cards/generateDefaultCardSystem.d.ts +6 -3
- package/dist/_dts/theme-core/src/cards/siteStyleDefaults.d.ts +105 -0
- package/dist/_dts/theme-core/src/cards/types.d.ts +177 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +159 -21
- package/dist/_dts/theme-core/src/palette/variants/index.d.ts +15 -0
- package/dist/_dts/theme-core/src/palette/variants/soft-natural.d.ts +16 -0
- package/dist/_dts/theme-core/src/palette/variants/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/schema.d.ts +451 -57
- package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +86 -17
- package/dist/_dts/theme-core/src/site-styles/appearancePresetTypes.d.ts +2 -3
- package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +86 -17
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +135 -3
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +5 -5
- package/dist/_dts/theme-core/src/site-styles/footerLooks.d.ts +20 -1
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +8 -2
- package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +286 -6
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +2 -0
- package/dist/_dts/theme-core/src/site-styles/logoBranding.d.ts +193 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +6 -12
- package/dist/_dts/theme-core/src/site-styles/rawStyleFields.d.ts +2 -0
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +10 -7
- package/dist/_dts/theme-core/src/site-styles/siteStyleThemeCompiler.d.ts +11 -0
- package/dist/_dts/theme-core/src/site-styles/sourceCatalogs.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/styleTags.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/testimonialQuotePresets.d.ts +15 -0
- package/dist/_dts/theme-core/src/site-styles/tokenRecipes.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/types.d.ts +7 -29
- package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +2 -0
- package/dist/_dts/ui/src/combobox.d.ts +1 -0
- package/dist/{PreviewEditorSidebar-4DXLYX2V.mjs → chunk-5NZGBSJF.mjs} +2215 -2566
- package/dist/{chunk-RGTOD4AJ.mjs → chunk-7PCYG6YV.mjs} +621 -108
- package/dist/{chunk-CR5HKAGU.mjs → chunk-BBLZSQEY.mjs} +79 -0
- package/dist/{chunk-MCRQMPET.mjs → chunk-GYXKAUFV.mjs} +4500 -912
- package/dist/{chunk-6HYXHRAI.mjs → chunk-HTB4BMKD.mjs} +267 -49
- package/dist/{chunk-OKMBEAXY.mjs → chunk-MPBNEVPB.mjs} +1 -1
- package/dist/cli/index.mjs +3255 -702
- package/dist/cli/init-docs/content/workflow-editor-workflows.md +2 -0
- package/dist/cli/init-docs/content/workflow-isr-revalidation.md +150 -0
- package/dist/client/{accordion-PLYNJIIM.mjs → accordion-QFZMNB7O.mjs} +1 -1
- package/dist/client/{bookingForm-BXAP6AO7.mjs → bookingForm-NCIXFWIG.mjs} +3 -3
- package/dist/client/bookings.mjs +1246 -323
- package/dist/client/{carousel-TRBXDHGF.mjs → carousel-EO4BJMWD.mjs} +2 -2
- package/dist/client/{cart-Z7H3HJRS.mjs → cart-FTYCLYUW.mjs} +5 -5
- package/dist/client/{checkout-WAFCUBIX.mjs → checkout-NFGLVCOX.mjs} +5 -5
- package/dist/client/{chunk-CWGTG37I.mjs → chunk-4W66ALYT.mjs} +1 -1
- package/dist/client/{chunk-JRDUHZCT.mjs → chunk-6GVVWSPU.mjs} +4 -4
- package/dist/client/{chunk-75OUS5MT.mjs → chunk-IWFZSQNZ.mjs} +1 -1
- package/dist/client/{chunk-JGXPTEI2.mjs → chunk-PUOELU4O.mjs} +95 -8
- package/dist/client/{chunk-FUXW6VW2.mjs → chunk-PYRBIURC.mjs} +4 -4
- package/dist/client/{chunk-ZI3LLBPZ.mjs → chunk-T6UIP6UZ.mjs} +1 -1
- package/dist/client/{chunk-DNRGY432.mjs → chunk-VDS5YFLX.mjs} +1 -1
- package/dist/client/{chunk-UVQEJJTN.mjs → chunk-Y37KDO7P.mjs} +1 -1
- package/dist/client/client.mjs +24277 -20796
- package/dist/client/{courseRegistration-AHFQHWIJ.mjs → courseRegistration-2EORROPS.mjs} +3 -3
- package/dist/client/{eventCalendar-LDXTV5R7.mjs → eventCalendar-WZI4VL6N.mjs} +5 -5
- package/dist/client/{eventCombined-A4JGTNJO.mjs → eventCombined-QCB2TCNL.mjs} +5 -5
- package/dist/client/{eventDetails-4YXTZ7EG.mjs → eventDetails-TFTATAPH.mjs} +5 -5
- package/dist/client/{eventListing-P72TPFFM.mjs → eventListing-A2CQEHEQ.mjs} +5 -5
- package/dist/client/{eventRegistration-LSYJHGMT.mjs → eventRegistration-OELPVLUY.mjs} +5 -5
- package/dist/client/{form-AOPYOKOW.mjs → form-NTIFD6WQ.mjs} +1 -1
- package/dist/client/{headerSection-5TFYDFVQ.mjs → headerSection-7TBNKCLA.mjs} +65 -24
- package/dist/client/hooks.mjs +3687 -2024
- package/dist/client/{locationMap-QSZ3ZVAZ.mjs → locationMap-LRLB5A3H.mjs} +1 -1
- package/dist/client/{newsletterForm-KTRHZY52.mjs → newsletterForm-XI52RZSN.mjs} +1 -1
- package/dist/client/{productDetail-N4E775RG.mjs → productDetail-GSNKBFLY.mjs} +5 -5
- package/dist/client/{productList-UGUQ2S45.mjs → productList-BGCGT4KZ.mjs} +5 -5
- package/dist/client/rendering/client.mjs +5274 -3030
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +6271 -2790
- package/dist/client/{shop-VHSZEEQ2.mjs → shop-RQHUCLNY.mjs} +5 -5
- package/dist/preview-next/before-render.mjs +79 -0
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/preview-next/middleware.mjs +79 -0
- package/dist/{sdk-runtime-WHPJEF5G.mjs → sdk-runtime-A4LHT2RS.mjs} +6 -6
- package/dist/server/components.mjs +6215 -3057
- package/dist/server/config-validation.mjs +3858 -2194
- package/dist/server/config.mjs +3858 -2194
- package/dist/server/data.mjs +3687 -2024
- package/dist/server/index.mjs +88 -1
- package/dist/server/next/revalidate.mjs +229 -34
- package/dist/server/next.mjs +6295 -3036
- package/dist/server/page-converter.mjs +3055 -1883
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +6220 -3062
- package/dist/server/rendering.mjs +6233 -3075
- package/dist/server/routing.mjs +4251 -2137
- package/dist/server/server.mjs +3705 -2042
- package/dist/server/theme-bridge.mjs +1617 -329
- package/dist/server/theme.mjs +411 -221
- package/dist/server/webhooks.mjs +129 -25
- package/dist/styles/index.css +355 -33
- package/package.json +2 -1
- package/dist/SdkPreviewModeRuntime-IJDHTW4W.mjs +0 -8
- package/dist/chunk-4QEGTLK6.mjs +0 -1175
|
@@ -31,6 +31,8 @@ Use `contentType: "page"` for page workflows. Use a content type key, such as `b
|
|
|
31
31
|
|
|
32
32
|
Riverbank saves the draft, disables the editor, creates a workflow run, and posts to your endpoint. Verify the raw body with the same HMAC helper used for webhooks:
|
|
33
33
|
|
|
34
|
+
The `x-riverbank-signature` header is formatted as `sha256=<hex HMAC-SHA256 digest>`.
|
|
35
|
+
|
|
34
36
|
```ts
|
|
35
37
|
import { verifyWebhookSignature } from "@riverbankcms/sdk/webhooks";
|
|
36
38
|
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# Workflow: Production ISR and Revalidation
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Configure a Riverbank SDK Next.js App Router site to prerender published routes, serve production pages through ISR, and refresh affected paths when the CMS sends signed publish webhooks.
|
|
6
|
+
|
|
7
|
+
## Prerequisites
|
|
8
|
+
|
|
9
|
+
- A Riverbank SDK site using `createCatchAllPage()` in `src/app/[[...slug]]/page.tsx`.
|
|
10
|
+
- A production content API key in `RIVERBANK_API_KEY`.
|
|
11
|
+
- `RIVERBANK_SITE_ID` set to this site's Riverbank site ID.
|
|
12
|
+
- `NEXT_PUBLIC_DASHBOARD_URL` set to the dashboard origin, for example `https://cms.example.com`.
|
|
13
|
+
- `RIVERBANK_WEBHOOK_SECRET` set from the CMS-generated Riverbank webhook secret.
|
|
14
|
+
|
|
15
|
+
Preview deployments should also set `RIVERBANK_PREVIEW_MODE=true` so draft previews stay dynamic instead of serving stale ISR HTML.
|
|
16
|
+
|
|
17
|
+
## Configure the Catch-All Route
|
|
18
|
+
|
|
19
|
+
In `src/app/[[...slug]]/page.tsx`:
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
import {
|
|
23
|
+
createCatchAllPage,
|
|
24
|
+
generateAllStaticParams,
|
|
25
|
+
getISRConfig,
|
|
26
|
+
} from '@riverbankcms/sdk/next'
|
|
27
|
+
|
|
28
|
+
import config from '@/riverbank.config'
|
|
29
|
+
import { blockOverrides } from '@/lib/block-overrides'
|
|
30
|
+
import { getRiverbankClient } from '@/lib/riverbank-client'
|
|
31
|
+
|
|
32
|
+
export const revalidate = getISRConfig().revalidate
|
|
33
|
+
export const dynamicParams = true
|
|
34
|
+
export { generateAllStaticParams as generateStaticParams }
|
|
35
|
+
|
|
36
|
+
const { Page, generateMetadata } = createCatchAllPage({
|
|
37
|
+
getClient: getRiverbankClient,
|
|
38
|
+
config,
|
|
39
|
+
blockOverrides,
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
export default Page
|
|
43
|
+
export { generateMetadata }
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
`generateAllStaticParams()` discovers published pages and routable entries at build time. It reads:
|
|
47
|
+
|
|
48
|
+
- `RIVERBANK_API_KEY`
|
|
49
|
+
- `RIVERBANK_SITE_ID`
|
|
50
|
+
- `NEXT_PUBLIC_DASHBOARD_URL`
|
|
51
|
+
|
|
52
|
+
By default, route discovery falls back to the homepage if the CMS is temporarily unavailable. Use strict mode when you want production CI to fail instead:
|
|
53
|
+
|
|
54
|
+
```tsx
|
|
55
|
+
import { generateAllStaticParams } from '@riverbankcms/sdk/next'
|
|
56
|
+
|
|
57
|
+
export function generateStaticParams() {
|
|
58
|
+
return generateAllStaticParams({ failureMode: 'throw' })
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
If your site already centralizes the SDK client, use the explicit factory:
|
|
63
|
+
|
|
64
|
+
```tsx
|
|
65
|
+
import { createGenerateStaticParams } from '@riverbankcms/sdk/next'
|
|
66
|
+
|
|
67
|
+
import config from '@/riverbank.config'
|
|
68
|
+
import { getRiverbankClient } from '@/lib/riverbank-client'
|
|
69
|
+
|
|
70
|
+
export const generateStaticParams = createGenerateStaticParams({
|
|
71
|
+
getClient: getRiverbankClient,
|
|
72
|
+
siteId: config.siteId,
|
|
73
|
+
failureMode: 'throw',
|
|
74
|
+
})
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Add the Revalidation Route
|
|
78
|
+
|
|
79
|
+
Create `src/app/api/revalidate/route.ts`:
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
import { createRevalidateHandler } from '@riverbankcms/sdk/next/revalidate'
|
|
83
|
+
|
|
84
|
+
export const POST = createRevalidateHandler()
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
The deployed site must have the CMS-generated webhook secret:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
RIVERBANK_WEBHOOK_SECRET=...
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Riverbank signs each request with:
|
|
94
|
+
|
|
95
|
+
```http
|
|
96
|
+
X-Riverbank-Signature: sha256=<hex HMAC-SHA256 digest>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
The digest is computed over the raw JSON body. The SDK handler rejects unsigned requests, plain hex signatures without the `sha256=` prefix, malformed digests, bad signatures, and invalid payloads. Malformed path entries are skipped and reported in the response metadata while valid tags and paths still revalidate.
|
|
100
|
+
|
|
101
|
+
Riverbank includes a `dispatchId` in signed payloads and sends matching `X-Riverbank-Dispatch-Id` / `X-Riverbank-Correlation-Id` headers. To join CMS delivery logs with this site's deployment logs, use the optional callback metadata:
|
|
102
|
+
|
|
103
|
+
```ts
|
|
104
|
+
export const POST = createRevalidateHandler({
|
|
105
|
+
onRevalidate: (_payload, _items, metadata) => {
|
|
106
|
+
console.info('Riverbank ISR revalidated', metadata)
|
|
107
|
+
},
|
|
108
|
+
})
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Configure the CMS Webhook Endpoint
|
|
112
|
+
|
|
113
|
+
Use the SDK CLI to configure or reuse an enabled CMS webhook endpoint whose URL points at the deployed route:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
riverbankcms webhooks setup \
|
|
117
|
+
--env=remote \
|
|
118
|
+
--url=https://www.example.com/api/revalidate \
|
|
119
|
+
--yes \
|
|
120
|
+
--vercel
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
The command keeps the CMS as the source of truth for the webhook secret. It creates or updates the endpoint, ensures the full SDK revalidation event list is subscribed, writes a newly generated one-time secret to `.env.local` when one is returned, and prints hosted-environment and deploy/test steps. Existing endpoint secrets are not returned or changed unless you pass `--rotate-secret`.
|
|
124
|
+
|
|
125
|
+
The same destination URL can also be configured from the Riverbank dashboard:
|
|
126
|
+
|
|
127
|
+
```text
|
|
128
|
+
https://www.example.com/api/revalidate
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
SDK-site revalidation events include page and entry publish, unpublish, delete, and public path changes, along with navigation, theme, and site settings updates. Events send top-level `paths` and `tags`; the SDK handler normalizes and dedupes them before calling `revalidatePath()` and `revalidateTag()`.
|
|
132
|
+
|
|
133
|
+
Some valid events are tags-only. Global render changes do not include explicit paths, and very large path sets degrade to tags-only delivery so webhook payloads stay bounded. Existing webhook endpoints may need their subscribed event list updated to receive the newer unpublish, delete, and path-change events.
|
|
134
|
+
|
|
135
|
+
For troubleshooting, inspect the endpoint's delivery logs in Riverbank. Each delivery stores minimized payload diagnostics with `dispatchId`, `siteId`, event, `pathCount`, `tagCount`, status, response time, and a minimized failure body. Secrets, signature headers, cookies, authorization headers, and raw sensitive fields are not written to delivery logs.
|
|
136
|
+
|
|
137
|
+
## Verify
|
|
138
|
+
|
|
139
|
+
1. Build the site with production environment variables present.
|
|
140
|
+
2. Confirm a published route is included in the static params output or appears as prerendered in the Next build summary.
|
|
141
|
+
3. Visit a published page.
|
|
142
|
+
4. Publish a change in the CMS.
|
|
143
|
+
5. Confirm the webhook delivery succeeds.
|
|
144
|
+
6. Reload the page and confirm the changed content appears without waiting for the normal ISR interval.
|
|
145
|
+
|
|
146
|
+
For local SDK development inside the Riverbank monorepo, the smoke check is:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
pnpm --filter @riverbankcms/sdk test:isr-catch-all-revalidate-smoke
|
|
150
|
+
```
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { usePolling } from './chunk-
|
|
2
|
+
import { usePolling } from './chunk-VDS5YFLX.mjs';
|
|
3
3
|
import { SpinnerNode } from './chunk-CE7IBGVW.mjs';
|
|
4
4
|
import { useDiscountCodeUi } from './chunk-ZFHRN6W2.mjs';
|
|
5
|
-
import { scrollToBlock, buildCheckoutReturnUrls, DiscountCodeDisclosure, formatPrice } from './chunk-
|
|
5
|
+
import { scrollToBlock, buildCheckoutReturnUrls, DiscountCodeDisclosure, formatPrice } from './chunk-Y37KDO7P.mjs';
|
|
6
6
|
import { FieldValidationMessage, getFieldValidationControlProps } from './chunk-3DCJ45Z2.mjs';
|
|
7
7
|
import './chunk-3PEDD5KJ.mjs';
|
|
8
8
|
import { isSpamProtectionEnabled, getChallengeUrl, AltchaWidget } from './chunk-YLMKMCSJ.mjs';
|
|
9
9
|
import { BlockApiProvider, useBlockApi, FeedbackMessage } from './chunk-UDNSI5PY.mjs';
|
|
10
10
|
import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
|
|
11
|
-
import { defineIslandPropsDecoder, resolveBookingSiteId, resolveDefaultBookingServiceId, getBookingRedirectStateFromLocation, deriveBookingFormViewState, logger, getBookingSuccessMessage, resolveAppointmentCheckoutVerificationState, themeButtonClassName, toSelectedCollectionOptionKind, assertNever11, prepareBookingSubmission, formatBookingSubmissionPreparationError, resolveBookingPaymentStep, BOOKING_FORM_DATA_RESERVED_KEYS, clearWorkflowFeedback, reportWorkflowError, reportWorkflowSuccess, okWith2, err2 } from './chunk-
|
|
11
|
+
import { defineIslandPropsDecoder, resolveBookingSiteId, resolveDefaultBookingServiceId, getBookingRedirectStateFromLocation, deriveBookingFormViewState, logger, getBookingSuccessMessage, resolveAppointmentCheckoutVerificationState, themeButtonClassName, toSelectedCollectionOptionKind, assertNever11, prepareBookingSubmission, formatBookingSubmissionPreparationError, resolveBookingPaymentStep, BOOKING_FORM_DATA_RESERVED_KEYS, clearWorkflowFeedback, reportWorkflowError, reportWorkflowSuccess, okWith2, err2 } from './chunk-PUOELU4O.mjs';
|
|
12
12
|
import { resolveBookingTimeZoneId, DEFAULT_BOOKING_TIME_ZONE, unsafeAsFormId, unsafeAsAppointmentResourceId, unsafeAsCustomerPassId, unsafeAsAppointmentServiceId, formatLocalScheduleDate, addLocalScheduleDays, parseBookingLocalDate, resolveFlexibleBalanceInitialPaymentCents, resolveFlexibleBalanceDueAt, getBookingInstalmentDepositRefundability, unsafeAsPassId, splitAmountWithRemainderInFirst, addIntervalPreservingMonthAnchor, clampConfiguredAmount, getBookingInstalmentPlanIntervalCount, omitZeroAmountFutureRows, formatBookingInstant } from './chunk-AUJ5DBZJ.mjs';
|
|
13
13
|
import React2, { useRef, useState, useMemo, useReducer, useEffect, useCallback, useLayoutEffect } from 'react';
|
|
14
14
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|