@riverbankcms/sdk 0.93.0 → 0.95.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 (99) hide show
  1. package/README.md +3 -0
  2. package/dist/{PreviewEditorSidebar-D3PAF7NW.mjs → PreviewEditorSidebar-6FQYKOSB.mjs} +3 -3
  3. package/dist/{PreviewEditorUI-G5JVJEIJ.mjs → PreviewEditorUI-NPO2XMFB.mjs} +3 -3
  4. package/dist/SdkPreviewModeRuntime-PBEFH5AL.mjs +8 -0
  5. package/dist/_dts/api/src/bookingOperations.d.ts +7 -0
  6. package/dist/_dts/api/src/bookingRecords.d.ts +3 -0
  7. package/dist/_dts/api/src/cache-tags.d.ts +4 -0
  8. package/dist/_dts/api/src/contentRuntime.d.ts +14 -0
  9. package/dist/_dts/api/src/endpoints.d.ts +8 -0
  10. package/dist/_dts/api/src/event-presentation.d.ts +15 -0
  11. package/dist/_dts/api/src/index.d.ts +1 -1
  12. package/dist/_dts/api/src/public/endpoints.d.ts +1 -1
  13. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +17 -4
  14. package/dist/_dts/api/src/shared-contracts.d.ts +19 -9
  15. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +6 -1
  16. package/dist/_dts/blocks/src/portal/types.d.ts +7 -0
  17. package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
  18. package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +21 -6
  19. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/TicketSelectionStep.d.ts +5 -3
  20. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +5 -1
  21. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +2 -2
  22. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/sessionStorage.d.ts +9 -6
  23. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/ticketSelectionLines.d.ts +36 -0
  24. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +7 -1
  25. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +2 -2
  26. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +2 -3
  27. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +19 -4
  28. package/dist/_dts/content-model/src/entry-slots/types.d.ts +6 -0
  29. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +163 -2
  30. package/dist/_dts/media-core/src/assetsInUseSummary.d.ts +7 -0
  31. package/dist/_dts/media-core/src/mediaUsageProjection.d.ts +29 -1
  32. package/dist/_dts/sdk/src/client/types.d.ts +7 -2
  33. package/dist/_dts/sdk/src/next/middleware.d.ts +1 -0
  34. package/dist/_dts/sdk/src/next/redirect-destination.d.ts +3 -0
  35. package/dist/_dts/sdk/src/next/route-outcome-proxy.d.ts +22 -0
  36. package/dist/_dts/sdk/src/public-api/contracts.d.ts +20 -1
  37. package/dist/_dts/sdk/src/public-api/runtime.d.ts +1 -1
  38. package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +9 -1
  39. package/dist/_dts/sdk/src/version.d.ts +1 -1
  40. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  41. package/dist/{chunk-XIK2HYI3.mjs → chunk-4A6NWO3X.mjs} +7 -7
  42. package/dist/{chunk-NT76QGIJ.mjs → chunk-7ED5UNHL.mjs} +14 -0
  43. package/dist/{chunk-AQ6RT6LZ.mjs → chunk-K2SJTZMX.mjs} +2 -2
  44. package/dist/{chunk-A63UXN3P.mjs → chunk-PJPFTVZG.mjs} +2 -2
  45. package/dist/{chunk-AJZGT6YG.mjs → chunk-VTPPVAOL.mjs} +1 -1
  46. package/dist/{chunk-PCNCETBI.mjs → chunk-VZBSD4AJ.mjs} +449 -183
  47. package/dist/cli/index.mjs +176 -73
  48. package/dist/client/{accordion-RNQIPG55.mjs → accordion-LGO4IO5U.mjs} +1 -1
  49. package/dist/client/{bookingForm-HYEEVRLP.mjs → bookingForm-MWLS4LGU.mjs} +3 -3
  50. package/dist/client/bookings.mjs +211 -105
  51. package/dist/client/{carousel-W7DQ3YPU.mjs → carousel-6AHNP5HA.mjs} +1 -1
  52. package/dist/client/{cart-PXJ3SXXO.mjs → cart-CIXGYAZB.mjs} +4 -4
  53. package/dist/client/{checkout-X3JYSOXI.mjs → checkout-OTX6O3DN.mjs} +4 -4
  54. package/dist/client/{chunk-Q47XGAGS.mjs → chunk-AVBQSUIS.mjs} +1 -1
  55. package/dist/client/{chunk-WERRJXNJ.mjs → chunk-HOP7MKAZ.mjs} +1 -1
  56. package/dist/client/{chunk-IXDSXF2D.mjs → chunk-INRIT6DP.mjs} +353 -187
  57. package/dist/client/{chunk-DUOHLWLF.mjs → chunk-MYCXAKWP.mjs} +2 -2
  58. package/dist/client/{chunk-J6TMMMXW.mjs → chunk-R3NQTBWE.mjs} +1 -1
  59. package/dist/client/{chunk-YYVGSYBO.mjs → chunk-TREIML53.mjs} +3 -3
  60. package/dist/client/{chunk-6SYGVVWA.mjs → chunk-V67AT7ZW.mjs} +3 -0
  61. package/dist/client/{chunk-PICR3NTQ.mjs → chunk-Y2PMKCXO.mjs} +1 -1
  62. package/dist/client/client.mjs +503 -183
  63. package/dist/client/{courseRegistration-QZ67PVHO.mjs → courseRegistration-2LU6C3JL.mjs} +3 -3
  64. package/dist/client/{eventCalendar-V3BDHQNT.mjs → eventCalendar-OKUSISBZ.mjs} +6 -6
  65. package/dist/client/{eventCombined-XYFRN2RG.mjs → eventCombined-CMF6CD4S.mjs} +6 -6
  66. package/dist/client/{eventDetails-TFE5TWKV.mjs → eventDetails-XYWH7WXI.mjs} +6 -6
  67. package/dist/client/{eventListing-IQ6AGWZ6.mjs → eventListing-EK5DJTAH.mjs} +6 -6
  68. package/dist/client/{eventRegistration-WGJVFKQJ.mjs → eventRegistration-XDOSICV6.mjs} +6 -6
  69. package/dist/client/{form-6UZY6RUA.mjs → form-J6GOHKYG.mjs} +1 -1
  70. package/dist/client/{headerSection-RSFXY6V3.mjs → headerSection-C5SYJTRW.mjs} +2 -2
  71. package/dist/client/hooks.mjs +14 -0
  72. package/dist/client/{locationMap-24FH67I4.mjs → locationMap-QSQIFVVT.mjs} +2 -2
  73. package/dist/client/{newsletterForm-QVL3MLTN.mjs → newsletterForm-47VXJRWK.mjs} +1 -1
  74. package/dist/client/{productDetail-ZDYN3G4T.mjs → productDetail-5U6ISCC2.mjs} +4 -4
  75. package/dist/client/{productList-4BMJLQHZ.mjs → productList-XDZUMR3P.mjs} +4 -4
  76. package/dist/client/rendering/client.mjs +362 -182
  77. package/dist/client/rendering/islands.mjs +18 -18
  78. package/dist/client/rendering.mjs +489 -182
  79. package/dist/client/{shop-U5C634FF.mjs → shop-ZSZKIY3R.mjs} +4 -4
  80. package/dist/preview-next/before-render.mjs +14 -0
  81. package/dist/preview-next/client/runtime.mjs +5 -5
  82. package/dist/preview-next/middleware.mjs +14 -0
  83. package/dist/{sdk-runtime-VGV46WVB.mjs → sdk-runtime-PHNM7MRD.mjs} +6 -6
  84. package/dist/server/components.mjs +111 -0
  85. package/dist/server/config-validation.mjs +14 -0
  86. package/dist/server/config.mjs +14 -0
  87. package/dist/server/data.mjs +14 -0
  88. package/dist/server/index.mjs +44 -1
  89. package/dist/server/next/middleware.mjs +120 -0
  90. package/dist/server/next.mjs +225 -2
  91. package/dist/server/prebuild.mjs +1 -1
  92. package/dist/server/rendering/server.mjs +111 -0
  93. package/dist/server/rendering.mjs +127 -0
  94. package/dist/server/routing.mjs +14 -0
  95. package/dist/server/server.mjs +60 -1
  96. package/dist/server/theme-bridge.mjs +97 -0
  97. package/dist/styles/index.css +95 -0
  98. package/package.json +5 -1
  99. package/dist/SdkPreviewModeRuntime-NHTLRNQD.mjs +0 -8
