@jetio/validator 1.0.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.
Files changed (57) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1362 -0
  3. package/dist/cli.js +219 -0
  4. package/dist/compileSchema.d.ts +148 -0
  5. package/dist/compileSchema.js +2199 -0
  6. package/dist/compileSchema.js.map +1 -0
  7. package/dist/formats.d.ts +41 -0
  8. package/dist/formats.js +166 -0
  9. package/dist/formats.js.map +1 -0
  10. package/dist/index.cjs.js +6167 -0
  11. package/dist/index.d.ts +9 -0
  12. package/dist/index.esm.js +6148 -0
  13. package/dist/index.js +28 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/jet-validator.d.ts +88 -0
  16. package/dist/jet-validator.js +983 -0
  17. package/dist/jet-validator.js.map +1 -0
  18. package/dist/resolver.d.ts +348 -0
  19. package/dist/resolver.js +2459 -0
  20. package/dist/resolver.js.map +1 -0
  21. package/dist/scripts/load-metaschemas.d.ts +1 -0
  22. package/dist/scripts/metaschema-loader.d.ts +2 -0
  23. package/dist/src/compileSchema.d.ts +148 -0
  24. package/dist/src/formats.d.ts +41 -0
  25. package/dist/src/index.d.ts +9 -0
  26. package/dist/src/jet-validator.d.ts +88 -0
  27. package/dist/src/resolver.d.ts +348 -0
  28. package/dist/src/types/format.d.ts +7 -0
  29. package/dist/src/types/keywords.d.ts +78 -0
  30. package/dist/src/types/schema.d.ts +123 -0
  31. package/dist/src/types/standalone.d.ts +4 -0
  32. package/dist/src/types/validation.d.ts +49 -0
  33. package/dist/src/utilities/index.d.ts +11 -0
  34. package/dist/src/utilities/schema.d.ts +10 -0
  35. package/dist/types/format.d.ts +7 -0
  36. package/dist/types/format.js +3 -0
  37. package/dist/types/format.js.map +1 -0
  38. package/dist/types/keywords.d.ts +78 -0
  39. package/dist/types/keywords.js +4 -0
  40. package/dist/types/keywords.js.map +1 -0
  41. package/dist/types/schema.d.ts +123 -0
  42. package/dist/types/schema.js +3 -0
  43. package/dist/types/schema.js.map +1 -0
  44. package/dist/types/standalone.d.ts +4 -0
  45. package/dist/types/standalone.js +3 -0
  46. package/dist/types/standalone.js.map +1 -0
  47. package/dist/types/validation.d.ts +49 -0
  48. package/dist/types/validation.js +3 -0
  49. package/dist/types/validation.js.map +1 -0
  50. package/dist/utilities/index.d.ts +11 -0
  51. package/dist/utilities/index.js +146 -0
  52. package/dist/utilities/index.js.map +1 -0
  53. package/dist/utilities/schema.d.ts +10 -0
  54. package/dist/utilities/schema.js +232 -0
  55. package/dist/utilities/schema.js.map +1 -0
  56. package/dist/validator.umd.js +6196 -0
  57. package/package.json +79 -0
