@riverbankcms/sdk 0.60.9 → 0.60.12

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 (45) hide show
  1. package/dist/_dts/api/src/accessAdmin.d.ts +102 -0
  2. package/dist/_dts/api/src/common/envelope.d.ts +1 -1
  3. package/dist/_dts/api/src/domains.d.ts +14 -13
  4. package/dist/_dts/api/src/endpoints.d.ts +32 -0
  5. package/dist/_dts/api/src/index.d.ts +4 -3
  6. package/dist/_dts/api/src/navigation/linkValue.d.ts +15 -2
  7. package/dist/_dts/api/src/navigation.d.ts +2 -0
  8. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +15 -1
  9. package/dist/_dts/blocks/src/index.d.ts +1 -1
  10. package/dist/_dts/blocks/src/system/node/fragments/ctaButton.d.ts +2 -2
  11. package/dist/_dts/blocks/src/system/runtime/nodes/basic.d.ts +2 -1
  12. package/dist/_dts/blocks/src/system/types/link.d.ts +7 -1
  13. package/dist/_dts/core/src/participant-identity.d.ts +72 -0
  14. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +96 -60
  15. package/dist/_dts/db/src/schemas/forms.d.ts +135 -24
  16. package/dist/_dts/sdk/src/contracts/content.d.ts +7 -1
  17. package/dist/_dts/sdk/src/public-api/contracts.d.ts +1 -1
  18. package/dist/_dts/sdk/src/version.d.ts +1 -1
  19. package/dist/_dts/theme-core/src/buttons/classNames.d.ts +21 -0
  20. package/dist/_dts/theme-core/src/buttons/index.d.ts +1 -0
  21. package/dist/_dts/theme-core/src/buttons/types.d.ts +1 -0
  22. package/dist/cli/index.mjs +188 -9
  23. package/dist/client/bookings.mjs +808 -149
  24. package/dist/client/client.mjs +553 -130
  25. package/dist/client/hooks.mjs +119 -0
  26. package/dist/client/rendering/client.mjs +412 -113
  27. package/dist/client/rendering/islands.mjs +4605 -4361
  28. package/dist/client/rendering.mjs +580 -157
  29. package/dist/preview-next/before-render.mjs +57 -0
  30. package/dist/preview-next/client/runtime.mjs +580 -151
  31. package/dist/preview-next/middleware.mjs +57 -0
  32. package/dist/server/components.mjs +293 -45
  33. package/dist/server/config-validation.mjs +119 -0
  34. package/dist/server/config.mjs +119 -0
  35. package/dist/server/data.mjs +119 -0
  36. package/dist/server/index.mjs +120 -1
  37. package/dist/server/next.mjs +300 -52
  38. package/dist/server/page-converter.mjs +62 -0
  39. package/dist/server/prebuild.mjs +1 -1
  40. package/dist/server/rendering/server.mjs +293 -45
  41. package/dist/server/rendering.mjs +293 -45
  42. package/dist/server/routing.mjs +159 -29
  43. package/dist/server/server.mjs +120 -1
  44. package/package.json +1 -1
  45. package/dist/_dts/blocks/src/system/runtime/shared/themedButtonClass.d.ts +0 -11
@@ -720,66 +720,6 @@ export type Database = {
720
720
  }
721
721
  ];
722
722
  };
723
- appointment_resources: {
724
- Row: {
725
- archived_at: string | null;
726
- avatar_asset_id: string | null;
727
- bio: string | null;
728
- calendar_sync_enabled: boolean;
729
- color_hex: string | null;
730
- created_at: string;
731
- display_name: string;
732
- id: string;
733
- site_id: string;
734
- timezone: string;
735
- updated_at: string;
736
- user_id: string | null;
737
- };
738
- Insert: {
739
- archived_at?: string | null;
740
- avatar_asset_id?: string | null;
741
- bio?: string | null;
742
- calendar_sync_enabled?: boolean;
743
- color_hex?: string | null;
744
- created_at?: string;
745
- display_name: string;
746
- id?: string;
747
- site_id: string;
748
- timezone?: string;
749
- updated_at?: string;
750
- user_id?: string | null;
751
- };
752
- Update: {
753
- archived_at?: string | null;
754
- avatar_asset_id?: string | null;
755
- bio?: string | null;
756
- calendar_sync_enabled?: boolean;
757
- color_hex?: string | null;
758
- created_at?: string;
759
- display_name?: string;
760
- id?: string;
761
- site_id?: string;
762
- timezone?: string;
763
- updated_at?: string;
764
- user_id?: string | null;
765
- };
766
- Relationships: [
767
- {
768
- foreignKeyName: "appointment_resources_avatar_asset_id_fkey";
769
- columns: ["avatar_asset_id"];
770
- isOneToOne: false;
771
- referencedRelation: "media_assets";
772
- referencedColumns: ["id"];
773
- },
774
- {
775
- foreignKeyName: "appointment_resources_site_id_fkey";
776
- columns: ["site_id"];
777
- isOneToOne: false;
778
- referencedRelation: "sites";
779
- referencedColumns: ["id"];
780
- }
781
- ];
782
- };
783
723
  appointment_services: {
784
724
  Row: {
785
725
  cleanup_minutes: number;
@@ -5382,6 +5322,66 @@ export type Database = {
5382
5322
  }
5383
5323
  ];
5384
5324
  };
