@stripe/extensibility-jsonschema-tools 1.0.0 → 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.
- package/dist/extensibility-jsonschema-tools-alpha.d.ts +194 -31
- package/dist/extensibility-jsonschema-tools-beta.d.ts +194 -31
- package/dist/extensibility-jsonschema-tools-internal.d.ts +194 -31
- package/dist/extensibility-jsonschema-tools-public.d.ts +194 -31
- package/dist/index.cjs +2468 -2151
- package/dist/index.d.cts +197 -31
- package/dist/index.d.ts +197 -31
- package/dist/index.js +2468 -2151
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +5 -5
|
@@ -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.
|
|
@@ -150,24 +174,6 @@ export declare interface _ConfigTypeRef {
|
|
|
150
174
|
*/
|
|
151
175
|
export declare type _ConfigUiSchema = UISchema;
|
|
152
176
|
|
|
153
|
-
/**
|
|
154
|
-
* Complete constraint configuration for a FormSpec project.
|
|
155
|
-
*
|
|
156
|
-
* @public
|
|
157
|
-
*/
|
|
158
|
-
declare interface ConstraintConfig {
|
|
159
|
-
/** Field type constraints */
|
|
160
|
-
fieldTypes?: FieldTypeConstraints;
|
|
161
|
-
/** Layout and structure constraints */
|
|
162
|
-
layout?: LayoutConstraints;
|
|
163
|
-
/** UI Schema feature constraints */
|
|
164
|
-
uiSchema?: UISchemaConstraints;
|
|
165
|
-
/** Field configuration option constraints */
|
|
166
|
-
fieldOptions?: FieldOptionConstraints;
|
|
167
|
-
/** Control options constraints */
|
|
168
|
-
controlOptions?: ControlOptionConstraints;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
177
|
/**
|
|
172
178
|
* Semantic metadata for ordered custom constraints that should participate in
|
|
173
179
|
* the generic contradiction/broadening logic.
|
|
@@ -303,7 +309,7 @@ export declare interface ControlElement {
|
|
|
303
309
|
}
|
|
304
310
|
|
|
305
311
|
/**
|
|
306
|
-
* Control options constraints - control which
|
|
312
|
+
* Control options constraints - control which JSON Forms Control.options are allowed.
|
|
307
313
|
* These are renderer-specific options that may not be universally supported.
|
|
308
314
|
*
|
|
309
315
|
* @public
|
|
@@ -334,6 +340,19 @@ declare interface ControlOptionConstraints {
|
|
|
334
340
|
export declare interface CustomAnnotationRegistration {
|
|
335
341
|
/** The annotation name, unique within the extension. */
|
|
336
342
|
readonly annotationName: string;
|
|
343
|
+
/**
|
|
344
|
+
* Optional type-level inheritance behavior for semantic consumers.
|
|
345
|
+
*
|
|
346
|
+
* `"local-wins"` means a derived declaration inherits this annotation from
|
|
347
|
+
* its base declaration only when the derived declaration does not provide the
|
|
348
|
+
* same extension annotation identity locally. Omitted registrations behave as
|
|
349
|
+
* `"never"`.
|
|
350
|
+
*/
|
|
351
|
+
readonly inheritFromBase?: AnnotationInheritancePolicy;
|
|
352
|
+
/**
|
|
353
|
+
* Optional editor documentation for the annotation's TSDoc authoring tag.
|
|
354
|
+
*/
|
|
355
|
+
readonly tagDocumentation?: CustomAnnotationTagDocumentation;
|
|
337
356
|
/**
|
|
338
357
|
* Optionally converts the annotation value into JSON Schema keywords.
|
|
339
358
|
* If omitted, the annotation has no JSON Schema representation (UI-only).
|
|
@@ -352,6 +371,19 @@ export declare interface CustomAnnotationRegistration {
|
|
|
352
371
|
declare interface CustomAnnotationRegistration_2 {
|
|
353
372
|
/** The annotation name, unique within the extension. */
|
|
354
373
|
readonly annotationName: string;
|
|
374
|
+
/**
|
|
375
|
+
* Optional type-level inheritance behavior for semantic consumers.
|
|
376
|
+
*
|
|
377
|
+
* `"local-wins"` means a derived declaration inherits this annotation from
|
|
378
|
+
* its base declaration only when the derived declaration does not provide the
|
|
379
|
+
* same extension annotation identity locally. Omitted registrations behave as
|
|
380
|
+
* `"never"`.
|
|
381
|
+
*/
|
|
382
|
+
readonly inheritFromBase?: AnnotationInheritancePolicy$1;
|
|
383
|
+
/**
|
|
384
|
+
* Optional editor documentation for the annotation's TSDoc authoring tag.
|
|
385
|
+
*/
|
|
386
|
+
readonly tagDocumentation?: CustomAnnotationTagDocumentation$1;
|
|
355
387
|
/**
|
|
356
388
|
* Optionally converts the annotation value into JSON Schema keywords.
|
|
357
389
|
* If omitted, the annotation has no JSON Schema representation (UI-only).
|
|
@@ -370,6 +402,19 @@ declare interface CustomAnnotationRegistration_2 {
|
|
|
370
402
|
declare interface CustomAnnotationRegistration_3 {
|
|
371
403
|
/** The annotation name, unique within the extension. */
|
|
372
404
|
readonly annotationName: string;
|
|
405
|
+
/**
|
|
406
|
+
* Optional type-level inheritance behavior for semantic consumers.
|
|
407
|
+
*
|
|
408
|
+
* `"local-wins"` means a derived declaration inherits this annotation from
|
|
409
|
+
* its base declaration only when the derived declaration does not provide the
|
|
410
|
+
* same extension annotation identity locally. Omitted registrations behave as
|
|
411
|
+
* `"never"`.
|
|
412
|
+
*/
|
|
413
|
+
readonly inheritFromBase?: AnnotationInheritancePolicy_2;
|
|
414
|
+
/**
|
|
415
|
+
* Optional editor documentation for the annotation's TSDoc authoring tag.
|
|
416
|
+
*/
|
|
417
|
+
readonly tagDocumentation?: CustomAnnotationTagDocumentation_2;
|
|
373
418
|
/**
|
|
374
419
|
* Optionally converts the annotation value into JSON Schema keywords.
|
|
375
420
|
* If omitted, the annotation has no JSON Schema representation (UI-only).
|
|
@@ -377,6 +422,81 @@ declare interface CustomAnnotationRegistration_3 {
|
|
|
377
422
|
readonly toJsonSchema?: (value: ExtensionPayloadValue_2, vendorPrefix: string) => Record<string, unknown>;
|
|
378
423
|
}
|
|
379
424
|
|
|
425
|
+
/**
|
|
426
|
+
* Documentation text for an extension annotation's TSDoc authoring tag.
|
|
427
|
+
*
|
|
428
|
+
* These strings are consumed by editor integrations for completion details and
|
|
429
|
+
* hover text. They do not affect annotation parsing, inheritance, or schema
|
|
430
|
+
* emission.
|
|
431
|
+
*
|
|
432
|
+
* @public
|
|
433
|
+
*/
|
|
434
|
+
declare interface CustomAnnotationTagDocumentation$1 {
|
|
435
|
+
/** Completion detail shown beside the annotation tag. */
|
|
436
|
+
readonly completionDetail?: string;
|
|
437
|
+
/**
|
|
438
|
+
* Label for the payload portion of the annotation tag signature.
|
|
439
|
+
*
|
|
440
|
+
* The payload remains the full authored text after the tag name, so this can
|
|
441
|
+
* describe single-argument or multi-argument annotation syntaxes.
|
|
442
|
+
*/
|
|
443
|
+
readonly payloadLabel?: string;
|
|
444
|
+
/** Short hover summary shown for the annotation tag. */
|
|
445
|
+
readonly hoverSummary?: string;
|
|
446
|
+
/** Full markdown hover body for the annotation tag. */
|
|
447
|
+
readonly hoverMarkdown?: string;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Documentation text for an extension annotation's TSDoc authoring tag.
|
|
452
|
+
*
|
|
453
|
+
* These strings are consumed by editor integrations for completion details and
|
|
454
|
+
* hover text. They do not affect annotation parsing, inheritance, or schema
|
|
455
|
+
* emission.
|
|
456
|
+
*
|
|
457
|
+
* @public
|
|
458
|
+
*/
|
|
459
|
+
declare interface CustomAnnotationTagDocumentation {
|
|
460
|
+
/** Completion detail shown beside the annotation tag. */
|
|
461
|
+
readonly completionDetail?: string;
|
|
462
|
+
/**
|
|
463
|
+
* Label for the payload portion of the annotation tag signature.
|
|
464
|
+
*
|
|
465
|
+
* The payload remains the full authored text after the tag name, so this can
|
|
466
|
+
* describe single-argument or multi-argument annotation syntaxes.
|
|
467
|
+
*/
|
|
468
|
+
readonly payloadLabel?: string;
|
|
469
|
+
/** Short hover summary shown for the annotation tag. */
|
|
470
|
+
readonly hoverSummary?: string;
|
|
471
|
+
/** Full markdown hover body for the annotation tag. */
|
|
472
|
+
readonly hoverMarkdown?: string;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* Documentation text for an extension annotation's TSDoc authoring tag.
|
|
477
|
+
*
|
|
478
|
+
* These strings are consumed by editor integrations for completion details and
|
|
479
|
+
* hover text. They do not affect annotation parsing, inheritance, or schema
|
|
480
|
+
* emission.
|
|
481
|
+
*
|
|
482
|
+
* @public
|
|
483
|
+
*/
|
|
484
|
+
declare interface CustomAnnotationTagDocumentation_2 {
|
|
485
|
+
/** Completion detail shown beside the annotation tag. */
|
|
486
|
+
readonly completionDetail?: string;
|
|
487
|
+
/**
|
|
488
|
+
* Label for the payload portion of the annotation tag signature.
|
|
489
|
+
*
|
|
490
|
+
* The payload remains the full authored text after the tag name, so this can
|
|
491
|
+
* describe single-argument or multi-argument annotation syntaxes.
|
|
492
|
+
*/
|
|
493
|
+
readonly payloadLabel?: string;
|
|
494
|
+
/** Short hover summary shown for the annotation tag. */
|
|
495
|
+
readonly hoverSummary?: string;
|
|
496
|
+
/** Full markdown hover body for the annotation tag. */
|
|
497
|
+
readonly hoverMarkdown?: string;
|
|
498
|
+
}
|
|
499
|
+
|
|
380
500
|
/**
|
|
381
501
|
* Registration for a custom constraint that maps to JSON Schema keywords.
|
|
382
502
|
*
|
|
@@ -773,6 +893,24 @@ export declare interface DiscriminatorResolutionOptions {
|
|
|
773
893
|
readonly apiNamePrefix?: string | undefined;
|
|
774
894
|
}
|
|
775
895
|
|
|
896
|
+
/**
|
|
897
|
+
* Complete DSL policy for a FormSpec project.
|
|
898
|
+
*
|
|
899
|
+
* @public
|
|
900
|
+
*/
|
|
901
|
+
declare interface DSLPolicy {
|
|
902
|
+
/** Field type constraints */
|
|
903
|
+
fieldTypes?: FieldTypeConstraints;
|
|
904
|
+
/** Layout and structure constraints */
|
|
905
|
+
layout?: LayoutConstraints;
|
|
906
|
+
/** UI schema feature constraints */
|
|
907
|
+
uiSchema?: UISchemaConstraints;
|
|
908
|
+
/** Field configuration option constraints */
|
|
909
|
+
fieldOptions?: FieldOptionConstraints;
|
|
910
|
+
/** Control options constraints */
|
|
911
|
+
controlOptions?: ControlOptionConstraints;
|
|
912
|
+
}
|
|
913
|
+
|
|
776
914
|
/**
|
|
777
915
|
* Enum-member display names remain unset unless authored explicitly.
|
|
778
916
|
*
|
|
@@ -1421,8 +1559,7 @@ declare interface FieldTypeConstraints {
|
|
|
1421
1559
|
export declare function _fixupDecimalPathConstraints(schema: JsonSchema2020): JsonSchema2020;
|
|
1422
1560
|
|
|
1423
1561
|
/**
|
|
1424
|
-
* Top-level FormSpec configuration
|
|
1425
|
-
* The .formspec.yml file uses this structure.
|
|
1562
|
+
* Top-level FormSpec configuration structure.
|
|
1426
1563
|
*
|
|
1427
1564
|
* @public
|
|
1428
1565
|
*/
|
|
@@ -1432,9 +1569,11 @@ export declare interface FormSpecConfig {
|
|
|
1432
1569
|
* annotations, and vocabulary keywords.
|
|
1433
1570
|
*/
|
|
1434
1571
|
readonly extensions?: readonly ExtensionDefinition_3[];
|
|
1435
|
-
/**
|
|
1436
|
-
*
|
|
1437
|
-
|
|
1572
|
+
/**
|
|
1573
|
+
* DSL-policy surface configuration controlling which field types,
|
|
1574
|
+
* layouts, UI features, and field/control options are allowed.
|
|
1575
|
+
*/
|
|
1576
|
+
readonly constraints?: DSLPolicy;
|
|
1438
1577
|
/**
|
|
1439
1578
|
* Metadata inference and naming policy. Controls how apiName,
|
|
1440
1579
|
* displayName, and plural forms are derived when not authored.
|
|
@@ -1454,6 +1593,11 @@ export declare interface FormSpecConfig {
|
|
|
1454
1593
|
* @defaultValue "enum"
|
|
1455
1594
|
*/
|
|
1456
1595
|
readonly enumSerialization?: "enum" | "oneOf" | "smart-size";
|
|
1596
|
+
/**
|
|
1597
|
+
* JSON Schema serialization settings for vocabulary and dialect emission.
|
|
1598
|
+
* PR-1 stores and resolves this block; PR-2 consumes it.
|
|
1599
|
+
*/
|
|
1600
|
+
readonly serialization?: FormSpecSerializationConfig;
|
|
1457
1601
|
/**
|
|
1458
1602
|
* Per-package configuration overrides for monorepos.
|
|
1459
1603
|
* Keys are glob patterns matched against file paths relative to
|
|
@@ -1469,14 +1613,31 @@ export declare interface FormSpecConfig {
|
|
|
1469
1613
|
* @public
|
|
1470
1614
|
*/
|
|
1471
1615
|
declare interface FormSpecPackageOverride {
|
|
1472
|
-
/** Override
|
|
1473
|
-
readonly constraints?:
|
|
1616
|
+
/** Override DSL policy for this package. */
|
|
1617
|
+
readonly constraints?: DSLPolicy;
|
|
1474
1618
|
/** Override enum serialization for this package. */
|
|
1475
1619
|
readonly enumSerialization?: "enum" | "oneOf" | "smart-size";
|
|
1476
1620
|
/** Override metadata policy for this package. */
|
|
1477
1621
|
readonly metadata?: MetadataPolicyInput_2;
|
|
1478
1622
|
}
|
|
1479
1623
|
|
|
1624
|
+
/**
|
|
1625
|
+
* Forward-looking JSON Schema serialization settings.
|
|
1626
|
+
*
|
|
1627
|
+
* These values are currently carried through configuration for future
|
|
1628
|
+
* vocabulary and dialect emission.
|
|
1629
|
+
*
|
|
1630
|
+
* @public
|
|
1631
|
+
*/
|
|
1632
|
+
declare interface FormSpecSerializationConfig {
|
|
1633
|
+
/** Base URL used to construct default FormSpec vocabulary URLs. */
|
|
1634
|
+
readonly vocabularyBaseUrl?: string;
|
|
1635
|
+
/** Per-vocabulary URL overrides keyed by vocabulary identifier. */
|
|
1636
|
+
readonly vocabularyUrls?: Readonly<Record<string, string>>;
|
|
1637
|
+
/** Explicit FormSpec dialect URL override. */
|
|
1638
|
+
readonly dialectUrl?: string;
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1480
1641
|
/**
|
|
1481
1642
|
* Options for generating schemas from a decorated class.
|
|
1482
1643
|
*
|
|
@@ -1656,6 +1817,8 @@ export declare interface JsonSchema2020 {
|
|
|
1656
1817
|
description?: string;
|
|
1657
1818
|
/** Default value suggested for the schema node. */
|
|
1658
1819
|
default?: unknown;
|
|
1820
|
+
/** Documentation example values (from one or more `@example` tags). */
|
|
1821
|
+
examples?: unknown[];
|
|
1659
1822
|
/** Whether the schema node is deprecated. */
|
|
1660
1823
|
deprecated?: boolean;
|
|
1661
1824
|
/** Additional vendor-prefixed extension keywords. */
|
|
@@ -1697,7 +1860,7 @@ declare interface LayoutConstraints {
|
|
|
1697
1860
|
}
|
|
1698
1861
|
|
|
1699
1862
|
/**
|
|
1700
|
-
*
|
|
1863
|
+
* JSON Forms layout type constraints.
|
|
1701
1864
|
*
|
|
1702
1865
|
* @public
|
|
1703
1866
|
*/
|
|
@@ -2506,7 +2669,7 @@ export declare interface RuleConditionSchema {
|
|
|
2506
2669
|
}
|
|
2507
2670
|
|
|
2508
2671
|
/**
|
|
2509
|
-
*
|
|
2672
|
+
* JSON Forms rule constraints.
|
|
2510
2673
|
*
|
|
2511
2674
|
* @public
|
|
2512
2675
|
*/
|
|
@@ -2533,7 +2696,7 @@ declare interface RuleConstraints {
|
|
|
2533
2696
|
export declare type RuleEffect = "DISABLE" | "ENABLE" | "HIDE" | "SHOW";
|
|
2534
2697
|
|
|
2535
2698
|
/**
|
|
2536
|
-
*
|
|
2699
|
+
* JSON Forms rule effect constraints.
|
|
2537
2700
|
*
|
|
2538
2701
|
* @public
|
|
2539
2702
|
*/
|
|
@@ -2563,7 +2726,7 @@ export declare interface SchemaBasedCondition {
|
|
|
2563
2726
|
export { setSchemaExtension }
|
|
2564
2727
|
|
|
2565
2728
|
/**
|
|
2566
|
-
* Severity level for
|
|
2729
|
+
* Severity level for DSL-policy violations.
|
|
2567
2730
|
* - "error": Violation fails validation
|
|
2568
2731
|
* - "warn": Violation emits warning but passes
|
|
2569
2732
|
* - "off": Feature is allowed (no violation)
|
|
@@ -2684,7 +2847,7 @@ export declare const _stripeStdlibExtension: ExtensionDefinition;
|
|
|
2684
2847
|
export declare type UISchema = Categorization | GroupLayout | HorizontalLayout | VerticalLayout;
|
|
2685
2848
|
|
|
2686
2849
|
/**
|
|
2687
|
-
* UI
|
|
2850
|
+
* UI schema feature constraints - control JSON Forms-specific features.
|
|
2688
2851
|
*
|
|
2689
2852
|
* @public
|
|
2690
2853
|
*/
|
|
@@ -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
|
|
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
|
|
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
|
-
/**
|
|
1349
|
-
*
|
|
1350
|
-
|
|
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
|
|
1386
|
-
readonly constraints?:
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
|
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
|
|
2687
|
+
* UI schema feature constraints - control JSON Forms-specific features.
|
|
2525
2688
|
*
|
|
2526
2689
|
* @public
|
|
2527
2690
|
*/
|