schema-to-yup
Advanced tools
Comparing version 1.12.5 to 1.12.6
@@ -1,54 +0,55 @@ | ||
export class TypeHandlerConfig { | ||
enabled: string[]; | ||
extends: string[]; | ||
convert: object; | ||
export interface TypeHandlerConfig { | ||
enabled?: string[]; | ||
extends?: string[]; | ||
convert?: object; | ||
} | ||
export class YupBuilderConfig extends TypeHandlerConfig { | ||
boolean: TypeHandlerConfig; | ||
string: TypeHandlerConfig; | ||
number: TypeHandlerConfig; | ||
object: TypeHandlerConfig; | ||
array: TypeHandlerConfig; | ||
date: TypeHandlerConfig; | ||
mixed: TypeHandlerConfig; | ||
createCustomConstraintBuilder: (typeHandler: any, config: any) => any; | ||
createErrorMessageHandler: (typeHandler: any, config: any) => any; | ||
validationErrorMessage: (msgName: any, typeHandler: any) => void; | ||
createWhenCondition: (opts: any) => void; | ||
isBoolean: (obj: any) => boolean; | ||
isDate: (obj: any) => boolean; | ||
isString: (obj: any) => boolean; | ||
isNumber: (obj: any) => boolean; | ||
isObject: (obj: any) => boolean; | ||
format: boolean; | ||
schemaParserMap: object; | ||
messages: object; | ||
mode: object; | ||
mixedEnabled: object; | ||
locale: string; | ||
schemaType: string; | ||
logging: boolean; | ||
logTypes: string[]; | ||
logDetailed: object[]; | ||
warnOnInvalid: boolean; | ||
buildProp: (propObj, key) => object; | ||
types: object; | ||
typeHandlers: object; | ||
multiArgsValidatorMethods: object; | ||
errMessageKey: string; | ||
errMessagesMapKey: string; | ||
createPropertyValueHandler: (opts: any, config: any) => object; | ||
buildProperties: (obj: any) => object; | ||
getProps: (obj: any) => object[]; | ||
getType: (obj: any) => string; | ||
getName: (obj: any) => string; | ||
isRequired: (value: any) => boolean; | ||
setRequired: (value: any, key: any, required: any) => void; | ||
setPropEntry: (propObj: any, key: any, value: any) => void; | ||
getConstraints: (value: any) => object[]; | ||
buildYup: (schema: any, config: any, parentNode: any) => object; | ||
toMultiType: (multiPropertyValueResolver: any) => object; | ||
toSingleType: (singlePropertyValueResolver: any) => object; | ||
init: (schema: any, config: any) => void; | ||
createYupSchemaEntry: (opts: any) => object; | ||
export interface YupBuilderConfig extends TypeHandlerConfig { | ||
boolean?: TypeHandlerConfig; | ||
string?: TypeHandlerConfig; | ||
number?: TypeHandlerConfig; | ||
object?: TypeHandlerConfig; | ||
array?: TypeHandlerConfig; | ||
date?: TypeHandlerConfig; | ||
mixed?: TypeHandlerConfig; | ||
createCustomConstraintBuilder?: (typeHandler: any, config: any) => any; | ||
createErrorMessageHandler?: (typeHandler: any, config: any) => any; | ||
validationErrorMessage?: (msgName: any, typeHandler: any) => void; | ||
createWhenCondition?: (opts: any) => void; | ||
isBoolean?: (obj: any) => boolean; | ||
isDate?: (obj: any) => boolean; | ||
isString?: (obj: any) => boolean; | ||
isNumber?: (obj: any) => boolean; | ||
isObject?: (obj: any) => boolean; | ||
format?: boolean; | ||
schemaParserMap?: object; | ||
messages?: object; | ||
mode?: object; | ||
mixedEnabled?: object; | ||
locale?: string; | ||
schemaType?: string; | ||
logging?: boolean; | ||
logTypes?: string[]; | ||
logDetailed?: object[]; | ||
warnOnInvalid?: boolean; | ||
types?: object; | ||
typeHandlers?: object; | ||
multiArgsValidatorMethods?: object; | ||
errMessageKey?: string; | ||
errMessagesMapKey?: string; | ||
buildProp?: (propObj, key) => object; | ||
createPropertyValueHandler?: (opts: any, config: any) => object; | ||
buildProperties?: (obj: any) => object; | ||
getProps?: (obj: any) => object[]; | ||
getType?: (obj: any) => string; | ||
getName?: (obj: any) => string; | ||
isRequired?: (value: any) => boolean; | ||
setRequired?: (value: any, key: any, required: any) => void; | ||
setPropEntry?: (propObj: any, key: any, value: any) => void; | ||
getConstraints?: (value: any) => object[]; | ||
buildYup?: (schema: any, config: any, parentNode: any) => object; | ||
toMultiType?: (multiPropertyValueResolver: any) => object; | ||
toSingleType?: (singlePropertyValueResolver: any) => object; | ||
init?: (schema: any, config: any) => void; | ||
createYupSchemaEntry?: (opts: any) => object; | ||
} |
{ | ||
"name": "schema-to-yup", | ||
"version": "1.12.5", | ||
"version": "1.12.6", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
@@ -126,3 +126,3 @@ <!-- vscode-markdown-toc --> | ||
You can use the `YupBuilderConfig` and `TypeHandlerConfig` types and classes to facilitate building up the `config` object to pass to the `YupBuilder`. | ||
You can use the `YupBuilderConfig` and `TypeHandlerConfig` type interfaces to facilitate building up the `config` object to pass to the `YupBuilder`. | ||
@@ -129,0 +129,0 @@ ## 5. <a name='BuildandSamplerun'></a>Build and Sample run |
@@ -1,54 +0,55 @@ | ||
export class TypeHandlerConfig { | ||
enabled: string[]; | ||
extends: string[]; | ||
convert: object; | ||
export interface TypeHandlerConfig { | ||
enabled?: string[]; | ||
extends?: string[]; | ||
convert?: object; | ||
} | ||
export class YupBuilderConfig extends TypeHandlerConfig { | ||
boolean: TypeHandlerConfig; | ||
string: TypeHandlerConfig; | ||
number: TypeHandlerConfig; | ||
object: TypeHandlerConfig; | ||
array: TypeHandlerConfig; | ||
date: TypeHandlerConfig; | ||
mixed: TypeHandlerConfig; | ||
createCustomConstraintBuilder: (typeHandler: any, config: any) => any; | ||
createErrorMessageHandler: (typeHandler: any, config: any) => any; | ||
validationErrorMessage: (msgName: any, typeHandler: any) => void; | ||
createWhenCondition: (opts: any) => void; | ||
isBoolean: (obj: any) => boolean; | ||
isDate: (obj: any) => boolean; | ||
isString: (obj: any) => boolean; | ||
isNumber: (obj: any) => boolean; | ||
isObject: (obj: any) => boolean; | ||
format: boolean; | ||
schemaParserMap: object; | ||
messages: object; | ||
mode: object; | ||
mixedEnabled: object; | ||
locale: string; | ||
schemaType: string; | ||
logging: boolean; | ||
logTypes: string[]; | ||
logDetailed: object[]; | ||
warnOnInvalid: boolean; | ||
buildProp: (propObj, key) => object; | ||
types: object; | ||
typeHandlers: object; | ||
multiArgsValidatorMethods: object; | ||
errMessageKey: string; | ||
errMessagesMapKey: string; | ||
createPropertyValueHandler: (opts: any, config: any) => object; | ||
buildProperties: (obj: any) => object; | ||
getProps: (obj: any) => object[]; | ||
getType: (obj: any) => string; | ||
getName: (obj: any) => string; | ||
isRequired: (value: any) => boolean; | ||
setRequired: (value: any, key: any, required: any) => void; | ||
setPropEntry: (propObj: any, key: any, value: any) => void; | ||
getConstraints: (value: any) => object[]; | ||
buildYup: (schema: any, config: any, parentNode: any) => object; | ||
toMultiType: (multiPropertyValueResolver: any) => object; | ||
toSingleType: (singlePropertyValueResolver: any) => object; | ||
init: (schema: any, config: any) => void; | ||
createYupSchemaEntry: (opts: any) => object; | ||
export interface YupBuilderConfig extends TypeHandlerConfig { | ||
boolean?: TypeHandlerConfig; | ||
string?: TypeHandlerConfig; | ||
number?: TypeHandlerConfig; | ||
object?: TypeHandlerConfig; | ||
array?: TypeHandlerConfig; | ||
date?: TypeHandlerConfig; | ||
mixed?: TypeHandlerConfig; | ||
createCustomConstraintBuilder?: (typeHandler: any, config: any) => any; | ||
createErrorMessageHandler?: (typeHandler: any, config: any) => any; | ||
validationErrorMessage?: (msgName: any, typeHandler: any) => void; | ||
createWhenCondition?: (opts: any) => void; | ||
isBoolean?: (obj: any) => boolean; | ||
isDate?: (obj: any) => boolean; | ||
isString?: (obj: any) => boolean; | ||
isNumber?: (obj: any) => boolean; | ||
isObject?: (obj: any) => boolean; | ||
format?: boolean; | ||
schemaParserMap?: object; | ||
messages?: object; | ||
mode?: object; | ||
mixedEnabled?: object; | ||
locale?: string; | ||
schemaType?: string; | ||
logging?: boolean; | ||
logTypes?: string[]; | ||
logDetailed?: object[]; | ||
warnOnInvalid?: boolean; | ||
types?: object; | ||
typeHandlers?: object; | ||
multiArgsValidatorMethods?: object; | ||
errMessageKey?: string; | ||
errMessagesMapKey?: string; | ||
buildProp?: (propObj, key) => object; | ||
createPropertyValueHandler?: (opts: any, config: any) => object; | ||
buildProperties?: (obj: any) => object; | ||
getProps?: (obj: any) => object[]; | ||
getType?: (obj: any) => string; | ||
getName?: (obj: any) => string; | ||
isRequired?: (value: any) => boolean; | ||
setRequired?: (value: any, key: any, required: any) => void; | ||
setPropEntry?: (propObj: any, key: any, value: any) => void; | ||
getConstraints?: (value: any) => object[]; | ||
buildYup?: (schema: any, config: any, parentNode: any) => object; | ||
toMultiType?: (multiPropertyValueResolver: any) => object; | ||
toSingleType?: (singlePropertyValueResolver: any) => object; | ||
init?: (schema: any, config: any) => void; | ||
createYupSchemaEntry?: (opts: any) => object; | ||
} |
371875