@riverbankcms/sdk 0.70.0 → 0.70.2

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 (52) hide show
  1. package/dist/_dts/ai/src/contracts/commandExposure.d.ts +8 -0
  2. package/dist/_dts/ai/src/contracts/feedback.d.ts +55 -0
  3. package/dist/_dts/ai/src/contracts/proposals.d.ts +34764 -0
  4. package/dist/_dts/ai/src/contracts.d.ts +5 -0
  5. package/dist/_dts/ai/src/designer/rfc6902.d.ts +16 -0
  6. package/dist/_dts/ai/src/designer/themePatch.d.ts +50 -0
  7. package/dist/_dts/api/src/aiPlayground.d.ts +1 -1
  8. package/dist/_dts/api/src/appointmentSetup.d.ts +19 -0
  9. package/dist/_dts/api/src/availability.d.ts +84 -2
  10. package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +10 -1
  11. package/dist/_dts/api/src/contentRuntime.d.ts +1 -0
  12. package/dist/_dts/api/src/endpoints.d.ts +29 -0
  13. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +4 -0
  14. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +29 -1
  15. package/dist/_dts/api/src/types.d.ts +1 -1
  16. package/dist/_dts/billing/src/components/index.d.ts +41 -0
  17. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +219 -0
  18. package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +2 -1
  19. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -1
  20. package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +2 -1
  21. package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +3 -1
  22. package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +3 -1
  23. package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +1 -0
  24. package/dist/_dts/preview-next/src/client/preview/styleConfiguratorApplyPayload.d.ts +8 -0
  25. package/dist/_dts/preview-next/src/client/preview/styleConfiguratorSnapshot.d.ts +1 -0
  26. package/dist/_dts/sdk/src/cli/commands/style.d.ts +19 -0
  27. package/dist/_dts/sdk/src/client/management/index.d.ts +2 -1
  28. package/dist/_dts/sdk/src/client/management/theme.d.ts +3 -1
  29. package/dist/_dts/sdk/src/client/management/types.d.ts +23 -0
  30. package/dist/_dts/sdk/src/public-api/contracts.d.ts +1 -0
  31. package/dist/_dts/sdk/src/version.d.ts +1 -1
  32. package/dist/_dts/site-commands/src/commands.d.ts +25 -7
  33. package/dist/_dts/site-commands/src/metadata.d.ts +2 -2
  34. package/dist/cli/index.mjs +168 -10
  35. package/dist/client/client.mjs +56 -2
  36. package/dist/client/hooks.mjs +55 -1
  37. package/dist/client/rendering.mjs +55 -1
  38. package/dist/preview-next/before-render.mjs +39 -0
  39. package/dist/preview-next/client/runtime.mjs +152 -38
  40. package/dist/preview-next/middleware.mjs +39 -0
  41. package/dist/server/components.mjs +55 -1
  42. package/dist/server/config-validation.mjs +55 -1
  43. package/dist/server/config.mjs +55 -1
  44. package/dist/server/data.mjs +55 -1
  45. package/dist/server/index.mjs +40 -1
  46. package/dist/server/next.mjs +56 -2
  47. package/dist/server/prebuild.mjs +1 -1
  48. package/dist/server/rendering/server.mjs +55 -1
  49. package/dist/server/rendering.mjs +55 -1
  50. package/dist/server/routing.mjs +56 -2
  51. package/dist/server/server.mjs +56 -2
  52. package/package.json +1 -1
@@ -486,6 +486,190 @@ export type Database = {
486
486
  }
487
487
  ];
488
488
  };
