riverbankcms 0.34.0 → 0.36.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.
@@ -175,6 +175,7 @@ When portal auth is enabled, `riverbankcms init` generates these reserved routes
175
175
  | Route | SDK helper | Scaffold template |
176
176
  | --- | --- | --- |
177
177
  | `/portal` | `createPortalPage` from `@riverbankcms/sdk/next` | `portalPageTemplates` |
178
+ | `/portal/continue` | `createPortalContinuePage` | `portalPageTemplates` |
178
179
  | `/portal/tickets/[registrationId]` | `createPortalTicketPage` | `portalPageTemplates` |
179
180
  | `/portal/digital-products/[entitlementId]` | `createPortalDigitalProductPage` | `portalPageTemplates` |
180
181
  | `/portal/digital-products/[entitlementId]/files/[assetId]` | `createPortalDigitalProductFilePage` | `portalPageTemplates` |
@@ -190,8 +191,8 @@ resolver receives `content.type === 'portal'` and `content.site` on these routes
190
191
  The file route authenticates before redirecting to a signed download URL.
191
192
 
192
193
  For a custom host, `CustomerPortal` from `@riverbankcms/sdk/portal/client` takes
193
- `siteId`, `apiBaseUrl`, `portalToken` (nullable), `demoEmailSuppressed`, plus optional `callbackPath`, `logoutPath` and `bookPath`
194
- (defaults `/api/portal/callback`, `/api/portal/logout`, `/book`). Wrap it in the
194
+ `siteId`, `apiBaseUrl`, `portalToken` (nullable), `demoEmailSuppressed`, plus optional `logoutPath` and `bookPath`
195
+ (defaults `/api/portal/logout`, `/book`). Sign-in always goes through `/api/portal/callback`. Wrap it in the
195
196
  site's `ThemeScope`. This is a reserved route component, not a CMS block.
196
197
  `@riverbankcms/sdk/portal` remains the server helper entry.
197
198
 
@@ -204,8 +205,7 @@ includes it); this protects emailed gift tokens in outbound referrers.
204
205
 
205
206
  For a custom host, `RedeemGiftCard` from `@riverbankcms/sdk/gifting/client` takes
206
207
  `siteId`, `apiBaseUrl`, `siteTitle`, `publicContactEmail` (nullable), optional
207
- `token` and `code`, and optional `callbackPath`, `portalPath`, `homePath` (defaults
208
- `/api/portal/callback`, `/portal`, `/`). Its `onSignedIn` callback refreshes host
208
+ `token` and `code`, and optional `portalPath`, `homePath` (defaults `/portal`, `/`). Its `onSignedIn` callback refreshes host
209
209
  chrome after sign-in; the Next helper supplies that callback. Wrap the shared
210
210
  component in the site's `ThemeScope`. The callback POST expects JSON
211
211
  `{ portalCode }` from the same origin and returns JSON without redirecting.
@@ -17,6 +17,8 @@ remains unchanged.
17
17
 
18
18
  ## Configure the Catch-All Route
19
19
 
20
+ The generated `src/lib/riverbank-client.ts` imports `createRiverbankClient` from `@riverbankcms/sdk/next`. That constructor installs Next caching automatically. Ordinary content uses a one-hour budget; admitted availability uses 60 seconds and availability tags. SDK page-memory and durable-cache hits register the same policy on the rendered page. Preview reads stay uncached. The catch-all also installs this binding on existing SDK root/server clients, so upgrading an existing catch-all site needs no client-file edit.
21
+
20
22
  In `src/app/[[...slug]]/page.tsx`:
21
23
 
