@stripe/extensibility-jsonschema-tools 1.0.1 → 1.0.3-preview.0
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 +25 -909
- package/dist/extensibility-jsonschema-tools-beta.d.ts +25 -909
- package/dist/extensibility-jsonschema-tools-internal.d.ts +25 -907
- package/dist/extensibility-jsonschema-tools-public.d.ts +25 -909
- package/dist/extract-config-schemas.d.ts +4 -2
- package/dist/extract-config-schemas.d.ts.map +1 -1
- package/dist/fixup-decimal-path-constraints.d.ts +1 -1
- package/dist/fixup-decimal-path-constraints.d.ts.map +1 -1
- package/dist/generate-schemas.d.ts +2 -2
- package/dist/generate-schemas.d.ts.map +1 -1
- package/dist/index.cjs +24 -12
- package/dist/index.d.cts +52 -942
- package/dist/index.d.ts +52 -942
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -12
- package/dist/stdlib-extension.d.ts +2 -2
- package/dist/stdlib-extension.d.ts.map +1 -1
- package/dist/stripe-formspec-config.d.ts +1 -1
- package/dist/stripe-formspec-config.d.ts.map +1 -1
- package/dist/stripe-schema-defaults.d.ts +1 -1
- package/dist/stripe-schema-defaults.d.ts.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
import { FormSpecConfig } from '@stripe/formspec-config';
|
|
2
|
+
export { FormSpecConfig } from '@stripe/formspec-config';
|
|
1
3
|
import * as ts from 'typescript';
|
|
2
|
-
export { ExtendedJSONSchema7, getSchemaExtension, jsonSchema7Schema, setSchemaExtension, uiSchemaSchema } from '@formspec
|
|
4
|
+
export { ExtendedJSONSchema7, getSchemaExtension, jsonSchema7Schema, setSchemaExtension, uiSchemaSchema } from '@stripe/formspec-build/browser';
|
|
3
5
|
|
|
4
6
|
/**
|
|
5
7
|
* Per-declaration metadata policy input.
|
|
6
8
|
*
|
|
7
9
|
* @public
|
|
8
10
|
*/
|
|
9
|
-
declare interface DeclarationMetadataPolicyInput$
|
|
11
|
+
declare interface DeclarationMetadataPolicyInput$1 {
|
|
10
12
|
/** Policy for JSON-facing serialized names. */
|
|
11
|
-
readonly apiName?: MetadataValuePolicyInput$
|
|
13
|
+
readonly apiName?: MetadataValuePolicyInput$1 | undefined;
|
|
12
14
|
/** Policy for human-facing labels and titles. */
|
|
13
|
-
readonly displayName?: MetadataValuePolicyInput$
|
|
15
|
+
readonly displayName?: MetadataValuePolicyInput$1 | undefined;
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
/* Excluded from this release type: DynamicTypeNode */
|
|
@@ -24,7 +26,7 @@ declare interface DeclarationMetadataPolicyInput$2 {
|
|
|
24
26
|
*
|
|
25
27
|
* @public
|
|
26
28
|
*/
|
|
27
|
-
declare interface EnumMemberDisplayNameDisabledPolicyInput$
|
|
29
|
+
declare interface EnumMemberDisplayNameDisabledPolicyInput$1 {
|
|
28
30
|
/** Leaves missing enum-member display names unresolved. */
|
|
29
31
|
readonly mode: "disabled";
|
|
30
32
|
}
|
|
@@ -34,11 +36,11 @@ declare interface EnumMemberDisplayNameDisabledPolicyInput$2 {
|
|
|
34
36
|
*
|
|
35
37
|
* @public
|
|
36
38
|
*/
|
|
37
|
-
declare interface EnumMemberDisplayNameInferIfMissingPolicyInput$
|
|
39
|
+
declare interface EnumMemberDisplayNameInferIfMissingPolicyInput$1 {
|
|
38
40
|
/** Infers an enum-member display name when it is not authored explicitly. */
|
|
39
41
|
readonly mode: "infer-if-missing";
|
|
40
42
|
/** Callback used to infer the missing display name. */
|
|
41
|
-
readonly infer: EnumMemberMetadataInferenceFn$
|
|
43
|
+
readonly infer: EnumMemberMetadataInferenceFn$1;
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
/**
|
|
@@ -46,14 +48,14 @@ declare interface EnumMemberDisplayNameInferIfMissingPolicyInput$2 {
|
|
|
46
48
|
*
|
|
47
49
|
* @public
|
|
48
50
|
*/
|
|
49
|
-
declare type EnumMemberDisplayNamePolicyInput$
|
|
51
|
+
declare type EnumMemberDisplayNamePolicyInput$1 = EnumMemberDisplayNameDisabledPolicyInput$1 | EnumMemberDisplayNameRequireExplicitPolicyInput$1 | EnumMemberDisplayNameInferIfMissingPolicyInput$1;
|
|
50
52
|
|
|
51
53
|
/**
|
|
52
54
|
* Enum members must declare display names explicitly.
|
|
53
55
|
*
|
|
54
56
|
* @public
|
|
55
57
|
*/
|
|
56
|
-
declare interface EnumMemberDisplayNameRequireExplicitPolicyInput$
|
|
58
|
+
declare interface EnumMemberDisplayNameRequireExplicitPolicyInput$1 {
|
|
57
59
|
/** Fails when an enum member has no authored display name. */
|
|
58
60
|
readonly mode: "require-explicit";
|
|
59
61
|
}
|
|
@@ -67,7 +69,7 @@ declare interface EnumMemberDisplayNameRequireExplicitPolicyInput$2 {
|
|
|
67
69
|
*
|
|
68
70
|
* @public
|
|
69
71
|
*/
|
|
70
|
-
declare interface EnumMemberMetadataInferenceContext$
|
|
72
|
+
declare interface EnumMemberMetadataInferenceContext$1 {
|
|
71
73
|
/** Authoring surface the enum originated from. */
|
|
72
74
|
readonly surface: MetadataAuthoringSurface$2;
|
|
73
75
|
/** Logical member identifier used for policy inference. */
|
|
@@ -83,16 +85,16 @@ declare interface EnumMemberMetadataInferenceContext$2 {
|
|
|
83
85
|
*
|
|
84
86
|
* @public
|
|
85
87
|
*/
|
|
86
|
-
declare type EnumMemberMetadataInferenceFn$
|
|
88
|
+
declare type EnumMemberMetadataInferenceFn$1 = (context: EnumMemberMetadataInferenceContext$1) => string;
|
|
87
89
|
|
|
88
90
|
/**
|
|
89
91
|
* User-facing enum-member metadata policy input.
|
|
90
92
|
*
|
|
91
93
|
* @public
|
|
92
94
|
*/
|
|
93
|
-
declare interface EnumMemberMetadataPolicyInput$
|
|
95
|
+
declare interface EnumMemberMetadataPolicyInput$1 {
|
|
94
96
|
/** Policy for human-facing enum-member labels. */
|
|
95
|
-
readonly displayName?: EnumMemberDisplayNamePolicyInput$
|
|
97
|
+
readonly displayName?: EnumMemberDisplayNamePolicyInput$1 | undefined;
|
|
96
98
|
}
|
|
97
99
|
|
|
98
100
|
/**
|
|
@@ -133,14 +135,14 @@ declare interface MetadataInferenceContext$2 {
|
|
|
133
135
|
*
|
|
134
136
|
* @public
|
|
135
137
|
*/
|
|
136
|
-
declare type MetadataInferenceFn$
|
|
138
|
+
declare type MetadataInferenceFn$1 = (context: MetadataInferenceContext$2) => string;
|
|
137
139
|
|
|
138
140
|
/**
|
|
139
141
|
* Context passed to pluralization callbacks.
|
|
140
142
|
*
|
|
141
143
|
* @public
|
|
142
144
|
*/
|
|
143
|
-
declare interface MetadataPluralizationContext$
|
|
145
|
+
declare interface MetadataPluralizationContext$1 extends MetadataInferenceContext$2 {
|
|
144
146
|
/** Singular value that pluralization should derive from. */
|
|
145
147
|
readonly singular: string;
|
|
146
148
|
}
|
|
@@ -150,7 +152,7 @@ declare interface MetadataPluralizationContext$2 extends MetadataInferenceContex
|
|
|
150
152
|
*
|
|
151
153
|
* @public
|
|
152
154
|
*/
|
|
153
|
-
declare interface MetadataPluralizationDisabledPolicyInput$
|
|
155
|
+
declare interface MetadataPluralizationDisabledPolicyInput$1 {
|
|
154
156
|
/** Disables automatic plural-value generation. */
|
|
155
157
|
readonly mode?: "disabled" | undefined;
|
|
156
158
|
}
|
|
@@ -160,18 +162,18 @@ declare interface MetadataPluralizationDisabledPolicyInput$2 {
|
|
|
160
162
|
*
|
|
161
163
|
* @public
|
|
162
164
|
*/
|
|
163
|
-
declare type MetadataPluralizationFn$
|
|
165
|
+
declare type MetadataPluralizationFn$1 = (context: MetadataPluralizationContext$1) => string;
|
|
164
166
|
|
|
165
167
|
/**
|
|
166
168
|
* Pluralization may be inferred when absent.
|
|
167
169
|
*
|
|
168
170
|
* @public
|
|
169
171
|
*/
|
|
170
|
-
declare interface MetadataPluralizationInferIfMissingPolicyInput$
|
|
172
|
+
declare interface MetadataPluralizationInferIfMissingPolicyInput$1 {
|
|
171
173
|
/** Infers plural values whenever no explicit plural is present. */
|
|
172
174
|
readonly mode: "infer-if-missing";
|
|
173
175
|
/** Callback that derives a plural form from the resolved singular value. */
|
|
174
|
-
readonly inflect: MetadataPluralizationFn$
|
|
176
|
+
readonly inflect: MetadataPluralizationFn$1;
|
|
175
177
|
}
|
|
176
178
|
|
|
177
179
|
/**
|
|
@@ -179,14 +181,14 @@ declare interface MetadataPluralizationInferIfMissingPolicyInput$2 {
|
|
|
179
181
|
*
|
|
180
182
|
* @public
|
|
181
183
|
*/
|
|
182
|
-
declare type MetadataPluralizationPolicyInput$
|
|
184
|
+
declare type MetadataPluralizationPolicyInput$1 = MetadataPluralizationDisabledPolicyInput$1 | MetadataPluralizationRequireExplicitPolicyInput$1 | MetadataPluralizationInferIfMissingPolicyInput$1;
|
|
183
185
|
|
|
184
186
|
/**
|
|
185
187
|
* Pluralization must be authored explicitly.
|
|
186
188
|
*
|
|
187
189
|
* @public
|
|
188
190
|
*/
|
|
189
|
-
declare interface MetadataPluralizationRequireExplicitPolicyInput$
|
|
191
|
+
declare interface MetadataPluralizationRequireExplicitPolicyInput$1 {
|
|
190
192
|
/** Requires plural values to be authored directly. */
|
|
191
193
|
readonly mode: "require-explicit";
|
|
192
194
|
}
|
|
@@ -198,13 +200,13 @@ declare interface MetadataPluralizationRequireExplicitPolicyInput$2 {
|
|
|
198
200
|
*/
|
|
199
201
|
declare interface MetadataPolicyInput$1 {
|
|
200
202
|
/** Policy applied to named types and the analyzed root declaration. */
|
|
201
|
-
readonly type?: DeclarationMetadataPolicyInput$
|
|
203
|
+
readonly type?: DeclarationMetadataPolicyInput$1 | undefined;
|
|
202
204
|
/** Policy applied to fields and object properties. */
|
|
203
|
-
readonly field?: DeclarationMetadataPolicyInput$
|
|
205
|
+
readonly field?: DeclarationMetadataPolicyInput$1 | undefined;
|
|
204
206
|
/** Policy applied to callable/method declarations. */
|
|
205
|
-
readonly method?: DeclarationMetadataPolicyInput$
|
|
207
|
+
readonly method?: DeclarationMetadataPolicyInput$1 | undefined;
|
|
206
208
|
/** Policy applied to enum-member display names during build-time IR resolution. */
|
|
207
|
-
readonly enumMember?: EnumMemberMetadataPolicyInput$
|
|
209
|
+
readonly enumMember?: EnumMemberMetadataPolicyInput$1 | undefined;
|
|
208
210
|
}
|
|
209
211
|
|
|
210
212
|
/**
|
|
@@ -212,11 +214,11 @@ declare interface MetadataPolicyInput$1 {
|
|
|
212
214
|
*
|
|
213
215
|
* @public
|
|
214
216
|
*/
|
|
215
|
-
declare interface MetadataValueDisabledPolicyInput$
|
|
217
|
+
declare interface MetadataValueDisabledPolicyInput$1 {
|
|
216
218
|
/** Disables inference for this scalar metadata value. */
|
|
217
219
|
readonly mode?: "disabled" | undefined;
|
|
218
220
|
/** Optional policy controlling plural forms of this scalar value. */
|
|
219
|
-
readonly pluralization?: MetadataPluralizationPolicyInput$
|
|
221
|
+
readonly pluralization?: MetadataPluralizationPolicyInput$1 | undefined;
|
|
220
222
|
}
|
|
221
223
|
|
|
222
224
|
/**
|
|
@@ -224,13 +226,13 @@ declare interface MetadataValueDisabledPolicyInput$2 {
|
|
|
224
226
|
*
|
|
225
227
|
* @public
|
|
226
228
|
*/
|
|
227
|
-
declare interface MetadataValueInferIfMissingPolicyInput$
|
|
229
|
+
declare interface MetadataValueInferIfMissingPolicyInput$1 {
|
|
228
230
|
/** Infers this scalar metadata value when it is not authored explicitly. */
|
|
229
231
|
readonly mode: "infer-if-missing";
|
|
230
232
|
/** Callback used to infer the missing singular value. */
|
|
231
|
-
readonly infer: MetadataInferenceFn$
|
|
233
|
+
readonly infer: MetadataInferenceFn$1;
|
|
232
234
|
/** Optional policy controlling plural forms of this scalar value. */
|
|
233
|
-
readonly pluralization?: MetadataPluralizationPolicyInput$
|
|
235
|
+
readonly pluralization?: MetadataPluralizationPolicyInput$1 | undefined;
|
|
234
236
|
}
|
|
235
237
|
|
|
236
238
|
/**
|
|
@@ -238,22 +240,22 @@ declare interface MetadataValueInferIfMissingPolicyInput$2 {
|
|
|
238
240
|
*
|
|
239
241
|
* @public
|
|
240
242
|
*/
|
|
241
|
-
declare type MetadataValuePolicyInput$
|
|
243
|
+
declare type MetadataValuePolicyInput$1 = MetadataValueDisabledPolicyInput$1 | MetadataValueRequireExplicitPolicyInput$1 | MetadataValueInferIfMissingPolicyInput$1;
|
|
242
244
|
|
|
243
245
|
/**
|
|
244
246
|
* Scalar metadata must be authored explicitly.
|
|
245
247
|
*
|
|
246
248
|
* @public
|
|
247
249
|
*/
|
|
248
|
-
declare interface MetadataValueRequireExplicitPolicyInput$
|
|
250
|
+
declare interface MetadataValueRequireExplicitPolicyInput$1 {
|
|
249
251
|
/** Requires this scalar metadata value to be authored directly. */
|
|
250
252
|
readonly mode: "require-explicit";
|
|
251
253
|
/** Optional policy controlling plural forms of this scalar value. */
|
|
252
|
-
readonly pluralization?: MetadataPluralizationPolicyInput$
|
|
254
|
+
readonly pluralization?: MetadataPluralizationPolicyInput$1 | undefined;
|
|
253
255
|
}
|
|
254
256
|
|
|
255
257
|
/**
|
|
256
|
-
* `@formspec
|
|
258
|
+
* `@stripe/formspec-build` - Build tools for FormSpec
|
|
257
259
|
*
|
|
258
260
|
* This package provides generators to compile FormSpec forms into:
|
|
259
261
|
* - JSON Schema 2020-12 (for validation)
|
|
@@ -261,8 +263,8 @@ declare interface MetadataValueRequireExplicitPolicyInput$2 {
|
|
|
261
263
|
*
|
|
262
264
|
* @example
|
|
263
265
|
* ```typescript
|
|
264
|
-
* import { buildFormSchemas } from "@formspec
|
|
265
|
-
* import { formspec, field, group } from "@formspec
|
|
266
|
+
* import { buildFormSchemas } from "@stripe/formspec-build";
|
|
267
|
+
* import { formspec, field, group } from "@stripe/formspec-dsl";
|
|
266
268
|
*
|
|
267
269
|
* const form = formspec(
|
|
268
270
|
* group("Customer",
|
|
@@ -287,14 +289,6 @@ declare interface MetadataValueRequireExplicitPolicyInput$2 {
|
|
|
287
289
|
*/
|
|
288
290
|
declare type AnnotationInheritancePolicy$1 = "local-wins" | "never";
|
|
289
291
|
|
|
290
|
-
/**
|
|
291
|
-
* Controls whether a type-level annotation can flow from a base declaration to
|
|
292
|
-
* a derived declaration during semantic analysis.
|
|
293
|
-
*
|
|
294
|
-
* @public
|
|
295
|
-
*/
|
|
296
|
-
declare type AnnotationInheritancePolicy_2 = "local-wins" | "never";
|
|
297
|
-
|
|
298
292
|
|
|
299
293
|
/**
|
|
300
294
|
* Registration for mapping a built-in TSDoc tag onto a custom constraint when
|
|
@@ -311,21 +305,6 @@ declare interface BuiltinConstraintBroadeningRegistration_2 {
|
|
|
311
305
|
readonly parseValue: (raw: string) => ExtensionPayloadValue$1;
|
|
312
306
|
}
|
|
313
307
|
|
|
314
|
-
/**
|
|
315
|
-
* Registration for mapping a built-in TSDoc tag onto a custom constraint when
|
|
316
|
-
* it is used on a particular custom type.
|
|
317
|
-
*
|
|
318
|
-
* @public
|
|
319
|
-
*/
|
|
320
|
-
declare interface BuiltinConstraintBroadeningRegistration_3 {
|
|
321
|
-
/** The built-in tag being broadened, without the `@` prefix. */
|
|
322
|
-
readonly tagName: BuiltinConstraintName_2;
|
|
323
|
-
/** The custom constraint to emit for this built-in tag. */
|
|
324
|
-
readonly constraintName: string;
|
|
325
|
-
/** Parser from raw TSDoc text to extension payload. */
|
|
326
|
-
readonly parseValue: (raw: string) => ExtensionPayloadValue_2;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
308
|
/**
|
|
330
309
|
* Type of a built-in constraint name.
|
|
331
310
|
*
|
|
@@ -333,13 +312,6 @@ declare interface BuiltinConstraintBroadeningRegistration_3 {
|
|
|
333
312
|
*/
|
|
334
313
|
declare type BuiltinConstraintName$1 = "minimum" | "maximum" | "exclusiveMinimum" | "exclusiveMaximum" | "multipleOf" | "minLength" | "maxLength" | "minItems" | "maxItems" | "uniqueItems" | "pattern" | "const" | "enumOptions";
|
|
335
314
|
|
|
336
|
-
/**
|
|
337
|
-
* Type of a built-in constraint name.
|
|
338
|
-
*
|
|
339
|
-
* @public
|
|
340
|
-
*/
|
|
341
|
-
declare type BuiltinConstraintName_2 = "minimum" | "maximum" | "exclusiveMinimum" | "exclusiveMaximum" | "multipleOf" | "minLength" | "maxLength" | "minItems" | "maxItems" | "uniqueItems" | "pattern" | "const" | "enumOptions";
|
|
342
|
-
|
|
343
315
|
/**
|
|
344
316
|
* A Categorization element (tab-based layout).
|
|
345
317
|
*
|
|
@@ -399,24 +371,6 @@ declare interface ConstraintSemanticRole$1 {
|
|
|
399
371
|
readonly inclusive: boolean;
|
|
400
372
|
}
|
|
401
373
|
|
|
402
|
-
/**
|
|
403
|
-
* Semantic metadata for ordered custom constraints that should participate in
|
|
404
|
-
* the generic contradiction/broadening logic.
|
|
405
|
-
*
|
|
406
|
-
* @public
|
|
407
|
-
*/
|
|
408
|
-
declare interface ConstraintSemanticRole_2 {
|
|
409
|
-
/**
|
|
410
|
-
* Logical family identifier shared by related constraints, for example
|
|
411
|
-
* `"decimal-bound"` or `"date-bound"`.
|
|
412
|
-
*/
|
|
413
|
-
readonly family: string;
|
|
414
|
-
/** Whether this constraint acts as a lower or upper bound. */
|
|
415
|
-
readonly bound: "lower" | "upper" | "exact";
|
|
416
|
-
/** Whether equality is allowed when comparing against the bound. */
|
|
417
|
-
readonly inclusive: boolean;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
374
|
|
|
421
375
|
/**
|
|
422
376
|
* Declarative authoring-side registration for a custom TSDoc constraint tag.
|
|
@@ -438,26 +392,6 @@ declare interface ConstraintTagRegistration_2 {
|
|
|
438
392
|
readonly isApplicableToType?: (type: ExtensionApplicableType$1) => boolean;
|
|
439
393
|
}
|
|
440
394
|
|
|
441
|
-
/**
|
|
442
|
-
* Declarative authoring-side registration for a custom TSDoc constraint tag.
|
|
443
|
-
*
|
|
444
|
-
* @public
|
|
445
|
-
*/
|
|
446
|
-
declare interface ConstraintTagRegistration_3 {
|
|
447
|
-
/** Tag name without the `@` prefix, e.g. `"maxSigFig"`. */
|
|
448
|
-
readonly tagName: string;
|
|
449
|
-
/** The custom constraint that this tag should produce. */
|
|
450
|
-
readonly constraintName: string;
|
|
451
|
-
/** Parser from raw TSDoc text to JSON-serializable payload. */
|
|
452
|
-
readonly parseValue: (raw: string) => ExtensionPayloadValue_2;
|
|
453
|
-
/**
|
|
454
|
-
* Optional precise applicability predicate for the field type being parsed.
|
|
455
|
-
* When omitted, the target custom constraint registration controls type
|
|
456
|
-
* applicability during validation.
|
|
457
|
-
*/
|
|
458
|
-
readonly isApplicableToType?: (type: ExtensionApplicableType_2) => boolean;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
395
|
/**
|
|
462
396
|
* A Control element that binds to a JSON Schema property.
|
|
463
397
|
*
|
|
@@ -478,27 +412,6 @@ declare interface ControlElement {
|
|
|
478
412
|
readonly [k: string]: unknown;
|
|
479
413
|
}
|
|
480
414
|
|
|
481
|
-
/**
|
|
482
|
-
* Control options constraints - control which JSON Forms Control.options are allowed.
|
|
483
|
-
* These are renderer-specific options that may not be universally supported.
|
|
484
|
-
*
|
|
485
|
-
* @public
|
|
486
|
-
*/
|
|
487
|
-
declare interface ControlOptionConstraints {
|
|
488
|
-
/** format - renderer format hint (e.g., "radio", "textarea") */
|
|
489
|
-
format?: Severity;
|
|
490
|
-
/** readonly - read-only mode */
|
|
491
|
-
readonly?: Severity;
|
|
492
|
-
/** multi - multi-select for enums */
|
|
493
|
-
multi?: Severity;
|
|
494
|
-
/** showUnfocusedDescription - show description when unfocused */
|
|
495
|
-
showUnfocusedDescription?: Severity;
|
|
496
|
-
/** hideRequiredAsterisk - hide required indicator */
|
|
497
|
-
hideRequiredAsterisk?: Severity;
|
|
498
|
-
/** Custom control options (extensible dictionary) */
|
|
499
|
-
custom?: Record<string, Severity>;
|
|
500
|
-
}
|
|
501
|
-
|
|
502
415
|
/**
|
|
503
416
|
* Registration for a custom annotation that may produce JSON Schema keywords.
|
|
504
417
|
*
|
|
@@ -530,37 +443,6 @@ declare interface CustomAnnotationRegistration_2 {
|
|
|
530
443
|
readonly toJsonSchema?: (value: ExtensionPayloadValue$1, vendorPrefix: string) => Record<string, unknown>;
|
|
531
444
|
}
|
|
532
445
|
|
|
533
|
-
/**
|
|
534
|
-
* Registration for a custom annotation that may produce JSON Schema keywords.
|
|
535
|
-
*
|
|
536
|
-
* Custom annotations are referenced by FormSpec's internal custom-annotation nodes.
|
|
537
|
-
* They describe or present a field but do not affect which values are valid.
|
|
538
|
-
*
|
|
539
|
-
* @public
|
|
540
|
-
*/
|
|
541
|
-
declare interface CustomAnnotationRegistration_3 {
|
|
542
|
-
/** The annotation name, unique within the extension. */
|
|
543
|
-
readonly annotationName: string;
|
|
544
|
-
/**
|
|
545
|
-
* Optional type-level inheritance behavior for semantic consumers.
|
|
546
|
-
*
|
|
547
|
-
* `"local-wins"` means a derived declaration inherits this annotation from
|
|
548
|
-
* its base declaration only when the derived declaration does not provide the
|
|
549
|
-
* same extension annotation identity locally. Omitted registrations behave as
|
|
550
|
-
* `"never"`.
|
|
551
|
-
*/
|
|
552
|
-
readonly inheritFromBase?: AnnotationInheritancePolicy_2;
|
|
553
|
-
/**
|
|
554
|
-
* Optional editor documentation for the annotation's TSDoc authoring tag.
|
|
555
|
-
*/
|
|
556
|
-
readonly tagDocumentation?: CustomAnnotationTagDocumentation_2;
|
|
557
|
-
/**
|
|
558
|
-
* Optionally converts the annotation value into JSON Schema keywords.
|
|
559
|
-
* If omitted, the annotation has no JSON Schema representation (UI-only).
|
|
560
|
-
*/
|
|
561
|
-
readonly toJsonSchema?: (value: ExtensionPayloadValue_2, vendorPrefix: string) => Record<string, unknown>;
|
|
562
|
-
}
|
|
563
|
-
|
|
564
446
|
/**
|
|
565
447
|
* Documentation text for an extension annotation's TSDoc authoring tag.
|
|
566
448
|
*
|
|
@@ -586,31 +468,6 @@ declare interface CustomAnnotationTagDocumentation$1 {
|
|
|
586
468
|
readonly hoverMarkdown?: string;
|
|
587
469
|
}
|
|
588
470
|
|
|
589
|
-
/**
|
|
590
|
-
* Documentation text for an extension annotation's TSDoc authoring tag.
|
|
591
|
-
*
|
|
592
|
-
* These strings are consumed by editor integrations for completion details and
|
|
593
|
-
* hover text. They do not affect annotation parsing, inheritance, or schema
|
|
594
|
-
* emission.
|
|
595
|
-
*
|
|
596
|
-
* @public
|
|
597
|
-
*/
|
|
598
|
-
declare interface CustomAnnotationTagDocumentation_2 {
|
|
599
|
-
/** Completion detail shown beside the annotation tag. */
|
|
600
|
-
readonly completionDetail?: string;
|
|
601
|
-
/**
|
|
602
|
-
* Label for the payload portion of the annotation tag signature.
|
|
603
|
-
*
|
|
604
|
-
* The payload remains the full authored text after the tag name, so this can
|
|
605
|
-
* describe single-argument or multi-argument annotation syntaxes.
|
|
606
|
-
*/
|
|
607
|
-
readonly payloadLabel?: string;
|
|
608
|
-
/** Short hover summary shown for the annotation tag. */
|
|
609
|
-
readonly hoverSummary?: string;
|
|
610
|
-
/** Full markdown hover body for the annotation tag. */
|
|
611
|
-
readonly hoverMarkdown?: string;
|
|
612
|
-
}
|
|
613
|
-
|
|
614
471
|
|
|
615
472
|
/**
|
|
616
473
|
* Registration for a custom constraint that maps to JSON Schema keywords.
|
|
@@ -670,64 +527,6 @@ declare interface CustomConstraintRegistration_2 {
|
|
|
670
527
|
readonly emitsVocabularyKeywords?: boolean;
|
|
671
528
|
}
|
|
672
529
|
|
|
673
|
-
/**
|
|
674
|
-
* Registration for a custom constraint that maps to JSON Schema keywords.
|
|
675
|
-
*
|
|
676
|
-
* Custom constraints are referenced by FormSpec's internal custom-constraint nodes.
|
|
677
|
-
*
|
|
678
|
-
* @public
|
|
679
|
-
*/
|
|
680
|
-
declare interface CustomConstraintRegistration_3 {
|
|
681
|
-
/** The constraint name, unique within the extension. */
|
|
682
|
-
readonly constraintName: string;
|
|
683
|
-
/**
|
|
684
|
-
* How this constraint composes with other constraints of the same kind.
|
|
685
|
-
* - "intersect": combine with logical AND (both must hold)
|
|
686
|
-
* - "override": last writer wins
|
|
687
|
-
*/
|
|
688
|
-
readonly compositionRule: "intersect" | "override";
|
|
689
|
-
/**
|
|
690
|
-
* TypeNode kinds this constraint is applicable to, or `null` for any type.
|
|
691
|
-
* Used by the validator to emit TYPE_MISMATCH diagnostics.
|
|
692
|
-
*/
|
|
693
|
-
readonly applicableTypes: readonly ExtensionApplicableType_2["kind"][] | null;
|
|
694
|
-
/**
|
|
695
|
-
* Optional precise type predicate used when kind-level applicability is too
|
|
696
|
-
* broad (for example, constraints that apply to integer-like primitives but
|
|
697
|
-
* not strings).
|
|
698
|
-
*/
|
|
699
|
-
readonly isApplicableToType?: (type: ExtensionApplicableType_2) => boolean;
|
|
700
|
-
/**
|
|
701
|
-
* Optional comparator for payloads belonging to the same custom constraint.
|
|
702
|
-
* Return values follow the `Array.prototype.sort()` contract.
|
|
703
|
-
*/
|
|
704
|
-
readonly comparePayloads?: (left: ExtensionPayloadValue_2, right: ExtensionPayloadValue_2) => number;
|
|
705
|
-
/**
|
|
706
|
-
* Optional semantic family metadata for generic contradiction/broadening
|
|
707
|
-
* handling across ordered constraints.
|
|
708
|
-
*/
|
|
709
|
-
readonly semanticRole?: ConstraintSemanticRole_2;
|
|
710
|
-
/**
|
|
711
|
-
* Converts the custom constraint's payload into JSON Schema keywords.
|
|
712
|
-
*
|
|
713
|
-
* @param payload - The opaque JSON payload stored on the custom constraint node.
|
|
714
|
-
* @param vendorPrefix - The vendor prefix for extension keywords.
|
|
715
|
-
* @returns A JSON Schema fragment with the constraint keywords.
|
|
716
|
-
*/
|
|
717
|
-
readonly toJsonSchema: (payload: ExtensionPayloadValue_2, vendorPrefix: string) => Record<string, unknown>;
|
|
718
|
-
/**
|
|
719
|
-
* When true, `toJsonSchema` may emit vocabulary keywords that do not carry
|
|
720
|
-
* the vendor prefix. By default, all keys returned from `toJsonSchema` must
|
|
721
|
-
* start with `${vendorPrefix}-`; setting this flag relaxes that check so
|
|
722
|
-
* the constraint can produce standard or custom vocabulary keywords such as
|
|
723
|
-
* `decimalMinimum`.
|
|
724
|
-
*
|
|
725
|
-
* Use this for constraints that define their own JSON Schema vocabulary
|
|
726
|
-
* rather than namespacing under the vendor prefix.
|
|
727
|
-
*/
|
|
728
|
-
readonly emitsVocabularyKeywords?: boolean;
|
|
729
|
-
}
|
|
730
|
-
|
|
731
530
|
|
|
732
531
|
/**
|
|
733
532
|
* Registration for a custom type that maps to a JSON Schema representation.
|
|
@@ -787,190 +586,26 @@ declare interface CustomTypeRegistration_2 {
|
|
|
787
586
|
}
|
|
788
587
|
|
|
789
588
|
/**
|
|
790
|
-
*
|
|
791
|
-
*
|
|
792
|
-
* Custom types are referenced by FormSpec's internal custom-type IR nodes and
|
|
793
|
-
* resolved to JSON Schema via `toJsonSchema` during generation.
|
|
589
|
+
* Discriminator-specific schema generation options.
|
|
794
590
|
*
|
|
795
591
|
* @public
|
|
796
592
|
*/
|
|
797
|
-
declare interface
|
|
798
|
-
/** The type name, unique within the extension. */
|
|
799
|
-
readonly typeName: string;
|
|
800
|
-
/**
|
|
801
|
-
* Optional TypeScript surface names that should resolve to this custom type
|
|
802
|
-
* during TSDoc/class analysis. Defaults to `typeName` when omitted.
|
|
803
|
-
* @deprecated Prefer `brand` for structural detection or type parameters
|
|
804
|
-
* on `defineCustomType<T>()` for symbol-based detection. String name
|
|
805
|
-
* matching will be removed in a future major version.
|
|
806
|
-
*/
|
|
807
|
-
readonly tsTypeNames?: readonly string[];
|
|
808
|
-
/**
|
|
809
|
-
* Optional brand identifier for structural type detection.
|
|
810
|
-
*
|
|
811
|
-
* When provided, the type resolver checks `type.getProperties()` for a
|
|
812
|
-
* computed property whose name matches this identifier. This is more
|
|
813
|
-
* reliable than `tsTypeNames` for aliased branded types because it does not
|
|
814
|
-
* depend on the local type name.
|
|
815
|
-
*
|
|
816
|
-
* Brand detection is attempted after name-based resolution (`tsTypeNames`)
|
|
817
|
-
* as a structural fallback. If both match, name-based resolution wins.
|
|
818
|
-
*
|
|
819
|
-
* The value should match the identifier text of a `unique symbol` declaration
|
|
820
|
-
* used as a computed property key on the branded type. For example, if the
|
|
821
|
-
* type is `string & { readonly [__decimalBrand]: true }`, the brand is
|
|
822
|
-
* `"__decimalBrand"`.
|
|
823
|
-
*
|
|
824
|
-
* Brand identifiers are stored as plain strings in the extension registry, so
|
|
825
|
-
* they must be unique across the extensions loaded into the same build.
|
|
826
|
-
*
|
|
827
|
-
* Note: `"__integerBrand"` is reserved for the builtin Integer type.
|
|
828
|
-
*/
|
|
829
|
-
readonly brand?: string;
|
|
593
|
+
declare interface DiscriminatorResolutionOptions {
|
|
830
594
|
/**
|
|
831
|
-
*
|
|
595
|
+
* Optional prefix applied only to metadata-derived discriminator values.
|
|
832
596
|
*
|
|
833
|
-
*
|
|
834
|
-
*
|
|
835
|
-
* @returns A JSON Schema fragment representing this type.
|
|
836
|
-
*/
|
|
837
|
-
readonly toJsonSchema: (payload: ExtensionPayloadValue_2, vendorPrefix: string) => Record<string, unknown>;
|
|
838
|
-
/* Excluded from this release type: serializeDefault */
|
|
839
|
-
/**
|
|
840
|
-
* Optional broadening of built-in constraint tags so they can apply to this
|
|
841
|
-
* custom type without modifying the core built-in constraint tables.
|
|
597
|
+
* Literal discriminator identities taken directly from a bound type remain
|
|
598
|
+
* unchanged.
|
|
842
599
|
*/
|
|
843
|
-
readonly
|
|
600
|
+
readonly apiNamePrefix?: string | undefined;
|
|
844
601
|
}
|
|
845
602
|
|
|
603
|
+
|
|
846
604
|
/**
|
|
847
|
-
*
|
|
848
|
-
*
|
|
849
|
-
*
|
|
850
|
-
|
|
851
|
-
declare interface DeclarationMetadataPolicyInput$1 {
|
|
852
|
-
/** Policy for JSON-facing serialized names. */
|
|
853
|
-
readonly apiName?: MetadataValuePolicyInput$1 | undefined;
|
|
854
|
-
/** Policy for human-facing labels and titles. */
|
|
855
|
-
readonly displayName?: MetadataValuePolicyInput$1 | undefined;
|
|
856
|
-
}
|
|
857
|
-
|
|
858
|
-
/**
|
|
859
|
-
* Discriminator-specific schema generation options.
|
|
860
|
-
*
|
|
861
|
-
* @public
|
|
862
|
-
*/
|
|
863
|
-
declare interface DiscriminatorResolutionOptions {
|
|
864
|
-
/**
|
|
865
|
-
* Optional prefix applied only to metadata-derived discriminator values.
|
|
866
|
-
*
|
|
867
|
-
* Literal discriminator identities taken directly from a bound type remain
|
|
868
|
-
* unchanged.
|
|
869
|
-
*/
|
|
870
|
-
readonly apiNamePrefix?: string | undefined;
|
|
871
|
-
}
|
|
872
|
-
|
|
873
|
-
/**
|
|
874
|
-
* Complete DSL policy for a FormSpec project.
|
|
875
|
-
*
|
|
876
|
-
* @public
|
|
877
|
-
*/
|
|
878
|
-
declare interface DSLPolicy {
|
|
879
|
-
/** Field type constraints */
|
|
880
|
-
fieldTypes?: FieldTypeConstraints;
|
|
881
|
-
/** Layout and structure constraints */
|
|
882
|
-
layout?: LayoutConstraints;
|
|
883
|
-
/** UI schema feature constraints */
|
|
884
|
-
uiSchema?: UISchemaConstraints;
|
|
885
|
-
/** Field configuration option constraints */
|
|
886
|
-
fieldOptions?: FieldOptionConstraints;
|
|
887
|
-
/** Control options constraints */
|
|
888
|
-
controlOptions?: ControlOptionConstraints;
|
|
889
|
-
}
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
/**
|
|
893
|
-
* Enum-member display names remain unset unless authored explicitly.
|
|
894
|
-
*
|
|
895
|
-
* @public
|
|
896
|
-
*/
|
|
897
|
-
declare interface EnumMemberDisplayNameDisabledPolicyInput$1 {
|
|
898
|
-
/** Leaves missing enum-member display names unresolved. */
|
|
899
|
-
readonly mode: "disabled";
|
|
900
|
-
}
|
|
901
|
-
|
|
902
|
-
/**
|
|
903
|
-
* Missing enum-member display names may be inferred.
|
|
904
|
-
*
|
|
905
|
-
* @public
|
|
906
|
-
*/
|
|
907
|
-
declare interface EnumMemberDisplayNameInferIfMissingPolicyInput$1 {
|
|
908
|
-
/** Infers an enum-member display name when it is not authored explicitly. */
|
|
909
|
-
readonly mode: "infer-if-missing";
|
|
910
|
-
/** Callback used to infer the missing display name. */
|
|
911
|
-
readonly infer: EnumMemberMetadataInferenceFn$1;
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
/**
|
|
915
|
-
* Enum-member display-name policy input.
|
|
916
|
-
*
|
|
917
|
-
* @public
|
|
918
|
-
*/
|
|
919
|
-
declare type EnumMemberDisplayNamePolicyInput$1 = EnumMemberDisplayNameDisabledPolicyInput$1 | EnumMemberDisplayNameRequireExplicitPolicyInput$1 | EnumMemberDisplayNameInferIfMissingPolicyInput$1;
|
|
920
|
-
|
|
921
|
-
/**
|
|
922
|
-
* Enum members must declare display names explicitly.
|
|
923
|
-
*
|
|
924
|
-
* @public
|
|
925
|
-
*/
|
|
926
|
-
declare interface EnumMemberDisplayNameRequireExplicitPolicyInput$1 {
|
|
927
|
-
/** Fails when an enum member has no authored display name. */
|
|
928
|
-
readonly mode: "require-explicit";
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
/**
|
|
932
|
-
* Build-facing context passed to enum-member metadata inference callbacks.
|
|
933
|
-
*
|
|
934
|
-
* Enum members are resolved separately from declaration-level metadata so they
|
|
935
|
-
* do not participate in the shared declaration-kind model used by TSDoc and
|
|
936
|
-
* extension metadata slots.
|
|
937
|
-
*
|
|
938
|
-
* @public
|
|
939
|
-
*/
|
|
940
|
-
declare interface EnumMemberMetadataInferenceContext$1 {
|
|
941
|
-
/** Authoring surface the enum originated from. */
|
|
942
|
-
readonly surface: MetadataAuthoringSurface_2;
|
|
943
|
-
/** Logical member identifier used for policy inference. */
|
|
944
|
-
readonly logicalName: string;
|
|
945
|
-
/** Underlying enum value before stringification. */
|
|
946
|
-
readonly memberValue: string | number;
|
|
947
|
-
/** Optional build-only context supplied by the resolver. */
|
|
948
|
-
readonly buildContext?: unknown;
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
/**
|
|
952
|
-
* Callback used to infer enum-member display names.
|
|
953
|
-
*
|
|
954
|
-
* @public
|
|
955
|
-
*/
|
|
956
|
-
declare type EnumMemberMetadataInferenceFn$1 = (context: EnumMemberMetadataInferenceContext$1) => string;
|
|
957
|
-
|
|
958
|
-
/**
|
|
959
|
-
* User-facing enum-member metadata policy input.
|
|
960
|
-
*
|
|
961
|
-
* @public
|
|
962
|
-
*/
|
|
963
|
-
declare interface EnumMemberMetadataPolicyInput$1 {
|
|
964
|
-
/** Policy for human-facing enum-member labels. */
|
|
965
|
-
readonly displayName?: EnumMemberDisplayNamePolicyInput$1 | undefined;
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
/**
|
|
970
|
-
* A curated type shape exposed to extension applicability hooks.
|
|
971
|
-
*
|
|
972
|
-
* This intentionally exposes only the fields needed to determine tag/type
|
|
973
|
-
* applicability without committing the entire canonical IR as public API.
|
|
605
|
+
* A curated type shape exposed to extension applicability hooks.
|
|
606
|
+
*
|
|
607
|
+
* This intentionally exposes only the fields needed to determine tag/type
|
|
608
|
+
* applicability without committing the entire canonical IR as public API.
|
|
974
609
|
*
|
|
975
610
|
* @public
|
|
976
611
|
*/
|
|
@@ -985,25 +620,6 @@ declare type ExtensionApplicableType$1 = {
|
|
|
985
620
|
readonly kind: Exclude<ExtensionTypeKind$1, "primitive" | "custom">;
|
|
986
621
|
};
|
|
987
622
|
|
|
988
|
-
/**
|
|
989
|
-
* A curated type shape exposed to extension applicability hooks.
|
|
990
|
-
*
|
|
991
|
-
* This intentionally exposes only the fields needed to determine tag/type
|
|
992
|
-
* applicability without committing the entire canonical IR as public API.
|
|
993
|
-
*
|
|
994
|
-
* @public
|
|
995
|
-
*/
|
|
996
|
-
declare type ExtensionApplicableType_2 = {
|
|
997
|
-
readonly kind: "primitive";
|
|
998
|
-
readonly primitiveKind: "string" | "number" | "integer" | "bigint" | "boolean" | "null";
|
|
999
|
-
} | {
|
|
1000
|
-
readonly kind: "custom";
|
|
1001
|
-
readonly typeId: string;
|
|
1002
|
-
readonly payload: ExtensionPayloadValue_2;
|
|
1003
|
-
} | {
|
|
1004
|
-
readonly kind: Exclude<ExtensionTypeKind_2, "primitive" | "custom">;
|
|
1005
|
-
};
|
|
1006
|
-
|
|
1007
623
|
|
|
1008
624
|
/**
|
|
1009
625
|
* A complete extension definition bundling types, constraints, annotations,
|
|
@@ -1044,45 +660,6 @@ declare interface ExtensionDefinition_2 {
|
|
|
1044
660
|
readonly vocabularyKeywords?: readonly VocabularyKeywordRegistration$1[];
|
|
1045
661
|
}
|
|
1046
662
|
|
|
1047
|
-
/**
|
|
1048
|
-
* A complete extension definition bundling types, constraints, annotations,
|
|
1049
|
-
* and vocabulary keywords.
|
|
1050
|
-
*
|
|
1051
|
-
* @example
|
|
1052
|
-
* ```typescript
|
|
1053
|
-
* const monetaryExtension = defineExtension({
|
|
1054
|
-
* extensionId: "x-stripe/monetary",
|
|
1055
|
-
* types: [
|
|
1056
|
-
* defineCustomType({
|
|
1057
|
-
* typeName: "Decimal",
|
|
1058
|
-
* toJsonSchema: (_payload, prefix) => ({
|
|
1059
|
-
* type: "string",
|
|
1060
|
-
* [`${prefix}-decimal`]: true,
|
|
1061
|
-
* }),
|
|
1062
|
-
* }),
|
|
1063
|
-
* ],
|
|
1064
|
-
* });
|
|
1065
|
-
* ```
|
|
1066
|
-
*
|
|
1067
|
-
* @public
|
|
1068
|
-
*/
|
|
1069
|
-
declare interface ExtensionDefinition_3 {
|
|
1070
|
-
/** Globally unique extension identifier, e.g., "x-stripe/monetary". */
|
|
1071
|
-
readonly extensionId: string;
|
|
1072
|
-
/** Custom type registrations provided by this extension. */
|
|
1073
|
-
readonly types?: readonly CustomTypeRegistration_3[];
|
|
1074
|
-
/** Custom constraint registrations provided by this extension. */
|
|
1075
|
-
readonly constraints?: readonly CustomConstraintRegistration_3[];
|
|
1076
|
-
/** Authoring-side TSDoc tag registrations provided by this extension. */
|
|
1077
|
-
readonly constraintTags?: readonly ConstraintTagRegistration_3[];
|
|
1078
|
-
/** Metadata-slot registrations shared by build- and lint-time analysis. */
|
|
1079
|
-
readonly metadataSlots?: readonly MetadataSlotRegistration_2[];
|
|
1080
|
-
/** Custom annotation registrations provided by this extension. */
|
|
1081
|
-
readonly annotations?: readonly CustomAnnotationRegistration_3[];
|
|
1082
|
-
/** Vocabulary keyword registrations provided by this extension. */
|
|
1083
|
-
readonly vocabularyKeywords?: readonly VocabularyKeywordRegistration_2[];
|
|
1084
|
-
}
|
|
1085
|
-
|
|
1086
663
|
/**
|
|
1087
664
|
* A JSON-serializable payload value used by extension registration hooks.
|
|
1088
665
|
*
|
|
@@ -1092,15 +669,6 @@ declare type ExtensionPayloadValue$1 = null | boolean | number | string | readon
|
|
|
1092
669
|
readonly [key: string]: ExtensionPayloadValue$1;
|
|
1093
670
|
};
|
|
1094
671
|
|
|
1095
|
-
/**
|
|
1096
|
-
* A JSON-serializable payload value used by extension registration hooks.
|
|
1097
|
-
*
|
|
1098
|
-
* @public
|
|
1099
|
-
*/
|
|
1100
|
-
declare type ExtensionPayloadValue_2 = null | boolean | number | string | readonly ExtensionPayloadValue_2[] | {
|
|
1101
|
-
readonly [key: string]: ExtensionPayloadValue_2;
|
|
1102
|
-
};
|
|
1103
|
-
|
|
1104
672
|
/**
|
|
1105
673
|
* A registry of extensions that provides lookup by fully-qualified ID.
|
|
1106
674
|
*
|
|
@@ -1190,13 +758,6 @@ declare interface ExtensionRegistry {
|
|
|
1190
758
|
*/
|
|
1191
759
|
declare type ExtensionTypeKind$1 = "primitive" | "enum" | "array" | "object" | "record" | "union" | "reference" | "dynamic" | "custom";
|
|
1192
760
|
|
|
1193
|
-
/**
|
|
1194
|
-
* Top-level type kinds that extension applicability hooks may inspect.
|
|
1195
|
-
*
|
|
1196
|
-
* @public
|
|
1197
|
-
*/
|
|
1198
|
-
declare type ExtensionTypeKind_2 = "primitive" | "enum" | "array" | "object" | "record" | "union" | "reference" | "dynamic" | "custom";
|
|
1199
|
-
|
|
1200
761
|
/**
|
|
1201
762
|
* The result of a successful extension type lookup.
|
|
1202
763
|
*
|
|
@@ -1213,133 +774,6 @@ declare interface ExtensionTypeLookupResult {
|
|
|
1213
774
|
readonly registration: CustomTypeRegistration_2;
|
|
1214
775
|
}
|
|
1215
776
|
|
|
1216
|
-
/**
|
|
1217
|
-
* Field configuration option constraints - control which field options are allowed.
|
|
1218
|
-
*
|
|
1219
|
-
* @public
|
|
1220
|
-
*/
|
|
1221
|
-
declare interface FieldOptionConstraints {
|
|
1222
|
-
/** label - field label text */
|
|
1223
|
-
label?: Severity;
|
|
1224
|
-
/** placeholder - input placeholder text */
|
|
1225
|
-
placeholder?: Severity;
|
|
1226
|
-
/** required - whether field is required */
|
|
1227
|
-
required?: Severity;
|
|
1228
|
-
/** minValue - minimum value for numbers */
|
|
1229
|
-
minValue?: Severity;
|
|
1230
|
-
/** maxValue - maximum value for numbers */
|
|
1231
|
-
maxValue?: Severity;
|
|
1232
|
-
/** minItems - minimum array length */
|
|
1233
|
-
minItems?: Severity;
|
|
1234
|
-
/** maxItems - maximum array length */
|
|
1235
|
-
maxItems?: Severity;
|
|
1236
|
-
}
|
|
1237
|
-
|
|
1238
|
-
/**
|
|
1239
|
-
* Field type constraints - control which field types are allowed.
|
|
1240
|
-
* Fine-grained control over each DSL field builder.
|
|
1241
|
-
*
|
|
1242
|
-
* @public
|
|
1243
|
-
*/
|
|
1244
|
-
declare interface FieldTypeConstraints {
|
|
1245
|
-
/** field.text() - basic text input */
|
|
1246
|
-
text?: Severity;
|
|
1247
|
-
/** field.number() - numeric input */
|
|
1248
|
-
number?: Severity;
|
|
1249
|
-
/** field.boolean() - checkbox/toggle */
|
|
1250
|
-
boolean?: Severity;
|
|
1251
|
-
/** field.enum() with literal options */
|
|
1252
|
-
staticEnum?: Severity;
|
|
1253
|
-
/** field.dynamicEnum() - runtime-fetched options */
|
|
1254
|
-
dynamicEnum?: Severity;
|
|
1255
|
-
/** field.dynamicSchema() - runtime-fetched schema */
|
|
1256
|
-
dynamicSchema?: Severity;
|
|
1257
|
-
/** field.array() / field.arrayWithConfig() */
|
|
1258
|
-
array?: Severity;
|
|
1259
|
-
/** field.object() / field.objectWithConfig() */
|
|
1260
|
-
object?: Severity;
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
/**
|
|
1265
|
-
* Top-level FormSpec configuration structure.
|
|
1266
|
-
*
|
|
1267
|
-
* @public
|
|
1268
|
-
*/
|
|
1269
|
-
declare interface FormSpecConfig {
|
|
1270
|
-
/**
|
|
1271
|
-
* Extension definitions providing custom types, constraints,
|
|
1272
|
-
* annotations, and vocabulary keywords.
|
|
1273
|
-
*/
|
|
1274
|
-
readonly extensions?: readonly ExtensionDefinition_3[];
|
|
1275
|
-
/**
|
|
1276
|
-
* DSL-policy surface configuration controlling which field types,
|
|
1277
|
-
* layouts, UI features, and field/control options are allowed.
|
|
1278
|
-
*/
|
|
1279
|
-
readonly constraints?: DSLPolicy;
|
|
1280
|
-
/**
|
|
1281
|
-
* Metadata inference and naming policy. Controls how apiName,
|
|
1282
|
-
* displayName, and plural forms are derived when not authored.
|
|
1283
|
-
*/
|
|
1284
|
-
readonly metadata?: MetadataPolicyInput_2;
|
|
1285
|
-
/**
|
|
1286
|
-
* Vendor prefix for extension-emitted JSON Schema keywords.
|
|
1287
|
-
* Must start with "x-".
|
|
1288
|
-
* @defaultValue "x-formspec"
|
|
1289
|
-
*/
|
|
1290
|
-
readonly vendorPrefix?: string;
|
|
1291
|
-
/**
|
|
1292
|
-
* JSON Schema representation for static enums.
|
|
1293
|
-
* - "enum": compact `enum` output, plus a display-name extension when labels exist
|
|
1294
|
-
* - "oneOf": per-member `const` output, with `title` only for distinct labels
|
|
1295
|
-
* - "smart-size": uses `enum` unless a distinct display label would be lost
|
|
1296
|
-
* @defaultValue "enum"
|
|
1297
|
-
*/
|
|
1298
|
-
readonly enumSerialization?: "enum" | "oneOf" | "smart-size";
|
|
1299
|
-
/**
|
|
1300
|
-
* JSON Schema serialization settings for vocabulary and dialect emission.
|
|
1301
|
-
* PR-1 stores and resolves this block; PR-2 consumes it.
|
|
1302
|
-
*/
|
|
1303
|
-
readonly serialization?: FormSpecSerializationConfig;
|
|
1304
|
-
/**
|
|
1305
|
-
* Per-package configuration overrides for monorepos.
|
|
1306
|
-
* Keys are glob patterns matched against file paths relative to
|
|
1307
|
-
* the config file's directory. Values merge with root settings.
|
|
1308
|
-
*/
|
|
1309
|
-
readonly packages?: Readonly<Record<string, FormSpecPackageOverride>>;
|
|
1310
|
-
}
|
|
1311
|
-
|
|
1312
|
-
/**
|
|
1313
|
-
* Per-package overrides that merge with the root config.
|
|
1314
|
-
* Only settings that genuinely vary per package are overridable.
|
|
1315
|
-
*
|
|
1316
|
-
* @public
|
|
1317
|
-
*/
|
|
1318
|
-
declare interface FormSpecPackageOverride {
|
|
1319
|
-
/** Override DSL policy for this package. */
|
|
1320
|
-
readonly constraints?: DSLPolicy;
|
|
1321
|
-
/** Override enum serialization for this package. */
|
|
1322
|
-
readonly enumSerialization?: "enum" | "oneOf" | "smart-size";
|
|
1323
|
-
/** Override metadata policy for this package. */
|
|
1324
|
-
readonly metadata?: MetadataPolicyInput_2;
|
|
1325
|
-
}
|
|
1326
|
-
|
|
1327
|
-
/**
|
|
1328
|
-
* Forward-looking JSON Schema serialization settings.
|
|
1329
|
-
*
|
|
1330
|
-
* These values are currently carried through configuration for future
|
|
1331
|
-
* vocabulary and dialect emission.
|
|
1332
|
-
*
|
|
1333
|
-
* @public
|
|
1334
|
-
*/
|
|
1335
|
-
declare interface FormSpecSerializationConfig {
|
|
1336
|
-
/** Base URL used to construct default FormSpec vocabulary URLs. */
|
|
1337
|
-
readonly vocabularyBaseUrl?: string;
|
|
1338
|
-
/** Per-vocabulary URL overrides keyed by vocabulary identifier. */
|
|
1339
|
-
readonly vocabularyUrls?: Readonly<Record<string, string>>;
|
|
1340
|
-
/** Explicit FormSpec dialect URL override. */
|
|
1341
|
-
readonly dialectUrl?: string;
|
|
1342
|
-
}
|
|
1343
777
|
|
|
1344
778
|
/**
|
|
1345
779
|
* Options for generating schemas from a decorated class.
|
|
@@ -1533,38 +967,6 @@ declare interface LabelElement {
|
|
|
1533
967
|
readonly [k: string]: unknown;
|
|
1534
968
|
}
|
|
1535
969
|
|
|
1536
|
-
/**
|
|
1537
|
-
* Layout and structure constraints - control grouping, conditionals, nesting.
|
|
1538
|
-
*
|
|
1539
|
-
* @public
|
|
1540
|
-
*/
|
|
1541
|
-
declare interface LayoutConstraints {
|
|
1542
|
-
/** group() - visual grouping of fields */
|
|
1543
|
-
group?: Severity;
|
|
1544
|
-
/** when() - conditional field visibility */
|
|
1545
|
-
conditionals?: Severity;
|
|
1546
|
-
/** Maximum nesting depth for objects/arrays (0 = flat only) */
|
|
1547
|
-
maxNestingDepth?: number;
|
|
1548
|
-
}
|
|
1549
|
-
|
|
1550
|
-
/**
|
|
1551
|
-
* JSON Forms layout type constraints.
|
|
1552
|
-
*
|
|
1553
|
-
* @public
|
|
1554
|
-
*/
|
|
1555
|
-
declare interface LayoutTypeConstraints {
|
|
1556
|
-
/** VerticalLayout - stack elements vertically */
|
|
1557
|
-
VerticalLayout?: Severity;
|
|
1558
|
-
/** HorizontalLayout - arrange elements horizontally */
|
|
1559
|
-
HorizontalLayout?: Severity;
|
|
1560
|
-
/** Group - visual grouping with label */
|
|
1561
|
-
Group?: Severity;
|
|
1562
|
-
/** Categorization - tabbed/wizard interface */
|
|
1563
|
-
Categorization?: Severity;
|
|
1564
|
-
/** Category - individual tab/step in Categorization */
|
|
1565
|
-
Category?: Severity;
|
|
1566
|
-
}
|
|
1567
|
-
|
|
1568
970
|
/**
|
|
1569
971
|
* Authoring surfaces that can contribute metadata.
|
|
1570
972
|
*
|
|
@@ -1572,13 +974,6 @@ declare interface LayoutTypeConstraints {
|
|
|
1572
974
|
*/
|
|
1573
975
|
declare type MetadataAuthoringSurface$1 = "tsdoc" | "chain-dsl";
|
|
1574
976
|
|
|
1575
|
-
/**
|
|
1576
|
-
* Authoring surfaces that can contribute metadata.
|
|
1577
|
-
*
|
|
1578
|
-
* @public
|
|
1579
|
-
*/
|
|
1580
|
-
declare type MetadataAuthoringSurface_2 = "tsdoc" | "chain-dsl";
|
|
1581
|
-
|
|
1582
977
|
/**
|
|
1583
978
|
* Declaration categories that metadata policy can target.
|
|
1584
979
|
*
|
|
@@ -1586,13 +981,6 @@ declare type MetadataAuthoringSurface_2 = "tsdoc" | "chain-dsl";
|
|
|
1586
981
|
*/
|
|
1587
982
|
declare type MetadataDeclarationKind$1 = "type" | "field" | "method";
|
|
1588
983
|
|
|
1589
|
-
/**
|
|
1590
|
-
* Declaration categories that metadata policy can target.
|
|
1591
|
-
*
|
|
1592
|
-
* @public
|
|
1593
|
-
*/
|
|
1594
|
-
declare type MetadataDeclarationKind_2 = "type" | "field" | "method";
|
|
1595
|
-
|
|
1596
984
|
/**
|
|
1597
985
|
* Build-facing context passed to metadata inference callbacks.
|
|
1598
986
|
*
|
|
@@ -1612,104 +1000,6 @@ declare interface MetadataInferenceContext$1 {
|
|
|
1612
1000
|
readonly buildContext?: unknown;
|
|
1613
1001
|
}
|
|
1614
1002
|
|
|
1615
|
-
/**
|
|
1616
|
-
* Build-facing context passed to metadata inference callbacks.
|
|
1617
|
-
*
|
|
1618
|
-
* `buildContext` is intentionally opaque so browser/runtime packages do not
|
|
1619
|
-
* need to depend on TypeScript compiler types.
|
|
1620
|
-
*
|
|
1621
|
-
* @public
|
|
1622
|
-
*/
|
|
1623
|
-
declare interface MetadataInferenceContext_2 {
|
|
1624
|
-
/** Authoring surface the metadata is being resolved for. */
|
|
1625
|
-
readonly surface: MetadataAuthoringSurface_2;
|
|
1626
|
-
/** Declaration kind currently being resolved. */
|
|
1627
|
-
readonly declarationKind: MetadataDeclarationKind_2;
|
|
1628
|
-
/** Logical identifier before any metadata policy is applied. */
|
|
1629
|
-
readonly logicalName: string;
|
|
1630
|
-
/** Optional build-only context supplied by the resolver. */
|
|
1631
|
-
readonly buildContext?: unknown;
|
|
1632
|
-
}
|
|
1633
|
-
|
|
1634
|
-
/**
|
|
1635
|
-
* Callback used to infer a scalar metadata value.
|
|
1636
|
-
*
|
|
1637
|
-
* @public
|
|
1638
|
-
*/
|
|
1639
|
-
declare type MetadataInferenceFn$1 = (context: MetadataInferenceContext_2) => string;
|
|
1640
|
-
|
|
1641
|
-
/**
|
|
1642
|
-
* Context passed to pluralization callbacks.
|
|
1643
|
-
*
|
|
1644
|
-
* @public
|
|
1645
|
-
*/
|
|
1646
|
-
declare interface MetadataPluralizationContext$1 extends MetadataInferenceContext_2 {
|
|
1647
|
-
/** Singular value that pluralization should derive from. */
|
|
1648
|
-
readonly singular: string;
|
|
1649
|
-
}
|
|
1650
|
-
|
|
1651
|
-
/**
|
|
1652
|
-
* Pluralization disabled.
|
|
1653
|
-
*
|
|
1654
|
-
* @public
|
|
1655
|
-
*/
|
|
1656
|
-
declare interface MetadataPluralizationDisabledPolicyInput$1 {
|
|
1657
|
-
/** Disables automatic plural-value generation. */
|
|
1658
|
-
readonly mode?: "disabled" | undefined;
|
|
1659
|
-
}
|
|
1660
|
-
|
|
1661
|
-
/**
|
|
1662
|
-
* Callback used to derive plural metadata from a singular value.
|
|
1663
|
-
*
|
|
1664
|
-
* @public
|
|
1665
|
-
*/
|
|
1666
|
-
declare type MetadataPluralizationFn$1 = (context: MetadataPluralizationContext$1) => string;
|
|
1667
|
-
|
|
1668
|
-
/**
|
|
1669
|
-
* Pluralization may be inferred when absent.
|
|
1670
|
-
*
|
|
1671
|
-
* @public
|
|
1672
|
-
*/
|
|
1673
|
-
declare interface MetadataPluralizationInferIfMissingPolicyInput$1 {
|
|
1674
|
-
/** Infers plural values whenever no explicit plural is present. */
|
|
1675
|
-
readonly mode: "infer-if-missing";
|
|
1676
|
-
/** Callback that derives a plural form from the resolved singular value. */
|
|
1677
|
-
readonly inflect: MetadataPluralizationFn$1;
|
|
1678
|
-
}
|
|
1679
|
-
|
|
1680
|
-
/**
|
|
1681
|
-
* Pluralization policy input.
|
|
1682
|
-
*
|
|
1683
|
-
* @public
|
|
1684
|
-
*/
|
|
1685
|
-
declare type MetadataPluralizationPolicyInput$1 = MetadataPluralizationDisabledPolicyInput$1 | MetadataPluralizationRequireExplicitPolicyInput$1 | MetadataPluralizationInferIfMissingPolicyInput$1;
|
|
1686
|
-
|
|
1687
|
-
/**
|
|
1688
|
-
* Pluralization must be authored explicitly.
|
|
1689
|
-
*
|
|
1690
|
-
* @public
|
|
1691
|
-
*/
|
|
1692
|
-
declare interface MetadataPluralizationRequireExplicitPolicyInput$1 {
|
|
1693
|
-
/** Requires plural values to be authored directly. */
|
|
1694
|
-
readonly mode: "require-explicit";
|
|
1695
|
-
}
|
|
1696
|
-
|
|
1697
|
-
/**
|
|
1698
|
-
* User-facing metadata policy configuration.
|
|
1699
|
-
*
|
|
1700
|
-
* @public
|
|
1701
|
-
*/
|
|
1702
|
-
declare interface MetadataPolicyInput_2 {
|
|
1703
|
-
/** Policy applied to named types and the analyzed root declaration. */
|
|
1704
|
-
readonly type?: DeclarationMetadataPolicyInput$1 | undefined;
|
|
1705
|
-
/** Policy applied to fields and object properties. */
|
|
1706
|
-
readonly field?: DeclarationMetadataPolicyInput$1 | undefined;
|
|
1707
|
-
/** Policy applied to callable/method declarations. */
|
|
1708
|
-
readonly method?: DeclarationMetadataPolicyInput$1 | undefined;
|
|
1709
|
-
/** Policy applied to enum-member display names during build-time IR resolution. */
|
|
1710
|
-
readonly enumMember?: EnumMemberMetadataPolicyInput$1 | undefined;
|
|
1711
|
-
}
|
|
1712
|
-
|
|
1713
1003
|
/**
|
|
1714
1004
|
* Supported qualifier registration for an extensible metadata slot.
|
|
1715
1005
|
*
|
|
@@ -1727,23 +1017,6 @@ declare interface MetadataQualifierRegistration$1 {
|
|
|
1727
1017
|
readonly inferValue?: MetadataSlotInferenceFn$1 | undefined;
|
|
1728
1018
|
}
|
|
1729
1019
|
|
|
1730
|
-
/**
|
|
1731
|
-
* Supported qualifier registration for an extensible metadata slot.
|
|
1732
|
-
*
|
|
1733
|
-
* @public
|
|
1734
|
-
*/
|
|
1735
|
-
declare interface MetadataQualifierRegistration_2 {
|
|
1736
|
-
/** Qualifier text without the leading colon. */
|
|
1737
|
-
readonly qualifier: string;
|
|
1738
|
-
/**
|
|
1739
|
-
* Optional source qualifier to use as the base input for this qualifier's
|
|
1740
|
-
* inference hook. Defaults to the slot's bare/default value when omitted.
|
|
1741
|
-
*/
|
|
1742
|
-
readonly sourceQualifier?: string | undefined;
|
|
1743
|
-
/** Optional inference hook for this qualified value. */
|
|
1744
|
-
readonly inferValue?: MetadataSlotInferenceFn_2 | undefined;
|
|
1745
|
-
}
|
|
1746
|
-
|
|
1747
1020
|
/**
|
|
1748
1021
|
* Stable slot identifier for extensible metadata analysis.
|
|
1749
1022
|
*
|
|
@@ -1751,13 +1024,6 @@ declare interface MetadataQualifierRegistration_2 {
|
|
|
1751
1024
|
*/
|
|
1752
1025
|
declare type MetadataSlotId$1 = string;
|
|
1753
1026
|
|
|
1754
|
-
/**
|
|
1755
|
-
* Stable slot identifier for extensible metadata analysis.
|
|
1756
|
-
*
|
|
1757
|
-
* @public
|
|
1758
|
-
*/
|
|
1759
|
-
declare type MetadataSlotId_2 = string;
|
|
1760
|
-
|
|
1761
1027
|
/**
|
|
1762
1028
|
* Context passed to extensible metadata inference hooks.
|
|
1763
1029
|
*
|
|
@@ -1774,22 +1040,6 @@ declare interface MetadataSlotInferenceContext$1 extends MetadataInferenceContex
|
|
|
1774
1040
|
readonly baseValue?: string | undefined;
|
|
1775
1041
|
}
|
|
1776
1042
|
|
|
1777
|
-
/**
|
|
1778
|
-
* Context passed to extensible metadata inference hooks.
|
|
1779
|
-
*
|
|
1780
|
-
* @public
|
|
1781
|
-
*/
|
|
1782
|
-
declare interface MetadataSlotInferenceContext_2 extends MetadataInferenceContext_2 {
|
|
1783
|
-
/** Stable logical slot identifier. */
|
|
1784
|
-
readonly slotId: MetadataSlotId_2;
|
|
1785
|
-
/** Tag name associated with the slot, without the `@` prefix. */
|
|
1786
|
-
readonly tagName: string;
|
|
1787
|
-
/** Optional qualifier being inferred (for example `plural`). */
|
|
1788
|
-
readonly qualifier?: string | undefined;
|
|
1789
|
-
/** Resolved bare/default value used as the base input for derived qualifiers. */
|
|
1790
|
-
readonly baseValue?: string | undefined;
|
|
1791
|
-
}
|
|
1792
|
-
|
|
1793
1043
|
/**
|
|
1794
1044
|
* Callback used to infer an extensible metadata slot value.
|
|
1795
1045
|
*
|
|
@@ -1797,13 +1047,6 @@ declare interface MetadataSlotInferenceContext_2 extends MetadataInferenceContex
|
|
|
1797
1047
|
*/
|
|
1798
1048
|
declare type MetadataSlotInferenceFn$1 = (context: MetadataSlotInferenceContext$1) => string;
|
|
1799
1049
|
|
|
1800
|
-
/**
|
|
1801
|
-
* Callback used to infer an extensible metadata slot value.
|
|
1802
|
-
*
|
|
1803
|
-
* @public
|
|
1804
|
-
*/
|
|
1805
|
-
declare type MetadataSlotInferenceFn_2 = (context: MetadataSlotInferenceContext_2) => string;
|
|
1806
|
-
|
|
1807
1050
|
/**
|
|
1808
1051
|
* Extensible metadata slot definition shared across build- and lint-time analysis.
|
|
1809
1052
|
*
|
|
@@ -1829,76 +1072,6 @@ declare interface MetadataSlotRegistration$1 {
|
|
|
1829
1072
|
readonly isApplicable?: ((context: MetadataInferenceContext$1) => boolean) | undefined;
|
|
1830
1073
|
}
|
|
1831
1074
|
|
|
1832
|
-
/**
|
|
1833
|
-
* Extensible metadata slot definition shared across build- and lint-time analysis.
|
|
1834
|
-
*
|
|
1835
|
-
* @public
|
|
1836
|
-
*/
|
|
1837
|
-
declare interface MetadataSlotRegistration_2 {
|
|
1838
|
-
/** Stable logical slot identifier. */
|
|
1839
|
-
readonly slotId: MetadataSlotId_2;
|
|
1840
|
-
/** Tag name associated with this slot, without the `@` prefix. */
|
|
1841
|
-
readonly tagName: string;
|
|
1842
|
-
/** Declaration kinds where the slot is meaningful. */
|
|
1843
|
-
readonly declarationKinds: readonly MetadataDeclarationKind_2[];
|
|
1844
|
-
/** Whether a bare tag without a qualifier is supported. Defaults to true. */
|
|
1845
|
-
readonly allowBare?: boolean | undefined;
|
|
1846
|
-
/** Supported qualifiers for this slot. */
|
|
1847
|
-
readonly qualifiers?: readonly MetadataQualifierRegistration_2[] | undefined;
|
|
1848
|
-
/** Optional inference hook for the bare/default slot value. */
|
|
1849
|
-
readonly inferValue?: MetadataSlotInferenceFn_2 | undefined;
|
|
1850
|
-
/**
|
|
1851
|
-
* Optional applicability hook for declaration-specific rules beyond
|
|
1852
|
-
* declaration kind. `buildContext` may carry compiler objects.
|
|
1853
|
-
*/
|
|
1854
|
-
readonly isApplicable?: ((context: MetadataInferenceContext_2) => boolean) | undefined;
|
|
1855
|
-
}
|
|
1856
|
-
|
|
1857
|
-
/**
|
|
1858
|
-
* Scalar metadata disabled unless provided explicitly elsewhere.
|
|
1859
|
-
*
|
|
1860
|
-
* @public
|
|
1861
|
-
*/
|
|
1862
|
-
declare interface MetadataValueDisabledPolicyInput$1 {
|
|
1863
|
-
/** Disables inference for this scalar metadata value. */
|
|
1864
|
-
readonly mode?: "disabled" | undefined;
|
|
1865
|
-
/** Optional policy controlling plural forms of this scalar value. */
|
|
1866
|
-
readonly pluralization?: MetadataPluralizationPolicyInput$1 | undefined;
|
|
1867
|
-
}
|
|
1868
|
-
|
|
1869
|
-
/**
|
|
1870
|
-
* Scalar metadata may be inferred when missing.
|
|
1871
|
-
*
|
|
1872
|
-
* @public
|
|
1873
|
-
*/
|
|
1874
|
-
declare interface MetadataValueInferIfMissingPolicyInput$1 {
|
|
1875
|
-
/** Infers this scalar metadata value when it is not authored explicitly. */
|
|
1876
|
-
readonly mode: "infer-if-missing";
|
|
1877
|
-
/** Callback used to infer the missing singular value. */
|
|
1878
|
-
readonly infer: MetadataInferenceFn$1;
|
|
1879
|
-
/** Optional policy controlling plural forms of this scalar value. */
|
|
1880
|
-
readonly pluralization?: MetadataPluralizationPolicyInput$1 | undefined;
|
|
1881
|
-
}
|
|
1882
|
-
|
|
1883
|
-
/**
|
|
1884
|
-
* Scalar metadata policy input.
|
|
1885
|
-
*
|
|
1886
|
-
* @public
|
|
1887
|
-
*/
|
|
1888
|
-
declare type MetadataValuePolicyInput$1 = MetadataValueDisabledPolicyInput$1 | MetadataValueRequireExplicitPolicyInput$1 | MetadataValueInferIfMissingPolicyInput$1;
|
|
1889
|
-
|
|
1890
|
-
/**
|
|
1891
|
-
* Scalar metadata must be authored explicitly.
|
|
1892
|
-
*
|
|
1893
|
-
* @public
|
|
1894
|
-
*/
|
|
1895
|
-
declare interface MetadataValueRequireExplicitPolicyInput$1 {
|
|
1896
|
-
/** Requires this scalar metadata value to be authored directly. */
|
|
1897
|
-
readonly mode: "require-explicit";
|
|
1898
|
-
/** Optional policy controlling plural forms of this scalar value. */
|
|
1899
|
-
readonly pluralization?: MetadataPluralizationPolicyInput$1 | undefined;
|
|
1900
|
-
}
|
|
1901
|
-
|
|
1902
1075
|
/**
|
|
1903
1076
|
* Rule for conditional element visibility/enablement.
|
|
1904
1077
|
*
|
|
@@ -1943,18 +1116,6 @@ declare interface RuleConditionSchema {
|
|
|
1943
1116
|
allOf?: RuleConditionSchema[];
|
|
1944
1117
|
}
|
|
1945
1118
|
|
|
1946
|
-
/**
|
|
1947
|
-
* JSON Forms rule constraints.
|
|
1948
|
-
*
|
|
1949
|
-
* @public
|
|
1950
|
-
*/
|
|
1951
|
-
declare interface RuleConstraints {
|
|
1952
|
-
/** Whether rules are enabled at all */
|
|
1953
|
-
enabled?: Severity;
|
|
1954
|
-
/** Fine-grained control over rule effects */
|
|
1955
|
-
effects?: RuleEffectConstraints;
|
|
1956
|
-
}
|
|
1957
|
-
|
|
1958
1119
|
/**
|
|
1959
1120
|
* JSON Forms UI Schema type definitions.
|
|
1960
1121
|
*
|
|
@@ -1970,22 +1131,6 @@ declare interface RuleConstraints {
|
|
|
1970
1131
|
*/
|
|
1971
1132
|
declare type RuleEffect = "SHOW" | "HIDE" | "ENABLE" | "DISABLE";
|
|
1972
1133
|
|
|
1973
|
-
/**
|
|
1974
|
-
* JSON Forms rule effect constraints.
|
|
1975
|
-
*
|
|
1976
|
-
* @public
|
|
1977
|
-
*/
|
|
1978
|
-
declare interface RuleEffectConstraints {
|
|
1979
|
-
/** SHOW - show element when condition is true */
|
|
1980
|
-
SHOW?: Severity;
|
|
1981
|
-
/** HIDE - hide element when condition is true */
|
|
1982
|
-
HIDE?: Severity;
|
|
1983
|
-
/** ENABLE - enable element when condition is true */
|
|
1984
|
-
ENABLE?: Severity;
|
|
1985
|
-
/** DISABLE - disable element when condition is true */
|
|
1986
|
-
DISABLE?: Severity;
|
|
1987
|
-
}
|
|
1988
|
-
|
|
1989
1134
|
/**
|
|
1990
1135
|
* Condition for a rule.
|
|
1991
1136
|
*
|
|
@@ -1998,18 +1143,6 @@ declare interface SchemaBasedCondition {
|
|
|
1998
1143
|
readonly schema: RuleConditionSchema;
|
|
1999
1144
|
}
|
|
2000
1145
|
|
|
2001
|
-
/* Excluded from this release type: SetupDiagnostic */
|
|
2002
|
-
|
|
2003
|
-
/**
|
|
2004
|
-
* Severity level for DSL-policy violations.
|
|
2005
|
-
* - "error": Violation fails validation
|
|
2006
|
-
* - "warn": Violation emits warning but passes
|
|
2007
|
-
* - "off": Feature is allowed (no violation)
|
|
2008
|
-
*
|
|
2009
|
-
* @public
|
|
2010
|
-
*/
|
|
2011
|
-
declare type Severity = "error" | "warn" | "off";
|
|
2012
|
-
|
|
2013
1146
|
/**
|
|
2014
1147
|
* Shared options for schema generation flows that support custom extensions.
|
|
2015
1148
|
*
|
|
@@ -2072,18 +1205,6 @@ declare interface StaticSchemaGenerationOptions {
|
|
|
2072
1205
|
*/
|
|
2073
1206
|
declare type UISchema = VerticalLayout | HorizontalLayout | GroupLayout | Categorization;
|
|
2074
1207
|
|
|
2075
|
-
/**
|
|
2076
|
-
* UI schema feature constraints - control JSON Forms-specific features.
|
|
2077
|
-
*
|
|
2078
|
-
* @public
|
|
2079
|
-
*/
|
|
2080
|
-
declare interface UISchemaConstraints {
|
|
2081
|
-
/** Layout type constraints */
|
|
2082
|
-
layouts?: LayoutTypeConstraints;
|
|
2083
|
-
/** Rule (conditional) constraints */
|
|
2084
|
-
rules?: RuleConstraints;
|
|
2085
|
-
}
|
|
2086
|
-
|
|
2087
1208
|
/**
|
|
2088
1209
|
* Union of all UI Schema element types.
|
|
2089
1210
|
*
|
|
@@ -2119,18 +1240,6 @@ declare interface VocabularyKeywordRegistration$1 {
|
|
|
2119
1240
|
readonly keyword: string;
|
|
2120
1241
|
/** JSON Schema that describes the valid values for this keyword. */
|
|
2121
1242
|
readonly schema: ExtensionPayloadValue$1;
|
|
2122
|
-
}
|
|
2123
|
-
|
|
2124
|
-
/**
|
|
2125
|
-
* Registration for a vocabulary keyword to include in a JSON Schema `$vocabulary` declaration.
|
|
2126
|
-
*
|
|
2127
|
-
* @public
|
|
2128
|
-
*/
|
|
2129
|
-
declare interface VocabularyKeywordRegistration_2 {
|
|
2130
|
-
/** The keyword name (without vendor prefix). */
|
|
2131
|
-
readonly keyword: string;
|
|
2132
|
-
/** JSON Schema that describes the valid values for this keyword. */
|
|
2133
|
-
readonly schema: ExtensionPayloadValue_2;
|
|
2134
1243
|
}
|
|
2135
1244
|
|
|
2136
1245
|
/**
|
|
@@ -2902,13 +2011,14 @@ interface _ConfigTypeRef {
|
|
|
2902
2011
|
* ```
|
|
2903
2012
|
*
|
|
2904
2013
|
* @param options - File path and export name
|
|
2014
|
+
* @param program - Optional program configured with the caller's declaration libraries
|
|
2905
2015
|
* @returns Array of resolved config type references
|
|
2906
2016
|
* @throws If the export name is not found (lists available exports).
|
|
2907
2017
|
* @throws If the export exists but is not a class declaration.
|
|
2908
2018
|
*
|
|
2909
2019
|
* @internal
|
|
2910
2020
|
*/
|
|
2911
|
-
declare function _resolveConfigTypeArgs(options: _ExtractConfigSchemasOptions): _ConfigTypeRef[];
|
|
2021
|
+
declare function _resolveConfigTypeArgs(options: _ExtractConfigSchemasOptions, program?: ts.Program): _ConfigTypeRef[];
|
|
2912
2022
|
/**
|
|
2913
2023
|
* Extracts config schemas from the generic type arguments in a class's
|
|
2914
2024
|
* `implements` clause.
|
|
@@ -3002,4 +2112,4 @@ declare const _stripeSchemaDefaults: StaticSchemaGenerationOptions;
|
|
|
3002
2112
|
*/
|
|
3003
2113
|
declare const _stripeFormSpecConfig: FormSpecConfig;
|
|
3004
2114
|
|
|
3005
|
-
export { type BuiltinConstraintBroadeningRegistration, type BuiltinConstraintName, type Categorization, type Category, type ConstraintSemanticRole, type ConstraintTagRegistration, type ControlElement, type CustomAnnotationRegistration, type CustomConstraintRegistration, type CustomTypeRegistration, type DeclarationMetadataPolicyInput, type DiscriminatorResolutionOptions, type EnumMemberMetadataPolicyInput, type ExtensionApplicableType, type ExtensionDefinition, type ExtensionPayloadValue, type ExtensionRegistry, type ExtensionTypeKind, type ExtensionTypeLookupResult, type
|
|
2115
|
+
export { type BuiltinConstraintBroadeningRegistration, type BuiltinConstraintName, type Categorization, type Category, type ConstraintSemanticRole, type ConstraintTagRegistration, type ControlElement, type CustomAnnotationRegistration, type CustomConstraintRegistration, type CustomTypeRegistration, type DeclarationMetadataPolicyInput, type DiscriminatorResolutionOptions, type EnumMemberMetadataPolicyInput, type ExtensionApplicableType, type ExtensionDefinition, type ExtensionPayloadValue, type ExtensionRegistry, type ExtensionTypeKind, type ExtensionTypeLookupResult, type GenerateFromClassOptions, type GenerateFromClassResult, type GenerateSchemasOptions, type GroupLayout, type HorizontalLayout, type JsonSchema2020, type LabelElement, type MetadataAuthoringSurface, type MetadataDeclarationKind, type MetadataInferenceContext, type MetadataInferenceFn, type MetadataPluralizationDisabledPolicyInput, type MetadataPluralizationFn, type MetadataPluralizationInferIfMissingPolicyInput, type MetadataPluralizationPolicyInput, type MetadataPluralizationRequireExplicitPolicyInput, type MetadataPolicyInput, type MetadataQualifierRegistration, type MetadataSlotId, type MetadataSlotInferenceContext, type MetadataSlotInferenceFn, type MetadataSlotRegistration, type MetadataValueDisabledPolicyInput, type MetadataValueInferIfMissingPolicyInput, type MetadataValuePolicyInput, type MetadataValueRequireExplicitPolicyInput, type Rule, type RuleConditionSchema, type RuleEffect, type SchemaBasedCondition, type StaticSchemaGenerationOptions, type UISchema, type UISchemaElement, type VerticalLayout, type VocabularyKeywordRegistration, type _ConfigSchemaResult, type _ConfigTypeRef, type _ConfigUiSchema, type _ExtractConfigSchemasOptions, type _ExtractConfigSchemasResult, _extractConfigSchemas, _fixupDecimalPathConstraints, _generateSchemas, _resolveConfigTypeArgs, _stripeExtensionRegistry, _stripeFormSpecConfig, _stripeSchemaDefaults, _stripeStdlibExtension, generateSchemasFromClass };
|