5325
+ domain_registrar_events: {
5326
+ Row: {
5327
+ actor_user_id: string | null;
5328
+ created_at: string;
5329
+ domain: string;
5330
+ id: string;
5331
+ metadata: Json;
5332
+ operation: string;
5333
+ outcome: string;
5334
+ provider: string;
5335
+ provider_detail: string | null;
5336
+ provider_response_code: number | null;
5337
+ site_domain_id: string | null;
5338
+ site_id: string;
5339
+ };
5340
+ Insert: {
5341
+ actor_user_id?: string | null;
5342
+ created_at?: string;
5343
+ domain: string;
5344
+ id?: string;
5345
+ metadata?: Json;
5346
+ operation: string;
5347
+ outcome: string;
5348
+ provider: string;
5349
+ provider_detail?: string | null;
5350
+ provider_response_code?: number | null;
5351
+ site_domain_id?: string | null;
5352
+ site_id: string;
5353
+ };
5354
+ Update: {
5355
+ actor_user_id?: string | null;
5356
+ created_at?: string;
5357
+ domain?: string;
5358
+ id?: string;
5359
+ metadata?: Json;
5360
+ operation?: string;
5361
+ outcome?: string;
5362
+ provider?: string;
5363
+ provider_detail?: string | null;
5364
+ provider_response_code?: number | null;
5365
+ site_domain_id?: string | null;
5366
+ site_id?: string;
5367
+ };
5368
+ Relationships: [
5369
+ {
5370
+ foreignKeyName: "domain_registrar_events_site_domain_id_fkey";
5371
+ columns: ["site_domain_id"];
5372
+ isOneToOne: false;
5373
+ referencedRelation: "site_domains";
5374
+ referencedColumns: ["id"];
5375
+ },
5376
+ {
5377
+ foreignKeyName: "domain_registrar_events_site_id_fkey";
5378
+ columns: ["site_id"];
5379
+ isOneToOne: false;
5380
+ referencedRelation: "sites";
5381
+ referencedColumns: ["id"];
5382
+ }
5383
+ ];
5384
+ };
5385
5385
  dsar_run_summaries: {
5386
5386
  Row: {
5387
5387
  counts: Json;
@@ -6898,6 +6898,7 @@ export type Database = {
6898
6898
  created_at: string;
6899
6899
  id: string;
6900
6900
  name: string;
6901
+ presentation_json: Json;
6901
6902
  schema_json: Json;
6902
6903
  settings_json: Json;
6903
6904
  site_id: string;
@@ -6909,6 +6910,7 @@ export type Database = {
6909
6910
  created_at?: string;
6910
6911
  id?: string;
6911
6912
  name: string;
6913
+ presentation_json?: Json;
6912
6914
  schema_json: Json;
6913
6915
  settings_json?: Json;
6914
6916
  site_id: string;
@@ -6920,6 +6922,7 @@ export type Database = {
6920
6922
  created_at?: string;
6921
6923
  id?: string;
6922
6924
  name?: string;
6925
+ presentation_json?: Json;
6923
6926
  schema_json?: Json;
6924
6927
  settings_json?: Json;
6925
6928
  site_id?: string;
@@ -11028,7 +11031,18 @@ export type Database = {
11028
11031
  domain: string;
11029
11032
  domain_type: string;
11030
11033
  id: string;
11034
+ registrar_auto_renew: boolean | null;
11035
+ registrar_email_verification_required: boolean | null;
11036
+ registrar_expires_at: string | null;
11037
+ registrar_last_response_code: number | null;
11038
+ registrar_last_synced_at: string | null;
11039
+ registrar_lifecycle_state: string | null;
11040
+ registrar_metadata: Json;
11031
11041
  registrar_order_id: string | null;
11042
+ registrar_privacy_enabled: boolean | null;
11043
+ registrar_provider: string | null;
11044
+ registrar_registered_at: string | null;
11045
+ registrar_renewal_checked_at: string | null;
11032
11046
  resend_domain_id: string | null;
11033
11047
  site_id: string;
11034
11048
  status: string;
@@ -11057,7 +11071,18 @@ export type Database = {
11057
11071
  domain: string;
11058
11072
  domain_type?: string;
11059
11073
  id?: string;
11074
+ registrar_auto_renew?: boolean | null;
11075
+ registrar_email_verification_required?: boolean | null;
11076
+ registrar_expires_at?: string | null;
11077
+ registrar_last_response_code?: number | null;
11078
+ registrar_last_synced_at?: string | null;
11079
+ registrar_lifecycle_state?: string | null;
11080
+ registrar_metadata?: Json;
11060
11081
  registrar_order_id?: string | null;
11082
+ registrar_privacy_enabled?: boolean | null;
11083
+ registrar_provider?: string | null;
11084
+ registrar_registered_at?: string | null;
11085
+ registrar_renewal_checked_at?: string | null;
11061
11086
  resend_domain_id?: string | null;
11062
11087
  site_id: string;
11063
11088
  status?: string;
@@ -11086,7 +11111,18 @@ export type Database = {
11086
11111
  domain?: string;
11087
11112
  domain_type?: string;
11088
11113
  id?: string;
11114
+ registrar_auto_renew?: boolean | null;
11115
+ registrar_email_verification_required?: boolean | null;
11116
+ registrar_expires_at?: string | null;
11117
+ registrar_last_response_code?: number | null;
11118
+ registrar_last_synced_at?: string | null;
11119
+ registrar_lifecycle_state?: string | null;
11120
+ registrar_metadata?: Json;
11089
11121
  registrar_order_id?: string | null;
11122
+ registrar_privacy_enabled?: boolean | null;
11123
+ registrar_provider?: string | null;
11124
+ registrar_registered_at?: string | null;
11125
+ registrar_renewal_checked_at?: string | null;
11090
11126
  resend_domain_id?: string | null;
11091
11127
  site_id?: string;
11092
11128
  status?: string;
@@ -6,13 +6,15 @@
6
6
  * across API routes, type guards, and client-side form submission.
7
7
  */
8
8
  import { z } from 'zod';
9
+ export declare const formPresentationSettingsSchema: z.ZodObject<{
10
+ submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
+ templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
+ }, z.core.$strict>;
9
13
  /**
10
14
  * Contact form settings
11
15
  * Used for general inquiry forms that send notifications to site owners
12
16
  */
13
17
  export declare const contactFormSettingsSchema: z.ZodObject<{
14
- submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
- templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16
18
  type: z.ZodLiteral<"contact">;
17
19
  successMessage: z.ZodOptional<z.ZodString>;
18
20
  sensitiveCollectionMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
@@ -57,8 +59,6 @@ export declare const contactFormSettingsSchema: z.ZodObject<{
57
59
  * XOR validation enforces this constraint.
58
60
  */
59
61
  export declare const bookingFormSettingsSchema: z.ZodObject<{
60
- submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
61
- templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
62
62
  type: z.ZodLiteral<"booking">;
63
63
  serviceId: z.ZodOptional<z.ZodString>;
64
64
  serviceIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -84,8 +84,6 @@ export declare const bookingFormSettingsSchema: z.ZodObject<{
84
84
  * - If not provided: Block must specify series or get from context
85
85
  */
86
86
  export declare const eventRegistrationFormSettingsSchema: z.ZodObject<{
87
- submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
88
- templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
89
87
  type: z.ZodLiteral<"event-registration">;
90
88
  seriesId: z.ZodOptional<z.ZodString>;
91
89
  maxTickets: z.ZodDefault<z.ZodNumber>;
@@ -106,8 +104,6 @@ export declare const eventRegistrationFormSettingsSchema: z.ZodObject<{
106
104
  * Used for reusable short forms / detailed questionnaires attached through booking requirements.
107
105
  */
108
106
  export declare const bookingQuestionsFormSettingsSchema: z.ZodObject<{
109
- submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
110
- templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
111
107
  type: z.ZodLiteral<"booking-questions">;
112
108
  schemaVersion: z.ZodDefault<z.ZodLiteral<2>>;
113
109
  shape: z.ZodDefault<z.ZodEnum<{
@@ -142,8 +138,6 @@ export declare const bookingQuestionsFormSettingsSchema: z.ZodObject<{
142
138
  * Use this schema to validate form settings in API routes
143
139
  */
144
140
  export declare const formSettingsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
145
- submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
146
- templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
147
141
  type: z.ZodLiteral<"contact">;
148
142
  successMessage: z.ZodOptional<z.ZodString>;
149
143
  sensitiveCollectionMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
@@ -175,8 +169,6 @@ export declare const formSettingsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
175
169
  emails: z.ZodOptional<z.ZodArray<z.ZodString>>;
176
170
  }, z.core.$strict>>;
177
171
  }, z.core.$strict>, z.ZodObject<{
178
- submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
179
- templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
180
172
  type: z.ZodLiteral<"booking">;
181
173
  serviceId: z.ZodOptional<z.ZodString>;
182
174
  serviceIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -193,8 +185,6 @@ export declare const formSettingsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
193
185
  confirmationVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodNull]>;
194
186
  }, z.core.$strict>>;
195
187
  }, z.core.$strict>, z.ZodObject<{
196
- submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
197
- templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
198
188
  type: z.ZodLiteral<"event-registration">;
199
189
  seriesId: z.ZodOptional<z.ZodString>;
200
190
  maxTickets: z.ZodDefault<z.ZodNumber>;
@@ -210,8 +200,6 @@ export declare const formSettingsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
210
200
  confirmationVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodNull]>;
211
201
  }, z.core.$strict>>;
212
202
  }, z.core.$strict>, z.ZodObject<{
213
- submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
214
- templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
215
203
  type: z.ZodLiteral<"booking-questions">;
216
204
  schemaVersion: z.ZodDefault<z.ZodLiteral<2>>;
217
205
  shape: z.ZodDefault<z.ZodEnum<{
@@ -241,6 +229,111 @@ export declare const formSettingsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
241
229
  sectioned: "sectioned";
242
230
  }>>;
243
231
  }, z.core.$strict>], "type">;
232
+ /**
233
+ * Transitional input schema for API/SDK callers that may still send form-level
234
+ * presentation metadata inside settings. Storage code must split these keys out
235
+ * before persisting canonical behavior settings.
236
+ */
237
+ export declare const formSettingsInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
238
+ type: z.ZodLiteral<"contact">;
239
+ successMessage: z.ZodOptional<z.ZodString>;
240
+ sensitiveCollectionMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
241
+ standard: "standard";
242
+ sensitive: "sensitive";
243
+ }>>>;
244
+ sensitiveCollection: z.ZodOptional<z.ZodObject<{
245
+ enabledAt: z.ZodNullable<z.ZodString>;
246
+ enabledByUserId: z.ZodNullable<z.ZodString>;
247
+ confirmationVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodNull]>;
248
+ }, z.core.$strict>>;
249
+ notifications: z.ZodOptional<z.ZodObject<{
250
+ email: z.ZodOptional<z.ZodObject<{
251
+ enabled: z.ZodBoolean;
252
+ recipients: z.ZodOptional<z.ZodArray<z.ZodString>>;
253
+ }, z.core.$strict>>;
254
+ autoReply: z.ZodOptional<z.ZodObject<{
255
+ enabled: z.ZodBoolean;
256
+ override: z.ZodOptional<z.ZodObject<{
257
+ subjectTemplate: z.ZodString;
258
+ bodyTemplate: z.ZodString;
259
+ }, z.core.$strict>>;
260
+ }, z.core.$strict>>;
261
+ webhook: z.ZodOptional<z.ZodObject<{
262
+ enabled: z.ZodBoolean;
263
+ url: z.ZodOptional<z.ZodString>;
264
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
265
+ }, z.core.$strict>>;
266
+ emails: z.ZodOptional<z.ZodArray<z.ZodString>>;
267
+ }, z.core.$strict>>;
268
+ readonly submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
269
+ readonly templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
270
+ }, z.core.$strict>, z.ZodObject<{
271
+ type: z.ZodLiteral<"booking">;
272
+ serviceId: z.ZodOptional<z.ZodString>;
273
+ serviceIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
274
+ resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
275
+ requiresApproval: z.ZodDefault<z.ZodBoolean>;
276
+ successMessage: z.ZodOptional<z.ZodString>;
277
+ sensitiveCollectionMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
278
+ standard: "standard";
279
+ sensitive: "sensitive";
280
+ }>>>;
281
+ sensitiveCollection: z.ZodOptional<z.ZodObject<{
282
+ enabledAt: z.ZodNullable<z.ZodString>;
283
+ enabledByUserId: z.ZodNullable<z.ZodString>;
284
+ confirmationVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodNull]>;
285
+ }, z.core.$strict>>;
286
+ readonly submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
287
+ readonly templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
288
+ }, z.core.$strict>, z.ZodObject<{
289
+ type: z.ZodLiteral<"event-registration">;
290
+ seriesId: z.ZodOptional<z.ZodString>;
291
+ maxTickets: z.ZodDefault<z.ZodNumber>;
292
+ requiresApproval: z.ZodDefault<z.ZodBoolean>;
293
+ successMessage: z.ZodOptional<z.ZodString>;
294
+ sensitiveCollectionMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
295
+ standard: "standard";
296
+ sensitive: "sensitive";
297
+ }>>>;
298
+ sensitiveCollection: z.ZodOptional<z.ZodObject<{
299
+ enabledAt: z.ZodNullable<z.ZodString>;
300
+ enabledByUserId: z.ZodNullable<z.ZodString>;
301
+ confirmationVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodNull]>;
302
+ }, z.core.$strict>>;
303
+ readonly submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
304
+ readonly templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
305
+ }, z.core.$strict>, z.ZodObject<{
306
+ type: z.ZodLiteral<"booking-questions">;
307
+ schemaVersion: z.ZodDefault<z.ZodLiteral<2>>;
308
+ shape: z.ZodDefault<z.ZodEnum<{
309
+ "short-form": "short-form";
310
+ "detailed-questionnaire": "detailed-questionnaire";
311
+ }>>;
312
+ sensitiveCollectionMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
313
+ standard: "standard";
314
+ sensitive: "sensitive";
315
+ }>>>;
316
+ sensitiveCollection: z.ZodOptional<z.ZodObject<{
317
+ enabledAt: z.ZodNullable<z.ZodString>;
318
+ enabledByUserId: z.ZodNullable<z.ZodString>;
319
+ confirmationVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodNull]>;
320
+ }, z.core.$strict>>;
321
+ audienceHint: z.ZodOptional<z.ZodEnum<{
322
+ appointments: "appointments";
323
+ courses: "courses";
324
+ events: "events";
325
+ mixed: "mixed";
326
+ }>>;
327
+ customerTitle: z.ZodOptional<z.ZodString>;
328
+ introTitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
329
+ introBody: z.ZodOptional<z.ZodNullable<z.ZodString>>;
330
+ reviewLayout: z.ZodDefault<z.ZodEnum<{
331
+ flat: "flat";
332
+ sectioned: "sectioned";
333
+ }>>;
334
+ readonly submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
335
+ readonly templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
336
+ }, z.core.$strict>], "type">;
244
337
  /**
245
338
  * TypeScript types derived from schemas
246
339
  */
