-
Notifications
You must be signed in to change notification settings - Fork 18
/
index.ts
89 lines (85 loc) · 2.92 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import { createError, createCustomError } from "./lib/utils/createCustomError";
import getTypeOf from "./lib/getTypeOf";
import { resolveOneOf, resolveOneOfFuzzy } from "./lib/features/oneOf";
import { resolveAllOf } from "./lib/features/allOf";
import resolveRefStrict from "./lib/resolveRef.strict";
import resolveRef from "./lib/resolveRef";
import settings from "./lib/config/settings";
import strings from "./lib/config/strings";
import validateAsync from "./lib/validateAsync";
import { reduceSchema } from "./lib/reduceSchema";
import { resolveDynamicSchema, isDynamicSchema } from "./lib/resolveDynamicSchema";
import { mergeSchema } from "./lib/mergeSchema";
import render from "./lib/utils/render";
import { Draft } from "./lib/draft";
import { Draft04, draft04Config } from "./lib/draft04";
import { Draft06, draft06Config } from "./lib/draft06";
import { Draft07, draft07Config } from "./lib/draft07";
import { Draft2019, draft2019Config } from "./lib/draft2019";
import { JsonEditor, draftJsonEditorConfig } from "./lib/jsoneditor";
import { isJsonError } from "./lib/types";
import { SchemaNode, isSchemaNode, createNode } from "./lib/schemaNode";
const config = { strings };
export {
config,
createCustomError,
createError,
createNode, // v10
Draft,
Draft04, // core implementing draft04 specs
draft04Config, // config implementing draft04 specs
Draft06, // core implementing draft06 specs
draft06Config, // config implementing draft06 specs
Draft07, // core implementing draft07 specs
draft07Config, // config implementing draft07 specs
Draft2019, // core implementing draft2019-09 specs
draft2019Config, // config implementing draft2019-09 specs
draftJsonEditorConfig, // adjusted config of draft04 to better support the json-editor
getTypeOf, // returns the javascript datatype
isDynamicSchema, // v8
isJsonError,
isSchemaNode, // v10
JsonEditor, // adjusted core of draft07 to better support the json-editor
mergeSchema, // v8
reduceSchema, // v8
render,
resolveAllOf,
resolveDynamicSchema, // v8
resolveOneOf,
resolveOneOfFuzzy,
resolveRefStrict,
resolveRef,
settings,
validateAsync // async validation of data by a schema
};
import { DraftConfig } from "./lib/draft";
import { EachCallback } from "./lib/each";
import { EachSchemaCallback } from "./lib/eachSchema";
import { CreateError } from "./lib/utils/createCustomError";
import { GetSchemaOptions } from "./lib/getSchema";
import {
JsonSchema,
JsonPointer,
JsonError,
ErrorData,
} from "./lib/types";
import {
JsonValidator,
JsonTypeValidator
} from "./lib/validation/type";
import { JSType } from "./lib/getTypeOf";
export type {
CreateError,
DraftConfig,
EachCallback,
EachSchemaCallback,
ErrorData,
GetSchemaOptions,
JsonError,
JsonPointer,
JsonSchema,
JsonTypeValidator,
JsonValidator,
JSType,
SchemaNode
};