@forklaunch/validator 0.6.3 → 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.
@@ -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-MvSNOCj2.mjs';
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-MvSNOCj2.js';
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-MvSNOCj2.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-MvSNOCj2.mjs';
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-MvSNOCj2.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-MvSNOCj2.js';
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 * as _sinclair_typebox from '@sinclair/typebox';
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: _sinclair_typebox.TString;
21
- uuid: _sinclair_typebox.TString;
22
- email: _sinclair_typebox.TString;
23
- uri: _sinclair_typebox.TString;
24
- number: _sinclair_typebox.TTransform<TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString, _sinclair_typebox.TBoolean, _sinclair_typebox.TNull, _sinclair_typebox.TBigInt, _sinclair_typebox.TDate]>, number>;
25
- bigint: _sinclair_typebox.TTransform<TUnion<[_sinclair_typebox.TBigInt, _sinclair_typebox.TNumber, _sinclair_typebox.TString, _sinclair_typebox.TBoolean, _sinclair_typebox.TDate]>, bigint>;
26
- boolean: _sinclair_typebox.TTransform<TUnion<[_sinclair_typebox.TBoolean, _sinclair_typebox.TString]>, boolean>;
27
- date: _sinclair_typebox.TTransform<TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TDate]>, Date>;
28
- symbol: _sinclair_typebox.TSymbol;
29
- nullish: TUnion<[_sinclair_typebox.TVoid, _sinclair_typebox.TNull, _sinclair_typebox.TUndefined]>;
30
- void: _sinclair_typebox.TVoid;
31
- null: _sinclair_typebox.TNull;
32
- undefined: _sinclair_typebox.TUndefined;
33
- any: _sinclair_typebox.TAny;
34
- unknown: _sinclair_typebox.TUnknown;
35
- never: _sinclair_typebox.TNever;
36
- binary: _sinclair_typebox.TTransform<_sinclair_typebox.TString, Buffer<ArrayBuffer>>;
37
- file: (name: string, type: MimeType) => _sinclair_typebox.TTransform<_sinclair_typebox.TString, File>;
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, Buffer<ArrayBuffer>, string>;
247
- file: (name: string, type: MimeType) => z.ZodEffects<z.ZodString, File, string>;
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 ZodObject as B, type UnboxedZodObjectSchema 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 TIdiomaticSchema as f, type TResolve as g, type TUnionTupleContainer as h, type UnionTupleTResolve as i, type TCatchall as j, type TSchemaTranslate as k, type TOuterArray as l, type TObjectShape as m, type TObject as n, type UnboxedTObjectSchema as o, type ZodIdiomaticSchema as p, type ZodResolve as q, type ZodUnionContainer as r, type UnionZodResolve as s, type ZodTupleContainer as t, type TupleZodResolve as u, type ZodRecordKey as v, type ZodCatchall as w, type ZodSchemaTranslate as x, type ZodOuterArray as y, type ZodObjectShape as z };
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 * as _sinclair_typebox from '@sinclair/typebox';
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: _sinclair_typebox.TString;
21
- uuid: _sinclair_typebox.TString;
22
- email: _sinclair_typebox.TString;
23
- uri: _sinclair_typebox.TString;
24
- number: _sinclair_typebox.TTransform<TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString, _sinclair_typebox.TBoolean, _sinclair_typebox.TNull, _sinclair_typebox.TBigInt, _sinclair_typebox.TDate]>, number>;
25
- bigint: _sinclair_typebox.TTransform<TUnion<[_sinclair_typebox.TBigInt, _sinclair_typebox.TNumber, _sinclair_typebox.TString, _sinclair_typebox.TBoolean, _sinclair_typebox.TDate]>, bigint>;
26
- boolean: _sinclair_typebox.TTransform<TUnion<[_sinclair_typebox.TBoolean, _sinclair_typebox.TString]>, boolean>;
27
- date: _sinclair_typebox.TTransform<TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TDate]>, Date>;
28
- symbol: _sinclair_typebox.TSymbol;
29
- nullish: TUnion<[_sinclair_typebox.TVoid, _sinclair_typebox.TNull, _sinclair_typebox.TUndefined]>;
30
- void: _sinclair_typebox.TVoid;
31
- null: _sinclair_typebox.TNull;
32
- undefined: _sinclair_typebox.TUndefined;
33
- any: _sinclair_typebox.TAny;
34
- unknown: _sinclair_typebox.TUnknown;
35
- never: _sinclair_typebox.TNever;
36
- binary: _sinclair_typebox.TTransform<_sinclair_typebox.TString, Buffer<ArrayBuffer>>;
37
- file: (name: string, type: MimeType) => _sinclair_typebox.TTransform<_sinclair_typebox.TString, File>;
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, Buffer<ArrayBuffer>, string>;
247
- file: (name: string, type: MimeType) => z.ZodEffects<z.ZodString, File, string>;
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 ZodObject as B, type UnboxedZodObjectSchema 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 TIdiomaticSchema as f, type TResolve as g, type TUnionTupleContainer as h, type UnionTupleTResolve as i, type TCatchall as j, type TSchemaTranslate as k, type TOuterArray as l, type TObjectShape as m, type TObject as n, type UnboxedTObjectSchema as o, type ZodIdiomaticSchema as p, type ZodResolve as q, type ZodUnionContainer as r, type UnionZodResolve as s, type ZodTupleContainer as t, type TupleZodResolve as u, type ZodRecordKey as v, type ZodCatchall as w, type ZodSchemaTranslate as x, type ZodOuterArray as y, type ZodObjectShape as z };
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 * as openapi3_ts_oas31 from 'openapi3-ts/oas31';
2
- import * as _sinclair_typebox_compiler from '@sinclair/typebox/compiler';
3
- import { T as TypeboxSchemaValidator, f as TIdiomaticSchema, g as TResolve, h as TUnionTupleContainer, i as UnionTupleTResolve, L as LiteralSchema, j as TCatchall, a as ParseResult, k as TSchemaTranslate } from '../../schema.types-MvSNOCj2.mjs';
4
- export { n as TObject, m as TObjectShape, l as TOuterArray, o as UnboxedTObjectSchema } from '../../schema.types-MvSNOCj2.mjs';
5
- import * as _forklaunch_common from '@forklaunch/common';
6
- import * as _sinclair_typebox from '@sinclair/typebox';
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: _sinclair_typebox.TString;
18
+ declare const string: typeof StaticSchemaValidator.string;
18
19
  /**
19
20
  * TypeBox schema definition for UUID type.
20
21
  */