@@ -249,6 +342,20 @@ export type BookingFormSettings = z.infer<typeof bookingFormSettingsSchema>;
249
342
  export type EventRegistrationFormSettings = z.infer<typeof eventRegistrationFormSettingsSchema>;
250
343
  export type BookingQuestionsFormSettings = z.infer<typeof bookingQuestionsFormSettingsSchema>;
251
344
  export type FormSettings = z.infer<typeof formSettingsSchema>;
345
+ export type FormPresentationSettings = z.infer<typeof formPresentationSettingsSchema>;
346
+ export type FormSettingsInput = z.infer<typeof formSettingsInputSchema>;
347
+ type JsonRecord = Record<string, unknown>;
348
+ export declare function stripPresentationKeysFromBehaviorSettings(value: unknown): JsonRecord;
349
+ export declare function extractFormPresentationSettings(input: Readonly<{
350
+ settingsJson?: unknown;
351
+ presentationJson?: unknown;
352
+ }>): FormPresentationSettings;
353
+ export declare function mergeFormPresentationSettings(...parts: readonly unknown[]): FormPresentationSettings;
354
+ export declare function composeFormStoredSettingsForPublicContract(input: Readonly<{
355
+ settingsJson?: unknown;
356
+ presentationJson?: unknown;
357
+ }>): JsonRecord;
358
+ export declare function parseFormBehaviorSettingsFromStoredSettings(value: unknown): FormSettings | null;
252
359
  export declare const formFieldSchema: z.ZodObject<{
253
360
  id: z.ZodString;
254
361
  label: z.ZodString;
@@ -823,8 +930,6 @@ export declare const createFormPayloadSchema: z.ZodObject<{
823
930
  }, z.core.$strict>>;
824
931
  }, z.core.$strict>;