@@ -22029,6 +22029,8 @@ var TAG_TEMPLATES = {
22029
22029
  siteNewsletter: "riverbank:site:{siteId}:newsletter",
22030
22030
  // Pages/routes (routable content)
22031
22031
  siteRoutableContent: "riverbank:site:{siteId}:routable-content",
22032
+ siteRedirects: "riverbank:site:{siteId}:redirects",
22033
+ siteRouteOutcomes: "riverbank:site:{siteId}:route-outcomes",
22032
22034
  routeById: "riverbank:route:{routeId}",
22033
22035
  pageById: "riverbank:page:{pageId}",
22034
22036
  workflowRunById: "riverbank:workflow-run:{runId}",
@@ -25484,6 +25486,18 @@ var ENDPOINT_DEFINITIONS = {
25484
25486
  auth: "public",
25485
25487
  responseKind: "json"
25486
25488
  },
25489
+ resolveRouteOutcome: {
25490
+ path: "/sites/{siteId}/route-outcome",
25491
+ method: "GET",
25492
+ tags: [
25493
+ TAG_TEMPLATES.siteRoutableContent,
25494
+ TAG_TEMPLATES.siteRedirects,
25495
+ TAG_TEMPLATES.siteRouteOutcomes
25496
+ ],
25497
+ auth: "public",
25498
+ responseKind: "json",
25499
+ errors: ["validation:invalid_input", "server:internal_error"]
25500
+ },
25487
25501
  getPageByPath: {
25488
25502
  path: "/sites/{siteId}/pages",
25489
25503
  method: "GET",
@@ -46923,6 +46937,56 @@ Examples:
46923
46937
  return pushConfigAction(output, { ...options, dashboard, isRemote, isJsonOutput });
46924
46938
  });
46925
46939
 
46940
+ // ../api/src/event-presentation.ts
46941
+ var MAX_CARD_TITLE_LENGTH = 120;
46942
+ function isRecord13(value) {
46943
+ return typeof value === "object" && value !== null && !Array.isArray(value);
46944
+ }
46945
+ function normalizeTitle(value) {
46946
+ if (typeof value !== "string") return null;
46947
+ const trimmed = value.trim();
46948
+ if (!trimmed) return null;
46949
+ return trimmed.length > MAX_CARD_TITLE_LENGTH ? trimmed.slice(0, MAX_CARD_TITLE_LENGTH) : trimmed;
46950
+ }
46951
+ function normalizeSummary(value) {
46952
+ if (typeof value !== "string") return null;
46953
+ const trimmed = value.trim();
46954
+ return trimmed || null;
46955
+ }
46956
+ function normalizeImage(value) {
46957
+ if (value == null) return null;
46958
+ if (typeof value === "string") {
46959
+ const trimmed = value.trim();
46960
+ return trimmed || null;
46961
+ }
46962
+ if (isRecord13(value)) return value;
46963
+ return null;
46964
+ }
46965
+ function hasOwnKey(value, key) {
46966
+ return Object.prototype.hasOwnProperty.call(value, key);
46967
+ }
46968
+ function deriveLinkedEventPresentation(input) {
46969
+ const base = isRecord13(input.storedPresentation) ? { ...input.storedPresentation } : {};
46970
+ const legacyTitle = base.title;
46971
+ delete base.title;
46972
+ if (!normalizeTitle(base.cardTitleOverride) && input.allowLegacyTitleInput) {
46973
+ const cardTitleOverride = normalizeTitle(legacyTitle);
46974
+ if (cardTitleOverride) {
46975
+ base.cardTitleOverride = cardTitleOverride;
46976
+ } else {
46977
+ delete base.cardTitleOverride;
46978
+ }
46979
+ }
46980
+ const linkedContent = input.linkedContent;
46981
+ if (isRecord13(linkedContent)) {
46982
+ base.summary = normalizeSummary(linkedContent.summary);
46983
+ if (hasOwnKey(linkedContent, "image")) {
46984
+ base.image = normalizeImage(linkedContent.image);
46985
+ }
46986
+ }
46987
+ return Object.keys(base).length > 0 ? base : null;
46988
+ }
46989
+
46926
46990
  // src/cli/sync/mapper.ts
