@forklaunch/validator 0.6.2 → 0.6.4
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/lib/__test__/utils/mockSchemaValidator.d.mts +1 -1
- package/lib/__test__/utils/mockSchemaValidator.d.ts +1 -1
- package/lib/index.d.mts +2 -2
- package/lib/index.d.ts +2 -2
- package/lib/{schema.types-MvSNOCj2.d.mts → schema.types-Df9EB_Ke.d.mts} +29 -23
- package/lib/{schema.types-MvSNOCj2.d.ts → schema.types-Df9EB_Ke.d.ts} +29 -23
- package/lib/src/typebox/index.d.mts +39 -38
- package/lib/src/typebox/index.d.ts +39 -38
- package/lib/src/typebox/index.js +27 -34
- package/lib/src/typebox/index.mjs +27 -34
- package/lib/src/zod/index.d.mts +38 -37
- package/lib/src/zod/index.d.ts +38 -37
- package/lib/src/zod/index.js +11 -28
- package/lib/src/zod/index.mjs +11 -28
- package/package.json +5 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SchemaObject } from 'openapi3-ts/oas31';
|
|
2
|
-
import { S as SchemaValidator, L as LiteralSchema, a as ParseResult } from '../../schema.types-
|
|
2
|
+
import { S as SchemaValidator, L as LiteralSchema, a as ParseResult } from '../../schema.types-Df9EB_Ke.mjs';
|
|
3
3
|
import '@forklaunch/common';
|
|
4
4
|
import '@sinclair/typebox';
|
|
5
5
|
import '@sinclair/typebox/compiler';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SchemaObject } from 'openapi3-ts/oas31';
|
|
2
|
-
import { S as SchemaValidator, L as LiteralSchema, a as ParseResult } from '../../schema.types-
|
|
2
|
+
import { S as SchemaValidator, L as LiteralSchema, a as ParseResult } from '../../schema.types-Df9EB_Ke.js';
|
|
3
3
|
import '@forklaunch/common';
|
|
4
4
|
import '@sinclair/typebox';
|
|
5
5
|
import '@sinclair/typebox/compiler';
|
package/lib/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as ParseError } from './schema.types-
|
|
2
|
-
export { A as AnySchemaValidator, I as IdiomaticSchema, e as Increment, K as KeyTypes, L as LiteralSchema, a as ParseResult, d as Schema, b as SchemaResolve, c as SchemaTranslate, S as SchemaValidator, U as UnboxedObjectSchema } from './schema.types-
|
|
1
|
+
import { P as ParseError } from './schema.types-Df9EB_Ke.mjs';
|
|
2
|
+
export { A as AnySchemaValidator, I as IdiomaticSchema, e as Increment, K as KeyTypes, L as LiteralSchema, a as ParseResult, d as Schema, b as SchemaResolve, c as SchemaTranslate, S as SchemaValidator, U as UnboxedObjectSchema } from './schema.types-Df9EB_Ke.mjs';
|
|
3
3
|
import '@forklaunch/common';
|
|
4
4
|
import 'openapi3-ts/oas31';
|
|
5
5
|
import '@sinclair/typebox';
|
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as ParseError } from './schema.types-
|
|
2
|
-
export { A as AnySchemaValidator, I as IdiomaticSchema, e as Increment, K as KeyTypes, L as LiteralSchema, a as ParseResult, d as Schema, b as SchemaResolve, c as SchemaTranslate, S as SchemaValidator, U as UnboxedObjectSchema } from './schema.types-
|
|
1
|
+
import { P as ParseError } from './schema.types-Df9EB_Ke.js';
|
|
2
|
+
export { A as AnySchemaValidator, I as IdiomaticSchema, e as Increment, K as KeyTypes, L as LiteralSchema, a as ParseResult, d as Schema, b as SchemaResolve, c as SchemaTranslate, S as SchemaValidator, U as UnboxedObjectSchema } from './schema.types-Df9EB_Ke.js';
|
|
3
3
|
import '@forklaunch/common';
|
|
4
4
|
import 'openapi3-ts/oas31';
|
|
5
5
|
import '@sinclair/typebox';
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { MimeType, Prettify } from '@forklaunch/common';
|
|
2
2
|
import { SchemaObject } from 'openapi3-ts/oas31';
|
|
3
|
-
import
|
|
4
|
-
import { TProperties, TOptional, TArray, TUnion, TLiteral, TFunction, TRecord, TPromise, TSchema, TUnknown, TKind, TObject as TObject$1, TNever, StaticDecode } from '@sinclair/typebox';
|
|
3
|
+
import { TProperties, TOptional, TArray, TUnion, TLiteral, TFunction, TRecord, TPromise, TSchema, TString, TTransform, TNumber, TBoolean, TNull, TBigInt, TDate, TSymbol, TVoid, TUndefined, TAny, TUnknown, TNever, TKind, TObject as TObject$1, StaticDecode } from '@sinclair/typebox';
|
|
5
4
|
import { TypeCheck } from '@sinclair/typebox/compiler';
|
|
6
5
|
import { ZodObject as ZodObject$1, ZodRawShape, ZodOptional, ZodArray, ZodUnion, ZodLiteral, ZodFunction, ZodTuple, ZodRecord, ZodPromise, ZodType, z, ZodUnknown, ZodPipeline, ZodTypeAny, ZodEffects, ZodNever } from 'zod';
|
|
7
6
|
|
|
7
|
+
/**
|
|
8
|
+
* This module provides a TypeScript-based schema definition using the TypeBox library.
|
|
9
|
+
* It includes various types, schema creation, validation, and OpenAPI integration.
|
|
10
|
+
*
|
|
11
|
+
* @module TypeboxSchemaValidator
|
|
12
|
+
*/
|
|
13
|
+
|
|
8
14
|
/**
|
|
9
15
|
* Class representing a TypeBox schema definition.
|
|
10
16
|
* @implements {SchemaValidator}
|
|
@@ -17,24 +23,24 @@ declare class TypeboxSchemaValidator implements SchemaValidator<(<T extends TObj
|
|
|
17
23
|
_Type: "TypeBox";
|
|
18
24
|
_SchemaCatchall: TCatchall;
|
|
19
25
|
_ValidSchemaObject: TObject<TProperties> | TArray<TObject<TProperties>>;
|
|
20
|
-
string:
|
|
21
|
-
uuid:
|
|
22
|
-
email:
|
|
23
|
-
uri:
|
|
24
|
-
number:
|
|
25
|
-
bigint:
|
|
26
|
-
boolean:
|
|
27
|
-
date:
|
|
28
|
-
symbol:
|
|
29
|
-
nullish: TUnion<[
|
|
30
|
-
void:
|
|
31
|
-
null:
|
|
32
|
-
undefined:
|
|
33
|
-
any:
|
|
34
|
-
unknown:
|
|
35
|
-
never:
|
|
36
|
-
binary:
|
|
37
|
-
file: (name: string, type: MimeType) =>
|
|
26
|
+
string: TString;
|
|
27
|
+
uuid: TString;
|
|
28
|
+
email: TString;
|
|
29
|
+
uri: TString;
|
|
30
|
+
number: TTransform<TUnion<[TNumber, TString, TBoolean, TNull, TBigInt, TDate]>, number>;
|
|
31
|
+
bigint: TTransform<TUnion<[TBigInt, TNumber, TString, TBoolean, TDate]>, bigint>;
|
|
32
|
+
boolean: TTransform<TUnion<[TBoolean, TString]>, boolean>;
|
|
33
|
+
date: TTransform<TUnion<[TString, TNumber, TDate]>, Date>;
|
|
34
|
+
symbol: TSymbol;
|
|
35
|
+
nullish: TUnion<[TVoid, TNull, TUndefined]>;
|
|
36
|
+
void: TVoid;
|
|
37
|
+
null: TNull;
|
|
38
|
+
undefined: TUndefined;
|
|
39
|
+
any: TAny;
|
|
40
|
+
unknown: TUnknown;
|
|
41
|
+
never: TNever;
|
|
42
|
+
binary: TTransform<TString, Uint8Array>;
|
|
43
|
+
file: TTransform<TString, (name: string, type: MimeType) => File>;
|
|
38
44
|
/**
|
|
39
45
|
* Extracts the error type of a schema for error messages.
|
|
40
46
|
*
|
|
@@ -243,8 +249,8 @@ declare class ZodSchemaValidator implements SchemaValidator<(<T extends ZodObjec
|
|
|
243
249
|
any: z.ZodAny;
|
|
244
250
|
unknown: z.ZodUnknown;
|
|
245
251
|
never: z.ZodNever;
|
|
246
|
-
binary: z.ZodEffects<z.ZodString,
|
|
247
|
-
file: (name: string, type: MimeType) =>
|
|
252
|
+
binary: z.ZodEffects<z.ZodString, Uint8Array<ArrayBufferLike>, string>;
|
|
253
|
+
file: z.ZodEffects<z.ZodString, (name: string, type: MimeType) => File, string>;
|
|
248
254
|
/**
|
|
249
255
|
* Compiles schema if this exists, for optimal performance.
|
|
250
256
|
*
|
|
@@ -736,4 +742,4 @@ type Increment<T extends number> = T extends 0 ? 1 : T extends 1 ? 2 : T extends
|
|
|
736
742
|
*/
|
|
737
743
|
type KeyTypes = string | number;
|
|
738
744
|
|
|
739
|
-
export { type AnySchemaValidator as A, type
|
|
745
|
+
export { type AnySchemaValidator as A, type ZodResolve as B, type ZodRecordKey as C, type IdiomaticSchema as I, type KeyTypes as K, type LiteralSchema as L, type ParseError as P, type SchemaValidator as S, TypeboxSchemaValidator as T, type UnboxedObjectSchema as U, ZodSchemaValidator as Z, type ParseResult as a, type SchemaResolve as b, type SchemaTranslate as c, type Schema as d, type Increment as e, type TCatchall as f, type TOuterArray as g, type TObjectShape as h, type TObject as i, type TSchemaTranslate as j, type UnboxedTObjectSchema as k, type TIdiomaticSchema as l, type TUnionTupleContainer as m, type UnionTupleTResolve as n, type TResolve as o, type ZodCatchall as p, type ZodOuterArray as q, type ZodObjectShape as r, type ZodObject as s, type ZodSchemaTranslate as t, type UnboxedZodObjectSchema as u, type ZodIdiomaticSchema as v, type ZodTupleContainer as w, type TupleZodResolve as x, type ZodUnionContainer as y, type UnionZodResolve as z };
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { MimeType, Prettify } from '@forklaunch/common';
|
|
2
2
|
import { SchemaObject } from 'openapi3-ts/oas31';
|
|
3
|
-
import
|
|
4
|
-
import { TProperties, TOptional, TArray, TUnion, TLiteral, TFunction, TRecord, TPromise, TSchema, TUnknown, TKind, TObject as TObject$1, TNever, StaticDecode } from '@sinclair/typebox';
|
|
3
|
+
import { TProperties, TOptional, TArray, TUnion, TLiteral, TFunction, TRecord, TPromise, TSchema, TString, TTransform, TNumber, TBoolean, TNull, TBigInt, TDate, TSymbol, TVoid, TUndefined, TAny, TUnknown, TNever, TKind, TObject as TObject$1, StaticDecode } from '@sinclair/typebox';
|
|
5
4
|
import { TypeCheck } from '@sinclair/typebox/compiler';
|
|
6
5
|
import { ZodObject as ZodObject$1, ZodRawShape, ZodOptional, ZodArray, ZodUnion, ZodLiteral, ZodFunction, ZodTuple, ZodRecord, ZodPromise, ZodType, z, ZodUnknown, ZodPipeline, ZodTypeAny, ZodEffects, ZodNever } from 'zod';
|
|
7
6
|
|
|
7
|
+
/**
|
|
8
|
+
* This module provides a TypeScript-based schema definition using the TypeBox library.
|
|
9
|
+
* It includes various types, schema creation, validation, and OpenAPI integration.
|
|
10
|
+
*
|
|
11
|
+
* @module TypeboxSchemaValidator
|
|
12
|
+
*/
|
|
13
|
+
|
|
8
14
|
/**
|
|
9
15
|
* Class representing a TypeBox schema definition.
|
|
10
16
|
* @implements {SchemaValidator}
|
|
@@ -17,24 +23,24 @@ declare class TypeboxSchemaValidator implements SchemaValidator<(<T extends TObj
|
|
|
17
23
|
_Type: "TypeBox";
|
|
18
24
|
_SchemaCatchall: TCatchall;
|
|
19
25
|
_ValidSchemaObject: TObject<TProperties> | TArray<TObject<TProperties>>;
|
|
20
|
-
string:
|
|
21
|
-
uuid:
|
|
22
|
-
email:
|
|
23
|
-
uri:
|
|
24
|
-
number:
|
|
25
|
-
bigint:
|
|
26
|
-
boolean:
|
|
27
|
-
date:
|
|
28
|
-
symbol:
|
|
29
|
-
nullish: TUnion<[
|
|
30
|
-
void:
|
|
31
|
-
null:
|
|
32
|
-
undefined:
|
|
33
|
-
any:
|
|
34
|
-
unknown:
|
|
35
|
-
never:
|
|
36
|
-
binary:
|
|
37
|
-
file: (name: string, type: MimeType) =>
|
|
26
|
+
string: TString;
|
|
27
|
+
uuid: TString;
|
|
28
|
+
email: TString;
|
|
29
|
+
uri: TString;
|
|
30
|
+
number: TTransform<TUnion<[TNumber, TString, TBoolean, TNull, TBigInt, TDate]>, number>;
|
|
31
|
+
bigint: TTransform<TUnion<[TBigInt, TNumber, TString, TBoolean, TDate]>, bigint>;
|
|
32
|
+
boolean: TTransform<TUnion<[TBoolean, TString]>, boolean>;
|
|
33
|
+
date: TTransform<TUnion<[TString, TNumber, TDate]>, Date>;
|
|
34
|
+
symbol: TSymbol;
|
|
35
|
+
nullish: TUnion<[TVoid, TNull, TUndefined]>;
|
|
36
|
+
void: TVoid;
|
|
37
|
+
null: TNull;
|
|
38
|
+
undefined: TUndefined;
|
|
39
|
+
any: TAny;
|
|
40
|
+
unknown: TUnknown;
|
|
41
|
+
never: TNever;
|
|
42
|
+
binary: TTransform<TString, Uint8Array>;
|
|
43
|
+
file: TTransform<TString, (name: string, type: MimeType) => File>;
|
|
38
44
|
/**
|
|
39
45
|
* Extracts the error type of a schema for error messages.
|
|
40
46
|
*
|
|
@@ -243,8 +249,8 @@ declare class ZodSchemaValidator implements SchemaValidator<(<T extends ZodObjec
|
|
|
243
249
|
any: z.ZodAny;
|
|
244
250
|
unknown: z.ZodUnknown;
|
|
245
251
|
never: z.ZodNever;
|
|
246
|
-
binary: z.ZodEffects<z.ZodString,
|
|
247
|
-
file: (name: string, type: MimeType) =>
|
|
252
|
+
binary: z.ZodEffects<z.ZodString, Uint8Array<ArrayBufferLike>, string>;
|
|
253
|
+
file: z.ZodEffects<z.ZodString, (name: string, type: MimeType) => File, string>;
|
|
248
254
|
/**
|
|
249
255
|
* Compiles schema if this exists, for optimal performance.
|
|
250
256
|
*
|
|
@@ -736,4 +742,4 @@ type Increment<T extends number> = T extends 0 ? 1 : T extends 1 ? 2 : T extends
|
|
|
736
742
|
*/
|
|
737
743
|
type KeyTypes = string | number;
|
|
738
744
|
|
|
739
|
-
export { type AnySchemaValidator as A, type
|
|
745
|
+
export { type AnySchemaValidator as A, type ZodResolve as B, type ZodRecordKey as C, type IdiomaticSchema as I, type KeyTypes as K, type LiteralSchema as L, type ParseError as P, type SchemaValidator as S, TypeboxSchemaValidator as T, type UnboxedObjectSchema as U, ZodSchemaValidator as Z, type ParseResult as a, type SchemaResolve as b, type SchemaTranslate as c, type Schema as d, type Increment as e, type TCatchall as f, type TOuterArray as g, type TObjectShape as h, type TObject as i, type TSchemaTranslate as j, type UnboxedTObjectSchema as k, type TIdiomaticSchema as l, type TUnionTupleContainer as m, type UnionTupleTResolve as n, type TResolve as o, type ZodCatchall as p, type ZodOuterArray as q, type ZodObjectShape as r, type ZodObject as s, type ZodSchemaTranslate as t, type UnboxedZodObjectSchema as u, type ZodIdiomaticSchema as v, type ZodTupleContainer as w, type TupleZodResolve as x, type ZodUnionContainer as y, type UnionZodResolve as z };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { T as TypeboxSchemaValidator } from '../../schema.types-Df9EB_Ke.mjs';
|
|
2
|
+
export { f as TCatchall, l as TIdiomaticSchema, i as TObject, h as TObjectShape, g as TOuterArray, o as TResolve, j as TSchemaTranslate, m as TUnionTupleContainer, k as UnboxedTObjectSchema, n as UnionTupleTResolve } from '../../schema.types-Df9EB_Ke.mjs';
|
|
3
|
+
import '@forklaunch/common';
|
|
4
|
+
import 'openapi3-ts/oas31';
|
|
5
|
+
import '@sinclair/typebox';
|
|
6
|
+
import '@sinclair/typebox/compiler';
|
|
7
7
|
import 'zod';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -11,129 +11,130 @@ import 'zod';
|
|
|
11
11
|
* @returns {TypeboxSchemaValidator} The TypeboxSchemaValidator instance.
|
|
12
12
|
*/
|
|
13
13
|
declare const SchemaValidator: () => TypeboxSchemaValidator;
|
|
14
|
+
declare const StaticSchemaValidator: TypeboxSchemaValidator;
|
|
14
15
|
/**
|
|
15
16
|
* TypeBox schema definition for string type.
|
|
16
17
|
*/
|
|
17
|
-
declare const string:
|
|
18
|
+
declare const string: typeof StaticSchemaValidator.string;
|
|
18
19
|
/**
|
|
19
20
|
* TypeBox schema definition for UUID type.
|
|
20
21
|
*/
|
|
21
|
-
declare const uuid:
|
|
22
|
+
declare const uuid: typeof StaticSchemaValidator.uuid;
|
|
22
23
|
/**
|
|
23
24
|
* TypeBox schema definition for URI type.
|
|
24
25
|
*/
|
|
25
|
-
declare const uri:
|
|
26
|
+
declare const uri: typeof StaticSchemaValidator.uri;
|
|
26
27
|
/**
|
|
27
28
|
* TypeBox schema definition for email type.
|
|
28
29
|
*/
|
|
29
|
-
declare const email:
|
|
30
|
+
declare const email: typeof StaticSchemaValidator.email;
|
|
30
31
|
/**
|
|
31
32
|
* TypeBox schema definition for number type.
|
|
32
33
|
*/
|
|
33
|
-
declare const number:
|
|
34
|
+
declare const number: typeof StaticSchemaValidator.number;
|
|
34
35
|
/**
|
|
35
36
|
* TypeBox schema definition for bigint type.
|
|
36
37
|
*/
|
|
37
|
-
declare const bigint:
|
|
38
|
+
declare const bigint: typeof StaticSchemaValidator.bigint;
|
|
38
39
|
/**
|
|
39
40
|
* TypeBox schema definition for boolean type.
|
|
40
41
|
*/
|
|
41
|
-
declare const boolean:
|
|
42
|
+
declare const boolean: typeof StaticSchemaValidator.boolean;
|
|
42
43
|
/**
|
|
43
44
|
* TypeBox schema definition for date type.
|
|
44
45
|
*/
|
|
45
|
-
declare const date:
|
|
46
|
+
declare const date: typeof StaticSchemaValidator.date;
|
|
46
47
|
/**
|
|
47
48
|
* TypeBox schema definition for symbol type.
|
|
48
49
|
*/
|
|
49
|
-
declare const symbol:
|
|
50
|
+
declare const symbol: typeof StaticSchemaValidator.symbol;
|
|
50
51
|
/**
|
|
51
52
|
* TypeBox schema definition for undefined, null, void types.
|
|
52
53
|
*/
|
|
53
|
-
declare const nullish:
|
|
54
|
+
declare const nullish: typeof StaticSchemaValidator.nullish;
|
|
54
55
|
/**
|
|
55
56
|
* TypeBox schema definition for void type.
|
|
56
57
|
*/
|
|
57
|
-
declare const void_:
|
|
58
|
+
declare const void_: typeof StaticSchemaValidator.void;
|
|
58
59
|
/**
|
|
59
60
|
* TypeBox schema definition for null type.
|
|
60
61
|
*/
|
|
61
|
-
declare const null_:
|
|
62
|
+
declare const null_: typeof StaticSchemaValidator.null;
|
|
62
63
|
/**
|
|
63
64
|
* TypeBox schema definition for undefined type.
|
|
64
65
|
*/
|
|
65
|
-
declare const undefined_:
|
|
66
|
+
declare const undefined_: typeof StaticSchemaValidator.undefined;
|
|
66
67
|
/**
|
|
67
68
|
* TypeBox schema definition for any type.
|
|
68
69
|
*/
|
|
69
|
-
declare const any:
|
|
70
|
+
declare const any: typeof StaticSchemaValidator.any;
|
|
70
71
|
/**
|
|
71
72
|
* TypeBox schema definition for unknown type.
|
|
72
73
|
*/
|
|
73
|
-
declare const unknown:
|
|
74
|
+
declare const unknown: typeof StaticSchemaValidator.unknown;
|
|
74
75
|
/**
|
|
75
76
|
* TypeBox schema definition for never type.
|
|
76
77
|
*/
|
|
77
|
-
declare const never:
|
|
78
|
+
declare const never: typeof StaticSchemaValidator.never;
|
|
78
79
|
/**
|
|
79
80
|
* TypeBox schema definition for blob type.
|
|
80
81
|
*/
|
|
81
|
-
declare const binary:
|
|
82
|
+
declare const binary: typeof StaticSchemaValidator.binary;
|
|
82
83
|
/**
|
|
83
84
|
* TypeBox schema definition for file type.
|
|
84
85
|
*/
|
|
85
|
-
declare const file:
|
|
86
|
+
declare const file: typeof StaticSchemaValidator.file;
|
|
86
87
|
/**
|
|
87
88
|
* Transforms valid schema into TypeBox schema.
|
|
88
89
|
*/
|
|
89
|
-
declare const schemify:
|
|
90
|
+
declare const schemify: typeof StaticSchemaValidator.schemify;
|
|
90
91
|
/**
|
|
91
92
|
* Makes a valid schema optional.
|
|
92
93
|
*/
|
|
93
|
-
declare const optional:
|
|
94
|
+
declare const optional: typeof StaticSchemaValidator.optional;
|
|
94
95
|
/**
|
|
95
96
|
* Defines an array for a valid schema.
|
|
96
97
|
*/
|
|
97
|
-
declare const array:
|
|
98
|
+
declare const array: typeof StaticSchemaValidator.array;
|
|
98
99
|
/**
|
|
99
100
|
* Defines a union for a valid schema.
|
|
100
101
|
*/
|
|
101
|
-
declare const union:
|
|
102
|
+
declare const union: typeof StaticSchemaValidator.union;
|
|
102
103
|
/**
|
|
103
104
|
* Defines a literal for a valid schema.
|
|
104
105
|
*/
|
|
105
|
-
declare const literal:
|
|
106
|
+
declare const literal: typeof StaticSchemaValidator.literal;
|
|
106
107
|
/**
|
|
107
108
|
* Defines an enum for a valid schema.
|
|
108
109
|
*/
|
|
109
|
-
declare const enum_:
|
|
110
|
+
declare const enum_: typeof StaticSchemaValidator.enum_;
|
|
110
111
|
/**
|
|
111
112
|
* Defines a function for a valid schema.
|
|
112
113
|
*/
|
|
113
|
-
declare const function_:
|
|
114
|
+
declare const function_: typeof StaticSchemaValidator.function_;
|
|
114
115
|
/**
|
|
115
116
|
* Defines a record for a valid schema.
|
|
116
117
|
*/
|
|
117
|
-
declare const record:
|
|
118
|
+
declare const record: typeof StaticSchemaValidator.record;
|
|
118
119
|
/**
|
|
119
120
|
* Defines a promise for a valid schema.
|
|
120
121
|
*/
|
|
121
|
-
declare const promise:
|
|
122
|
+
declare const promise: typeof StaticSchemaValidator.promise;
|
|
122
123
|
/**
|
|
123
124
|
* Checks if a value is a TypeBox schema.
|
|
124
125
|
*/
|
|
125
|
-
declare const isSchema:
|
|
126
|
+
declare const isSchema: typeof StaticSchemaValidator.isSchema;
|
|
126
127
|
/**
|
|
127
128
|
* Validates a value against a valid schema.
|
|
128
129
|
*/
|
|
129
|
-
declare const validate:
|
|
130
|
+
declare const validate: typeof StaticSchemaValidator.validate;
|
|
130
131
|
/**
|
|
131
132
|
* Parses a value against a valid schema.
|
|
132
133
|
*/
|
|
133
|
-
declare const parse:
|
|
134
|
+
declare const parse: typeof StaticSchemaValidator.parse;
|
|
134
135
|
/**
|
|
135
136
|
* Generates an OpenAPI schema object from a valid schema.
|
|
136
137
|
*/
|
|
137
|
-
declare const openapi:
|
|
138
|
+
declare const openapi: typeof StaticSchemaValidator.openapi;
|
|
138
139
|
|
|
139
|
-
export { SchemaValidator,
|
|
140
|
+
export { SchemaValidator, TypeboxSchemaValidator, any, array, bigint, binary, boolean, date, email, enum_, file, function_, isSchema, literal, never, null_, nullish, number, openapi, optional, parse, promise, record, schemify, string, symbol, undefined_, union, unknown, uri, uuid, validate, void_ };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { T as TypeboxSchemaValidator } from '../../schema.types-Df9EB_Ke.js';
|
|
2
|
+
export { f as TCatchall, l as TIdiomaticSchema, i as TObject, h as TObjectShape, g as TOuterArray, o as TResolve, j as TSchemaTranslate, m as TUnionTupleContainer, k as UnboxedTObjectSchema, n as UnionTupleTResolve } from '../../schema.types-Df9EB_Ke.js';
|
|
3
|
+
import '@forklaunch/common';
|
|
4
|
+
import 'openapi3-ts/oas31';
|
|
5
|
+
import '@sinclair/typebox';
|
|
6
|
+
import '@sinclair/typebox/compiler';
|
|
7
7
|
import 'zod';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -11,129 +11,130 @@ import 'zod';
|
|
|
11
11
|
* @returns {TypeboxSchemaValidator} The TypeboxSchemaValidator instance.
|
|
12
12
|
*/
|
|
13
13
|
declare const SchemaValidator: () => TypeboxSchemaValidator;
|
|
14
|
+
declare const StaticSchemaValidator: TypeboxSchemaValidator;
|
|
14
15
|
/**
|
|
15
16
|
* TypeBox schema definition for string type.
|
|
16
17
|
*/
|
|
17
|
-
declare const string:
|
|
18
|
+
declare const string: typeof StaticSchemaValidator.string;
|
|
18
19
|
/**
|
|
19
20
|
* TypeBox schema definition for UUID type.
|
|
20
21
|
*/
|
|
21
|
-
declare const uuid:
|
|
22
|
+
declare const uuid: typeof StaticSchemaValidator.uuid;
|
|
22
23
|
/**
|
|
23
24
|
* TypeBox schema definition for URI type.
|
|
24
25
|
*/
|
|
25
|
-
declare const uri:
|
|
26
|
+
declare const uri: typeof StaticSchemaValidator.uri;
|
|
26
27
|
/**
|
|
27
28
|
* TypeBox schema definition for email type.
|
|
28
29
|
*/
|
|
29
|
-
declare const email:
|
|
30
|
+
declare const email: typeof StaticSchemaValidator.email;
|
|
30
31
|
/**
|
|
31
32
|
* TypeBox schema definition for number type.
|
|
32
33
|
*/
|
|
33
|
-
declare const number:
|
|
34
|
+
declare const number: typeof StaticSchemaValidator.number;
|
|
34
35
|
/**
|
|
35
36
|
* TypeBox schema definition for bigint type.
|
|
36
37
|
*/
|
|
37
|
-
declare const bigint:
|
|
38
|
+
declare const bigint: typeof StaticSchemaValidator.bigint;
|
|
38
39
|
/**
|
|
39
40
|
* TypeBox schema definition for boolean type.
|
|
40
41
|
*/
|
|
41
|
-
declare const boolean:
|
|
42
|
+
declare const boolean: typeof StaticSchemaValidator.boolean;
|
|
42
43
|
/**
|
|
43
44
|
* TypeBox schema definition for date type.
|
|
44
45
|
*/
|
|
45
|
-
declare const date:
|
|
46
|
+
declare const date: typeof StaticSchemaValidator.date;
|
|
46
47
|
/**
|
|
47
48
|
* TypeBox schema definition for symbol type.
|
|
48
49
|
*/
|
|
49
|
-
declare const symbol:
|
|
50
|
+
declare const symbol: typeof StaticSchemaValidator.symbol;
|
|
50
51
|
/**
|
|
51
52
|
* TypeBox schema definition for undefined, null, void types.
|
|
52
53
|
*/
|
|
53
|
-
declare const nullish:
|
|
54
|
+
declare const nullish: typeof StaticSchemaValidator.nullish;
|
|
54
55
|
/**
|
|
55
56
|
* TypeBox schema definition for void type.
|
|
56
57
|
*/
|
|
57
|
-
declare const void_:
|
|
58
|
+
declare const void_: typeof StaticSchemaValidator.void;
|
|
58
59
|
/**
|
|
59
60
|
* TypeBox schema definition for null type.
|
|
60
61
|
*/
|
|
61
|
-
declare const null_:
|
|
62
|
+
declare const null_: typeof StaticSchemaValidator.null;
|
|
62
63
|
/**
|
|
63
64
|
* TypeBox schema definition for undefined type.
|
|
64
65
|
*/
|
|
65
|
-
declare const undefined_:
|
|
66
|
+
declare const undefined_: typeof StaticSchemaValidator.undefined;
|
|
66
67
|
/**
|
|
67
68
|
* TypeBox schema definition for any type.
|
|
68
69
|
*/
|
|
69
|
-
declare const any:
|
|
70
|
+
declare const any: typeof StaticSchemaValidator.any;
|
|
70
71
|
/**
|
|
71
72
|
* TypeBox schema definition for unknown type.
|
|
72
73
|
*/
|
|
73
|
-
declare const unknown:
|
|
74
|
+
declare const unknown: typeof StaticSchemaValidator.unknown;
|
|
74
75
|
/**
|
|
75
76
|
* TypeBox schema definition for never type.
|
|
76
77
|
*/
|
|
77
|
-
declare const never:
|
|
78
|
+
declare const never: typeof StaticSchemaValidator.never;
|
|
78
79
|
/**
|
|
79
80
|
* TypeBox schema definition for blob type.
|
|
80
81
|
*/
|
|
81
|
-
declare const binary:
|
|
82
|
+
declare const binary: typeof StaticSchemaValidator.binary;
|
|
82
83
|
/**
|
|
83
84
|
* TypeBox schema definition for file type.
|
|
84
85
|
*/
|
|
85
|
-
declare const file:
|
|
86
|
+
declare const file: typeof StaticSchemaValidator.file;
|
|
86
87
|
/**
|
|
87
88
|
* Transforms valid schema into TypeBox schema.
|
|
88
89
|
*/
|
|
89
|
-
declare const schemify:
|
|
90
|
+
declare const schemify: typeof StaticSchemaValidator.schemify;
|
|
90
91
|
/**
|
|
91
92
|
* Makes a valid schema optional.
|
|
92
93
|
*/
|
|
93
|
-
declare const optional:
|
|
94
|
+
declare const optional: typeof StaticSchemaValidator.optional;
|
|
94
95
|
/**
|
|
95
96
|
* Defines an array for a valid schema.
|
|
96
97
|
*/
|
|
97
|
-
declare const array:
|
|
98
|
+
declare const array: typeof StaticSchemaValidator.array;
|
|
98
99
|
/**
|
|
99
100
|
* Defines a union for a valid schema.
|
|
100
101
|
*/
|
|
101
|
-
declare const union:
|
|
102
|
+
declare const union: typeof StaticSchemaValidator.union;
|
|
102
103
|
/**
|
|
103
104
|
* Defines a literal for a valid schema.
|
|
104
105
|
*/
|
|
105
|
-
declare const literal:
|
|
106
|
+
declare const literal: typeof StaticSchemaValidator.literal;
|
|
106
107
|
/**
|
|
107
108
|
* Defines an enum for a valid schema.
|
|
108
109
|
*/
|
|
109
|
-
declare const enum_:
|
|
110
|
+
declare const enum_: typeof StaticSchemaValidator.enum_;
|
|
110
111
|
/**
|
|
111
112
|
* Defines a function for a valid schema.
|
|
112
113
|
*/
|
|
113
|
-
declare const function_:
|
|
114
|
+
declare const function_: typeof StaticSchemaValidator.function_;
|
|
114
115
|
/**
|
|
115
116
|
* Defines a record for a valid schema.
|
|
116
117
|
*/
|
|
117
|
-
declare const record:
|
|
118
|
+
declare const record: typeof StaticSchemaValidator.record;
|
|
118
119
|
/**
|
|
119
120
|
* Defines a promise for a valid schema.
|
|
120
121
|
*/
|
|
121
|
-
declare const promise:
|
|
122
|
+
declare const promise: typeof StaticSchemaValidator.promise;
|
|
122
123
|
/**
|
|
123
124
|
* Checks if a value is a TypeBox schema.
|
|
124
125
|
*/
|
|
125
|
-
declare const isSchema:
|
|
126
|
+
declare const isSchema: typeof StaticSchemaValidator.isSchema;
|
|
126
127
|
/**
|
|
127
128
|
* Validates a value against a valid schema.
|
|
128
129
|
*/
|
|
129
|
-
declare const validate:
|
|
130
|
+
declare const validate: typeof StaticSchemaValidator.validate;
|
|
130
131
|
/**
|
|
131
132
|
* Parses a value against a valid schema.
|
|
132
133
|
*/
|
|
133
|
-
declare const parse:
|
|
134
|
+
declare const parse: typeof StaticSchemaValidator.parse;
|
|
134
135
|
/**
|
|
135
136
|
* Generates an OpenAPI schema object from a valid schema.
|
|
136
137
|
*/
|
|
137
|
-
declare const openapi:
|
|
138
|
+
declare const openapi: typeof StaticSchemaValidator.openapi;
|
|
138
139
|
|
|
139
|
-
export { SchemaValidator,
|
|
140
|
+
export { SchemaValidator, TypeboxSchemaValidator, any, array, bigint, binary, boolean, date, email, enum_, file, function_, isSchema, literal, never, null_, nullish, number, openapi, optional, parse, promise, record, schemify, string, symbol, undefined_, union, unknown, uri, uuid, validate, void_ };
|