@riverbankcms/sdk 0.78.2 → 0.79.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.
Files changed (159) hide show
  1. package/README.md +80 -0
  2. package/dist/{PreviewEditorSidebar-4DXLYX2V.mjs → PreviewEditorSidebar-56NMJMIK.mjs} +724 -47
  3. package/dist/{PreviewEditorUI-CS5P4N3P.mjs → PreviewEditorUI-27KJVEET.mjs} +3 -3
  4. package/dist/SdkPreviewModeRuntime-H4BSP6E7.mjs +8 -0
  5. package/dist/_dts/ai/src/contracts/proposals.d.ts +36 -0
  6. package/dist/_dts/api/src/endpoints.d.ts +55 -0
  7. package/dist/_dts/api/src/index.d.ts +5 -3
  8. package/dist/_dts/api/src/media.d.ts +8 -1
  9. package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +1 -1
  10. package/dist/_dts/api/src/navigation/dashboardSiteNav.d.ts +8 -8
  11. package/dist/_dts/api/src/navigation/identity.d.ts +59 -0
  12. package/dist/_dts/api/src/navigation.d.ts +2 -0
  13. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +4 -0
  14. package/dist/_dts/api/src/sdkContracts.d.ts +1 -0
  15. package/dist/_dts/api/src/siteIcons.d.ts +128 -0
  16. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +16 -0
  17. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +7 -0
  18. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +6 -1
  19. package/dist/_dts/api/src/types.d.ts +1 -1
  20. package/dist/_dts/api/src/webhooks.d.ts +239 -0
  21. package/dist/_dts/blocks/src/index.d.ts +4 -0
  22. package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +288 -288
  23. package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +288 -288
  24. package/dist/_dts/blocks/src/system/blocks/cart.d.ts +288 -288
  25. package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +288 -288
  26. package/dist/_dts/blocks/src/system/blocks/collection.d.ts +288 -288
  27. package/dist/_dts/blocks/src/system/blocks/faq.d.ts +294 -289
  28. package/dist/_dts/blocks/src/system/blocks/feature-card-icons.d.ts +57 -0
  29. package/dist/_dts/blocks/src/system/blocks/feature-cards.d.ts +4 -0
  30. package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +288 -288
  31. package/dist/_dts/blocks/src/system/blocks/index.d.ts +1 -0
  32. package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +1 -1
  33. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +22 -22
  34. package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +288 -288
  35. package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +288 -288
  36. package/dist/_dts/blocks/src/system/blocks/shop.d.ts +288 -288
  37. package/dist/_dts/blocks/src/system/blocks/testimonials.d.ts +7 -1
  38. package/dist/_dts/blocks/src/system/customize/backgrounds.d.ts +170 -0
  39. package/dist/_dts/blocks/src/system/fragments/library/testimonialsCarousel.d.ts +5 -0
  40. package/dist/_dts/blocks/src/system/helpers/resolveBackground.d.ts +3 -1
  41. package/dist/_dts/blocks/src/system/icons/ids.d.ts +13 -0
  42. package/dist/_dts/blocks/src/system/icons/index.d.ts +6 -0
  43. package/dist/_dts/blocks/src/system/icons/presets.d.ts +4 -0
  44. package/dist/_dts/blocks/src/system/icons/registry.d.ts +18 -0
  45. package/dist/_dts/blocks/src/system/icons/semantic.d.ts +239 -0
  46. package/dist/_dts/blocks/src/system/icons/value.d.ts +94 -0
  47. package/dist/_dts/blocks/src/system/index.d.ts +1 -0
  48. package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +4 -1
  49. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +23 -0
  50. package/dist/_dts/blocks/src/system/runtime/nodes/feature-card-icon.d.ts +13 -0
  51. package/dist/_dts/content-model/src/contentManifest.d.ts +3 -1
  52. package/dist/_dts/core/src/branded.d.ts +6 -0
  53. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +191 -0
  54. package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +12 -1
  55. package/dist/_dts/editor-blocks/src/block-editor/BlockCardBody.d.ts +12 -1
  56. package/dist/_dts/editor-blocks/src/block-editor/BlockCardHeader.d.ts +12 -2
  57. package/dist/_dts/editor-blocks/src/block-editor/FeatureCardIconsPanel.d.ts +21 -0
  58. package/dist/_dts/editor-blocks/src/block-editor/GeneratedIconSetDialog.d.ts +40 -0
  59. package/dist/_dts/editor-blocks/src/block-editor/SortableBlockItem.d.ts +11 -1
  60. package/dist/_dts/editor-blocks/src/block-editor/featureCardIconActions.d.ts +82 -0
  61. package/dist/_dts/editor-blocks/src/widgets/icon-picker/IconPickerField.d.ts +1 -1
  62. package/dist/_dts/media-core/src/fileDomain.d.ts +8 -1
  63. package/dist/_dts/media-editor/src/MediaEditor.d.ts +3 -2
  64. package/dist/_dts/media-react/src/components/MediaLibrary.d.ts +2 -1
  65. package/dist/_dts/media-react/src/components/MediaPickerMini.d.ts +2 -1
  66. package/dist/_dts/preview-next/src/client/blocks/previewCustomizeActions.d.ts +17 -0
  67. package/dist/_dts/preview-next/src/client/preview/PageDesignEditorStateContext.d.ts +4 -0
  68. package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +3 -2
  69. package/dist/_dts/preview-next/src/client/preview/previewCustomizeHistory.d.ts +6 -0
  70. package/dist/_dts/sdk/src/cli/navigationIdentity.d.ts +11 -0
  71. package/dist/_dts/sdk/src/cli/site-commands/navigationCommands.d.ts +4 -0
  72. package/dist/_dts/sdk/src/cli/site-commands/oneOffCommands.d.ts +1 -0
  73. package/dist/_dts/sdk/src/cli/sync/diff.d.ts +9 -0
  74. package/dist/_dts/sdk/src/client/management/types.d.ts +2 -0
  75. package/dist/_dts/sdk/src/config/field-definitions.d.ts +3 -1
  76. package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
  77. package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +19 -2
  78. package/dist/_dts/sdk/src/next/index.d.ts +1 -1
  79. package/dist/_dts/sdk/src/next/revalidate.d.ts +26 -5
  80. package/dist/_dts/sdk/src/next/static-params.d.ts +28 -3
  81. package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -1
  82. package/dist/_dts/sdk/src/public-api/runtime.d.ts +1 -1
  83. package/dist/_dts/sdk/src/version.d.ts +1 -1
  84. package/dist/_dts/sdk/src/webhooks/index.d.ts +1 -1
  85. package/dist/_dts/sdk/src/webhooks/verify.d.ts +6 -102
  86. package/dist/_dts/site-commands/src/commands.d.ts +3 -0
  87. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  88. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +3 -3
  89. package/dist/_dts/theme-core/src/schema.d.ts +5 -5
  90. package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +25 -2
  91. package/dist/_dts/theme-core/src/site-styles/designState.d.ts +5 -5
  92. package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +4 -2
  93. package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +4 -4
  94. package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +2 -0
  95. package/dist/_dts/ui/src/combobox.d.ts +1 -0
  96. package/dist/{chunk-RGTOD4AJ.mjs → chunk-4HCW7FHJ.mjs} +491 -56
  97. package/dist/{chunk-OKMBEAXY.mjs → chunk-A3HHFKVT.mjs} +1 -1
  98. package/dist/{chunk-6HYXHRAI.mjs → chunk-GP555I66.mjs} +177 -7
  99. package/dist/{chunk-CR5HKAGU.mjs → chunk-K2IIF34C.mjs} +55 -0
  100. package/dist/{chunk-4QEGTLK6.mjs → chunk-LCY32PXF.mjs} +1 -1
  101. package/dist/{chunk-MCRQMPET.mjs → chunk-V47ZU33I.mjs} +1745 -157
  102. package/dist/cli/index.mjs +1169 -171
  103. package/dist/cli/init-docs/content/workflow-editor-workflows.md +2 -0
  104. package/dist/cli/init-docs/content/workflow-isr-revalidation.md +138 -0
  105. package/dist/client/{accordion-PLYNJIIM.mjs → accordion-QLA7KBYO.mjs} +1 -1
  106. package/dist/client/{bookingForm-BXAP6AO7.mjs → bookingForm-PYZIPA5G.mjs} +3 -3
  107. package/dist/client/bookings.mjs +110 -2
  108. package/dist/client/{carousel-TRBXDHGF.mjs → carousel-5EIULWBI.mjs} +2 -2
  109. package/dist/client/{cart-Z7H3HJRS.mjs → cart-DOP3FNI4.mjs} +5 -5
  110. package/dist/client/{checkout-WAFCUBIX.mjs → checkout-BVMF6FBV.mjs} +5 -5
  111. package/dist/client/{chunk-JRDUHZCT.mjs → chunk-44K2U3QI.mjs} +4 -4
  112. package/dist/client/{chunk-UVQEJJTN.mjs → chunk-CCNTDRCF.mjs} +1 -1
  113. package/dist/client/{chunk-ZI3LLBPZ.mjs → chunk-GG4M2NP6.mjs} +1 -1
  114. package/dist/client/{chunk-JGXPTEI2.mjs → chunk-R5ESWNKX.mjs} +6 -3
  115. package/dist/client/{chunk-CWGTG37I.mjs → chunk-TYONZMST.mjs} +1 -1
  116. package/dist/client/{chunk-75OUS5MT.mjs → chunk-UDS3NTWA.mjs} +1 -1
  117. package/dist/client/{chunk-DNRGY432.mjs → chunk-V6M5FCR5.mjs} +1 -1
  118. package/dist/client/{chunk-FUXW6VW2.mjs → chunk-YLDYVRZL.mjs} +4 -4
  119. package/dist/client/client.mjs +21329 -19729
  120. package/dist/client/{courseRegistration-AHFQHWIJ.mjs → courseRegistration-E6EAA6NL.mjs} +3 -3
  121. package/dist/client/{eventCalendar-LDXTV5R7.mjs → eventCalendar-HBG3HAK6.mjs} +5 -5
  122. package/dist/client/{eventCombined-A4JGTNJO.mjs → eventCombined-6K5ZZWAK.mjs} +5 -5
  123. package/dist/client/{eventDetails-4YXTZ7EG.mjs → eventDetails-Q75ICXLT.mjs} +5 -5
  124. package/dist/client/{eventListing-P72TPFFM.mjs → eventListing-27P5F7DZ.mjs} +5 -5
  125. package/dist/client/{eventRegistration-LSYJHGMT.mjs → eventRegistration-IQ7AMASR.mjs} +5 -5
  126. package/dist/client/{form-AOPYOKOW.mjs → form-JRTD65FN.mjs} +1 -1
  127. package/dist/client/{headerSection-5TFYDFVQ.mjs → headerSection-7FPSSZHS.mjs} +2 -2
  128. package/dist/client/hooks.mjs +350 -35
  129. package/dist/client/{locationMap-QSZ3ZVAZ.mjs → locationMap-7NGFNYBH.mjs} +1 -1
  130. package/dist/client/{newsletterForm-KTRHZY52.mjs → newsletterForm-F3BADCI2.mjs} +1 -1
  131. package/dist/client/{productDetail-N4E775RG.mjs → productDetail-V3HP7ITJ.mjs} +5 -5
  132. package/dist/client/{productList-UGUQ2S45.mjs → productList-L3EGJUF2.mjs} +5 -5
  133. package/dist/client/rendering/client.mjs +2713 -1382
  134. package/dist/client/rendering/islands.mjs +18 -18
  135. package/dist/client/rendering.mjs +2014 -414
  136. package/dist/client/{shop-VHSZEEQ2.mjs → shop-DQUB5E2C.mjs} +5 -5
  137. package/dist/preview-next/before-render.mjs +55 -0
  138. package/dist/preview-next/client/runtime.mjs +5 -5
  139. package/dist/preview-next/middleware.mjs +55 -0
  140. package/dist/{sdk-runtime-WHPJEF5G.mjs → sdk-runtime-AF6KXJU4.mjs} +6 -6
  141. package/dist/server/components.mjs +2169 -781
  142. package/dist/server/config-validation.mjs +350 -35
  143. package/dist/server/config.mjs +350 -35
  144. package/dist/server/data.mjs +350 -35
  145. package/dist/server/index.mjs +64 -1
  146. package/dist/server/next/revalidate.mjs +229 -34
  147. package/dist/server/next.mjs +2307 -818
  148. package/dist/server/page-converter.mjs +275 -34
  149. package/dist/server/prebuild.mjs +1 -1
  150. package/dist/server/rendering/server.mjs +2174 -786
  151. package/dist/server/rendering.mjs +2187 -799
  152. package/dist/server/routing.mjs +767 -50
  153. package/dist/server/server.mjs +351 -36
  154. package/dist/server/theme-bridge.mjs +164 -2
  155. package/dist/server/theme.mjs +2 -2
  156. package/dist/server/webhooks.mjs +129 -25
  157. package/dist/styles/index.css +55 -0
  158. package/package.json +2 -1
  159. package/dist/SdkPreviewModeRuntime-IJDHTW4W.mjs +0 -8