825
932
  settings: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
826
- submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
827
- templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
828
933
  type: z.ZodLiteral<"contact">;
829
934
  successMessage: z.ZodOptional<z.ZodString>;
830
935
  sensitiveCollectionMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
@@ -855,9 +960,9 @@ export declare const createFormPayloadSchema: z.ZodObject<{
855
960
  }, z.core.$strict>>;
856
961
  emails: z.ZodOptional<z.ZodArray<z.ZodString>>;
857
962
  }, z.core.$strict>>;
963
+ readonly submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
964
+ readonly templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
858
965
  }, z.core.$strict>, z.ZodObject<{
859
- submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
860
- templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
861
966
  type: z.ZodLiteral<"booking">;
862
967
  serviceId: z.ZodOptional<z.ZodString>;
863
968
  serviceIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -873,9 +978,9 @@ export declare const createFormPayloadSchema: z.ZodObject<{
873
978
  enabledByUserId: z.ZodNullable<z.ZodString>;
874
979
  confirmationVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodNull]>;
875
980
  }, z.core.$strict>>;
981
+ readonly submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
982
+ readonly templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
876
983
  }, z.core.$strict>, z.ZodObject<{
877
- submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
878
- templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
879
984
  type: z.ZodLiteral<"event-registration">;
880
985
  seriesId: z.ZodOptional<z.ZodString>;
881
986
  maxTickets: z.ZodDefault<z.ZodNumber>;
@@ -890,9 +995,9 @@ export declare const createFormPayloadSchema: z.ZodObject<{
890
995
  enabledByUserId: z.ZodNullable<z.ZodString>;
891
996
  confirmationVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodNull]>;
892
997
  }, z.core.$strict>>;
