@riverbankcms/sdk 0.107.0 → 0.108.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PreviewEditorSidebar-DpAbAl08.mjs → PreviewEditorSidebar-BBT-kZAM.mjs} +46 -11
- package/dist/{PreviewEditorUI-O7cn6Xxv.mjs → PreviewEditorUI-D69xNKT2.mjs} +10 -9
- package/dist/{PreviewQueryProvider-D0tnKl0t.mjs → PreviewQueryProvider-RRu7wyQ5.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-CVB7urtl.mjs → SdkPreviewModeRuntime-CuDjXH6o.mjs} +426 -72
- package/dist/{SiteChromeCustomizeContext-C_sizso-.mjs → SiteChromeCustomizeContext-BQUY2dEk.mjs} +3865 -544
- package/dist/_dts/ai/src/contracts/proposals.d.ts +3712 -220
- package/dist/_dts/api/src/blocks.d.ts +41 -7
- package/dist/_dts/api/src/bookingRecords.d.ts +180 -115
- package/dist/_dts/api/src/cache-tags.d.ts +3 -0
- package/dist/_dts/api/src/contentRuntime.d.ts +19 -1
- package/dist/_dts/api/src/endpoints.d.ts +99 -0
- package/dist/_dts/api/src/footer-settings.d.ts +1 -0
- package/dist/_dts/api/src/footerSettings.d.ts +8 -0
- package/dist/_dts/api/src/index.d.ts +5 -2
- package/dist/_dts/api/src/navigation/contracts.d.ts +3 -3
- package/dist/_dts/api/src/previewContentContract.d.ts +4 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +62 -0
- package/dist/_dts/api/src/siteBanner.d.ts +2 -2
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +143 -55
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +7 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +41 -1
- package/dist/_dts/blocks/src/primitives/layout/Section.d.ts +0 -1
- package/dist/_dts/blocks/src/rendering/server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/site-footer-runtime.d.ts +50 -0
- package/dist/_dts/blocks/src/system/blocks/site-footer.d.ts +9 -48
- package/dist/_dts/blocks/src/system/constants/background.d.ts +1 -1
- package/dist/_dts/blocks/src/system/icons/registry.d.ts +2 -1
- package/dist/_dts/blocks/src/system/icons/social.d.ts +5 -0
- package/dist/_dts/blocks/src/system/icons/svg.d.ts +1 -0
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +2 -2
- package/dist/_dts/blocks/src/system/node/fragments/backgroundLayer.d.ts +13 -0
- package/dist/_dts/blocks/src/system/node/fragments/footerNav.d.ts +2 -0
- package/dist/_dts/blocks/src/system/node/fragments/styledContainer.d.ts +4 -4
- package/dist/_dts/blocks/src/system/node/fragments/styledSection.d.ts +3 -12
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +1 -1
- package/dist/_dts/blocks/src/system/types/link.d.ts +3 -3
- package/dist/_dts/content-editor/src/FooterComposerPanel.d.ts +14 -0
- package/dist/_dts/content-editor/src/controller/EntryControllerProvider.d.ts +27 -8
- package/dist/_dts/content-editor/src/footerComposer.d.ts +56 -0
- package/dist/_dts/content-editor/src/hooks/useEntryActions.d.ts +1 -1
- package/dist/_dts/content-editor/src/hooks/useEntryMutations.d.ts +5 -5
- package/dist/_dts/content-editor/src/index.d.ts +2 -0
- package/dist/_dts/content-editor/src/primitives/PreviewRichTextEditor.d.ts +3 -1
- package/dist/_dts/content-editor/src/services/contentEntryServices.d.ts +20 -36
- package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +5 -1
- package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +11 -0
- package/dist/_dts/content-model/src/content-types/schema.d.ts +1 -1
- package/dist/_dts/content-model/src/definitions/shared.d.ts +3 -0
- package/dist/_dts/core/src/branded.d.ts +3 -0
- package/dist/_dts/core/src/editor-state.d.ts +4 -0
- package/dist/_dts/core/src/footer-composition.d.ts +143 -0
- package/dist/_dts/core/src/index.d.ts +2 -0
- package/dist/_dts/core/src/public-profile.d.ts +73 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +3043 -2941
- package/dist/_dts/db/src/schemas/forms.d.ts +10 -10
- package/dist/_dts/editor/src/primitives/rich-text/RichTextEditorSurface.d.ts +5 -0
- package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +1 -0
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockCreation.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockDuplication.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockReorder.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/block-editor/owner.d.ts +10 -0
- package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +1 -0
- package/dist/_dts/path-utils/src/index.d.ts +5 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewChromeLayer.d.ts +5 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/previewErrorMessages.d.ts +4 -0
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +1 -0
- package/dist/_dts/sdk/src/client/management/blocks.d.ts +14 -1
- package/dist/_dts/sdk/src/client/management/index.d.ts +1 -0
- package/dist/_dts/sdk/src/client/management/types.d.ts +15 -1
- package/dist/_dts/sdk/src/config/content-types.d.ts +2 -0
- package/dist/_dts/sdk/src/config/content-validation.d.ts +4 -0
- package/dist/_dts/sdk/src/navigation/index.d.ts +2 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +3 -2
- package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +2 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +1 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +13 -10
- package/dist/_dts/theme-core/src/accordions/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/buttons/personalities/index.d.ts +11 -0
- package/dist/_dts/theme-core/src/buttons/personalities/two-tone-pill.d.ts +17 -0
- package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/types.d.ts +3 -3
- package/dist/_dts/theme-core/src/cards/types.d.ts +3 -3
- package/dist/_dts/theme-core/src/footer/mode.d.ts +15 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/interactive/baseSchema.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +36 -30
- package/dist/_dts/theme-core/src/navigation/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/schema.d.ts +1186 -34
- package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +12 -1
- package/dist/_dts/theme-core/src/site-styles/siteChromeNavPreferences.d.ts +15 -0
- package/dist/cli/index.mjs +760 -374
- package/dist/client/{DiscountCodeDisclosure-BwGkvmVH.mjs → DiscountCodeDisclosure-D6TOf6Hi.mjs} +1 -1
- package/dist/client/{EventCombined.client-JnWE6Hzc.mjs → EventCombined.client-Dao3zxRk.mjs} +3 -3
- package/dist/client/{EventListing.client-DQewc_kg.mjs → EventListing.client-B2NNt4y1.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-DPAU3SFt.mjs → LeafletStaticMap-BhwFo16w.mjs} +1 -1
- package/dist/client/{MagicLinkForm-D4kpWCbW.mjs → MagicLinkForm-BWnB7cMR.mjs} +2 -2
- package/dist/client/{StepIndicator-CBlkb4rA.mjs → StepIndicator-TzRiQ0BY.mjs} +2 -2
- package/dist/client/{accordion-DAIBVpTS.mjs → accordion-BPy-AJ4_.mjs} +1 -1
- package/dist/client/{bookingForm-DZ-4l5_1.mjs → bookingForm-BL4PGZds.mjs} +6 -6
- package/dist/client/bookings.mjs +143 -94
- package/dist/client/{buttons-DJgynGHQ.mjs → buttons-EBjyslaX.mjs} +144 -95
- package/dist/client/{carousel-D-SLfX8r.mjs → carousel-C2b7Cn9-.mjs} +1 -1
- package/dist/client/{cart-CEgbgJhX.mjs → cart-BQcbXIVD.mjs} +3 -3
- package/dist/client/{checkout-CXWrCRAA.mjs → checkout-DEmpGRJu.mjs} +3 -3
- package/dist/client/client.mjs +827 -434
- package/dist/client/{courseRegistration-DVmLrRVz.mjs → courseRegistration-BqRZPmsq.mjs} +7 -7
- package/dist/client/{eventCalendar-DCuyPY_c.mjs → eventCalendar-B8N_tSl5.mjs} +5 -5
- package/dist/client/{eventCombined-kP2CA2D4.mjs → eventCombined-Gjn6gtq7.mjs} +2 -2
- package/dist/client/{eventDetails-DU0LeF5e.mjs → eventDetails-M-VCxA-r.mjs} +3 -3
- package/dist/client/{eventListing-CcHF87BI.mjs → eventListing-DR19hqYi.mjs} +2 -2
- package/dist/client/{eventRegistration-DJnR0yFH.mjs → eventRegistration-BR02a0k3.mjs} +7 -7
- package/dist/client/{form-CH1lCusH.mjs → form-LY2xIbwg.mjs} +2 -2
- package/dist/client/{headerSection-CBPFZoku.mjs → headerSection-CYwwXJfh.mjs} +3 -3
- package/dist/client/hooks.mjs +377 -362
- package/dist/client/{locationMap-Cx1hBg5n.mjs → locationMap-DWnBXrFq.mjs} +2 -2
- package/dist/client/{newsletterForm-1ZL_ti9u.mjs → newsletterForm-D9s-fQ2P.mjs} +2 -2
- package/dist/client/{pricing-BIbzmV0G.mjs → pricing-DDq80oYc.mjs} +1 -1
- package/dist/client/{productDetail-BTh5gHBV.mjs → productDetail-B0SbWd45.mjs} +3 -3
- package/dist/client/{productList-Cc7OMrqN.mjs → productList-PwYlZn0y.mjs} +3 -3
- package/dist/client/{propsDecoder-oR-M-ISN.mjs → propsDecoder-BRWBiH7i.mjs} +33 -9
- package/dist/client/rendering/client.mjs +247 -40
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +478 -270
- package/dist/client/{shop-CQ_YbCnn.mjs → shop-CMwZPYME.mjs} +6 -6
- package/dist/client/{shop-commerce-BM-AoD3M.mjs → shop-commerce-BuxsFate.mjs} +5 -5
- package/dist/client/{shop-commerce-store-DFMQhU5p.mjs → shop-commerce-store-boYlEJ91.mjs} +1 -1
- package/dist/client/{shopShared-D0SKO2Cu.mjs → shopShared-D2naaOes.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-CrG4_ARt.mjs → useDiscountCodeUi-D9RHpVoj.mjs} +1 -1
- package/dist/client/{useEventFilters-CxK8Fekl.mjs → useEventFilters-igGiK1re.mjs} +3 -3
- package/dist/client/{usePolling-jcVryNgZ.mjs → usePolling-CI7MbsFB.mjs} +2 -2
- package/dist/preview-next/before-render.mjs +178 -0
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/middleware.mjs +178 -0
- package/dist/{previewAuthStore-BPcJPzdz.mjs → previewAuthStore-a_cBD28m.mjs} +178 -0
- package/dist/{sdk-runtime-C39Rsk-x.mjs → sdk-runtime-MBzD-GmP.mjs} +2 -2
- package/dist/{separator-BoMSQnsP.mjs → separator-5ahRBC85.mjs} +1 -1
- package/dist/server/components.mjs +556 -366
- package/dist/server/config-validation.mjs +384 -363
- package/dist/server/config.mjs +384 -364
- package/dist/server/data.mjs +377 -362
- package/dist/server/index.mjs +179 -1
- package/dist/server/navigation.mjs +9 -3
- package/dist/server/next.mjs +1384 -995
- package/dist/server/page-converter.mjs +368 -355
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +539 -360
- package/dist/server/rendering.mjs +556 -366
- package/dist/server/routing.mjs +613 -543
- package/dist/server/server.mjs +554 -361
- package/dist/server/theme-bridge.mjs +189 -98
- package/dist/server/theme.mjs +161 -95
- package/dist/styles/index.css +7 -1
- package/package.json +1 -1
package/dist/server/index.mjs
CHANGED
|
@@ -19,6 +19,12 @@ function encodePublicProductCategorySelector(selector) {
|
|
|
19
19
|
}
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region ../api/src/apiEndpointTypes.ts
|
|
22
|
+
function allowedDemoMutationPolicy() {
|
|
23
|
+
return {
|
|
24
|
+
classification: "allowed",
|
|
25
|
+
publicMessage: ""
|
|
26
|
+
};
|
|
27
|
+
}
|
|
22
28
|
function blockedDemoMutationPolicy(classification, publicMessage) {
|
|
23
29
|
if (publicMessage.trim() === "") throw new Error(`Demo mutation policy ${classification} requires publicMessage.`);
|
|
24
30
|
return {
|
|
@@ -46,6 +52,7 @@ const TAG_TEMPLATES = {
|
|
|
46
52
|
siteRouteOutcomes: "riverbank:site:{siteId}:route-outcomes",
|
|
47
53
|
routeById: "riverbank:route:{routeId}",
|
|
48
54
|
pageById: "riverbank:page:{pageId}",
|
|
55
|
+
pageSurfaceById: "riverbank:page-surface:{pageSurfaceId}",
|
|
49
56
|
workflowRunById: "riverbank:workflow-run:{runId}",
|
|
50
57
|
siteForms: "riverbank:site:{siteId}:forms",
|
|
51
58
|
formById: "riverbank:form:{formId}",
|
|
@@ -71,6 +78,7 @@ const TAG_TEMPLATES = {
|
|
|
71
78
|
const DEMO_MUTATION_BLOCKED_HIDDEN = blockedDemoMutationPolicy("blocked-hidden", "This action is not available in demo sites.");
|
|
72
79
|
const DEMO_MUTATION_BLOCKED_DISABLED = blockedDemoMutationPolicy("blocked-disabled", "This setting is disabled in demo sites.");
|
|
73
80
|
const DEMO_MUTATION_INTERNAL_ONLY = blockedDemoMutationPolicy("internal-only", "This internal operation is not available in demo sites.");
|
|
81
|
+
const DEMO_MUTATION_ALLOWED = allowedDemoMutationPolicy();
|
|
74
82
|
const API_ENDPOINTS$1 = {
|
|
75
83
|
aiContentUpdateChat: {
|
|
76
84
|
path: "/ai/content-update-chat",
|
|
@@ -2209,6 +2217,49 @@ const API_ENDPOINTS$1 = {
|
|
|
2209
2217
|
auth: "user",
|
|
2210
2218
|
responseKind: "json"
|
|
2211
2219
|
},
|
|
2220
|
+
updatePageSurfaceDraftContent: {
|
|
2221
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/content",
|
|
2222
|
+
method: "PUT",
|
|
2223
|
+
errors: [
|
|
2224
|
+
"validation:invalid_input",
|
|
2225
|
+
"resource:not_found",
|
|
2226
|
+
"resource:conflict",
|
|
2227
|
+
"server:internal_error"
|
|
2228
|
+
],
|
|
2229
|
+
tags: [TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById],
|
|
2230
|
+
auth: "user",
|
|
2231
|
+
responseKind: "json"
|
|
2232
|
+
},
|
|
2233
|
+
discardPageSurfaceDraftContent: {
|
|
2234
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/content/draft",
|
|
2235
|
+
method: "DELETE",
|
|
2236
|
+
errors: [
|
|
2237
|
+
"validation:invalid_input",
|
|
2238
|
+
"resource:not_found",
|
|
2239
|
+
"resource:conflict",
|
|
2240
|
+
"server:internal_error"
|
|
2241
|
+
],
|
|
2242
|
+
tags: [TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById],
|
|
2243
|
+
auth: "user",
|
|
2244
|
+
responseKind: "json"
|
|
2245
|
+
},
|
|
2246
|
+
updatePageSurfaceRouteMetadata: {
|
|
2247
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/metadata",
|
|
2248
|
+
method: "PATCH",
|
|
2249
|
+
errors: [
|
|
2250
|
+
"validation:invalid_input",
|
|
2251
|
+
"resource:not_found",
|
|
2252
|
+
"resource:conflict",
|
|
2253
|
+
"server:internal_error"
|
|
2254
|
+
],
|
|
2255
|
+
tags: [
|
|
2256
|
+
TAG_TEMPLATES.siteCollection,
|
|
2257
|
+
TAG_TEMPLATES.siteRoutableContent,
|
|
2258
|
+
TAG_TEMPLATES.pageSurfaceById
|
|
2259
|
+
],
|
|
2260
|
+
auth: "user",
|
|
2261
|
+
responseKind: "json"
|
|
2262
|
+
},
|
|
2212
2263
|
runSdkWorkflow: {
|
|
2213
2264
|
path: "/sites/{siteId}/content/{type}/{entryId}/workflows/{workflowId}/run",
|
|
2214
2265
|
method: "POST",
|
|
@@ -2589,6 +2640,50 @@ const API_ENDPOINTS$1 = {
|
|
|
2589
2640
|
errors: [],
|
|
2590
2641
|
responseKind: "json"
|
|
2591
2642
|
},
|
|
2643
|
+
getFooterComposition: {
|
|
2644
|
+
path: "/sites/{siteId}/settings/footer-composition",
|
|
2645
|
+
method: "GET",
|
|
2646
|
+
revalidate: 120,
|
|
2647
|
+
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings],
|
|
2648
|
+
auth: "user",
|
|
2649
|
+
errors: ["resource:not_found", "server:internal_error"],
|
|
2650
|
+
responseKind: "json"
|
|
2651
|
+
},
|
|
2652
|
+
updateFooterComposition: {
|
|
2653
|
+
path: "/sites/{siteId}/settings/footer-composition",
|
|
2654
|
+
method: "POST",
|
|
2655
|
+
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings],
|
|
2656
|
+
auth: "user",
|
|
2657
|
+
demoMutation: DEMO_MUTATION_ALLOWED,
|
|
2658
|
+
errors: [
|
|
2659
|
+
"validation:invalid_input",
|
|
2660
|
+
"resource:not_found",
|
|
2661
|
+
"server:internal_error"
|
|
2662
|
+
],
|
|
2663
|
+
responseKind: "json"
|
|
2664
|
+
},
|
|
2665
|
+
getPublicProfile: {
|
|
2666
|
+
path: "/sites/{siteId}/settings/public-profile",
|
|
2667
|
+
method: "GET",
|
|
2668
|
+
revalidate: 120,
|
|
2669
|
+
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings],
|
|
2670
|
+
auth: "user",
|
|
2671
|
+
errors: ["resource:not_found", "server:internal_error"],
|
|
2672
|
+
responseKind: "json"
|
|
2673
|
+
},
|
|
2674
|
+
updatePublicProfile: {
|
|
2675
|
+
path: "/sites/{siteId}/settings/public-profile",
|
|
2676
|
+
method: "POST",
|
|
2677
|
+
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings],
|
|
2678
|
+
auth: "user",
|
|
2679
|
+
demoMutation: DEMO_MUTATION_ALLOWED,
|
|
2680
|
+
errors: [
|
|
2681
|
+
"validation:invalid_input",
|
|
2682
|
+
"resource:not_found",
|
|
2683
|
+
"server:internal_error"
|
|
2684
|
+
],
|
|
2685
|
+
responseKind: "json"
|
|
2686
|
+
},
|
|
2592
2687
|
updateSiteLayoutSettings: {
|
|
2593
2688
|
path: "/sites/{siteId}/settings/layout",
|
|
2594
2689
|
method: "POST",
|
|
@@ -3661,6 +3756,76 @@ const API_ENDPOINTS$1 = {
|
|
|
3661
3756
|
responseKind: "json",
|
|
3662
3757
|
errors: ["resource:not_found"]
|
|
3663
3758
|
},
|
|
3759
|
+
listPageSurfaceContentSlots: {
|
|
3760
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/slots",
|
|
3761
|
+
method: "GET",
|
|
3762
|
+
tags: [
|
|
3763
|
+
TAG_TEMPLATES.siteCollection,
|
|
3764
|
+
TAG_TEMPLATES.pageSurfaceById,
|
|
3765
|
+
"surface-slots",
|
|
3766
|
+
"blocks"
|
|
3767
|
+
],
|
|
3768
|
+
auth: "user",
|
|
3769
|
+
responseKind: "json",
|
|
3770
|
+
errors: [
|
|
3771
|
+
"resource:not_found",
|
|
3772
|
+
"resource:conflict",
|
|
3773
|
+
"server:internal_error"
|
|
3774
|
+
]
|
|
3775
|
+
},
|
|
3776
|
+
createPageSurfaceSlotBlock: {
|
|
3777
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/slots/{slotKey}/blocks",
|
|
3778
|
+
method: "POST",
|
|
3779
|
+
tags: [
|
|
3780
|
+
TAG_TEMPLATES.siteCollection,
|
|
3781
|
+
TAG_TEMPLATES.pageSurfaceById,
|
|
3782
|
+
"surface-slot-{slotKey}",
|
|
3783
|
+
"blocks"
|
|
3784
|
+
],
|
|
3785
|
+
auth: "user",
|
|
3786
|
+
responseKind: "json",
|
|
3787
|
+
errors: [
|
|
3788
|
+
"validation:invalid_input",
|
|
3789
|
+
"resource:not_found",
|
|
3790
|
+
"resource:conflict",
|
|
3791
|
+
"server:internal_error"
|
|
3792
|
+
]
|
|
3793
|
+
},
|
|
3794
|
+
reorderPageSurfaceSlotBlocks: {
|
|
3795
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/slots/{slotKey}/blocks/reorder",
|
|
3796
|
+
method: "POST",
|
|
3797
|
+
tags: [
|
|
3798
|
+
TAG_TEMPLATES.siteCollection,
|
|
3799
|
+
TAG_TEMPLATES.pageSurfaceById,
|
|
3800
|
+
"surface-slot-{slotKey}",
|
|
3801
|
+
"blocks"
|
|
3802
|
+
],
|
|
3803
|
+
auth: "user",
|
|
3804
|
+
responseKind: "json",
|
|
3805
|
+
errors: [
|
|
3806
|
+
"validation:invalid_input",
|
|
3807
|
+
"resource:not_found",
|
|
3808
|
+
"resource:conflict",
|
|
3809
|
+
"server:internal_error"
|
|
3810
|
+
]
|
|
3811
|
+
},
|
|
3812
|
+
deletePageSurfaceSlotBlock: {
|
|
3813
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/slots/{slotKey}/blocks/{blockId}",
|
|
3814
|
+
method: "DELETE",
|
|
3815
|
+
tags: [
|
|
3816
|
+
TAG_TEMPLATES.siteCollection,
|
|
3817
|
+
TAG_TEMPLATES.pageSurfaceById,
|
|
3818
|
+
"surface-slot-{slotKey}",
|
|
3819
|
+
"blocks"
|
|
3820
|
+
],
|
|
3821
|
+
auth: "user",
|
|
3822
|
+
responseKind: "json",
|
|
3823
|
+
errors: [
|
|
3824
|
+
"resource:not_found",
|
|
3825
|
+
"resource:conflict",
|
|
3826
|
+
"server:internal_error"
|
|
3827
|
+
]
|
|
3828
|
+
},
|
|
3664
3829
|
createBlock: {
|
|
3665
3830
|
path: "/sites/{siteId}/pages/{pageId}/blocks",
|
|
3666
3831
|
method: "POST",
|
|
@@ -6273,6 +6438,19 @@ const API_ENDPOINTS$1 = {
|
|
|
6273
6438
|
auth: "service",
|
|
6274
6439
|
responseKind: "json"
|
|
6275
6440
|
},
|
|
6441
|
+
sdkPatchPageBlock: {
|
|
6442
|
+
path: "/sdk/{siteId}/pages/{identifier}/blocks/{blockIdentifier}",
|
|
6443
|
+
method: "PATCH",
|
|
6444
|
+
errors: [
|
|
6445
|
+
"validation:invalid_input",
|
|
6446
|
+
"resource:not_found",
|
|
6447
|
+
"resource:conflict",
|
|
6448
|
+
"billing:plan_limit_exceeded",
|
|
6449
|
+
"server:internal_error"
|
|
6450
|
+
],
|
|
6451
|
+
auth: "service",
|
|
6452
|
+
responseKind: "json"
|
|
6453
|
+
},
|
|
6276
6454
|
sdkReorderPageBlocks: {
|
|
6277
6455
|
path: "/sdk/{siteId}/pages/{identifier}/blocks/reorder",
|
|
6278
6456
|
method: "POST",
|
|
@@ -7548,7 +7726,7 @@ var SimpleCache = class {
|
|
|
7548
7726
|
* 1. This constant
|
|
7549
7727
|
* 2. The "version" field in package.json
|
|
7550
7728
|
*/
|
|
7551
|
-
const SDK_VERSION = "0.
|
|
7729
|
+
const SDK_VERSION = "0.108.0";
|
|
7552
7730
|
//#endregion
|
|
7553
7731
|
//#region src/client/error.ts
|
|
7554
7732
|
let _Symbol$for;
|
|
@@ -111,8 +111,11 @@ function getPrimaryNavigation(navigation) {
|
|
|
111
111
|
* ```
|
|
112
112
|
*/
|
|
113
113
|
function getFooterNavigation(navigation) {
|
|
114
|
+
return getFooterNavigationByRole(navigation, "main");
|
|
115
|
+
}
|
|
116
|
+
function getFooterNavigationByRole(navigation, role) {
|
|
114
117
|
if (!navigation || navigation.length === 0) return null;
|
|
115
|
-
const footerMenus = navigation.filter((menu) => menu.isFooter);
|
|
118
|
+
const footerMenus = navigation.filter((menu) => menu.footerRole === role || role === "main" && menu.footerRole == null && menu.isFooter);
|
|
116
119
|
if (footerMenus.length > 1) console.warn(`[riverbank/sdk] Multiple footer navigation menus detected (${footerMenus.length}); using first flagged menu by input order.`);
|
|
117
120
|
return footerMenus[0] ?? null;
|
|
118
121
|
}
|
|
@@ -552,7 +555,10 @@ function buildMenu(navigation, routes, options) {
|
|
|
552
555
|
* ```
|
|
553
556
|
*/
|
|
554
557
|
function buildFooterMenu(navigation, routes, options) {
|
|
555
|
-
|
|
558
|
+
return buildFooterMenuForRole(navigation, routes, "main", options);
|
|
559
|
+
}
|
|
560
|
+
function buildFooterMenuForRole(navigation, routes, role, options) {
|
|
561
|
+
const menu = getFooterNavigationByRole(navigation, role);
|
|
556
562
|
if (!menu) return {
|
|
557
563
|
items: [],
|
|
558
564
|
ctaItem: null,
|
|
@@ -656,4 +662,4 @@ function buildLogo(logo, fallbackAlt) {
|
|
|
656
662
|
return result;
|
|
657
663
|
}
|
|
658
664
|
//#endregion
|
|
659
|
-
export { buildFooterMenu, buildLogo, buildLogoViewModel, buildMenu, buildMenuViewModel, getFooterNavigation, getNavItemsBySlug, getNavigationBySlug, getPrimaryNavItems, getPrimaryNavigation, isNavDropdown, isNavLink, resolveNavigationLinkHref, transformToNavItems };
|
|
665
|
+
export { buildFooterMenu, buildFooterMenuForRole, buildLogo, buildLogoViewModel, buildMenu, buildMenuViewModel, getFooterNavigation, getFooterNavigationByRole, getNavItemsBySlug, getNavigationBySlug, getPrimaryNavItems, getPrimaryNavigation, isNavDropdown, isNavLink, resolveNavigationLinkHref, transformToNavItems };
|