@@ -3,116 +3,20 @@
3
3
  *
4
4
  * Provides framework-agnostic webhook signature verification and payload parsing.
5
5
  */
6
- import { z } from 'zod';
7
- /**
8
- * Supported webhook event types.
9
- * Keep in sync with apps/dashboard/src/lib/db/helpers/webhooks.ts
10
- */
11
- export declare const WebhookEventSchema: z.ZodEnum<{
12
- "page.published": "page.published";
13
- "entry.published": "entry.published";
14
- "navigation.updated": "navigation.updated";
15
- "theme.updated": "theme.updated";
16
- "site.settings_updated": "site.settings_updated";
17
- }>;
18
- export type WebhookEvent = z.infer<typeof WebhookEventSchema>;
19
- /** Data for page.published events */
20
- export declare const PagePublishedDataSchema: z.ZodObject<{
21
- pageId: z.ZodString;
22
- path: z.ZodString;
23
- slug: z.ZodOptional<z.ZodString>;
24
- }, z.core.$strip>;
25
- /** Data for entry.published events */
26
- export declare const EntryPublishedDataSchema: z.ZodObject<{
27
- entryId: z.ZodString;
28
- path: z.ZodString;
29
- contentType: z.ZodString;
30
- }, z.core.$strip>;
31
- /** Data for navigation.updated events */
32
- export declare const NavigationUpdatedDataSchema: z.ZodObject<{
33
- menuId: z.ZodOptional<z.ZodString>;
34
- }, z.core.$strip>;
35
- /** Data for theme.updated and site.settings_updated events (empty) */
36
- export declare const EmptyDataSchema: z.ZodObject<{}, z.core.$strip>;
37
- /**
38
- * Combined data schema that accepts any valid event data.
39
- * The actual shape depends on the event type.
40
- */
41
- export declare const WebhookDataSchema: z.ZodUnion<readonly [z.ZodObject<{
42
- pageId: z.ZodString;
43
- path: z.ZodString;
44
- slug: z.ZodOptional<z.ZodString>;
45
- }, z.core.$strip>, z.ZodObject<{
46
- entryId: z.ZodString;
47
- path: z.ZodString;
48
- contentType: z.ZodString;
49
- }, z.core.$strip>, z.ZodObject<{
50
- menuId: z.ZodOptional<z.ZodString>;
51
- }, z.core.$strip>, z.ZodObject<{}, z.core.$strip>]>;
52
- export type PagePublishedData = z.infer<typeof PagePublishedDataSchema>;
53
- export type EntryPublishedData = z.infer<typeof EntryPublishedDataSchema>;
54
- export type NavigationUpdatedData = z.infer<typeof NavigationUpdatedDataSchema>;
55
- /**
56
- * Zod schema for webhook payload validation.
57
- */
58
- export declare const WebhookPayloadSchema: z.ZodObject<{
59
- event: z.ZodEnum<{
60
- "page.published": "page.published";
61
- "entry.published": "entry.published";
62
- "navigation.updated": "navigation.updated";
63
- "theme.updated": "theme.updated";
64
- "site.settings_updated": "site.settings_updated";
65
- }>;
66
- timestamp: z.ZodString;
67
- siteId: z.ZodString;
68
- data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
69
- tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
70
- }, z.core.$strip>;
71
- /**
72
- * Webhook payload structure sent by the CMS.
73
- */
74
- export type WebhookPayload = z.infer<typeof WebhookPayloadSchema>;
6
+ import { type EmptyWebhookData, type EntryPathChangedData, type EntryPublishedData, type EntryRemovedData, type NavigationUpdatedData, type PagePathChangedData, type PagePublishedData, type PageRemovedData, type RevalidationPath, type RevalidationPathParseError, type RevalidationPathParseResult, type WebhookEvent, type WebhookPayload } from '../../../api/src/webhooks';
7
+ export { EmptyWebhookDataSchema as EmptyDataSchema, EntryPathChangedDataSchema, EntryPublishedDataSchema, EntryRemovedDataSchema, NavigationUpdatedDataSchema, PagePathChangedDataSchema, PagePublishedDataSchema, PageRemovedDataSchema, RIVERBANK_SIGNATURE_PREFIX, SUPPORTED_WEBHOOK_EVENTS, WebhookEventSchema, WebhookPayloadSchema, normalizeRevalidationPath, parseRevalidationPath, unwrapRevalidationPath, } from '../../../api/src/webhooks';
8
+ export type { EmptyWebhookData as EmptyData, RevalidationPath, RevalidationPathParseError, RevalidationPathParseResult, EntryPathChangedData, EntryPublishedData, EntryRemovedData, NavigationUpdatedData, PagePathChangedData, PagePublishedData, PageRemovedData, WebhookEvent, WebhookPayload, };
75
9
  /**
76
10
  * Type-safe webhook payload with discriminated data based on event type.
77
11
  */