21
- declare const uuid: _sinclair_typebox.TString;
22
+ declare const uuid: typeof StaticSchemaValidator.uuid;
22
23
  /**
23
24
  * TypeBox schema definition for URI type.
24
25
  */
25
- declare const uri: _sinclair_typebox.TString;
26
+ declare const uri: typeof StaticSchemaValidator.uri;
26
27
  /**
27
28
  * TypeBox schema definition for email type.
28
29
  */
29
- declare const email: _sinclair_typebox.TString;
30
+ declare const email: typeof StaticSchemaValidator.email;
30
31
  /**
31
32
  * TypeBox schema definition for number type.
32
33
  */
33
- declare const number: _sinclair_typebox.TTransform<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString, _sinclair_typebox.TBoolean, _sinclair_typebox.TNull, _sinclair_typebox.TBigInt, _sinclair_typebox.TDate]>, number>;
34
+ declare const number: typeof StaticSchemaValidator.number;
34
35
  /**
35
36
  * TypeBox schema definition for bigint type.
36
37
  */
37
- declare const bigint: _sinclair_typebox.TTransform<_sinclair_typebox.TUnion<[_sinclair_typebox.TBigInt, _sinclair_typebox.TNumber, _sinclair_typebox.TString, _sinclair_typebox.TBoolean, _sinclair_typebox.TDate]>, bigint>;
38
+ declare const bigint: typeof StaticSchemaValidator.bigint;
38
39
  /**
39
40
  * TypeBox schema definition for boolean type.
40
41
  */
41
- declare const boolean: _sinclair_typebox.TTransform<_sinclair_typebox.TUnion<[_sinclair_typebox.TBoolean, _sinclair_typebox.TString]>, boolean>;
42
+ declare const boolean: typeof StaticSchemaValidator.boolean;
42
43
  /**
43
44
  * TypeBox schema definition for date type.
44
45
  */
