@stripe/extensibility-jsonschema-tools 0.6.8 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,6 +5,30 @@ import { setSchemaExtension } from '@formspec/build/browser';
5
5
  import * as ts from 'typescript';
6
6
  import { uiSchemaSchema } from '@formspec/build/browser';
7
7
 
8
+ /**
9
+ * Controls whether a type-level annotation can flow from a base declaration to
10
+ * a derived declaration during semantic analysis.
11
+ *
12
+ * @public
13
+ */
14
+ declare type AnnotationInheritancePolicy$1 = "local-wins" | "never";
15
+
16
+ /**
17
+ * Controls whether a type-level annotation can flow from a base declaration to
18
+ * a derived declaration during semantic analysis.
19
+ *
20
+ * @public
21
+ */
22
+ declare type AnnotationInheritancePolicy = "local-wins" | "never";
23
+
24
+ /**
25
+ * Controls whether a type-level annotation can flow from a base declaration to
26
+ * a derived declaration during semantic analysis.
27
+ *
28
+ * @public
29
+ */
30
+ declare type AnnotationInheritancePolicy_2 = "local-wins" | "never";
31
+
8
32
  /**
9
33
  * Registration for mapping a built-in TSDoc tag onto a custom constraint when
10
34
  * it is used on a particular custom type.
@@ -117,24 +141,6 @@ export declare interface Category {
117
141
 
118
142
  /* Excluded from this release type: _ConfigUiSchema */
119
143
 
120
- /**
121
- * Complete constraint configuration for a FormSpec project.
122
- *
123
- * @public
124
- */
125
- declare interface ConstraintConfig {
126
- /** Field type constraints */
127
- fieldTypes?: FieldTypeConstraints;
128
- /** Layout and structure constraints */
129
- layout?: LayoutConstraints;
130
- /** UI Schema feature constraints */
131
- uiSchema?: UISchemaConstraints;
132
- /** Field configuration option constraints */
133
- fieldOptions?: FieldOptionConstraints;
134
- /** Control options constraints */
135
- controlOptions?: ControlOptionConstraints;
136
- }
137
-
138
144
  /**
139
145
  * Semantic metadata for ordered custom constraints that should participate in
140
146
  * the generic contradiction/broadening logic.
@@ -270,7 +276,7 @@ export declare interface ControlElement {
270
276
  }
271
277
 
272
278
  /**
273
- * Control options constraints - control which JSONForms Control.options are allowed.
279
+ * Control options constraints - control which JSON Forms Control.options are allowed.
274
280
  * These are renderer-specific options that may not be universally supported.
275
281
  *
276
282
  * @public
@@ -301,6 +307,19 @@ declare interface ControlOptionConstraints {
301
307
  export declare interface CustomAnnotationRegistration {
302
308
  /** The annotation name, unique within the extension. */
303
309
  readonly annotationName: string;
310
+ /**
311
+ * Optional type-level inheritance behavior for semantic consumers.
312
+ *
313
+ * `"local-wins"` means a derived declaration inherits this annotation from
314
+ * its base declaration only when the derived declaration does not provide the
315
+ * same extension annotation identity locally. Omitted registrations behave as
316
+ * `"never"`.
317
+ */
318
+ readonly inheritFromBase?: AnnotationInheritancePolicy;
319
+ /**
320
+ * Optional editor documentation for the annotation's TSDoc authoring tag.
321
+ */
322
+ readonly tagDocumentation?: CustomAnnotationTagDocumentation;
304
323
  /**
305
324
  * Optionally converts the annotation value into JSON Schema keywords.
306
325
  * If omitted, the annotation has no JSON Schema representation (UI-only).
@@ -319,6 +338,19 @@ export declare interface CustomAnnotationRegistration {
319
338
  declare interface CustomAnnotationRegistration_2 {
320
339
  /** The annotation name, unique within the extension. */
321
340
  readonly annotationName: string;
