@riverbankcms/sdk 0.60.12 → 0.60.14

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 (91) hide show
  1. package/README.md +10 -7
  2. package/dist/_dts/api/src/bookingConfig.d.ts +31 -1
  3. package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +38 -1
  4. package/dist/_dts/api/src/bookingOperations.d.ts +3 -0
  5. package/dist/_dts/api/src/bookingRecords.d.ts +45 -0
  6. package/dist/_dts/api/src/bookingRefundOutcomes.d.ts +4 -4
  7. package/dist/_dts/api/src/commercePortalEndpoints.d.ts +1 -5
  8. package/dist/_dts/api/src/communications.d.ts +1 -1
  9. package/dist/_dts/api/src/contentRuntime.d.ts +1 -1
  10. package/dist/_dts/api/src/endpoints.d.ts +89 -9
  11. package/dist/_dts/api/src/index.d.ts +2 -1
  12. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +1 -0
  13. package/dist/_dts/api/src/seoEndpoints.d.ts +2 -0
  14. package/dist/_dts/api/src/siteAssets.d.ts +0 -10
  15. package/dist/_dts/api/src/types.d.ts +1 -1
  16. package/dist/_dts/blocks/src/PageRenderer.d.ts +1 -0
  17. package/dist/_dts/blocks/src/index.d.ts +1 -0
  18. package/dist/_dts/blocks/src/portal/types.d.ts +1 -1
  19. package/dist/_dts/blocks/src/server.d.ts +1 -0
  20. package/dist/_dts/blocks/src/subroutes/fold.d.ts +40 -0
  21. package/dist/_dts/blocks/src/subroutes/formatDate.d.ts +12 -0
  22. package/dist/_dts/blocks/src/subroutes/index.d.ts +3 -0
  23. package/dist/_dts/blocks/src/subroutes/kinds.d.ts +32 -0
  24. package/dist/_dts/blocks/src/system/fields/boxStyles.d.ts +3 -1
  25. package/dist/_dts/blocks/src/system/helpers/resolveBackground.d.ts +2 -0
  26. package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/types.d.ts +1 -0
  27. package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.interactive.d.ts +1 -0
  28. package/dist/_dts/blocks/src/system/spacing.d.ts +2 -1
  29. package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +5 -0
  30. package/dist/_dts/blocks/src/system/transforms/typed.d.ts +5 -1
  31. package/dist/_dts/core/src/booking-refunds.d.ts +8 -0
  32. package/dist/_dts/core/src/participant-identity.d.ts +1 -73
  33. package/dist/_dts/core/src/participants.d.ts +19 -7
  34. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +188 -36
  35. package/dist/_dts/preview-next/src/client/preview/EntryEditorPanel.d.ts +3 -3
  36. package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +3 -3
  37. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +3 -3
  38. package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +3 -3
  39. package/dist/_dts/preview-next/src/client/preview/SubrouteNoticePanel.d.ts +13 -0
  40. package/dist/_dts/preview-next/src/client/preview/subrouteNotice.d.ts +26 -0
  41. package/dist/_dts/sdk/src/contracts/page.d.ts +1 -0
  42. package/dist/_dts/sdk/src/public-api/contracts.d.ts +1 -0
  43. package/dist/_dts/sdk/src/rendering/islands/types.d.ts +1 -0
  44. package/dist/_dts/sdk/src/routing/resolvePageContent.d.ts +4 -5
  45. package/dist/_dts/sdk/src/version.d.ts +1 -1
  46. package/dist/_dts/theme-core/src/buttons/personalities/index.d.ts +11 -0
  47. package/dist/_dts/theme-core/src/buttons/personalities/showtime-pill.d.ts +17 -0
  48. package/dist/_dts/theme-core/src/buttons/types.d.ts +1 -1
  49. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  50. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +66 -30
  51. package/dist/_dts/theme-core/src/palette/variants/brand-led.d.ts +16 -0
  52. package/dist/_dts/theme-core/src/palette/variants/index.d.ts +15 -0
  53. package/dist/_dts/theme-core/src/palette/variants/types.d.ts +3 -3
  54. package/dist/_dts/theme-core/src/schema.d.ts +174 -6
  55. package/dist/_dts/theme-core/src/site-styles/appearancePresets.d.ts +328 -15
  56. package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +54 -2
  57. package/dist/_dts/theme-core/src/site-styles/designState.d.ts +124 -0
  58. package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +4 -2
  59. package/dist/_dts/theme-core/src/site-styles/index.d.ts +1 -0
  60. package/dist/_dts/theme-core/src/site-styles/lookResolution.d.ts +21 -0
  61. package/dist/_dts/theme-core/src/site-styles/pageDesignEditorModel.d.ts +2 -1
  62. package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +1 -1
  63. package/dist/_dts/theme-core/src/site-styles/types.d.ts +135 -2
  64. package/dist/_dts/ui/src/badge.d.ts +1 -1
  65. package/dist/_dts/ui/src/button.d.ts +1 -1
  66. package/dist/cli/index.mjs +744 -176
  67. package/dist/client/bookings.mjs +115 -63
  68. package/dist/client/client.mjs +848 -227
  69. package/dist/client/hooks.mjs +737 -173
  70. package/dist/client/rendering/client.mjs +179 -100
  71. package/dist/client/rendering/islands.mjs +179 -99
  72. package/dist/client/rendering.mjs +847 -226
  73. package/dist/preview-next/before-render.mjs +103 -16
  74. package/dist/preview-next/client/runtime.mjs +1615 -319
  75. package/dist/preview-next/middleware.mjs +103 -16
  76. package/dist/server/components.mjs +838 -227
  77. package/dist/server/config-validation.mjs +737 -173
  78. package/dist/server/config.mjs +737 -173
  79. package/dist/server/data.mjs +737 -173
  80. package/dist/server/index.mjs +106 -79
  81. package/dist/server/next.mjs +841 -229
  82. package/dist/server/page-converter.mjs +589 -144
  83. package/dist/server/prebuild.mjs +1 -1
  84. package/dist/server/rendering/server.mjs +838 -227
  85. package/dist/server/rendering.mjs +838 -227
  86. package/dist/server/routing.mjs +771 -178
  87. package/dist/server/server.mjs +738 -174
  88. package/dist/server/theme-bridge.mjs +216 -39
  89. package/dist/server/theme.mjs +139 -37
  90. package/dist/styles/index.css +44 -2
  91. package/package.json +1 -1