998
+ readonly submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
999
+ readonly templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
893
1000
  }, z.core.$strict>, z.ZodObject<{
894
- submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
895
- templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
896
1001
  type: z.ZodLiteral<"booking-questions">;
897
1002
  schemaVersion: z.ZodDefault<z.ZodLiteral<2>>;
898
1003
  shape: z.ZodDefault<z.ZodEnum<{
@@ -921,7 +1026,13 @@ export declare const createFormPayloadSchema: z.ZodObject<{
921
1026
  flat: "flat";
922
1027
  sectioned: "sectioned";
923
1028
  }>>;
1029
+ readonly submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1030
+ readonly templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
924
1031
  }, z.core.$strict>], "type">>;
1032
+ presentation: z.ZodOptional<z.ZodObject<{
1033
+ submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1034
+ templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1035
+ }, z.core.$strict>>;
925
1036
  }, z.core.$strict>;
926
1037
  export type CreateFormPayload = z.infer<typeof createFormPayloadSchema>;
927
1038
  export {};
@@ -51,7 +51,13 @@ export type EntryLinkValue = {
51
51
  contentType: string;
52
52
  identifier: string;
53
53
  };
54
- export type LinkValue = InternalLinkValue | ExternalLinkValue | CustomLinkValue | PageLinkValue | EntryLinkValue;
54
+ export type AuthoredLinkValue = InternalLinkValue | ExternalLinkValue | CustomLinkValue | PageLinkValue | EntryLinkValue;
55
+ /**
56
+ * Broad authored/editor link value accepted by SDK content contracts.
57
+ * Route-only internal links remain part of the public wire contract; navigation
58
+ * persistence must narrow to a persistable lifecycle value first.
59
+ */
60
+ export type LinkValue = AuthoredLinkValue;
55
61
  export type MediaTypeDiscriminant = 'image' | 'video' | 'audio' | 'document' | 'spreadsheet' | 'archive';
