@speclynx/apidom-ns-json-schema-2019-09 1.12.2 → 2.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.
Files changed (54) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/NOTICE +16 -7
  3. package/README.md +25 -26
  4. package/dist/apidom-ns-json-schema-2019-09.browser.js +1 -1
  5. package/package.json +11 -9
  6. package/src/elements/JSONSchema.cjs +7 -7
  7. package/src/elements/JSONSchema.mjs +7 -8
  8. package/src/elements/LinkDescription.cjs +5 -0
  9. package/src/elements/LinkDescription.mjs +5 -0
  10. package/src/index.cjs +11 -19
  11. package/src/index.mjs +4 -5
  12. package/src/predicates.cjs +9 -16
  13. package/src/predicates.mjs +5 -15
  14. package/src/refractor/index.cjs +38 -18
  15. package/src/refractor/index.mjs +33 -16
  16. package/src/refractor/inspect.cjs +43 -0
  17. package/src/refractor/inspect.mjs +37 -0
  18. package/src/refractor/plugins/replace-empty-element.cjs +34 -28
  19. package/src/refractor/plugins/replace-empty-element.mjs +14 -8
  20. package/src/refractor/specification.cjs +5 -2
  21. package/src/refractor/specification.mjs +5 -2
  22. package/src/refractor/toolbox.cjs +8 -3
  23. package/src/refractor/toolbox.mjs +6 -2
  24. package/src/refractor/visitors/json-schema/$defsVisitor.cjs +4 -5
  25. package/src/refractor/visitors/json-schema/$defsVisitor.mjs +3 -6
  26. package/src/refractor/visitors/json-schema/$refVisitor.cjs +2 -3
  27. package/src/refractor/visitors/json-schema/$refVisitor.mjs +2 -3
  28. package/src/refractor/visitors/json-schema/$vocabularyVisitor.cjs +2 -3
  29. package/src/refractor/visitors/json-schema/$vocabularyVisitor.mjs +2 -3
  30. package/src/refractor/visitors/json-schema/AllOfVisitor.cjs +7 -7
  31. package/src/refractor/visitors/json-schema/AllOfVisitor.mjs +6 -8
  32. package/src/refractor/visitors/json-schema/AnyOfVisitor.cjs +7 -7
  33. package/src/refractor/visitors/json-schema/AnyOfVisitor.mjs +6 -8
  34. package/src/refractor/visitors/json-schema/DependentRequiredVisitor.cjs +2 -3
  35. package/src/refractor/visitors/json-schema/DependentRequiredVisitor.mjs +2 -3
  36. package/src/refractor/visitors/json-schema/DependentSchemasVisitor.cjs +4 -5
  37. package/src/refractor/visitors/json-schema/DependentSchemasVisitor.mjs +3 -6
  38. package/src/refractor/visitors/json-schema/ItemsVisitor.cjs +13 -13
  39. package/src/refractor/visitors/json-schema/ItemsVisitor.mjs +12 -14
  40. package/src/refractor/visitors/json-schema/OneOfVisitor.cjs +7 -7
  41. package/src/refractor/visitors/json-schema/OneOfVisitor.mjs +6 -8
  42. package/src/refractor/visitors/json-schema/PatternPropertiesVisitor.cjs +4 -5
  43. package/src/refractor/visitors/json-schema/PatternPropertiesVisitor.mjs +3 -6
  44. package/src/refractor/visitors/json-schema/PropertiesVisitor.cjs +4 -5
  45. package/src/refractor/visitors/json-schema/PropertiesVisitor.mjs +3 -6
  46. package/src/refractor/visitors/json-schema/bases.cjs +23 -0
  47. package/src/refractor/visitors/json-schema/bases.mjs +20 -0
  48. package/src/refractor/visitors/json-schema/index.cjs +6 -6
  49. package/src/refractor/visitors/json-schema/index.mjs +5 -5
  50. package/types/apidom-ns-json-schema-2019-09.d.ts +141 -307
  51. package/src/refractor/registration.cjs +0 -13
  52. package/src/refractor/registration.mjs +0 -6
  53. package/src/traversal/visitor.cjs +0 -15
  54. package/src/traversal/visitor.mjs +0 -11
@@ -1,94 +1,64 @@
1
- import { AllOfVisitor as AllOfVisitor_2 } from '@speclynx/apidom-ns-json-schema-draft-4';
2
1
  import { AlternatingVisitor } from '@speclynx/apidom-ns-json-schema-draft-7';
