@riverbankcms/sdk 0.160.0 → 0.162.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_dts/{BlocksIslandsHydrator-CoqeotCL.d.ts → BlocksIslandsHydrator-PZUoA872.d.ts} +1 -1
- package/dist/_dts/{Page-C0ENVLCF.d.ts → Page-CdQS6C7i.d.ts} +211 -9
- package/dist/_dts/{SdkPreviewMode-jZK0A49V.d.ts → SdkPreviewMode-CNGO-5f1.d.ts} +59 -92
- package/dist/_dts/{auth-contract-FPg0-2MC.d.ts → auth-contract-CgJ5nMaH.d.ts} +2 -0
- package/dist/_dts/{client-uMMuPq9V.d.ts → client-DGa53rjL.d.ts} +11 -3
- package/dist/_dts/{content-types-D6nXGqdQ.d.ts → content-types-K9R7P-KF.d.ts} +2 -2
- package/dist/_dts/{contracts-Bnmj1nxu.d.ts → contracts-CyBaPaIq.d.ts} +17 -5
- package/dist/_dts/{footerPageOutline-CeLjFX8b.d.ts → footerPageOutline-B6jmKmon.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-nyU8q02J.d.ts → generatePageMetadata-iemoR3AN.d.ts} +2 -2
- package/dist/_dts/{index-BaaGBY1v.d.ts → index-8CN0Nd-Z.d.ts} +2 -2
- package/dist/_dts/{index-nVoi_74l.d.ts → index-BtnsA14K.d.ts} +10 -20
- package/dist/_dts/{index-lkpjIg5i.d.ts → index-C39F9KaB.d.ts} +13 -2
- package/dist/_dts/{index-C5xslEBn.d.ts → index-DEu85xBt.d.ts} +1 -1
- package/dist/_dts/{schema-D0bNcPWK.d.ts → index-DI2yaSPY.d.ts} +22873 -19918
- package/dist/_dts/{types-D8czmbQF.d.ts → index-Dbd0Sn0G.d.ts} +4356 -1827
- package/dist/_dts/{index-CEaKil7G.d.ts → index-Du1IRglc.d.ts} +2 -2
- package/dist/_dts/{index-DahMwisK.d.ts → index-Jlcq6w69.d.ts} +3 -3
- package/dist/_dts/{index-Bg64CkV-.d.ts → index-Wm62sXf2.d.ts} +4 -4
- package/dist/_dts/{loadContent-CYLmzvLq.d.ts → loadContent-BPfAAZDW.d.ts} +13 -10
- package/dist/_dts/{resolvePageContent-DqnxChOs.d.ts → resolvePageContent-DWbrtKf8.d.ts} +2 -2
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- 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/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 +2 -2
- package/dist/_dts/sdk/src/next/index.d.ts +7 -7
- 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 +1 -1
- 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/preview-next/keep-alive.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/session.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
- package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
- package/dist/_dts/{session-Ba2CsnK5.d.ts → session-C_gtSFyZ.d.ts} +2 -1
- package/dist/_dts/{types-DSgmJ15W.d.ts → types-CVv2H4AT.d.ts} +7 -7
- package/dist/_dts/{types-CFrYuXYP.d.ts → types-CfNG5koF.d.ts} +4 -2
- package/dist/_dts/{types-Dm-KW7nj.d.ts → types-ClZ-BQL_.d.ts} +3 -3
- package/dist/_dts/{validation-Bmb4WnHg.d.ts → validation-BJ6Lf_Dr.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-DZRKi6tT.mjs → BlocksIslandsHydrator-COqlgWYU.mjs} +23 -21
- package/dist/client/{BookingMailingListNote-C00sLLdL.mjs → BookingMailingListNote-CFYPDEHH.mjs} +1 -1
- package/dist/client/{CalendarNavigationChevron-CHSi9b3E.mjs → CalendarNavigationChevron-COBVxgHb.mjs} +6 -6
- package/dist/client/{CheckboxChoice-Bhm6RAUL.mjs → CheckboxChoice-C7X9dJ8A.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-CaN-7ui7.mjs → DemoBookingPortalAccess-CvT0E9AR.mjs} +26 -10
- package/dist/client/{DemoPortalSignInLink-ClxN5_xZ.mjs → DemoPortalSignInLink-EBOBN5dT.mjs} +1 -1
- package/dist/client/{EventCalendar.client-BncvSa1n.mjs → EventCalendar.client-U6pKcntV.mjs} +16 -17
- package/dist/client/{EventCombined.client-DluBxVVu.mjs → EventCombined.client-CNzwEHws.mjs} +8 -8
- package/dist/client/{EventEmbeddedCheckoutStep-BiJrMtfp.mjs → EventEmbeddedCheckoutStep-B9yAWV_k.mjs} +1 -1
- package/dist/client/{EventItem-CXhnT9pF.mjs → EventItem-M5rpaHxi.mjs} +4 -4
- package/dist/client/{EventListWeekNavigation-V-dtoDlD.mjs → EventListWeekNavigation-D4ieBLDY.mjs} +1 -1
- package/dist/client/{EventListing.client-DPO6SZbx.mjs → EventListing.client-B8F40Rmn.mjs} +3 -3
- package/dist/client/{EventListing.view-B-Yi5JZS.mjs → EventListing.view-k4lhuCn5.mjs} +15 -6
- package/dist/client/{EventRegistrationPayment-Dc3Fnlnw.mjs → EventRegistrationPayment-C3g8_Hqb.mjs} +25 -13
- package/dist/client/LocationMapActions-CAjt7qVo.mjs +62 -0
- package/dist/client/MapDrawingSvg-_aIK2ojv.mjs +200 -0
- package/dist/client/{Page-7PkzO04N.mjs → Page-DJBIQBOw.mjs} +2555 -536
- package/dist/client/{StepIndicator-DiD6euZ8.mjs → StepIndicator-CFacB1z6.mjs} +2 -2
- package/dist/client/{TabBarFragment-BHd8GN8y.mjs → TabBarFragment-BLsfQskO.mjs} +1 -1
- package/dist/client/ThemedButton-BWsDgjMC.mjs +2243 -0
- package/dist/client/{accordion-2m27DsIk.mjs → accordion-CtO2XF7M.mjs} +1 -1
- package/dist/client/{booking-form.client-BddWV5w1.mjs → booking-form.client-RICCQ0h2.mjs} +137 -60
- package/dist/client/{bookingForm-bcdXQjmw.mjs → bookingForm-SvjLPx8i.mjs} +4 -4
- package/dist/client/bookings.mjs +5 -5
- package/dist/client/{carousel-D7nj9I0y.mjs → carousel-BR-zCD3O.mjs} +2 -2
- package/dist/client/{carousel.client-AffDJo_s.mjs → carousel.client-CEWtoZd3.mjs} +1 -1
- package/dist/client/{cart-PN6yCw1H.mjs → cart-C6YpKbZZ.mjs} +3 -3
- package/dist/client/{cart.client-D4t1f0cJ.mjs → cart.client-dC938WrX.mjs} +1 -1
- package/dist/client/{checkout-CsTwXVSb.mjs → checkout-Dy9RlREI.mjs} +3 -3
- package/dist/client/{checkout.client-BhQE3zY7.mjs → checkout.client-CefG0d2F.mjs} +1 -1
- package/dist/client/client.mjs +37 -71
- package/dist/client/{context-BLAvalAa.mjs → context-BFwxgZpB.mjs} +28 -1
- package/dist/client/{cta-CUXhX_D7.mjs → cta-DtA42Xio.mjs} +1 -1
- package/dist/client/{dateFormatting-BHIHxNuo.mjs → dateFormatting-yP1B7F0O.mjs} +39 -2
- package/dist/client/{demoPortalMagicLink-R-awbk_0.mjs → demoPortalMagicLink-WOiT5Ryi.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-9Q93uvTo.mjs → enhanceHeaderSection-Dh8c_Lq-.mjs} +3 -3
- package/dist/client/{event-details.client-BS1WtG-a.mjs → event-details.client-BFgsLqTj.mjs} +3 -17
- package/dist/client/{event-registration.client-BXndwsET.mjs → event-registration.client-BaXZ1-Ky.mjs} +16 -16
- package/dist/client/{eventCalendar-HyoOt1Qz.mjs → eventCalendar-COLwF80U.mjs} +4 -4
- package/dist/client/{eventCombined-sdG5oEaH.mjs → eventCombined-D3Ltwu03.mjs} +4 -4
- package/dist/client/{eventDetails-FFAknE4w.mjs → eventDetails-CBrkimXu.mjs} +2 -2
- package/dist/client/{eventListing-CGK6urk3.mjs → eventListing-CedKVA1S.mjs} +4 -4
- package/dist/client/{eventRegistration-VhrvCs4l.mjs → eventRegistration-DkQQfR1b.mjs} +4 -4
- package/dist/client/{form-C-B5O_ko.mjs → form-XFy9uXSJ.mjs} +3 -3
- package/dist/client/{form.client-DoZVcl8d.mjs → form.client-B0iancFK.mjs} +4 -4
- package/dist/client/{form.parts-mttKpgif.mjs → form.parts-DMbolu9Y.mjs} +3 -3
- package/dist/client/{formatDate-xUSCknEO.mjs → formatDate-Jm5MQOCA.mjs} +1 -1
- package/dist/client/gifting/client.mjs +3 -3
- package/dist/client/{headerSection-BHUEXsaI.mjs → headerSection-WjlECjtV.mjs} +2 -2
- package/dist/client/{mediaAssets-BOj-Co0B.mjs → mediaAssets-BkoW_PEn.mjs} +1 -1
- package/dist/client/{mediaContext-DThoeEBU.mjs → mediaContext-CNzWmoA4.mjs} +1 -1
- package/dist/client/{newsletter-form.client-D_n0rftg.mjs → newsletter-form.client-D-XwJTjN.mjs} +5 -5
- package/dist/client/{newsletter-form.parts-DKHye4IE.mjs → newsletter-form.parts-H92f30y0.mjs} +2 -2
- package/dist/client/{newsletterForm-tEaYelzx.mjs → newsletterForm-DMuxzu6I.mjs} +3 -3
- package/dist/client/{noop-B610YKEx.mjs → noop-B3RNPVrt.mjs} +313 -3
- package/dist/client/portal/client.mjs +1116 -85
- package/dist/client/{product-detail.client-DUf5x5Jt.mjs → product-detail.client-B3HuuykE.mjs} +1 -1
- package/dist/client/{product-list.client-Cqp1BPTV.mjs → product-list.client-CzsDrHQO.mjs} +1 -1
- package/dist/client/{productDetail-B8bBiogP.mjs → productDetail-CbBUVWgd.mjs} +3 -3
- package/dist/client/{productList-BKN4D-1z.mjs → productList-vqOKH2mh.mjs} +3 -3
- package/dist/client/{propsDecoder-2nNZh2Oe.mjs → propsDecoder-CkSUep5a.mjs} +4 -28
- package/dist/client/{registry.server-BAm4RPNJ.mjs → registry.server-cZ24QwtW.mjs} +607 -210
- package/dist/client/rendering/client.mjs +28 -28
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +18 -9
- package/dist/client/{richText-coerce-Cv-qomNB.mjs → richText-coerce-DDcCKvBJ.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-C5u8MbAA.mjs → routeIslandApiConfig-DYBioANh.mjs} +1 -1
- package/dist/client/{ThemedButton-C22C9cCF.mjs → schema-DNHLlze-.mjs} +7307 -8363
- package/dist/client/{shop-DZNC0VKk.mjs → shop-CF0dhnfH.mjs} +3 -3
- package/dist/client/{shop-commerce-DdX4LSa3.mjs → shop-commerce-DQznNBEo.mjs} +11 -11
- package/dist/client/{shop-commerce-store-BJtrZov9.mjs → shop-commerce-store-Ba8zPlIg.mjs} +1 -1
- package/dist/client/{shop.client-DmDd-igg.mjs → shop.client-DqfYoqWH.mjs} +12 -12
- package/dist/client/{shop.interactive-5SnnDHz3.mjs → shop.interactive-CreQ0I7i.mjs} +38 -183
- package/dist/client/{shopShared-CPqUlAh9.mjs → shopShared-D-yh-P7g.mjs} +2 -2
- package/dist/client/site-styles-B9HgmY07.mjs +11619 -0
- package/dist/client/{timetableModel-C19rcHEw.mjs → timetableModel-DCdVErTJ.mjs} +149 -8
- package/dist/client/{useAvailableSlots-BjbJXotk.mjs → useAvailableSlots-Cvgdp2DH.mjs} +8 -11
- package/dist/client/{useBookingNowIso-CMgfL7YJ.mjs → useBookingNowIso-DrTnGNzD.mjs} +1 -1
- package/dist/client/{useDiscountApply-KG8jB7WC.mjs → useDiscountApply-CULjnXGl.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-DK2w_i0a.mjs → useDiscountCodeUi-Gn_m7e0o.mjs} +1 -1
- package/dist/client/{useEventPagination-DW6MCirb.mjs → useEventPagination-CsysCF22.mjs} +8 -21
- package/dist/client/{view-CseyBW07.mjs → view-BpBjo9Te.mjs} +71 -59
- package/dist/client/{view-CkUn3Y0Y.mjs → view-DMyTchi7.mjs} +4 -4
- package/dist/client/wizardSteps-BO2OmMO9.mjs +6604 -0
- package/dist/preview-next/before-render.mjs +7 -6
- package/dist/preview-next/chrome.css +2 -0
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-lUHBrzHv.mjs → EventEmbeddedCheckoutStep-DLsSmZbO.mjs} +2 -1
- package/dist/preview-next/client/LocationPickerEnvironment-QtSG2Bl-.mjs +138 -0
- package/dist/preview-next/client/MapLibreEditMap-B-rohNcG.mjs +488 -0
- package/dist/preview-next/client/{PreviewEditorSidebar-DWyUGCAG.mjs → PreviewEditorSidebar-ChrW9VEo.mjs} +269 -1100
- package/dist/preview-next/client/{PreviewEditorUI-Wq0b3Daw.mjs → PreviewEditorUI-VaHvYtrA.mjs} +10 -190
- package/dist/preview-next/client/{SdkPreviewModeRuntime-BtZPcwYV.mjs → SdkPreviewModeRuntime-Bz7jR6nl.mjs} +1 -1
- package/dist/preview-next/client/{SdkPreviewModeRuntime-wSI_R361.mjs → SdkPreviewModeRuntime-DWwktlWs.mjs} +639 -536
- package/dist/preview-next/client/{ThemedButton-DzeycIlD.mjs → ThemedButton-CHKOWXxl.mjs} +1706 -692
- package/dist/preview-next/client/lucide-react-CA9cpo0P.mjs +51984 -0
- package/dist/preview-next/client/maplibre-gl-DykfOYYn.mjs +34208 -0
- package/dist/preview-next/client/{SiteChromeCustomizeContext-Hc4pYnNe.mjs → previewAuthStore-C0VUwEHz.mjs} +81363 -136296
- package/dist/preview-next/client/{previewChromeSurface-Corq4AG7.mjs → previewChromeSurface-Dhyx2YrS.mjs} +1 -1
- package/dist/preview-next/client/result-BjJUoxUF.mjs +16 -0
- package/dist/preview-next/client/rolldown-runtime-CE6sIgz8.mjs +34 -0
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-CWymRWhK.mjs → sdk-runtime-C2GWOCyj.mjs} +1 -1
- package/dist/preview-next/client/siteStyleAccess-DHyzUpv4.mjs +12833 -0
- package/dist/preview-next/client/{spinner-C4If5Y-O.mjs → spinner-BeR2S8oG.mjs} +2 -1
- package/dist/preview-next/{constants-D8Ya7bO4.mjs → constants-Bf-vqdKH.mjs} +2 -1
- package/dist/preview-next/editor-base.css +2 -2
- package/dist/preview-next/keepAlive.mjs +3 -3
- package/dist/preview-next/middleware.mjs +7 -3
- package/dist/preview-next/{refresh-contract-CvmNqZ1Q.mjs → refresh-contract-uQ6BXgLJ.mjs} +5 -0
- package/dist/preview-next/{route-contract-8csADeIT.mjs → route-contract-CkrFDMrl.mjs} +434 -203
- package/dist/preview-next/{session-BgkrPqu0.mjs → session-P1R_ajT7.mjs} +12 -2
- package/dist/preview-next/session.mjs +1 -1
- package/dist/server/{Block.shared-D1_gonwM.mjs → Block.shared-DxvNGDig.mjs} +4 -4
- package/dist/server/{bindings-CFmJg5lm.mjs → bindings-BuhKvYkE.mjs} +2 -1
- package/dist/server/{client-DPsi0Dai.mjs → client-BobW6DOz.mjs} +39 -72
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/{siteChromeOverlayClearance-DALIAMwo.mjs → effectiveNavLinkStyle-B-MKSt0p.mjs} +2060 -1680
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-RMCcuVU_.mjs → loadContent-CCG_3mbY.mjs} +14 -5
- package/dist/server/loadPage-Bk9HDh9K.mjs +2 -0
- package/dist/server/{loadPage-DhDGzj7t.mjs → loadPage-jntGoMrf.mjs} +3 -2
- package/dist/server/next.mjs +9 -9
- package/dist/server/{overrideResolution-OxY5FMuy.mjs → overrideResolution-BBOlgn4Z.mjs} +1 -1
- package/dist/server/{overrides-Bz_A6sB9.mjs → overrides-DByQwIyW.mjs} +803 -412
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{prebuild-B_1vrSru.mjs → prebuild-DrwcTk2t.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-B7ukYXXR.mjs → prefetchBlockData-LfgxSJYE.mjs} +156 -89
- package/dist/server/{publicProducts-Djbpc81A.mjs → publicProducts-8A3T5v4M.mjs} +685 -166
- package/dist/server/{registry-eFjKtEhF.mjs → registry-Digv02oV.mjs} +780 -1052
- package/dist/server/rendering/server.mjs +4 -4
- package/dist/server/rendering.mjs +8 -8
- package/dist/server/{resolveBlockData-DYvEa9c5.mjs → resolveBlockData-C23t8-77.mjs} +1 -1
- package/dist/server/routing.mjs +1 -1
- package/dist/server/{schema-C3dJ5UkL.mjs → schema-BiqpDRwB.mjs} +4805 -3561
- package/dist/server/server.mjs +3 -3
- package/dist/server/site-styles-DrkprQPL.mjs +755 -0
- package/dist/server/siteChromeOverlayClearance-BmKKkkbh.mjs +750 -0
- package/dist/server/{src-C5Mu-z0F.mjs → src-08GY1njw.mjs} +1060 -44
- package/dist/server/theme-bridge.mjs +1 -1
- package/dist/server/theme.mjs +1 -1
- package/dist/server/{themeAdmission-ruoyXb_0.mjs → themeAdmission-CSd_Vusz.mjs} +151 -53
- package/dist/server/{validation-B-Xar8QS.mjs → validation-DdUTkBOZ.mjs} +2 -2
- package/dist/server/{version-Bg7VHK3i.mjs → version-DdIOqIDe.mjs} +1 -1
- package/dist/styles/index.css +1029 -41
- package/package.json +1 -1
- package/dist/_dts/index-Blwl7yl6.d.ts +0 -13
- package/dist/client/LeafletStaticMap-ClZCCzAm.mjs +0 -135
- package/dist/client/location-map.client-Cylb_MHw.mjs +0 -28
- package/dist/client/location-map.view-Cx4Bl7ij.mjs +0 -345
- package/dist/client/locationMap-QnKJi-nZ.mjs +0 -15
- package/dist/client/renderableMediaAssetAdmission-DGjBr_e-.mjs +0 -152
- package/dist/client/wizardSteps-zgq10lN1.mjs +0 -17181
- package/dist/preview-next/client/siteStyleAccess-QZkJRHl5.mjs +0 -1359
- package/dist/server/loadPage-DUPP51C-.mjs +0 -2
- package/dist/server/media-CcHwZkdJ.mjs +0 -243
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { br as parseSiteId, un as parseSurfaceTree } from "./schema-BiqpDRwB.mjs";
|
|
2
|
+
import "./site-styles-DrkprQPL.mjs";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
const PUBLIC_CONTENT_FRESHNESS_SECONDS = 3600;
|
|
3
5
|
function availability(transport) {
|
|
@@ -53,6 +55,14 @@ function publicReadFreshnessSeconds(endpoint) {
|
|
|
53
55
|
return getPublicReadCachePolicy(endpoint).freshness === "availability" ? 60 : PUBLIC_CONTENT_FRESHNESS_SECONDS;
|
|
54
56
|
}
|
|
55
57
|
//#endregion
|
|
58
|
+
//#region ../core/src/committed-write-proof.ts
|
|
59
|
+
/** Positive atomic storage evidence survives a failed response projection. */
|
|
60
|
+
const committedWriteProofSchema = z.object({
|
|
61
|
+
operationId: z.string().uuid(),
|
|
62
|
+
committedAt: z.string(),
|
|
63
|
+
resultingRevision: z.number().int().nonnegative()
|
|
64
|
+
});
|
|
65
|
+
//#endregion
|
|
56
66
|
//#region ../blocks/src/system/data/loaderEndpoints.ts
|
|
57
67
|
const SUPPORTED_LOADER_ENDPOINTS = [
|
|
58
68
|
"listPublishedEntries",
|
|
@@ -81,6 +91,7 @@ const PAGE_JOURNAL_ENDPOINT_DEFINITIONS = {
|
|
|
81
91
|
method: "POST",
|
|
82
92
|
auth: "user",
|
|
83
93
|
responseKind: "json",
|
|
94
|
+
editLease: "unleased-editor",
|
|
84
95
|
errors: [
|
|
85
96
|
"validation:invalid_input",
|
|
86
97
|
"auth:forbidden",
|
|
@@ -311,6 +322,22 @@ const PUBLIC_NEWSLETTER_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
311
322
|
//#endregion
|
|
312
323
|
//#region ../api/src/cache-tags.ts
|
|
313
324
|
/**
|
|
325
|
+
* Canonical cache tag catalog for Riverbank.
|
|
326
|
+
*
|
|
327
|
+
* Goal: eliminate ad-hoc tag strings and drift across apps/packages.
|
|
328
|
+
*
|
|
329
|
+
* Tag scheme: `riverbank:*`
|
|
330
|
+
* - `riverbank` is the global tag (invalidate everything)
|
|
331
|
+
* - Use `riverbank:<namespace>:...` for domain/resource tags
|
|
332
|
+
*
|
|
333
|
+
* Notes:
|
|
334
|
+
* - This module is intentionally Next.js-independent.
|
|
335
|
+
* - Apps can use these tags with Next's `revalidateTag()` and `unstable_cache`.
|
|
336
|
+
* - Endpoint definitions in `packages/api/src/endpoints.ts` may use the template
|
|
337
|
+
* strings (with `{param}` placeholders) for fetch cache tagging.
|
|
338
|
+
*/
|
|
339
|
+
const RIVERBANK_GLOBAL_TAG = "riverbank";
|
|
340
|
+
/**
|
|
314
341
|
* Tag templates for endpoint definitions (support `{param}` placeholders).
|
|
315
342
|
*/
|
|
316
343
|
const TAG_TEMPLATES = {
|
|
@@ -349,6 +376,186 @@ const TAG_TEMPLATES = {
|
|
|
349
376
|
navigationItemById: "riverbank:navigation-item:{itemId}",
|
|
350
377
|
siteTheme: "riverbank:site:{siteId}:theme"
|
|
351
378
|
};
|
|
379
|
+
function normalizeRevalidateTags(input) {
|
|
380
|
+
return Array.from(new Set(input.map((t) => t.trim()).filter(Boolean)));
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Tag builders for runtime invalidation and caching.
|
|
384
|
+
*/
|
|
385
|
+
const tags = {
|
|
386
|
+
global() {
|
|
387
|
+
return RIVERBANK_GLOBAL_TAG;
|
|
388
|
+
},
|
|
389
|
+
siteCollection() {
|
|
390
|
+
return TAG_TEMPLATES.siteCollection;
|
|
391
|
+
},
|
|
392
|
+
site(siteId) {
|
|
393
|
+
return `riverbank:site:${siteId}`;
|
|
394
|
+
},
|
|
395
|
+
siteById(siteId) {
|
|
396
|
+
return `riverbank:site:id:${siteId}`;
|
|
397
|
+
},
|
|
398
|
+
siteBySlug(slug) {
|
|
399
|
+
return `riverbank:site:slug:${slug}`;
|
|
400
|
+
},
|
|
401
|
+
siteByDomain(domain) {
|
|
402
|
+
return `riverbank:site:domain:${domain}`;
|
|
403
|
+
},
|
|
404
|
+
siteSettings(siteId) {
|
|
405
|
+
return `riverbank:site:${siteId}:settings`;
|
|
406
|
+
},
|
|
407
|
+
siteEmailSettings(siteId) {
|
|
408
|
+
return `riverbank:site:${siteId}:email-settings`;
|
|
409
|
+
},
|
|
410
|
+
siteBookingSettings(siteId) {
|
|
411
|
+
return `riverbank:site:${siteId}:booking-settings`;
|
|
412
|
+
},
|
|
413
|
+
siteNewsletter(siteId) {
|
|
414
|
+
return `riverbank:site:${siteId}:newsletter`;
|
|
415
|
+
},
|
|
416
|
+
siteRoutableContent(siteId) {
|
|
417
|
+
return `riverbank:site:${siteId}:routable-content`;
|
|
418
|
+
},
|
|
419
|
+
siteRedirects(siteId) {
|
|
420
|
+
return `riverbank:site:${siteId}:redirects`;
|
|
421
|
+
},
|
|
422
|
+
siteRouteOutcomes(siteId) {
|
|
423
|
+
return `riverbank:site:${siteId}:route-outcomes`;
|
|
424
|
+
},
|
|
425
|
+
route(routeId) {
|
|
426
|
+
return `riverbank:route:${routeId}`;
|
|
427
|
+
},
|
|
428
|
+
page(pageId) {
|
|
429
|
+
return `riverbank:page:${pageId}`;
|
|
430
|
+
},
|
|
431
|
+
pageSurface(pageSurfaceId) {
|
|
432
|
+
return `riverbank:page-surface:${pageSurfaceId}`;
|
|
433
|
+
},
|
|
434
|
+
surfaceSlot(surfaceSlotId) {
|
|
435
|
+
return `riverbank:surface-slot:${surfaceSlotId}`;
|
|
436
|
+
},
|
|
437
|
+
workflowRun(runId) {
|
|
438
|
+
return `riverbank:workflow-run:${runId}`;
|
|
439
|
+
},
|
|
440
|
+
siteForms(siteId) {
|
|
441
|
+
return `riverbank:site:${siteId}:forms`;
|
|
442
|
+
},
|
|
443
|
+
form(formId) {
|
|
444
|
+
return `riverbank:form:${formId}`;
|
|
445
|
+
},
|
|
446
|
+
entry(entryId) {
|
|
447
|
+
return `riverbank:entry:${entryId}`;
|
|
448
|
+
},
|
|
449
|
+
formSubmissionsBySlug(slug) {
|
|
450
|
+
return `riverbank:form-submissions:${slug}`;
|
|
451
|
+
},
|
|
452
|
+
publicEvents(siteId) {
|
|
453
|
+
return `riverbank:site:${siteId}:public-events`;
|
|
454
|
+
},
|
|
455
|
+
publicEventFilters(siteId) {
|
|
456
|
+
return `riverbank:site:${siteId}:public-event-filters`;
|
|
457
|
+
},
|
|
458
|
+
publicTeamMembers(siteId) {
|
|
459
|
+
return `riverbank:site:${siteId}:public-team-members`;
|
|
460
|
+
},
|
|
461
|
+
publicProducts(siteId) {
|
|
462
|
+
return `riverbank:site:${siteId}:public-products`;
|
|
463
|
+
},
|
|
464
|
+
publicPasses(siteId) {
|
|
465
|
+
return `riverbank:site:${siteId}:public-passes`;
|
|
466
|
+
},
|
|
467
|
+
publicMemberships(siteId) {
|
|
468
|
+
return `riverbank:site:${siteId}:public-memberships`;
|
|
469
|
+
},
|
|
470
|
+
publicGifting(siteId) {
|
|
471
|
+
return `riverbank:site:${siteId}:public-gifting`;
|
|
472
|
+
},
|
|
473
|
+
publicShop(siteId) {
|
|
474
|
+
return `riverbank:site:${siteId}:public-shop`;
|
|
475
|
+
},
|
|
476
|
+
publicCheckout(siteId) {
|
|
477
|
+
return `riverbank:site:${siteId}:public-checkout`;
|
|
478
|
+
},
|
|
479
|
+
publicBookingServices(siteId) {
|
|
480
|
+
return `riverbank:site:${siteId}:public-booking-services`;
|
|
481
|
+
},
|
|
482
|
+
/**
|
|
483
|
+
* Slot-level appointment availability for a site (dates, slots, weekly grid).
|
|
484
|
+
* Separate from `publicBookingServices` because every appointment booked or
|
|
485
|
+
* cancelled changes availability, while the service catalogue rarely moves.
|
|
486
|
+
*/
|
|
487
|
+
publicBookingAvailability(siteId) {
|
|
488
|
+
return `riverbank:site:${siteId}:public-booking-availability`;
|
|
489
|
+
},
|
|
490
|
+
siteNavigation(siteId) {
|
|
491
|
+
return `riverbank:site:${siteId}:navigation`;
|
|
492
|
+
},
|
|
493
|
+
navigationMenu(menuId) {
|
|
494
|
+
return `riverbank:navigation-menu:${menuId}`;
|
|
495
|
+
},
|
|
496
|
+
navigationItem(itemId) {
|
|
497
|
+
return `riverbank:navigation-item:${itemId}`;
|
|
498
|
+
},
|
|
499
|
+
siteTheme(siteId) {
|
|
500
|
+
return `riverbank:site:${siteId}:theme`;
|
|
501
|
+
}
|
|
502
|
+
};
|
|
503
|
+
/** Lookup tags work before a host/slug read knows the resolved site ID. */
|
|
504
|
+
function optionalLookupTag(value, build) {
|
|
505
|
+
return typeof value === "string" && value.trim() ? [build(value.trim())] : [];
|
|
506
|
+
}
|
|
507
|
+
function buildSiteReadTags(params) {
|
|
508
|
+
return normalizeRevalidateTags([
|
|
509
|
+
...optionalLookupTag(params.siteId, (id) => tags.site(normalizeSiteCacheId(id))),
|
|
510
|
+
...optionalLookupTag(params.id, (id) => tags.siteById(normalizeSiteCacheId(id))),
|
|
511
|
+
...optionalLookupTag(params.slug, tags.siteBySlug),
|
|
512
|
+
...optionalLookupTag(params.domain, (domain) => tags.siteByDomain(normalizeSiteCacheDomain(domain)))
|
|
513
|
+
]);
|
|
514
|
+
}
|
|
515
|
+
/** Resolve endpoint templates once; every read with a siteId shares its root tag. */
|
|
516
|
+
function buildCacheReadTags(templates, input = {}) {
|
|
517
|
+
const params = siteIdentifierTagParams(input);
|
|
518
|
+
return normalizeRevalidateTags([...templates.flatMap((template) => {
|
|
519
|
+
if ([
|
|
520
|
+
TAG_TEMPLATES.siteById,
|
|
521
|
+
TAG_TEMPLATES.siteBySlug,
|
|
522
|
+
TAG_TEMPLATES.siteByDomain
|
|
523
|
+
].some((lookup) => lookup === template)) return [];
|
|
524
|
+
const tag = template.replace(/\{([^}]+)\}/gu, (placeholder, key) => {
|
|
525
|
+
const value = params[key];
|
|
526
|
+
return typeof value === "string" || typeof value === "number" || typeof value === "boolean" ? String(value) : placeholder;
|
|
527
|
+
});
|
|
528
|
+
return /\{[^}]+\}/u.test(tag) || tag === tags.siteCollection() || tag === "riverbank" ? [] : [tag];
|
|
529
|
+
}), ...buildSiteReadTags({
|
|
530
|
+
siteId: params.siteId,
|
|
531
|
+
...templates.includes(TAG_TEMPLATES.siteById) ? { id: params.id } : {},
|
|
532
|
+
...templates.includes(TAG_TEMPLATES.siteBySlug) ? { slug: params.slug } : {},
|
|
533
|
+
...templates.includes(TAG_TEMPLATES.siteByDomain) ? { domain: params.domain } : {}
|
|
534
|
+
})]);
|
|
535
|
+
}
|
|
536
|
+
function normalizeSiteCacheDomain(domain) {
|
|
537
|
+
try {
|
|
538
|
+
return new URL(`https://${domain.trim()}`).hostname.toLowerCase().replace(/\.$/u, "");
|
|
539
|
+
} catch {
|
|
540
|
+
return domain.trim().toLowerCase();
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
function siteIdentifierTagParams(params) {
|
|
544
|
+
if (typeof params.site !== "string") return params;
|
|
545
|
+
const siteId = parseSiteId(params.site);
|
|
546
|
+
return siteId.ok ? {
|
|
547
|
+
...params,
|
|
548
|
+
id: siteId.value,
|
|
549
|
+
siteId: siteId.value
|
|
550
|
+
} : {
|
|
551
|
+
...params,
|
|
552
|
+
slug: params.site
|
|
553
|
+
};
|
|
554
|
+
}
|
|
555
|
+
function normalizeSiteCacheId(id) {
|
|
556
|
+
const parsed = parseSiteId(id);
|
|
557
|
+
return parsed.ok ? parsed.value : id;
|
|
558
|
+
}
|
|
352
559
|
//#endregion
|
|
353
560
|
//#region ../api/src/sdkEntryReadEndpoints.ts
|
|
354
561
|
const SDK_ENTRY_READ_ENDPOINTS = {
|
|
@@ -398,18 +605,6 @@ const GUARDED_CONTENT_REPLAY_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
398
605
|
"resource:conflict"
|
|
399
606
|
]
|
|
400
607
|
},
|
|
401
|
-
restoreLiveTemplate: {
|
|
402
|
-
path: "/sites/{siteId}/content/types/{type}/template/restore",
|
|
403
|
-
method: "POST",
|
|
404
|
-
tags: ["site-{siteId}", "content-template-{siteId}-{type}"],
|
|
405
|
-
auth: "user",
|
|
406
|
-
responseKind: "json",
|
|
407
|
-
errors: [
|
|
408
|
-
"validation:invalid_input",
|
|
409
|
-
"resource:not_found",
|
|
410
|
-
"resource:conflict"
|
|
411
|
-
]
|
|
412
|
-
},
|
|
413
608
|
restoreEntrySlotStructure: {
|
|
414
609
|
editLease: "managed",
|
|
415
610
|
path: "/sites/{siteId}/content/{type}/{entryId}/slots/{slotKey}/blocks/restore",
|
|
@@ -782,6 +977,18 @@ const APPOINTMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
782
977
|
"server:internal_error"
|
|
783
978
|
]
|
|
784
979
|
},
|
|
980
|
+
draftTeamMemberProfileBio: {
|
|
981
|
+
path: "/sites/{siteId}/bookings/resources/{resourceId}/profile/bio-draft",
|
|
982
|
+
method: "POST",
|
|
983
|
+
auth: "user",
|
|
984
|
+
responseKind: "json",
|
|
985
|
+
errors: [
|
|
986
|
+
"auth:forbidden",
|
|
987
|
+
"resource:not_found",
|
|
988
|
+
"server:internal_error"
|
|
989
|
+
],
|
|
990
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
991
|
+
},
|
|
785
992
|
scheduleTeamMemberProfile: {
|
|
786
993
|
path: "/sites/{siteId}/bookings/resources/{resourceId}/profile/{entryId}/schedule",
|
|
787
994
|
method: "POST",
|
|
@@ -820,7 +1027,7 @@ const APPOINTMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
820
1027
|
path: "/sites/{siteId}/bookings/resources/{resourceId}/profile/routes/{routeId}/metadata",
|
|
821
1028
|
method: "PATCH",
|
|
822
1029
|
tags: [
|
|
823
|
-
TAG_TEMPLATES.
|
|
1030
|
+
TAG_TEMPLATES.site,
|
|
824
1031
|
TAG_TEMPLATES.siteRoutableContent,
|
|
825
1032
|
TAG_TEMPLATES.routeById
|
|
826
1033
|
],
|
|
@@ -1213,6 +1420,43 @@ const ACCOUNT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
1213
1420
|
//#endregion
|
|
1214
1421
|
//#region ../api/src/eventSeriesRegistrationEndpointDefinitions.ts
|
|
1215
1422
|
const EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
1423
|
+
getBookingDetail: {
|
|
1424
|
+
path: "/sites/{siteId}/bookings/booking/{kind}/{bookingId}",
|
|
1425
|
+
method: "GET",
|
|
1426
|
+
auth: "user",
|
|
1427
|
+
responseKind: "json",
|
|
1428
|
+
errors: [
|
|
1429
|
+
"auth:forbidden",
|
|
1430
|
+
"resource:not_found",
|
|
1431
|
+
"server:internal_error"
|
|
1432
|
+
]
|
|
1433
|
+
},
|
|
1434
|
+
saveEventAttendeeAnswers: {
|
|
1435
|
+
path: "/sites/{siteId}/bookings/attendees/{attendeeId}/answers",
|
|
1436
|
+
method: "PUT",
|
|
1437
|
+
auth: "user",
|
|
1438
|
+
responseKind: "json",
|
|
1439
|
+
errors: [
|
|
1440
|
+
"validation:invalid_input",
|
|
1441
|
+
"auth:forbidden",
|
|
1442
|
+
"resource:not_found",
|
|
1443
|
+
"resource:conflict",
|
|
1444
|
+
"server:internal_error"
|
|
1445
|
+
]
|
|
1446
|
+
},
|
|
1447
|
+
correctBookingCheckIn: {
|
|
1448
|
+
path: "/sites/{siteId}/bookings/attendees/{attendeeId}/check-in",
|
|
1449
|
+
method: "PATCH",
|
|
1450
|
+
auth: "user",
|
|
1451
|
+
responseKind: "json",
|
|
1452
|
+
errors: [
|
|
1453
|
+
"validation:invalid_input",
|
|
1454
|
+
"auth:forbidden",
|
|
1455
|
+
"resource:not_found",
|
|
1456
|
+
"resource:conflict",
|
|
1457
|
+
"server:internal_error"
|
|
1458
|
+
]
|
|
1459
|
+
},
|
|
1216
1460
|
deleteEventOffering: {
|
|
1217
1461
|
path: "/sites/{siteId}/bookings/event-offerings/{eventOfferingId}",
|
|
1218
1462
|
method: "DELETE",
|
|
@@ -2295,6 +2539,7 @@ const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
2295
2539
|
* event itself, so its address is written here rather than through a run.
|
|
2296
2540
|
*/
|
|
2297
2541
|
updateEventAddress: {
|
|
2542
|
+
editLease: "managed",
|
|
2298
2543
|
path: "/sites/{siteId}/bookings/events/{eventId}/address",
|
|
2299
2544
|
method: "PATCH",
|
|
2300
2545
|
tags: [
|
|
@@ -2662,6 +2907,64 @@ const SDK_MEDIA_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
2662
2907
|
* derive freshness reviewable beside its route and tags.
|
|
2663
2908
|
*/
|
|
2664
2909
|
const PUBLIC_READ_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
2910
|
+
checkRedirect: {
|
|
2911
|
+
path: "/public/content/redirect",
|
|
2912
|
+
method: "GET",
|
|
2913
|
+
revalidate: 86400,
|
|
2914
|
+
tags: [
|
|
2915
|
+
TAG_TEMPLATES.siteById,
|
|
2916
|
+
TAG_TEMPLATES.siteBySlug,
|
|
2917
|
+
TAG_TEMPLATES.siteRedirects
|
|
2918
|
+
],
|
|
2919
|
+
errors: [],
|
|
2920
|
+
auth: "public",
|
|
2921
|
+
responseKind: "json"
|
|
2922
|
+
},
|
|
2923
|
+
getSite: {
|
|
2924
|
+
path: "/sites",
|
|
2925
|
+
method: "GET",
|
|
2926
|
+
errors: [],
|
|
2927
|
+
revalidate: 900,
|
|
2928
|
+
tags: [
|
|
2929
|
+
TAG_TEMPLATES.siteById,
|
|
2930
|
+
TAG_TEMPLATES.siteBySlug,
|
|
2931
|
+
TAG_TEMPLATES.siteByDomain
|
|
2932
|
+
],
|
|
2933
|
+
auth: "public",
|
|
2934
|
+
responseKind: "json"
|
|
2935
|
+
},
|
|
2936
|
+
getRoutableContent: {
|
|
2937
|
+
path: "/sites/{siteId}/routable-content",
|
|
2938
|
+
method: "GET",
|
|
2939
|
+
revalidate: 60,
|
|
2940
|
+
errors: [],
|
|
2941
|
+
tags: [TAG_TEMPLATES.siteRoutableContent],
|
|
2942
|
+
auth: "user",
|
|
2943
|
+
responseKind: "json"
|
|
2944
|
+
},
|
|
2945
|
+
getPublicRoutableContent: {
|
|
2946
|
+
path: "/public/sites/{siteId}/routable-content",
|
|
2947
|
+
method: "GET",
|
|
2948
|
+
revalidate: 60,
|
|
2949
|
+
errors: [],
|
|
2950
|
+
tags: [TAG_TEMPLATES.siteRoutableContent],
|
|
2951
|
+
auth: "public",
|
|
2952
|
+
responseKind: "json"
|
|
2953
|
+
},
|
|
2954
|
+
getPublicSitemapRoutes: {
|
|
2955
|
+
path: "/public/sites/{siteId}/sitemap",
|
|
2956
|
+
method: "GET",
|
|
2957
|
+
revalidate: 60,
|
|
2958
|
+
errors: [],
|
|
2959
|
+
tags: [
|
|
2960
|
+
TAG_TEMPLATES.siteRoutableContent,
|
|
2961
|
+
TAG_TEMPLATES.siteSettings,
|
|
2962
|
+
TAG_TEMPLATES.publicEvents,
|
|
2963
|
+
TAG_TEMPLATES.publicBookingServices
|
|
2964
|
+
],
|
|
2965
|
+
auth: "public",
|
|
2966
|
+
responseKind: "json"
|
|
2967
|
+
},
|
|
2665
2968
|
getPublishedEntryPreview: {
|
|
2666
2969
|
path: "/public/content/{siteId}/{type}/{slug}/preview",
|
|
2667
2970
|
method: "GET",
|
|
@@ -2739,6 +3042,27 @@ const PUBLIC_READ_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
2739
3042
|
* kept together so that stays obvious.
|
|
2740
3043
|
*/
|
|
2741
3044
|
const PUBLIC_ONBOARDING_ATTEMPT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
3045
|
+
mintOnboardingPagePreviewToken: {
|
|
3046
|
+
path: "/public/onboarding/attempts/{attemptToken}/page-preview-token",
|
|
3047
|
+
method: "POST",
|
|
3048
|
+
auth: "public",
|
|
3049
|
+
errors: [],
|
|
3050
|
+
responseKind: "json"
|
|
3051
|
+
},
|
|
3052
|
+
suggestPublicOnboardingLooks: {
|
|
3053
|
+
path: "/public/onboarding/attempts/{attemptToken}/look-suggestion",
|
|
3054
|
+
method: "POST",
|
|
3055
|
+
auth: "public",
|
|
3056
|
+
errors: [],
|
|
3057
|
+
responseKind: "json"
|
|
3058
|
+
},
|
|
3059
|
+
getOnboardingPagePreview: {
|
|
3060
|
+
path: "/public/onboarding/page-preview/{attemptId}",
|
|
3061
|
+
method: "GET",
|
|
3062
|
+
auth: "public",
|
|
3063
|
+
errors: [],
|
|
3064
|
+
responseKind: "json"
|
|
3065
|
+
},
|
|
2742
3066
|
createPublicOnboardingAttempt: {
|
|
2743
3067
|
path: "/public/onboarding/attempts",
|
|
2744
3068
|
method: "POST",
|
|
@@ -2822,12 +3146,72 @@ const BILLING_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
2822
3146
|
errors: [],
|
|
2823
3147
|
responseKind: "json"
|
|
2824
3148
|
},
|
|
2825
|
-
|
|
2826
|
-
path: "/billing/
|
|
3149
|
+
getAccountInvoiceRecovery: {
|
|
3150
|
+
path: "/billing/recovery",
|
|
3151
|
+
method: "GET",
|
|
3152
|
+
tags: ["billing"],
|
|
3153
|
+
auth: "user",
|
|
3154
|
+
responseKind: "json",
|
|
3155
|
+
errors: [
|
|
3156
|
+
"validation:invalid_input",
|
|
3157
|
+
"auth:unauthenticated",
|
|
3158
|
+
"external:service_error",
|
|
3159
|
+
"server:internal_error"
|
|
3160
|
+
]
|
|
3161
|
+
},
|
|
3162
|
+
getAccountBillingDetails: {
|
|
3163
|
+
path: "/billing/details",
|
|
3164
|
+
method: "GET",
|
|
3165
|
+
tags: ["billing"],
|
|
3166
|
+
auth: "user",
|
|
3167
|
+
responseKind: "json",
|
|
3168
|
+
errors: [
|
|
3169
|
+
"auth:unauthenticated",
|
|
3170
|
+
"external:service_error",
|
|
3171
|
+
"server:internal_error"
|
|
3172
|
+
]
|
|
3173
|
+
},
|
|
3174
|
+
getAccountBillingInvoices: {
|
|
3175
|
+
path: "/billing/invoices",
|
|
3176
|
+
method: "GET",
|
|
3177
|
+
tags: ["billing"],
|
|
3178
|
+
auth: "user",
|
|
3179
|
+
responseKind: "json",
|
|
3180
|
+
errors: [
|
|
3181
|
+
"validation:invalid_input",
|
|
3182
|
+
"auth:unauthenticated",
|
|
3183
|
+
"resource:conflict",
|
|
3184
|
+
"external:service_error",
|
|
3185
|
+
"server:internal_error"
|
|
3186
|
+
]
|
|
3187
|
+
},
|
|
3188
|
+
startAccountPaymentMethodSetup: {
|
|
3189
|
+
path: "/billing/payment-method/setup",
|
|
2827
3190
|
method: "POST",
|
|
2828
3191
|
tags: ["billing"],
|
|
2829
3192
|
auth: "user",
|
|
2830
|
-
responseKind: "json"
|
|
3193
|
+
responseKind: "json",
|
|
3194
|
+
errors: [
|
|
3195
|
+
"validation:invalid_input",
|
|
3196
|
+
"auth:unauthenticated",
|
|
3197
|
+
"resource:conflict",
|
|
3198
|
+
"external:service_error",
|
|
3199
|
+
"server:internal_error"
|
|
3200
|
+
]
|
|
3201
|
+
},
|
|
3202
|
+
finishAccountPaymentMethodSetup: {
|
|
3203
|
+
path: "/billing/payment-method/finish",
|
|
3204
|
+
method: "POST",
|
|
3205
|
+
tags: ["billing"],
|
|
3206
|
+
auth: "user",
|
|
3207
|
+
responseKind: "json",
|
|
3208
|
+
errors: [
|
|
3209
|
+
"validation:invalid_input",
|
|
3210
|
+
"auth:unauthenticated",
|
|
3211
|
+
"resource:conflict",
|
|
3212
|
+
"external:service_error",
|
|
3213
|
+
"server:internal_error"
|
|
3214
|
+
]
|
|
2831
3215
|
},
|
|
2832
3216
|
stripeConnectSetupStart: {
|
|
2833
3217
|
path: "/sites/{siteId}/billing/connect/setup",
|
|
@@ -2983,7 +3367,7 @@ const EDIT_LEASE_ENDPOINT_DEFINITIONS = {
|
|
|
2983
3367
|
acquireEditLease: {
|
|
2984
3368
|
path,
|
|
2985
3369
|
method: "POST",
|
|
2986
|
-
editLease: "
|
|
3370
|
+
editLease: "unleased-editor",
|
|
2987
3371
|
errors: lifecycleErrors,
|
|
2988
3372
|
auth: "user",
|
|
2989
3373
|
responseKind: "json"
|
|
@@ -2991,7 +3375,7 @@ const EDIT_LEASE_ENDPOINT_DEFINITIONS = {
|
|
|
2991
3375
|
takeOverEditLease: {
|
|
2992
3376
|
path,
|
|
2993
3377
|
method: "PUT",
|
|
2994
|
-
editLease: "
|
|
3378
|
+
editLease: "unleased-editor",
|
|
2995
3379
|
errors: lifecycleErrors,
|
|
2996
3380
|
auth: "user",
|
|
2997
3381
|
responseKind: "json"
|
|
@@ -2999,7 +3383,7 @@ const EDIT_LEASE_ENDPOINT_DEFINITIONS = {
|
|
|
2999
3383
|
heartbeatEditLease: {
|
|
3000
3384
|
path,
|
|
3001
3385
|
method: "PATCH",
|
|
3002
|
-
editLease: "
|
|
3386
|
+
editLease: "unleased-editor",
|
|
3003
3387
|
errors: [...lifecycleErrors, "auth:lease_lost"],
|
|
3004
3388
|
auth: "user",
|
|
3005
3389
|
responseKind: "json"
|
|
@@ -3015,7 +3399,7 @@ const EDIT_LEASE_ENDPOINT_DEFINITIONS = {
|
|
|
3015
3399
|
};
|
|
3016
3400
|
//#endregion
|
|
3017
3401
|
//#region ../api/src/pageSurfaceEditorEndpoints.ts
|
|
3018
|
-
const surfaceTags = [TAG_TEMPLATES.
|
|
3402
|
+
const surfaceTags = [TAG_TEMPLATES.site, TAG_TEMPLATES.pageSurfaceById];
|
|
3019
3403
|
const PAGE_SURFACE_EDITOR_ENDPOINT_DEFINITIONS = {
|
|
3020
3404
|
getPageSurfaceEditorDocument: {
|
|
3021
3405
|
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/content",
|
|
@@ -3070,7 +3454,7 @@ const PAGE_SURFACE_EDITOR_ENDPOINT_DEFINITIONS = {
|
|
|
3070
3454
|
"server:internal_error"
|
|
3071
3455
|
],
|
|
3072
3456
|
tags: [
|
|
3073
|
-
TAG_TEMPLATES.
|
|
3457
|
+
TAG_TEMPLATES.site,
|
|
3074
3458
|
TAG_TEMPLATES.siteRoutableContent,
|
|
3075
3459
|
TAG_TEMPLATES.pageSurfaceById
|
|
3076
3460
|
],
|
|
@@ -3089,7 +3473,7 @@ const PAGE_SURFACE_EDITOR_ENDPOINT_DEFINITIONS = {
|
|
|
3089
3473
|
"server:internal_error"
|
|
3090
3474
|
],
|
|
3091
3475
|
tags: [
|
|
3092
|
-
TAG_TEMPLATES.
|
|
3476
|
+
TAG_TEMPLATES.site,
|
|
3093
3477
|
TAG_TEMPLATES.siteRoutableContent,
|
|
3094
3478
|
TAG_TEMPLATES.pageSurfaceById
|
|
3095
3479
|
],
|
|
@@ -3108,7 +3492,7 @@ const PAGE_SURFACE_EDITOR_ENDPOINT_DEFINITIONS = {
|
|
|
3108
3492
|
"server:internal_error"
|
|
3109
3493
|
],
|
|
3110
3494
|
tags: [
|
|
3111
|
-
TAG_TEMPLATES.
|
|
3495
|
+
TAG_TEMPLATES.site,
|
|
3112
3496
|
TAG_TEMPLATES.siteRoutableContent,
|
|
3113
3497
|
TAG_TEMPLATES.pageSurfaceById
|
|
3114
3498
|
],
|
|
@@ -3234,6 +3618,7 @@ const API_ENDPOINTS = {
|
|
|
3234
3618
|
...PAGE_SURFACE_EDITOR_ENDPOINT_DEFINITIONS,
|
|
3235
3619
|
...SITE_MANAGEMENT_ENDPOINT_DEFINITIONS,
|
|
3236
3620
|
applySeoChanges: {
|
|
3621
|
+
editLease: "unleased-editor",
|
|
3237
3622
|
path: "/seo/apply",
|
|
3238
3623
|
method: "POST",
|
|
3239
3624
|
auth: "user",
|
|
@@ -3265,6 +3650,13 @@ const API_ENDPOINTS = {
|
|
|
3265
3650
|
responseKind: "json",
|
|
3266
3651
|
errors: []
|
|
3267
3652
|
},
|
|
3653
|
+
replyToSupportTicket: {
|
|
3654
|
+
path: "/assistant/support/reply",
|
|
3655
|
+
method: "POST",
|
|
3656
|
+
auth: "user",
|
|
3657
|
+
responseKind: "json",
|
|
3658
|
+
errors: []
|
|
3659
|
+
},
|
|
3268
3660
|
assistantTurn: {
|
|
3269
3661
|
path: "/assistant/turn",
|
|
3270
3662
|
method: "POST",
|
|
@@ -3344,6 +3736,14 @@ const API_ENDPOINTS = {
|
|
|
3344
3736
|
errors: [],
|
|
3345
3737
|
responseKind: "json"
|
|
3346
3738
|
},
|
|
3739
|
+
markBookingHomeSeen: {
|
|
3740
|
+
path: "/sites/{siteId}/home/seen",
|
|
3741
|
+
method: "POST",
|
|
3742
|
+
auth: "user",
|
|
3743
|
+
errors: [],
|
|
3744
|
+
responseKind: "json",
|
|
3745
|
+
demoMutation: DEMO_MUTATION_ALLOWED
|
|
3746
|
+
},
|
|
3347
3747
|
resendOnboardingPreviewConfirmation: {
|
|
3348
3748
|
path: "/public/sites/{siteId}/onboarding/resend-confirmation",
|
|
3349
3749
|
method: "POST",
|
|
@@ -3387,15 +3787,6 @@ const API_ENDPOINTS = {
|
|
|
3387
3787
|
errors: [],
|
|
3388
3788
|
responseKind: "text"
|
|
3389
3789
|
},
|
|
3390
|
-
checkRedirect: {
|
|
3391
|
-
path: "/public/content/redirect",
|
|
3392
|
-
method: "GET",
|
|
3393
|
-
revalidate: 86400,
|
|
3394
|
-
tags: ["redirect"],
|
|
3395
|
-
errors: [],
|
|
3396
|
-
auth: "public",
|
|
3397
|
-
responseKind: "json"
|
|
3398
|
-
},
|
|
3399
3790
|
listRedirectRules: {
|
|
3400
3791
|
path: "/sites/{siteId}/redirects",
|
|
3401
3792
|
method: "GET",
|
|
@@ -3638,6 +4029,19 @@ const API_ENDPOINTS = {
|
|
|
3638
4029
|
auth: "user",
|
|
3639
4030
|
responseKind: "json"
|
|
3640
4031
|
},
|
|
4032
|
+
updateEmailSendSetting: {
|
|
4033
|
+
path: "/sites/{siteId}/settings/emails/{emailKey}/send-setting",
|
|
4034
|
+
method: "PUT",
|
|
4035
|
+
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteBookingSettings],
|
|
4036
|
+
auth: "user",
|
|
4037
|
+
responseKind: "json",
|
|
4038
|
+
errors: [
|
|
4039
|
+
"validation:invalid_input",
|
|
4040
|
+
"auth:forbidden",
|
|
4041
|
+
"resource:conflict",
|
|
4042
|
+
"server:internal_error"
|
|
4043
|
+
]
|
|
4044
|
+
},
|
|
3641
4045
|
sendTestEmail: {
|
|
3642
4046
|
path: "/sites/{siteId}/settings/emails/test",
|
|
3643
4047
|
method: "POST",
|
|
@@ -3656,37 +4060,12 @@ const API_ENDPOINTS = {
|
|
|
3656
4060
|
...NEWSLETTER_ENDPOINT_DEFINITIONS,
|
|
3657
4061
|
...APPOINTMENT_ENDPOINT_DEFINITIONS,
|
|
3658
4062
|
...EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS,
|
|
3659
|
-
|
|
3660
|
-
path: "/sites",
|
|
3661
|
-
method: "GET",
|
|
3662
|
-
revalidate: 900,
|
|
3663
|
-
tags: [
|
|
3664
|
-
TAG_TEMPLATES.siteCollection,
|
|
3665
|
-
TAG_TEMPLATES.siteById,
|
|
3666
|
-
TAG_TEMPLATES.siteBySlug,
|
|
3667
|
-
TAG_TEMPLATES.siteByDomain
|
|
3668
|
-
],
|
|
3669
|
-
auth: "public",
|
|
3670
|
-
responseKind: "json"
|
|
3671
|
-
},
|
|
3672
|
-
getSiteIdOnly: {
|
|
3673
|
-
path: "/sites",
|
|
3674
|
-
method: "GET",
|
|
3675
|
-
revalidate: 900,
|
|
3676
|
-
tags: [
|
|
3677
|
-
TAG_TEMPLATES.siteCollection,
|
|
3678
|
-
TAG_TEMPLATES.siteById,
|
|
3679
|
-
TAG_TEMPLATES.siteBySlug,
|
|
3680
|
-
TAG_TEMPLATES.siteByDomain
|
|
3681
|
-
],
|
|
3682
|
-
auth: "public",
|
|
3683
|
-
responseKind: "json"
|
|
3684
|
-
},
|
|
4063
|
+
getSiteIdOnly: PUBLIC_READ_ENDPOINT_DEFINITIONS.getSite,
|
|
3685
4064
|
getSiteBySlug: {
|
|
3686
4065
|
path: "/sites/by-slug/{slug}",
|
|
3687
4066
|
method: "GET",
|
|
3688
4067
|
revalidate: 900,
|
|
3689
|
-
tags: [
|
|
4068
|
+
tags: [TAG_TEMPLATES.siteBySlug],
|
|
3690
4069
|
auth: "user",
|
|
3691
4070
|
responseKind: "json"
|
|
3692
4071
|
},
|
|
@@ -3694,7 +4073,7 @@ const API_ENDPOINTS = {
|
|
|
3694
4073
|
path: "/sites/by-domain/{domain}",
|
|
3695
4074
|
method: "GET",
|
|
3696
4075
|
revalidate: 900,
|
|
3697
|
-
tags: [
|
|
4076
|
+
tags: [TAG_TEMPLATES.siteByDomain],
|
|
3698
4077
|
auth: "user",
|
|
3699
4078
|
responseKind: "json"
|
|
3700
4079
|
},
|
|
@@ -3902,6 +4281,7 @@ const API_ENDPOINTS = {
|
|
|
3902
4281
|
responseKind: "json"
|
|
3903
4282
|
},
|
|
3904
4283
|
updateContentTemplateBlock: {
|
|
4284
|
+
editLease: "unleased-editor",
|
|
3905
4285
|
path: "/sites/{siteId}/content/types/{type}/template/blocks/{blockId}",
|
|
3906
4286
|
method: "PATCH",
|
|
3907
4287
|
tags: [
|
|
@@ -3913,6 +4293,7 @@ const API_ENDPOINTS = {
|
|
|
3913
4293
|
responseKind: "json"
|
|
3914
4294
|
},
|
|
3915
4295
|
applyContentTemplateAddon: {
|
|
4296
|
+
editLease: "unleased-editor",
|
|
3916
4297
|
path: "/sites/{siteId}/content/types/{type}/template/addons",
|
|
3917
4298
|
method: "POST",
|
|
3918
4299
|
tags: ["site-{siteId}", "content-template-{siteId}-{type}"],
|
|
@@ -3920,6 +4301,7 @@ const API_ENDPOINTS = {
|
|
|
3920
4301
|
responseKind: "json"
|
|
3921
4302
|
},
|
|
3922
4303
|
updateContentTemplateBlockBindings: {
|
|
4304
|
+
editLease: "unleased-editor",
|
|
3923
4305
|
path: "/sites/{siteId}/content/types/{type}/template/blocks/{blockId}/bindings",
|
|
3924
4306
|
method: "PATCH",
|
|
3925
4307
|
tags: [
|
|
@@ -3931,6 +4313,7 @@ const API_ENDPOINTS = {
|
|
|
3931
4313
|
responseKind: "json"
|
|
3932
4314
|
},
|
|
3933
4315
|
createTemplateBlock: {
|
|
4316
|
+
editLease: "unleased-editor",
|
|
3934
4317
|
path: "/sites/{siteId}/content/types/{type}/template/blocks",
|
|
3935
4318
|
method: "POST",
|
|
3936
4319
|
tags: ["site-{siteId}", "content-template-{siteId}-{type}"],
|
|
@@ -3938,6 +4321,7 @@ const API_ENDPOINTS = {
|
|
|
3938
4321
|
responseKind: "json"
|
|
3939
4322
|
},
|
|
3940
4323
|
deleteTemplateBlock: {
|
|
4324
|
+
editLease: "unleased-editor",
|
|
3941
4325
|
path: "/sites/{siteId}/content/types/{type}/template/blocks/{blockId}",
|
|
3942
4326
|
method: "DELETE",
|
|
3943
4327
|
tags: [
|
|
@@ -3949,6 +4333,7 @@ const API_ENDPOINTS = {
|
|
|
3949
4333
|
responseKind: "json"
|
|
3950
4334
|
},
|
|
3951
4335
|
reorderTemplateBlocks: {
|
|
4336
|
+
editLease: "unleased-editor",
|
|
3952
4337
|
path: "/sites/{siteId}/content/types/{type}/template/blocks/reorder",
|
|
3953
4338
|
method: "POST",
|
|
3954
4339
|
tags: ["site-{siteId}", "content-template-{siteId}-{type}"],
|
|
@@ -4101,7 +4486,7 @@ const API_ENDPOINTS = {
|
|
|
4101
4486
|
path: "/sites/{siteId}/routes/{routeId}/metadata",
|
|
4102
4487
|
method: "PATCH",
|
|
4103
4488
|
tags: [
|
|
4104
|
-
TAG_TEMPLATES.
|
|
4489
|
+
TAG_TEMPLATES.site,
|
|
4105
4490
|
TAG_TEMPLATES.siteRoutableContent,
|
|
4106
4491
|
TAG_TEMPLATES.routeById
|
|
4107
4492
|
],
|
|
@@ -4252,6 +4637,7 @@ const API_ENDPOINTS = {
|
|
|
4252
4637
|
path: "/sites/{siteId}/content/{type}/bulk-publish",
|
|
4253
4638
|
method: "POST",
|
|
4254
4639
|
tags: ["site-{siteId}", "content-{siteId}-{type}"],
|
|
4640
|
+
editLease: "unleased-editor",
|
|
4255
4641
|
auth: "user",
|
|
4256
4642
|
responseKind: "json"
|
|
4257
4643
|
},
|
|
@@ -4259,6 +4645,7 @@ const API_ENDPOINTS = {
|
|
|
4259
4645
|
path: "/sites/{siteId}/content/{type}/bulk-unpublish",
|
|
4260
4646
|
method: "POST",
|
|
4261
4647
|
tags: ["site-{siteId}", "content-{siteId}-{type}"],
|
|
4648
|
+
editLease: "unleased-editor",
|
|
4262
4649
|
auth: "user",
|
|
4263
4650
|
responseKind: "json"
|
|
4264
4651
|
},
|
|
@@ -4266,6 +4653,7 @@ const API_ENDPOINTS = {
|
|
|
4266
4653
|
path: "/sites/{siteId}/content/{type}/bulk-delete",
|
|
4267
4654
|
method: "POST",
|
|
4268
4655
|
tags: ["site-{siteId}", "content-{siteId}-{type}"],
|
|
4656
|
+
editLease: "unleased-editor",
|
|
4269
4657
|
auth: "user",
|
|
4270
4658
|
responseKind: "json",
|
|
4271
4659
|
errors: [
|
|
@@ -4286,11 +4674,7 @@ const API_ENDPOINTS = {
|
|
|
4286
4674
|
getSiteFooterBlocks: {
|
|
4287
4675
|
path: "/sites/{siteId}/content/footer-blocks",
|
|
4288
4676
|
method: "GET",
|
|
4289
|
-
tags: [
|
|
4290
|
-
TAG_TEMPLATES.siteCollection,
|
|
4291
|
-
TAG_TEMPLATES.site,
|
|
4292
|
-
TAG_TEMPLATES.siteSettings
|
|
4293
|
-
],
|
|
4677
|
+
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings],
|
|
4294
4678
|
auth: "user",
|
|
4295
4679
|
responseKind: "json",
|
|
4296
4680
|
errors: [
|
|
@@ -4300,13 +4684,10 @@ const API_ENDPOINTS = {
|
|
|
4300
4684
|
]
|
|
4301
4685
|
},
|
|
4302
4686
|
updateSiteFooterBlocks: {
|
|
4687
|
+
editLease: "unleased-editor",
|
|
4303
4688
|
path: "/sites/{siteId}/content/footer-blocks",
|
|
4304
4689
|
method: "PUT",
|
|
4305
|
-
tags: [
|
|
4306
|
-
TAG_TEMPLATES.siteCollection,
|
|
4307
|
-
TAG_TEMPLATES.site,
|
|
4308
|
-
TAG_TEMPLATES.siteSettings
|
|
4309
|
-
],
|
|
4690
|
+
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings],
|
|
4310
4691
|
auth: "user",
|
|
4311
4692
|
responseKind: "json",
|
|
4312
4693
|
errors: [
|
|
@@ -4319,7 +4700,7 @@ const API_ENDPOINTS = {
|
|
|
4319
4700
|
updateSiteDeploymentMode: {
|
|
4320
4701
|
path: "/sites/{siteId}/settings/deployment-mode",
|
|
4321
4702
|
method: "POST",
|
|
4322
|
-
tags: [TAG_TEMPLATES.
|
|
4703
|
+
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.site],
|
|
4323
4704
|
auth: "user",
|
|
4324
4705
|
responseKind: "json"
|
|
4325
4706
|
},
|
|
@@ -4484,6 +4865,7 @@ const API_ENDPOINTS = {
|
|
|
4484
4865
|
responseKind: "json"
|
|
4485
4866
|
},
|
|
4486
4867
|
updateFooterComposition: {
|
|
4868
|
+
editLease: "unleased-editor",
|
|
4487
4869
|
path: "/sites/{siteId}/settings/footer-composition",
|
|
4488
4870
|
method: "POST",
|
|
4489
4871
|
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings],
|
|
@@ -4506,6 +4888,7 @@ const API_ENDPOINTS = {
|
|
|
4506
4888
|
responseKind: "json"
|
|
4507
4889
|
},
|
|
4508
4890
|
updatePublicProfile: {
|
|
4891
|
+
editLease: "unleased-editor",
|
|
4509
4892
|
path: "/sites/{siteId}/settings/public-profile",
|
|
4510
4893
|
method: "POST",
|
|
4511
4894
|
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings],
|
|
@@ -4542,6 +4925,7 @@ const API_ENDPOINTS = {
|
|
|
4542
4925
|
responseKind: "json"
|
|
4543
4926
|
},
|
|
4544
4927
|
setHomepage: {
|
|
4928
|
+
editLease: "unleased-editor",
|
|
4545
4929
|
path: "/sites/{siteId}/settings/homepage",
|
|
4546
4930
|
method: "POST",
|
|
4547
4931
|
tags: ["site-{siteId}", "site-homepage"],
|
|
@@ -4751,6 +5135,22 @@ const API_ENDPOINTS = {
|
|
|
4751
5135
|
auth: "admin",
|
|
4752
5136
|
responseKind: "json"
|
|
4753
5137
|
},
|
|
5138
|
+
adminReplyToSupportTicket: {
|
|
5139
|
+
path: "/admin/support/tickets/reply",
|
|
5140
|
+
method: "POST",
|
|
5141
|
+
tags: ["admin", "support"],
|
|
5142
|
+
auth: "admin",
|
|
5143
|
+
responseKind: "json",
|
|
5144
|
+
errors: []
|
|
5145
|
+
},
|
|
5146
|
+
adminSetSupportTicketStatus: {
|
|
5147
|
+
path: "/admin/support/tickets/status",
|
|
5148
|
+
method: "POST",
|
|
5149
|
+
tags: ["admin", "support"],
|
|
5150
|
+
auth: "admin",
|
|
5151
|
+
responseKind: "json",
|
|
5152
|
+
errors: []
|
|
5153
|
+
},
|
|
4754
5154
|
mfaTotpEnroll: {
|
|
4755
5155
|
path: "/auth/mfa/totp/enroll",
|
|
4756
5156
|
method: "POST",
|
|
@@ -5018,7 +5418,7 @@ const API_ENDPOINTS = {
|
|
|
5018
5418
|
getNavigationMenus: {
|
|
5019
5419
|
path: "/sites/{siteId}/navigation/menus",
|
|
5020
5420
|
method: "GET",
|
|
5021
|
-
tags: [TAG_TEMPLATES.
|
|
5421
|
+
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNavigation],
|
|
5022
5422
|
auth: "user",
|
|
5023
5423
|
responseKind: "json"
|
|
5024
5424
|
},
|
|
@@ -5026,7 +5426,7 @@ const API_ENDPOINTS = {
|
|
|
5026
5426
|
path: "/sites/{siteId}/navigation/menus/{menuId}",
|
|
5027
5427
|
method: "GET",
|
|
5028
5428
|
tags: [
|
|
5029
|
-
TAG_TEMPLATES.
|
|
5429
|
+
TAG_TEMPLATES.site,
|
|
5030
5430
|
TAG_TEMPLATES.siteNavigation,
|
|
5031
5431
|
TAG_TEMPLATES.navigationMenuById
|
|
5032
5432
|
],
|
|
@@ -5037,7 +5437,7 @@ const API_ENDPOINTS = {
|
|
|
5037
5437
|
path: "/sites/{siteId}/navigation/menus/{menuId}/items",
|
|
5038
5438
|
method: "POST",
|
|
5039
5439
|
tags: [
|
|
5040
|
-
TAG_TEMPLATES.
|
|
5440
|
+
TAG_TEMPLATES.site,
|
|
5041
5441
|
TAG_TEMPLATES.siteNavigation,
|
|
5042
5442
|
TAG_TEMPLATES.navigationMenuById
|
|
5043
5443
|
],
|
|
@@ -5048,7 +5448,7 @@ const API_ENDPOINTS = {
|
|
|
5048
5448
|
path: "/sites/{siteId}/navigation/menus/{menuId}/items/{itemId}",
|
|
5049
5449
|
method: "PATCH",
|
|
5050
5450
|
tags: [
|
|
5051
|
-
TAG_TEMPLATES.
|
|
5451
|
+
TAG_TEMPLATES.site,
|
|
5052
5452
|
TAG_TEMPLATES.siteNavigation,
|
|
5053
5453
|
TAG_TEMPLATES.navigationMenuById,
|
|
5054
5454
|
TAG_TEMPLATES.navigationItemById
|
|
@@ -5060,7 +5460,7 @@ const API_ENDPOINTS = {
|
|
|
5060
5460
|
path: "/sites/{siteId}/navigation/menus/{menuId}/items/{itemId}",
|
|
5061
5461
|
method: "DELETE",
|
|
5062
5462
|
tags: [
|
|
5063
|
-
TAG_TEMPLATES.
|
|
5463
|
+
TAG_TEMPLATES.site,
|
|
5064
5464
|
TAG_TEMPLATES.siteNavigation,
|
|
5065
5465
|
TAG_TEMPLATES.navigationMenuById,
|
|
5066
5466
|
TAG_TEMPLATES.navigationItemById
|
|
@@ -5072,42 +5472,13 @@ const API_ENDPOINTS = {
|
|
|
5072
5472
|
path: "/sites/{siteId}/navigation/menus/{menuId}/items/reorder",
|
|
5073
5473
|
method: "POST",
|
|
5074
5474
|
tags: [
|
|
5075
|
-
TAG_TEMPLATES.
|
|
5475
|
+
TAG_TEMPLATES.site,
|
|
5076
5476
|
TAG_TEMPLATES.siteNavigation,
|
|
5077
5477
|
TAG_TEMPLATES.navigationMenuById
|
|
5078
5478
|
],
|
|
5079
5479
|
auth: "user",
|
|
5080
5480
|
responseKind: "json"
|
|
5081
5481
|
},
|
|
5082
|
-
getRoutableContent: {
|
|
5083
|
-
path: "/sites/{siteId}/routable-content",
|
|
5084
|
-
method: "GET",
|
|
5085
|
-
revalidate: 60,
|
|
5086
|
-
tags: [TAG_TEMPLATES.siteRoutableContent],
|
|
5087
|
-
auth: "user",
|
|
5088
|
-
responseKind: "json"
|
|
5089
|
-
},
|
|
5090
|
-
getPublicRoutableContent: {
|
|
5091
|
-
path: "/public/sites/{siteId}/routable-content",
|
|
5092
|
-
method: "GET",
|
|
5093
|
-
revalidate: 60,
|
|
5094
|
-
tags: [TAG_TEMPLATES.siteRoutableContent],
|
|
5095
|
-
auth: "public",
|
|
5096
|
-
responseKind: "json"
|
|
5097
|
-
},
|
|
5098
|
-
getPublicSitemapRoutes: {
|
|
5099
|
-
path: "/public/sites/{siteId}/sitemap",
|
|
5100
|
-
method: "GET",
|
|
5101
|
-
revalidate: 60,
|
|
5102
|
-
tags: [
|
|
5103
|
-
TAG_TEMPLATES.siteRoutableContent,
|
|
5104
|
-
TAG_TEMPLATES.siteSettings,
|
|
5105
|
-
TAG_TEMPLATES.publicEvents,
|
|
5106
|
-
TAG_TEMPLATES.publicBookingServices
|
|
5107
|
-
],
|
|
5108
|
-
auth: "public",
|
|
5109
|
-
responseKind: "json"
|
|
5110
|
-
},
|
|
5111
5482
|
getPublishedPostPreview: {
|
|
5112
5483
|
path: "/public/posts/{siteId}/{slug}/preview",
|
|
5113
5484
|
method: "GET",
|
|
@@ -5124,16 +5495,30 @@ const API_ENDPOINTS = {
|
|
|
5124
5495
|
responseKind: "json"
|
|
5125
5496
|
},
|
|
5126
5497
|
saveSiteTheme: {
|
|
5498
|
+
editLease: "unleased-editor",
|
|
5127
5499
|
path: "/sites/{siteId}/theme/save",
|
|
5128
5500
|
method: "POST",
|
|
5129
|
-
tags: [TAG_TEMPLATES.
|
|
5501
|
+
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteTheme],
|
|
5130
5502
|
auth: "user",
|
|
5131
5503
|
responseKind: "json"
|
|
5132
5504
|
},
|
|
5505
|
+
previewSiteStyleSelection: {
|
|
5506
|
+
path: "/public/sites/{siteId}/theme/style-selection/preview",
|
|
5507
|
+
method: "POST",
|
|
5508
|
+
auth: "public",
|
|
5509
|
+
errors: [
|
|
5510
|
+
"validation:invalid_input",
|
|
5511
|
+
"auth:forbidden",
|
|
5512
|
+
"resource:not_found",
|
|
5513
|
+
"server:internal_error"
|
|
5514
|
+
],
|
|
5515
|
+
responseKind: "json"
|
|
5516
|
+
},
|
|
5133
5517
|
applySiteStyleSelection: {
|
|
5518
|
+
editLease: "unleased-editor",
|
|
5134
5519
|
path: "/sites/{siteId}/theme/style-selection/apply",
|
|
5135
5520
|
method: "POST",
|
|
5136
|
-
tags: [TAG_TEMPLATES.
|
|
5521
|
+
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteTheme],
|
|
5137
5522
|
auth: "user",
|
|
5138
5523
|
errors: [
|
|
5139
5524
|
"validation:invalid_input",
|
|
@@ -5145,9 +5530,10 @@ const API_ENDPOINTS = {
|
|
|
5145
5530
|
responseKind: "json"
|
|
5146
5531
|
},
|
|
5147
5532
|
saveSiteChromeSelection: {
|
|
5533
|
+
editLease: "unleased-editor",
|
|
5148
5534
|
path: "/sites/{siteId}/theme/site-chrome-selection",
|
|
5149
5535
|
method: "POST",
|
|
5150
|
-
tags: [TAG_TEMPLATES.
|
|
5536
|
+
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteTheme],
|
|
5151
5537
|
auth: "user",
|
|
5152
5538
|
errors: [],
|
|
5153
5539
|
responseKind: "json"
|
|
@@ -5517,7 +5903,7 @@ const API_ENDPOINTS = {
|
|
|
5517
5903
|
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/slots",
|
|
5518
5904
|
method: "GET",
|
|
5519
5905
|
tags: [
|
|
5520
|
-
TAG_TEMPLATES.
|
|
5906
|
+
TAG_TEMPLATES.site,
|
|
5521
5907
|
TAG_TEMPLATES.pageSurfaceById,
|
|
5522
5908
|
"surface-slots",
|
|
5523
5909
|
"blocks"
|
|
@@ -5535,7 +5921,7 @@ const API_ENDPOINTS = {
|
|
|
5535
5921
|
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/slots/{slotKey}/blocks",
|
|
5536
5922
|
method: "POST",
|
|
5537
5923
|
tags: [
|
|
5538
|
-
TAG_TEMPLATES.
|
|
5924
|
+
TAG_TEMPLATES.site,
|
|
5539
5925
|
TAG_TEMPLATES.pageSurfaceById,
|
|
5540
5926
|
"surface-slot-{slotKey}",
|
|
5541
5927
|
"blocks"
|
|
@@ -5554,7 +5940,7 @@ const API_ENDPOINTS = {
|
|
|
5554
5940
|
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/slots/{slotKey}/blocks/reorder",
|
|
5555
5941
|
method: "POST",
|
|
5556
5942
|
tags: [
|
|
5557
|
-
TAG_TEMPLATES.
|
|
5943
|
+
TAG_TEMPLATES.site,
|
|
5558
5944
|
TAG_TEMPLATES.pageSurfaceById,
|
|
5559
5945
|
"surface-slot-{slotKey}",
|
|
5560
5946
|
"blocks"
|
|
@@ -5573,7 +5959,7 @@ const API_ENDPOINTS = {
|
|
|
5573
5959
|
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/slots/{slotKey}/blocks/{blockId}",
|
|
5574
5960
|
method: "DELETE",
|
|
5575
5961
|
tags: [
|
|
5576
|
-
TAG_TEMPLATES.
|
|
5962
|
+
TAG_TEMPLATES.site,
|
|
5577
5963
|
TAG_TEMPLATES.pageSurfaceById,
|
|
5578
5964
|
"surface-slot-{slotKey}",
|
|
5579
5965
|
"blocks"
|
|
@@ -6305,20 +6691,6 @@ const API_ENDPOINTS = {
|
|
|
6305
6691
|
errors: [],
|
|
6306
6692
|
responseKind: "json"
|
|
6307
6693
|
},
|
|
6308
|
-
importSiteBackup: {
|
|
6309
|
-
path: "/sites/{siteId}/backup/import",
|
|
6310
|
-
method: "POST",
|
|
6311
|
-
tags: ["site-{siteId}", "backup"],
|
|
6312
|
-
auth: "user",
|
|
6313
|
-
responseKind: "json",
|
|
6314
|
-
errors: [
|
|
6315
|
-
"validation:invalid_input",
|
|
6316
|
-
"validation:payload_too_large",
|
|
6317
|
-
"auth:forbidden",
|
|
6318
|
-
"resource:not_found",
|
|
6319
|
-
"server:internal_error"
|
|
6320
|
-
]
|
|
6321
|
-
},
|
|
6322
6694
|
createBackupUploadUrl: {
|
|
6323
6695
|
path: "/backup/upload-url",
|
|
6324
6696
|
method: "POST",
|
|
@@ -6650,32 +7022,59 @@ const API_ENDPOINTS = {
|
|
|
6650
7022
|
responseKind: "json",
|
|
6651
7023
|
errors: []
|
|
6652
7024
|
},
|
|
6653
|
-
|
|
6654
|
-
|
|
7025
|
+
listEventBookingMoveClasses: {
|
|
7026
|
+
errors: [],
|
|
7027
|
+
path: "/sites/{siteId}/bookings/event-attendees/{attendeeId}/move-classes",
|
|
7028
|
+
method: "GET",
|
|
7029
|
+
auth: "user",
|
|
7030
|
+
responseKind: "json"
|
|
7031
|
+
},
|
|
7032
|
+
listEventBookingMoveTargets: {
|
|
7033
|
+
errors: [],
|
|
7034
|
+
path: "/sites/{siteId}/bookings/event-attendees/{attendeeId}/move-targets",
|
|
7035
|
+
method: "GET",
|
|
7036
|
+
auth: "user",
|
|
7037
|
+
responseKind: "json"
|
|
7038
|
+
},
|
|
7039
|
+
moveEventBooking: {
|
|
7040
|
+
errors: [],
|
|
7041
|
+
path: "/sites/{siteId}/bookings/event-attendees/{attendeeId}/move",
|
|
6655
7042
|
method: "POST",
|
|
7043
|
+
auth: "user",
|
|
7044
|
+
responseKind: "json",
|
|
6656
7045
|
tags: [
|
|
6657
7046
|
"site-{siteId}",
|
|
6658
7047
|
"event-attendee-{attendeeId}",
|
|
6659
7048
|
"bookings"
|
|
6660
|
-
]
|
|
7049
|
+
]
|
|
7050
|
+
},
|
|
7051
|
+
restoreEventBooking: {
|
|
7052
|
+
errors: [],
|
|
7053
|
+
path: "/sites/{siteId}/bookings/event-attendees/{attendeeId}/restore",
|
|
7054
|
+
method: "POST",
|
|
6661
7055
|
auth: "user",
|
|
6662
7056
|
responseKind: "json",
|
|
6663
|
-
|
|
6664
|
-
"
|
|
6665
|
-
"
|
|
6666
|
-
"
|
|
7057
|
+
tags: [
|
|
7058
|
+
"site-{siteId}",
|
|
7059
|
+
"event-attendee-{attendeeId}",
|
|
7060
|
+
"bookings"
|
|
6667
7061
|
]
|
|
6668
7062
|
},
|
|
6669
|
-
|
|
6670
|
-
path: "/sites/{siteId}/bookings/event-attendees/{attendeeId}/
|
|
6671
|
-
method: "
|
|
7063
|
+
transferEventAttendee: {
|
|
7064
|
+
path: "/sites/{siteId}/bookings/event-attendees/{attendeeId}/transfer",
|
|
7065
|
+
method: "POST",
|
|
6672
7066
|
tags: [
|
|
6673
7067
|
"site-{siteId}",
|
|
6674
7068
|
"event-attendee-{attendeeId}",
|
|
6675
7069
|
"bookings"
|
|
6676
7070
|
],
|
|
6677
7071
|
auth: "user",
|
|
6678
|
-
responseKind: "json"
|
|
7072
|
+
responseKind: "json",
|
|
7073
|
+
errors: [
|
|
7074
|
+
"validation:invalid_input",
|
|
7075
|
+
"resource:not_found",
|
|
7076
|
+
"server:internal_error"
|
|
7077
|
+
]
|
|
6679
7078
|
},
|
|
6680
7079
|
listEventSeriesOccurrences: {
|
|
6681
7080
|
path: "/sites/{siteId}/bookings/event-series/{seriesId}/occurrences",
|
|
@@ -6819,13 +7218,28 @@ const API_ENDPOINTS = {
|
|
|
6819
7218
|
responseKind: "json",
|
|
6820
7219
|
errors: ["resource:conflict", "resource:not_found"]
|
|
6821
7220
|
},
|
|
6822
|
-
|
|
6823
|
-
|
|
7221
|
+
previewLocationDrawing: {
|
|
7222
|
+
errors: ["resource:not_found"],
|
|
7223
|
+
path: "/sites/{siteId}/location/drawing-preview",
|
|
6824
7224
|
method: "POST",
|
|
6825
|
-
tags: [
|
|
7225
|
+
tags: [],
|
|
6826
7226
|
auth: "user",
|
|
6827
7227
|
responseKind: "json"
|
|
6828
7228
|
},
|
|
7229
|
+
geocodeLocation: {
|
|
7230
|
+
path: "/sites/{siteId}/location/geocode",
|
|
7231
|
+
method: "POST",
|
|
7232
|
+
tags: ["site-{siteId}"],
|
|
7233
|
+
auth: "user",
|
|
7234
|
+
responseKind: "json",
|
|
7235
|
+
errors: [
|
|
7236
|
+
"validation:invalid_input",
|
|
7237
|
+
"resource:not_found",
|
|
7238
|
+
"rate_limit:exceeded",
|
|
7239
|
+
"external:service_error",
|
|
7240
|
+
"server:internal_error"
|
|
7241
|
+
]
|
|
7242
|
+
},
|
|
6829
7243
|
listBookingPasses: {
|
|
6830
7244
|
path: "/sites/{siteId}/bookings/passes",
|
|
6831
7245
|
method: "GET",
|
|
@@ -7400,11 +7814,20 @@ const API_ENDPOINTS = {
|
|
|
7400
7814
|
auth: "user",
|
|
7401
7815
|
responseKind: "json"
|
|
7402
7816
|
},
|
|
7403
|
-
|
|
7404
|
-
path: "/sites/{siteId}/logs/emails/{emailId}
|
|
7817
|
+
getSentEmail: {
|
|
7818
|
+
path: "/sites/{siteId}/logs/emails/{emailId}",
|
|
7405
7819
|
method: "GET",
|
|
7406
7820
|
auth: "user",
|
|
7407
|
-
responseKind: "json"
|
|
7821
|
+
responseKind: "json",
|
|
7822
|
+
errors: []
|
|
7823
|
+
},
|
|
7824
|
+
resendSentEmail: {
|
|
7825
|
+
path: "/sites/{siteId}/logs/emails/{emailId}/resend",
|
|
7826
|
+
method: "POST",
|
|
7827
|
+
auth: "user",
|
|
7828
|
+
responseKind: "json",
|
|
7829
|
+
errors: [],
|
|
7830
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
7408
7831
|
},
|
|
7409
7832
|
listSitePublicErrorLogs: {
|
|
7410
7833
|
path: "/sites/{siteId}/logs/errors",
|
|
@@ -7413,6 +7836,7 @@ const API_ENDPOINTS = {
|
|
|
7413
7836
|
responseKind: "json"
|
|
7414
7837
|
},
|
|
7415
7838
|
aiPlaygroundApply: {
|
|
7839
|
+
editLease: "unleased-editor",
|
|
7416
7840
|
path: "/sites/{siteId}/ai/playground/apply",
|
|
7417
7841
|
method: "POST",
|
|
7418
7842
|
tags: ["site-{siteId}"],
|
|
@@ -7667,12 +8091,6 @@ const API_ENDPOINTS = {
|
|
|
7667
8091
|
responseKind: "json"
|
|
7668
8092
|
},
|
|
7669
8093
|
...SDK_MEDIA_ENDPOINT_DEFINITIONS,
|
|
7670
|
-
sdkIdentifiersBackfill: {
|
|
7671
|
-
path: "/sdk/{siteId}/identifiers/backfill",
|
|
7672
|
-
method: "POST",
|
|
7673
|
-
auth: "service",
|
|
7674
|
-
responseKind: "json"
|
|
7675
|
-
},
|
|
7676
8094
|
sdkUpdateWorkflowRunStatus: {
|
|
7677
8095
|
path: "/sdk/{siteId}/workflows/runs/{runId}/status",
|
|
7678
8096
|
method: "POST",
|
|
@@ -8245,6 +8663,20 @@ const API_ENDPOINTS = {
|
|
|
8245
8663
|
auth: "public",
|
|
8246
8664
|
responseKind: "json"
|
|
8247
8665
|
},
|
|
8666
|
+
portalListEventRescheduleDates: {
|
|
8667
|
+
errors: [],
|
|
8668
|
+
path: "/portal/events/{registrationId}/reschedule-dates",
|
|
8669
|
+
method: "GET",
|
|
8670
|
+
auth: "public",
|
|
8671
|
+
responseKind: "json"
|
|
8672
|
+
},
|
|
8673
|
+
portalRescheduleEventRegistration: {
|
|
8674
|
+
errors: [],
|
|
8675
|
+
path: "/portal/events/{registrationId}/reschedule",
|
|
8676
|
+
method: "POST",
|
|
8677
|
+
auth: "public",
|
|
8678
|
+
responseKind: "json"
|
|
8679
|
+
},
|
|
8248
8680
|
portalTransferEventRegistration: {
|
|
8249
8681
|
path: "/portal/events/{registrationId}/transfer",
|
|
8250
8682
|
method: "POST",
|
|
@@ -8426,6 +8858,18 @@ const API_ENDPOINTS = {
|
|
|
8426
8858
|
]
|
|
8427
8859
|
}
|
|
8428
8860
|
};
|
|
8861
|
+
//#endregion
|
|
8862
|
+
//#region ../api/src/common/capacityOverride.ts
|
|
8863
|
+
const capacityOverrideRefusalSchema = z.object({
|
|
8864
|
+
booked: z.number().int().nonnegative(),
|
|
8865
|
+
held: z.number().int().nonnegative(),
|
|
8866
|
+
capacity: z.number().int().nonnegative(),
|
|
8867
|
+
name: z.string(),
|
|
8868
|
+
retryPersonId: z.string().optional()
|
|
8869
|
+
});
|
|
8870
|
+
function isCapacityOverrideRefusal(value) {
|
|
8871
|
+
return capacityOverrideRefusalSchema.safeParse(value).success;
|
|
8872
|
+
}
|
|
8429
8873
|
const API_ERROR_CODE_SET = /* @__PURE__ */ new Set([
|
|
8430
8874
|
"auth:unauthenticated",
|
|
8431
8875
|
"auth:token_expired",
|
|
@@ -8437,6 +8881,7 @@ const API_ERROR_CODE_SET = /* @__PURE__ */ new Set([
|
|
|
8437
8881
|
"auth:impersonation_restricted",
|
|
8438
8882
|
"auth:lease_required",
|
|
8439
8883
|
"auth:lease_lost",
|
|
8884
|
+
"client:editing_held",
|
|
8440
8885
|
"site_terms_changed",
|
|
8441
8886
|
"site_terms_agreement_missing",
|
|
8442
8887
|
"validation:invalid_input",
|
|
@@ -8472,7 +8917,7 @@ function isRecord$1(value) {
|
|
|
8472
8917
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
8473
8918
|
}
|
|
8474
8919
|
function isFieldError(value) {
|
|
8475
|
-
return isRecord$1(value) && typeof value.field === "string" && typeof value.code === "string" && typeof value.message === "string";
|
|
8920
|
+
return isRecord$1(value) && typeof value.field === "string" && typeof value.code === "string" && typeof value.message === "string" && (value.capacityOverride === void 0 || isCapacityOverrideRefusal(value.capacityOverride));
|
|
8476
8921
|
}
|
|
8477
8922
|
function fieldErrorsFromUnknown(value) {
|
|
8478
8923
|
if (!Array.isArray(value)) return null;
|
|
@@ -8595,7 +9040,7 @@ function deriveSurfaceOwnedSiteSlugs() {
|
|
|
8595
9040
|
...siteRootHosts,
|
|
8596
9041
|
...SURFACE_IDS.map((surfaceId) => new URL(resolveSurfaceMarketingCanonicalOrigin(surfaceId)).hostname)
|
|
8597
9042
|
].flatMap((host) => siteRootHosts.flatMap((root) => siteSlugLabelUnderRoot(host, root)));
|
|
8598
|
-
return [
|
|
9043
|
+
return [.../* @__PURE__ */ new Set([...labels, "draft-preview"])].sort();
|
|
8599
9044
|
}
|
|
8600
9045
|
deriveSurfaceOwnedSiteSlugs();
|
|
8601
9046
|
const HOST_CANDIDATES = [...SURFACE_IDS.flatMap((surfaceId) => SURFACE_TIERS.flatMap((tier) => [
|
|
@@ -8723,6 +9168,74 @@ function resolveApiBaseUrl() {
|
|
|
8723
9168
|
return getCmsApiUrl();
|
|
8724
9169
|
}
|
|
8725
9170
|
//#endregion
|
|
9171
|
+
//#region ../api/src/common/operationId.ts
|
|
9172
|
+
const OPERATION_ID_HEADER = "X-Riverbank-Operation-Id";
|
|
9173
|
+
z.uuid();
|
|
9174
|
+
/** One client command owns this id; network retries retain the same header. */
|
|
9175
|
+
function commandHeaders(endpoint, headers, operationId) {
|
|
9176
|
+
const result = new Headers(headers);
|
|
9177
|
+
if (API_ENDPOINTS[endpoint].method !== "GET" && !result.has("X-Riverbank-Operation-Id")) result.set(OPERATION_ID_HEADER, operationId);
|
|
9178
|
+
return result;
|
|
9179
|
+
}
|
|
9180
|
+
//#endregion
|
|
9181
|
+
//#region ../api/src/common/pageCommit.ts
|
|
9182
|
+
const pageCommitConfirmationSchema = committedWriteProofSchema.extend({ kind: z.literal("committed-reconciliation-required") });
|
|
9183
|
+
/** Positive storage evidence with no usable projection: refresh, never repeat an unconfirmed write. */
|
|
9184
|
+
var ApiCommittedWriteNotice = class extends Error {
|
|
9185
|
+
constructor(confirmation) {
|
|
9186
|
+
super("Your change was saved. Refresh the page to continue editing.");
|
|
9187
|
+
this.confirmation = confirmation;
|
|
9188
|
+
this.name = "ApiCommittedWriteNotice";
|
|
9189
|
+
}
|
|
9190
|
+
};
|
|
9191
|
+
const pageCommitConfirmationEnvelopeSchema = z.object({
|
|
9192
|
+
success: z.literal(true),
|
|
9193
|
+
data: pageCommitConfirmationSchema
|
|
9194
|
+
});
|
|
9195
|
+
z.enum([
|
|
9196
|
+
"paused",
|
|
9197
|
+
"lease-lost",
|
|
9198
|
+
"session-stale",
|
|
9199
|
+
"authority-denied",
|
|
9200
|
+
"stale-preimage",
|
|
9201
|
+
"stale-revision",
|
|
9202
|
+
"obsolete-schedule",
|
|
9203
|
+
"invalid-plan",
|
|
9204
|
+
"provider-scope-changed",
|
|
9205
|
+
"missing-document",
|
|
9206
|
+
"invalid-content",
|
|
9207
|
+
"unpublishable-content",
|
|
9208
|
+
"unavailable-design",
|
|
9209
|
+
"invalid-metadata",
|
|
9210
|
+
"invalid-anchor",
|
|
9211
|
+
"invalid-intent",
|
|
9212
|
+
"boundary-not-adjacent",
|
|
9213
|
+
"invalid-aggregate",
|
|
9214
|
+
"missing-block",
|
|
9215
|
+
"identity-in-use",
|
|
9216
|
+
"identifier-in-use",
|
|
9217
|
+
"content-reference-in-use",
|
|
9218
|
+
"missing-history",
|
|
9219
|
+
"invalid-external-change",
|
|
9220
|
+
"invalid-construction-inventory",
|
|
9221
|
+
"invalid-target",
|
|
9222
|
+
"invalid-revision",
|
|
9223
|
+
"invalid-document",
|
|
9224
|
+
"invalid-history",
|
|
9225
|
+
"path-unavailable",
|
|
9226
|
+
"invalid-page-version",
|
|
9227
|
+
"invalid-block-reference",
|
|
9228
|
+
"invalid-content-reference",
|
|
9229
|
+
"duplicate-storage-identity",
|
|
9230
|
+
"invalid-schedule",
|
|
9231
|
+
"invalid-provider",
|
|
9232
|
+
"invalid-site-style",
|
|
9233
|
+
"invalid-manifest",
|
|
9234
|
+
"invalid-preimage-reference",
|
|
9235
|
+
"outcome-unknown",
|
|
9236
|
+
"committed-follow-up-failed"
|
|
9237
|
+
]);
|
|
9238
|
+
//#endregion
|
|
8726
9239
|
//#region ../api/src/request.ts
|
|
8727
9240
|
let revalidateTag = null;
|
|
8728
9241
|
let revalidateTagResolved = false;
|
|
@@ -8767,6 +9280,7 @@ var ApiRequestError = class extends Error {
|
|
|
8767
9280
|
this.body = options.body;
|
|
8768
9281
|
this.cause = options.cause;
|
|
8769
9282
|
this.errorCode = options.errorCode;
|
|
9283
|
+
this.tag = options.tag;
|
|
8770
9284
|
this.retryAfterMs = options.retryAfterMs;
|
|
8771
9285
|
}
|
|
8772
9286
|
};
|
|
@@ -8918,7 +9432,7 @@ async function parseSuccessResponse(endpoint, response, config) {
|
|
|
8918
9432
|
if (!raw.trim()) return buildSuccessEnvelope(void 0, requestId);
|
|
8919
9433
|
let parsed;
|
|
8920
9434
|
try {
|
|
8921
|
-
parsed = JSON.parse(raw);
|
|
9435
|
+
parsed = parseSurfaceTree(JSON.parse(raw));
|
|
8922
9436
|
} catch (cause) {
|
|
8923
9437
|
throw new ApiRequestError(`Failed to parse JSON response for endpoint ${String(endpoint)}`, {
|
|
8924
9438
|
endpoint,
|
|
@@ -8930,6 +9444,7 @@ async function parseSuccessResponse(endpoint, response, config) {
|
|
|
8930
9444
|
cause
|
|
8931
9445
|
});
|
|
8932
9446
|
}
|
|
9447
|
+
requireUsableCommitProjection(response, parsed);
|
|
8933
9448
|
if (parsed && typeof parsed === "object" && "success" in parsed && typeof parsed.success === "boolean") return parsed;
|
|
8934
9449
|
return buildSuccessEnvelope(parsed, requestId);
|
|
8935
9450
|
}
|
|
@@ -8950,7 +9465,10 @@ function createRawCMSClient(getHeaders = () => ({}), baseUrl) {
|
|
|
8950
9465
|
endpoint,
|
|
8951
9466
|
body,
|
|
8952
9467
|
params,
|
|
8953
|
-
options
|
|
9468
|
+
options: {
|
|
9469
|
+
...options,
|
|
9470
|
+
headers: commandHeaders(endpoint, options.headers, generateRequestId())
|
|
9471
|
+
},
|
|
8954
9472
|
headers: getHeaders(),
|
|
8955
9473
|
baseUrl: normalizeCmsApiBaseUrl(baseUrl ?? resolveApiBaseUrl()),
|
|
8956
9474
|
sdkVersion
|
|
@@ -8963,6 +9481,9 @@ function createRawCMSClient(getHeaders = () => ({}), baseUrl) {
|
|
|
8963
9481
|
return fetchPromise;
|
|
8964
9482
|
};
|
|
8965
9483
|
}
|
|
9484
|
+
function surfaceTransportCapability(endpoint) {
|
|
9485
|
+
return endpoint === "getContentByPath" ? "revision-v1" : void 0;
|
|
9486
|
+
}
|
|
8966
9487
|
function buildApiRequestPlan(input) {
|
|
8967
9488
|
const { endpoint, body, params, headers = {}, baseUrl } = input;
|
|
8968
9489
|
const options = input.options ?? {};
|
|
@@ -8996,22 +9517,14 @@ function buildApiRequestPlan(input) {
|
|
|
8996
9517
|
if (isGetOrHead && typeof body === "object" && body !== null && !isFormDataBody(body)) Object.entries(body).forEach(([key, value]) => {
|
|
8997
9518
|
appendQueryParam(queryParams, key, value);
|
|
8998
9519
|
});
|
|
9520
|
+
appendQueryParam(queryParams, "surfaceTransport", surfaceTransportCapability(endpoint));
|
|
8999
9521
|
const queryString = queryParams.toString();
|
|
9000
9522
|
if (queryString) url += (url.includes("?") ? "&" : "?") + queryString;
|
|
9001
9523
|
const formDataBody = isFormDataBody(body) ? body : void 0;
|
|
9002
9524
|
const nextOptions = { ...options?.next ?? {} };
|
|
9003
9525
|
if (options?.cache === "no-store") delete nextOptions.revalidate;
|
|
9004
9526
|
else if (isGetOrHead && nextOptions.revalidate === void 0 && "revalidate" in endpointConfig && typeof endpointConfig.revalidate === "number") nextOptions.revalidate = endpointConfig.revalidate;
|
|
9005
|
-
if ("tags" in endpointConfig && Array.isArray(endpointConfig.tags))
|
|
9006
|
-
const processedTags = endpointConfig.tags.map((tag) => {
|
|
9007
|
-
let processedTag = tag;
|
|
9008
|
-
if (params) Object.entries(params).forEach(([key, value]) => {
|
|
9009
|
-
processedTag = processedTag.replace(`{${key}}`, String(value));
|
|
9010
|
-
});
|
|
9011
|
-
return /\{[^}]+\}/.test(processedTag) ? null : processedTag;
|
|
9012
|
-
}).filter((tag) => tag !== null);
|
|
9013
|
-
nextOptions.tags = Array.from(/* @__PURE__ */ new Set([...nextOptions.tags ?? [], ...processedTags]));
|
|
9014
|
-
}
|
|
9527
|
+
if ("tags" in endpointConfig && Array.isArray(endpointConfig.tags)) nextOptions.tags = buildCacheReadTags([...nextOptions.tags ?? [], ...endpointConfig.tags], params);
|
|
9015
9528
|
const init = {
|
|
9016
9529
|
method,
|
|
9017
9530
|
...options,
|
|
@@ -9044,6 +9557,7 @@ async function createApiRequestError(response, endpoint, fallbackMessage) {
|
|
|
9044
9557
|
requestId: response.headers.get("x-request-id") ?? void 0,
|
|
9045
9558
|
body,
|
|
9046
9559
|
errorCode: details.code ?? void 0,
|
|
9560
|
+
tag: details.tag ?? void 0,
|
|
9047
9561
|
retryAfterMs: parseRetryAfterHeader(response.headers.get("retry-after"))
|
|
9048
9562
|
});
|
|
9049
9563
|
}
|
|
@@ -9065,6 +9579,11 @@ function createInternalAPIClient(baseUrl) {
|
|
|
9065
9579
|
function createBearerAPIClient(token, baseUrl) {
|
|
9066
9580
|
return createParsedClient(createRawCMSClient(() => ({ Authorization: `Bearer ${typeof token === "function" ? token() : token}` }), baseUrl));
|
|
9067
9581
|
}
|
|
9582
|
+
/** Positive receipt evidence is kept distinct from an HTTP or request failure. */
|
|
9583
|
+
function requireUsableCommitProjection(response, parsed) {
|
|
9584
|
+
if (response.headers.get("x-rb-page-commit") !== "confirmed-refresh") return;
|
|
9585
|
+
throw new ApiCommittedWriteNotice(pageCommitConfirmationEnvelopeSchema.parse(parsed).data);
|
|
9586
|
+
}
|
|
9068
9587
|
//#endregion
|
|
9069
9588
|
//#region ../api/src/utils/isRecord.ts
|
|
9070
9589
|
function isRecord(value) {
|
|
@@ -9121,4 +9640,4 @@ function parsePublicProductCategorySelector(value) {
|
|
|
9121
9640
|
};
|
|
9122
9641
|
}
|
|
9123
9642
|
//#endregion
|
|
9124
|
-
export { createBearerAPIClient as a, ApiEnvelopeError as c,
|
|
9643
|
+
export { publicReadFreshnessSeconds as _, createBearerAPIClient as a, ApiEnvelopeError as c, PUBLIC_READ_ENDPOINT_DEFINITIONS as d, TAG_TEMPLATES as f, isPublicReadEndpoint as g, getPublicReadCachePolicy as h, ApiRequestError as i, isApiError as l, isSupportedLoaderEndpoint as m, parsePublicProductCategorySelector as n, createInternalAPIClient as o, SUPPORTED_LOADER_ENDPOINTS as p, isRecord as r, setSdkVersion as s, encodePublicProductCategorySelector as t, unwrapResponse as u };
|