@riverbankcms/sdk 0.177.0 → 0.179.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 +15 -8
- package/dist/_dts/{BlocksIslandsHydrator-sYraeqm9.d.ts → BlocksIslandsHydrator-DKwgs95u.d.ts} +1 -1
- package/dist/_dts/{Page-Bp7hTDTy.d.ts → Page-lWenra5i.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-CxkCCyKw.d.ts → SdkPreviewMode-BRxhRw4I.d.ts} +2 -2
- package/dist/_dts/{client-K6UhbL3t.d.ts → client-qWn7xAwJ.d.ts} +77 -23
- package/dist/_dts/{content-types-BLAdIMyr.d.ts → content-types-DL6GIvTm.d.ts} +2 -2
- package/dist/_dts/{contracts-BG7yTZ6t.d.ts → contracts-CzWyAiJj.d.ts} +6 -116
- package/dist/_dts/{generatePageMetadata-X_WpGzZZ.d.ts → generatePageMetadata-CBKd0cJ4.d.ts} +2 -2
- package/dist/_dts/{index--n-wV8Xd.d.ts → index-7CDBZGb-.d.ts} +1 -1
- package/dist/_dts/{index-Bygd2RCg.d.ts → index-BU9uAkHB.d.ts} +4 -4
- package/dist/_dts/{index-BMGif2r3.d.ts → index-BYnG_vF5.d.ts} +1 -1
- package/dist/_dts/{index-CBRbZJ6u.d.ts → index-CZgJrhzT.d.ts} +4 -2
- package/dist/_dts/{index-BLseXObg.d.ts → index-CaCum9mM.d.ts} +2 -2
- package/dist/_dts/{index-BpAW9AKB.d.ts → index-DCiSHd-C.d.ts} +1 -1
- package/dist/_dts/{index-CX9bp60k.d.ts → index-DVSipdrT.d.ts} +3 -3
- package/dist/_dts/{loadContent-uhUThWaq.d.ts → loadContent-CPKbFQyq.d.ts} +15 -13
- package/dist/_dts/{request-Bf9YImJw.d.ts → request-BjKBCS7t.d.ts} +1687 -373
- package/dist/_dts/{resolveBlockData-D6M5NMZB.d.ts → resolveBlockData-DupbMCup.d.ts} +8 -5
- package/dist/_dts/resolvePageContent-BqNyCHi8.d.ts +61 -0
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
- package/dist/_dts/sdk/src/client/types.d.ts +3 -3
- package/dist/_dts/sdk/src/client.d.ts +7 -7
- package/dist/_dts/sdk/src/config/index.d.ts +6 -6
- package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
- package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
- package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
- package/dist/_dts/sdk/src/data/types.d.ts +7 -2
- package/dist/_dts/sdk/src/gifting/client.d.ts +1 -2
- package/dist/_dts/sdk/src/index.d.ts +8 -8
- package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
- package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
- package/dist/_dts/sdk/src/navigation/index.d.ts +3 -3
- package/dist/_dts/sdk/src/next/index.d.ts +32 -12
- package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
- package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
- package/dist/_dts/sdk/src/portal/client.d.ts +56 -4
- package/dist/_dts/sdk/src/portal/index.d.ts +95 -13
- package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/index.d.ts +7 -7
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +3 -3
- package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/index.d.ts +19 -6
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
- package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
- package/dist/_dts/serviceBookingOutline-YcsIjvn1.d.ts +582 -0
- package/dist/_dts/{types-C1l2Sm2h.d.ts → types-B7e6Lmo5.d.ts} +3 -3
- package/dist/_dts/{types-DgV8P2mz.d.ts → types-BOxSq-Bq.d.ts} +8 -7
- package/dist/_dts/{types-BdZ5pJSk.d.ts → types-CT-KOxl_.d.ts} +5 -39
- package/dist/_dts/{validation-BtbZIT5f.d.ts → validation-Dz6qccue.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-CeYQQQs7.mjs → BlocksIslandsHydrator-1XifJg6V.mjs} +17 -18
- package/dist/client/{BookingMailingListNote-CDDWrY_W.mjs → BookingMailingListNote-BsbEgagJ.mjs} +7 -7
- package/dist/client/{BookingQuestionFields-MbvIo2jS.mjs → BookingQuestionFields-C8IbeLHj.mjs} +4 -4
- package/dist/client/{CalendarNavigationChevron-C6CSVfEB.mjs → CalendarNavigationChevron-Bbqij1XQ.mjs} +43 -10
- package/dist/client/{CheckboxChoice-b-PJLEXe.mjs → CheckboxChoice-BZPLCgTU.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-C9Ggcfx3.mjs → DemoBookingPortalAccess-uA9H8LIL.mjs} +4 -4
- package/dist/client/{EventCalendar.client-BSMuSqg0.mjs → EventCalendar.client-yoSI77ov.mjs} +11 -11
- package/dist/client/{EventCombined.client-BTrmSyUB.mjs → EventCombined.client-HeCNlliq.mjs} +11 -11
- package/dist/client/{EventEmbeddedCheckoutStep-B18VbNS_.mjs → EventEmbeddedCheckoutStep-BDnicDM6.mjs} +1 -1
- package/dist/client/{EventItem-B0WjGXsH.mjs → EventItem-Duhk1vnF.mjs} +247 -7
- package/dist/client/{EventListWeekNavigation-8Ij7vuxY.mjs → EventListWeekNavigation-BiutEqPK.mjs} +1 -1
- package/dist/client/{EventListing.client-CWk2NEwd.mjs → EventListing.client-B5ln77jG.mjs} +3 -3
- package/dist/client/{EventListing.view-BEH4UbSL.mjs → EventListing.view-hUDhNtMv.mjs} +203 -9
- package/dist/client/{EventRegistrationPayment-B2EikR3f.mjs → EventRegistrationPayment-DqtX1vB2.mjs} +439 -123
- package/dist/client/{Page-C03rc6jw.mjs → Page-ChJ2TGVk.mjs} +24314 -20226
- package/dist/client/{ProtectedSubmitButton-C-ql101B.mjs → ProtectedSubmitButton-De6AzhE6.mjs} +1 -1
- package/dist/client/{SiteTermsAgreementField-BYACYP0T.mjs → SiteTermsAgreementField-CDBU31xW.mjs} +3 -3
- package/dist/client/{StepIndicator-Bb7rPtSq.mjs → StepIndicator-2Dl9zon2.mjs} +80 -33
- package/dist/client/{BookingPanelArrangement-BShQSial.mjs → StepIndicator-JQA-VuEH.mjs} +12 -12
- package/dist/client/{TabBarFragment-BqfRLojo.mjs → TabBarFragment-DlKQRhP4.mjs} +1 -1
- package/dist/client/{ThemedButton-DuaYtnvG.mjs → ThemedButton-CnSa7o-I.mjs} +66 -66
- package/dist/client/{accessibleSurfaces-DN8it_Cx.mjs → accessibleSurfaces-Wl8-_OVJ.mjs} +1 -1
- package/dist/client/{accordion-BfsOiweL.mjs → accordion-B6SqU49k.mjs} +1 -1
- package/dist/client/{booking-form.client-B8ohIj13.mjs → booking-form.client-DrEOjQ3N.mjs} +15 -15
- package/dist/client/{bookingForm-CXsck2oH.mjs → bookingForm-drZBwEZW.mjs} +4 -4
- package/dist/client/bookings.mjs +5 -5
- package/dist/client/{boxStyleClassNames-B_hcuT06.mjs → boxStyleClassNames-DEh45w16.mjs} +19 -19
- package/dist/client/{carousel-Cz5Ddbsx.mjs → carousel-C-YJliD-.mjs} +2 -2
- package/dist/client/{carousel.client-h65clfUO.mjs → carousel.client-DMtGYTTM.mjs} +1 -1
- package/dist/client/{cart-CTC2oS3p.mjs → cart-acGFWK9R.mjs} +3 -3
- package/dist/client/{cart.client-c1YkTC-Q.mjs → cart.client-BzlOGP2j.mjs} +1 -1
- package/dist/client/{checkout-BeW1ufaH.mjs → checkout-SEontwhy.mjs} +3 -3
- package/dist/client/{checkout.client-BeU32khQ.mjs → checkout.client-C0Qvh-d4.mjs} +1 -1
- package/dist/client/{checkoutUrls-DVfSUSKp.mjs → checkoutUrls-yUKeq1N9.mjs} +1 -1
- package/dist/client/client.mjs +469 -320
- package/dist/client/{context-R9p5c8IH.mjs → context-DTrwaQtg.mjs} +2 -1
- package/dist/client/{dateFormatting-CF6FWCoo.mjs → dateFormatting-Cg8E1r9l.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-tZxIm3RL.mjs → demoPortalMagicLink-D0kOJYOX.mjs} +5 -4
- package/dist/client/{enhanceHeaderSection-DEYDI54E.mjs → enhanceHeaderSection-DyrpZ7ks.mjs} +4 -4
- package/dist/client/{event-registration.client-DWvSODTI.mjs → event-registration.client-RLZQWi2V.mjs} +121 -183
- package/dist/client/{eventCalendar-C9Pn9eeZ.mjs → eventCalendar-CphYnImh.mjs} +4 -4
- package/dist/client/{eventCombined-Bdhk0fp0.mjs → eventCombined-BvqjASB_.mjs} +4 -4
- package/dist/client/{eventListing-B-bJOQUk.mjs → eventListing-BaNAoC_M.mjs} +4 -4
- package/dist/client/{eventRegistration-CbdmUiDT.mjs → eventRegistration-COMHoRl6.mjs} +4 -4
- package/dist/client/events-9LPvwbWp.mjs +28 -0
- package/dist/client/{form-BbUUt784.mjs → form-DyH2juYT.mjs} +3 -3
- package/dist/client/{form.client-BVlz-9_t.mjs → form.client-DBwzkB0M.mjs} +5 -5
- package/dist/client/{form.parts-TB4UIrML.mjs → form.parts-CY4kX3mh.mjs} +3 -3
- package/dist/client/{formatDate-TDHhFjFN.mjs → formatDate-CTEN7gxW.mjs} +1 -1
- package/dist/client/gifting/client.mjs +7 -6
- package/dist/client/{gifting-CbNSrp7C.mjs → gifting-CIx4V378.mjs} +4 -4
- package/dist/client/{gifting.client-B__bGhFc.mjs → gifting.client-BEVPpzJM.mjs} +5 -5
- package/dist/client/{gifting.parts-CTA1sDW6.mjs → gifting.parts-VnORjnZK.mjs} +2 -2
- package/dist/client/{headerSection-5Wn9nUW_.mjs → headerSection-DGcJfRS8.mjs} +2 -2
- package/dist/client/{lookSurfaces-BwiNdgMU.mjs → lookSurfaces-IqT_SVnX.mjs} +167 -85
- package/dist/client/{newsletter-form.client-B17WYHxZ.mjs → newsletter-form.client-BvEDkjiD.mjs} +6 -6
- package/dist/client/{shop.interactive-CxDJ8P2r.mjs → newsletter-form.interactive-DCO1lErD.mjs} +3970 -3997
- package/dist/client/{newsletter-form.parts-DN9wD1ZG.mjs → newsletter-form.parts-BIy4IUT3.mjs} +2 -2
- package/dist/client/{newsletterForm-DLMlxInp.mjs → newsletterForm-CoTXDNFS.mjs} +3 -3
- package/dist/client/portal/client.mjs +346 -21
- package/dist/client/{product-detail.client-Di_anRGR.mjs → product-detail.client-YHQ2aKX1.mjs} +1 -1
- package/dist/client/{product-list.client-Duhl6rtL.mjs → product-list.client-DxoZw1vF.mjs} +1 -1
- package/dist/client/{productDetail-BgKmCwA8.mjs → productDetail-DjuFvkey.mjs} +3 -3
- package/dist/client/{productList-C_wMKsYS.mjs → productList-DE9GEFoZ.mjs} +3 -3
- package/dist/client/{propsDecoder-y3LvxaiG.mjs → propsDecoder-Cyag_HOs.mjs} +2 -48
- package/dist/client/{registry.server-CIWYKz1V.mjs → registry.server-BPwV-0Pp.mjs} +10426 -9114
- package/dist/client/rendering/client.mjs +41 -27
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +23 -2836
- package/dist/client/{richText-coerce-DkPBFb_a.mjs → richText-coerce-NrRqDeOg.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-BgO0rZce.mjs → routeIslandApiConfig-BWq5gKFK.mjs} +1 -1
- package/dist/client/runtimeResponse-D2j2-mOk.mjs +3 -0
- package/dist/client/{runtimeResponse-9v8q2NBc.mjs → runtimeResponse-DtWSfWSZ.mjs} +1 -1
- package/dist/client/{shop-CFbWlv_W.mjs → shop-C3wM0Hr4.mjs} +3 -3
- package/dist/client/{shop-commerce-C-I29eaA.mjs → shop-commerce-34YvcpbX.mjs} +14 -14
- package/dist/client/{shop-commerce-store-DGcc7twO.mjs → shop-commerce-store-B7xHksOs.mjs} +1 -1
- package/dist/client/{shop-discount-apply.state-DOm7vx0X.mjs → shop-discount-apply.state-BiBnozfO.mjs} +2 -2
- package/dist/client/{shop.client-GHTWUKD6.mjs → shop.client-C0v88nLd.mjs} +14 -14
- package/dist/client/{shopShared-Be9QJJpT.mjs → shopShared-Ct-BRNez.mjs} +2 -2
- package/dist/client/spam-protection.mjs +1 -1
- package/dist/client/{noop-CaQxI-Js.mjs → src-CCtanNlD.mjs} +462 -455
- package/dist/client/src-DqMbCjI1.mjs +3 -0
- package/dist/client/{src-xrjaKaCj.mjs → src-uwCpbHXG.mjs} +2 -1
- package/dist/client/{timetableModel--R0zVzZO.mjs → timetableModel-lhE29TNT.mjs} +66 -12
- package/dist/client/{types-DjWUR_O6.mjs → types-BEaKfam_.mjs} +65 -65
- package/dist/client/{useAvailableSlots-BGu_2F50.mjs → useAvailableSlots-BelJviOT.mjs} +2 -2
- package/dist/client/useDiscountCodeUi-rQRE1-Ho.mjs +196 -0
- package/dist/client/{useEventPagination-DxIJ--JZ.mjs → useEventPagination-C4rS2Xxl.mjs} +8 -8
- package/dist/client/{view-3foOzGWR.mjs → view-LJVHVqsy.mjs} +4 -4
- package/dist/client/{display-4HYOb-AK.mjs → wizardSteps-CNDsxeJH.mjs} +9168 -8981
- package/dist/preview-next/before-render.mjs +4 -3
- package/dist/preview-next/client/{PageSectionToolbar-D6-jojqh.mjs → PageSectionToolbar-C4TtBPN-.mjs} +3 -3
- package/dist/preview-next/client/{PreviewEditorSidebar-BUVFKZ4k.mjs → PreviewEditorSidebar-D6fkE59-.mjs} +15 -13
- package/dist/preview-next/client/{PreviewEditorUI-292pOiSt.mjs → PreviewEditorUI-amcDlj0O.mjs} +4 -4
- package/dist/preview-next/client/{PreviewShell-CW0Yzj3h.mjs → PreviewShell-DeQjx4zk.mjs} +5 -5
- package/dist/preview-next/client/{SdkPreviewModeRuntime-Dba7zoZK.mjs → SdkPreviewModeRuntime-Cx0SXnoX.mjs} +5 -5
- package/dist/preview-next/client/{previewAssistantSlot-B-utyhbS.mjs → previewAssistantSlot-aqpU34WI.mjs} +1764 -1090
- package/dist/preview-next/client/{previewChromeRoot-CCoGydUD.mjs → previewChromeRoot-D3Gy_Rs0.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-DCpXVcA0.mjs → sdk-runtime-Dzx_RrN7.mjs} +2 -2
- package/dist/preview-next/client/{siteStyleAccess-sjOvRAHY.mjs → siteStyleAccess-LHedw83e.mjs} +1 -1
- package/dist/preview-next/client/src-EO5QoRlU.mjs +3 -0
- package/dist/preview-next/client/{src-DzXUmsyK.mjs → src-lX6heoDA.mjs} +2 -1
- package/dist/preview-next/client/{useAutosaveStatus-R1rZ9-IZ.mjs → useAutosaveStatus-DpSd9aVk.mjs} +1 -1
- package/dist/preview-next/client/{useOpenBlockForSetup-BS7CANPv.mjs → useOpenBlockForSetup-BGZn5AT1.mjs} +1 -1
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-BSSbtz6A.mjs → route-contract-DnL-FgSV.mjs} +83 -11
- package/dist/server/{Block.shared-Dc3DX7Cf.mjs → Block.shared-BEbq6EwO.mjs} +5 -5
- package/dist/server/{bindings-VGgS6UvF.mjs → bindings-Bly0dRs7.mjs} +36 -5
- package/dist/server/{client-BPLLL22F.mjs → client-CGJ2ztYp.mjs} +1021 -1118
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/constants-Cj7hfbrA.mjs +41 -0
- package/dist/server/contentTypeResolver-B9vy8BrF.mjs +19 -0
- package/dist/server/data/dataLoaderContext.mjs +1 -1
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/{dataLoaderContext-B3fXA54R.mjs → dataLoaderContext-lMRTfG5Z.mjs} +1 -0
- package/dist/server/error-f4g44bKx.mjs +387 -0
- package/dist/server/index.mjs +3 -2
- package/dist/server/loadContent-BkK1w3QQ.mjs +692 -0
- package/dist/server/{loadPage-CQgde5DN.mjs → loadPage-DTLe0FEs.mjs} +22 -4
- package/dist/server/{navigation-iC_hXjJI.mjs → navigation-BcNfYYuu.mjs} +1 -1
- package/dist/server/navigation.mjs +1 -1
- package/dist/server/next.mjs +103 -100
- package/dist/server/{overrideResolution-CkpwAHvW.mjs → overrideResolution-Uy9Zp2Ks.mjs} +1 -1
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{pageRenderPlan-CfSnAkCO.mjs → pageRenderPlan-JzxBnqfV.mjs} +19 -7
- package/dist/server/{pageRuntimeSupport-uz4gzBOo.mjs → pageRuntimeSupport-DyNSd2Yj.mjs} +50 -2
- package/dist/server/{pageShared-6z6JBU41.mjs → pageShared-DU4ETFPS.mjs} +89 -83
- package/dist/server/portal-B4JVkdjc.mjs +783 -0
- package/dist/server/portal.mjs +3 -3
- package/dist/server/{prebuild-B4_Llisx.mjs → prebuild-8jNtDXmS.mjs} +5 -4
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-CCiYV8_s.mjs → prefetchBlockData-xeMG42aw.mjs} +3 -2
- package/dist/server/{registry-CXRXsFSx.mjs → registry-DH1VrsCl.mjs} +587 -329
- package/dist/server/rendering/components/pageShared.mjs +1 -1
- package/dist/server/rendering/helpers/loadPage.mjs +1 -1
- package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
- package/dist/server/rendering/server.mjs +5 -4
- package/dist/server/rendering.mjs +9 -8
- package/dist/server/{resolveBlockData-yfe8WLEA.mjs → resolveBlockData-BN8tweTx.mjs} +24 -5
- package/dist/server/resolvePageContent-DnM16_f9.mjs +89 -0
- package/dist/server/routing.mjs +271 -57
- package/dist/server/server.mjs +3 -3
- package/dist/server/{loadContent-CxASA3PE.mjs → servicePageContent-B-FezJmH.mjs} +709 -453
- package/dist/server/{validation-BvHio6QI.mjs → validation-3jOzYdPL.mjs} +3 -3
- package/dist/server/{version-SuFlio6n.mjs → version-8t0o6_jd.mjs} +1 -1
- package/dist/styles/index.css +19 -0
- package/package.json +1 -1
- package/dist/_dts/footerPageOutline-DwMHeYmQ.d.ts +0 -256
- package/dist/_dts/resolvePageContent-DkzWvFbG.d.ts +0 -162
- package/dist/client/LocationMapActions-myIQIvQL.mjs +0 -62
- package/dist/client/MapDrawingSvg-BfsVyPvB.mjs +0 -200
- package/dist/client/course-CUFVJEAc.mjs +0 -237
- package/dist/client/duration-Q6_QNgiv.mjs +0 -37
- package/dist/client/event-details.client-BwjBJP-f.mjs +0 -53
- package/dist/client/eventDetails-C2LfNW_o.mjs +0 -13
- package/dist/client/runtimeResponse-CVkM0dHy.mjs +0 -3
- package/dist/client/src-BozhJ43Z.mjs +0 -3
- package/dist/client/useDiscountCodeUi-I_mXI9Yd.mjs +0 -237
- package/dist/client/view-BbzH5MQb.mjs +0 -1371
- package/dist/preview-next/client/src-LUhVXBEQ.mjs +0 -3
- package/dist/server/constants-hl17xz6x.mjs +0 -22
- package/dist/server/portal-BjVHMAUC.mjs +0 -371
- package/dist/server/resolvePageContent-CAELMBEJ.mjs +0 -438
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as sectionOptionsSchema, C as sdkWorkflowConfigSchema, D as sdkWorkflowTriggerSchema, E as sdkWorkflowIdSchema, F as validateFieldIdConflicts, K as contentConfigSchema, M as siteStyleConfigSchema, N as syncConfigSchema, O as sdkWorkflowsSchema, P as themeSourceSchema, S as sdkThemePaletteSchema, T as sdkWorkflowEndpointSchema, _ as sdkCustomBlockSchema, a as blockFieldOptionsSchema, b as sdkSiteUrlSchema, c as containerOptionsSchema, d as layoutConfigSchema, f as loaderParamBindingSchema, g as sdkConfigLoaderSchema, h as riverbankSiteConfigSchema, i as blockFieldExtensionsSchema, j as sectionSpacingSchema, k as sectionBackgroundSchema, l as deployConfigSchema, m as loaderWhenValueSchema, n as blockFieldConfigSchema, o as containerAlignmentSchema, p as loaderParamValueSchema, r as blockFieldExtensionSchema, s as containerMaxWidthSchema, t as activeThemeSchema, u as fieldSelectOptionSchema, v as sdkDataLoadersSchema, w as sdkWorkflowConfirmationSchema, x as sdkThemeConfigSchema, y as sdkLoaderEndpointSchema } from "./validation-
|
|
1
|
+
import { A as sectionOptionsSchema, C as sdkWorkflowConfigSchema, D as sdkWorkflowTriggerSchema, E as sdkWorkflowIdSchema, F as validateFieldIdConflicts, K as contentConfigSchema, M as siteStyleConfigSchema, N as syncConfigSchema, O as sdkWorkflowsSchema, P as themeSourceSchema, S as sdkThemePaletteSchema, T as sdkWorkflowEndpointSchema, _ as sdkCustomBlockSchema, a as blockFieldOptionsSchema, b as sdkSiteUrlSchema, c as containerOptionsSchema, d as layoutConfigSchema, f as loaderParamBindingSchema, g as sdkConfigLoaderSchema, h as riverbankSiteConfigSchema, i as blockFieldExtensionsSchema, j as sectionSpacingSchema, k as sectionBackgroundSchema, l as deployConfigSchema, m as loaderWhenValueSchema, n as blockFieldConfigSchema, o as containerAlignmentSchema, p as loaderParamValueSchema, r as blockFieldExtensionSchema, s as containerMaxWidthSchema, t as activeThemeSchema, u as fieldSelectOptionSchema, v as sdkDataLoadersSchema, w as sdkWorkflowConfirmationSchema, x as sdkThemeConfigSchema, y as sdkLoaderEndpointSchema } from "./validation-3jOzYdPL.mjs";
|
|
2
2
|
export { activeThemeSchema, blockFieldConfigSchema, blockFieldExtensionSchema, blockFieldExtensionsSchema, blockFieldOptionsSchema, containerAlignmentSchema, containerMaxWidthSchema, containerOptionsSchema, contentConfigSchema, deployConfigSchema, fieldSelectOptionSchema, layoutConfigSchema, loaderParamBindingSchema, loaderParamValueSchema, loaderWhenValueSchema, riverbankSiteConfigSchema, sdkConfigLoaderSchema, sdkCustomBlockSchema, sdkDataLoadersSchema, sdkLoaderEndpointSchema, sdkSiteUrlSchema, sdkThemeConfigSchema, sdkThemePaletteSchema, sdkWorkflowConfigSchema, sdkWorkflowConfirmationSchema, sdkWorkflowEndpointSchema, sdkWorkflowIdSchema, sdkWorkflowTriggerSchema, sdkWorkflowsSchema, sectionBackgroundSchema, sectionOptionsSchema, sectionSpacingSchema, siteStyleConfigSchema, syncConfigSchema, themeSourceSchema, validateFieldIdConflicts };
|
package/dist/server/config.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { $ as templateBlockConfigSchema, A as sectionOptionsSchema, B as dashboardNavigationConfigSchema, C as sdkWorkflowConfigSchema, D as sdkWorkflowTriggerSchema, G as blockConfigSchema, H as validateLayoutNodeTypes, I as dashboardConfigSchema, J as entryConfigSchema, K as contentConfigSchema, L as dashboardNavVisibilityBaseSchema, M as siteStyleConfigSchema, O as sdkWorkflowsSchema, Q as siteSettingsConfigSchema, R as dashboardNavVisibilityRolesSchema, S as sdkThemePaletteSchema, U as validateTransformIds, V as validateLayout, W as bindingSourceSchema, X as navigationMenuConfigSchema, Y as navigationItemConfigSchema, Z as pageConfigSchema, _ as sdkCustomBlockSchema, a as blockFieldOptionsSchema, c as containerOptionsSchema, et as templateConfigSchema, h as riverbankSiteConfigSchema, i as blockFieldExtensionsSchema, j as sectionSpacingSchema, k as sectionBackgroundSchema, n as blockFieldConfigSchema, nt as describeInvalidTemplateBindingMetaPath, o as containerAlignmentSchema, q as contentTypeConfigSchema, r as blockFieldExtensionSchema, s as containerMaxWidthSchema, tt as TEMPLATE_BINDING_META_PATHS, u as fieldSelectOptionSchema, w as sdkWorkflowConfirmationSchema, x as sdkThemeConfigSchema, z as dashboardNavVisibilitySchema } from "./validation-
|
|
1
|
+
import { Vs as isCanonicalRichTextDoc } from "./registry-DH1VrsCl.mjs";
|
|
2
|
+
import { $ as templateBlockConfigSchema, A as sectionOptionsSchema, B as dashboardNavigationConfigSchema, C as sdkWorkflowConfigSchema, D as sdkWorkflowTriggerSchema, G as blockConfigSchema, H as validateLayoutNodeTypes, I as dashboardConfigSchema, J as entryConfigSchema, K as contentConfigSchema, L as dashboardNavVisibilityBaseSchema, M as siteStyleConfigSchema, O as sdkWorkflowsSchema, Q as siteSettingsConfigSchema, R as dashboardNavVisibilityRolesSchema, S as sdkThemePaletteSchema, U as validateTransformIds, V as validateLayout, W as bindingSourceSchema, X as navigationMenuConfigSchema, Y as navigationItemConfigSchema, Z as pageConfigSchema, _ as sdkCustomBlockSchema, a as blockFieldOptionsSchema, c as containerOptionsSchema, et as templateConfigSchema, h as riverbankSiteConfigSchema, i as blockFieldExtensionsSchema, j as sectionSpacingSchema, k as sectionBackgroundSchema, n as blockFieldConfigSchema, nt as describeInvalidTemplateBindingMetaPath, o as containerAlignmentSchema, q as contentTypeConfigSchema, r as blockFieldExtensionSchema, s as containerMaxWidthSchema, tt as TEMPLATE_BINDING_META_PATHS, u as fieldSelectOptionSchema, w as sdkWorkflowConfirmationSchema, x as sdkThemeConfigSchema, z as dashboardNavVisibilitySchema } from "./validation-3jOzYdPL.mjs";
|
|
3
3
|
import { t as SYSTEM_BLOCK_KINDS } from "./block-kinds-BCY9z3oB.mjs";
|
|
4
4
|
//#region src/config/bindings.ts
|
|
5
5
|
function fieldBinding(path) {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//#region src/portal/constants.ts
|
|
2
|
+
/**
|
|
3
|
+
* Portal Authentication Constants
|
|
4
|
+
*/
|
|
5
|
+
/** Cookie name for storing the portal session token */
|
|
6
|
+
const PORTAL_TOKEN_COOKIE = "portal_token";
|
|
7
|
+
/** Cookie max age in seconds (30 days) */
|
|
8
|
+
const PORTAL_COOKIE_MAX_AGE = 720 * 60 * 60;
|
|
9
|
+
/** Query parameter carrying an emailed sign-in token to the callback. GET stores it and consumes nothing. */
|
|
10
|
+
const PORTAL_ENTRY_PARAM = "portal_entry";
|
|
11
|
+
/** Short-lived private cookie holding the token and its destination, so neither is in the page's URL */
|
|
12
|
+
const PORTAL_ENTRY_COOKIE = "rb_portal_entry";
|
|
13
|
+
/**
|
|
14
|
+
* Entry cookie max age in seconds (one day). People often open the email, get distracted and press
|
|
15
|
+
* Continue later. The token already sits in their inbox for 30 days, so a day in a private cookie
|
|
16
|
+
* on the same device adds little.
|
|
17
|
+
*/
|
|
18
|
+
const PORTAL_ENTRY_COOKIE_MAX_AGE = 1440 * 60;
|
|
19
|
+
/** The fixed callback address on every site */
|
|
20
|
+
const PORTAL_CALLBACK_PATH = "/api/portal/callback";
|
|
21
|
+
/** The site page that shows Continue */
|
|
22
|
+
const PORTAL_ENTRY_PATH = "/portal/continue";
|
|
23
|
+
/** Query/form parameter name for redirect destination */
|
|
24
|
+
const REDIRECT_TO_PARAM = "redirect_to";
|
|
25
|
+
/** Canonical published-site path for the customer portal */
|
|
26
|
+
const CUSTOMER_PORTAL_PATH = "/portal";
|
|
27
|
+
/** Default redirect path for callback */
|
|
28
|
+
const DEFAULT_PORTAL_REDIRECT = CUSTOMER_PORTAL_PATH;
|
|
29
|
+
/** Default redirect path for logout */
|
|
30
|
+
const DEFAULT_LOGOUT_REDIRECT = "/";
|
|
31
|
+
/** Query parameter added to the redirect URL after a successful magic link login */
|
|
32
|
+
const PORTAL_LOGIN_SUCCESS_PARAM = "portal_login";
|
|
33
|
+
/** Where a booking email lands. The tab also tells the Continue page to say "See my booking". */
|
|
34
|
+
const PORTAL_TAB_PARAM = "portal_tab";
|
|
35
|
+
const PORTAL_EVENTS_TAB = "events";
|
|
36
|
+
const PORTAL_APPOINTMENTS_TAB = "appointments";
|
|
37
|
+
const PORTAL_MEMBERSHIPS_TAB = "passes-memberships";
|
|
38
|
+
const PORTAL_EVENTS_PATH = `${CUSTOMER_PORTAL_PATH}?${PORTAL_TAB_PARAM}=${PORTAL_EVENTS_TAB}`;
|
|
39
|
+
const PORTAL_APPOINTMENTS_PATH = `${CUSTOMER_PORTAL_PATH}?${PORTAL_TAB_PARAM}=${PORTAL_APPOINTMENTS_TAB}`;
|
|
40
|
+
//#endregion
|
|
41
|
+
export { PORTAL_TOKEN_COOKIE as _, PORTAL_APPOINTMENTS_TAB as a, PORTAL_ENTRY_COOKIE as c, PORTAL_ENTRY_PATH as d, PORTAL_EVENTS_PATH as f, PORTAL_TAB_PARAM as g, PORTAL_MEMBERSHIPS_TAB as h, PORTAL_APPOINTMENTS_PATH as i, PORTAL_ENTRY_COOKIE_MAX_AGE as l, PORTAL_LOGIN_SUCCESS_PARAM as m, DEFAULT_LOGOUT_REDIRECT as n, PORTAL_CALLBACK_PATH as o, PORTAL_EVENTS_TAB as p, DEFAULT_PORTAL_REDIRECT as r, PORTAL_COOKIE_MAX_AGE as s, CUSTOMER_PORTAL_PATH as t, PORTAL_ENTRY_PARAM as u, REDIRECT_TO_PARAM as v };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region src/routing/contentTypeResolver.ts
|
|
2
|
+
/**
|
|
3
|
+
* Convert local SDK ContentTypeConfig to ContentTypeRoutingInfo.
|
|
4
|
+
*
|
|
5
|
+
* Used to transform local SDK config content types into the minimal
|
|
6
|
+
* format needed for routing decisions.
|
|
7
|
+
*
|
|
8
|
+
* @param ct - ContentTypeConfig from SDK config
|
|
9
|
+
* @returns ContentTypeRoutingInfo for routing
|
|
10
|
+
*/
|
|
11
|
+
function toRoutingInfo(ct) {
|
|
12
|
+
return {
|
|
13
|
+
key: ct.key,
|
|
14
|
+
hasPages: ct.hasPages,
|
|
15
|
+
routePattern: ct.routePattern ?? null
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { toRoutingInfo as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as resolveDataLoaderBlockContent, n as getDataLoaderOwnerPageId, r as normalizeDataLoaderSearchParams, t as createDataLoaderContext } from "../dataLoaderContext-
|
|
1
|
+
import { i as resolveDataLoaderBlockContent, n as getDataLoaderOwnerPageId, r as normalizeDataLoaderSearchParams, t as createDataLoaderContext } from "../dataLoaderContext-lMRTfG5Z.mjs";
|
|
2
2
|
export { createDataLoaderContext, getDataLoaderOwnerPageId, normalizeDataLoaderSearchParams, resolveDataLoaderBlockContent };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as resolveBlockData, i as hasRegisteredDataLoaders, n as DEFAULT_RESOLVE_BLOCK_DATA_DEPS, o as resolveBlockDataWithDeps, r as createBlockDataLoadPolicy, s as warnHostDataLoaderFailure, t as CONFIG_ONLY_BLOCK_DATA_POLICY } from "../resolveBlockData-
|
|
1
|
+
import { a as resolveBlockData, i as hasRegisteredDataLoaders, n as DEFAULT_RESOLVE_BLOCK_DATA_DEPS, o as resolveBlockDataWithDeps, r as createBlockDataLoadPolicy, s as warnHostDataLoaderFailure, t as CONFIG_ONLY_BLOCK_DATA_POLICY } from "../resolveBlockData-BN8tweTx.mjs";
|
|
2
2
|
export { CONFIG_ONLY_BLOCK_DATA_POLICY, DEFAULT_RESOLVE_BLOCK_DATA_DEPS, createBlockDataLoadPolicy, hasRegisteredDataLoaders, resolveBlockData, resolveBlockDataWithDeps, warnHostDataLoaderFailure };
|
|
@@ -15,6 +15,7 @@ function assertNever(value) {
|
|
|
15
15
|
}
|
|
16
16
|
function getDataLoaderOwnerPageId(target) {
|
|
17
17
|
switch (target.kind) {
|
|
18
|
+
case "system-page": return target.path;
|
|
18
19
|
case "page": return target.pageId;
|
|
19
20
|
case "entry-template":
|
|
20
21
|
case "page-surface-template": return target.templateId;
|
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region ../api/src/defineEndpointDefinitions.ts
|
|
3
|
+
/**
|
|
4
|
+
* Validates extracted endpoint descriptors while preserving each literal path,
|
|
5
|
+
* method, and parameter contract for the typed URL builders.
|
|
6
|
+
*/
|
|
7
|
+
function defineEndpointDefinitions(definitions) {
|
|
8
|
+
return definitions;
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region ../api/src/clientErrorReporting.ts
|
|
12
|
+
const CLIENT_ERROR_REPORT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({ reportClientError: {
|
|
13
|
+
path: "/client/error-report",
|
|
14
|
+
method: "POST",
|
|
15
|
+
auth: "user",
|
|
16
|
+
errors: [],
|
|
17
|
+
responseKind: "json"
|
|
18
|
+
} });
|
|
19
|
+
const CLIENT_ERROR_REPORT_LIMITS = {
|
|
20
|
+
pathname: 1024,
|
|
21
|
+
name: 120,
|
|
22
|
+
message: 2e3,
|
|
23
|
+
stack: 8e3,
|
|
24
|
+
digest: 128,
|
|
25
|
+
componentStack: 8e3,
|
|
26
|
+
sourceLocation: 1024,
|
|
27
|
+
navigationAgeMs: 6e4
|
|
28
|
+
};
|
|
29
|
+
const clientErrorEventSchema = z.enum([
|
|
30
|
+
"dashboard:route-error",
|
|
31
|
+
"dashboard:app-error",
|
|
32
|
+
"client:error-boundary",
|
|
33
|
+
"client:window-error",
|
|
34
|
+
"client:unhandled-rejection"
|
|
35
|
+
]);
|
|
36
|
+
z.object({
|
|
37
|
+
event: clientErrorEventSchema,
|
|
38
|
+
pathname: z.string().startsWith("/").max(CLIENT_ERROR_REPORT_LIMITS.pathname),
|
|
39
|
+
name: z.string().max(CLIENT_ERROR_REPORT_LIMITS.name),
|
|
40
|
+
message: z.string().max(CLIENT_ERROR_REPORT_LIMITS.message),
|
|
41
|
+
stack: z.string().max(CLIENT_ERROR_REPORT_LIMITS.stack).nullable(),
|
|
42
|
+
digest: z.string().max(CLIENT_ERROR_REPORT_LIMITS.digest).nullable(),
|
|
43
|
+
componentStack: z.string().max(CLIENT_ERROR_REPORT_LIMITS.componentStack).nullable(),
|
|
44
|
+
sourceLocation: z.string().max(CLIENT_ERROR_REPORT_LIMITS.sourceLocation).nullable(),
|
|
45
|
+
navigation: z.object({
|
|
46
|
+
fromPathname: z.string().regex(/^\/[^?#]*$/).max(CLIENT_ERROR_REPORT_LIMITS.pathname),
|
|
47
|
+
toPathname: z.string().regex(/^\/[^?#]*$/).max(CLIENT_ERROR_REPORT_LIMITS.pathname),
|
|
48
|
+
type: z.enum([
|
|
49
|
+
"push",
|
|
50
|
+
"replace",
|
|
51
|
+
"traverse"
|
|
52
|
+
]),
|
|
53
|
+
ageMs: z.number().int().min(0).max(CLIENT_ERROR_REPORT_LIMITS.navigationAgeMs)
|
|
54
|
+
}).strict().nullable().optional()
|
|
55
|
+
}).strict();
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region ../api/src/common/capacityOverride.ts
|
|
58
|
+
const capacityOverrideRefusalSchema = z.object({
|
|
59
|
+
booked: z.number().int().nonnegative(),
|
|
60
|
+
held: z.number().int().nonnegative(),
|
|
61
|
+
capacity: z.number().int().nonnegative(),
|
|
62
|
+
name: z.string(),
|
|
63
|
+
retryPersonId: z.string().optional()
|
|
64
|
+
});
|
|
65
|
+
function isCapacityOverrideRefusal(value) {
|
|
66
|
+
return capacityOverrideRefusalSchema.safeParse(value).success;
|
|
67
|
+
}
|
|
68
|
+
const API_ERROR_CODE_SET = /* @__PURE__ */ new Set([
|
|
69
|
+
"auth:unauthenticated",
|
|
70
|
+
"auth:token_expired",
|
|
71
|
+
"auth:token_invalid",
|
|
72
|
+
"auth:forbidden",
|
|
73
|
+
"auth:mfa_required",
|
|
74
|
+
"auth:mfa_setup_required",
|
|
75
|
+
"auth:sudo_required",
|
|
76
|
+
"auth:insufficient_permissions",
|
|
77
|
+
"auth:impersonation_restricted",
|
|
78
|
+
"auth:lease_required",
|
|
79
|
+
"auth:lease_lost",
|
|
80
|
+
"client:editing_held",
|
|
81
|
+
"site_terms_changed",
|
|
82
|
+
"site_terms_agreement_missing",
|
|
83
|
+
"validation:invalid_input",
|
|
84
|
+
"validation:missing_field",
|
|
85
|
+
"validation:invalid_format",
|
|
86
|
+
"validation:payload_too_large",
|
|
87
|
+
"resource:not_found",
|
|
88
|
+
"resource:already_exists",
|
|
89
|
+
"resource:conflict",
|
|
90
|
+
"resource:gone",
|
|
91
|
+
"rate_limit:exceeded",
|
|
92
|
+
"billing:payment_required",
|
|
93
|
+
"billing:plan_limit_exceeded",
|
|
94
|
+
"billing:pass_redemption_failed",
|
|
95
|
+
"server:internal_error",
|
|
96
|
+
"server:unavailable",
|
|
97
|
+
"external:service_error",
|
|
98
|
+
"external:registrar_orphaned_contact_profile",
|
|
99
|
+
"network:connection_error",
|
|
100
|
+
"network:timeout",
|
|
101
|
+
"network:dns_error"
|
|
102
|
+
]);
|
|
103
|
+
function isApiErrorCode(value) {
|
|
104
|
+
return typeof value === "string" && API_ERROR_CODE_SET.has(value);
|
|
105
|
+
}
|
|
106
|
+
function isApiError(result) {
|
|
107
|
+
return result.success === false;
|
|
108
|
+
}
|
|
109
|
+
function isApiSuccess(result) {
|
|
110
|
+
return result.success === true;
|
|
111
|
+
}
|
|
112
|
+
function isRecord(value) {
|
|
113
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
114
|
+
}
|
|
115
|
+
function isFieldError(value) {
|
|
116
|
+
return isRecord(value) && typeof value.field === "string" && typeof value.code === "string" && typeof value.message === "string" && (value.capacityOverride === void 0 || isCapacityOverrideRefusal(value.capacityOverride));
|
|
117
|
+
}
|
|
118
|
+
function fieldErrorsFromUnknown(value) {
|
|
119
|
+
if (!Array.isArray(value)) return null;
|
|
120
|
+
return value.every(isFieldError) ? value : null;
|
|
121
|
+
}
|
|
122
|
+
function extractEnvelopeErrorObject(body) {
|
|
123
|
+
if (!isRecord(body)) return null;
|
|
124
|
+
const error = body.error;
|
|
125
|
+
if (!isRecord(error)) return null;
|
|
126
|
+
if ("success" in body && body.success !== false) return null;
|
|
127
|
+
return error;
|
|
128
|
+
}
|
|
129
|
+
function extractApiEnvelopeErrorDetails(body) {
|
|
130
|
+
const error = extractEnvelopeErrorObject(body);
|
|
131
|
+
if (!error) return {
|
|
132
|
+
rawCode: null,
|
|
133
|
+
code: null,
|
|
134
|
+
tag: null,
|
|
135
|
+
message: null,
|
|
136
|
+
status: null,
|
|
137
|
+
fieldErrors: null
|
|
138
|
+
};
|
|
139
|
+
const rawCode = typeof error.code === "string" ? error.code : null;
|
|
140
|
+
const message = typeof error.message === "string" && error.message.trim().length > 0 ? error.message : null;
|
|
141
|
+
return {
|
|
142
|
+
rawCode,
|
|
143
|
+
code: isApiErrorCode(rawCode) ? rawCode : null,
|
|
144
|
+
tag: typeof error.tag === "string" ? error.tag : null,
|
|
145
|
+
message,
|
|
146
|
+
status: typeof error.status === "number" && Number.isFinite(error.status) ? error.status : null,
|
|
147
|
+
fieldErrors: fieldErrorsFromUnknown(error.fieldErrors)
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Error class for API failures that can be thrown from unwrapResponse.
|
|
152
|
+
* Preserves all error metadata from the envelope.
|
|
153
|
+
*/
|
|
154
|
+
var ApiEnvelopeError = class extends Error {
|
|
155
|
+
constructor(error) {
|
|
156
|
+
super(error.message);
|
|
157
|
+
this.name = "ApiEnvelopeError";
|
|
158
|
+
this.code = error.code;
|
|
159
|
+
this.requestId = error.requestId;
|
|
160
|
+
this.timestamp = error.timestamp;
|
|
161
|
+
this.status = error.status;
|
|
162
|
+
this.tag = error.tag;
|
|
163
|
+
this.fieldErrors = error.fieldErrors;
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
* Unwrap a successful API response or throw on error.
|
|
168
|
+
*
|
|
169
|
+
* @example
|
|
170
|
+
* ```typescript
|
|
171
|
+
* const response = await apiClient({ endpoint: 'getUser', params: { id } });
|
|
172
|
+
* const user = unwrapResponse(response); // Throws if not success
|
|
173
|
+
* ```
|
|
174
|
+
*/
|
|
175
|
+
function unwrapResponse(result) {
|
|
176
|
+
if (isApiSuccess(result)) return result.data;
|
|
177
|
+
throw new ApiEnvelopeError(result.error);
|
|
178
|
+
}
|
|
179
|
+
//#endregion
|
|
180
|
+
//#region ../api/src/request-error.ts
|
|
181
|
+
var ApiRequestError = class extends Error {
|
|
182
|
+
constructor(message, options) {
|
|
183
|
+
super(message);
|
|
184
|
+
this.name = "ApiRequestError";
|
|
185
|
+
this.endpoint = options.endpoint;
|
|
186
|
+
this.status = options.status;
|
|
187
|
+
this.method = options.method;
|
|
188
|
+
this.auth = options.auth;
|
|
189
|
+
this.requestId = options.requestId;
|
|
190
|
+
this.body = options.body;
|
|
191
|
+
this.cause = options.cause;
|
|
192
|
+
this.errorCode = options.errorCode;
|
|
193
|
+
this.tag = options.tag;
|
|
194
|
+
this.retryAfterMs = options.retryAfterMs;
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
//#endregion
|
|
198
|
+
//#region src/client/error.ts
|
|
199
|
+
let _Symbol$for;
|
|
200
|
+
_Symbol$for = Symbol.for("nodejs.util.inspect.custom");
|
|
201
|
+
/**
|
|
202
|
+
* Error thrown by SDK when API returns an error response
|
|
203
|
+
*
|
|
204
|
+
* @example
|
|
205
|
+
* ```ts
|
|
206
|
+
* try {
|
|
207
|
+
* await client.getSite({ slug: 'my-site' });
|
|
208
|
+
* } catch (error) {
|
|
209
|
+
* if (error instanceof RiverbankApiError) {
|
|
210
|
+
* console.log('Error code:', error.code);
|
|
211
|
+
* console.log('Request ID:', error.requestId);
|
|
212
|
+
*
|
|
213
|
+
* if (error.isAuthError()) {
|
|
214
|
+
* // Handle authentication error
|
|
215
|
+
* }
|
|
216
|
+
*
|
|
217
|
+
* if (error.isValidationError() && error.fieldErrors) {
|
|
218
|
+
* // Handle field-level validation errors
|
|
219
|
+
* error.fieldErrors.forEach(fe => {
|
|
220
|
+
* console.log(`${fe.field}: ${fe.message}`);
|
|
221
|
+
* });
|
|
222
|
+
* }
|
|
223
|
+
*
|
|
224
|
+
* // Check if error can be retried
|
|
225
|
+
* if (error.isRetryable) {
|
|
226
|
+
* const delay = error.retryAfterMs ?? 1000;
|
|
227
|
+
* console.log(`Retrying after ${delay}ms...`);
|
|
228
|
+
* }
|
|
229
|
+
* }
|
|
230
|
+
* }
|
|
231
|
+
* ```
|
|
232
|
+
*/
|
|
233
|
+
var RiverbankApiError = class RiverbankApiError extends Error {
|
|
234
|
+
constructor(apiError) {
|
|
235
|
+
super(apiError.message);
|
|
236
|
+
this.name = "RiverbankApiError";
|
|
237
|
+
if ("cause" in apiError && apiError.cause) this.cause = apiError.cause;
|
|
238
|
+
this.code = apiError.code;
|
|
239
|
+
this.requestId = apiError.requestId;
|
|
240
|
+
this.status = apiError.status;
|
|
241
|
+
this.tag = apiError.tag;
|
|
242
|
+
this.fieldErrors = apiError.fieldErrors;
|
|
243
|
+
this.timestamp = apiError.timestamp;
|
|
244
|
+
this.retryAfterMs = "retryAfterMs" in apiError ? apiError.retryAfterMs : void 0;
|
|
245
|
+
this.isRetryable = this.computeRetryable();
|
|
246
|
+
Object.setPrototypeOf(this, RiverbankApiError.prototype);
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Compute whether this error is retryable based on HTTP status code.
|
|
250
|
+
* - 0 (network errors - no HTTP response): retryable
|
|
251
|
+
* - 429 (rate limit): retryable
|
|
252
|
+
* - 5xx (server errors): retryable
|
|
253
|
+
* - 4xx (client errors, except 429): NOT retryable
|
|
254
|
+
*/
|
|
255
|
+
computeRetryable() {
|
|
256
|
+
if (this.status === 0) return true;
|
|
257
|
+
if (this.status === 429) return true;
|
|
258
|
+
if (this.status >= 500) return true;
|
|
259
|
+
return false;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Check if this is a network error (no HTTP response received)
|
|
263
|
+
*
|
|
264
|
+
* Matches: network:connection_error, network:timeout, network:dns_error
|
|
265
|
+
*/
|
|
266
|
+
isNetworkError() {
|
|
267
|
+
return this.code.startsWith("network:");
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Check if this error matches a specific error code
|
|
271
|
+
*
|
|
272
|
+
* @example
|
|
273
|
+
* ```ts
|
|
274
|
+
* if (error.is('auth:unauthenticated')) {
|
|
275
|
+
* // Redirect to login
|
|
276
|
+
* }
|
|
277
|
+
* ```
|
|
278
|
+
*/
|
|
279
|
+
is(code) {
|
|
280
|
+
return this.code === code;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Check if this is an authentication or authorization error
|
|
284
|
+
*
|
|
285
|
+
* Matches: auth:unauthenticated, auth:token_expired, auth:token_invalid,
|
|
286
|
+
* auth:forbidden, auth:mfa_required, auth:insufficient_permissions
|
|
287
|
+
*/
|
|
288
|
+
isAuthError() {
|
|
289
|
+
return this.code.startsWith("auth:");
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Check if this is a validation error
|
|
293
|
+
*
|
|
294
|
+
* Matches: validation:invalid_input, validation:missing_field, validation:invalid_format
|
|
295
|
+
*/
|
|
296
|
+
isValidationError() {
|
|
297
|
+
return this.code.startsWith("validation:");
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Check if this is a resource error (not found, conflict, etc.)
|
|
301
|
+
*
|
|
302
|
+
* Matches: resource:not_found, resource:already_exists, resource:conflict, resource:gone
|
|
303
|
+
*/
|
|
304
|
+
isResourceError() {
|
|
305
|
+
return this.code.startsWith("resource:");
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Check if this is a rate limiting error
|
|
309
|
+
*/
|
|
310
|
+
isRateLimitError() {
|
|
311
|
+
return this.code.startsWith("rate_limit:");
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Check if this is a billing/payment error
|
|
315
|
+
*/
|
|
316
|
+
isBillingError() {
|
|
317
|
+
return this.code.startsWith("billing:");
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Check if this is a server error
|
|
321
|
+
*/
|
|
322
|
+
isServerError() {
|
|
323
|
+
return this.code.startsWith("server:");
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Returns a human-readable string representation of the error.
|
|
327
|
+
* Includes all key details for debugging.
|
|
328
|
+
*
|
|
329
|
+
* @example
|
|
330
|
+
* "RiverbankApiError: Content keys cannot access preview content | Code: auth:forbidden | Status: 401 | RequestId: req-abc123"
|
|
331
|
+
*/
|
|
332
|
+
toString() {
|
|
333
|
+
const parts = [`RiverbankApiError: ${this.message}`];
|
|
334
|
+
if (this.code) parts.push(`Code: ${this.code}`);
|
|
335
|
+
if (this.status) parts.push(`Status: ${this.status}`);
|
|
336
|
+
if (this.requestId) parts.push(`RequestId: ${this.requestId}`);
|
|
337
|
+
return parts.join(" | ");
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Custom Node.js inspect output for better console.log display.
|
|
341
|
+
* This ensures that console.log(error) shows all relevant details
|
|
342
|
+
* instead of just "[Object]" for nested properties.
|
|
343
|
+
*/
|
|
344
|
+
[_Symbol$for]() {
|
|
345
|
+
return this.toDetailedString();
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Returns a detailed multi-line string for debugging.
|
|
349
|
+
* Used by the Node.js inspect symbol for console output.
|
|
350
|
+
*/
|
|
351
|
+
toDetailedString() {
|
|
352
|
+
const lines = [
|
|
353
|
+
`RiverbankApiError: ${this.message}`,
|
|
354
|
+
` Code: ${this.code}`,
|
|
355
|
+
` Status: ${this.status}`,
|
|
356
|
+
` RequestId: ${this.requestId}`,
|
|
357
|
+
` Timestamp: ${this.timestamp}`
|
|
358
|
+
];
|
|
359
|
+
if (this.isRetryable) {
|
|
360
|
+
lines.push(` Retryable: true`);
|
|
361
|
+
if (this.retryAfterMs) lines.push(` RetryAfter: ${this.retryAfterMs}ms`);
|
|
362
|
+
}
|
|
363
|
+
if (this.fieldErrors && this.fieldErrors.length > 0) {
|
|
364
|
+
lines.push(" FieldErrors:");
|
|
365
|
+
this.fieldErrors.forEach((fe) => {
|
|
366
|
+
lines.push(` - ${fe.field}: ${fe.message}`);
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
return lines.join("\n");
|
|
370
|
+
}
|
|
371
|
+
};
|
|
372
|
+
const resilienceStatusSymbol = Symbol.for("riverbankcms.sdk.resilienceStatus");
|
|
373
|
+
function attachResilienceStatusToError(error, resilienceStatus) {
|
|
374
|
+
const target = error !== null && (typeof error === "object" || typeof error === "function") ? error : new Error(typeof error === "string" || typeof error === "number" || typeof error === "boolean" || typeof error === "bigint" ? String(error) : "Unknown error");
|
|
375
|
+
Object.defineProperty(target, resilienceStatusSymbol, {
|
|
376
|
+
configurable: true,
|
|
377
|
+
enumerable: false,
|
|
378
|
+
value: resilienceStatus
|
|
379
|
+
});
|
|
380
|
+
return target;
|
|
381
|
+
}
|
|
382
|
+
function getResilienceStatusFromError(error) {
|
|
383
|
+
if (error === null || typeof error !== "object" && typeof error !== "function") return;
|
|
384
|
+
return error[resilienceStatusSymbol];
|
|
385
|
+
}
|
|
386
|
+
//#endregion
|
|
387
|
+
export { ApiEnvelopeError as a, unwrapResponse as c, ApiRequestError as i, CLIENT_ERROR_REPORT_ENDPOINT_DEFINITIONS as l, attachResilienceStatusToError as n, extractApiEnvelopeErrorDetails as o, getResilienceStatusFromError as r, isApiError as s, RiverbankApiError as t, defineEndpointDefinitions as u };
|
package/dist/server/index.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { _ as parseMediaIdentifier, a as persistableMediaSchema, c as buildRenderableMediaAssetIndex, d as resolveManagedMediaReference, g as parseCanonicalMediaIdentifier, h as mediaIdentifierSchema, i as mediaSchema, l as renderableMediaAssetSchema, o as runtimeMediaSchema } from "./media-luf7RF22.mjs";
|
|
2
|
-
import { a as
|
|
2
|
+
import { a as derivePublishedRuntimeCacheKey, c as isPublishedRuntimeCacheKeyEndpoint, d as parsePublishedRuntimeCacheKeyDetails, f as parsePublishedRuntimeCachePayloadSchemaVersion, i as classifyPublishedRuntimeCacheFreshness, l as normalizeRuntimePublicPath, m as buildEndpointURL, o as resolveRuntimeCachePolicy, p as API_ENDPOINTS, s as DEFAULT_PUBLISHED_RUNTIME_CACHE_PAYLOAD_SCHEMA_VERSION, t as createRiverbankClient, u as parsePublishedRuntimeCacheKey } from "./client-CGJ2ztYp.mjs";
|
|
3
|
+
import { r as getResilienceStatusFromError, t as RiverbankApiError } from "./error-f4g44bKx.mjs";
|
|
3
4
|
import { t as SYSTEM_BLOCK_KINDS } from "./block-kinds-BCY9z3oB.mjs";
|
|
4
5
|
import { t as SDK_CORRELATION_HEADER_NAMES } from "./types-C2eBBV6E.mjs";
|
|
5
|
-
import { t as prebuildCache } from "./prebuild-
|
|
6
|
+
import { t as prebuildCache } from "./prebuild-8jNtDXmS.mjs";
|
|
6
7
|
import * as path from "path";
|
|
7
8
|
import * as fs from "fs";
|
|
8
9
|
//#region src/prebuild/loader.ts
|