46927
46991
  function stripNavigationItemIds(items) {
46928
46992
  return items.map(navigationApiItemToSdkLocalItem);
@@ -46976,7 +47040,7 @@ function duplicateNavigationIdentityMessage(error) {
46976
47040
 
46977
47041
  // src/cli/media/portable.ts
46978
47042
  var ENV_SPECIFIC_MEDIA_KEYS = ["assetId", "storagePath", "storageBucket"];
46979
- var isRecord13 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
47043
+ var isRecord14 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
46980
47044
  var isMediaObject = (value) => value.type === "image" || value.type === "video";
46981
47045
  function stripEnvSpecificMediaFieldsInPlace(value) {
46982
47046
  if (value === null || value === void 0) return;
@@ -46986,7 +47050,7 @@ function stripEnvSpecificMediaFieldsInPlace(value) {
46986
47050
  }
46987
47051
  return;
46988
47052
  }
46989
- if (!isRecord13(value)) return;
47053
+ if (!isRecord14(value)) return;
46990
47054
  if (isMediaObject(value)) {
46991
47055
  const hasCmsRef = typeof value.identifier === "string" || typeof value.assetId === "string" || typeof value.storagePath === "string" || typeof value.storageBucket === "string";
46992
47056
  for (const key of ENV_SPECIFIC_MEDIA_KEYS) {
@@ -46997,7 +47061,7 @@ function stripEnvSpecificMediaFieldsInPlace(value) {
46997
47061
  }
46998
47062
  delete value.mimeType;
46999
47063
  }
47000
- if (value.type === "image" && isRecord13(value.attrs)) {
47064
+ if (value.type === "image" && isRecord14(value.attrs)) {
47001
47065
  const attrs = value.attrs;
47002
47066
  const hasIdentifier = typeof attrs.identifier === "string" && attrs.identifier.trim().length > 0;
47003
47067
  if (hasIdentifier) {
@@ -47169,11 +47233,11 @@ function entryFilePath(input) {
47169
47233
  }
47170
47234
 
47171
47235
  // src/cli/content/writer.ts
47172
- function isRecord14(value) {
47236
+ function isRecord15(value) {
47173
47237
  return typeof value === "object" && value !== null && !Array.isArray(value);
47174
47238
  }
47175
47239
  function parseThemeMeta(value) {
47176
- if (!isRecord14(value) || typeof value.pulledAt !== "string" || !isRecord14(value.themes)) {
47240
+ if (!isRecord15(value) || typeof value.pulledAt !== "string" || !isRecord15(value.themes)) {
47177
47241
  return null;
47178
47242
  }
47179
47243
  return { pulledAt: value.pulledAt, themes: value.themes };
@@ -47516,7 +47580,11 @@ function toWritableLocalEvent(event) {
47516
47580
  content: event.content,
47517
47581
  formRef: event.formRef,
47518
47582
  settings: event.settings,
47519
- presentation: event.presentation,
47583
+ presentation: deriveLinkedEventPresentation({
47584
+ storedPresentation: event.presentation ?? null,
47585
+ linkedContent: event.content ?? null,
47586
+ allowLegacyTitleInput: false
47587
+ }),
47520
47588
  tags: event.tags,
47521
47589
  blocks: event.blocks
47522
47590
  };
@@ -48608,9 +48676,9 @@ async function localMediaFileExists(filePath) {
48608
48676
  }
48609
48677
 
48610
48678
  // src/cli/media/identifiers.ts
48611
- var isRecord15 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
48679
+ var isRecord16 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
48612
48680
  var isMediaValue = (value) => {
48613
- if (!isRecord15(value)) return false;
48681
+ if (!isRecord16(value)) return false;
48614
48682
  const type = value.type;
48615
48683
  if (type !== "image" && type !== "video" && type !== "audio" && type !== "document" && type !== "spreadsheet" && type !== "archive") return false;
48616
48684
  return typeof value.identifier === "string" || typeof value.assetId === "string" || typeof value.storagePath === "string" || typeof value.src === "string";
@@ -48625,7 +48693,7 @@ var walkMediaValues = (value, location2, handler) => {
48625
48693
  });
48626
48694
  return;
48627
48695
  }
48628
- if (isRecord15(value)) {
48696
+ if (isRecord16(value)) {
48629
48697
  Object.entries(value).forEach(([key, entry]) => {
48630
48698
  walkMediaValues(entry, location2 ? `${location2}.${key}` : key, handler);
48631
48699
  });
@@ -48751,7 +48819,7 @@ var normalizeMediaValueToIdentifierOnly = (value, identifier, asset) => {
48751
48819
  };
48752
48820
 
48753
48821
  // src/cli/media/rich-text.ts
48754
- var isRecord16 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
48822
+ var isRecord17 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
48755
48823
  function collectRichTextImageAttrs(value, out = [], location2 = "") {
48756
48824
  if (Array.isArray(value)) {
48757
48825
  value.forEach(
@@ -48759,8 +48827,8 @@ function collectRichTextImageAttrs(value, out = [], location2 = "") {
48759
48827
  );
48760
48828
  return out;
48761
48829
  }
48762
- if (!isRecord16(value)) return out;
48763
- if (value.type === "image" && isRecord16(value.attrs)) {
48830
+ if (!isRecord17(value)) return out;
48831
+ if (value.type === "image" && isRecord17(value.attrs)) {
48764
48832
  out.push({ attrs: value.attrs, location: location2 ? `${location2}.attrs` : "attrs" });
48765
48833
  }
48766
48834
  for (const [key, child] of Object.entries(value)) {
@@ -53086,7 +53154,7 @@ var isoDateTimeRegex = /^\d{4}-\d{2}-\d{2}T.+/;
53086
53154
  function issue2(path28, message) {
53087
53155
  return { path: path28, message };
53088
53156
  }
53089
- function isRecord17(value) {
53157
+ function isRecord18(value) {
53090
53158
  return typeof value === "object" && value !== null && !Array.isArray(value);
53091
53159
  }
53092
53160
  function isCurrency(value) {
@@ -53102,7 +53170,7 @@ function isWholeMinuteIsoDateTime(value) {
53102
53170
  }
53103
53171
  function validateTicketType(raw, index, currency) {
53104
53172
  const path28 = ["ticketTypes", String(index)];
53105
- if (!isRecord17(raw)) return [issue2(path28, "Ticket type must be an object")];
53173
+ if (!isRecord18(raw)) return [issue2(path28, "Ticket type must be an object")];
53106
53174
  const issues = [];
53107
53175
  const identifier = raw.identifier;
53108
53176
  if (typeof identifier !== "string" || !identifierRegex.test(identifier)) {
@@ -53225,7 +53293,7 @@ function validateTicketTypes(rawTicketTypes, currency) {
53225
53293
  const ticketTypes = [];
53226
53294
  const seenIdentifiers = /* @__PURE__ */ new Set();
53227
53295
  rawTicketTypes.forEach((rawTicketType, index) => {
53228
- const rawIdentifier = isRecord17(rawTicketType) ? rawTicketType.identifier : void 0;
53296
+ const rawIdentifier = isRecord18(rawTicketType) ? rawTicketType.identifier : void 0;
53229
53297
  const hasValidIdentifier = typeof rawIdentifier === "string" && identifierRegex.test(rawIdentifier);
53230
53298
  const isDuplicateIdentifier = hasValidIdentifier && seenIdentifiers.has(rawIdentifier);
53231
53299
  if (isDuplicateIdentifier) {
@@ -53269,7 +53337,7 @@ function classifySdkEventPricing(rawInput) {
53269
53337
  if (rawInput === void 0 || rawInput === null) {
53270
53338
  return { ok: true, pricing: { kind: "free" } };
53271
53339
  }
53272
- if (!isRecord17(rawInput)) {
53340
+ if (!isRecord18(rawInput)) {
53273
53341
  return { ok: false, issues: [issue2([], "Pricing must be an object")] };
53274
53342
  }
53275
53343
  const record = rawInput;
@@ -53379,7 +53447,7 @@ var supportedKinds = /* @__PURE__ */ new Set([
53379
53447
  function issue3(path28, message) {
53380
53448
  return { path: path28, message };
53381
53449
  }
53382
- function isRecord18(value) {
53450
+ function isRecord19(value) {
53383
53451
  return typeof value === "object" && value !== null && !Array.isArray(value);
53384
53452
  }
53385
53453
  function isWholeNumber2(value) {
@@ -53395,7 +53463,7 @@ function isSupportedOptionKind(value) {
53395
53463
  return typeof value === "string" && supportedKinds.has(value);
53396
53464
  }
53397
53465
  function validateFlexibleBalanceDueDateRule(raw, path28) {
53398
- if (!isRecord18(raw)) {
53466
+ if (!isRecord19(raw)) {
53399
53467
  return [issue3(path28, "Flexible balance dueDateRule must be an object")];
53400
53468
  }
53401
53469
  if (raw.kind === "relative_to_start_date") {
@@ -53434,7 +53502,7 @@ function validateFlexibleBalanceDueDateRule(raw, path28) {
53434
53502
  ];
53435
53503
  }
53436
53504
  function validateFlexibleBalanceConfig(raw, path28) {
53437
- if (!isRecord18(raw)) {
53505
+ if (!isRecord19(raw)) {
53438
53506
  return [issue3(path28, "Flexible balance config must be an object")];
53439
53507
  }
53440
53508
  const issues = [];
@@ -53480,7 +53548,7 @@ function validateFlexibleBalanceConfig(raw, path28) {
53480
53548
  }
53481
53549
  function validateCollectionOption(raw, index) {
53482
53550
  const path28 = ["allowedOptions", String(index)];
53483
- if (!isRecord18(raw)) {
53551
+ if (!isRecord19(raw)) {
53484
53552
  return [issue3(path28, "Payment option must be an object")];
53485
53553
  }
53486
53554
  if (raw.kind === "instalment_plan") {
@@ -53551,7 +53619,7 @@ function classifySdkEventPaymentTerms(rawInput) {
53551
53619
  if (rawInput === void 0 || rawInput === null) {
53552
53620
  return { ok: true, paymentTerms: void 0 };
53553
53621
  }
53554
- if (!isRecord18(rawInput)) {
53622
+ if (!isRecord19(rawInput)) {
53555
53623
  return {
53556
53624
  ok: false,
53557
53625
  issues: [issue3([], "Event paymentTerms must be an object")]
@@ -53602,7 +53670,7 @@ function classifySdkEventPaymentTerms(rawInput) {
53602
53670
  function nullishToNull(value) {
53603
53671
  return value == null ? null : value;
53604
53672
  }
53605
- function isRecord19(value) {
53673
+ function isRecord20(value) {
53606
53674
  return typeof value === "object" && value !== null && !Array.isArray(value);
53607
53675
  }
53608
53676
  function stringValue(value, fallback) {
@@ -53623,7 +53691,7 @@ function normalizeEventPaymentTermsForCompare(paymentTerms) {
53623
53691
  return void 0;
53624
53692
  }
53625
53693
  function normalizeVenueAddress(value) {
53626
- const obj = isRecord19(value) ? value : {};
53694
+ const obj = isRecord20(value) ? value : {};
53627
53695
  return {
53628
53696
  line1: nullishToNull(typeof obj.line1 === "string" ? obj.line1 : void 0),
53629
53697
  line2: nullishToNull(typeof obj.line2 === "string" ? obj.line2 : void 0),
@@ -53640,7 +53708,7 @@ function normalizeVenueAddress(value) {
53640
53708
  };
53641
53709
  }
53642
53710
  function normalizeVenueLocation(value) {
53643
- if (!isRecord19(value)) return null;
53711
+ if (!isRecord20(value)) return null;
53644
53712
  const obj = value;
53645
53713
  const lat = typeof obj.lat === "number" ? obj.lat : null;
53646
53714
  const lng = typeof obj.lng === "number" ? obj.lng : null;
@@ -53648,7 +53716,7 @@ function normalizeVenueLocation(value) {
53648
53716
  return { lat, lng };
53649
53717
  }
53650
53718
  function normalizeVenueForCompare(venue) {
53651
- const obj = isRecord19(venue) ? venue : {};
53719
+ const obj = isRecord20(venue) ? venue : {};
53652
53720
  return {
53653
53721
  slug: String(obj.slug),
53654
53722
  title: String(obj.title),
@@ -53669,7 +53737,7 @@ function normalizeVenueForCompare(venue) {
53669
53737
  };
53670
53738
  }
53671
53739
  function normalizeEventCategoryForCompare(category) {
53672
- const obj = isRecord19(category) ? category : {};
53740
+ const obj = isRecord20(category) ? category : {};
53673
53741
  return {
53674
53742
  identifier: String(obj.identifier),
53675
53743
  name: String(obj.name),
@@ -53681,8 +53749,8 @@ function normalizeEventCategoryForCompare(category) {
53681
53749
  };
53682
53750
  }
53683
53751
  function normalizeRemoteEventForCompare(event) {
53684
- const obj = isRecord19(event) ? event : {};
53685
- const schedule = isRecord19(obj.schedule) ? obj.schedule : {};
53752
+ const obj = isRecord20(event) ? event : {};
53753
+ const schedule = isRecord20(obj.schedule) ? obj.schedule : {};
53686
53754
  return {
53687
53755
  identifier: String(obj.identifier),
53688
53756
  title: String(obj.title),
@@ -53711,14 +53779,14 @@ function normalizeRemoteEventForCompare(event) {
53711
53779
  formRef: nullishToNull(
53712
53780
  typeof obj.formRef === "string" ? obj.formRef : void 0
53713
53781
  ),
53714
- content: isRecord19(obj.content) ? obj.content : {},
53715
- settings: isRecord19(obj.settings) ? obj.settings : {},
53716
- presentation: isRecord19(obj.presentation) ? obj.presentation : null,
53782
+ content: isRecord20(obj.content) ? obj.content : {},
53783
+ settings: isRecord20(obj.settings) ? obj.settings : {},
53784
+ presentation: isRecord20(obj.presentation) ? obj.presentation : null,
53717
53785
  tags: Array.isArray(obj.tags) ? obj.tags : []
53718
53786
  };
53719
53787
  }
53720
53788
  function normalizeLocalEventAgainstRemoteForCompare(localEvent, remoteEvent) {
53721
- const local = isRecord19(localEvent) ? localEvent : {};
53789
+ const local = isRecord20(localEvent) ? localEvent : {};
53722
53790
  const base = remoteEvent ? normalizeRemoteEventForCompare(remoteEvent) : normalizeRemoteEventForCompare({
53723
53791
  identifier: local.identifier,
53724
53792
  title: local.title,
@@ -53737,7 +53805,7 @@ function normalizeLocalEventAgainstRemoteForCompare(localEvent, remoteEvent) {
53737
53805
  presentation: local.presentation ?? null,
53738
53806
  tags: local.tags ?? []
53739
53807
  });
53740
- const schedule = isRecord19(local.schedule) ? local.schedule : {};
53808
+ const schedule = isRecord20(local.schedule) ? local.schedule : {};
53741
53809
  return {
53742
53810
  ...base,
53743
53811
  identifier: stringValue(local.identifier, base.identifier),
@@ -53768,9 +53836,9 @@ function normalizeLocalEventAgainstRemoteForCompare(localEvent, remoteEvent) {
53768
53836
  formRef: local.formRef === void 0 ? base.formRef : nullishToNull(
53769
53837
  typeof local.formRef === "string" ? local.formRef : void 0
53770
53838
  ),
53771
- content: local.content === void 0 ? base.content : isRecord19(local.content) ? local.content : {},
53772
- settings: local.settings === void 0 ? base.settings : isRecord19(local.settings) ? local.settings : {},
53773
- presentation: local.presentation === void 0 ? base.presentation : isRecord19(local.presentation) ? local.presentation : null,
53839
+ content: local.content === void 0 ? base.content : isRecord20(local.content) ? local.content : {},
53840
+ settings: local.settings === void 0 ? base.settings : isRecord20(local.settings) ? local.settings : {},
53841
+ presentation: local.presentation === void 0 ? base.presentation : isRecord20(local.presentation) ? local.presentation : null,
53774
53842
  tags: local.tags === void 0 ? base.tags : Array.isArray(local.tags) ? local.tags : []
53775
53843
  };
53776
53844
  }
@@ -53782,7 +53850,7 @@ function toIsoStringOrOriginal(value) {
53782
53850
  function normalizeCourseSessions(value) {
53783
53851
  if (!Array.isArray(value)) return [];
53784
53852
  return value.map((session) => {
53785
- const obj = isRecord19(session) ? session : {};
53853
+ const obj = isRecord20(session) ? session : {};
53786
53854
  return {
53787
53855
  startsAt: toIsoStringOrOriginal(obj.startsAt),
53788
53856
  endsAt: toIsoStringOrOriginal(obj.endsAt)
@@ -53794,18 +53862,18 @@ function normalizeCourseSessions(value) {
53794
53862
  }
53795
53863
  function normalizeCourseProgram(value) {
53796
53864
  if (value == null) return null;
53797
- if (!isRecord19(value)) {
53865
+ if (!isRecord20(value)) {
53798
53866
  return { identifier: null, data: {} };
53799
53867
  }
53800
53868
  return {
53801
53869
  identifier: nullishToNull(
53802
53870
  typeof value.identifier === "string" ? value.identifier : void 0
53803
53871
  ),
53804
- data: isRecord19(value.data) ? value.data : {}
53872
+ data: isRecord20(value.data) ? value.data : {}
53805
53873
  };
53806
53874
  }
53807
53875
  function normalizeRemoteCourseForCompare(course) {
53808
- const obj = isRecord19(course) ? course : {};
53876
+ const obj = isRecord20(course) ? course : {};
53809
53877
  return {
53810
53878
  identifier: String(obj.identifier),
53811
53879
  title: String(obj.title),
@@ -53840,7 +53908,7 @@ function normalizeRemoteCourseForCompare(course) {
53840
53908
  };
53841
53909
  }
53842
53910
  function normalizeLocalCourseAgainstRemoteForCompare(localCourse, remoteCourse) {
53843
- const local = isRecord19(localCourse) ? localCourse : {};
53911
+ const local = isRecord20(localCourse) ? localCourse : {};
53844
53912
  const base = remoteCourse ? normalizeRemoteCourseForCompare(remoteCourse) : normalizeRemoteCourseForCompare({
53845
53913
  identifier: local.identifier,
53846
53914
  title: local.title,
@@ -53861,11 +53929,11 @@ function normalizeLocalCourseAgainstRemoteForCompare(localCourse, remoteCourse)
53861
53929
  });
53862
53930
  const status = local.status === void 0 ? base.status : local.status === "active" || local.status === "cancelled" || local.status === "completed" ? local.status : "draft";
53863
53931
  const visibility = local.visibility === void 0 ? base.visibility : local.visibility === "public" || local.visibility === "private" || local.visibility === "unlisted" ? local.visibility : "public";
53864
- const program2 = local.program === void 0 ? base.program : local.program === null ? null : isRecord19(local.program) ? {
53932
+ const program2 = local.program === void 0 ? base.program : local.program === null ? null : isRecord20(local.program) ? {
53865
53933
  identifier: local.program.identifier === void 0 ? base.program?.identifier ?? null : nullishToNull(
53866
53934
  typeof local.program.identifier === "string" ? local.program.identifier : void 0
53867
53935
  ),
53868
- data: isRecord19(local.program.data) ? local.program.data : base.program?.data ?? {}
53936
+ data: isRecord20(local.program.data) ? local.program.data : base.program?.data ?? {}
53869
53937
  } : base.program;
53870
53938
  return {
53871
53939
  ...base,
@@ -56123,7 +56191,7 @@ function getSiteCommandLifecycleIntent(command) {
56123
56191
  init_src();
56124
56192
 
56125
56193
  // ../site-commands/src/guards.ts
56126
- function isRecord20(value) {
56194
+ function isRecord21(value) {
56127
56195
  return typeof value === "object" && value !== null;
56128
56196
  }
56129
56197
 
@@ -56388,7 +56456,7 @@ function collectVenueRefsFromIntervals(intervals, path28) {
56388
56456
  }
56389
56457
  function collectNavigationRefs(items, path28) {
56390
56458
  return items.flatMap((item, index) => {
56391
- if (!isRecord20(item)) return [];
56459
+ if (!isRecord21(item)) return [];
56392
56460
  const itemPath = `${path28}[${index}]`;
56393
56461
  const refs = [];
56394
56462
  if (typeof item.pageRef === "string") {
@@ -56405,7 +56473,7 @@ function collectNavigationRefs(items, path28) {
56405
56473
  }
56406
56474
  function collectBlockRefs(blocks, path28) {
56407
56475
  return blocks.flatMap((block, index) => {
56408
- if (!isRecord20(block)) return [];
56476
+ if (!isRecord21(block)) return [];
56409
56477
  const blockPath = `${path28}[${index}]`;
56410
56478
  return [
56411
56479
  ...collectNestedRefs(block.props, `${blockPath}.props`),
@@ -56421,7 +56489,7 @@ function collectNestedRefs(value, path28) {
56421
56489
  if (Array.isArray(value)) {
56422
56490
  return value.flatMap((item, index) => collectNestedRefs(item, `${path28}[${index}]`));
56423
56491
  }
56424
- if (!isRecord20(value)) return [];
56492
+ if (!isRecord21(value)) return [];
56425
56493
  return Object.entries(value).flatMap(([key, child]) => collectNestedRefs(child, `${path28}.${key}`));
56426
56494
  }
56427
56495
 
@@ -56677,9 +56745,9 @@ function deriveIdempotencyKey(input) {
56677
56745
  ].join("|"));
56678
56746
  }
56679
56747
  function findUnknownCommandTypes(input) {
56680
- if (!isRecord20(input) || !Array.isArray(input.commands)) return [];
56748
+ if (!isRecord21(input) || !Array.isArray(input.commands)) return [];
56681
56749
  return input.commands.flatMap((command, commandIndex) => {
56682
- if (!isRecord20(command) || typeof command.type !== "string") return [];
56750
+ if (!isRecord21(command) || typeof command.type !== "string") return [];
56683
56751
  if (commandTypeSet.has(command.type)) return [];
56684
56752
  return [{
56685
56753
  code: "unknown_command_type",
@@ -56705,9 +56773,9 @@ function commandIndexForIssuePath(path28) {
56705
56773
  return path28[0] === "commands" && typeof path28[1] === "number" ? path28[1] : -1;
56706
56774
  }
56707
56775
  function commandTypeForIssue(input, commandIndex) {
56708
- if (!isRecord20(input) || !isUnknownArray3(input.commands)) return null;
56776
+ if (!isRecord21(input) || !isUnknownArray3(input.commands)) return null;
56709
56777
  const command = input.commands[commandIndex];
56710
- return isRecord20(command) && typeof command.type === "string" ? command.type : null;
56778
+ return isRecord21(command) && typeof command.type === "string" ? command.type : null;
56711
56779
  }
56712
56780
  function isUnknownArray3(value) {
56713
56781
  return Array.isArray(value);
@@ -57804,6 +57872,16 @@ function eventSeriesCommand(event) {
57804
57872
  if (!occurrence.ok) return occurrence;
57805
57873
  const pricing = eventPricing(event);
57806
57874
  if (!pricing.ok) return pricing;
57875
+ const content = event.content ? {
57876
+ summary: event.content.summary ?? void 0,
57877
+ body: event.content.body ?? void 0,
57878
+ image: event.content.image ?? void 0
57879
+ } : void 0;
57880
+ const presentation = deriveLinkedEventPresentation({
57881
+ storedPresentation: event.presentation ?? null,
57882
+ linkedContent: event.content ?? null,
57883
+ allowLegacyTitleInput: true
57884
+ });
57807
57885
  return ok({
57808
57886
  type: "upsertEventSeries",
57809
57887
  ref: createEventSeriesRef([event.identifier]),
@@ -57826,14 +57904,10 @@ function eventSeriesCommand(event) {
57826
57904
  acceptsPasses: pricing.value.acceptsPasses,
57827
57905
  acceptsMemberships: pricing.value.acceptsMemberships,
57828
57906
  occurrences: [occurrence.value],
57829
- content: event.content ? {
57830
- summary: event.content.summary ?? void 0,
57831
- body: event.content.body ?? void 0,
57832
- image: event.content.image ?? void 0
57833
- } : void 0,
57907
+ content,
57834
57908
  settings: event.settings,
57835
57909
  paymentTerms: event.paymentTerms,
57836
- presentation: event.presentation,
57910
+ presentation,
57837
57911
  tags: event.tags,
57838
57912
  blocks: event.blocks
57839
57913
  }
@@ -58022,8 +58096,8 @@ function eventContentInput(content) {
58022
58096
  if (!content) return void 0;
58023
58097
  return {
58024
58098
  ...content.summary ? { summary: content.summary } : {},
58025
- ...typeof content.body === "string" || isRecord21(content.body) ? { body: content.body } : {},
58026
- ...typeof content.image === "string" || isRecord21(content.image) ? { image: content.image } : {}
58099
+ ...typeof content.body === "string" || isRecord22(content.body) ? { body: content.body } : {},
58100
+ ...typeof content.image === "string" || isRecord22(content.image) ? { image: content.image } : {}
58027
58101
  };
58028
58102
  }
58029
58103
  function courseUpsertInput(command) {
@@ -58204,7 +58278,7 @@ function toUtcIso(date, time) {
58204
58278
  const normalizedTime = time.length === 5 ? `${time}:00` : time;
58205
58279
  return (/* @__PURE__ */ new Date(`${date}T${normalizedTime}Z`)).toISOString();
58206
58280
  }
58207
- function isRecord21(value) {
58281
+ function isRecord22(value) {
58208
58282
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
58209
58283
  }
58210
58284
  function unsupported(identifier, message) {
@@ -64616,7 +64690,7 @@ var THEME_FIELD_CATEGORY_MAP = {
64616
64690
  };
64617
64691
 
64618
64692
  // src/cli/init-docs/zod-to-markdown.ts
64619
- function isRecord22(value) {
64693
+ function isRecord23(value) {
64620
64694
  return typeof value === "object" && value !== null && !Array.isArray(value);
64621
64695
  }
64622
64696
  function isZodTypeAny(value) {
@@ -64744,7 +64818,7 @@ function extractLiteralValue(schema) {
64744
64818
  const typeName = getTypeName(schema);
64745
64819
  if (typeName !== ZodTypeName.ZodLiteral) return void 0;
64746
64820
  const def = schema._def;
64747
- if (!isRecord22(def)) return void 0;
64821
+ if (!isRecord23(def)) return void 0;
64748
64822
  return String(def.value);
64749
64823
  }
64750
64824
  function extractSchemaInfo(schema, skipFields = []) {
@@ -64814,7 +64888,7 @@ function extractFieldInfo(name, schema) {
64814
64888
  }
64815
64889
  if (typeName === ZodTypeName.ZodRecord) {
64816
64890
  const def = inner._def;
64817
- const valueSchema = isRecord22(def) ? def.valueType : void 0;
64891
+ const valueSchema = isRecord23(def) ? def.valueType : void 0;
64818
64892
  if (!isZodTypeAny(valueSchema)) {
64819
64893
  info.recordValueType = "unknown";
64820
64894
  return info;
@@ -64829,7 +64903,7 @@ function extractFieldInfo(name, schema) {
64829
64903
  }
64830
64904
  } else if (getTypeName(valueInner) === ZodTypeName.ZodRecord) {
64831
64905
  const nestedDef = valueInner._def;
64832
- const nestedValueSchema = isRecord22(nestedDef) ? nestedDef.valueType : void 0;
64906
+ const nestedValueSchema = isRecord23(nestedDef) ? nestedDef.valueType : void 0;
64833
64907
  if (!isZodTypeAny(nestedValueSchema)) {
64834
64908
  info.recordValueType = "record<string, unknown>";
64835
64909
  return info;
@@ -64840,7 +64914,7 @@ function extractFieldInfo(name, schema) {
64840
64914
  }
64841
64915
  if (typeName === ZodTypeName.ZodUnion || typeName === ZodTypeName.ZodDiscriminatedUnion) {
64842
64916
  const def = inner._def;
64843
- const optionsValue = isRecord22(def) ? def.options : void 0;
64917
+ const optionsValue = isRecord23(def) ? def.options : void 0;
64844
64918
  const options = Array.isArray(optionsValue) ? optionsValue.filter(isZodTypeAny) : [];
64845
64919
  const optionTypes = options.map((opt) => {
64846
64920
  const { inner: optInner } = unwrapSchema(opt);
@@ -66017,7 +66091,7 @@ var SimpleCache = class {
66017
66091
  };
66018
66092
 
66019
66093
  // src/version.ts
66020
- var SDK_VERSION = "0.93.0";
66094
+ var SDK_VERSION = "0.95.0";
66021
66095
 
66022
66096
  // src/client/error.ts
66023
66097
  var RiverbankApiError = class _RiverbankApiError extends Error {
@@ -66178,6 +66252,7 @@ function attachResilienceStatusToError(error, resilienceStatus) {
66178
66252
  var PUBLIC_ENDPOINT_NAMES2 = [
66179
66253
  "getSite",
66180
66254
  "getContentByPath",
66255
+ "resolveRouteOutcome",
66181
66256
  "listPublishedEntries",
66182
66257
  "getPublishedEntryPreview",
66183
66258
  "getPublicFormById",
@@ -66214,6 +66289,17 @@ var API_ENDPOINTS2 = Object.freeze({
66214
66289
  auth: "public",
66215
66290
  responseKind: "json"
66216
66291
  },
66292
+ resolveRouteOutcome: {
66293
+ path: "/sites/{siteId}/route-outcome",
66294
+ method: "GET",
66295
+ tags: [
66296
+ "riverbank:site:{siteId}:routable-content",
66297
+ "riverbank:site:{siteId}:redirects",
66298
+ "riverbank:site:{siteId}:route-outcomes"
66299
+ ],
66300
+ auth: "public",
66301
+ responseKind: "json"
66302
+ },
66217
66303
  listPublishedEntries: {
66218
66304
  path: "/public/content/{siteId}/{type}/entries",
66219
66305
  method: "GET",
@@ -66377,6 +66463,10 @@ var RUNTIME_CACHE_DURABILITY_OVERRIDES = {
66377
66463
  kind: "durable-public-stale",
66378
66464
  staleTtlSec: DEFAULT_STALE_TTL_SEC
66379
66465
  },
66466
+ resolveRouteOutcome: {
66467
+ kind: "memory-only",
66468
+ reason: "durable_rollout_pending"
66469
+ },
66380
66470
  listPublishedEntries: {
66381
66471
  kind: "memory-only",
66382
66472
  reason: "durable_rollout_pending"
@@ -68078,6 +68168,19 @@ function createRiverbankClient(config2) {
68078
68168
  { signal }
68079
68169
  );
68080
68170
  },
68171
+ async resolveRouteOutcome(params) {
68172
+ const { siteId, path: path28, preview = false, signal } = params;
68173
+ if (!siteId || !path28) {
68174
+ throw new Error("resolveRouteOutcome() requires siteId and path");
68175
+ }
68176
+ return unwrapResponse(
68177
+ await apiClient({
68178
+ endpoint: "resolveRouteOutcome",
68179
+ params: { siteId, path: path28, preview: String(preview) },
68180
+ options: { signal }
68181
+ })
68182
+ );
68183
+ },
68081
68184
  async getAllPublishedRoutes(params) {
68082
68185
  const { siteId, signal } = params;
68083
68186
  if (!siteId) {
@@ -73728,20 +73831,20 @@ var LEGACY_DATA_FIELDS = /* @__PURE__ */ new Set([
73728
73831
  "cardTitleOverride",
73729
73832
  "presentation"
73730
73833
  ]);
73731
- function isRecord23(value) {
73834
+ function isRecord24(value) {
73732
73835
  return typeof value === "object" && value !== null && !Array.isArray(value);
73733
73836
  }
73734
73837
  function hasMeaningfulValue(value) {
73735
73838
  if (value === void 0 || value === null) return false;
73736
73839
  if (typeof value === "string") return value.trim().length > 0;
73737
73840
  if (Array.isArray(value)) return value.length > 0;
73738
- if (isRecord23(value)) return Object.keys(value).length > 0;
73841
+ if (isRecord24(value)) return Object.keys(value).length > 0;
73739
73842
  return true;
73740
73843
  }
73741
73844
  function normalizeComparable(value) {
73742
73845
  if (value === void 0 || value === null) return null;
73743
73846
  if (Array.isArray(value)) return value.map(normalizeComparable);
73744
- if (!isRecord23(value)) return value;
73847
+ if (!isRecord24(value)) return value;
73745
73848
  const normalized = {};
73746
73849
  for (const key of Object.keys(value).sort()) {
73747
73850
  const normalizedValue = normalizeComparable(value[key]);
@@ -73761,7 +73864,7 @@ function slugFromPath(value) {
73761
73864
  }
73762
73865
  function legacySlugCandidates(legacy) {
73763
73866
  const candidates = /* @__PURE__ */ new Set();
73764
- const data = isRecord23(legacy.entry.data) ? legacy.entry.data : {};
73867
+ const data = isRecord24(legacy.entry.data) ? legacy.entry.data : {};
73765
73868
  for (const value of [
73766
73869
  legacy.entry.slug,
73767
73870
  data.slug,
@@ -73782,7 +73885,7 @@ async function readLegacyEventEntries(contentDir) {
73782
73885
  const entries = [];
73783
73886
  for (const filePath of files) {
73784
73887
  const raw = await readJsonFile(filePath);
73785
- if (!isRecord23(raw)) {
73888
+ if (!isRecord24(raw)) {
73786
73889
  entries.push({
73787
73890
  tag: "invalid",
73788
73891
  filePath,
@@ -73790,7 +73893,7 @@ async function readLegacyEventEntries(contentDir) {
73790
73893
  });
73791
73894
  continue;
73792
73895
  }
73793
- if (!isRecord23(raw.data)) {
73896
+ if (!isRecord24(raw.data)) {
73794
73897
  entries.push({
73795
73898
  tag: "invalid",
73796
73899
  filePath,
@@ -73928,7 +74031,7 @@ function mergeLegacyEventIntoCanonical(legacy, event) {
73928
74031
  conflicts.push(...blocksResult.fields);
73929
74032
  }
73930
74033
  if (hasMeaningfulValue(data.presentation)) {
73931
- if (!isRecord23(data.presentation)) {
74034
+ if (!isRecord24(data.presentation)) {
73932
74035
  return { tag: "unmappable", fields: ["data.presentation"] };
73933
74036
  }
73934
74037
  for (const [key, value] of Object.entries(data.presentation)) {