45
- declare const date: _sinclair_typebox.TTransform<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TDate]>, Date>;
46
+ declare const date: typeof StaticSchemaValidator.date;
46
47
  /**
47
48
  * TypeBox schema definition for symbol type.
48
49
  */
49
- declare const symbol: _sinclair_typebox.TSymbol;
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: _sinclair_typebox.TUnion<[_sinclair_typebox.TVoid, _sinclair_typebox.TNull, _sinclair_typebox.TUndefined]>;
54
+ declare const nullish: typeof StaticSchemaValidator.nullish;
54
55
  /**
55
56
  * TypeBox schema definition for void type.
56
57
  */
57
- declare const void_: _sinclair_typebox.TVoid;
58
+ declare const void_: typeof StaticSchemaValidator.void;
58
59
  /**
59
60
  * TypeBox schema definition for null type.
60
61
  */
61
- declare const null_: _sinclair_typebox.TNull;
62
+ declare const null_: typeof StaticSchemaValidator.null;
62
63
  /**
63
64
  * TypeBox schema definition for undefined type.
64
65
  */
65
- declare const undefined_: _sinclair_typebox.TUndefined;
66
+ declare const undefined_: typeof StaticSchemaValidator.undefined;
66
67
  /**
67
68
  * TypeBox schema definition for any type.
68
69
  */
69
- declare const any: _sinclair_typebox.TAny;
70
+ declare const any: typeof StaticSchemaValidator.any;
70
71
  /**
71
72
  * TypeBox schema definition for unknown type.
72
73
  */
73
- declare const unknown: _sinclair_typebox.TUnknown;
74
+ declare const unknown: typeof StaticSchemaValidator.unknown;
74
75
  /**
75
76
  * TypeBox schema definition for never type.
76
77
  */
77
- declare const never: _sinclair_typebox.TNever;
78
+ declare const never: typeof StaticSchemaValidator.never;
78
79
  /**
79
80
  * TypeBox schema definition for blob type.
80
81
  */
81
- declare const binary: _sinclair_typebox.TTransform<_sinclair_typebox.TString, Buffer<ArrayBuffer>>;
82
+ declare const binary: typeof StaticSchemaValidator.binary;
82
83
  /**
83
84
  * TypeBox schema definition for file type.
84
85
  */
85
- declare const file: (name: string, type: _forklaunch_common.MimeType) => _sinclair_typebox.TTransform<_sinclair_typebox.TString, File>;
86
+ declare const file: typeof StaticSchemaValidator.file;
86
87
  /**
87
88
  * Transforms valid schema into TypeBox schema.
88
89
  */
89
- declare const schemify: <T extends TIdiomaticSchema>(schema: T) => TResolve<T>;
90
+ declare const schemify: typeof StaticSchemaValidator.schemify;
90
91
  /**
91
92
  * Makes a valid schema optional.
92
93
  */
93
- declare const optional: <T extends TIdiomaticSchema>(schema: T) => _sinclair_typebox.TOptional<TResolve<T>>;
94
+ declare const optional: typeof StaticSchemaValidator.optional;
94
95
  /**
95
96
  * Defines an array for a valid schema.
96
97
  */
97
- declare const array: <T extends TIdiomaticSchema>(schema: T) => _sinclair_typebox.TArray<TResolve<T>>;
98
+ declare const array: typeof StaticSchemaValidator.array;
98
99
  /**
99
100
  * Defines a union for a valid schema.
100
101
  */
101
- declare const union: <T extends TUnionTupleContainer>(schemas: [...T]) => _sinclair_typebox.TUnion<UnionTupleTResolve<T>>;
102
+ declare const union: typeof StaticSchemaValidator.union;
102
103
  /**
103
104
  * Defines a literal for a valid schema.
104
105
  */
105
- declare const literal: <T extends LiteralSchema>(value: T) => _sinclair_typebox.TLiteral<T>;
106
+ declare const literal: typeof StaticSchemaValidator.literal;
106
107
  /**
107
108
  * Defines an enum for a valid schema.
108
109
  */