3
2
  import { AlternatingVisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-7';
4
- import { AnyOfVisitor as AnyOfVisitor_2 } from '@speclynx/apidom-ns-json-schema-draft-4';
5
- import { ArrayElement } from '@speclynx/apidom-core';
6
- import { Attributes } from '@speclynx/apidom-core';
7
- import { BooleanElement } from '@speclynx/apidom-core';
3
+ import { ArrayElement } from '@speclynx/apidom-datamodel';
4
+ import { Attributes } from '@speclynx/apidom-datamodel';
5
+ import { BooleanElement } from '@speclynx/apidom-datamodel';
8
6
  import { Class } from 'ts-mixer/dist/types/types.js';
9
- import { DefinitionsVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
10
- import { DependenciesVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
11
- import { Element as Element_2 } from '@speclynx/apidom-core';
12
- import { ElementPredicate } from '@speclynx/apidom-core';
13
- import { EnumVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
7
+ import { Element as Element_2 } from '@speclynx/apidom-datamodel';
14
8
  import { FallbackVisitor } from '@speclynx/apidom-ns-json-schema-draft-7';
15
- import { FallbackVisitor as FallbackVisitor_2 } from '@speclynx/apidom-ns-json-schema-draft-4';
16
9
  import { FallbackVisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-7';
17
10
  import { FixedFieldsVisitor } from '@speclynx/apidom-ns-json-schema-draft-7';
18
11
  import { FixedFieldsVisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-7';
19
- import { getNodeType } from '@speclynx/apidom-ns-json-schema-draft-7';
20
- import { isArrayElement } from '@speclynx/apidom-core';
21
- import { isBooleanElement } from '@speclynx/apidom-core';
22
- import { isElement } from '@speclynx/apidom-core';
23
- import { isLinkElement } from '@speclynx/apidom-core';
24
- import { isMemberElement } from '@speclynx/apidom-core';
25
- import { isNullElement } from '@speclynx/apidom-core';
26
- import { isNumberElement } from '@speclynx/apidom-core';
27
- import { isObjectElement } from '@speclynx/apidom-core';
28
- import { isRefElement } from '@speclynx/apidom-core';
29
- import { isStringElement } from '@speclynx/apidom-core';
30
- import { ItemsVisitor as ItemsVisitor_2 } from '@speclynx/apidom-ns-json-schema-draft-4';
31
- import { JSONReference$RefVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
32
- import { JSONReferenceVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
12
+ import { isJSONReferenceElement } from '@speclynx/apidom-ns-json-schema-draft-7';
13
+ import { isMediaElement } from '@speclynx/apidom-ns-json-schema-draft-6';
14
+ import { JSONReferenceElement } from '@speclynx/apidom-ns-json-schema-draft-7';
33
15
  import { JSONSchemaElement as JSONSchemaElement_2 } from '@speclynx/apidom-ns-json-schema-draft-7';
34
- import { JSONSchemaVisitor as JSONSchemaVisitor_2 } from '@speclynx/apidom-ns-json-schema-draft-4';
35
- import { JSONSchemaVisitor as JSONSchemaVisitor_3 } from '@speclynx/apidom-ns-json-schema-draft-7';
16
+ import { JSONSchemaVisitor as JSONSchemaVisitor_2 } from '@speclynx/apidom-ns-json-schema-draft-7';
36
17
  import { JSONSchemaVisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-7';
37
18
  import { LinkDescriptionElement as LinkDescriptionElement_2 } from '@speclynx/apidom-ns-json-schema-draft-7';
38
- import { LinkDescriptionVisitor as LinkDescriptionVisitor_2 } from '@speclynx/apidom-ns-json-schema-draft-4';
39
- import { LinkDescriptionVisitor as LinkDescriptionVisitor_3 } from '@speclynx/apidom-ns-json-schema-draft-7';
19
+ import { LinkDescriptionVisitor as LinkDescriptionVisitor_2 } from '@speclynx/apidom-ns-json-schema-draft-7';
40
20
  import { LinkDescriptionVisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-7';
41
- import { LinksVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
42
21
  import { MapVisitor } from '@speclynx/apidom-ns-json-schema-draft-7';
43
22
  import { MapVisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-7';
44
23
  import { MediaTypes } from '@speclynx/apidom-core';
45
- import { MediaVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
46
- import { Meta } from '@speclynx/apidom-core';
47
- import { Namespace } from 'minim';
48
- import { NamespacePluginOptions } from '@speclynx/apidom-core';
49
- import { NumberElement } from '@speclynx/apidom-core';
50
- import { ObjectElement } from '@speclynx/apidom-core';
51
- import { OneOfVisitor as OneOfVisitor_2 } from '@speclynx/apidom-ns-json-schema-draft-4';
24
+ import { Meta } from '@speclynx/apidom-datamodel';
25
+ import { Namespace } from '@speclynx/apidom-datamodel';
26
+ import { NamespacePlugin } from '@speclynx/apidom-datamodel';
27
+ import { NumberElement } from '@speclynx/apidom-datamodel';
28
+ import { ObjectElement } from '@speclynx/apidom-datamodel';
52
29
  import { ParentSchemaAwareVisitor } from '@speclynx/apidom-ns-json-schema-draft-7';
53
30
  import { ParentSchemaAwareVisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-7';
31
+ import { Path } from '@speclynx/apidom-traverse';
54
32
  import { PatternedFieldsVisitor } from '@speclynx/apidom-ns-json-schema-draft-7';
55
33
  import { PatternedFieldsVisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-7';
56
- import { PatternPropertiesVisitor as PatternPropertiesVisitor_2 } from '@speclynx/apidom-ns-json-schema-draft-4';
57
- import { PropertiesVisitor as PropertiesVisitor_2 } from '@speclynx/apidom-ns-json-schema-draft-4';
58
- import { RequiredVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
59
- import { SchemaOrReferenceVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
60
34
  import { specificationObj as specificationObj_2 } from '@speclynx/apidom-ns-json-schema-draft-7';
61
35
  import { SpecificationVisitor } from '@speclynx/apidom-ns-json-schema-draft-7';
62
36
  import { SpecificationVisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-7';
63
37
  import { SpecPath } from '@speclynx/apidom-ns-json-schema-draft-7';
64
- import { StringElement } from '@speclynx/apidom-core';
65
- import { TypeVisitor } from '@speclynx/apidom-ns-json-schema-draft-4';
38
+ import { StringElement } from '@speclynx/apidom-datamodel';
66
39
  import { Visitor } from '@speclynx/apidom-ns-json-schema-draft-7';
67
40
  import { VisitorOptions } from '@speclynx/apidom-ns-json-schema-draft-7';
68
41
 
69
42
  /**
70
43
  * @public
71
44
  */
72
- export declare class $defsVisitor extends $defsVisitor_base {
45
+ export declare class $defsVisitor extends BaseSchemaMapVisitor {
73
46
  readonly element: ObjectElement;
74
47
  protected readonly specPath: SpecPath<['document', 'objects', 'JSONSchema']>;
75
48
  constructor(options: $defsVisitorOptions);
76
49
  }
77
50
 
78
- declare const $defsVisitor_base: Class<any[], MapVisitor & ParentSchemaAwareVisitor & FallbackVisitor, typeof MapVisitor & typeof ParentSchemaAwareVisitor & typeof FallbackVisitor>;
79
-
80
51
  /**
81
52
  * @public
82
53
  */
83
- export declare interface $defsVisitorOptions extends MapVisitorOptions, ParentSchemaAwareVisitorOptions, FallbackVisitorOptions {
84
- }
54
+ export declare type $defsVisitorOptions = BaseSchemaMapVisitorOptions;
85
55
 
86
56
  /**
87
57
  * @public
88
58
  */
89
59
  export declare class $refVisitor extends FallbackVisitor {
90
60
  readonly element: StringElement;
91
- StringElement(stringElement: StringElement): {};
61
+ StringElement(path: Path<StringElement>): void;
92
62
  }
93
63
 
94
64
  /**
@@ -96,25 +66,22 @@ export declare class $refVisitor extends FallbackVisitor {
96
66
  */
97
67
  export declare class $vocabularyVisitor extends FallbackVisitor {
98
68
  readonly element: ObjectElement;
99
- ObjectElement(objectElement: ObjectElement): {};
69
+ ObjectElement(path: Path<ObjectElement>): void;
100
70
  }
101
71
 
102
72
  /**
103
73
  * @public
104
74
  */
105
- export declare class AllOfVisitor extends AllOfVisitor_base {
75
+ export declare class AllOfVisitor extends BaseSchemaArrayVisitor {
106
76
  readonly element: ArrayElement;
107
77
  constructor(options: AllOfVisitorOptions);
108
- ArrayElement(arrayElement: ArrayElement): {};
78
+ ArrayElement(path: Path<ArrayElement>): void;
109
79
  }
110
80
 
111
- declare const AllOfVisitor_base: Class<any[], SpecificationVisitor & ParentSchemaAwareVisitor & FallbackVisitor, typeof SpecificationVisitor & typeof ParentSchemaAwareVisitor & typeof FallbackVisitor>;
112
-
113
81
  /**
114
82
  * @public
115
83
  */
116
- export declare interface AllOfVisitorOptions extends SpecificationVisitorOptions, ParentSchemaAwareVisitorOptions, FallbackVisitorOptions {
117
- }
84
+ export declare type AllOfVisitorOptions = BaseSchemaArrayVisitorOptions;
118
85
 
119
86
  export { AlternatingVisitor }
120
87
 
@@ -123,49 +90,60 @@ export { AlternatingVisitorOptions }
123
90
  /**
124
91
  * @public
125
92
  */
126
- export declare class AnyOfVisitor extends AnyOfVisitor_base {
93
+ export declare class AnyOfVisitor extends BaseSchemaArrayVisitor {
127
94
  readonly element: ArrayElement;
128
95
  constructor(options: AnyOfVisitorOptions);
129
- ArrayElement(arrayElement: ArrayElement): {};
96
+ ArrayElement(path: Path<ArrayElement>): void;
130
97
  }
131
98
 
132
- declare const AnyOfVisitor_base: Class<any[], SpecificationVisitor & ParentSchemaAwareVisitor & FallbackVisitor, typeof SpecificationVisitor & typeof ParentSchemaAwareVisitor & typeof FallbackVisitor>;
99
+ /**
100
+ * @public
101
+ */
102
+ export declare type AnyOfVisitorOptions = BaseSchemaArrayVisitorOptions;
133
103
 
134
104
  /**
135
105
  * @public
136
106
  */
137
- export declare interface AnyOfVisitorOptions extends SpecificationVisitorOptions, ParentSchemaAwareVisitorOptions, FallbackVisitorOptions {
107
+ export declare const BaseSchemaArrayVisitor: Class<any[], SpecificationVisitor & ParentSchemaAwareVisitor & FallbackVisitor, typeof SpecificationVisitor & typeof ParentSchemaAwareVisitor & typeof FallbackVisitor>;
108
+
109
+ /**
110
+ * @public
111
+ */
112
+ export declare interface BaseSchemaArrayVisitorOptions extends SpecificationVisitorOptions, ParentSchemaAwareVisitorOptions, FallbackVisitorOptions {
138
113
  }
139
114
 
140
115
  /**
141
116
  * @public
142
117
  */
143
- export declare const createRefractor: (specPath: string[]) => (value: unknown, options?: {}) => Element_2;
118
+ export declare const BaseSchemaMapVisitor: Class<any[], MapVisitor & ParentSchemaAwareVisitor & FallbackVisitor, typeof MapVisitor & typeof ParentSchemaAwareVisitor & typeof FallbackVisitor>;
119
+
120
+ /**
121
+ * @public
122
+ */
123
+ export declare interface BaseSchemaMapVisitorOptions extends MapVisitorOptions, ParentSchemaAwareVisitorOptions, FallbackVisitorOptions {
124
+ }
144
125
 
145
126
  /**
146
127
  * @public
147
128
  */
148
129
  export declare class DependentRequiredVisitor extends FallbackVisitor {
149
130
  readonly element: ObjectElement;
150
- ObjectElement(objectElement: ObjectElement): {};
131
+ ObjectElement(path: Path<ObjectElement>): void;
151
132
  }
152
133
 
153
134
  /**
154
135
  * @public
155
136
  */
156
- export declare class DependentSchemasVisitor extends DependentSchemasVisitor_base {
137
+ export declare class DependentSchemasVisitor extends BaseSchemaMapVisitor {
157
138
  readonly element: ObjectElement;
158
139
  protected readonly specPath: SpecPath<['document', 'objects', 'JSONSchema']>;
159
140
  constructor(options: DependentSchemasVisitorOptions);
160
141
  }
161
142
 
162
- declare const DependentSchemasVisitor_base: Class<any[], MapVisitor & ParentSchemaAwareVisitor & FallbackVisitor, typeof MapVisitor & typeof ParentSchemaAwareVisitor & typeof FallbackVisitor>;
163
-
164
143
  /**
165
144
  * @public
166
145
  */
167
- export declare interface DependentSchemasVisitorOptions extends MapVisitorOptions, ParentSchemaAwareVisitorOptions, FallbackVisitorOptions {
168
- }
146
+ export declare type DependentSchemasVisitorOptions = BaseSchemaMapVisitorOptions;
169
147
 
170
148
  export { FallbackVisitor }
171
149
 
@@ -174,6 +152,15 @@ export { FallbackVisitorOptions as $vocabularyVisitorOptions }
174
152
  export { FallbackVisitorOptions as DependentRequiredVisitorOptions }
175
153
  export { FallbackVisitorOptions }
176
154
 
155
+ /**
156
+ * @public
157
+ */
158
+ export declare interface FixedField {
159
+ name: string;
160
+ alias?: string;
161
+ $visitor: unknown;
162
+ }
163
+
177
164
  export { FixedFieldsVisitor }
178
165
 
179
166
  export { FixedFieldsVisitorOptions }
@@ -183,62 +170,39 @@ export { FixedFieldsVisitorOptions }
183
170
  */
184
171
  export declare type Format = 'generic' | 'json' | 'yaml';
185
172
 
186
- export { getNodeType }
187
-
188
- export { isArrayElement }
189
-
190
- export { isBooleanElement }
191
-
192
- export { isElement }
173
+ export { isJSONReferenceElement }
193
174
 
194
175
  /**
195
176
  * @public
196
177
  */
197
- export declare const isJSONSchemaElement: ElementPredicate<JSONSchemaElement>;
178
+ export declare const isJSONSchemaElement: (element: unknown) => element is JSONSchemaElement;
198
179
 
199
180
  /**
200
181
  * @public
201
182
  */
202
- export declare const isLinkDescriptionElement: ElementPredicate<LinkDescriptionElement>;
203
-
204
- export { isLinkElement }
205
-
206
- export { isMemberElement }
207
-
208
- export { isNullElement }
183
+ export declare const isLinkDescriptionElement: (element: unknown) => element is LinkDescriptionElement;
209
184
 
210
- export { isNumberElement }
211
-
212
- export { isObjectElement }
213
-
214
- export { isRefElement }
215
-
216
- export { isStringElement }
185
+ export { isMediaElement }
217
186
 
218
187
  /**
219
188
  * @public
220
189
  */
221
- export declare class ItemsVisitor extends ItemsVisitor_base {
190
+ export declare class ItemsVisitor extends BaseSchemaArrayVisitor {
222
191
  element: ObjectElement | ArrayElement;
223
- ObjectElement(objectElement: ObjectElement): {};
224
- ArrayElement(arrayElement: ArrayElement): {};
225
- BooleanElement(booleanElement: BooleanElement): {};
192
+ ObjectElement(path: Path<ObjectElement>): void;
193
+ ArrayElement(path: Path<ArrayElement>): void;
194
+ BooleanElement(path: Path<BooleanElement>): void;
226
195
  }
227
196
 
228
- declare const ItemsVisitor_base: Class<any[], SpecificationVisitor & ParentSchemaAwareVisitor & FallbackVisitor, typeof SpecificationVisitor & typeof ParentSchemaAwareVisitor & typeof FallbackVisitor>;
229
-
230
197
  /**
231
198
  * @public
232
199
  */
233
- export declare interface ItemsVisitorOptions extends SpecificationVisitorOptions, ParentSchemaAwareVisitorOptions, FallbackVisitorOptions {
234
- }
200
+ export declare type ItemsVisitorOptions = BaseSchemaArrayVisitorOptions;
235
201
 
236
202
  /**
237
203
  * @public
238
204
  */
239
- declare const jsonSchema201909: {
240
- namespace: (options: NamespacePluginOptions) => Namespace;
241
- };
205
+ declare const jsonSchema201909: NamespacePlugin;
242
206
  export default jsonSchema201909;
243
207
 
244
208
  /**
@@ -254,6 +218,7 @@ export declare class JSONSchema201909MediaTypes extends MediaTypes<string> {
254
218
  * @public
255
219
  */
256
220
  export declare class JSONSchemaElement extends JSONSchemaElement_2 {
221
+ static fixedFields: FixedField[];
257
222
  constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes);
258
223
  /**
259
224
  * Core vocabulary
@@ -273,38 +238,38 @@ export declare class JSONSchemaElement extends JSONSchemaElement_2 {
273
238
  get $defs(): ObjectElement | undefined;
274
239
  set $defs($defs: ObjectElement | undefined);
275
240
  get definitions(): ObjectElement | undefined;
276
- set definitions(definitions: ObjectElement | undefined);
241
+ set definitions(_definitions: ObjectElement | undefined);
277
242
  /**
278
243
  * Applicator vocabulary
279
244
  *
280
245
  * URI: https://json-schema.org/draft/2019-09/vocab/applicator
281
246
  */
282
- get not(): this | BooleanElement | undefined;
283
- set not(not: this | BooleanElement | undefined);
284
- get if(): this | BooleanElement | undefined;
285
- set if(ifSchema: this | BooleanElement | undefined);
286
- get then(): this | BooleanElement | undefined;
287
- set then(thenSchema: this | BooleanElement | undefined);
288
- get else(): this | BooleanElement | undefined;
289
- set else(elseSchema: this | BooleanElement | undefined);
247
+ get not(): this | BooleanElement | JSONReferenceElement | undefined;
248
+ set not(not: this | BooleanElement | JSONReferenceElement | undefined);
249
+ get if(): this | BooleanElement | JSONReferenceElement | undefined;
250
+ set if(ifSchema: this | BooleanElement | JSONReferenceElement | undefined);
251
+ get then(): this | BooleanElement | JSONReferenceElement | undefined;
252
+ set then(thenSchema: this | BooleanElement | JSONReferenceElement | undefined);
253
+ get else(): this | BooleanElement | JSONReferenceElement | undefined;
254
+ set else(elseSchema: this | BooleanElement | JSONReferenceElement | undefined);
290
255
  get dependentSchemas(): ObjectElement | undefined;
291
256
  set dependentSchemas(dependentSchemas: ObjectElement | undefined);
292
257
  get dependencies(): ObjectElement | undefined;
293
- set dependencies(dependencies: ObjectElement | undefined);
294
- get items(): this | BooleanElement | ArrayElement | undefined;
295
- set items(items: this | BooleanElement | ArrayElement | undefined);
296
- get containsProp(): this | BooleanElement | undefined;
297
- set containsProp(containsProp: this | BooleanElement | undefined);
298
- get additionalProperties(): this | BooleanElement | undefined;
299
- set additionalProperties(additionalProperties: this | BooleanElement | undefined);
300
- get additionalItems(): this | BooleanElement | undefined;
301
- set additionalItems(additionalItems: this | BooleanElement | undefined);
302
- get propertyNames(): this | BooleanElement | undefined;
303
- set propertyNames(propertyNames: this | BooleanElement | undefined);
304
- get unevaluatedItems(): this | BooleanElement | undefined;
305
- set unevaluatedItems(unevaluatedItems: this | BooleanElement | undefined);
306
- get unevaluatedProperties(): this | BooleanElement | undefined;
307
- set unevaluatedProperties(unevaluatedProperties: this | BooleanElement | undefined);
258
+ set dependencies(_dependencies: ObjectElement | undefined);
259
+ get itemsField(): this | BooleanElement | JSONReferenceElement | ArrayElement<this | BooleanElement | JSONReferenceElement> | undefined;
260
+ set itemsField(items: this | BooleanElement | JSONReferenceElement | ArrayElement<this | BooleanElement | JSONReferenceElement> | undefined);
261
+ get contains(): this | BooleanElement | JSONReferenceElement | undefined;
262
+ set contains(contains: this | BooleanElement | JSONReferenceElement | undefined);
263
+ get additionalProperties(): this | BooleanElement | JSONReferenceElement | undefined;
264
+ set additionalProperties(additionalProperties: this | BooleanElement | JSONReferenceElement | undefined);
265
+ get additionalItems(): this | BooleanElement | JSONReferenceElement | undefined;
266
+ set additionalItems(additionalItems: this | BooleanElement | JSONReferenceElement | undefined);
267
+ get propertyNames(): this | BooleanElement | JSONReferenceElement | undefined;
268
+ set propertyNames(propertyNames: this | BooleanElement | JSONReferenceElement | undefined);
269
+ get unevaluatedItems(): this | BooleanElement | JSONReferenceElement | undefined;
270
+ set unevaluatedItems(unevaluatedItems: this | BooleanElement | JSONReferenceElement | undefined);
271
+ get unevaluatedProperties(): this | BooleanElement | JSONReferenceElement | undefined;
272
+ set unevaluatedProperties(unevaluatedProperties: this | BooleanElement | JSONReferenceElement | undefined);
308
273
  /**
309
274
  * Validation vocabulary
310
275
  *
@@ -338,48 +303,29 @@ export declare class JSONSchemaElement extends JSONSchemaElement_2 {
338
303
  *
339
304
  * URI: https://json-schema.org/draft/2019-09/vocab/content
340
305
  */
341
- get contentSchema(): this | BooleanElement | undefined;
342
- set contentSchema(contentSchema: this | BooleanElement | undefined);
306
+ get contentSchema(): this | BooleanElement | JSONReferenceElement | undefined;
307
+ set contentSchema(contentSchema: this | BooleanElement | JSONReferenceElement | undefined);
343
308
  }
344
309
 
345
310
  /**
346
311
  * @public
347
312
  */
348
- export declare class JSONSchemaVisitor extends JSONSchemaVisitor_3 {
313
+ export declare class JSONSchemaVisitor extends JSONSchemaVisitor_2 {
349
314
  element: JSONSchemaElement;
350
315
  constructor(options: JSONSchemaVisitorOptions);
351
316
  get defaultDialectIdentifier(): string;
352
- ObjectElement(objectElement: ObjectElement): {};
317
+ ObjectElement(path: Path<ObjectElement>): void;
353
318
  }
354
319
 
355
320
  export { JSONSchemaVisitorOptions }
356
321
 
357
- /**
358
- * @public
359
- */
360
- export declare const keyMap: {
361
- ObjectElement: string[];
362
- ArrayElement: string[];
363
- MemberElement: string[];
364
- StringElement: never[];
365
- BooleanElement: never[];
366
- NumberElement: never[];
367
- NullElement: never[];
368
- RefElement: never[];
369
- LinkElement: never[];
370
- Annotation: never[];
371
- Comment: never[];
372
- ParseResultElement: string[];
373
- SourceMap: string[];
374
- JSONSchema201909Element: string[];
375
- LinkDescriptionElement: string[];
376
- };
377
-
378
322
  /**
379
323
  * URI: https://json-schema.org/draft/2019-09/draft-handrews-json-schema-hyperschema-02#rfc.section.6
380
324
  * @public
381
325
  */
382
326
  export declare class LinkDescriptionElement extends LinkDescriptionElement_2 {
327
+ static fixedFields: FixedField[];
328
+ constructor(content?: Record<string, unknown>, meta?: Meta, attributes?: Attributes);
383
329
  /**
384
330
  * Link Target Attributes.
385
331
  *
@@ -403,7 +349,7 @@ export declare class LinkDescriptionElement extends LinkDescriptionElement_2 {
403
349
  /**
404
350
  * @public
405
351
  */
406
- export declare class LinkDescriptionVisitor extends LinkDescriptionVisitor_3 {
352
+ export declare class LinkDescriptionVisitor extends LinkDescriptionVisitor_2 {
407
353
  readonly element: LinkDescriptionElement;
408
354
  constructor(options: LinkDescriptionVisitorOptions);
409
355
  }
@@ -422,19 +368,16 @@ export declare const mediaTypes: JSONSchema201909MediaTypes;
422
368
  /**
423
369
  * @public
424
370
  */
425
- export declare class OneOfVisitor extends OneOfVisitor_base {
371
+ export declare class OneOfVisitor extends BaseSchemaArrayVisitor {
426
372
  readonly element: ArrayElement;
427
373
  constructor(options: OneOfVisitorOptions);
428
- ArrayElement(arrayElement: ArrayElement): {};
374
+ ArrayElement(path: Path<ArrayElement>): void;
429
375
  }
430
376
 
431
- declare const OneOfVisitor_base: Class<any[], SpecificationVisitor & ParentSchemaAwareVisitor & FallbackVisitor, typeof SpecificationVisitor & typeof ParentSchemaAwareVisitor & typeof FallbackVisitor>;
432
-
433
377
  /**
434
378
  * @public
435
379
  */
436
- export declare interface OneOfVisitorOptions extends SpecificationVisitorOptions, ParentSchemaAwareVisitorOptions, FallbackVisitorOptions {
437
- }
380
+ export declare type OneOfVisitorOptions = BaseSchemaArrayVisitorOptions;
438
381
 
439
382
  export { ParentSchemaAwareVisitor }
440
383
 
@@ -447,189 +390,72 @@ export { PatternedFieldsVisitorOptions }
447
390
  /**
448
391
  * @public
449
392
  */
450
- export declare class PatternPropertiesVisitor extends PatternPropertiesVisitor_base {
393
+ export declare class PatternPropertiesVisitor extends BaseSchemaMapVisitor {
451
394
  readonly element: ObjectElement;
452
395
  protected readonly specPath: SpecPath<['document', 'objects', 'JSONSchema']>;
453
396
  constructor(options: PatternPropertiesVisitorOptions);
454
397
  }
455
398
 
456
- declare const PatternPropertiesVisitor_base: Class<any[], MapVisitor & ParentSchemaAwareVisitor & FallbackVisitor, typeof MapVisitor & typeof ParentSchemaAwareVisitor & typeof FallbackVisitor>;
457
-
458
399
  /**
459
400
  * @public
460
401
  */
461
- export declare interface PatternPropertiesVisitorOptions extends MapVisitorOptions, ParentSchemaAwareVisitorOptions, FallbackVisitorOptions {
462
- }
402
+ export declare type PatternPropertiesVisitorOptions = BaseSchemaMapVisitorOptions;
463
403
 
464
404
  /**
465
405
  * @public
466
406
  */
467
- export declare class PropertiesVisitor extends PropertiesVisitor_base {
407
+ export declare class PropertiesVisitor extends BaseSchemaMapVisitor {
468
408
  readonly element: ObjectElement;
469
409
  protected readonly specPath: SpecPath<['document', 'objects', 'JSONSchema']>;
470
410
  constructor(options: PropertiesVisitorOptions);
471
411
  }
472
412
 
473
- declare const PropertiesVisitor_base: Class<any[], MapVisitor & ParentSchemaAwareVisitor & FallbackVisitor, typeof MapVisitor & typeof ParentSchemaAwareVisitor & typeof FallbackVisitor>;
413
+ /**
414
+ * @public
415
+ */
416
+ export declare type PropertiesVisitorOptions = BaseSchemaMapVisitorOptions;
474
417
 
475
418
  /**
476
419
  * @public
477
420
  */
478
- export declare interface PropertiesVisitorOptions extends MapVisitorOptions, ParentSchemaAwareVisitorOptions, FallbackVisitorOptions {
421
+ export declare const refract: <T extends Element_2>(value: unknown, { element, plugins, specificationObj, }?: RefractorOptions) => T;
422
+
423
+ /**
424
+ * Refracts a value into a JSONSchemaElement.
425
+ * @public
426
+ */
427
+ export declare const refractJSONSchema: <T extends Element_2 = JSONSchemaElement>(value: unknown, options?: Omit<RefractorOptions, "element">) => T;
428
+
429
+ /**
430
+ * Refracts a value into a LinkDescriptionElement.
431
+ * @public
432
+ */
433
+ export declare const refractLinkDescription: <T extends Element_2 = LinkDescriptionElement>(value: unknown, options?: Omit<RefractorOptions, "element">) => T;
434
+
435
+ /**
436
+ * @public
437
+ */
438
+ export declare interface RefractorOptions {
439
+ readonly element?: string;
440
+ readonly plugins?: RefractorPlugin[];
441
+ readonly specificationObj?: typeof specificationObj;
479
442
  }
480
443
 
481
444
  /**
482
445
  * @public
483
446
  */
484
- export declare const refract: <T extends Element_2>(value: unknown, { specPath, plugins, specificationObj, }?: {
485
- specPath?: string[] | undefined;
486
- plugins?: never[] | undefined;
487
- specificationObj?: {
488
- visitors: {
489
- value: FallbackVisitor_2;
490
- JSONSchemaOrJSONReferenceVisitor: SchemaOrReferenceVisitor;
491
- document: {
492
- objects: {
493
- JSONSchema: {
494
- $visitor: JSONSchemaVisitor_2;
495
- fixedFields: {
496
- id: {
497
- $ref: string;
498
- };
499
- $schema: {
500
- $ref: string;
501
- };
502
- multipleOf: {
503
- $ref: string;
504
- };
505
- maximum: {
506
- $ref: string;
507
- };
508
- exclusiveMaximum: {
509
- $ref: string;
510
- };
511
- minimum: {
512
- $ref: string;
513
- };
514
- exclusiveMinimum: {
515
- $ref: string;
516
- };
517
- maxLength: {
518
- $ref: string;
519
- };
520
- minLength: {
521
- $ref: string;
522
- };
523
- pattern: {
524
- $ref: string;
525
- };
526
- additionalItems: SchemaOrReferenceVisitor;
527
- items: ItemsVisitor_2;
528
- maxItems: {
529
- $ref: string;
530
- };
531
- minItems: {
532
- $ref: string;
533
- };
534
- uniqueItems: {
535
- $ref: string;
536
- };
537
- maxProperties: {
538
- $ref: string;
539
- };
540
- minProperties: {
541
- $ref: string;
542
- };
543
- required: RequiredVisitor;
544
- properties: PropertiesVisitor_2;
545
- additionalProperties: SchemaOrReferenceVisitor;
546
- patternProperties: PatternPropertiesVisitor_2;
547
- dependencies: DependenciesVisitor;
548
- enum: EnumVisitor;
549
- type: TypeVisitor;
550
- allOf: AllOfVisitor_2;
551
- anyOf: AnyOfVisitor_2;
552
- oneOf: OneOfVisitor_2;
553
- not: SchemaOrReferenceVisitor;
554
- definitions: DefinitionsVisitor;
555
- title: {
556
- $ref: string;
557
- };
558
- description: {
559
- $ref: string;
560
- };
561
- default: {
562
- $ref: string;
563
- };
564
- format: {
565
- $ref: string;
566
- };
567
- base: {
568
- $ref: string;
569
- };
570
- links: LinksVisitor;
571
- media: {
572
- $ref: string;
573
- };
574
- readOnly: {
575
- $ref: string;
576
- };
577
- };
578
- };
579
- JSONReference: {
580
- $visitor: JSONReferenceVisitor;
581
- fixedFields: {
582
- $ref: JSONReference$RefVisitor;
583
- };
584
- };
585
- Media: {
586
- $visitor: MediaVisitor;
587
- fixedFields: {
588
- binaryEncoding: {
589
- $ref: string;
590
- };
591
- type: {
592
- $ref: string;
593
- };
594
- };
595
- };
596
- LinkDescription: {
597
- $visitor: LinkDescriptionVisitor_2;
598
- fixedFields: {
599
- href: {
600
- $ref: string;
601
- };
602
- rel: {
603
- $ref: string;
604
- };
605
- title: {
606
- $ref: string;
607
- };
608
- targetSchema: SchemaOrReferenceVisitor;
609
- mediaType: {
610
- $ref: string;
611
- };
612
- method: {
613
- $ref: string;
614
- };
615
- encType: {
616
- $ref: string;
617
- };
618
- schema: SchemaOrReferenceVisitor;
619
- };
620
- };
621
- };
622
- };
623
- };
624
- } | undefined;
625
- }) => T;
447
+ export declare type RefractorPlugin = (toolbox: Toolbox) => {
448
+ visitor?: object;
449
+ pre?: () => void;
450
+ post?: () => void;
451
+ };
626
452
 
627
453
  /**
628
454
  * @public
629
455
  */
630
456
  export declare const refractorPluginReplaceEmptyElement: () => () => {
631
457
  visitor: {
632
- StringElement(element: StringElement, key: any, parent: any, path: any, ancestors: any[]): any;
458
+ StringElement(path: Path<StringElement>): void;
633
459
  };
634
460
  };
635
461
 
@@ -641,6 +467,14 @@ export { SpecificationVisitorOptions }
641
467
 
642
468
  export { SpecPath }
643
469
 
470
+ /**
471
+ * @public
472
+ */
473
+ export declare interface Toolbox {
474
+ predicates: Record<string, (...args: any[]) => boolean>;
475
+ namespace: Namespace;
476
+ }
477
+
644
478
  export { Visitor }
645
479
 
646
480
  export { VisitorOptions }