@riverbankcms/sdk 0.88.0 → 0.89.1

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 (103) hide show
  1. package/dist/{PreviewEditorSidebar-EVRS3C7T.mjs → PreviewEditorSidebar-JDR64FEC.mjs} +3 -3
  2. package/dist/{PreviewEditorUI-54WD4IGE.mjs → PreviewEditorUI-67TMJMAF.mjs} +3 -3
  3. package/dist/SdkPreviewModeRuntime-ZBEMRV7N.mjs +8 -0
  4. package/dist/_dts/api/src/accessAdmin.d.ts +7 -0
  5. package/dist/_dts/api/src/endpoints.d.ts +8 -0
  6. package/dist/_dts/api/src/index.d.ts +2 -2
  7. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +5 -1
  8. package/dist/_dts/api/src/siteMembers.d.ts +6 -1
  9. package/dist/_dts/api/src/types.d.ts +1 -1
  10. package/dist/_dts/blocks/src/system/icons/cta.d.ts +3 -3
  11. package/dist/_dts/blocks/src/system/icons/index.d.ts +1 -0
  12. package/dist/_dts/blocks/src/system/icons/registry.d.ts +2 -2
  13. package/dist/_dts/blocks/src/system/icons/semantic.d.ts +3 -3
  14. package/dist/_dts/blocks/src/system/icons/svg.d.ts +72 -0
  15. package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +1 -0
  16. package/dist/_dts/blocks/src/system/runtime/hooks/loadStateError.d.ts +1 -0
  17. package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableDates.d.ts +1 -1
  18. package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableDates.state.d.ts +55 -0
  19. package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableSlots.state.d.ts +39 -0
  20. package/dist/_dts/blocks/src/system/runtime/hooks/useBookingFormConfig.d.ts +4 -27
  21. package/dist/_dts/blocks/src/system/runtime/hooks/useBookingFormConfig.state.d.ts +40 -0
  22. package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +20 -0
  23. package/dist/_dts/blocks/src/system/runtime/hooks/useEventFilters.state.d.ts +31 -0
  24. package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.d.ts +3 -3
  25. package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.state.d.ts +39 -0
  26. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventPaginatedListView.client.d.ts +1 -1
  27. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.client.state.d.ts +24 -2
  28. package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.state.d.ts +24 -0
  29. package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.state.d.ts +35 -0
  30. package/dist/_dts/content-model/src/entry-slots/types.d.ts +54 -0
  31. package/dist/_dts/core/src/branded.d.ts +7 -0
  32. package/dist/_dts/core/src/index.d.ts +1 -0
  33. package/dist/_dts/core/src/site-route-target.d.ts +40 -0
  34. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +159 -2
  35. package/dist/_dts/media-core/src/fileDomain.d.ts +4 -0
  36. package/dist/_dts/sdk/src/client/runtimeCachePolicy.d.ts +160 -0
  37. package/dist/_dts/sdk/src/client/types.d.ts +26 -1
  38. package/dist/_dts/sdk/src/index.d.ts +3 -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-YDMBIIS5.mjs → chunk-7N46MZHI.mjs} +1 -1
  42. package/dist/{chunk-7KOO7RPP.mjs → chunk-7YUAXONX.mjs} +1007 -353
  43. package/dist/{chunk-O4LVYUVH.mjs → chunk-F645A5UV.mjs} +18 -0
  44. package/dist/{chunk-ER4UIW4X.mjs → chunk-HKJQERFR.mjs} +7 -7
  45. package/dist/{chunk-K3JWH6HE.mjs → chunk-TGBJWKMP.mjs} +1 -1
  46. package/dist/{chunk-HVOBXA3Y.mjs → chunk-ZQRBLCW5.mjs} +2 -2
  47. package/dist/cli/index.mjs +668 -18
  48. package/dist/client/{accordion-PT5CGW5N.mjs → accordion-MUCVNGQ7.mjs} +2 -2
  49. package/dist/client/{bookingForm-2HLRTEYS.mjs → bookingForm-PKD6EFIE.mjs} +192 -76
  50. package/dist/client/bookings.mjs +436 -191
  51. package/dist/client/{carousel-Z2LKYSWA.mjs → carousel-3TKQSNJC.mjs} +4 -3
  52. package/dist/client/{cart-ND5IK4A6.mjs → cart-6XHSZK23.mjs} +8 -7
  53. package/dist/client/{checkout-EYUSGAY7.mjs → checkout-FVSPM6FI.mjs} +8 -7
  54. package/dist/client/chunk-6N7YRNYU.mjs +183 -0
  55. package/dist/client/{chunk-O5JNI3E4.mjs → chunk-7DH35FGA.mjs} +2 -2
  56. package/dist/client/{chunk-BAWHZ5GM.mjs → chunk-CQKKFEQD.mjs} +195 -61
  57. package/dist/client/{chunk-X7GVFB7Y.mjs → chunk-EY42X22F.mjs} +3 -3
  58. package/dist/client/{chunk-6DVPO44G.mjs → chunk-FHU6PFPM.mjs} +1 -1
  59. package/dist/client/{chunk-H4MHEXYS.mjs → chunk-LQFDYWPJ.mjs} +1 -1
  60. package/dist/client/{chunk-MHBEWDT7.mjs → chunk-RSQWWUAD.mjs} +122 -50
  61. package/dist/client/{chunk-GOFO7HRH.mjs → chunk-STJ2NCQM.mjs} +1 -1
  62. package/dist/client/{chunk-DIRW2LNG.mjs → chunk-UQFY4AHX.mjs} +272 -198
  63. package/dist/client/{chunk-WCVK4MBJ.mjs → chunk-VGLXACVK.mjs} +1 -1
  64. package/dist/client/{chunk-BL66UWGD.mjs → chunk-ZJZZA5EP.mjs} +6 -6
  65. package/dist/client/{chunk-S4G65LGR.mjs → chunk-ZT5XE7FK.mjs} +1 -1
  66. package/dist/client/client.mjs +3823 -3507
  67. package/dist/client/{courseRegistration-H3AZBUEG.mjs → courseRegistration-ATZSYDHM.mjs} +6 -6
  68. package/dist/client/{eventCalendar-FPKJGLGS.mjs → eventCalendar-6T2UGKKP.mjs} +10 -9
  69. package/dist/client/{eventCombined-QCGIZBUY.mjs → eventCombined-Q4VANXVF.mjs} +10 -9
  70. package/dist/client/{eventDetails-HIT3BJWU.mjs → eventDetails-DW37E7VW.mjs} +10 -9
  71. package/dist/client/{eventListing-R4HNWJDN.mjs → eventListing-XURTSAUW.mjs} +10 -9
  72. package/dist/client/{eventRegistration-Q7BYY5HF.mjs → eventRegistration-MRKEVAXW.mjs} +10 -9
  73. package/dist/client/{form-NI6YOG6S.mjs → form-WZZFFGMU.mjs} +3 -3
  74. package/dist/client/{headerSection-SDYGII36.mjs → headerSection-EQYVQBLM.mjs} +3 -3
  75. package/dist/client/hooks.mjs +18 -0
  76. package/dist/client/{locationMap-BDETEUQD.mjs → locationMap-MFF5VAZR.mjs} +3 -3
  77. package/dist/client/{newsletterForm-EKYIU67X.mjs → newsletterForm-JQ77UYIE.mjs} +60 -24
  78. package/dist/client/{productDetail-5UTGNN76.mjs → productDetail-25LMT3IZ.mjs} +8 -7
  79. package/dist/client/{productList-7YA5KXZQ.mjs → productList-5ABEMKUG.mjs} +8 -7
  80. package/dist/client/rendering/client.mjs +3266 -3528
  81. package/dist/client/rendering/islands.mjs +19 -19
  82. package/dist/client/rendering.mjs +3143 -3452
  83. package/dist/client/{shop-AIMUMZYC.mjs → shop-OMMQZ6YO.mjs} +8 -7
  84. package/dist/preview-next/before-render.mjs +18 -0
  85. package/dist/preview-next/client/runtime.mjs +5 -5
  86. package/dist/preview-next/middleware.mjs +18 -0
  87. package/dist/{sdk-runtime-NW472WNT.mjs → sdk-runtime-WNLBZ3ZH.mjs} +6 -6
  88. package/dist/server/components.mjs +1068 -1540
  89. package/dist/server/config-validation.mjs +18 -0
  90. package/dist/server/config.mjs +18 -0
  91. package/dist/server/data.mjs +18 -0
  92. package/dist/server/index.mjs +847 -261
  93. package/dist/server/next.mjs +1708 -1555
  94. package/dist/server/prebuild.mjs +1 -1
  95. package/dist/server/rendering/server.mjs +1068 -1540
  96. package/dist/server/rendering.mjs +1074 -1546
  97. package/dist/server/routing.mjs +314 -9
  98. package/dist/server/server.mjs +668 -25
  99. package/dist/server/theme-bridge.mjs +26 -0
  100. package/dist/styles/index.css +26 -0
  101. package/package.json +2 -1
  102. package/dist/SdkPreviewModeRuntime-ZALZDJEK.mjs +0 -8
  103. /package/dist/client/{chunk-LI2C6M5O.mjs → chunk-25W2EQUN.mjs} +0 -0