109
- declare const enum_: <T extends Record<string, LiteralSchema>>(schemaEnum: T) => _sinclair_typebox.TUnion<[{ [K in keyof T]: _sinclair_typebox.TLiteral<T[K]>; }[keyof T]]>;
110
+ declare const enum_: typeof StaticSchemaValidator.enum_;
110
111
  /**
111
112
  * Defines a function for a valid schema.
112
113
  */
113
- declare const function_: <Args extends TUnionTupleContainer, ReturnType extends TIdiomaticSchema>(args: [...Args], returnType: ReturnType) => _sinclair_typebox.TFunction<UnionTupleTResolve<Args>, TResolve<ReturnType>>;
114
+ declare const function_: typeof StaticSchemaValidator.function_;
114
115
  /**
115
116
  * Defines a record for a valid schema.
116
117
  */
117
- declare const record: <Key extends TIdiomaticSchema, Value extends TIdiomaticSchema>(key: Key, value: Value) => _sinclair_typebox.TRecord<TResolve<Key>, TResolve<Value>>;
118
+ declare const record: typeof StaticSchemaValidator.record;
118
119
  /**
119
120
  * Defines a promise for a valid schema.
120
121
  */
121
- declare const promise: <T extends TIdiomaticSchema>(schema: T) => _sinclair_typebox.TPromise<TResolve<T>>;
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: (value: unknown) => value is _sinclair_typebox.TSchema;
126
+ declare const isSchema: typeof StaticSchemaValidator.isSchema;
126
127
  /**
127
128
  * Validates a value against a valid schema.
128
129
  */
129
- declare const validate: <T extends TIdiomaticSchema | TCatchall>(schema: T | _sinclair_typebox_compiler.TypeCheck<TResolve<T>>, value: unknown) => boolean;
130
+ declare const validate: typeof StaticSchemaValidator.validate;
130
131
  /**
131
132
  * Parses a value against a valid schema.
132
133
  */
133
- declare const parse: <T extends TIdiomaticSchema | TCatchall>(schema: T | _sinclair_typebox_compiler.TypeCheck<TResolve<T>>, value: unknown) => ParseResult<TSchemaTranslate<TResolve<T>>>;
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: <T extends TIdiomaticSchema | TCatchall>(schema: T) => openapi3_ts_oas31.SchemaObject;
138
+ declare const openapi: typeof StaticSchemaValidator.openapi;
138
139
 
139
- export { SchemaValidator, TCatchall, TIdiomaticSchema, TResolve, TSchemaTranslate, TUnionTupleContainer, TypeboxSchemaValidator, UnionTupleTResolve, 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_ };
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 * as openapi3_ts_oas31 from 'openapi3-ts/oas31';
2
- import * as _sinclair_typebox_compiler from '@sinclair/typebox/compiler';
3
- import { T as TypeboxSchemaValidator, f as TIdiomaticSchema, g as TResolve, h as TUnionTupleContainer, i as UnionTupleTResolve, L as LiteralSchema, j as TCatchall, a as ParseResult, k as TSchemaTranslate } from '../../schema.types-MvSNOCj2.js';
4
- export { n as TObject, m as TObjectShape, l as TOuterArray, o as UnboxedTObjectSchema } from '../../schema.types-MvSNOCj2.js';
5
- import * as _forklaunch_common from '@forklaunch/common';
6
- import * as _sinclair_typebox from '@sinclair/typebox';
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: _sinclair_typebox.TString;
18
+ declare const string: typeof StaticSchemaValidator.string;
18
19
  /**
19
20
  * TypeBox schema definition for UUID type.
20
21
  */
21
- declare const uuid: _sinclair_typebox.TString;
22
+ declare const uuid: typeof StaticSchemaValidator.uuid;
22
23
  /**
23
24
  * TypeBox schema definition for URI type.
24
25
  */
25
- declare const uri: _sinclair_typebox.TString;
26
+ declare const uri: typeof StaticSchemaValidator.uri;
26
27
  /**
27
28
  * TypeBox schema definition for email type.
28
29
  */