@@ -662,6 +662,7 @@ export type PublicExperienceAPIEndpoints = {
662
662
  courseId: string;
663
663
  seriesId: string;
664
664
  runSlug: string;
665
+ runName: string | null;
665
666
  };
666
667
  } | null;
667
668
  }>;
@@ -7,7 +7,9 @@ import type { ApplySeoChangesRequest, ApplySeoChangesResponse, PerformanceOvervi
7
7
  export type SeoEndpointDefinitions = {
8
8
  getSeoOverview: APIEndpoint<never, SeoOverviewQuery, SeoOverviewResponse>;
9
9
  getSeoPages: APIEndpoint<never, SeoSearchPagesQuery, SeoSearchPagesResponse>;
10
+ exportSeoPagesCsv: APIEndpoint<never, SeoSearchPagesQuery, Blob>;
10
11
  getSeoQueries: APIEndpoint<never, SeoSearchQueriesQuery, SeoSearchQueriesResponse>;
12
+ exportSeoQueriesCsv: APIEndpoint<never, SeoSearchQueriesQuery, Blob>;
11
13
  getPerformanceOverview: APIEndpoint<never, PerformanceOverviewQuery, PerformanceOverviewResponse>;
12
14
  applySeoChanges: APIEndpoint<ApplySeoChangesRequest, never, ApplySeoChangesResponse>;
13
15
  };
@@ -102,13 +102,3 @@ export type ExportBackupRequest = {
102
102
  includeMedia?: boolean;
103
103
  includeAccess?: boolean;
104
104
  };
105
- export type ExportSeoCsvRequest = {
106
- preset?: "7d" | "28d" | "90d";
107
- start?: string;
108
- end?: string;
109
- page?: string;
110
- query?: string;
111
- device?: "desktop" | "mobile" | "tablet";
112
- country?: string;
113
- format?: "csv";
114
- };
@@ -64,7 +64,7 @@ type ComposeEndpointMaps<Maps extends readonly object[], Acc extends object = {}
64
64
  ...infer Tail extends readonly object[]
65
65
  ] ? [Extract<keyof Acc, keyof Head>] extends [never] ? ComposeEndpointMaps<Tail, Acc & Head> : never : Acc;
66
66
  type SiteMembersAPIEndpointName = "listSiteMembers" | "inviteSiteMember" | "updateSiteMemberRole" | "removeSiteMember" | "revokeSiteInvitation" | "transferSiteOwnership" | "acceptSiteInvitation";