@@ -0,0 +1,31 @@
1
+ import type { EventFiltersResponse } from '../api/types';
2
+ export declare const EMPTY_EVENT_FILTERS: EventFiltersResponse;
3
+ export type EventFiltersLoadState = Readonly<{
4
+ kind: 'idle';
5
+ filters: EventFiltersResponse;
6
+ }> | Readonly<{
7
+ kind: 'loading';
8
+ filters: EventFiltersResponse;
9
+ }> | Readonly<{
10
+ kind: 'loaded';
11
+ filters: EventFiltersResponse;
12
+ }> | Readonly<{
13
+ kind: 'error';
14
+ filters: EventFiltersResponse;
15
+ error: Error;
16
+ }>;
17
+ export type EventFiltersLoadAction = Readonly<{
18
+ type: 'started';
19
+ }> | Readonly<{
20
+ type: 'succeeded';
21
+ filters: EventFiltersResponse;
22
+ }> | Readonly<{
23
+ type: 'failed';
24
+ error: Error;
25
+ }>;
26
+ export declare function createInitialEventFiltersLoadState(): EventFiltersLoadState;
27
+ export declare function eventFiltersLoadReducer(state: EventFiltersLoadState, action: EventFiltersLoadAction): EventFiltersLoadState;
28
+ export declare function toEventFiltersLoadError(error: unknown): Error;
29
+ export declare function getEventFiltersData(state: EventFiltersLoadState): EventFiltersResponse;
30
+ export declare function isEventFiltersLoading(state: EventFiltersLoadState): boolean;
31
+ export declare function getEventFiltersError(state: EventFiltersLoadState): Error | null;
@@ -21,9 +21,9 @@ type UseEventPaginationOptions = {
21
21
  /** Fetch stage (preview vs published) */
22
22
  stage?: 'preview' | 'published';
23
23
  };