22
24
  ```tsx
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import { $n as headerStyleIdValues, Ar as createContentEntryRef, At as getMimeType, Br as slugPart, Bt as footerPreferencesSchema, Cr as makeBoundaryId, Et as slugifyMediaIdentifier, Ft as MAX_MANAGEMENT_MEDIA_UPLOAD_BYTES, I as footerModeSchema, Jn as asHeaderLayoutId, Kn as SUPPORTED_LOADER_ENDPOINTS, Lr as createSiteCommandSiteRef, Mt as normalizeAmbiguousStoragePathForSite, Nn as RESOLVED_INTERNAL_LINK_ENTITY_TYPES, Pt as FILE_SIZE_LIMITS, Qn as headerLayoutIdValues, Sn as eventBookingOfferIntentSchema, Sr as asSiteStyleId, St as buildMediaIdentifierFromFilename, Tr as bookingQuestionAttachmentSchema, Tt as resolveMediaIdentifier, Un as ICON_PICKER_PRESETS, V as themeSchema, Xt as buttonStyleSelectionSchema, Yn as asHeaderStyleId, Zn as footerLookIdValues, _r as asDesignBoundaryId, at as parseAspectRatioValue, b as getSiteCommandMetadata, bt as mediaTypeDiscriminants, ct as getDirectImageUrlForSiteScopedPath, fr as asAppearancePresetId, gr as asDesignBlockId, h as parseAndPlanCommandBatchForTypes, k as headerPreferencesSchema, kr as createCommandRef, kt as getExtensionForMimeType, l as resolvePageUpsertSeo, m as createDryRunReport, n as sdkCourseBookingSettingsSchema, p as stableStringify, qn as asFooterLookId, r as sdkEventOccurrenceInputSchema, rr as SYSTEM_BLOCK_KINDS, s as eventVisibilitySchema, v as evaluateSiteCommandBatchExposure, vt as PUBLIC_FILE_FIELD_KINDS, w as entryIdentifierForCommand, wr as compareEntrySlug, xn as require_dist, xr as asPageFlowPresetId, y as evaluateSiteCommandExposure, yt as isDisplayMediaKind } from "./sdk-event-upsert-DNjdjBVm.mjs";
3
- import { $t as isLiveOrderInstalmentPlanStatus, A as publicReadBatchFreshnessSeconds, An as toCents, B as parseManagementKey, Bn as unsafeAsAppointmentResourceId, Bt as getLocalScheduleDate, Cr as unsafeAsEventInstanceId, D as PUBLIC_CONTENT_FRESHNESS_SECONDS, Dn as isNonNegativeWholeCents$1, Dr as unsafeAsPricingOptionId, E as PUBLIC_AVAILABILITY_FRESHNESS_SECONDS, Er as unsafeAsOccurrenceId, Fn as parseCurrencyCode, Ft as addLocalScheduleDays, Hn as parseCustomerId, In as assertNever, Jn as parseDatedOfferingCapacityHoldId, Kn as unsafeAsPassId, Kt as resolveBookingTimeZoneId, Lt as formatLocalScheduleDate, Mn as unsafeAsNonNegativeCents, Nn as unsafeAsPositiveCents, O as getPublicReadCachePolicy, On as parseNonNegativeCents, Or as err, Pn as formatCurrencyAmount, Q as parseFooterCompositionV1, Qt as validateBookingPaymentOptionKinds, R as createSecret, S as EVENT_PRESET_VALUES, St as trimmedStringOrNull, Tr as unsafeAsEventSeriesId, Tt as formatDate, Ut as parseBookingLocalDate, Vn as unsafeAsStaffMemberId, Wn as parseMembershipId, Xt as toUtcIsoDateTimeString, Z as parseMailingListProviderScope, _ as canonicalizeConfiguredBookingVerticalConfig, _r as parseUserId, an as omitZeroAmountFutureRows, b as resolveSiteVerticalBookingConfig, br as parseEventSeriesId, c as STAFF_OPERATIONAL_CAPABILITIES, cn as scheduleBookingReasonCodes, ct as assertAllowedPublicUrl, dr as unsafeAsOrderFlexibleBalanceContractId, en as addIntervalPreservingMonthAnchor, f as planTurningOnCourses, fr as unsafeAsOrderPaymentPlanId, ft as stableJsonStringify, g as areConfiguredBookingVerticalConfigsEqual, gr as parseSiteId, hr as parseApiKeyId, ht as locationValueSchema, j as publicReadFreshnessSeconds, jn as toNonNegativeCents, k as isPublicReadEndpoint, kn as parsePositiveCents, kr as ok, ln as resolveFlexibleBalanceDueAt, m as withBookingModulesForSelectionChange, n as OFFLINE_PAYMENT_METHODS, nn as getBookingInstalmentDepositRefundability, on as splitAmountWithRemainderInFirst, p as resolveEventCatalogue, pr as parseEditorSessionGeneration, qn as parseDatedOfferingCapacityHoldAuditRef, r as committedWriteProofSchema, sn as businessCancellationRefusalCodes, tn as clampConfiguredAmount, un as resolveFlexibleBalanceInitialPaymentCents, ur as unsafeAsCheckoutLineId, v as parseVerticalId, w as SURFACE_EVENT_PRESET_VALUES, wn as fromArray, wr as unsafeAsEventOfferingId, x as DEFAULT_EVENT_TYPE_PRESETS, xr as parseRetiredCourseId, y as parseVerticalPresetId, yt as publicLocationSchema, z as exposeSecret } from "./src-B3ufN6kf.mjs";
4
- import { n as CliSdkPeerError, t as loadConfigFile } from "./load-config-FQqihBPt.mjs";
2
+ import { $n as headerStyleIdValues, Ar as createContentEntryRef, At as getMimeType, Br as slugPart, Bt as footerPreferencesSchema, Cr as makeBoundaryId, Et as slugifyMediaIdentifier, Ft as MAX_MANAGEMENT_MEDIA_UPLOAD_BYTES, I as footerModeSchema, Jn as asHeaderLayoutId, Kn as SUPPORTED_LOADER_ENDPOINTS, Lr as createSiteCommandSiteRef, Mt as normalizeAmbiguousStoragePathForSite, Nn as RESOLVED_INTERNAL_LINK_ENTITY_TYPES, Pt as FILE_SIZE_LIMITS, Qn as headerLayoutIdValues, Sn as eventBookingOfferIntentSchema, Sr as asSiteStyleId, St as buildMediaIdentifierFromFilename, Tr as bookingQuestionAttachmentSchema, Tt as resolveMediaIdentifier, Un as ICON_PICKER_PRESETS, V as themeSchema, Xt as buttonStyleSelectionSchema, Yn as asHeaderStyleId, Zn as footerLookIdValues, _r as asDesignBoundaryId, at as parseAspectRatioValue, b as getSiteCommandMetadata, bt as mediaTypeDiscriminants, ct as getDirectImageUrlForSiteScopedPath, fr as asAppearancePresetId, gr as asDesignBlockId, h as parseAndPlanCommandBatchForTypes, k as headerPreferencesSchema, kr as createCommandRef, kt as getExtensionForMimeType, l as resolvePageUpsertSeo, m as createDryRunReport, n as sdkCourseBookingSettingsSchema, p as stableStringify, qn as asFooterLookId, r as sdkEventOccurrenceInputSchema, rr as SYSTEM_BLOCK_KINDS, s as eventVisibilitySchema, v as evaluateSiteCommandBatchExposure, vt as PUBLIC_FILE_FIELD_KINDS, w as entryIdentifierForCommand, wr as compareEntrySlug, xn as require_dist, xr as asPageFlowPresetId, y as evaluateSiteCommandExposure, yt as isDisplayMediaKind } from "./sdk-event-upsert-n4in1E4v.mjs";
3
+ import { $n as parseDatedOfferingCapacityHoldId, A as publicReadBatchFreshnessSeconds, Ar as unsafeAsEventSeriesId, At as clampConfiguredAmount, B as parseManagementKey, Bn as parseCurrencyCode, D as PUBLIC_CONTENT_FRESHNESS_SECONDS, Dt as validateBookingPaymentOptionKinds, E as PUBLIC_AVAILABILITY_FRESHNESS_SECONDS, Er as parseRetiredCourseId, Fn as toCents, Ft as splitAmountWithRemainderInFirst, Gn as unsafeAsAppointmentResourceId, In as toNonNegativeCents, It as businessCancellationRefusalCodes, Kn as unsafeAsStaffMemberId, Kt as formatDate, Ln as unsafeAsNonNegativeCents, Lt as scheduleBookingReasonCodes, Mn as isNonNegativeWholeCents$1, Mr as unsafeAsPricingOptionId, Nn as parseNonNegativeCents, Nr as err, O as getPublicReadCachePolicy, Or as unsafeAsEventInstanceId, Ot as isLiveOrderInstalmentPlanStatus, Pn as parsePositiveCents, Pr as ok, Pt as omitZeroAmountFutureRows, Q as parseFooterCompositionV1, Qn as parseDatedOfferingCapacityHoldAuditRef, R as createSecret, Rn as unsafeAsPositiveCents, Rt as resolveFlexibleBalanceDueAt, S as EVENT_PRESET_VALUES, Sr as parseUserId, St as trimmedStringOrNull, Tr as parseEventSeriesId, Vn as assertNever, Yn as parseMembershipId, Z as parseMailingListProviderScope, Zn as unsafeAsPassId, _ as canonicalizeConfiguredBookingVerticalConfig, _r as unsafeAsOrderPaymentPlanId, b as resolveSiteVerticalBookingConfig, br as parseApiKeyId, c as STAFF_OPERATIONAL_CAPABILITIES, ct as assertAllowedPublicUrl, f as planTurningOnCourses, fn as toUtcIsoDateTimeString, ft as stableJsonStringify, g as areConfiguredBookingVerticalConfigsEqual, gr as unsafeAsOrderFlexibleBalanceContractId, hr as unsafeAsCheckoutLineId, ht as locationValueSchema, j as publicReadFreshnessSeconds, jr as unsafeAsOccurrenceId, jt as getBookingInstalmentDepositRefundability, k as isPublicReadEndpoint, kn as fromArray, kr as unsafeAsEventOfferingId, kt as addIntervalPreservingMonthAnchor, ln as parseBookingLocalDate, m as withBookingModulesForSelectionChange, mn as resolveBookingTimeZoneId, n as OFFLINE_PAYMENT_METHODS, on as getLocalScheduleDate, p as resolveEventCatalogue, qn as parseCustomerId, r as committedWriteProofSchema, rn as formatLocalScheduleDate, tn as addLocalScheduleDays, v as parseVerticalId, vr as parseEditorSessionGeneration, w as SURFACE_EVENT_PRESET_VALUES, x as DEFAULT_EVENT_TYPE_PRESETS, xr as parseSiteId, y as parseVerticalPresetId, yt as publicLocationSchema, z as exposeSecret, zn as formatCurrencyAmount, zt as resolveFlexibleBalanceInitialPaymentCents } from "./src-DHIn60_q.mjs";
4
+ import { n as CliSdkPeerError, t as loadConfigFile } from "./load-config-k3XF8V97.mjs";
5
5
  import { safeParse, z } from "zod";
6
6
  import { Argument, Command, Option } from "commander";
7
7
  import { AsyncLocalStorage } from "node:async_hooks";
@@ -83,20 +83,20 @@ function isApiError(result) {
83
83
  function isApiSuccess(result) {
84
84
  return result.success === true;
85
85
  }
86
- function isRecord$11(value) {
86
+ function isRecord$12(value) {
87
87
  return typeof value === "object" && value !== null && !Array.isArray(value);
88
88
  }
89
89
  function isFieldError$1(value) {
90
- return isRecord$11(value) && typeof value.field === "string" && typeof value.code === "string" && typeof value.message === "string" && (value.capacityOverride === undefined || isCapacityOverrideRefusal(value.capacityOverride));
90
+ return isRecord$12(value) && typeof value.field === "string" && typeof value.code === "string" && typeof value.message === "string" && (value.capacityOverride === undefined || isCapacityOverrideRefusal(value.capacityOverride));
91
91
  }
92
92
  function fieldErrorsFromUnknown(value) {
93
93
  if (!Array.isArray(value)) return null;
94
94
  return value.every(isFieldError$1) ? value : null;
95
95
  }
96
96
  function extractEnvelopeErrorObject(body) {
97
- if (!isRecord$11(body)) return null;
97
+ if (!isRecord$12(body)) return null;
98
98
  const error = body.error;
99
- if (!isRecord$11(error)) return null;
99
+ if (!isRecord$12(error)) return null;
100
100
  if ("success" in body && body.success !== false) {
101
101
  return null;
102
102
  }
@@ -458,7 +458,7 @@ const retentionPolicyRegistry = {
458
458
  executionModes: ["dry_run", "scheduled"],
459
459
  executionSubstrate: "vercel_cron"
460
460
  },
461
- rationale: "Technical support snapshots are cleared after 90 days; the summary and conversation remain separately for support."
461
+ rationale: "Technical support snapshots and screenshots are cleared after 90 days; the summary and conversation remain separately for support. The same run removes screenshots whose ticket no longer exists, such as after account deletion."
462
462
  },
463
463
  support_correspondence: {
464
464
  dataClass: "support_correspondence",
@@ -1620,6 +1620,23 @@ function buildPublicReadFetchPolicy(siteId, reads) {
1620
1620
  function buildPublicReadBatchFetchPolicy(siteId, reads) {
1621
1621
  return buildFetchPolicy(siteId, reads, publicReadBatchFreshnessSeconds);
1622
1622
  }
1623
+ /** A page may depend on admission even when an ordinary CMS page won precedence. */
1624
+ function buildPageReadCachePolicy(siteId, dependencies) {
1625
+ return dependencies === "availability" ? {
1626
+ tags: normalizeRevalidateTags([
1627
+ ...buildCacheReadTags([TAG_TEMPLATES.siteRoutableContent], { siteId }),
1628
+ ...buildPublicReadFetchTags("listPublicEvents", { siteId }),
1629
+ ...buildPublicReadFetchTags("getPublicBookingService", { siteId })
1630
+ ]),
1631
+ revalidate: PUBLIC_AVAILABILITY_FRESHNESS_SECONDS
1632
+ } : {
1633
+ tags: buildCacheReadTags([TAG_TEMPLATES.siteRoutableContent], { siteId }),
1634
+ revalidate: PUBLIC_CONTENT_FRESHNESS_SECONDS
1635
+ };
1636
+ }
1637
+ function pageReadDependencies(payload) {
1638
+ return typeof payload === "object" && payload !== null && "dependencies" in payload && payload.dependencies === "content" ? "content" : "availability";
1639
+ }
1623
1640
 
1624
1641
  //#endregion
1625
1642
  //#region ../api/src/sdkEntryReadEndpoints.ts
@@ -1792,8 +1809,10 @@ const arrangementEndRequestSchema = z.object({
1792
1809
  ...recordedReturn,
1793
1810
  lastDate: localDate
1794
1811
  }).strict();
1812
+ /** `expectedUpdatedAt` is the version the dialog was showing, so a save can't overwrite a newer change. */
1795
1813
  const arrangementEditSchema = z.object({
1796
1814
  ...operation,
1815
+ expectedUpdatedAt: z.string().min(1),
1797
1816
  serviceId: z.string().uuid(),
1798
1817
  holdsTime: z.boolean(),
1799
1818
  payment: arrangementPaymentSchema
@@ -1827,6 +1846,11 @@ const previewClientArrangementSchema = z.discriminatedUnion("kind", [
1827
1846
  kind: z.literal("end"),
1828
1847
  arrangementId: z.string().uuid(),
1829
1848
  request: arrangementEndRequestSchema
1849
+ }).strict(),
1850
+ z.object({
1851
+ kind: z.literal("edit"),
1852
+ arrangementId: z.string().uuid(),
1853
+ request: arrangementEditSchema
1830
1854
  }).strict()
1831
1855
  ]);
1832
1856
  const arrangementTimeOffChoiceSchema = z.discriminatedUnion("kind", [
@@ -2535,6 +2559,20 @@ const APPOINTMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
2535
2559
  auth: "user",
2536
2560
  responseKind: "json"
2537
2561
  },
2562
+ listStaffServiceOnlineDetails: {
2563
+ path: "/sites/{siteId}/bookings/resources/{resourceId}/services/online-details",
2564
+ method: "GET",
2565
+ auth: "user",
2566
+ responseKind: "json",
2567
+ errors: []
2568
+ },
2569
+ setStaffServiceOnlineDetails: {
2570
+ path: "/sites/{siteId}/bookings/resources/{resourceId}/services/online-details",
2571
+ method: "PUT",
2572
+ auth: "user",
2573
+ responseKind: "json",
2574
+ errors: []
2575
+ },
2538
2576
  getServiceResources: {
2539
2577
  path: "/sites/{siteId}/bookings/services/{serviceId}/resources",
2540
2578
  method: "GET",
@@ -2934,6 +2972,18 @@ const EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS = defineEndpointDefinitions
2934
2972
  "server:internal_error"
2935
2973
  ]
2936
2974
  },
2975
+ setEventAttendeesNoShow: {
2976
+ path: "/sites/{siteId}/bookings/attendees/no-show",
2977
+ method: "POST",
2978
+ auth: "user",
2979
+ responseKind: "json",
2980
+ errors: [
2981
+ "validation:invalid_input",
2982
+ "auth:forbidden",
2983
+ "resource:conflict",
2984
+ "server:internal_error"
2985
+ ]
2986
+ },
2937
2987
  listEventOfferingCombinationPrices: {
2938
2988
  path: "/sites/{siteId}/bookings/event-offerings/{eventOfferingId}/combination-prices",
2939
2989
  method: "GET",
@@ -10002,15 +10052,6 @@ const PUBLIC_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
10002
10052
  "resource:conflict",
10003
10053
  "server:internal_error"
10004
10054
  ]
10005
- },
10006
- resolveEventSubroute: {
10007
- path: "/public/sites/{siteId}/events/subroutes/resolve",
10008
- method: "GET",
10009
- revalidate: publicReadFreshnessSeconds("resolveEventSubroute"),
10010
- tags: [TAG_TEMPLATES.publicEvents, "event-subroute"],
10011
- auth: "public",
10012
- responseKind: "json",
10013
- errors: []
10014
10055
  }
10015
10056
  });
10016
10057
 
@@ -13231,6 +13272,14 @@ const ENDPOINT_DEFINITIONS = {
13231
13272
  responseKind: "json",
13232
13273
  errors: []
13233
13274
  },
13275
+ adminDeleteSupportTicketScreenshot: {
13276
+ path: "/admin/support/tickets/screenshot/delete",
13277
+ method: "POST",
13278
+ tags: ["admin", "support"],
13279
+ auth: "admin",
13280
+ responseKind: "json",
13281
+ errors: []
13282
+ },
13234
13283
  mfaTotpEnroll: {
13235
13284
  path: "/auth/mfa/totp/enroll",
13236
13285
  method: "POST",
@@ -14232,6 +14281,7 @@ const ENDPOINT_DEFINITIONS = {
14232
14281
  responseKind: "json"
14233
14282
  },
14234
14283
  resolveRouteOutcome: {
14284
+ revalidate: PUBLIC_CONTENT_FRESHNESS_SECONDS,
14235
14285
  path: "/sites/{siteId}/route-outcome",
14236
14286
  method: "GET",
14237
14287
  tags: [
@@ -15159,6 +15209,25 @@ const ENDPOINT_DEFINITIONS = {
15159
15209
  "bookings"
15160
15210
  ]
15161
15211
  },
15212
+ listEventBookingTicketChoices: {
15213
+ errors: [],
15214
+ path: "/sites/{siteId}/bookings/event-attendees/{attendeeId}/ticket-choices",
15215
+ method: "GET",
15216
+ auth: "user",
15217
+ responseKind: "json"
15218
+ },
15219
+ changeEventBookingTickets: {
15220
+ errors: [],
15221
+ path: "/sites/{siteId}/bookings/event-attendees/{attendeeId}/change-tickets",
15222
+ method: "POST",
15223
+ auth: "user",
15224
+ responseKind: "json",
15225
+ tags: [
15226
+ "site-{siteId}",
15227
+ "event-attendee-{attendeeId}",
15228
+ "bookings"
15229
+ ]
15230
+ },
15162
15231
  restoreEventBooking: {
15163
15232
  errors: [],
15164
15233
  path: "/sites/{siteId}/bookings/event-attendees/{attendeeId}/restore",
@@ -17048,6 +17117,27 @@ const ENDPOINT_DEFINITIONS = {
17048
17117
  responseKind: "json",
17049
17118
  errors: []
17050
17119
  },
17120
+ portalEntryPreview: {
17121
+ path: "/portal/auth/entry/preview",
17122
+ method: "POST",
17123
+ auth: "public",
17124
+ responseKind: "json",
17125
+ errors: []
17126
+ },
17127
+ portalEntryRedeem: {
17128
+ path: "/portal/auth/entry/redeem",
17129
+ method: "POST",
17130
+ auth: "public",
17131
+ responseKind: "json",
17132
+ errors: []
17133
+ },
17134
+ portalEntryResend: {
17135
+ path: "/portal/auth/entry/resend",
17136
+ method: "POST",
17137
+ auth: "public",
17138
+ responseKind: "json",
17139
+ errors: []
17140
+ },
17051
17141
  portalLogout: {
17052
17142
  path: "/portal/auth/logout",
17053
17143
  method: "POST",
@@ -18486,6 +18576,7 @@ const BOOKING_SETTINGS_SECTION_KEYS = {
18486
18576
  "collectAllAttendeeDetails",
18487
18577
  "eventTypeBookingDefaults",
18488
18578
  "eventBookingPolicies",
18579
+ "eventBookingCutOffHours",
18489
18580
  "defaultEventImage",
18490
18581
  "eventDestinationPolicy"
18491
18582
  ],
@@ -18522,7 +18613,7 @@ const BOOKING_SETTINGS_EMAIL_SEND_KEYS = [
18522
18613
  //#region ../api/src/event-listing-destination.ts
18523
18614
  const EVENT_LISTING_DESTINATION_SETTINGS_KEY = "listingDestination";
18524
18615
  const DEFAULT_EXTERNAL_EVENT_CTA_LABEL = "View details";
18525
- function isRecord$10(value) {
18616
+ function isRecord$11(value) {
18526
18617
  return value !== null && typeof value === "object" && !Array.isArray(value);
18527
18618
  }
18528
18619
  function normalizeOptionalLabel(value) {
@@ -18542,11 +18633,11 @@ function normalizeEventListingDestinationInput(value) {
18542
18633
  };
18543
18634
  }
18544
18635
  function readEventListingDestinationFromSettings(settingsJson) {
18545
- if (!isRecord$10(settingsJson)) {
18636
+ if (!isRecord$11(settingsJson)) {
18546
18637
  return { kind: "native" };
18547
18638
  }
18548
18639
  const rawDestination = settingsJson[EVENT_LISTING_DESTINATION_SETTINGS_KEY];
18549
- if (!isRecord$10(rawDestination) || rawDestination.kind !== "external") {
18640
+ if (!isRecord$11(rawDestination) || rawDestination.kind !== "external") {
18550
18641
  return { kind: "native" };
18551
18642
  }
18552
18643
  return {
@@ -18814,7 +18905,12 @@ const appointmentSetupServiceDraftSchema = z.object({
18814
18905
  timezone: z.string().trim().min(1).nullable(),
18815
18906
  payment: appointmentSetupPaymentDraftSchema,
18816
18907
  assignment: appointmentSetupServiceAssignmentDraftSchema,
18817
- categoryId: z.string().uuid().nullable().optional()
18908
+ categoryId: z.string().uuid().nullable().optional(),
18909
+ onlineDetails: z.object({
18910
+ joinUrl: z.string().trim().max(2e3).nullable().optional(),
18911
+ accessCode: z.string().trim().max(200).nullable().optional(),
18912
+ notes: z.string().trim().max(2e3).nullable().optional()
18913
+ }).strict().nullable().optional()
18818
18914
  }).superRefine((service, ctx) => {
18819
18915
  if (service.payment.kind !== "free" && (service.priceAmount === null || service.priceAmount <= 0)) {
18820
18916
  ctx.addIssue({
@@ -19241,7 +19337,7 @@ const sdkConfigureBookingVerticalResponseSchema = sdkCommandApplicationResultSch
19241
19337
 
19242
19338
  //#endregion
19243
19339
  //#region ../management-client/src/responseValidation.ts
19244
- function isRecord$9(value) {
19340
+ function isRecord$10(value) {
19245
19341
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
19246
19342
  }
19247
19343
  function pullSchemaForRequest(path$3) {
@@ -19262,8 +19358,8 @@ function pullSchemaForRequest(path$3) {
19262
19358
  function rootMutationSchema(method, path$3, body) {
19263
19359
  if (method === "POST") {
19264
19360
  switch (path$3) {
19265
- case "/entries": return isRecord$9(body) && body.publication === "publish" ? sdkUpsertEntryPublishResponseSchema : sdkUpsertEntryDraftResponseSchema;
19266
- case "/pages": return isRecord$9(body) && body.publication === "publish" ? sdkUpsertPagePublishResponseSchema : sdkUpsertPageDraftResponseSchema;
19361
+ case "/entries": return isRecord$10(body) && body.publication === "publish" ? sdkUpsertEntryPublishResponseSchema : sdkUpsertEntryDraftResponseSchema;
19362
+ case "/pages": return isRecord$10(body) && body.publication === "publish" ? sdkUpsertPagePublishResponseSchema : sdkUpsertPageDraftResponseSchema;
19267
19363
  case "/navigation": return sdkUpsertNavigationMenuResponseSchema;
19268
19364
  case "/forms": return sdkUpsertFormResponseSchema;
19269
19365
  case "/venues": return sdkUpsertVenueResponseSchema;
@@ -19556,14 +19652,14 @@ function parseRuntimeResponse(value, schema, requestInfo, statusCode) {
19556
19652
  if (validation.valid) throw new Error("Response schema parsing was inconsistent");
19557
19653
  throw new ManagementInvalidResponseError(validation.details, statusCode, requestInfo);
19558
19654
  }
19559
- function isRecord$8(value) {
19655
+ function isRecord$9(value) {
19560
19656
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
19561
19657
  }
19562
19658
  function isFieldError(value) {
19563
- return isRecord$8(value) && typeof value.field === "string" && typeof value.code === "string" && typeof value.message === "string";
19659
+ return isRecord$9(value) && typeof value.field === "string" && typeof value.code === "string" && typeof value.message === "string";
19564
19660
  }
19565
19661
  function parseApiResponse(value) {
19566
- if (!isRecord$8(value)) return null;
19662
+ if (!isRecord$9(value)) return null;
19567
19663
  if (value.success === true) {
19568
19664
  return {
19569
19665
  success: true,
@@ -19572,7 +19668,7 @@ function parseApiResponse(value) {
19572
19668
  }
19573
19669
  if (value.success === false) {
19574
19670
  const error = value.error;
19575
- if (!isRecord$8(error) || typeof error.code !== "string" || typeof error.message !== "string") {
19671
+ if (!isRecord$9(error) || typeof error.code !== "string" || typeof error.message !== "string") {
19576
19672
  return {
19577
19673
  success: false,
19578
19674
  error: {
@@ -21096,16 +21192,16 @@ var BlockPatchStaleContentError = class extends ManagementApiError {
21096
21192
  function isBlockPatchStaleContentError(error) {
21097
21193
  return error instanceof BlockPatchStaleContentError;
21098
21194
  }
21099
- function isRecord$7(value) {
21195
+ function isRecord$8(value) {
21100
21196
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
21101
21197
  }
21102
21198
  function extractStaleContentCurrentHash(error) {
21103
21199
  if (error.statusCode !== 409) return null;
21104
- if (!isRecord$7(error.details)) return null;
21200
+ if (!isRecord$8(error.details)) return null;
21105
21201
  const fieldErrors = error.details.fieldErrors;
21106
21202
  if (!Array.isArray(fieldErrors)) return null;
21107
21203
  for (const fieldError of fieldErrors) {
21108
- if (isRecord$7(fieldError) && fieldError.field === SDK_PATCH_STALE_CONTENT_FIELD && fieldError.code === SDK_PATCH_STALE_CONTENT_CODE && typeof fieldError.message === "string") {
21204
+ if (isRecord$8(fieldError) && fieldError.field === SDK_PATCH_STALE_CONTENT_FIELD && fieldError.code === SDK_PATCH_STALE_CONTENT_CODE && typeof fieldError.message === "string") {
21109
21205
  return fieldError.message;
21110
21206
  }
21111
21207
  }
@@ -23631,6 +23727,168 @@ function parsePublicProductCategorySelector(value) {
23631
23727
  return undefined;
23632
23728
  }
23633
23729
 
23730
+ //#endregion
23731
+ //#region ../api/src/pageReadResponseCache.ts
23732
+ var CacheProbeMiss = class extends Error {};
23733
+ /** Next has no response-dependent fetch TTL. Only the matching policy may store a page read. */
23734
+ var UncachedPageRead = class extends Error {
23735
+ constructor(snapshot) {
23736
+ super("Page read belongs to another cache policy");
23737
+ this.snapshot = snapshot;
23738
+ }
23739
+ };
23740
+ function isRecord$7(value) {
23741
+ return typeof value === "object" && value !== null && !Array.isArray(value);
23742
+ }
23743
+ function isResolvedPage(page) {
23744
+ return page?.kind === "resolved" && typeof page.requestedPath === "string" && (page.dependencies === "content" || page.dependencies === "availability") && isRecord$7(page.result) && [
23745
+ "cms",
23746
+ "system_event",
23747
+ "system_service"
23748
+ ].includes(String(page.result.kind));
23749
+ }
23750
+ function envelopePage(body) {
23751
+ const data = isRecord$7(body) && body.success === true && isRecord$7(body.data) ? body.data : null;
23752
+ return data?.type === "content" && isRecord$7(data.content) ? data.content : data;
23753
+ }
23754
+ function admit(snapshot) {
23755
+ try {
23756
+ const body = JSON.parse(snapshot.body);
23757
+ const page = envelopePage(body);
23758
+ if (snapshot.status === 200 && isResolvedPage(page)) return {
23759
+ resolved: true,
23760
+ dependencies: page.dependencies
23761
+ };
23762
+ } catch {}
23763
+ return {
23764
+ resolved: false,
23765
+ dependencies: snapshot.status === 200 || snapshot.headers.some(([key, value]) => key === "x-riverbank-page-dependencies" && value === "availability") ? "availability" : "content"
23766
+ };
23767
+ }
23768
+ /** A scoped transport read is shared with Next's background refresh, never across requests. */
23769
+ function liveResponse(read) {
23770
+ const pending = new Map();
23771
+ return () => {
23772
+ const existing = pending.get("response");
23773
+ if (existing) return existing;
23774
+ const response = read().then(async (value) => ({
23775
+ body: await value.text(),
23776
+ status: value.status,
23777
+ headers: [...value.headers.entries()],
23778
+ cachedAt: Date.now()
23779
+ }));
23780
+ pending.set("response", response);
23781
+ return response;
23782
+ };
23783
+ }
23784
+ /** Neutral probes do not register a policy; the chosen entry is then checked with its real tags. */
23785
+ async function readPolicy(input, probe = false) {
23786
+ const policy = buildPageReadCachePolicy(input.siteId, input.dependency);
23787
+ const revalidate = Math.min(policy.revalidate, input.maxAge ?? policy.revalidate);
23788
+ const cached = input.cache(async () => {
23789
+ const snapshot$1 = await input.read();
23790
+ const admission = admit(snapshot$1);
23791
+ if (!admission.resolved || admission.dependencies !== input.dependency) throw new UncachedPageRead(snapshot$1);
23792
+ return snapshot$1;
23793
+ }, [
23794
+ "page-read-envelope-v2",
23795
+ input.key,
23796
+ input.dependency
23797
+ ], probe ? {
23798
+ revalidate: false,
23799
+ tags: []
23800
+ } : {
23801
+ ...policy,
23802
+ revalidate
23803
+ });
23804
+ const snapshot = await cached();
23805
+ if (Date.now() - snapshot.cachedAt < revalidate * 1e3) return snapshot;
23806
+ return probe ? null : input.read();
23807
+ }
23808
+ async function probePolicy(input) {
23809
+ return readPolicy({
23810
+ ...input,
23811
+ read: async () => {
23812
+ throw new CacheProbeMiss();
23813
+ }
23814
+ }, true).catch((error) => {
23815
+ if (error instanceof CacheProbeMiss) return null;
23816
+ throw error;
23817
+ });
23818
+ }
23819
+ /** Read in a framework cache scope, but never store an unclassified or failed response. */
23820
+ async function readInCacheScope(cache, key, read) {
23821
+ try {
23822
+ return await cache(async () => {
23823
+ throw new UncachedPageRead(await read());
23824
+ }, ["page-read-live-v2", key], {
23825
+ revalidate: false,
23826
+ tags: []
23827
+ })();
23828
+ } catch (error) {
23829
+ if (error instanceof UncachedPageRead) return error.snapshot;
23830
+ throw error;
23831
+ }
23832
+ }
23833
+ async function selectResponse(input) {
23834
+ const candidate = await probePolicy({
23835
+ ...input,
23836
+ dependency: "content"
23837
+ }) ?? await probePolicy({
23838
+ ...input,
23839
+ dependency: "availability"
23840
+ });
23841
+ if (candidate) {
23842
+ try {
23843
+ const checked = await readPolicy({
23844
+ ...input,
23845
+ dependency: admit(candidate).dependencies
23846
+ });
23847
+ if (checked) return checked;
23848
+ } catch (error) {
23849
+ if (error instanceof UncachedPageRead) return storeResponse(input, error.snapshot);
23850
+ throw error;
23851
+ }
23852
+ }
23853
+ return storeResponse(input, await readInCacheScope(input.cache, input.key, input.read));
23854
+ }
23855
+ async function storeResponse(input, snapshot) {
23856
+ const admission = admit(snapshot);
23857
+ try {
23858
+ return await readPolicy({
23859
+ ...input,
23860
+ key: admission.resolved ? input.key : `${input.key}:refusal:${snapshot.status}`,
23861
+ dependency: admission.dependencies,
23862
+ read: async () => snapshot
23863
+ }) ?? snapshot;
23864
+ } catch (error) {
23865
+ if (error instanceof UncachedPageRead) return error.snapshot;
23866
+ throw error;
23867
+ }
23868
+ }
23869
+ async function cachePageReadResponse(input) {
23870
+ if (!input.cache) return input.read();
23871
+ const result = await selectResponse({
23872
+ ...input,
23873
+ cache: input.cache,
23874
+ read: liveResponse(input.read)
23875
+ });
23876
+ return new Response(result.body, {
23877
+ status: result.status,
23878
+ headers: result.headers
23879
+ });
23880
+ }
23881
+ /** Result adapters use this for cache fallbacks that did not return through the HTTP transport. */
23882
+ async function observePageReadPolicy(cache, siteId, payload) {
23883
+ if (!cache) return;
23884
+ const dependency = pageReadDependencies(payload);
23885
+ await cache(async () => true, [
23886
+ "page-read-policy-v2",
23887
+ siteId,
23888
+ dependency
23889
+ ], buildPageReadCachePolicy(siteId, dependency))();
23890
+ }
23891
+
23634
23892
  //#endregion
23635
23893
  //#region ../api/src/token.ts
23636
23894
  async function getAuthHeaders(supabase) {
@@ -24109,20 +24367,9 @@ function normalizeCmsApiKey(raw) {
24109
24367
 
24110
24368
  //#endregion
24111
24369
  //#region ../api/src/request.ts
24112
- let revalidateTag = null;
24113
- let revalidateTagResolved = false;
24114
- function getRevalidateTag() {
24115
- if (revalidateTagResolved) return revalidateTag;
24116
- revalidateTagResolved = true;
24117
- if (typeof window !== "undefined") return null;
24118
- try {
24119
- const dynamicRequire = new Function("modulePath", "return require(modulePath)");
24120
- const nextCache = dynamicRequire("next/cache");
24121
- revalidateTag = nextCache.revalidateTag ?? null;
24122
- } catch {
24123
- revalidateTag = null;
24124
- }
24125
- return revalidateTag;
24370
+ /** Preserve the returned dependency even when the SDK served a durable fallback. */
24371
+ function observePageReadResponse(adapter, siteId, payload) {
24372
+ return observePageReadPolicy(adapter?.cache ?? null, siteId, payload);
24126
24373
  }
24127
24374
  /**
24128
24375
  * Generate a UUID, with fallback for environments where crypto.randomUUID isn't available.
@@ -24232,8 +24479,8 @@ function serializePathParam(endpoint, key, value) {
24232
24479
  }
24233
24480
  throw new Error(`Invalid path param for endpoint ${String(endpoint)}: ${key} must be a string`);
24234
24481
  }
24235
- function invalidateCacheTags(tags$1, params) {
24236
- const resolved = getRevalidateTag();
24482
+ function invalidateCacheTags(adapter, tags$1, params) {
24483
+ const resolved = adapter?.invalidateTag;
24237
24484
  if (typeof window !== "undefined" || !resolved || !tags$1) return;
24238
24485
  tags$1.forEach((tag) => {
24239
24486
  let processedTag = tag;
@@ -24243,7 +24490,7 @@ function invalidateCacheTags(tags$1, params) {
24243
24490
  });
24244
24491
  }
24245
24492
  try {
24246
- resolved(processedTag, "max");
24493
+ resolved(processedTag);
24247
24494
  } catch {}
24248
24495
  });
24249
24496
  }
@@ -24356,7 +24603,7 @@ async function createAuthenticatedApiClient(supabase) {
24356
24603
  }
24357
24604
  return createCMSClient(authHeaders);
24358
24605
  }
24359
- function createApiResponseTransport(getHeaders = () => ({}), baseUrl, { sdkVersion } = {}) {
24606
+ function createApiResponseTransport(getHeaders = () => ({}), baseUrl, { sdkVersion, frameworkCache } = {}) {
24360
24607
  return ({ endpoint, body, params, options = {} }) => {
24361
24608
  const plan = buildApiRequestPlan({
24362
24609
  endpoint,
@@ -24370,11 +24617,11 @@ function createApiResponseTransport(getHeaders = () => ({}), baseUrl, { sdkVersi
24370
24617
  baseUrl: normalizeCmsApiBaseUrl(baseUrl ?? resolveApiBaseUrl()),
24371
24618
  sdkVersion
24372
24619
  });
24373
- const fetchPromise = fetch(plan.url, plan.init);
24620
+ const fetchPromise = executeApiRequest(plan, endpoint, params, options, frameworkCache);
24374
24621
  if (plan.cacheInvalidationTags) {
24375
24622
  return fetchPromise.then((response) => {
24376
24623
  if (response.ok) {
24377
- invalidateCacheTags(plan.cacheInvalidationTags, params);
24624
+ invalidateCacheTags(frameworkCache, plan.cacheInvalidationTags, params);
24378
24625
  }
24379
24626
  return response;
24380
24627
  });
@@ -24382,6 +24629,24 @@ function createApiResponseTransport(getHeaders = () => ({}), baseUrl, { sdkVersi
24382
24629
  return fetchPromise;
24383
24630
  };
24384
24631
  }
24632
+ function isPublishedPageRead(endpoint, params, options) {
24633
+ return (endpoint === "getContentByPath" || endpoint === "resolveRouteOutcome") && params?.preview !== true && params?.preview !== "true" && options.cache !== "no-store";
24634
+ }
24635
+ function executeApiRequest(plan, endpoint, params, options, frameworkCache) {
24636
+ const inputParams = params;
24637
+ const { next: fetchPolicy, ...uncachedInit } = plan.init;
24638
+ const publishedPage = isPublishedPageRead(endpoint, inputParams, options);
24639
+ return publishedPage ? cachePageReadResponse({
24640
+ cache: frameworkCache?.cache ?? null,
24641
+ key: JSON.stringify([plan.url, [...new Headers(plan.init.headers).entries()]]),
24642
+ siteId: typeof inputParams?.siteId === "string" ? inputParams.siteId : "",
24643
+ maxAge: typeof fetchPolicy?.revalidate === "number" ? fetchPolicy.revalidate : undefined,
24644
+ read: () => fetch(plan.url, {
24645
+ ...uncachedInit,
24646
+ cache: "no-store"
24647
+ })
24648
+ }) : fetch(plan.url, plan.init);
24649
+ }
24385
24650
  const batchReadPolicyBodySchema = z.object({ requests: z.array(z.object({
24386
24651
  endpoint: z.string(),
24387
24652
  params: z.record(z.string(), z.unknown()).optional()
@@ -24415,10 +24680,12 @@ function batchReadRequestOptions(params, body, options) {
24415
24680
  function publicReadRequestOptions(endpoint, params, body, options) {
24416
24681
  if (endpoint === "batchBlockLoaders") return batchReadRequestOptions(params, body, options);
24417
24682
  const preview = params?.preview === true || params?.preview === "true";
24418
- return endpoint === "getContentByPath" && preview ? {
24683
+ if (endpoint !== "getContentByPath" && endpoint !== "resolveRouteOutcome") return options;
24684
+ if (preview) return {
24419
24685
  ...options,
24420
24686
  cache: "no-store"
24421
- } : options;
24687
+ };
24688
+ return options;
24422
24689
  }
24423
24690
  function assertResolvedEndpointPath(endpoint, url) {
24424
24691
  const tokens = [...url.match(/\{[^}]+\}/g) ?? [], ...url.match(/(^|\/):([A-Za-z][A-Za-z0-9_]*)\b/g) ?? []];
@@ -24601,6 +24868,7 @@ const BOOKING_ACTIVITY_TYPE_VALUES = [
24601
24868
  "appointment_moved",
24602
24869
  "event_booking_moved",
24603
24870
  "event_booking_restored",
24871
+ "event_booking_ticket_changed",
24604
24872
  "waitlist_joined",
24605
24873
  "balance_paid",
24606
24874
  "payment_recorded",