29
- declare const email: _sinclair_typebox.TString;
30
+ declare const email: typeof StaticSchemaValidator.email;
30
31
  /**
31
32
  * TypeBox schema definition for number type.
32
33
  */
33
- declare const number: _sinclair_typebox.TTransform<_sinclair_typebox.TUnion<[_sinclair_typebox.TNumber, _sinclair_typebox.TString, _sinclair_typebox.TBoolean, _sinclair_typebox.TNull, _sinclair_typebox.TBigInt, _sinclair_typebox.TDate]>, number>;
34
+ declare const number: typeof StaticSchemaValidator.number;
34
35
  /**
35
36
  * TypeBox schema definition for bigint type.
36
37
  */
37
- declare const bigint: _sinclair_typebox.TTransform<_sinclair_typebox.TUnion<[_sinclair_typebox.TBigInt, _sinclair_typebox.TNumber, _sinclair_typebox.TString, _sinclair_typebox.TBoolean, _sinclair_typebox.TDate]>, bigint>;
38
+ declare const bigint: typeof StaticSchemaValidator.bigint;
38
39
  /**
39
40
  * TypeBox schema definition for boolean type.
40
41
  */
41
- declare const boolean: _sinclair_typebox.TTransform<_sinclair_typebox.TUnion<[_sinclair_typebox.TBoolean, _sinclair_typebox.TString]>, boolean>;
42
+ declare const boolean: typeof StaticSchemaValidator.boolean;
42
43
  /**
43
44
  * TypeBox schema definition for date type.
44
45
  */
45
- declare const date: _sinclair_typebox.TTransform<_sinclair_typebox.TUnion<[_sinclair_typebox.TString, _sinclair_typebox.TNumber, _sinclair_typebox.TDate]>, Date>;
46
+ declare const date: typeof StaticSchemaValidator.date;
46
47
  /**
47
48
  * TypeBox schema definition for symbol type.
48
49
  */
49
- declare const symbol: _sinclair_typebox.TSymbol;
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: _sinclair_typebox.TUnion<[_sinclair_typebox.TVoid, _sinclair_typebox.TNull, _sinclair_typebox.TUndefined]>;
54
+ declare const nullish: typeof StaticSchemaValidator.nullish;
54
55
  /**
55
56
  * TypeBox schema definition for void type.
56
57
  */
57
- declare const void_: _sinclair_typebox.TVoid;
58
+ declare const void_: typeof StaticSchemaValidator.void;
58
59
  /**
59
60
  * TypeBox schema definition for null type.
60
61
  */
61
- declare const null_: _sinclair_typebox.TNull;
62
+ declare const null_: typeof StaticSchemaValidator.null;
62
63
  /**
63
64
  * TypeBox schema definition for undefined type.
64
65
  */
65
- declare const undefined_: _sinclair_typebox.TUndefined;
66
+ declare const undefined_: typeof StaticSchemaValidator.undefined;
66
67
  /**
67
68
  * TypeBox schema definition for any type.
68
69
  */
69
- declare const any: _sinclair_typebox.TAny;
70
+ declare const any: typeof StaticSchemaValidator.any;
70
71
  /**
71
72
  * TypeBox schema definition for unknown type.
72
73
  */
73
- declare const unknown: _sinclair_typebox.TUnknown;
74
+ declare const unknown: typeof StaticSchemaValidator.unknown;
74
75
  /**
75
76
  * TypeBox schema definition for never type.
76
77
  */
77
- declare const never: _sinclair_typebox.TNever;
78
+ declare const never: typeof StaticSchemaValidator.never;
78
79
  /**
79
80
  * TypeBox schema definition for blob type.
80
81
  */
81
- declare const binary: _sinclair_typebox.TTransform<_sinclair_typebox.TString, Buffer<ArrayBuffer>>;
82
+ declare const binary: typeof StaticSchemaValidator.binary;
82
83
  /**
83
84
  * TypeBox schema definition for file type.
84
85
  */
85
- declare const file: (name: string, type: _forklaunch_common.MimeType) => _sinclair_typebox.TTransform<_sinclair_typebox.TString, File>;
86
+ declare const file: typeof StaticSchemaValidator.file;
86
87
  /**
87
88
  * Transforms valid schema into TypeBox schema.
88
89
  */