@@ -0,0 +1,78 @@
1
+ import { Extra } from "../compileSchema";
2
+ import { SchemaDefinition, SchemaType } from "./schema";
3
+ import { ValidatorOptions } from "./validation";
4
+ export interface KeywordDefinition {
5
+ keyword: string;
6
+ type?: SchemaType;
7
+ schemaType?: string | string[];
8
+ implements?: string | string[];
9
+ async?: boolean;
10
+ metaSchema?: SchemaDefinition;
11
+ }
12
+ export interface MacroKeywordDefinition extends KeywordDefinition {
13
+ macro?: MacroFunction;
14
+ }
15
+ export interface CompileKeywordDefinition extends KeywordDefinition {
16
+ compile?: CompileFunction;
17
+ }
18
+ export interface ValidateKeywordDefinition extends KeywordDefinition {
19
+ validate?: ValidateFunction;
20
+ }
21
+ export interface CodeKeywordDefinition extends KeywordDefinition {
22
+ code?: CodeFunction;
23
+ }
24
+ export type MacroFunction = (schemaValue: any, // The keyword's value
25
+ parentSchema: SchemaDefinition, // Full schema
26
+ context?: MacroContext) => SchemaDefinition | boolean;
27
+ export interface MacroContext {
28
+ schemaPath: string;
29
+ rootSchema: SchemaDefinition;
30
+ opts: ValidatorOptions;
31
+ }
32
+ export interface CompileContext {
33
+ schemaPath: string;
34
+ rootSchema: SchemaDefinition;
35
+ opts: ValidatorOptions;
36
+ }
37
+ export type CompileFunction = (schemaValue: any, // The keyword's value in schema
38
+ parentSchema: SchemaDefinition, // Full schema
39
+ context: CompileContext) => CompiledValidateFunction;
40
+ export type CompiledValidateFunction = (data: any, // Current data being validated
41
+ rootData: any, // Original data passed to validate()
42
+ dataPath: string) => boolean | KeywordValidationError | Promise<boolean | KeywordValidationError>;
43
+ export type ValidateFunction = (schemaValue: any, // Keyword value from schema
44
+ data: any, // Current data being validated
45
+ parentSchema: SchemaDefinition, dataContext: ValidateDataContext) => boolean | KeywordValidationError | Promise<boolean | KeywordValidationError>;
46
+ export interface ValidateDataContext {
47
+ dataPath: string;
48
+ rootData: any;
49
+ schemaPath: string;
50
+ parentData?: any;
51
+ parentDataProperty?: string | number;
52
+ }
53
+ interface KeywordValidationError {
54
+ message: string;
55
+ [key: string]: any;
56
+ }
57
+ export type CodeFunction = (schemaValue: any, parentSchema: SchemaDefinition, context: CodeContext) => string;
58
+ export type codeError = {
59
+ keyword?: string;
60
+ message: string;
61
+ expected?: string;
62
+ value?: string;
63
+ [key: string]: any;
64
+ };
65
+ export interface CodeContext {
66
+ dataVar: string;
67
+ dataPath: string;
68
+ schemaPath: string;
69
+ accessPattern?: string;
70
+ errorVariable?: string;
71
+ allErrors: boolean;
72
+ functionName: string;
73
+ extra: Extra;
74
+ buildError(error: codeError): string;
75
+ addEvaluatedProperty(prop: any): string;
76
+ addEvaluatedItem(item: any): string;
77
+ }
78
+ export {};
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // types/keywords.ts
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=keywords.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keywords.js","sourceRoot":"","sources":["../../src/types/keywords.ts"],"names":[],"mappings":";AAAA,oBAAoB"}
@@ -0,0 +1,123 @@
1
+ export type PrimitiveType = "string" | "number" | "boolean" | "integer";
2
+ export type BaseType = PrimitiveType | "array" | "object" | "null";
3
+ export type SchemaType = BaseType | BaseType[];
4
+ export interface PrimitiveSchema {
5
+ type: PrimitiveType;
6
+ minLength?: number | $data;
7
+ maxLength?: number | $data;
8
+ pattern?: string | $data;
9
+ format?: string | $data;
10
+ minimum?: number | $data;
11
+ maximum?: number | $data;
12
+ exclusiveMinimum?: number | $data;
13
+ exclusiveMaximum?: number | $data;
14
+ multipleOf?: number | $data;
15
+ default?: any;
16
+ }
17
+ export interface ArraySchema {
18
+ type: "array";
19
+ prefixItems?: (SchemaDefinition | boolean)[];
20
+ items?: SchemaDefinition | (SchemaDefinition | boolean)[] | boolean;
21
+ minItems?: number | $data;
22
+ maxItems?: number | $data;
23
+ contains?: SchemaDefinition | boolean;
24
+ uniqueItems?: boolean | $data;
25
+ additionalItems?: SchemaDefinition | boolean;
26
+ unevaluatedItems?: SchemaDefinition | boolean;
27
+ minContains?: number | $data;
28
+ maxContains?: number | $data;
29
+ default?: any;
30
+ }
31
+ export interface ObjectSchema {
32
+ type: "object";
33
+ properties?: Record<string, SchemaDefinition>;
34
+ maxProperties?: number | $data;
35
+ minProperties?: number | $data;
36
+ patternProperties?: Record<string, SchemaDefinition>;
37
+ propertyNames?: SchemaDefinition;
38
+ dependentRequired?: Record<string, string[]>;
39
+ dependentSchemas?: Record<string, SchemaDefinition>;
40
+ dependencies?: Record<string, string[] | SchemaDefinition>;
41
+ required?: string[] | $data;
42
+ additionalProperties?: SchemaDefinition | boolean;
43
+ unevaluatedProperties?: SchemaDefinition | boolean;
44
+ default?: any;
45
+ }
46
+ export type $data = {
47
+ $data: string;
48
+ };
49
+ export interface BaseSchema<T = any> {
50
+ $id?: string;
51
+ $schema?: string;
52
+ type?: SchemaType;
53
+ minLength?: number | $data;
54
+ maxLength?: number | $data;
55
+ pattern?: string | $data;
56
+ format?: string | $data;
57
+ formatMode?: "fast" | "full";
58
+ minimum?: number | $data;
59
+ maximum?: number | $data;
60
+ exclusiveMinimum?: number | $data;
61
+ exclusiveMaximum?: number | $data;
62
+ multipleOf?: number | $data;
63
+ $vocabulary?: Record<string, boolean>;
64
+ items?: SchemaDefinition | (SchemaDefinition | boolean)[] | boolean;
65
+ prefixItems?: (SchemaDefinition | boolean)[];
66
+ minItems?: number | $data;
67
+ maxItems?: number | $data;
68
+ contains?: SchemaDefinition | boolean;
69
+ uniqueItems?: boolean | $data;
70
+ additionalItems?: SchemaDefinition | boolean;
71
+ unevaluatedItems?: SchemaDefinition | boolean;
72
+ minContains?: number | $data;
73
+ maxContains?: number | $data;
74
+ properties?: T extends object ? {
75
+ [K in keyof T]?: SchemaDefinition | boolean;
76
+ } : Record<string, SchemaDefinition | boolean>;
77
+ maxProperties?: number | $data;
78
+ minProperties?: number | $data;
79
+ patternProperties?: Record<string, SchemaDefinition | boolean>;
80
+ propertyNames?: SchemaDefinition | boolean;
81
+ dependentRequired?: Record<string, string[]>;
82
+ dependentSchemas?: Record<string, SchemaDefinition | boolean>;
83
+ dependencies?: Record<string, string[] | SchemaDefinition>;
84
+ required?: T extends object ? (keyof T)[] : string[] | $data;
85
+ additionalProperties?: SchemaDefinition | boolean;
86
+ unevaluatedProperties?: SchemaDefinition | boolean;
87
+ anyOf?: (SchemaDefinition | boolean)[];
88
+ allOf?: (SchemaDefinition | boolean)[];
89
+ not?: SchemaDefinition | boolean;
90
+ oneOf?: (SchemaDefinition | boolean)[];
91
+ if?: SchemaDefinition | boolean;
92
+ then?: SchemaDefinition | boolean;
93
+ elseIf?: {
94
+ if?: SchemaDefinition;
95
+ then?: SchemaDefinition;
96
+ }[];
97
+ else?: SchemaDefinition | boolean;
98
+ const?: any | $data;
99
+ enum?: any[] | $data;
100
+ title?: string;
101
+ description?: string;
102
+ examples?: any[];
103
+ default?: any;
104
+ readOnly?: boolean;
105
+ writeOnly?: boolean;
106
+ $ref?: string;
107
+ $dynamicRef?: string;
108
+ $dynamicAnchor?: string;
109
+ $anchor?: string;
110
+ $defs?: Record<string, SchemaDefinition | boolean>;
111
+ definitions?: Record<string, SchemaDefinition | boolean>;
112
+ __functionName?: string;
113
+ allFormats?: string[];
114
+ errorMessage?: string | Record<string, any>;
115
+ [key: string]: any;
116
+ }
117
+ export type SchemaDefinition<T = any> = BaseSchema<T>;
118
+ export type DependencyEntry = {
119
+ required?: string[];
120
+ requiredSource?: "dependencies" | "dependentRequired";
121
+ schema?: any;
122
+ schemaSource?: "dependencies" | "dependentSchemas";
123
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/types/schema.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export interface StandaloneOptions {
2
+ inlineFormats?: 'auto' | 'all' | 'none';
3
+ inlineKeywords?: boolean;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=standalone.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"standalone.js","sourceRoot":"","sources":["../../src/types/standalone.ts"],"names":[],"mappings":""}
@@ -0,0 +1,49 @@
1
+ import { SchemaDefinition } from "./schema";
2
+ export interface ValidationError {
3
+ dataPath: string;
4
+ schemaPath: string;
5
+ rule: string;
6
+ value?: any;
7
+ expected?: any;
8
+ message: string;
9
+ [key: string]: any;
10
+ }
11
+ export interface ValidationResult {
12
+ valid: boolean;
13
+ errors?: ValidationError[];
14
+ }
15
+ export type ValidationFunction = (data: any) => boolean;
16
+ export type ErrorAttachedValidatorFn = ValidationFunction & {
17
+ errors: ValidationError[];
18
+ };
19
+ export interface ValidatorOptions {
20
+ allErrors?: boolean;
21
+ draft?: "draft2019-09" | "draft2020-12" | "draft7" | "draft6";
22
+ verbose?: boolean;
23
+ loopEnum?: number;
24
+ debug?: boolean;
25
+ loopRequired?: number;
26
+ $data?: boolean;
27
+ logFunction?: boolean;
28
+ strict?: boolean;
29
+ inlineRefs?: boolean;
30
+ formatMode?: "full" | false | "fast";
31
+ overwrittenFormats?: string[];
32
+ formats?: string[];
33
+ validateFormats?: boolean;
34
+ loadSchema?: (uri: string) => Promise<SchemaDefinition> | SchemaDefinition;
35
+ removeAdditional?: boolean | "all" | "failing";
36
+ useDefaults?: boolean | "empty";
37
+ coerceTypes?: boolean | "array";
38
+ cache?: boolean;
39
+ strictSchema?: boolean;
40
+ metaSchema?: string;
41
+ strictNumbers?: boolean;
42
+ strictRequired?: boolean;
43
+ allowFormatOverride?: boolean;
44
+ strictTypes?: boolean | "log";
45
+ async?: boolean;
46
+ validateSchema?: boolean;
47
+ addUsedSchema?: boolean;
48
+ errorMessage?: boolean;
49
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=validation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/types/validation.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import { JetValidator } from "../jet-validator";
2
+ import { KeywordDefinition } from "../types/keywords";
3
+ import { BaseType, SchemaDefinition } from "../types/schema";
4
+ export declare function len_of(str: string): number;
5
+ export declare function escapeTemplateString(str: string): string;
6
+ export declare function getSchemaAtPath(rootSchema: SchemaDefinition, path: string): SchemaDefinition | boolean;
7
+ export declare function shouldApplyKeyword(keywordDef: KeywordDefinition, keywordValue: any): boolean;
8
+ export declare function getJSONType(value: any): BaseType;
9
+ export declare function validateKeywordValue(keyword: string, value: any, metaSchema: SchemaDefinition, jetValidator: JetValidator): void;
10
+ export declare function canonicalStringify(obj: any): string;
11
+ export declare function deepEqual(a: any, b: any): boolean;
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.len_of = len_of;
4
+ exports.escapeTemplateString = escapeTemplateString;
5
+ exports.getSchemaAtPath = getSchemaAtPath;
6
+ exports.shouldApplyKeyword = shouldApplyKeyword;
7
+ exports.getJSONType = getJSONType;
8
+ exports.validateKeywordValue = validateKeywordValue;
9
+ exports.canonicalStringify = canonicalStringify;
10
+ exports.deepEqual = deepEqual;
11
+ function len_of(str) {
12
+ let count = 0;
13
+ for (let i = 0; i < str.length; i++) {
14
+ count++;
15
+ const code = str.charCodeAt(i);
16
+ if (code >= 0xd800 && code <= 0xdbff && i + 1 < str.length) {
17
+ const nextCode = str.charCodeAt(i + 1);
18
+ if ((nextCode & 0xfc00) === 0xdc00) {
19
+ i++;
20
+ }
21
+ }
22
+ }
23
+ return count;
24
+ }
25
+ function escapeTemplateString(str) {
26
+ // Replace backslashes first, then other special chars, but preserve ${...}
27
+ return str
28
+ .replace(/\\/g, "\\\\") // Escape backslashes
29
+ .replace(/`/g, "\\`") // Escape backticks
30
+ .replace(/\$(?!{)/g, "\\$") // Escape $ not followed by {
31
+ .replace(/\r/g, "\\r") // Escape carriage returns
32
+ .replace(/\n/g, "\\n") // Escape newlines
33
+ .replace(/\t/g, "\\t"); // Escape tabs
34
+ }
35
+ function decodePointerSegment(segment) {
36
+ const uriDecoded = decodeURIComponent(segment);
37
+ return uriDecoded.replace(/~1/g, "/").replace(/~0/g, "~");
38
+ }
39
+ function getSchemaAtPath(rootSchema, path) {
40
+ if (path === "#")
41
+ return rootSchema;
42
+ const segments = path.slice(2).split("/");
43
+ let current = rootSchema;
44
+ for (const segment of segments) {
45
+ const decodedSegment = decodePointerSegment(segment);
46
+ if (current && typeof current === "object") {
47
+ current = current[decodedSegment];
48
+ }
49
+ else {
50
+ return {};
51
+ // throw new Error(
52
+ // `Cannot resolve path ${path}. Segment '${decodedSegment}' not found.`
53
+ // );
54
+ }
55
+ }
56
+ return current;
57
+ }
58
+ function shouldApplyKeyword(keywordDef, keywordValue) {
59
+ if (keywordDef.schemaType) {
60
+ const schemaTypes = Array.isArray(keywordDef.schemaType)
61
+ ? keywordDef.schemaType
62
+ : [keywordDef.schemaType];
63
+ const valueType = getJSONType(keywordValue);
64
+ const hasMatchingType = schemaTypes.some((type) => {
65
+ if (type === "number" && valueType === "integer")
66
+ return true;
67
+ return type === valueType;
68
+ });
69
+ if (!hasMatchingType) {
70
+ return false;
71
+ }
72
+ }
73
+ return true;
74
+ }
75
+ function getJSONType(value) {
76
+ if (value === null)
77
+ return "null";
78
+ if (Array.isArray(value))
79
+ return "array";
80
+ if (typeof value === "boolean")
81
+ return "boolean";
82
+ if (typeof value === "number") {
83
+ return Number.isInteger(value) ? "integer" : "number";
84
+ }
85
+ if (typeof value === "string")
86
+ return "string";
87
+ if (typeof value === "object")
88
+ return "object";
89
+ return "string";
90
+ }
91
+ function validateKeywordValue(keyword, value, metaSchema, jetValidator) {
92
+ const validator = jetValidator.compile(metaSchema);
93
+ const result = validator(value);
94
+ if (!result) {
95
+ throw new Error(`Invalid value for keyword "${keyword}": ${JSON.stringify(validator.errors)}`);
96
+ }
97
+ }
98
+ function canonicalStringify(obj) {
99
+ if (obj === null)
100
+ return "null";
101
+ if (typeof obj !== "object")
102
+ return JSON.stringify(obj);
103
+ if (Array.isArray(obj)) {
104
+ const parts = new Array(obj.length);
105
+ for (let i = 0; i < obj.length; i++) {
106
+ parts[i] = canonicalStringify(obj[i]);
107
+ }
108
+ return "[" + parts.join(",") + "]";
109
+ }
110
+ const keys = Object.keys(obj).sort();
111
+ const parts = new Array(keys.length);
112
+ for (let i = 0; i < keys.length; i++) {
113
+ const key = keys[i];
114
+ parts[i] = `"${key}":${canonicalStringify(obj[key])}`;
115
+ }
116
+ return "{" + parts.join(",") + "}";
117
+ }
118
+ function deepEqual(a, b) {
119
+ if (a === b)
120
+ return true;
121
+ if (a === null || b === null || typeof a !== typeof b)
122
+ return false;
123
+ if (Array.isArray(a)) {
124
+ if (!Array.isArray(b) || a.length !== b.length)
125
+ return false;
126
+ for (let i = 0; i < a.length; i++) {
127
+ if (!deepEqual(a[i], b[i]))
128
+ return false;
129
+ }
130
+ return true;
131
+ }
132
+ if (typeof a === "object") {
133
+ const keysA = Object.keys(a);
134
+ const keysB = Object.keys(b);
135
+ if (keysA.length !== keysB.length)
136
+ return false;
137
+ const keySetB = new Set(keysB);
138
+ for (const key of keysA) {
139
+ if (!keySetB.has(key) || !deepEqual(a[key], b[key]))
140
+ return false;
141
+ }
142
+ return true;
143
+ }
144
+ return false;
145
+ }
146
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utilities/index.ts"],"names":[],"mappings":";;AAIA,wBAaC;AAED,oDASC;AAOD,0CAoBC;AAED,gDAqBC;AAED,kCAUC;AAED,oDAeC;AAED,gDAmBC;AAED,8BAyBC;AAvJD,SAAgB,MAAM,CAAC,GAAW;IAChC,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACpC,KAAK,EAAE,CAAC;QACR,MAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC/B,IAAI,IAAI,IAAI,MAAM,IAAI,IAAI,IAAI,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC;YAC3D,MAAM,QAAQ,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACvC,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,KAAK,MAAM,EAAE,CAAC;gBACnC,CAAC,EAAE,CAAC;YACN,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAgB,oBAAoB,CAAC,GAAW;IAC9C,2EAA2E;IAC3E,OAAO,GAAG;SACP,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,qBAAqB;SAC5C,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,mBAAmB;SACxC,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,6BAA6B;SACxD,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,0BAA0B;SAChD,OAAO,CAAC,KAAK,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
+ string: string[];
3
+ number: string[];
4
+ integer: string[];
5
+ boolean: string[];
6
+ array: string[];
7
+ object: string[];
8
+ null: string[];
9
+ };
10
+ export declare const baseSchemaKeys: Set<string>;