arri-validate
Advanced tools
Comparing version 0.1.4 to 0.2.0
@@ -1,4 +0,4 @@ | ||
import { A as ASchemaOptions, a as ASchema, b as AArraySchema, c as AScalarSchema, M as MaybeNullable, d as AObjectSchema, e as ADiscriminatorSchema, I as InferType, R as ResolveObject, f as AStringEnumSchema, g as AObjectSchemaOptions, h as InferObjectOutput, i as ARecordSchema, S as SafeResult, j as coerce, p as parse, s as safeCoerce, k as safeParse, l as serialize, v as validate, m as SchemaValidator, n as SchemaMetadata, o as SCHEMA_METADATA } from './shared/arri-validate.563ebba4.js'; | ||
export { D as InferObjectRawType, u as NumberType, N as NumberTypeValues, w as NumberValidationMap, P as PartialBy, r as Resolve, V as ValidationData, G as ValidationError, F as ValueError, x as isAAraySchema, z as isADiscriminatorSchema, C as isAObjectSchema, B as isARecordSchema, t as isAScalarSchema, q as isASchema, y as isAStringEnumSchema, E as isObject, H as isValidationError } from './shared/arri-validate.563ebba4.js'; | ||
import '@modii/jtd'; | ||
import { A as ASchemaOptions, a as ASchema, b as AArraySchema, c as AScalarSchema, d as AObjectSchema, e as ADiscriminatorSchema, I as InferType, R as ResolveObject, f as AStringEnumSchema, g as AObjectSchemaOptions, h as InferObjectOutput, V as ValidationData, i as ARecordSchema, S as SafeResult, j as coerce, p as parse, s as safeCoerce, k as safeParse, l as serialize, v as validate, m as SchemaValidator, n as SchemaMetadata, o as SCHEMA_METADATA } from './shared/arri-validate.bbdf6571.js'; | ||
export { C as InferObjectRawType, M as MaybeNullable, u as NumberType, N as NumberTypeValues, P as PartialBy, r as Resolve, F as ValidationError, E as ValueError, w as isAAraySchema, y as isADiscriminatorSchema, B as isAObjectSchema, z as isARecordSchema, t as isAScalarSchema, q as isASchema, x as isAStringEnumSchema, D as isObject, G as isValidationError } from './shared/arri-validate.bbdf6571.js'; | ||
import 'jtd-utils'; | ||
@@ -18,3 +18,3 @@ /** | ||
*/ | ||
declare function boolean<TNullable extends boolean = false>(opts?: ASchemaOptions): AScalarSchema<"boolean", MaybeNullable<boolean, TNullable>>; | ||
declare function boolean(opts?: ASchemaOptions): AScalarSchema<"boolean", boolean>; | ||
@@ -73,3 +73,3 @@ /** | ||
*/ | ||
declare function stringEnum<TKeys extends string, TValues extends TKeys[], TNullable extends boolean = false>(values: TValues, opts?: ASchemaOptions): AStringEnumSchema<TValues, TNullable>; | ||
declare function stringEnum<TKeys extends string, TValues extends TKeys[]>(values: TValues, opts?: ASchemaOptions): AStringEnumSchema<TValues>; | ||
@@ -119,2 +119,4 @@ /** | ||
declare function uint32(opts?: ASchemaOptions): AScalarSchema<"uint32", number>; | ||
declare function int64(opts?: ASchemaOptions): AScalarSchema<"int64", bigint>; | ||
declare function uint64(opts?: ASchemaOptions): AScalarSchema<"uint64", bigint>; | ||
@@ -159,2 +161,3 @@ /** | ||
declare function omit<TSchema extends AObjectSchema<any, any> = any, TKeys extends keyof InferType<TSchema> = any, TAdditionalProps extends boolean = false>(inputSchema: TSchema, keys: TKeys[], opts?: AObjectSchemaOptions<TAdditionalProps>): AObjectSchema<Omit<InferType<TSchema>, TKeys>, TAdditionalProps>; | ||
declare function serializeObject(schema: AObjectSchema, input: any, data: ValidationData): string; | ||
declare function extend<TBaseSchema extends AObjectSchema<any, any> = any, TSchema extends AObjectSchema<any, any> = any, TAdditionalProps extends boolean = false>(baseSchema: TBaseSchema, inputSchema: TSchema, opts?: AObjectSchemaOptions<TAdditionalProps>): AObjectSchema<ResolveObject<InferType<TBaseSchema> & InferType<TSchema>>, TAdditionalProps>; | ||
@@ -238,2 +241,3 @@ declare function partial<TSchema extends AObjectSchema<any, any> = any, TAdditionalProps extends boolean = false>(schema: TSchema, options?: AObjectSchemaOptions<TAdditionalProps>): AObjectSchema<Partial<InferType<TSchema>>, TAdditionalProps>; | ||
declare const _index_int32: typeof int32; | ||
declare const _index_int64: typeof int64; | ||
declare const _index_int8: typeof int8; | ||
@@ -252,2 +256,3 @@ declare const _index_nullable: typeof nullable; | ||
declare const _index_serialize: typeof serialize; | ||
declare const _index_serializeObject: typeof serializeObject; | ||
declare const _index_string: typeof string; | ||
@@ -258,6 +263,7 @@ declare const _index_stringEnum: typeof stringEnum; | ||
declare const _index_uint32: typeof uint32; | ||
declare const _index_uint64: typeof uint64; | ||
declare const _index_uint8: typeof uint8; | ||
declare const _index_validate: typeof validate; | ||
declare namespace _index { | ||
export { _index_any as any, _index_array as array, _index_boolean as boolean, _index_coerce as coerce, _index_compile as compile, _index_discriminator as discriminator, _index_extend as extend, _index_float32 as float32, _index_float64 as float64, InferType as infer, _index_int16 as int16, _index_int32 as int32, _index_int8 as int8, _index_nullable as nullable, _index_number as number, _index_object as object, _index_omit as omit, _index_optional as optional, _index_parse as parse, _index_partial as partial, _index_pick as pick, _index_record as record, _index_safeCoerce as safeCoerce, _index_safeParse as safeParse, _index_serialize as serialize, _index_string as string, _index_stringEnum as stringEnum, _index_timestamp as timestamp, _index_uint16 as uint16, _index_uint32 as uint32, _index_uint8 as uint8, _index_validate as validate }; | ||
export { _index_any as any, _index_array as array, _index_boolean as boolean, _index_coerce as coerce, _index_compile as compile, _index_discriminator as discriminator, _index_extend as extend, _index_float32 as float32, _index_float64 as float64, InferType as infer, _index_int16 as int16, _index_int32 as int32, _index_int64 as int64, _index_int8 as int8, _index_nullable as nullable, _index_number as number, _index_object as object, _index_omit as omit, _index_optional as optional, _index_parse as parse, _index_partial as partial, _index_pick as pick, _index_record as record, _index_safeCoerce as safeCoerce, _index_safeParse as safeParse, _index_serialize as serialize, _index_serializeObject as serializeObject, _index_string as string, _index_stringEnum as stringEnum, _index_timestamp as timestamp, _index_uint16 as uint16, _index_uint32 as uint32, _index_uint64 as uint64, _index_uint8 as uint8, _index_validate as validate }; | ||
} | ||
@@ -277,2 +283,2 @@ | ||
export { type AAdaptedSchema, type AAdaptedSchemaMetadata, type AAdaptedSchemaValidator, AArraySchema, ADiscriminatorSchema, AObjectSchema, AObjectSchemaOptions, ARecordSchema, AScalarSchema, ASchema, ASchemaOptions, AStringEnumSchema, InferObjectOutput, InferType, MaybeNullable, ResolveObject, SCHEMA_METADATA, SafeResult, SchemaMetadata, SchemaValidator, type ValidationAdapter, _index as a, any, array, boolean, coerce, compile, discriminator, extend, float32, float64, InferType as infer, int16, int32, int8, isAAdaptedSchema, nullable, number, object, omit, optional, parse, partial, pick, record, safeCoerce, safeParse, serialize, string, stringEnum, timestamp, uint16, uint32, uint8, validate }; | ||
export { type AAdaptedSchema, type AAdaptedSchemaMetadata, type AAdaptedSchemaValidator, AArraySchema, ADiscriminatorSchema, AObjectSchema, AObjectSchemaOptions, ARecordSchema, AScalarSchema, ASchema, ASchemaOptions, AStringEnumSchema, InferObjectOutput, InferType, ResolveObject, SCHEMA_METADATA, SafeResult, SchemaMetadata, SchemaValidator, type ValidationAdapter, ValidationData, _index as a, any, array, boolean, coerce, compile, discriminator, extend, float32, float64, InferType as infer, int16, int32, int64, int8, isAAdaptedSchema, nullable, number, object, omit, optional, parse, partial, pick, record, safeCoerce, safeParse, serialize, serializeObject, string, stringEnum, timestamp, uint16, uint32, uint64, uint8, validate }; |
@@ -1,3 +0,3 @@ | ||
import { a as ASchema } from './shared/arri-validate.563ebba4.js'; | ||
import '@modii/jtd'; | ||
import { a as ASchema } from './shared/arri-validate.bbdf6571.js'; | ||
import 'jtd-utils'; | ||
@@ -4,0 +4,0 @@ declare const testSuites: Record<string, { |
{ | ||
"name": "arri-validate", | ||
"version": "0.1.4", | ||
"version": "0.2.0", | ||
"type": "module", | ||
@@ -12,5 +12,6 @@ "main": "./dist/index.cjs", | ||
"dependencies": { | ||
"@modii/jtd": "^0.2.1", | ||
"ajv": "^8.12.0", | ||
"scule": "^1.0.0" | ||
"scule": "^1.0.0", | ||
"uncrypto": "^0.1.3", | ||
"jtd-utils": "0.2.0" | ||
}, | ||
@@ -17,0 +18,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
306449
8781
4
+ Addedjtd-utils@0.2.0
+ Addeduncrypto@^0.1.3
+ Addedjtd-utils@0.2.0(transitive)
+ Addeduncrypto@0.1.3(transitive)
- Removed@modii/jtd@^0.2.1
- Removed@modii/jtd@0.2.1(transitive)