89
- declare const schemify: <T extends TIdiomaticSchema>(schema: T) => TResolve<T>;
90
+ declare const schemify: typeof StaticSchemaValidator.schemify;
90
91
  /**
91
92
  * Makes a valid schema optional.
92
93
  */
93
- declare const optional: <T extends TIdiomaticSchema>(schema: T) => _sinclair_typebox.TOptional<TResolve<T>>;
94
+ declare const optional: typeof StaticSchemaValidator.optional;
94
95
  /**
95
96
  * Defines an array for a valid schema.
96
97
  */
97
- declare const array: <T extends TIdiomaticSchema>(schema: T) => _sinclair_typebox.TArray<TResolve<T>>;
98
+ declare const array: typeof StaticSchemaValidator.array;
98
99
  /**
99
100
  * Defines a union for a valid schema.
100
101
  */
101
- declare const union: <T extends TUnionTupleContainer>(schemas: [...T]) => _sinclair_typebox.TUnion<UnionTupleTResolve<T>>;
102
+ declare const union: typeof StaticSchemaValidator.union;
102
103
  /**
103
104
  * Defines a literal for a valid schema.
104
105
  */
105
- declare const literal: <T extends LiteralSchema>(value: T) => _sinclair_typebox.TLiteral<T>;
106
+ declare const literal: typeof StaticSchemaValidator.literal;
106
107
  /**
107
108
  * Defines an enum for a valid schema.
108
109
  */
109
- declare const enum_: <T extends Record<string, LiteralSchema>>(schemaEnum: T) => _sinclair_typebox.TUnion<[{ [K in keyof T]: _sinclair_typebox.TLiteral<T[K]>; }[keyof T]]>;
110
+ declare const enum_: typeof StaticSchemaValidator.enum_;
110
111
  /**
111
112
  * Defines a function for a valid schema.
112
113
  */
113
- declare const function_: <Args extends TUnionTupleContainer, ReturnType extends TIdiomaticSchema>(args: [...Args], returnType: ReturnType) => _sinclair_typebox.TFunction<UnionTupleTResolve<Args>, TResolve<ReturnType>>;
114
+ declare const function_: typeof StaticSchemaValidator.function_;
114
115
  /**
115
116
  * Defines a record for a valid schema.
116
117
  */
117
- declare const record: <Key extends TIdiomaticSchema, Value extends TIdiomaticSchema>(key: Key, value: Value) => _sinclair_typebox.TRecord<TResolve<Key>, TResolve<Value>>;
118
+ declare const record: typeof StaticSchemaValidator.record;
118
119
  /**
119
120
  * Defines a promise for a valid schema.
120
121
  */
121
- declare const promise: <T extends TIdiomaticSchema>(schema: T) => _sinclair_typebox.TPromise<TResolve<T>>;
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: (value: unknown) => value is _sinclair_typebox.TSchema;
126
+ declare const isSchema: typeof StaticSchemaValidator.isSchema;
126
127
  /**
127
128
  * Validates a value against a valid schema.
128
129
  */
129
- declare const validate: <T extends TIdiomaticSchema | TCatchall>(schema: T | _sinclair_typebox_compiler.TypeCheck<TResolve<T>>, value: unknown) => boolean;
130
+ declare const validate: typeof StaticSchemaValidator.validate;
130
131
  /**
131
132
  * Parses a value against a valid schema.
132
133
  */
133
- declare const parse: <T extends TIdiomaticSchema | TCatchall>(schema: T | _sinclair_typebox_compiler.TypeCheck<TResolve<T>>, value: unknown) => ParseResult<TSchemaTranslate<TResolve<T>>>;
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: <T extends TIdiomaticSchema | TCatchall>(schema: T) => openapi3_ts_oas31.SchemaObject;
138
+ declare const openapi: typeof StaticSchemaValidator.openapi;
138
139
 
139
- export { SchemaValidator, TCatchall, TIdiomaticSchema, TResolve, TSchemaTranslate, TUnionTupleContainer, TypeboxSchemaValidator, UnionTupleTResolve, 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_ };
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_ };