341
+ /**
342
+ * Optional type-level inheritance behavior for semantic consumers.
343
+ *
344
+ * `"local-wins"` means a derived declaration inherits this annotation from
345
+ * its base declaration only when the derived declaration does not provide the
346
+ * same extension annotation identity locally. Omitted registrations behave as
347
+ * `"never"`.
348
+ */
349
+ readonly inheritFromBase?: AnnotationInheritancePolicy$1;
350
+ /**
351
+ * Optional editor documentation for the annotation's TSDoc authoring tag.
352
+ */
353
+ readonly tagDocumentation?: CustomAnnotationTagDocumentation$1;
322
354
  /**
323
355
  * Optionally converts the annotation value into JSON Schema keywords.
324
356
  * If omitted, the annotation has no JSON Schema representation (UI-only).
@@ -337,6 +369,19 @@ declare interface CustomAnnotationRegistration_2 {
337
369
  declare interface CustomAnnotationRegistration_3 {
338
370
  /** The annotation name, unique within the extension. */
339
371
  readonly annotationName: string;
372
+ /**
373
+ * Optional type-level inheritance behavior for semantic consumers.
374
+ *
375
+ * `"local-wins"` means a derived declaration inherits this annotation from
376
+ * its base declaration only when the derived declaration does not provide the
377
+ * same extension annotation identity locally. Omitted registrations behave as
378
+ * `"never"`.
379
+ */
380
+ readonly inheritFromBase?: AnnotationInheritancePolicy_2;
381
+ /**
382
+ * Optional editor documentation for the annotation's TSDoc authoring tag.
383
+ */
384
+ readonly tagDocumentation?: CustomAnnotationTagDocumentation_2;
340
385
  /**
341
386
  * Optionally converts the annotation value into JSON Schema keywords.
342
387
  * If omitted, the annotation has no JSON Schema representation (UI-only).
@@ -344,6 +389,81 @@ declare interface CustomAnnotationRegistration_3 {
344
389
  readonly toJsonSchema?: (value: ExtensionPayloadValue_2, vendorPrefix: string) => Record<string, unknown>;
345
390
  }
346
391
 
392
+ /**
393
+ * Documentation text for an extension annotation's TSDoc authoring tag.
394
+ *
395
+ * These strings are consumed by editor integrations for completion details and
396
+ * hover text. They do not affect annotation parsing, inheritance, or schema
397
+ * emission.
398
+ *
399
+ * @public
400
+ */
401
+ declare interface CustomAnnotationTagDocumentation$1 {
402
+ /** Completion detail shown beside the annotation tag. */
403
+ readonly completionDetail?: string;
404
+ /**
405
+ * Label for the payload portion of the annotation tag signature.
406
+ *
407
+ * The payload remains the full authored text after the tag name, so this can
408
+ * describe single-argument or multi-argument annotation syntaxes.
409
+ */
410
+ readonly payloadLabel?: string;
411
+ /** Short hover summary shown for the annotation tag. */
412
+ readonly hoverSummary?: string;
413
+ /** Full markdown hover body for the annotation tag. */
414
+ readonly hoverMarkdown?: string;
415
+ }
416
+
417
+ /**
418
+ * Documentation text for an extension annotation's TSDoc authoring tag.
419
+ *
420
+ * These strings are consumed by editor integrations for completion details and
421
+ * hover text. They do not affect annotation parsing, inheritance, or schema
422
+ * emission.
423
+ *
424
+ * @public
425
+ */
426
+ declare interface CustomAnnotationTagDocumentation {
427
+ /** Completion detail shown beside the annotation tag. */
428
+ readonly completionDetail?: string;
429
+ /**
430
+ * Label for the payload portion of the annotation tag signature.
431
+ *
432
+ * The payload remains the full authored text after the tag name, so this can
433
+ * describe single-argument or multi-argument annotation syntaxes.
434
+ */
435
+ readonly payloadLabel?: string;
436
+ /** Short hover summary shown for the annotation tag. */
437
+ readonly hoverSummary?: string;
438
+ /** Full markdown hover body for the annotation tag. */
439
+ readonly hoverMarkdown?: string;
440
+ }
441
+
442
+ /**
443
+ * Documentation text for an extension annotation's TSDoc authoring tag.
444
+ *
445
+ * These strings are consumed by editor integrations for completion details and
446
+ * hover text. They do not affect annotation parsing, inheritance, or schema
447
+ * emission.
448
+ *
449
+ * @public
450
+ */
451
+ declare interface CustomAnnotationTagDocumentation_2 {
452
+ /** Completion detail shown beside the annotation tag. */
453
+ readonly completionDetail?: string;
454
+ /**
455
+ * Label for the payload portion of the annotation tag signature.
456
+ *
457
+ * The payload remains the full authored text after the tag name, so this can
458
+ * describe single-argument or multi-argument annotation syntaxes.
459
+ */
460
+ readonly payloadLabel?: string;
461
+ /** Short hover summary shown for the annotation tag. */
462
+ readonly hoverSummary?: string;
463
+ /** Full markdown hover body for the annotation tag. */
464
+ readonly hoverMarkdown?: string;
465
+ }
466
+
347
467
  /**
348
468
  * Registration for a custom constraint that maps to JSON Schema keywords.
349
469
  *
@@ -740,6 +860,24 @@ export declare interface DiscriminatorResolutionOptions {
740
860
  readonly apiNamePrefix?: string | undefined;
741
861
  }
742
862
 
863
+ /**
864
+ * Complete DSL policy for a FormSpec project.
865
+ *
866
+ * @public
867
+ */
868
+ declare interface DSLPolicy {
869
+ /** Field type constraints */
870
+ fieldTypes?: FieldTypeConstraints;
871
+ /** Layout and structure constraints */
872
+ layout?: LayoutConstraints;
873
+ /** UI schema feature constraints */
874
+ uiSchema?: UISchemaConstraints;
875
+ /** Field configuration option constraints */
876
+ fieldOptions?: FieldOptionConstraints;
877
+ /** Control options constraints */
878
+ controlOptions?: ControlOptionConstraints;
879
+ }
880
+
743
881
  /**
744
882
  * Enum-member display names remain unset unless authored explicitly.
745
883
  *
@@ -1334,8 +1472,7 @@ declare interface FieldTypeConstraints {
1334
1472
  /* Excluded from this release type: _fixupDecimalPathConstraints */
