1 |
|
2 | import { JSONSchema4, JSONSchema4Type, JSONSchema4TypeName } from 'json-schema';
|
3 | export declare type SchemaType = 'ALL_OF' | 'UNNAMED_SCHEMA' | 'ANY' | 'ANY_OF' | 'BOOLEAN' | 'NAMED_ENUM' | 'NAMED_SCHEMA' | 'NULL' | 'NUMBER' | 'STRING' | 'OBJECT' | 'ONE_OF' | 'TYPED_ARRAY' | 'REFERENCE' | 'UNION' | 'UNNAMED_ENUM' | 'UNTYPED_ARRAY' | 'CUSTOM_TYPE';
|
4 | export declare type JSONSchemaTypeName = JSONSchema4TypeName;
|
5 | export declare type JSONSchemaType = JSONSchema4Type;
|
6 | export interface JSONSchema extends JSONSchema4 {
|
7 | |
8 |
|
9 |
|
10 | tsEnumNames?: string[];
|
11 | |
12 |
|
13 |
|
14 | tsType?: string;
|
15 | }
|
16 | export declare const Parent: unique symbol;
|
17 | export interface LinkedJSONSchema extends JSONSchema {
|
18 | |
19 |
|
20 |
|
21 |
|
22 | [Parent]: LinkedJSONSchema | null;
|
23 | additionalItems?: boolean | LinkedJSONSchema;
|
24 | additionalProperties: boolean | LinkedJSONSchema;
|
25 | items?: LinkedJSONSchema | LinkedJSONSchema[];
|
26 | definitions?: {
|
27 | [k: string]: LinkedJSONSchema;
|
28 | };
|
29 | properties?: {
|
30 | [k: string]: LinkedJSONSchema;
|
31 | };
|
32 | patternProperties?: {
|
33 | [k: string]: LinkedJSONSchema;
|
34 | };
|
35 | dependencies?: {
|
36 | [k: string]: LinkedJSONSchema | string[];
|
37 | };
|
38 | allOf?: LinkedJSONSchema[];
|
39 | anyOf?: LinkedJSONSchema[];
|
40 | oneOf?: LinkedJSONSchema[];
|
41 | not?: LinkedJSONSchema;
|
42 | }
|
43 | export interface NormalizedJSONSchema extends LinkedJSONSchema {
|
44 | additionalItems?: boolean | NormalizedJSONSchema;
|
45 | additionalProperties: boolean | NormalizedJSONSchema;
|
46 | extends?: string[];
|
47 | items?: NormalizedJSONSchema | NormalizedJSONSchema[];
|
48 | definitions?: {
|
49 | [k: string]: NormalizedJSONSchema;
|
50 | };
|
51 | properties?: {
|
52 | [k: string]: NormalizedJSONSchema;
|
53 | };
|
54 | patternProperties?: {
|
55 | [k: string]: NormalizedJSONSchema;
|
56 | };
|
57 | dependencies?: {
|
58 | [k: string]: NormalizedJSONSchema | string[];
|
59 | };
|
60 | allOf?: NormalizedJSONSchema[];
|
61 | anyOf?: NormalizedJSONSchema[];
|
62 | oneOf?: NormalizedJSONSchema[];
|
63 | not?: NormalizedJSONSchema;
|
64 | required: string[];
|
65 | id: never;
|
66 | }
|
67 | export interface EnumJSONSchema extends NormalizedJSONSchema {
|
68 | enum: any[];
|
69 | }
|
70 | export interface NamedEnumJSONSchema extends NormalizedJSONSchema {
|
71 | tsEnumNames: string[];
|
72 | }
|
73 | export interface SchemaSchema extends NormalizedJSONSchema {
|
74 | properties: {
|
75 | [k: string]: NormalizedJSONSchema;
|
76 | };
|
77 | required: string[];
|
78 | }
|
79 | export interface JSONSchemaWithDefinitions extends NormalizedJSONSchema {
|
80 | definitions: {
|
81 | [k: string]: NormalizedJSONSchema;
|
82 | };
|
83 | }
|
84 | export interface CustomTypeJSONSchema extends NormalizedJSONSchema {
|
85 | tsType: string;
|
86 | }
|
87 | export declare const getRootSchema: ((schema: LinkedJSONSchema) => LinkedJSONSchema) & import("lodash").MemoizedFunction;
|
88 | export declare function isPrimitive(schema: LinkedJSONSchema | JSONSchemaType): schema is JSONSchemaType;
|
89 | export declare function isCompound(schema: JSONSchema): boolean;
|
90 |
|
\ | No newline at end of file |