78
- export type TypedWebhookPayload = {
79
- event: 'page.published';
80
- data: PagePublishedData;
81
- siteId: string;
82
- timestamp: string;
83
- tags?: string[];
84
- } | {
85
- event: 'entry.published';
86
- data: EntryPublishedData;
87
- siteId: string;
88
- timestamp: string;
89
- tags?: string[];
90
- } | {
91
- event: 'navigation.updated';
92
- data: NavigationUpdatedData;
93
- siteId: string;
94
- timestamp: string;
95
- tags?: string[];
96
- } | {
97
- event: 'theme.updated';
98
- data: Record<string, never>;
99
- siteId: string;
100
- timestamp: string;
101
- tags?: string[];
102
- } | {
103
- event: 'site.settings_updated';
104
- data: Record<string, never>;
105
- siteId: string;
106
- timestamp: string;
107
- tags?: string[];
108
- };
12
+ export type TypedWebhookPayload = WebhookPayload;
109
13
  /**
110
- * Verify a webhook signature using HMAC-SHA256.
14
+ * Verify a `sha256=<digest>` webhook signature using HMAC-SHA256.
111
15
  *
112
16
  * Uses timing-safe comparison to prevent timing attacks.
113
17
  *
114
18
  * @param payload - The raw request body as a string
115
- * @param signature - The X-Riverbank-Signature header value
19
+ * @param signature - The X-Riverbank-Signature header value (`sha256=<hex digest>`)
116
20
  * @param secret - The webhook signing secret (RIVERBANK_WEBHOOK_SECRET)
117
21
  * @returns true if signature is valid, false otherwise
118
22
  *
@@ -188,6 +188,7 @@ export declare const upsertNavigationMenuCommandSchema: z.ZodObject<{
188
188
  type: z.ZodLiteral<"upsertNavigationMenu">;
189
189
  ref: z.ZodPipe<z.ZodString, z.ZodTransform<NavigationRef, string>>;
190
190
  input: z.ZodObject<{
191
+ identifier: z.ZodOptional<z.ZodString>;
191
192
  name: z.ZodOptional<z.ZodString>;
192
193
  location: z.ZodOptional<z.ZodEnum<{
193
194
  header: "header";
@@ -1090,6 +1091,7 @@ export declare const siteCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1090
1091
  type: z.ZodLiteral<"upsertNavigationMenu">;
1091
1092
  ref: z.ZodPipe<z.ZodString, z.ZodTransform<NavigationRef, string>>;
1092
1093
  input: z.ZodObject<{
1094
+ identifier: z.ZodOptional<z.ZodString>;
1093
1095
  name: z.ZodOptional<z.ZodString>;
1094
1096
  location: z.ZodOptional<z.ZodEnum<{
1095
1097
  header: "header";
@@ -1924,6 +1926,7 @@ export declare const siteCommandBatchSchema: z.ZodObject<{
1924
1926
  type: z.ZodLiteral<"upsertNavigationMenu">;
1925
1927
  ref: z.ZodPipe<z.ZodString, z.ZodTransform<NavigationRef, string>>;
1926
1928
  input: z.ZodObject<{
1929
+ identifier: z.ZodOptional<z.ZodString>;
1927
1930
  name: z.ZodOptional<z.ZodString>;
1928
1931
  location: z.ZodOptional<z.ZodEnum<{
1929
1932
  header: "header";