489
+ appointment_availability_schedule_services: {
490
+ Row: {
491
+ created_at: string;
492
+ resource_id: string;
493
+ schedule_id: string;
494
+ service_id: string;
495
+ site_id: string;
496
+ };
497
+ Insert: {
498
+ created_at?: string;
499
+ resource_id: string;
500
+ schedule_id: string;
501
+ service_id: string;
502
+ site_id: string;
503
+ };
504
+ Update: {
505
+ created_at?: string;
506
+ resource_id?: string;
507
+ schedule_id?: string;
508
+ service_id?: string;
509
+ site_id?: string;
510
+ };
511
+ Relationships: [
512
+ {
513
+ foreignKeyName: "appointment_availability_schedule_services_schedule_fk";
514
+ columns: ["schedule_id", "site_id", "resource_id"];
515
+ isOneToOne: false;
516
+ referencedRelation: "appointment_availability_schedules";
517
+ referencedColumns: ["id", "site_id", "resource_id"];
518
+ },
519
+ {
520
+ foreignKeyName: "appointment_availability_schedule_services_service_fk";
521
+ columns: ["service_id", "site_id"];
522
+ isOneToOne: false;
523
+ referencedRelation: "appointment_services";
524
+ referencedColumns: ["id", "site_id"];
525
+ }
526
+ ];
527
+ };
528
+ appointment_availability_schedule_starts: {
529
+ Row: {
530
+ created_at: string;
531
+ display_order: number;
532
+ id: string;
533
+ resource_id: string;
534
+ schedule_id: string;
535
+ site_id: string;
536
+ start_time: string;
537
+ updated_at: string;
538
+ weekday: number;
539
+ };
540
+ Insert: {
541
+ created_at?: string;
542
+ display_order?: number;
543
+ id?: string;
544
+ resource_id: string;
545
+ schedule_id: string;
546
+ site_id: string;
547
+ start_time: string;
548
+ updated_at?: string;
549
+ weekday: number;
550
+ };
551
+ Update: {
552
+ created_at?: string;
553
+ display_order?: number;
554
+ id?: string;
555
+ resource_id?: string;
556
+ schedule_id?: string;
557
+ site_id?: string;
558
+ start_time?: string;
559
+ updated_at?: string;
560
+ weekday?: number;
561
+ };
562
+ Relationships: [
563
+ {
564
+ foreignKeyName: "appointment_availability_schedule_starts_schedule_fk";
565
+ columns: ["schedule_id", "site_id", "resource_id"];
566
+ isOneToOne: false;
567
+ referencedRelation: "appointment_availability_schedules";
568
+ referencedColumns: ["id", "site_id", "resource_id"];
569
+ }
570
+ ];
571
+ };
572
+ appointment_availability_schedule_windows: {
573
+ Row: {
574
+ created_at: string;
575
+ display_order: number;
576
+ end_time: string;
577
+ id: string;
578
+ resource_id: string;
579
+ schedule_id: string;
580
+ site_id: string;
581
+ start_time: string;
582
+ updated_at: string;
583
+ weekday: number;
584
+ };
585
+ Insert: {
586
+ created_at?: string;
587
+ display_order?: number;
588
+ end_time: string;
589
+ id?: string;
590
+ resource_id: string;
591
+ schedule_id: string;
592
+ site_id: string;
593
+ start_time: string;
594
+ updated_at?: string;
595
+ weekday: number;
596
+ };
597
+ Update: {
598
+ created_at?: string;
599
+ display_order?: number;
600
+ end_time?: string;
601
+ id?: string;
602
+ resource_id?: string;
603
+ schedule_id?: string;
604
+ site_id?: string;
605
+ start_time?: string;
606
+ updated_at?: string;
607
+ weekday?: number;
608
+ };
609
+ Relationships: [
610
+ {
611
+ foreignKeyName: "appointment_availability_schedule_windows_schedule_fk";
612
+ columns: ["schedule_id", "site_id", "resource_id"];
613
+ isOneToOne: false;
614
+ referencedRelation: "appointment_availability_schedules";
615
+ referencedColumns: ["id", "site_id", "resource_id"];
616
+ }
617
+ ];
618
+ };
619
+ appointment_availability_schedules: {
620
+ Row: {
621
+ created_at: string;
622
+ display_order: number;
623
+ id: string;
624
+ interval_minutes: number | null;
625
+ name: string;
626
+ resource_id: string;
627
+ role_kind: string;
628
+ site_id: string;
629
+ start_policy_kind: string;
630
+ updated_at: string;
631
+ };
632
+ Insert: {
633
+ created_at?: string;
634
+ display_order?: number;
635
+ id?: string;
636
+ interval_minutes?: number | null;
637
+ name?: string;
638
+ resource_id: string;
639
+ role_kind: string;
640
+ site_id: string;
641
+ start_policy_kind: string;
642
+ updated_at?: string;
643
+ };
644
+ Update: {
645
+ created_at?: string;
646
+ display_order?: number;
647
+ id?: string;
648
+ interval_minutes?: number | null;
649
+ name?: string;
650
+ resource_id?: string;
651
+ role_kind?: string;
652
+ site_id?: string;
653
+ start_policy_kind?: string;
654
+ updated_at?: string;
655
+ };
656
+ Relationships: [
657
+ {
658
+ foreignKeyName: "appointment_availability_schedules_resource_id_fkey";
659
+ columns: ["resource_id"];
660
+ isOneToOne: false;
661
+ referencedRelation: "staff_members";
662
+ referencedColumns: ["id"];
663
+ },
664
+ {
665
+ foreignKeyName: "appointment_availability_schedules_site_id_fkey";
666
+ columns: ["site_id"];
667
+ isOneToOne: false;
668
+ referencedRelation: "sites";
669
+ referencedColumns: ["id"];
670
+ }
671
+ ];
672
+ };
489
673
  appointment_blackouts: {
490
674
  Row: {
491
675
  created_at: string;
@@ -13140,6 +13324,7 @@ export type Database = {
13140
13324
  palette_overrides: Json | null;
13141
13325
  palette_variant_id: string | null;
13142
13326
  site_id: string;
13327
+ style_selection_version: number;
13143
13328
  theme_id: string;
13144
13329
  updated_at: string;
13145
13330
  user_id: string;
@@ -13155,6 +13340,7 @@ export type Database = {
13155
13340
  palette_overrides?: Json | null;
13156
13341
  palette_variant_id?: string | null;
13157
13342
  site_id: string;
13343
+ style_selection_version?: number;
13158
13344
  theme_id: string;
13159
13345
  updated_at?: string;
13160
13346
  user_id: string;
@@ -13170,6 +13356,7 @@ export type Database = {
13170
13356
  palette_overrides?: Json | null;
13171
13357
  palette_variant_id?: string | null;
13172
13358
  site_id?: string;
13359
+ style_selection_version?: number;
13173
13360
  theme_id?: string;
13174
13361
  updated_at?: string;
13175
13362
  user_id?: string;
@@ -14802,6 +14989,26 @@ export type Database = {
14802
14989
  };
14803
14990
  Returns: number;
14804
14991
  };
14992
+ apply_site_style_selection_atomic: {
14993
+ Args: {
14994
+ p_base_selection_version: number;
14995
+ p_button_personality_id: string | null;
14996
+ p_footer_look_id: string | null;
14997
+ p_header_look_id: string | null;
14998
+ p_palette_overrides: Json | null;
14999
+ p_palette_variant_id: string | null;
15000
+ p_selection_id?: string | null;
15001
+ p_site_id: string;
15002
+ p_theme: Json;
15003
+ };
15004
+ Returns: {
15005
+ outcome: string;
15006
+ selection_id: string | null;
15007
+ selection_updated_at: string | null;
15008
+ style_selection_version: number | null;
15009
+ theme_id: string | null;
15010
+ }[];
15011
+ };
14805
15012
  apply_customer_profile_rectification: {
14806
15013
  Args: {
14807
15014
  audit_actor_user_id: string;
@@ -15397,6 +15604,12 @@ export type Database = {
15397
15604
  };
15398
15605
  Returns: string;
15399
15606
  };
15607
+ ensure_default_appointment_availability_schedule: {
15608
+ Args: {
15609
+ p_resource_id: string;
15610
+ };
15611
+ Returns: string;
15612
+ };
15400
15613
  ensure_event_pricing_profile: {
15401
15614
  Args: {
15402
15615
  p_event_series_id: string;
@@ -15894,6 +16107,12 @@ export type Database = {
15894
16107
  };
15895
16108
  Returns: undefined;
15896
16109
  };
16110
+ sync_default_appointment_availability_schedule_windows: {
16111
+ Args: {
16112
+ p_resource_id: string;
16113
+ };
16114
+ Returns: undefined;
16115
+ };
15897
16116
  transactional_email_claim_jobs: {
15898
16117
  Args: {
15899
16118
  p_limit: number;
@@ -33,6 +33,7 @@ export type PreviewEditorSidebarProps = {
33
33
  theme?: Theme | null;
34
34
  themeId?: string | null;
35
35
  themeSelectionId?: string | null;
36
+ themeSelectionVersion?: number | null;
36
37
  themeSelectionUpdatedAt?: string | null;
37
38
  /** Persisted Style configurator selections (Phase C / E). */
38
39
  themeSelectionButtonPersonalityId?: ButtonPersonalityId | null;
@@ -64,4 +65,4 @@ export type PreviewEditorSidebarProps = {
64
65
  onViewportWidthChange: (width: ViewportWidth) => void;
65
66
  onZoomChange: (zoom: ZoomLevel) => void;
66
67
  };
67
- export declare function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl, pageId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, theme, themeId, themeSelectionId, themeSelectionUpdatedAt, themeSelectionButtonPersonalityId, themeSelectionPaletteVariantId, themeSelectionPaletteOverrides, themeSelectionHeaderLookId, themeSelectionFooterLookId, themeSelectionHeaderContext, themeSelectionFooterContext, designRowRequest, apiClient, bearerToken, supabaseUrl, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, siteStyleAccess, activeTab, onTabChange, onClose, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange, }: PreviewEditorSidebarProps): import("react/jsx-runtime").JSX.Element;
68
+ export declare function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl, pageId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, theme, themeId, themeSelectionId, themeSelectionVersion, themeSelectionUpdatedAt, themeSelectionButtonPersonalityId, themeSelectionPaletteVariantId, themeSelectionPaletteOverrides, themeSelectionHeaderLookId, themeSelectionFooterLookId, themeSelectionHeaderContext, themeSelectionFooterContext, designRowRequest, apiClient, bearerToken, supabaseUrl, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, siteStyleAccess, activeTab, onTabChange, onClose, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange, }: PreviewEditorSidebarProps): import("react/jsx-runtime").JSX.Element;
@@ -34,6 +34,7 @@ export type PreviewShellProps = {
34
34
  theme: Theme;
35
35
  themeId?: string | null;
36
36
  themeSelectionId?: string | null;
37
+ themeSelectionVersion?: number | null;
37
38
  themeSelectionUpdatedAt?: string | null;
38
39
  /**
39
40
  * Persisted Style configurator selections. Forwarded into StyleConfigurator
@@ -68,7 +69,7 @@ export type PreviewShellProps = {
68
69
  designEditorEligibility?: PreviewDesignEditorEligibility;
69
70
  baseFetch?: BaseFetch;
70
71
  };
71
- export declare function PreviewShell({ children, apiBaseUrl, blockApiConfig, siteId, siteSlug, editableId, previewSession, previewToken, dashboardBaseUrl, surfaceId, theme, themeId, themeSelectionId, themeSelectionUpdatedAt, themeSelectionButtonPersonalityId, themeSelectionPaletteVariantId, themeSelectionPaletteOverrides, themeSelectionHeaderLookId, themeSelectionFooterLookId, themeSelectionHeaderContext, themeSelectionFooterContext, pageId, routeId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, initialStatus, initialBlocks, pageMetadata, isSiteLaunched, maintenanceModeEnabled, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, supabaseUrl, useThemeScope, designEditorEligibility, baseFetch, }: PreviewShellProps): import("react/jsx-runtime").JSX.Element;
72
+ export declare function PreviewShell({ children, apiBaseUrl, blockApiConfig, siteId, siteSlug, editableId, previewSession, previewToken, dashboardBaseUrl, surfaceId, theme, themeId, themeSelectionId, themeSelectionVersion, themeSelectionUpdatedAt, themeSelectionButtonPersonalityId, themeSelectionPaletteVariantId, themeSelectionPaletteOverrides, themeSelectionHeaderLookId, themeSelectionFooterLookId, themeSelectionHeaderContext, themeSelectionFooterContext, pageId, routeId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, initialStatus, initialBlocks, pageMetadata, isSiteLaunched, maintenanceModeEnabled, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, supabaseUrl, useThemeScope, designEditorEligibility, baseFetch, }: PreviewShellProps): import("react/jsx-runtime").JSX.Element;
72
73
  export declare function defaultDesignEditorEligibility(input: Readonly<{
73
74
  pageId: string | null;
74
75
  entryData?: PreviewContentEntryData | null;
@@ -25,6 +25,7 @@ export type PreviewShellLayoutProps = {
25
25
  bearerToken?: string | null;
26
26
  themeId?: string | null;
27
27
  themeSelectionId?: string | null;
28
+ themeSelectionVersion?: number | null;
28
29
  themeSelectionUpdatedAt?: string | null;
29
30
  themeSelectionButtonPersonalityId?: ButtonPersonalityId | null;
30
31
  themeSelectionPaletteVariantId?: PaletteVariantId | null;
@@ -43,4 +44,4 @@ export type PreviewShellLayoutProps = {
43
44
  useThemeScope?: boolean;
44
45
  siteStyleAccess?: SiteStyleAccess;
45
46
  };
46
- export declare function PreviewShellLayout({ children, theme, surfaceId, siteId, dashboardBaseUrl, pageId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, apiClient, bearerToken, themeId, themeSelectionId, themeSelectionUpdatedAt, themeSelectionButtonPersonalityId, themeSelectionPaletteVariantId, themeSelectionPaletteOverrides, themeSelectionHeaderLookId, themeSelectionFooterLookId, themeSelectionHeaderContext, themeSelectionFooterContext, supabaseUrl, isSiteLaunched, maintenanceModeEnabled, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, useThemeScope, siteStyleAccess, }: PreviewShellLayoutProps): import("react/jsx-runtime").JSX.Element;
47
+ export declare function PreviewShellLayout({ children, theme, surfaceId, siteId, dashboardBaseUrl, pageId, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, apiClient, bearerToken, themeId, themeSelectionId, themeSelectionVersion, themeSelectionUpdatedAt, themeSelectionButtonPersonalityId, themeSelectionPaletteVariantId, themeSelectionPaletteOverrides, themeSelectionHeaderLookId, themeSelectionFooterLookId, themeSelectionHeaderContext, themeSelectionFooterContext, supabaseUrl, isSiteLaunched, maintenanceModeEnabled, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, useThemeScope, siteStyleAccess, }: PreviewShellLayoutProps): import("react/jsx-runtime").JSX.Element;
@@ -31,8 +31,10 @@ export type SiteChromeCustomizeProviderProps = Readonly<{
31
31
  theme?: Theme | null;
32
32
  themeId?: string | null;
33
33
  selectionId?: string | null;
34
+ selectionVersion?: number | null;
34
35
  selectionUpdatedAt?: string | null;
35
36
  initialSelections: Readonly<{
37
+ selectionVersion?: number | null;
36
38
  selectionUpdatedAt?: string | null;
37
39
  buttonPersonalityId: ButtonPersonalityId | null;
38
40
  paletteVariantId: PaletteVariantId | null;
@@ -44,6 +46,6 @@ export type SiteChromeCustomizeProviderProps = Readonly<{
44
46
  footerSelectionContext?: Partial<FooterSelectionContext>;
45
47
  siteStyleAccess?: SiteStyleAccess;
46
48
  }>;
47
- export declare function SiteChromeCustomizeProvider({ children, siteId, apiClient, theme, themeId, selectionId, selectionUpdatedAt, initialSelections, headerSelectionContext, footerSelectionContext, siteStyleAccess, }: SiteChromeCustomizeProviderProps): import("react/jsx-runtime").JSX.Element;
49
+ export declare function SiteChromeCustomizeProvider({ children, siteId, apiClient, theme, themeId, selectionId, selectionVersion, selectionUpdatedAt, initialSelections, headerSelectionContext, footerSelectionContext, siteStyleAccess, }: SiteChromeCustomizeProviderProps): import("react/jsx-runtime").JSX.Element;
48
50
  export declare function useSiteChromeCustomizeOptional(): SiteChromeCustomizeContextValue | null;
49
51
  export {};
@@ -11,9 +11,11 @@ export type StyleConfiguratorProps = Readonly<{
11
11
  theme?: Theme | null;
12
12
  themeId?: string | null;
13
13
  selectionId?: string | null;
14
+ selectionVersion?: number | null;
14
15
  selectionUpdatedAt?: string | null;
15
16
  /** Server-persisted design selections. */
16
17
  initialSelections: Readonly<{
18
+ selectionVersion?: number | null;
17
19
  selectionUpdatedAt?: string | null;
18
20
  buttonPersonalityId: ButtonPersonalityId | null;
19
21
  paletteVariantId: PaletteVariantId | null;
@@ -30,4 +32,4 @@ export type StyleConfiguratorProps = Readonly<{
30
32
  }> | null;
31
33
  siteStyleAccess: VisibleSiteStyleAccess;
32
34
  }>;
33
- export declare function StyleConfigurator({ siteId, apiClient, theme, themeId, selectionId, selectionUpdatedAt, initialSelections, headerSelectionContext, footerSelectionContext, expandedRowRequest, siteStyleAccess, }: StyleConfiguratorProps): import("react/jsx-runtime").JSX.Element;
35
+ export declare function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVersion, selectionUpdatedAt, initialSelections, headerSelectionContext, footerSelectionContext, expandedRowRequest, siteStyleAccess, }: StyleConfiguratorProps): import("react/jsx-runtime").JSX.Element;
@@ -38,6 +38,7 @@ export type StyleConfiguratorNotice = Readonly<{
38
38
  }>;
39
39
  export type SelectionSnapshot = Readonly<{
40
40
  siteStyleId: SiteStyleId;
41
+ selectionVersion: number;
41
42
  selectionUpdatedAt?: string | null;
42
43
  headerLookId: HeaderLookId | null;
43
44
  footerLookId: FooterLookId | null;
@@ -0,0 +1,8 @@
1
+ import type { APIEndpoints } from '../../../../api/src/index';
2
+ import type { SelectionSnapshot } from './StyleConfigurator.state';
3
+ export type ApplySiteStyleSelectionBody = NonNullable<APIEndpoints['applySiteStyleSelection']['body']>;
4
+ export declare function buildApplySiteStyleSelectionBody(input: Readonly<{
5
+ base: SelectionSnapshot;
6
+ previewed: SelectionSnapshot;
7
+ selectionId?: string | null;
8
+ }>): ApplySiteStyleSelectionBody;
@@ -6,6 +6,7 @@ import type { SelectionSnapshot } from './StyleConfigurator.state';
6
6
  export declare function resolveStyleConfiguratorInitialSnapshot(input: Readonly<{
7
7
  theme?: Theme | null;
8
8
  initialSelections: Readonly<{
9
+ selectionVersion?: number | null;
9
10
  selectionUpdatedAt?: string | null;
10
11
  buttonPersonalityId: ButtonPersonalityId | null;
11
12
  paletteVariantId: PaletteVariantId | null;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Style Command
3
+ *
4
+ * Apply bounded site-style selections via the command-backed theme API.
5
+ */
6
+ import { Command } from 'commander';
7
+ import type { ThemeStyleSelectionApplyInput } from '../../client/management';
8
+ export type StyleApplyOptions = Readonly<{
9
+ siteStyleId: string;
10
+ baseSelectionVersion: string;
11
+ selectionId?: string;
12
+ buttonPersonalityId?: string;
13
+ paletteVariantId?: string;
14
+ paletteOverrides?: string;
15
+ headerLookId?: string;
16
+ footerLookId?: string;
17
+ }>;
18
+ export declare function buildStyleSelectionApplyInputFromOptions(options: StyleApplyOptions): ThemeStyleSelectionApplyInput;
19
+ export declare const styleCommand: Command;
@@ -36,6 +36,7 @@ import { CourseSessionConflictError } from './courses';
36
36
  * @returns ManagementClient instance
37
37
  */
38
38
  export declare function createManagementClient(config: ManagementClientConfig): ManagementClient;
39
- export type { ManagementClient, ManagementClientConfig, ManagementEntry, ManagementPage, ManagementBlock, ManagementNavigationMenu, ManagementNavigationItem, ManagementSettings, ManagementForm, ManagementFormField, ManagementFormSchema, ManagementFormSettings, ManagementVenue, VenueAddress, VenueLocation, VenueUpsertInput, ManagementEventCategory, EventCategoryUpsertInput, ManagementEventSeries, EventSchedule, EventPricing, EventContent, EventSeriesUpsertInput, ManagementCourseRun, CourseRunUpsertInput, CourseSession, CourseProgramContent, CourseSessionConflict, EntryUpsertInput, PageUpsertInput, BlockUpsertInput, NavigationMenuUpsertInput, NavigationItemInput, FormUpsertInput, ThemeUpsertInput, ThemeUpsertResult, FooterContent, ManagementFooterContent, FooterContentUpsertInput, FooterOperations, PulledFooter, PulledEntries, PulledPages, PulledNavigation, PulledSettings, PulledForms, PulledTheme, PulledVenues, PulledEventCategories, PulledEvents, PulledCourses, PulledSiteInfo, PulledContentType, PulledContentTypes, PulledContent, PaginationOptions, PaginatedResult, EntryOperations, PageOperations, BlockOperations, NavigationOperations, SettingsOperations, SettingsUpdateInput, FormOperations, ThemeOperations, VenueOperations, EventCategoryOperations, EventOperations, CourseOperations, PullOperations, IdentifiersOperations, BackfillResult, BackfillPageResult, BackfillBlockResult, BackfillEntryResult, MediaOperations, MediaUploadResult, } from './types';
39
+ export type { ManagementClient, ManagementClientConfig, ManagementEntry, ManagementPage, ManagementBlock, ManagementNavigationMenu, ManagementNavigationItem, ManagementSettings, ManagementForm, ManagementFormField, ManagementFormSchema, ManagementFormSettings, ManagementVenue, VenueAddress, VenueLocation, VenueUpsertInput, ManagementEventCategory, EventCategoryUpsertInput, ManagementEventSeries, EventSchedule, EventPricing, EventContent, EventSeriesUpsertInput, ManagementCourseRun, CourseRunUpsertInput, CourseSession, CourseProgramContent, CourseSessionConflict, EntryUpsertInput, PageUpsertInput, BlockUpsertInput, NavigationMenuUpsertInput, NavigationItemInput, FormUpsertInput, SiteStyleSelectionApplyCommand, SiteStyleSelectionApplyCommandInput, ThemeUpsertInput, ThemeUpsertResult, ThemeStyleSelectionApplyInput, ThemeStyleSelectionApplyResult, FooterContent, ManagementFooterContent, FooterContentUpsertInput, FooterOperations, PulledFooter, PulledEntries, PulledPages, PulledNavigation, PulledSettings, PulledForms, PulledTheme, PulledVenues, PulledEventCategories, PulledEvents, PulledCourses, PulledSiteInfo, PulledContentType, PulledContentTypes, PulledContent, PaginationOptions, PaginatedResult, EntryOperations, PageOperations, BlockOperations, NavigationOperations, SettingsOperations, SettingsUpdateInput, FormOperations, ThemeOperations, VenueOperations, EventCategoryOperations, EventOperations, CourseOperations, PullOperations, IdentifiersOperations, BackfillResult, BackfillPageResult, BackfillBlockResult, BackfillEntryResult, MediaOperations, MediaUploadResult, } from './types';
40
40
  export { ManagementApiError, type ManagementApiErrorRequest } from './http';
41
+ export { applySiteStyleSelectionBodyFromCommand, buildApplySiteStyleSelectionCommand, } from './theme';
41
42
  export { CourseSessionConflictError };
@@ -2,5 +2,7 @@
2
2
  * Theme Operations for Management Client
3
3
  */
4
4
  import type { HttpClient } from './http';
5
- import type { ThemeOperations } from './types';
5
+ import type { SiteStyleSelectionApplyCommand, ThemeOperations, ThemeStyleSelectionApplyInput } from './types';
6
+ export declare function buildApplySiteStyleSelectionCommand(input: ThemeStyleSelectionApplyInput): SiteStyleSelectionApplyCommand;
7
+ export declare function applySiteStyleSelectionBodyFromCommand(command: SiteStyleSelectionApplyCommand, selectionId?: string | null): ThemeStyleSelectionApplyInput;
6
8
  export declare function createThemeOperations(http: HttpClient): ThemeOperations;
@@ -4,6 +4,7 @@
4
4
  * Type definitions for the SDK management client used for write operations.
5
5
  */
6
6
  import type { LinkPayload, NavigationLinkInput } from '../../public-api/contracts';
7
+ import type { SiteCommandOf } from '../../../../site-commands/src/index';
7
8
  import type { Theme } from '../../contracts';
8
9
  export interface ManagementClientConfig {
9
10
  /**
@@ -465,6 +466,27 @@ export interface ThemeUpsertResult {
465
466
  selectionId: string;
466
467
  savedAt: string;
467
468
  }
469
+ export type SiteStyleSelectionApplyCommand = SiteCommandOf<'applySiteStyleSelection'>;
470
+ export type SiteStyleSelectionApplyCommandInput = SiteStyleSelectionApplyCommand['input'];
471
+ export interface ThemeStyleSelectionApplyInput extends SiteStyleSelectionApplyCommandInput {
472
+ baseSelectionVersion: number;
473
+ selectionId?: string | null;
474
+ }
475
+ export interface ThemeStyleSelectionApplyResult {
476
+ success: boolean;
477
+ themeId: string;
478
+ selectionId: string;
479
+ selectionVersion: number;
480
+ selectionUpdatedAt: string | null;
481
+ savedAt: string;
482
+ theme: Theme;
483
+ siteStyleId: string;
484
+ buttonPersonalityId: string;
485
+ paletteVariantId: string;
486
+ paletteOverrides: Record<string, string> | null;
487
+ headerLookId: string;
488
+ footerLookId: string;
489
+ }
468
490
  /**
469
491
  * Footer content for SDK management operations.
470
492
  * Matches the structure stored in site_settings.footer_content_json (bottomText only).
@@ -788,6 +810,7 @@ export interface FormOperations {
788
810
  }
789
811
  export interface ThemeOperations {
790
812
  upsert(input: ThemeUpsertInput): Promise<ThemeUpsertResult>;
813
+ applySelection(input: ThemeStyleSelectionApplyInput): Promise<ThemeStyleSelectionApplyResult>;
791
814
  }
792
815
  export interface FooterOperations {
793
816
  /** Get footer content */
@@ -297,6 +297,7 @@ export type SiteResponse = {
297
297
  theme: Theme;
298
298
  themeId?: string | null;
299
299
  selectionId?: string | null;
300
+ selectionVersion?: number | null;
300
301
  selectionUpdatedAt?: string | null;
301
302
  /**
302
303
  * Persisted design selections. Optional so legacy
@@ -8,4 +8,4 @@
8
8
  * 1. This constant
9
9
  * 2. The "version" field in package.json
10
10
  */
11
- export declare const SDK_VERSION = "0.70.0";
11
+ export declare const SDK_VERSION = "0.70.2";
@@ -35,11 +35,17 @@ export declare const configureSiteIdentityCommandSchema: z.ZodObject<{
35
35
  }>>;
36
36
  }, z.core.$strict>;
37
37
  }, z.core.$strict>;
38
- export declare const applySiteStyleCommandSchema: z.ZodObject<{
39
- type: z.ZodLiteral<"applySiteStyle">;
38
+ export declare const applySiteStyleSelectionCommandSchema: z.ZodObject<{
39
+ type: z.ZodLiteral<"applySiteStyleSelection">;
40
40
  ref: z.ZodPipe<z.ZodString, z.ZodTransform<SiteStyleRef, string>>;
41
41
  input: z.ZodObject<{
42
- styleKey: z.ZodString;
42
+ siteStyleId: z.ZodPipe<z.ZodString, z.ZodTransform<SiteStyleRef, string>>;
43
+ buttonPersonalityId: z.ZodNullable<z.ZodString>;
44
+ paletteVariantId: z.ZodNullable<z.ZodString>;
45
+ paletteOverrides: z.ZodNullable<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodString>>>;
46
+ headerLookId: z.ZodNullable<z.ZodString>;
47
+ footerLookId: z.ZodNullable<z.ZodString>;
48
+ baseSelectionVersion: z.ZodOptional<z.ZodNumber>;
43
49
  }, z.core.$strict>;
44
50
  }, z.core.$strict>;
45
51
  export declare const upsertMediaAssetCommandSchema: z.ZodObject<{
@@ -977,10 +983,16 @@ export declare const siteCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
977
983
  }, z.core.$strict>>;
978
984
  }, z.core.$strict>;
979
985
  }, z.core.$strict>, z.ZodObject<{
980
- type: z.ZodLiteral<"applySiteStyle">;
986
+ type: z.ZodLiteral<"applySiteStyleSelection">;
981
987
  ref: z.ZodPipe<z.ZodString, z.ZodTransform<SiteStyleRef, string>>;
982
988
  input: z.ZodObject<{
983
- styleKey: z.ZodString;
989
+ siteStyleId: z.ZodPipe<z.ZodString, z.ZodTransform<SiteStyleRef, string>>;
990
+ buttonPersonalityId: z.ZodNullable<z.ZodString>;
991
+ paletteVariantId: z.ZodNullable<z.ZodString>;
992
+ paletteOverrides: z.ZodNullable<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodString>>>;
993
+ headerLookId: z.ZodNullable<z.ZodString>;
994
+ footerLookId: z.ZodNullable<z.ZodString>;
995
+ baseSelectionVersion: z.ZodOptional<z.ZodNumber>;
984
996
  }, z.core.$strict>;
985
997
  }, z.core.$strict>, z.ZodObject<{
986
998
  type: z.ZodLiteral<"upsertMediaAsset">;
@@ -1799,10 +1811,16 @@ export declare const siteCommandBatchSchema: z.ZodObject<{
1799
1811
  }, z.core.$strict>>;
1800
1812
  }, z.core.$strict>;
1801
1813
  }, z.core.$strict>, z.ZodObject<{
1802
- type: z.ZodLiteral<"applySiteStyle">;
1814
+ type: z.ZodLiteral<"applySiteStyleSelection">;
1803
1815
  ref: z.ZodPipe<z.ZodString, z.ZodTransform<SiteStyleRef, string>>;
1804
1816
  input: z.ZodObject<{
1805
- styleKey: z.ZodString;
1817
+ siteStyleId: z.ZodPipe<z.ZodString, z.ZodTransform<SiteStyleRef, string>>;
1818
+ buttonPersonalityId: z.ZodNullable<z.ZodString>;
1819
+ paletteVariantId: z.ZodNullable<z.ZodString>;
1820
+ paletteOverrides: z.ZodNullable<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodString>>>;
1821
+ headerLookId: z.ZodNullable<z.ZodString>;
1822
+ footerLookId: z.ZodNullable<z.ZodString>;
1823
+ baseSelectionVersion: z.ZodOptional<z.ZodNumber>;
1806
1824
  }, z.core.$strict>;
1807
1825
  }, z.core.$strict>, z.ZodObject<{
1808
1826
  type: z.ZodLiteral<"upsertMediaAsset">;
@@ -28,7 +28,7 @@ export declare const siteCommandMetadata: {
28
28
  readonly capability: "bookings.settings.write";
29
29
  readonly support: "supported";
30
30
  };
31
- readonly applySiteStyle: {
31
+ readonly applySiteStyleSelection: {
32
32
  readonly scope: "style";
33
33
  readonly risk: "low";
34
34
  readonly writeSemantics: "upsert";
@@ -37,7 +37,7 @@ export declare const siteCommandMetadata: {
37
37
  readonly conflictPolicy: "update_existing";
38
38
  readonly previewability: "static_preview";
39
39
  readonly allowedRuntimes: readonly ["development", "staging", "demo", "production"];
40
- readonly intendedExposure: readonly ["recipe", "sdk_cli", "onboarding_planner", "internal_apply"];
40
+ readonly intendedExposure: readonly ["recipe", "sdk_cli", "onboarding_planner", "ai_proposal", "internal_apply"];
41
41
  readonly capability: "theme.write";
42
42
  readonly support: "supported";
43
43
  };