1335
1473
 
1336
1474
  /**
1337
- * Top-level FormSpec configuration file structure.
1338
- * The .formspec.yml file uses this structure.
1475
+ * Top-level FormSpec configuration structure.
1339
1476
  *
1340
1477
  * @public
1341
1478
  */
@@ -1345,9 +1482,11 @@ export declare interface FormSpecConfig {
1345
1482
  * annotations, and vocabulary keywords.
1346
1483
  */
1347
1484
  readonly extensions?: readonly ExtensionDefinition_3[];
1348
- /** Constraint surface configuration — controls which field types,
1349
- * layouts, UI features, and field/control options are allowed. */
1350
- readonly constraints?: ConstraintConfig;
1485
+ /**
1486
+ * DSL-policy surface configuration controlling which field types,
1487
+ * layouts, UI features, and field/control options are allowed.
1488
+ */
1489
+ readonly constraints?: DSLPolicy;
1351
1490
  /**
1352
1491
  * Metadata inference and naming policy. Controls how apiName,
1353
1492
  * displayName, and plural forms are derived when not authored.
@@ -1367,6 +1506,11 @@ export declare interface FormSpecConfig {
1367
1506
  * @defaultValue "enum"
1368
1507
  */
1369
1508
  readonly enumSerialization?: "enum" | "oneOf" | "smart-size";
1509
+ /**
1510
+ * JSON Schema serialization settings for vocabulary and dialect emission.
1511
+ * PR-1 stores and resolves this block; PR-2 consumes it.
1512
+ */
1513
+ readonly serialization?: FormSpecSerializationConfig;
1370
1514
  /**
1371
1515
  * Per-package configuration overrides for monorepos.
1372
1516
  * Keys are glob patterns matched against file paths relative to
@@ -1382,14 +1526,31 @@ export declare interface FormSpecConfig {
1382
1526
  * @public
1383
1527
  */
1384
1528
  declare interface FormSpecPackageOverride {
1385
- /** Override constraint surface for this package. */
1386
- readonly constraints?: ConstraintConfig;
1529
+ /** Override DSL policy for this package. */
1530
+ readonly constraints?: DSLPolicy;
1387
1531
  /** Override enum serialization for this package. */
1388
1532
  readonly enumSerialization?: "enum" | "oneOf" | "smart-size";
1389
1533
  /** Override metadata policy for this package. */
1390
1534
  readonly metadata?: MetadataPolicyInput_2;
1391
1535
  }
1392
1536
 
1537
+ /**
1538
+ * Forward-looking JSON Schema serialization settings.
1539
+ *
1540
+ * These values are currently carried through configuration for future
1541
+ * vocabulary and dialect emission.
1542
+ *
1543
+ * @public
1544
+ */
1545
+ declare interface FormSpecSerializationConfig {
1546
+ /** Base URL used to construct default FormSpec vocabulary URLs. */
1547
+ readonly vocabularyBaseUrl?: string;
1548
+ /** Per-vocabulary URL overrides keyed by vocabulary identifier. */
1549
+ readonly vocabularyUrls?: Readonly<Record<string, string>>;
1550
+ /** Explicit FormSpec dialect URL override. */
1551
+ readonly dialectUrl?: string;
1552
+ }
1553
+
1393
1554
  /**
1394
1555
  * Options for generating schemas from a decorated class.
1395
1556
  *
@@ -1560,6 +1721,8 @@ export declare interface JsonSchema2020 {
1560
1721
  description?: string;
1561
1722
  /** Default value suggested for the schema node. */
1562
1723
  default?: unknown;
1724
+ /** Documentation example values (from one or more `@example` tags). */
1725
+ examples?: unknown[];
1563
1726
  /** Whether the schema node is deprecated. */
1564
1727
  deprecated?: boolean;
1565
1728
  /** Additional vendor-prefixed extension keywords. */
@@ -1601,7 +1764,7 @@ declare interface LayoutConstraints {
1601
1764
  }
1602
1765
 
1603
1766
  /**
1604
- * JSONForms layout type constraints.
1767
+ * JSON Forms layout type constraints.
1605
1768
  *
1606
1769
  * @public
1607
1770
  */
@@ -2385,7 +2548,7 @@ export declare interface RuleConditionSchema {
2385
2548
  }
2386
2549
 
2387
2550
  /**
2388
- * JSONForms rule constraints.
2551
+ * JSON Forms rule constraints.
2389
2552
  *
2390
2553
  * @public
2391
2554
  */
@@ -2412,7 +2575,7 @@ declare interface RuleConstraints {
2412
2575
  export declare type RuleEffect = "DISABLE" | "ENABLE" | "HIDE" | "SHOW";
2413
2576
 
2414
2577
  /**
2415
- * JSONForms rule effect constraints.
2578
+ * JSON Forms rule effect constraints.
2416
2579
  *
2417
2580
  * @public
2418
2581
  */
@@ -2442,7 +2605,7 @@ export declare interface SchemaBasedCondition {
2442
2605
  export { setSchemaExtension }
2443
2606
 
2444
2607
  /**
2445
- * Severity level for constraint violations.
2608
+ * Severity level for DSL-policy violations.
2446
2609
  * - "error": Violation fails validation
2447
2610
  * - "warn": Violation emits warning but passes
2448
2611
  * - "off": Feature is allowed (no violation)
@@ -2521,7 +2684,7 @@ export declare interface StaticSchemaGenerationOptions {
2521
2684
  export declare type UISchema = Categorization | GroupLayout | HorizontalLayout | VerticalLayout;
2522
2685
 
2523
2686
  /**
2524
- * UI Schema feature constraints - control JSONForms-specific features.
2687
+ * UI schema feature constraints - control JSON Forms-specific features.
2525
2688
  *
2526
2689
  * @public
2527
2690
  */
@@ -5,6 +5,30 @@ import { setSchemaExtension } from '@formspec/build/browser';
5
5
  import * as ts from 'typescript';
6
6
  import { uiSchemaSchema } from '@formspec/build/browser';
7
7
 
8
+ /**
9
+ * Controls whether a type-level annotation can flow from a base declaration to
10
+ * a derived declaration during semantic analysis.
11
+ *
12
+ * @public
13
+ */
14
+ declare type AnnotationInheritancePolicy$1 = "local-wins" | "never";
15
+
16
+ /**
17
+ * Controls whether a type-level annotation can flow from a base declaration to
18
+ * a derived declaration during semantic analysis.
19
+ *
20
+ * @public
21
+ */
22
+ declare type AnnotationInheritancePolicy = "local-wins" | "never";
23
+
24
+ /**
25
+ * Controls whether a type-level annotation can flow from a base declaration to
26
+ * a derived declaration during semantic analysis.
27
+ *
28
+ * @public
29
+ */
30
+ declare type AnnotationInheritancePolicy_2 = "local-wins" | "never";
31
+
8
32
  /**
9
33
  * Registration for mapping a built-in TSDoc tag onto a custom constraint when
10
34
  * it is used on a particular custom type.
@@ -117,24 +141,6 @@ export declare interface Category {
117
141
 
118
142
  /* Excluded from this release type: _ConfigUiSchema */
119
143
 
120
- /**
121
- * Complete constraint configuration for a FormSpec project.
122
- *
123
- * @public
124
- */
125
- declare interface ConstraintConfig {
126
- /** Field type constraints */
127
- fieldTypes?: FieldTypeConstraints;
128
- /** Layout and structure constraints */
129
- layout?: LayoutConstraints;
130
- /** UI Schema feature constraints */
131
- uiSchema?: UISchemaConstraints;
132
- /** Field configuration option constraints */
133
- fieldOptions?: FieldOptionConstraints;
134
- /** Control options constraints */
135
- controlOptions?: ControlOptionConstraints;
136
- }
137
-
138
144
  /**
139
145
  * Semantic metadata for ordered custom constraints that should participate in
140
146
  * the generic contradiction/broadening logic.
@@ -270,7 +276,7 @@ export declare interface ControlElement {
270
276
  }
271
277
 
272
278
  /**
273
- * Control options constraints - control which JSONForms Control.options are allowed.
279
+ * Control options constraints - control which JSON Forms Control.options are allowed.
274
280
  * These are renderer-specific options that may not be universally supported.
275
281
  *
276
282
  * @public
@@ -301,6 +307,19 @@ declare interface ControlOptionConstraints {
301
307
  export declare interface CustomAnnotationRegistration {
302
308
  /** The annotation name, unique within the extension. */
303
309
  readonly annotationName: string;
310
+ /**
311
+ * Optional type-level inheritance behavior for semantic consumers.
312
+ *
313
+ * `"local-wins"` means a derived declaration inherits this annotation from
314
+ * its base declaration only when the derived declaration does not provide the
315
+ * same extension annotation identity locally. Omitted registrations behave as
316
+ * `"never"`.
317
+ */
318
+ readonly inheritFromBase?: AnnotationInheritancePolicy;
319
+ /**
320
+ * Optional editor documentation for the annotation's TSDoc authoring tag.
321
+ */
322
+ readonly tagDocumentation?: CustomAnnotationTagDocumentation;
304
323
  /**
305
324
  * Optionally converts the annotation value into JSON Schema keywords.
306
325
  * If omitted, the annotation has no JSON Schema representation (UI-only).
@@ -319,6 +338,19 @@ export declare interface CustomAnnotationRegistration {
319
338
  declare interface CustomAnnotationRegistration_2 {
320
339
  /** The annotation name, unique within the extension. */
321
340
  readonly annotationName: string;
341
+ /**
342
+ * Optional type-level inheritance behavior for semantic consumers.
343
+ *
344
+ * `"local-wins"` means a derived declaration inherits this annotation from
345
+ * its base declaration only when the derived declaration does not provide the
346
+ * same extension annotation identity locally. Omitted registrations behave as
347
+ * `"never"`.
348
+ */
349
+ readonly inheritFromBase?: AnnotationInheritancePolicy$1;
350
+ /**
351
+ * Optional editor documentation for the annotation's TSDoc authoring tag.
352
+ */
353
+ readonly tagDocumentation?: CustomAnnotationTagDocumentation$1;
322
354
  /**
323
355
  * Optionally converts the annotation value into JSON Schema keywords.
324
356
  * If omitted, the annotation has no JSON Schema representation (UI-only).
@@ -337,6 +369,19 @@ declare interface CustomAnnotationRegistration_2 {
337
369
  declare interface CustomAnnotationRegistration_3 {
338
370
  /** The annotation name, unique within the extension. */
339
371
  readonly annotationName: string;
372
+ /**
373
+ * Optional type-level inheritance behavior for semantic consumers.
374
+ *
375
+ * `"local-wins"` means a derived declaration inherits this annotation from
376
+ * its base declaration only when the derived declaration does not provide the
377
+ * same extension annotation identity locally. Omitted registrations behave as
378
+ * `"never"`.
379
+ */
380
+ readonly inheritFromBase?: AnnotationInheritancePolicy_2;
381
+ /**
382
+ * Optional editor documentation for the annotation's TSDoc authoring tag.
383
+ */
384
+ readonly tagDocumentation?: CustomAnnotationTagDocumentation_2;
340
385
  /**
341
386
  * Optionally converts the annotation value into JSON Schema keywords.
342
387
  * If omitted, the annotation has no JSON Schema representation (UI-only).
@@ -344,6 +389,81 @@ declare interface CustomAnnotationRegistration_3 {
344
389
  readonly toJsonSchema?: (value: ExtensionPayloadValue_2, vendorPrefix: string) => Record<string, unknown>;
345
390
  }
346
391
 
392
+ /**
393
+ * Documentation text for an extension annotation's TSDoc authoring tag.
394
+ *
395
+ * These strings are consumed by editor integrations for completion details and
396
+ * hover text. They do not affect annotation parsing, inheritance, or schema
397
+ * emission.
398
+ *
399
+ * @public
400
+ */
401
+ declare interface CustomAnnotationTagDocumentation$1 {
402
+ /** Completion detail shown beside the annotation tag. */
403
+ readonly completionDetail?: string;
404
+ /**
405
+ * Label for the payload portion of the annotation tag signature.
406
+ *
407
+ * The payload remains the full authored text after the tag name, so this can
408
+ * describe single-argument or multi-argument annotation syntaxes.
409
+ */
410
+ readonly payloadLabel?: string;
411
+ /** Short hover summary shown for the annotation tag. */
412
+ readonly hoverSummary?: string;
413
+ /** Full markdown hover body for the annotation tag. */
414
+ readonly hoverMarkdown?: string;
415
+ }
416
+
417
+ /**
418
+ * Documentation text for an extension annotation's TSDoc authoring tag.
419
+ *
420
+ * These strings are consumed by editor integrations for completion details and
421
+ * hover text. They do not affect annotation parsing, inheritance, or schema
422
+ * emission.
423
+ *
424
+ * @public
425
+ */
426
+ declare interface CustomAnnotationTagDocumentation {
427
+ /** Completion detail shown beside the annotation tag. */
428
+ readonly completionDetail?: string;
429
+ /**
430
+ * Label for the payload portion of the annotation tag signature.
431
+ *
432
+ * The payload remains the full authored text after the tag name, so this can
433
+ * describe single-argument or multi-argument annotation syntaxes.
434
+ */
435
+ readonly payloadLabel?: string;
436
+ /** Short hover summary shown for the annotation tag. */
437
+ readonly hoverSummary?: string;
438
+ /** Full markdown hover body for the annotation tag. */
439
+ readonly hoverMarkdown?: string;
440
+ }
441
+
442
+ /**
443
+ * Documentation text for an extension annotation's TSDoc authoring tag.
444
+ *
445
+ * These strings are consumed by editor integrations for completion details and
446
+ * hover text. They do not affect annotation parsing, inheritance, or schema
447
+ * emission.
448
+ *
449
+ * @public
450
+ */
451
+ declare interface CustomAnnotationTagDocumentation_2 {
452
+ /** Completion detail shown beside the annotation tag. */
453
+ readonly completionDetail?: string;
454
+ /**
455
+ * Label for the payload portion of the annotation tag signature.
456
+ *
457
+ * The payload remains the full authored text after the tag name, so this can
458
+ * describe single-argument or multi-argument annotation syntaxes.
459
+ */
460
+ readonly payloadLabel?: string;
461
+ /** Short hover summary shown for the annotation tag. */
462
+ readonly hoverSummary?: string;
463
+ /** Full markdown hover body for the annotation tag. */
464
+ readonly hoverMarkdown?: string;
465
+ }
466
+
347
467
  /**
348
468
  * Registration for a custom constraint that maps to JSON Schema keywords.
349
469
  *
@@ -740,6 +860,24 @@ export declare interface DiscriminatorResolutionOptions {
740
860
  readonly apiNamePrefix?: string | undefined;
741
861
  }
742
862
 
863
+ /**
864
+ * Complete DSL policy for a FormSpec project.
865
+ *
866
+ * @public
867
+ */
868
+ declare interface DSLPolicy {
869
+ /** Field type constraints */
870
+ fieldTypes?: FieldTypeConstraints;
871
+ /** Layout and structure constraints */
872
+ layout?: LayoutConstraints;
873
+ /** UI schema feature constraints */
874
+ uiSchema?: UISchemaConstraints;
875
+ /** Field configuration option constraints */
876
+ fieldOptions?: FieldOptionConstraints;
877
+ /** Control options constraints */
878
+ controlOptions?: ControlOptionConstraints;
879
+ }
880
+
743
881
  /**
744
882
  * Enum-member display names remain unset unless authored explicitly.
745
883
  *
@@ -1334,8 +1472,7 @@ declare interface FieldTypeConstraints {
1334
1472
  /* Excluded from this release type: _fixupDecimalPathConstraints */
1335
1473
 
1336
1474
  /**
1337
- * Top-level FormSpec configuration file structure.
1338
- * The .formspec.yml file uses this structure.
1475
+ * Top-level FormSpec configuration structure.
1339
1476
  *
1340
1477
  * @public
1341
1478
  */
@@ -1345,9 +1482,11 @@ export declare interface FormSpecConfig {
1345
1482
  * annotations, and vocabulary keywords.
1346
1483
  */
1347
1484
  readonly extensions?: readonly ExtensionDefinition_3[];
1348
- /** Constraint surface configuration — controls which field types,
1349
- * layouts, UI features, and field/control options are allowed. */
1350
- readonly constraints?: ConstraintConfig;
1485
+ /**
1486
+ * DSL-policy surface configuration controlling which field types,
1487
+ * layouts, UI features, and field/control options are allowed.
1488
+ */
1489
+ readonly constraints?: DSLPolicy;
1351
1490
  /**
1352
1491
  * Metadata inference and naming policy. Controls how apiName,
1353
1492
  * displayName, and plural forms are derived when not authored.
@@ -1367,6 +1506,11 @@ export declare interface FormSpecConfig {
1367
1506
  * @defaultValue "enum"
1368
1507
  */
1369
1508
  readonly enumSerialization?: "enum" | "oneOf" | "smart-size";
1509
+ /**
1510
+ * JSON Schema serialization settings for vocabulary and dialect emission.
1511
+ * PR-1 stores and resolves this block; PR-2 consumes it.
1512
+ */
1513
+ readonly serialization?: FormSpecSerializationConfig;
1370
1514
  /**
1371
1515
  * Per-package configuration overrides for monorepos.
1372
1516
  * Keys are glob patterns matched against file paths relative to
@@ -1382,14 +1526,31 @@ export declare interface FormSpecConfig {
1382
1526
  * @public
1383
1527
  */
1384
1528
  declare interface FormSpecPackageOverride {
1385
- /** Override constraint surface for this package. */
1386
- readonly constraints?: ConstraintConfig;
1529
+ /** Override DSL policy for this package. */
1530
+ readonly constraints?: DSLPolicy;
1387
1531
  /** Override enum serialization for this package. */
1388
1532
  readonly enumSerialization?: "enum" | "oneOf" | "smart-size";
1389
1533
  /** Override metadata policy for this package. */
1390
1534
  readonly metadata?: MetadataPolicyInput_2;
1391
1535
  }
1392
1536
 
1537
+ /**
1538
+ * Forward-looking JSON Schema serialization settings.
1539
+ *
1540
+ * These values are currently carried through configuration for future
1541
+ * vocabulary and dialect emission.
1542
+ *
1543
+ * @public
1544
+ */
1545
+ declare interface FormSpecSerializationConfig {
1546
+ /** Base URL used to construct default FormSpec vocabulary URLs. */
1547
+ readonly vocabularyBaseUrl?: string;
1548
+ /** Per-vocabulary URL overrides keyed by vocabulary identifier. */
1549
+ readonly vocabularyUrls?: Readonly<Record<string, string>>;
1550
+ /** Explicit FormSpec dialect URL override. */
1551
+ readonly dialectUrl?: string;
1552
+ }
1553
+
1393
1554
  /**
1394
1555
  * Options for generating schemas from a decorated class.
1395
1556
  *
@@ -1560,6 +1721,8 @@ export declare interface JsonSchema2020 {
1560
1721
  description?: string;
1561
1722
  /** Default value suggested for the schema node. */
1562
1723
  default?: unknown;
1724
+ /** Documentation example values (from one or more `@example` tags). */
1725
+ examples?: unknown[];
1563
1726
  /** Whether the schema node is deprecated. */
1564
1727
  deprecated?: boolean;
1565
1728
  /** Additional vendor-prefixed extension keywords. */
@@ -1601,7 +1764,7 @@ declare interface LayoutConstraints {
1601
1764
  }
1602
1765
 
1603
1766
  /**
1604
- * JSONForms layout type constraints.
1767
+ * JSON Forms layout type constraints.
1605
1768
  *
1606
1769
  * @public
1607
1770
  */
@@ -2385,7 +2548,7 @@ export declare interface RuleConditionSchema {
2385
2548
  }
2386
2549
 
2387
2550
  /**
2388
- * JSONForms rule constraints.
2551
+ * JSON Forms rule constraints.
2389
2552
  *
2390
2553
  * @public
2391
2554
  */
@@ -2412,7 +2575,7 @@ declare interface RuleConstraints {
2412
2575
  export declare type RuleEffect = "DISABLE" | "ENABLE" | "HIDE" | "SHOW";
2413
2576
 
2414
2577
  /**
2415
- * JSONForms rule effect constraints.
2578
+ * JSON Forms rule effect constraints.
2416
2579
  *
2417
2580
  * @public
2418
2581
  */
@@ -2442,7 +2605,7 @@ export declare interface SchemaBasedCondition {
2442
2605
  export { setSchemaExtension }
2443
2606
 
2444
2607
  /**
2445
- * Severity level for constraint violations.
2608
+ * Severity level for DSL-policy violations.
2446
2609
  * - "error": Violation fails validation
2447
2610
  * - "warn": Violation emits warning but passes
2448
2611
  * - "off": Feature is allowed (no violation)
@@ -2521,7 +2684,7 @@ export declare interface StaticSchemaGenerationOptions {
2521
2684
  export declare type UISchema = Categorization | GroupLayout | HorizontalLayout | VerticalLayout;
2522
2685
 
2523
2686
  /**
2524
- * UI Schema feature constraints - control JSONForms-specific features.
2687
+ * UI schema feature constraints - control JSON Forms-specific features.
2525
2688
  *
2526
2689
  * @public
2527
2690
  */