67
- type SeoAPIEndpointName = "getSeoOverview" | "getSeoPages" | "getSeoQueries" | "getPerformanceOverview" | "applySeoChanges";
67
+ type SeoAPIEndpointName = "getSeoOverview" | "getSeoPages" | "exportSeoPagesCsv" | "getSeoQueries" | "exportSeoQueriesCsv" | "getPerformanceOverview" | "applySeoChanges";
68
68
  type RedirectsAPIEndpointName = "checkRedirect" | "listRedirectRules" | "createRedirectRule" | "deleteRedirectRule";
69
69
  type AvailabilityAPIEndpointName = "listAvailabilityRules" | "setWeeklyAvailability" | "listBlackouts" | "createBlackout" | "deleteBlackout" | "getAvailableSlots";
70
70
  type CalendarAPIEndpointName = "getCalendarStatus" | "updateCalendarPreferences" | "disconnectCalendar";
@@ -34,6 +34,7 @@ export type EntrySubrouteContextData = {
34
34
  courseId: string;
35
35
  seriesId: string;
36
36
  runSlug: string;
37
+ runName: string | null;
37
38
  };
38
39
  };
39
40
  type PageRendererDataContext = {
@@ -1,5 +1,6 @@
1
1
  export { default as PageRenderer } from "./PageRenderer";
2
2
  export type { BlockOverrideComponent, BlockOverrideProps, BlockOverrides, EntrySubrouteContextData, OccurrenceContextData, SdkConfigForRenderer, } from "./PageRenderer";
3
+ export * from "./subroutes";
3
4
  export * from "./primitives/content/components/Button";
4
5
  export * from "./structure/schema";
5
6
  export * from "@riverbankcms/theme-core/palette";
@@ -247,7 +247,7 @@ export interface BookingQuestionsTaskDetail {
247
247
  }
248
248
  export type AppointmentBookingQuestionsTaskDetail = BookingQuestionsTaskDetail;
249
249
  /**
250
- * Store credit summary data from /api/portal/credit
250
+ * Site credit summary data from /api/portal/credit
251
251
  */
252
252
  export interface PortalCreditSummary {
253
253
  currency: string;
@@ -1,3 +1,4 @@
1
1
  export { default as PageRenderer } from './PageRenderer';
2
2
  export type { BlockOverrideComponent, BlockOverrideProps, BlockOverrides, EntrySubrouteContextData, OccurrenceContextData, SdkConfigForRenderer, } from './PageRenderer';
3
+ export * from './subroutes';
3
4
  export { ThemeScope } from '@riverbankcms/theme-core/ThemeScope';
@@ -0,0 +1,40 @@
1
+ import type { EntrySubrouteContextData, OccurrenceContextData } from '../PageRenderer';
2
+ /**
3
+ * Every known subroute kind. Derived from {@link EntrySubrouteContextData} so
4
+ * adding a new variant there flows here automatically.
5
+ */
6
+ export type EntrySubrouteKind = EntrySubrouteContextData['kind'];
7
+ /**
8
+ * Inner payload shape for the `course-run` variant. Exposed because it's the
9
+ * only kind whose payload isn't already named (events use `OccurrenceContextData`).
10
+ */
11
+ export type CourseRunPayload = Extract<EntrySubrouteContextData, {
12
+ kind: 'course-run';
13
+ }>['run'];
14
+ /**
15
+ * Inner payload type for a given subroute kind.
16
+ *
17
+ * The conditional mapping centralises the `occurrence`/`run` field-name
18
+ * asymmetry so consumers can stay generic. When you extend
19
+ * {@link EntrySubrouteContextData} with a new variant, add a branch here and
20
+ * {@link foldSubroute} below — the type system will surface every other
21
+ * call site that needs updating.
22
+ */
23
+ export type SubroutePayload<K extends EntrySubrouteKind> = K extends 'event-occurrence' ? OccurrenceContextData : K extends 'course-run' ? CourseRunPayload : never;
24
+ /**
25
+ * Per-kind handler set. The `Record<EntrySubrouteKind, …>` shape forces every
26
+ * kind to have a handler — adding a new kind to {@link EntrySubrouteContextData}
27
+ * will fail to typecheck until every fold in the codebase is updated.
28
+ */
29
+ export type SubrouteFold<T> = {
30
+ [K in EntrySubrouteKind]: (payload: SubroutePayload<K>) => T;
31
+ };
32
+ /**
33
+ * Typeclass-style exhaustive dispatch over a subroute context.
34
+ *
35
+ * The single place that knows how to peel the discriminated union open and
36
+ * hand its inner payload to a kind-specific handler. Use this instead of
37
+ * inline `switch (ctx.kind)` so the dispatch stays consistent across
38
+ * consumers (notice, SEO, breadcrumbs, …).
39
+ */
40
+ export declare function foldSubroute<T>(ctx: EntrySubrouteContextData, fold: SubrouteFold<T>): T;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Format an ISO timestamp as a friendly date (e.g. "19 May 2026").
3
+ *
4
+ * Parses the date parts directly rather than going through `new Date(iso)` so
5
+ * the displayed day never drifts across timezones — the wall-clock date
6
+ * encoded in the ISO string is what gets shown.
7
+ *
8
+ * Rejects structurally invalid inputs (non-`YYYY-MM-DD` shape, out-of-range
9
+ * months/days) rather than silently normalising them into adjacent dates,
10
+ * since the helper is exported as shared subroute-display infrastructure.
11
+ */
12
+ export declare function formatOccurrenceDate(iso: string | null | undefined): string | null;
@@ -0,0 +1,3 @@
1
+ export { formatOccurrenceDate } from './formatDate';
2
+ export { foldSubroute, type CourseRunPayload, type EntrySubrouteKind, type SubrouteFold, type SubroutePayload, } from './fold';
3
+ export { SUBROUTE_KINDS, type SubrouteKindMeta, } from './kinds';
@@ -0,0 +1,32 @@
1
+ import type { EntrySubrouteKind, SubroutePayload } from './fold';
2
+ /**
3
+ * Per-kind domain metadata used to describe a subroute in a render-agnostic way.
4
+ *
5
+ * Notice copy, breadcrumb labels, SEO titles, dashboard "what am I looking at"
6
+ * badges — all read from this single source of truth so domain nouns,
7
+ * display-name formatting, and editor URLs don't drift across consumers.
8
+ */
9
+ export type SubrouteKindMeta<K extends EntrySubrouteKind> = {
10
+ kind: K;
11
+ /** The parent thing — "event", "course". */
12
+ containerNoun: string;
13
+ /** The instance thing — "date", "run", "session". */
14
+ instanceNoun: string;
15
+ /** Plural list noun the dashboard groups them under — "events list", "courses list". */
16
+ listLabel: string;
17
+ /** Human-friendly name for this instance, or null when none is available. */
18
+ formatInstanceName: (payload: SubroutePayload<K>) => string | null;
19
+ /** Dashboard sub-path (relative) for editing the instance. */
20
+ subEditorPath: (payload: SubroutePayload<K>) => string;
21
+ };
22
+ type SubrouteKindRegistry = {
23
+ [K in EntrySubrouteKind]: SubrouteKindMeta<K>;
24
+ };
25
+ /**
26
+ * The single source of truth for per-kind subroute metadata.
27
+ *
28
+ * Adding a new {@link EntrySubrouteKind} requires a new entry here; the
29
+ * `Record<EntrySubrouteKind, …>` shape will refuse to compile otherwise.
30
+ */
31
+ export declare const SUBROUTE_KINDS: SubrouteKindRegistry;
32
+ export {};
@@ -66,6 +66,7 @@ export type SectionStylesContent = {
66
66
  scale?: string | null;
67
67
  position?: string | null;
68
68
  opacity?: number | null;
69
+ motion?: 'static' | 'fixed-frame' | null;
69
70
  overlay?: {
70
71
  type?: 'none' | 'color' | 'gradient' | null;
71
72
  color?: string | null;
@@ -78,7 +79,7 @@ export type SectionStylesContent = {
78
79
  headingColor?: string | null;
79
80
  } | null;
80
81
  spacing?: string | null;
81
- minHeight?: 'none' | 'hero' | 'immersive' | null;
82
+ minHeight?: 'none' | 'banner' | 'hero' | 'immersive' | null;
82
83
  } | null;
83
84
  export type CardStylesContent = {
84
85
  background?: Record<string, unknown> | null;
@@ -90,6 +91,7 @@ export type CardStylesContent = {
90
91
  spacing?: string | null;
91
92
  raised?: boolean | null;
92
93
  rounded?: string | null;
94
+ treatment?: 'accent-quote' | null;
93
95
  } | null;
94
96
  export type ContainerStylesContent = {
95
97
  background?: Record<string, unknown> | null;
@@ -31,6 +31,8 @@ export type BackgroundInput = {
31
31
  scale?: string | null;
32
32
  /** Background opacity (0-1 decimal; legacy 1-100 percentages are still accepted) */
33
33
  opacity?: number | null;
34
+ /** Image scroll behavior for image-backed sections. */
35
+ motion?: "static" | "fixed-frame" | null;
34
36
  /** Whether background should overflow container bounds */
35
37
  overflow?: boolean | null;
36
38
  /** Overlay configuration for image/video media */
@@ -42,6 +42,7 @@ export type EntrySubrouteContext = {
42
42
  courseId: string;
43
43
  seriesId: string;
44
44
  runSlug: string;
45
+ runName: string | null;
45
46
  };
46
47
  } | {
47
48
  kind: 'event-occurrence';
@@ -13,6 +13,7 @@ export type CourseEntrySubrouteContext = Readonly<{
13
13
  courseId: string;
14
14
  seriesId: string;
15
15
  runSlug: string;
16
+ runName: string | null;
16
17
  }>;
17
18
  }> | Readonly<{
18
19
  kind: 'event-occurrence';
@@ -29,7 +29,7 @@ declare const SEMANTIC_SPACING_VALUES: readonly ["none", "compact", "cozy", "med
29
29
  * This type is derived from SEMANTIC_SPACING_VALUES to ensure compile-time safety.
30
30
  */
31
31
  export type SemanticSpacing = (typeof SEMANTIC_SPACING_VALUES)[number];
32
- declare const SECTION_MIN_HEIGHT_VALUES: readonly ["none", "hero", "immersive"];
32
+ declare const SECTION_MIN_HEIGHT_VALUES: readonly ["none", "banner", "hero", "immersive"];
33
33
  /**
34
34
  * Semantic section height values for sections that need stronger visual
35
35
  * presence than content-plus-padding alone, such as image heroes.
@@ -91,6 +91,7 @@ export declare const CONTAINER_SPACING_MAP: {
91
91
  };
92
92
  export declare const SECTION_MIN_HEIGHT_MAP: {
93
93
  readonly none: "";
94
+ readonly banner: "rb-section-min-h-banner";
94
95
  readonly hero: "rb-section-min-h-hero";
95
96
  readonly immersive: "rb-section-min-h-immersive";
96
97
  };
@@ -80,6 +80,11 @@ declare const footerBottomBarContainerClassSchema: z.ZodObject<{
80
80
  export declare const footerBottomBarContainerClassTransform: TransformDefinition<z.infer<typeof footerBottomBarContainerClassSchema>>;
81
81
  export declare const footerBottomBarStyleTransform: TransformDefinition;
82
82
  export declare const footerSplitNavSingleClassTransform: TransformDefinition;
83
+ declare const footerSplitMainClassSchema: z.ZodObject<{
84
+ base: z.ZodOptional<z.ZodString>;
85
+ reverseClass: z.ZodOptional<z.ZodString>;
86
+ }, z.core.$strip>;
87
+ export declare const footerSplitMainClassTransform: TransformDefinition<z.infer<typeof footerSplitMainClassSchema>>;
83
88
  declare const footerLogoClassSchema: z.ZodObject<{
84
89
  base: z.ZodOptional<z.ZodString>;
85
90
  }, z.core.$strip>;
@@ -36,6 +36,10 @@ export declare const transformDefinitions: {
36
36
  }>;
37
37
  readonly "layout.footerBottomBarStyle": TransformDefinition;
38
38
  readonly "layout.footerSplitNavSingleClass": TransformDefinition;
39
+ readonly "layout.footerSplitMainClass": TransformDefinition<{
40
+ base?: string | undefined;
41
+ reverseClass?: string | undefined;
42
+ }>;
39
43
  readonly "layout.footerLogoClass": TransformDefinition<{
40
44
  base?: string | undefined;
41
45
  }>;
@@ -106,7 +110,7 @@ export declare function bindProp(from: string, opts?: {
106
110
  readonly $bind: {
107
111
  readonly pick?: "value" | "context" | "collection" | undefined;
108
112
  readonly fallback?: {} | null | undefined;
109
- readonly transforms?: TransformStep<"string.uppercase" | "value.fallback" | "date.formatShort" | "layout.maxWidthClass" | "layout.headerRootClass" | "layout.footerRootClass" | "layout.headerRootStyle" | "layout.footerRootStyle" | "ui.headerNavLinkClass" | "ui.headingClassFromAlignment" | "ui.bodyClassFromAlignment" | "ui.stackAlignFromAlignment" | "ui.sectionStateTone" | "ui.heroContentWrapperClass" | "ui.heroCtaJustify" | "ui.heroStackJustifyFromVerticalAlignment" | "ui.heroGridClassFromVerticalAlignment" | "ui.conditionalClass" | "ui.twoColumnContainerClass" | "ui.twoColumnFlexBasis" | "media.fromUrl" | "content.interpolateRichTextTokens" | "boxStyles.semanticGap" | "boxStyles.semanticGapValue" | "layout.footerBottomBarClass" | "layout.footerBottomBarContainerClass" | "layout.footerBottomBarStyle" | "layout.footerSplitNavSingleClass" | "layout.footerLogoClass" | "layout.footerLogoMediaClass" | "layout.footerLogoTextVisible">[] | undefined;
113
+ readonly transforms?: TransformStep<"string.uppercase" | "value.fallback" | "date.formatShort" | "layout.maxWidthClass" | "layout.headerRootClass" | "layout.footerRootClass" | "layout.headerRootStyle" | "layout.footerRootStyle" | "ui.headerNavLinkClass" | "ui.headingClassFromAlignment" | "ui.bodyClassFromAlignment" | "ui.stackAlignFromAlignment" | "ui.sectionStateTone" | "ui.heroContentWrapperClass" | "ui.heroCtaJustify" | "ui.heroStackJustifyFromVerticalAlignment" | "ui.heroGridClassFromVerticalAlignment" | "ui.conditionalClass" | "ui.twoColumnContainerClass" | "ui.twoColumnFlexBasis" | "media.fromUrl" | "content.interpolateRichTextTokens" | "boxStyles.semanticGap" | "boxStyles.semanticGapValue" | "layout.footerBottomBarClass" | "layout.footerBottomBarContainerClass" | "layout.footerBottomBarStyle" | "layout.footerSplitNavSingleClass" | "layout.footerSplitMainClass" | "layout.footerLogoClass" | "layout.footerLogoMediaClass" | "layout.footerLogoTextVisible">[] | undefined;
110
114
  readonly from: string;
111
115
  };
112
116
  };
@@ -2,6 +2,7 @@ import type { BookingDepositRefundPolicy } from './booking-flexible-balance';
2
2
  export type BookingProtectedDepositPolicyState = 'not_applicable' | BookingDepositRefundPolicy;
3
3
  export declare function normalizeBookingProtectedDepositPolicyState(value: string | null | undefined): BookingProtectedDepositPolicyState;
4
4
  export type BookingRefundMode = 'refund_only' | 'refund_and_revoke';
5
+ export type BookingRequestedRefundMethod = 'original_payment' | 'site_credit';
5
6
  export type BookingProtectedDepositOverrideMode = 'respect_policy' | 'allow_protected_deposit_override';
6
7
  export type BookingRefundAmountRequest = Readonly<{
7
8
  kind: 'full_remaining';
@@ -12,13 +13,20 @@ export type BookingRefundAmountRequest = Readonly<{
12
13
  export type BookingRefundCommand = Readonly<{
13
14
  kind: 'refund_only';
14
15
  amount: BookingRefundAmountRequest;
16
+ requestedRefundMethod: BookingRequestedRefundMethod;
15
17
  protectedDepositOverride: BookingProtectedDepositOverrideMode;
16
18
  }> | Readonly<{
17
19
  kind: 'refund_and_revoke';
18
20
  amount: Readonly<{
19
21
  kind: 'full_remaining';
20
22
  }>;
23
+ requestedRefundMethod: BookingRequestedRefundMethod;
21
24
  protectedDepositOverride: BookingProtectedDepositOverrideMode;
22
25
  }>;
23
26
  export declare function shouldAllowProtectedDepositOverride(command: BookingRefundCommand): boolean;
24
27
  export declare function createBookingRefundAmountRequest(amountCents: number | null | undefined): BookingRefundAmountRequest;
28
+ export declare function createOriginalPaymentRefundCommand(options: Readonly<{
29
+ kind: BookingRefundMode;
30
+ amount?: BookingRefundAmountRequest;
31
+ protectedDepositOverride?: BookingProtectedDepositOverrideMode;
32
+ }>): BookingRefundCommand;
@@ -94,7 +94,7 @@ export type SingleSubjectParticipantMaterializationInput = Readonly<{
94
94
  existingParticipantIdByEmail: ParticipantId | null;
95
95
  participation: SingleSubjectParticipantParticipation;
96
96
  }> | Readonly<{
97
- kind: 'subjectless_participation';
97
+ kind: 'provisional_single_subject_participant';
98
98
  customerId: CustomerId;
99
99
  displayName: string | null;
100
100
  phone: string | null;
@@ -133,75 +133,3 @@ export type CleanupReadiness = Readonly<{
133
133
  blockers: readonly CleanupReadinessBlocker[];
134
134
  }>;
135
135
  export declare function planCleanupReadiness(evidence: CleanupEvidence): CleanupReadiness;
136
- export type ParticipantParticipationIdentityField = 'participant_id' | 'display_name' | 'email' | 'email_normalized' | 'phone' | 'identity_state' | 'event_attendee_guest_id';
137
- export type ParticipantParticipationIdentityFieldRole = 'canonical_link' | 'contextual_snapshot' | 'compatibility_projection' | 'materialization_state';
138
- export type ParticipantParticipationIdentityFieldContractAction = 'tighten_in_839' | 'retain_as_snapshot' | 'retain_as_projection' | 'review_for_later_contract_cleanup';
139
- export type ParticipantParticipationIdentityFieldClassification = Readonly<{
140
- field: ParticipantParticipationIdentityField;
141
- role: ParticipantParticipationIdentityFieldRole;
142
- canonicalSource: string;
143
- contractAction: ParticipantParticipationIdentityFieldContractAction;
144
- notes: string;
145
- }>;
146
- export declare const PARTICIPANT_PARTICIPATION_IDENTITY_FIELD_CLASSIFICATIONS: readonly [Readonly<{
147
- field: ParticipantParticipationIdentityField;
148
- role: ParticipantParticipationIdentityFieldRole;
149
- canonicalSource: string;
150
- contractAction: ParticipantParticipationIdentityFieldContractAction;
151
- notes: string;
152
- }>, Readonly<{
153
- field: ParticipantParticipationIdentityField;
154
- role: ParticipantParticipationIdentityFieldRole;
155
- canonicalSource: string;
156
- contractAction: ParticipantParticipationIdentityFieldContractAction;
157
- notes: string;
158
- }>, Readonly<{
159
- field: ParticipantParticipationIdentityField;
160
- role: ParticipantParticipationIdentityFieldRole;
161
- canonicalSource: string;
162
- contractAction: ParticipantParticipationIdentityFieldContractAction;
163
- notes: string;
164
- }>, Readonly<{
165
- field: ParticipantParticipationIdentityField;
166
- role: ParticipantParticipationIdentityFieldRole;
167
- canonicalSource: string;
168
- contractAction: ParticipantParticipationIdentityFieldContractAction;
169
- notes: string;
170
- }>, Readonly<{
171
- field: ParticipantParticipationIdentityField;
172
- role: ParticipantParticipationIdentityFieldRole;
173
- canonicalSource: string;
174
- contractAction: ParticipantParticipationIdentityFieldContractAction;
175
- notes: string;
176
- }>, Readonly<{
177
- field: ParticipantParticipationIdentityField;
178
- role: ParticipantParticipationIdentityFieldRole;
179
- canonicalSource: string;
180
- contractAction: ParticipantParticipationIdentityFieldContractAction;
181
- notes: string;
182
- }>, Readonly<{
183
- field: ParticipantParticipationIdentityField;
184
- role: ParticipantParticipationIdentityFieldRole;
185
- canonicalSource: string;
186
- contractAction: ParticipantParticipationIdentityFieldContractAction;
187
- notes: string;
188
- }>];
189
- export declare function getParticipantParticipationIdentityFieldClassification(field: ParticipantParticipationIdentityField): ParticipantParticipationIdentityFieldClassification;
190
- export type ParticipantIdentityContractReadinessEvidence = Readonly<{
191
- subjectlessParticipationCount: number;
192
- unresolvedHealthRowCount: number;
193
- legacyCustomerEmailCallSiteCount: number;
194
- unclassifiedParticipationIdentityReferenceCount: number;
195
- contractCandidateCount: number;
196
- }>;
197
- export type ParticipantIdentityContractReadinessBlocker = 'subjectless_participations_remaining' | 'unresolved_health_rows_remaining' | 'legacy_customer_email_call_sites_remaining' | 'unclassified_participation_identity_references_remaining';
198
- export type ParticipantIdentityContractReadiness = Readonly<{
199
- version: 1;
200
- status: 'ready' | 'blocked';
201
- blockers: readonly ParticipantIdentityContractReadinessBlocker[];
202
- evidence: ParticipantIdentityContractReadinessEvidence;
203
- }>;
204
- export declare function countParticipantIdentityContractCandidateFields(classifications?: readonly ParticipantParticipationIdentityFieldClassification[]): number;
205
- export declare function planParticipantIdentityContractReadiness(input: Readonly<{
206
- evidence: ParticipantIdentityContractReadinessEvidence;
207
- }>): ParticipantIdentityContractReadiness;
@@ -120,6 +120,10 @@ export type ParticipantRosterSlot = Readonly<{
120
120
  identityState: ParticipantIdentityState;
121
121
  participation: ParticipantParticipation;
122
122
  }>;
123
+ export type ParticipantParticipationLinkSlot<TParticipation extends ParticipantParticipation = ParticipantParticipation> = Readonly<{
124
+ slotKey: ParticipantSlotKey;
125
+ participation: TParticipation;
126
+ }>;
123
127
  export type ParticipantRosterReconciliationIssue = {
124
128
  kind: 'participant_count_below_ticket_count';
125
129
  expectedCount: number;
@@ -192,7 +196,9 @@ export type CourseEnrollmentParticipantProjectionInput = Readonly<{
192
196
  export type CourseSessionAttendanceParticipantProjectionInput = Readonly<{
193
197
  attendeeId: AttendeeId;
194
198
  enrollmentId: EnrollmentId;
195
- enrollmentSlot: ParticipantRosterSlot;
199
+ enrollmentSlot: ParticipantParticipationLinkSlot<Extract<ParticipantParticipation, {
200
+ kind: 'course_enrollment';
201
+ }>>;
196
202
  }>;
197
203
  export type SingleSubjectParticipantRosterTarget = Readonly<{
198
204
  kind: 'appointment';
@@ -215,20 +221,26 @@ export type SingleSubjectParticipantPersistenceIntent = Readonly<{
215
221
  phone: string | null;
216
222
  participation: SingleSubjectParticipantParticipation;
217
223
  }> | Readonly<{
218
- kind: 'subjectless_participation';
224
+ kind: 'provisional_single_subject_participant';
219
225
  customerId: CustomerId;
220
226
  displayName: string | null;
221
227
  phone: string | null;
222
228
  participation: SingleSubjectParticipantParticipation;
223
229
  }>;
224
- type SingleSubjectParticipantRosterSlot = Omit<ParticipantRosterSlot, 'participation'> & Readonly<{
225
- participation: SingleSubjectParticipantParticipation;
230
+ type SingleSubjectParticipantRosterSlot<TParticipation extends SingleSubjectParticipantParticipation = SingleSubjectParticipantParticipation> = Omit<ParticipantRosterSlot, 'participation'> & Readonly<{
231
+ participation: TParticipation;
226
232
  }>;
227
- export declare function projectAppointmentParticipantSlot(input: AppointmentParticipantProjectionInput): SingleSubjectParticipantRosterSlot;
228
- export declare function projectCourseEnrollmentParticipantSlot(input: CourseEnrollmentParticipantProjectionInput): SingleSubjectParticipantRosterSlot;
233
+ export declare function projectAppointmentParticipantSlot(input: AppointmentParticipantProjectionInput): SingleSubjectParticipantRosterSlot<Extract<SingleSubjectParticipantParticipation, {
234
+ kind: 'appointment';
235
+ }>>;
236
+ export declare function projectCourseEnrollmentParticipantSlot(input: CourseEnrollmentParticipantProjectionInput): SingleSubjectParticipantRosterSlot<Extract<SingleSubjectParticipantParticipation, {
237
+ kind: 'course_enrollment';
238
+ }>>;
229
239
  export declare function projectSingleSubjectParticipantRoster(input: SingleSubjectParticipantRosterProjectionInput): ParticipantRosterProjection;
230
240
  export declare function buildSingleSubjectParticipantPersistenceIntent(input: SingleSubjectParticipantRosterProjectionInput): SingleSubjectParticipantPersistenceIntent;
231
- export declare function projectCourseSessionAttendanceParticipantSlot(input: CourseSessionAttendanceParticipantProjectionInput): ParticipantRosterSlot;
241
+ export declare function projectCourseSessionAttendanceParticipantSlot(input: CourseSessionAttendanceParticipantProjectionInput): ParticipantParticipationLinkSlot<Extract<ParticipantParticipation, {
242
+ kind: 'course_session_attendance';
243
+ }>>;
232
244
  export declare function projectEventRegistrationParticipantRoster(input: EventRegistrationParticipantProjectionInput): ParticipantRosterProjection;
233
245
  export declare function reconcileParticipantRoster(input: {
234
246
  expectedCount: ParticipantCount;