24
- type EventPaginationState = {
24
+ type EventPaginationResult = {
25
25
  /** All loaded events */
26
- events: PublicEvent[];
26
+ events: readonly PublicEvent[];
27
27
  /** Whether a load operation is in progress */
28
28
  loading: boolean;
29
29
  /** Error from last load attempt */
@@ -49,5 +49,5 @@ type EventPaginationState = {
49
49
  * ```
50
50
  */
51
51
  export declare function useEventPagination({ siteId: _siteId, // Deprecated: siteId now comes from BlockApiProvider context
52
- initialEvents, fetchInitialOnMount, initialFilters, filters, pageSize, stage, }: UseEventPaginationOptions): EventPaginationState;
52
+ initialEvents, fetchInitialOnMount, initialFilters, filters, pageSize, stage, }: UseEventPaginationOptions): EventPaginationResult;
53
53
  export default useEventPagination;
@@ -0,0 +1,39 @@
1
+ import type { PublicEvent } from '../../blocks/events/shared/types';
2
+ export type EventPaginationLoadState = Readonly<{
3
+ kind: 'ready';
4
+ events: readonly PublicEvent[];
5
+ hasMore: boolean;
6
+ }> | Readonly<{
7
+ kind: 'loading';
8
+ events: readonly PublicEvent[];
9
+ hasMore: boolean;
10
+ }> | Readonly<{
11
+ kind: 'error';
12
+ events: readonly PublicEvent[];
13
+ hasMore: boolean;
14
+ error: Error;
15
+ }>;
16
+ export type EventPaginationLoadAction = Readonly<{
17
+ type: 'started';
18
+ reset: boolean;
19
+ }> | Readonly<{
20
+ type: 'succeeded';
21
+ events: readonly PublicEvent[];
22
+ hasMore: boolean;
23
+ }> | Readonly<{
24
+ type: 'failed';
25
+ error: Error;
26
+ }> | Readonly<{
27
+ type: 'synced';
28
+ events: readonly PublicEvent[];
29
+ pageSize: number;
30
+ }>;
31
+ export declare function createInitialEventPaginationLoadState(events: readonly PublicEvent[], pageSize: number): EventPaginationLoadState;
32
+ export declare function eventPaginationLoadReducer(state: EventPaginationLoadState, action: EventPaginationLoadAction): EventPaginationLoadState;
33
+ export declare function getEventIdentity(event: PublicEvent): string;
34
+ export declare function mergeEventPaginationEvents(existingEvents: readonly PublicEvent[], newEvents: readonly PublicEvent[]): readonly PublicEvent[];
35
+ export declare function toEventPaginationLoadError(error: unknown): Error;
36
+ export declare function getEventPaginationEvents(state: EventPaginationLoadState): readonly PublicEvent[];
37
+ export declare function isEventPaginationLoading(state: EventPaginationLoadState): boolean;
38
+ export declare function getEventPaginationError(state: EventPaginationLoadState): Error | null;
39
+ export declare function hasMoreEventPages(events: readonly PublicEvent[], pageSize: number): boolean;
@@ -5,7 +5,7 @@ import type { EventListPaginationAction } from './listOptions';
5
5
  type EventPaginatedListViewProps = {
6
6
  filters?: React.ReactNode;
7
7
  display: EventListingDisplay;
8
- events: PublicEvent[];
8
+ events: readonly PublicEvent[];
9
9
  loading: boolean;
10
10
  error: Error | null;
11
11
  hasMore: boolean;
@@ -6,7 +6,29 @@ export type NewsletterFormError = Readonly<{
6
6
  kind: 'form';
7
7
  message: string;
8
8
  }>;
9
+ export type NewsletterFormSubmissionState = Readonly<{
10
+ tag: 'idle';
11
+ }> | Readonly<{
12
+ tag: 'submitting';
13
+ }> | Readonly<{
14
+ tag: 'error';
15
+ error: NewsletterFormError;
16
+ }> | Readonly<{
17
+ tag: 'success';
18
+ }>;
19
+ export type NewsletterFormSubmissionAction = Readonly<{
20
+ type: 'submitted';
21
+ }> | Readonly<{
22
+ type: 'failed';
23
+ error: NewsletterFormError;
24
+ }> | Readonly<{
25
+ type: 'succeeded';
26
+ }>;
27
+ export declare const initialNewsletterFormSubmissionState: NewsletterFormSubmissionState;
28
+ export declare function newsletterFormSubmissionReducer(state: NewsletterFormSubmissionState, action: NewsletterFormSubmissionAction): NewsletterFormSubmissionState;
9
29
  export declare function newsletterFieldError(fieldId: string, message: string): NewsletterFormError;
10
30
  export declare function newsletterFormError(message: string): NewsletterFormError;
11
- export declare function getNewsletterFieldError(error: NewsletterFormError | null, fieldId: string): string | null;
12
- export declare function getNewsletterFormError(error: NewsletterFormError | null): string | null;
31
+ export declare function isNewsletterFormSubmitting(state: NewsletterFormSubmissionState): boolean;
32
+ export declare function isNewsletterFormSuccess(state: NewsletterFormSubmissionState): boolean;
33
+ export declare function getNewsletterSubmissionFieldError(state: NewsletterFormSubmissionState, fieldId: string): string | null;
34
+ export declare function getNewsletterSubmissionFormError(state: NewsletterFormSubmissionState): string | null;
@@ -0,0 +1,24 @@
1
+ export type MagicLinkSubmissionState = Readonly<{
2
+ tag: 'idle';
3
+ }> | Readonly<{
4
+ tag: 'submitting';
5
+ }> | Readonly<{
6
+ tag: 'success';
7
+ }> | Readonly<{
8
+ tag: 'error';
9
+ message: string;
10
+ }>;
11
+ export type MagicLinkSubmissionAction = Readonly<{
12
+ type: 'submit-started';
13
+ }> | Readonly<{
14
+ type: 'submit-succeeded';
15
+ }> | Readonly<{
16
+ type: 'submit-failed';
17
+ message: string;
18
+ }> | Readonly<{
19
+ type: 'reset';
20
+ }>;
21
+ export declare const initialMagicLinkSubmissionState: MagicLinkSubmissionState;
22
+ export declare function magicLinkSubmissionReducer(state: MagicLinkSubmissionState, action: MagicLinkSubmissionAction): MagicLinkSubmissionState;
23
+ export declare function isMagicLinkSubmitting(state: MagicLinkSubmissionState): boolean;
24
+ export declare function getMagicLinkError(state: MagicLinkSubmissionState): string | null;
@@ -0,0 +1,35 @@
1
+ import type { ResolveWaitlistClaimResponse } from "../api/types";
2
+ export type WaitlistClaimResolveFailure = Readonly<{
3
+ kind: "portal-login-required";
4
+ message: string;
5
+ }> | Readonly<{
6
+ kind: "error";
7
+ message: string;
8
+ }>;
9
+ export type WaitlistClaimState = Readonly<{
10
+ kind: "idle";
11
+ }> | Readonly<{
12
+ kind: "resolving";
13
+ }> | Readonly<{
14
+ kind: "resolved";
15
+ claim: ResolveWaitlistClaimResponse;
16
+ }> | WaitlistClaimResolveFailure;
17
+ export type WaitlistClaimAction = Readonly<{
18
+ type: "cleared";
19
+ }> | Readonly<{
20
+ type: "started";
21
+ }> | Readonly<{
22
+ type: "resolved";
23
+ claim: ResolveWaitlistClaimResponse;
24
+ }> | Readonly<{
25
+ type: "failed";
26
+ failure: WaitlistClaimResolveFailure;
27
+ }>;
28
+ export declare function createInitialWaitlistClaimState(hasToken: boolean): WaitlistClaimState;
29
+ export declare function waitlistClaimReducer(_state: WaitlistClaimState, action: WaitlistClaimAction): WaitlistClaimState;
30
+ export declare function toWaitlistClaimResolveFailure(error: unknown): WaitlistClaimResolveFailure;
31
+ export declare function getWaitlistClaim(state: WaitlistClaimState): ResolveWaitlistClaimResponse | null;
32
+ export declare function getWaitlistClaimError(state: WaitlistClaimState): string | null;
33
+ export declare function getWaitlistClaimLoginMessage(state: WaitlistClaimState): string | null;
34
+ export declare function requiresWaitlistClaimPortalLogin(state: WaitlistClaimState): boolean;
35
+ export declare function isWaitlistClaimLoading(state: WaitlistClaimState): boolean;
@@ -320,6 +320,60 @@ export type SdkEntryBlocksPatchParseError = Readonly<{
320
320
  blockKind: string;
321
321
  }>;
322
322
  export declare function parseSdkEntryBlocksPatch(blocks: unknown): EntrySlotResult<SdkEntryBlocksPatch, SdkEntryBlocksPatchParseError>;
323
+ export type SlotContainerOwner = Readonly<{
324
+ kind: 'contentEntry';
325
+ contentEntryId: EntrySlotContentEntryId;
326
+ }>;
327
+ export type SlotContainerOwnerParseError = Readonly<{
328
+ kind: 'not-object';
329
+ }> | Readonly<{
330
+ kind: 'unsupported-owner-kind';
331
+ ownerKind: unknown;
332
+ }> | Readonly<{
333
+ kind: 'invalid-content-entry-id';
334
+ error: NonEmptyStringParseError;
335
+ }>;
336
+ export declare function parseSlotContainerOwner(input: unknown): EntrySlotResult<SlotContainerOwner, SlotContainerOwnerParseError>;
337
+ export declare function slotContainerOwnerToContentVersionOwner(owner: SlotContainerOwner): ContentVersionOwner;
338
+ export declare function slotContainerOwnerToEntrySlotLookup(owner: SlotContainerOwner): Readonly<{
339
+ contentEntryId: EntrySlotContentEntryId;
340
+ }>;
341
+ export type PlannedSlotCompositionBlockWrite = Readonly<{
342
+ identifier: string | null;
343
+ blockKind: string;
344
+ purpose: string;
345
+ content: Record<string, unknown>;
346
+ orderIndex: EntrySlotBlockOrderIndex;
347
+ }>;
348
+ export type SlotCompositionMutationInput = Readonly<{
349
+ kind: 'leaveUnchanged';
350
+ }> | Readonly<{
351
+ kind: 'replaceDraftComposition';
352
+ blocks: readonly PlannedSlotCompositionBlockWrite[];
353
+ }> | Readonly<{
354
+ kind: 'publishDraftComposition';
355
+ draftVersionId: EntrySlotContentVersionId;
356
+ }>;
357
+ export type SlotCompositionMutationPlan = Readonly<{
358
+ kind: 'noChange';
359
+ owner: SlotContainerOwner;
360
+ slotKey: SlotKey;
361
+ }> | Readonly<{
362
+ kind: 'replaceDraftComposition';
363
+ owner: SlotContainerOwner;
364
+ slotKey: SlotKey;
365
+ blocks: readonly PlannedSlotCompositionBlockWrite[];
366
+ }> | Readonly<{
367
+ kind: 'publishDraftComposition';
368
+ owner: SlotContainerOwner;
369
+ slotKey: SlotKey;
370
+ draftVersionId: EntrySlotContentVersionId;
371
+ }>;
372
+ export declare function planSlotCompositionMutation(input: Readonly<{
373
+ owner: SlotContainerOwner;
374
+ slotKey: SlotKey;
375
+ mutation: SlotCompositionMutationInput;
376
+ }>): SlotCompositionMutationPlan;
323
377
  export type ContentVersionOwner = Readonly<{
324
378
  kind: 'block';
325
379
  blockId: EntrySlotBlockId;
@@ -24,7 +24,9 @@ export type BrandedIdParseError = {
24
24
  export declare function expectParsedBrandedId<TBrand>(result: Result<TBrand, BrandedIdParseError>): TBrand;
25
25
  export type EventInstanceId = Brand<string, 'EventInstanceId'>;
26
26
  export type SiteId = Brand<string, 'SiteId'>;
27
+ export type SiteRouteId = Brand<string, 'SiteRouteId'>;
27
28
  export type PageId = Brand<string, 'PageId'>;
29
+ export type PageSurfaceId = Brand<string, 'PageSurfaceId'>;
28
30
  export type OccurrenceId = Brand<string, 'OccurrenceId'>;
29
31
  export type EventSeriesId = Brand<string, 'EventSeriesId'>;
30
32
  export type TicketTypeId = Brand<string, 'TicketTypeId'>;
@@ -137,7 +139,9 @@ export declare const unsafeAsEntryId: (id: string) => EntryId;
137
139
  export declare const unsafeAsPreviewEntryId: (id: string) => PreviewEntryId;
138
140
  export declare const unsafeAsEventInstanceId: (id: string) => EventInstanceId;
139
141
  export declare const unsafeAsSiteId: (id: string) => SiteId;
142
+ export declare const unsafeAsSiteRouteId: (id: string) => SiteRouteId;
140
143
  export declare const unsafeAsPageId: (id: string) => PageId;
144
+ export declare const unsafeAsPageSurfaceId: (id: string) => PageSurfaceId;
141
145
  export declare const unsafeAsOccurrenceId: (id: string) => OccurrenceId;
142
146
  export declare const unsafeAsEventSeriesId: (id: string) => EventSeriesId;
143
147
  export declare const unsafeAsTicketTypeId: (id: string) => TicketTypeId;
@@ -224,6 +228,9 @@ export declare const unsafeAsEncounterRecordId: (id: string) => EncounterRecordI
224
228
  export declare const unsafeAsRecordEntryId: (id: string) => RecordEntryId;
225
229
  export declare const unsafeAsProtectedPayloadKeyVersion: (id: string) => ProtectedPayloadKeyVersion;
226
230
  export declare const parseSiteId: (value: unknown) => Result<SiteId, BrandedIdParseError>;
231
+ export declare const parseSiteRouteId: (value: unknown) => Result<SiteRouteId, BrandedIdParseError>;
232
+ export declare const parsePageId: (value: unknown) => Result<PageId, BrandedIdParseError>;
233
+ export declare const parsePageSurfaceId: (value: unknown) => Result<PageSurfaceId, BrandedIdParseError>;
227
234
  export declare const parseOccurrenceId: (value: unknown) => Result<OccurrenceId, BrandedIdParseError>;
228
235
  export declare const parseTicketTypeId: (value: unknown) => Result<TicketTypeId, BrandedIdParseError>;
229
236
  export declare const parsePricingOptionId: (value: unknown) => Result<PricingOptionId, BrandedIdParseError>;
@@ -42,5 +42,6 @@ export * from "./slug";
42
42
  export * from "./string";
43
43
  export * from "./uuid";
44
44
  export * from "./stable-json";
45
+ export * from "./site-route-target";
45
46
  export { disabledSelection, enabledSelection, plannerNoChange, plannerPatch, plannerUpdate, resolvePlanningDateInput, resolvePlanningNow, resolvePlanningNowDate, systemPlanningClock, } from "./planner";
46
47
  export type { DisabledSelection, EnabledSelection, OptionalSelection, PlannerNoChange, PlannerPatch, PlannerUpdate, PlanningClock, PlanningDateInput, PlanningTimeOptions, } from "./planner";
@@ -0,0 +1,40 @@
1
+ import { type BrandedIdParseError, type ContentEntryId, type PageId, type PageSurfaceId } from './branded';
2
+ import { type Result } from './result';
3
+ export declare const SITE_ROUTE_NODE_TYPES: readonly ["page", "content_entry", "page_surface"];
4
+ export type SiteRouteNodeType = (typeof SITE_ROUTE_NODE_TYPES)[number];
5
+ export type SiteRouteTarget = Readonly<{
6
+ kind: 'page';
7
+ pageId: PageId;
8
+ }> | Readonly<{
9
+ kind: 'contentEntry';
10
+ entryId: ContentEntryId;
11
+ }> | Readonly<{
12
+ kind: 'pageSurface';
13
+ surfaceId: PageSurfaceId;
14
+ }>;
15
+ export type SiteRouteTargetParseError = Readonly<{
16
+ kind: 'invalid-node-type';
17
+ nodeType: unknown;
18
+ }> | Readonly<{
19
+ kind: 'unsupported-node-type';
20
+ nodeType: string;
21
+ }> | Readonly<{
22
+ kind: 'invalid-page-id';
23
+ error: BrandedIdParseError;
24
+ }> | Readonly<{
25
+ kind: 'invalid-content-entry-id';
26
+ error: BrandedIdParseError;
27
+ }> | Readonly<{
28
+ kind: 'invalid-page-surface-id';
29
+ error: BrandedIdParseError;
30
+ }>;
31
+ export declare function parseSiteRouteTarget(input: Readonly<{
32
+ nodeType: unknown;
33
+ nodeId: unknown;
34
+ }>): Result<SiteRouteTarget, SiteRouteTargetParseError>;
35
+ export declare function siteRouteTargetNodeType(target: SiteRouteTarget): SiteRouteNodeType;
36
+ export declare function foldSiteRouteTarget<TValue>(target: SiteRouteTarget, cases: Readonly<{
37
+ page: (pageId: PageId) => TValue;
38
+ contentEntry: (entryId: ContentEntryId) => TValue;
39
+ pageSurface: (surfaceId: PageSurfaceId) => TValue;
40
+ }>): TValue;
@@ -11529,6 +11529,78 @@ export type Database = {
11529
11529
  }
11530
11530
  ];
11531
11531
  };
11532
+ page_surfaces: {
11533
+ Row: {
11534
+ created_at: string;
11535
+ created_by: string | null;
11536
+ deleted_at: string | null;
11537
+ id: string;
11538
+ metadata_json: Json;
11539
+ migration_source: Json;
11540
+ readiness_state: string;
11541
+ route_id: string | null;
11542
+ site_id: string;
11543
+ slug: string;
11544
+ subject_id: string;
11545
+ subject_type: string;
11546
+ template_key: string | null;
11547
+ title: string;
11548
+ updated_at: string;
11549
+ updated_by: string | null;
11550
+ };
11551
+ Insert: {
11552
+ created_at?: string;
11553
+ created_by?: string | null;
11554
+ deleted_at?: string | null;
11555
+ id?: string;
11556
+ metadata_json?: Json;
11557
+ migration_source?: Json;
11558
+ readiness_state?: string;
11559
+ route_id?: string | null;
11560
+ site_id: string;
11561
+ slug?: string;
11562
+ subject_id: string;
11563
+ subject_type: string;
11564
+ template_key?: string | null;
11565
+ title?: string;
11566
+ updated_at?: string;
11567
+ updated_by?: string | null;
11568
+ };
11569
+ Update: {
11570
+ created_at?: string;
11571
+ created_by?: string | null;
11572
+ deleted_at?: string | null;
11573
+ id?: string;
11574
+ metadata_json?: Json;
11575
+ migration_source?: Json;
11576
+ readiness_state?: string;
11577
+ route_id?: string | null;
11578
+ site_id?: string;
11579
+ slug?: string;
11580
+ subject_id?: string;
11581
+ subject_type?: string;
11582
+ template_key?: string | null;
11583
+ title?: string;
11584
+ updated_at?: string;
11585
+ updated_by?: string | null;
11586
+ };
11587
+ Relationships: [
11588
+ {
11589
+ foreignKeyName: "page_surfaces_route_site_fk";
11590
+ columns: ["route_id", "site_id"];
11591
+ isOneToOne: false;
11592
+ referencedRelation: "site_routes";
11593
+ referencedColumns: ["id", "site_id"];
11594
+ },
11595
+ {
11596
+ foreignKeyName: "page_surfaces_site_id_fkey";
11597
+ columns: ["site_id"];
11598
+ isOneToOne: false;
11599
+ referencedRelation: "sites";
11600
+ referencedColumns: ["id"];
11601
+ }
11602
+ ];
11603
+ };
11532
11604
  pages: {
11533
11605
  Row: {
11534
11606
  created_at: string;
@@ -12341,6 +12413,74 @@ export type Database = {
12341
12413
  };
12342
12414
  Relationships: [];
12343
12415
  };
12416
+ published_runtime_cache_entries: {
12417
+ Row: {
12418
+ cache_key: string;
12419
+ cached_at: string;
12420
+ created_at: string;
12421
+ endpoint: string;
12422
+ fresh_until: string;
12423
+ last_live_at: string;
12424
+ normalized_params: Json;
12425
+ payload: Json;
12426
+ payload_hash: string;
12427
+ payload_schema_version: number;
12428
+ site_id: string | null;
12429
+ source_deployment: string | null;
12430
+ stage: string;
12431
+ stale_until: string;
12432
+ tags: string[];
12433
+ updated_at: string;
12434
+ write_reason: string | null;
12435
+ };
12436
+ Insert: {
12437
+ cache_key: string;
12438
+ cached_at?: string;
12439
+ created_at?: string;
12440
+ endpoint: string;
12441
+ fresh_until: string;
12442
+ last_live_at?: string;
12443
+ normalized_params: Json;
12444
+ payload: Json;
12445
+ payload_hash: string;
12446
+ payload_schema_version?: number;
12447
+ site_id?: string | null;
12448
+ source_deployment?: string | null;
12449
+ stage?: string;
12450
+ stale_until: string;
12451
+ tags?: string[];
12452
+ updated_at?: string;
12453
+ write_reason?: string | null;
12454
+ };
12455
+ Update: {
12456
+ cache_key?: string;
12457
+ cached_at?: string;
12458
+ created_at?: string;
12459
+ endpoint?: string;
12460
+ fresh_until?: string;
12461
+ last_live_at?: string;
12462
+ normalized_params?: Json;
12463
+ payload?: Json;
12464
+ payload_hash?: string;
12465
+ payload_schema_version?: number;
12466
+ site_id?: string | null;
12467
+ source_deployment?: string | null;
12468
+ stage?: string;
12469
+ stale_until?: string;
12470
+ tags?: string[];
12471
+ updated_at?: string;
12472
+ write_reason?: string | null;
12473
+ };
12474
+ Relationships: [
12475
+ {
12476
+ foreignKeyName: "published_runtime_cache_entries_site_id_fkey";
12477
+ columns: ["site_id"];
12478
+ isOneToOne: false;
12479
+ referencedRelation: "sites";
12480
+ referencedColumns: ["id"];
12481
+ }
12482
+ ];
12483
+ };
12344
12484
  redirect_exchange_codes: {
12345
12485
  Row: {
12346
12486
  code_hash: string;
@@ -16780,6 +16920,23 @@ export type Database = {
16780
16920
  order_id: string;
16781
16921
  }[];
16782
16922
  };
16923
+ read_published_runtime_cache_entry: {
16924
+ Args: {
16925
+ p_cache_key: string;
16926
+ p_payload_schema_version?: number;
16927
+ };
16928
+ Returns: {
16929
+ cache_key: string;
16930
+ cached_at: string;
16931
+ endpoint: string;
16932
+ fresh_until: string;
16933
+ payload: Json;
16934
+ payload_hash: string;
16935
+ payload_schema_version: number;
16936
+ site_id: string;
16937
+ stale_until: string;
16938
+ }[];
16939
+ };
16783
16940
  redeem_pass_credits: {
16784
16941
  Args: {
16785
16942
  credits_amount?: number;
@@ -17184,7 +17341,7 @@ export type Database = {
17184
17341
  newsletter_sender_entity_type: "individual" | "company" | "llp" | "charity" | "other";
17185
17342
  newsletter_subscriber_status: "pending_confirmation" | "active" | "unsubscribed";
17186
17343
  plan_price_interval: "month" | "year";
17187
- route_node_type: "page" | "content_entry";
17344
+ route_node_type: "page" | "content_entry" | "page_surface";
17188
17345
  route_status: "draft" | "published" | "scheduled" | "archived";
17189
17346
  site_deployment_mode: "managed" | "headless_cms" | "headless_full";
17190
17347
  site_purpose: "GENERATE_LEADS" | "SHOWCASE_PORTFOLIO" | "SELL_PRODUCTS" | "SELL_TICKETS" | "EVENT_INFO" | "BLOGGING" | "COMMUNITY" | "OTHER";
@@ -17926,7 +18083,7 @@ export declare const Constants: {
17926
18083
  readonly newsletter_sender_entity_type: readonly ["individual", "company", "llp", "charity", "other"];
17927
18084
  readonly newsletter_subscriber_status: readonly ["pending_confirmation", "active", "unsubscribed"];
17928
18085
  readonly plan_price_interval: readonly ["month", "year"];
17929
- readonly route_node_type: readonly ["page", "content_entry"];
18086
+ readonly route_node_type: readonly ["page", "content_entry", "page_surface"];
17930
18087
  readonly route_status: readonly ["draft", "published", "scheduled", "archived"];
17931
18088
  readonly site_deployment_mode: readonly ["managed", "headless_cms", "headless_full"];
17932
18089
  readonly site_purpose: readonly ["GENERATE_LEADS", "SHOWCASE_PORTFOLIO", "SELL_PRODUCTS", "SELL_TICKETS", "EVENT_INFO", "BLOGGING", "COMMUNITY", "OTHER"];
@@ -429,9 +429,13 @@ export declare const FILE_SIZE_LIMITS: {
429
429
  export declare const DEFAULT_PRIVATE_FILE_SIGNED_URL_EXPIRY_SECONDS: PositiveSeconds;
430
430
  export declare const MAX_SAFE_DOWNLOAD_FILENAME_LENGTH = 180;
431
431
  export declare function asPositiveByteCount(value: number): Result<PositiveByteCount, 'not-positive-byte-count'>;
432
+ export declare const parsePositiveByteCount: typeof asPositiveByteCount;
432
433
  export declare function asPositiveSeconds(value: number): Result<PositiveSeconds, 'not-positive-seconds'>;
434
+ export declare const parsePositiveSeconds: typeof asPositiveSeconds;
433
435
  export declare function asFileChecksumSha256(value: string): Result<FileChecksumSha256, FileChecksumSha256Error>;
436
+ export declare const parseFileChecksumSha256: typeof asFileChecksumSha256;
434
437
  export declare function asSafeDownloadFilename(value: string): Result<SafeDownloadFilename, SafeDownloadFilenameError>;
438
+ export declare const parseSafeDownloadFilename: typeof asSafeDownloadFilename;
435
439
  export declare function deriveUploadPolicy(actor: FileActor, intent: UploadIntent): Result<UploadPolicy, UploadPolicyError>;
436
440
  export declare function classifyKnownMimeType(mimeType: string | DeclaredMimeType | DetectedMimeType | undefined | null): Result<FileKind, MimeTypeClassificationError>;
437
441
  export declare function isMimeTypeAllowedForPolicy(mimeType: string | DeclaredMimeType | DetectedMimeType | undefined | null, policy: UploadPolicy): boolean;