56
62
  export type Media = {
57
63
  type: MediaTypeDiscriminant;
@@ -26,7 +26,7 @@ export interface ApiResponse<TData> {
26
26
  data: TData;
27
27
  meta: ResponseMeta;
28
28
  }
29
- export type ApiErrorCode = "auth:unauthenticated" | "auth:token_expired" | "auth:token_invalid" | "auth:forbidden" | "auth:mfa_required" | "auth:sudo_required" | "auth:insufficient_permissions" | "auth:impersonation_restricted" | "validation:invalid_input" | "validation:missing_field" | "validation:invalid_format" | "validation:payload_too_large" | "resource:not_found" | "resource:already_exists" | "resource:conflict" | "resource:gone" | "rate_limit:exceeded" | "billing:payment_required" | "billing:plan_limit_exceeded" | "billing:pass_redemption_failed" | "server:internal_error" | "server:unavailable" | "external:service_error" | "network:connection_error" | "network:timeout" | "network:dns_error";
29
+ export type ApiErrorCode = "auth:unauthenticated" | "auth:token_expired" | "auth:token_invalid" | "auth:forbidden" | "auth:mfa_required" | "auth:sudo_required" | "auth:insufficient_permissions" | "auth:impersonation_restricted" | "validation:invalid_input" | "validation:missing_field" | "validation:invalid_format" | "validation:payload_too_large" | "resource:not_found" | "resource:already_exists" | "resource:conflict" | "resource:gone" | "rate_limit:exceeded" | "billing:payment_required" | "billing:plan_limit_exceeded" | "billing:pass_redemption_failed" | "server:internal_error" | "server:unavailable" | "external:service_error" | "external:registrar_orphaned_contact_profile" | "network:connection_error" | "network:timeout" | "network:dns_error";
30
30
  export interface FieldError {
31
31
  field: string;
32
32
  code: string;
@@ -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.60.9";
11
+ export declare const SDK_VERSION = "0.60.12";
@@ -0,0 +1,21 @@
1
+ import { type ButtonSizeName, type DefaultVariantAliasId, type VariantId } from './types';
2
+ export type ThemeButtonVariantId = VariantId | DefaultVariantAliasId;
3
+ export type ThemeButtonClassName = string & {
4
+ readonly __brand: 'ThemeButtonClassName';
5
+ };
6
+ export type ThemeButtonSizeClassName = `btn-${ButtonSizeName}`;
7
+ export type ThemeButtonClassSpec = Readonly<{
8
+ variant: ThemeButtonVariantId;
9
+ size: ButtonSizeName;
10
+ extraClassName?: string | null;
11
+ }>;
12
+ /**
13
+ * Parse content/runtime variant identifiers into the closed theme-button class
14
+ * contract. Empty input is the intentional local/unstyled escape hatch used by
15
+ * a few block renderers; non-empty, non-semantic ids become branded special ids.
16
+ */
17
+ export declare function parseThemeButtonVariantId(value: string | null | undefined): ThemeButtonVariantId | null;
18
+ export declare function themeButtonVariantClassNames(variant: ThemeButtonVariantId): readonly [string] | readonly [string, string];
19
+ export declare function themeButtonSizeClassName(size: ButtonSizeName): ThemeButtonSizeClassName;
20
+ export declare function themeButtonSelector(variant: ThemeButtonVariantId, size?: ButtonSizeName): string;
21
+ export declare function themeButtonClassName(spec: ThemeButtonClassSpec): ThemeButtonClassName;
@@ -4,6 +4,7 @@
4
4
  * Complete button system including types, schemas, presets, and CSS variable generation.
5
5
  */
6
6
  export * from './types';
7
+ export * from './classNames';
7
8
  export * from './generateButtonCss';
8
9
  export * from './generateDefaultButtonSystem';
9
10
  export * from './constants';
@@ -35,6 +35,7 @@ export type ButtonSizes = Record<ButtonSizeName, ButtonSizeConfig>;
35
35
  */
36
36
  export declare const VARIANT_ROLES: readonly ["primary", "secondary", "outline", "ghost", "link", "tertiary", "accent"];
37
37
  export type VariantRole = (typeof VARIANT_ROLES)[number];
38
+ export declare function isVariantRole(value: string): value is VariantRole;
38
39
  declare const SpecialVariantIdBrand: unique symbol;
39
40
  /**
40
41
  * Branded ID for theme-specific special variants that don't map to a standard role