@graphand/core
Advanced tools
Comparing version 1.3.7 to 1.3.8
@@ -18,2 +18,3 @@ import { CoreErrorDefinition } from '../types/index.js'; | ||
}; | ||
static fromJSON(json: ReturnType<CoreError["toJSON"]>): CoreError; | ||
} |
@@ -34,2 +34,3 @@ import { FieldTypes } from '../enums/field-types.js'; | ||
}; | ||
static fromJSON(json: ReturnType<Field["toJSON"]>): Field<FieldTypes>; | ||
} |
@@ -18,13 +18,16 @@ import { CoreError } from './CoreError.js'; | ||
get message(): string; | ||
onPath(path: string): (ValidationValidatorError | ValidationFieldError)[]; | ||
toJSON(): { | ||
type: string; | ||
fieldsPaths: string[]; | ||
model: string | undefined; | ||
reason: { | ||
fields: { | ||
type: "ValidationFieldError"; | ||
slug: string; | ||
field: ReturnType<ValidationFieldError["field"]["toJSON"]>; | ||
field: ReturnType<NonNullable<ValidationFieldError["field"]>["toJSON"]>; | ||
validationError: ReturnType<NonNullable<ValidationFieldError["validationError"]>["toJSON"]> | undefined; | ||
message: string | undefined; | ||
}[]; | ||
validators: { | ||
type: string; | ||
validator: { | ||
@@ -61,5 +64,8 @@ type: import('../index.js').ValidatorTypes; | ||
}; | ||
fieldsPaths: string[]; | ||
code: string; | ||
message: string; | ||
}; | ||
forPath(path: string): (ValidationValidatorError | ValidationFieldError)[]; | ||
static fromJSON(json: ReturnType<ValidationError["toJSON"]>): ValidationError; | ||
} |
import { ValidationFieldErrorDefinition } from '../types/index.js'; | ||
import { Field } from './Field.js'; | ||
import { ValidationError } from './ValidationError.js'; | ||
export declare class ValidationFieldError { | ||
@@ -6,9 +8,13 @@ #private; | ||
get slug(): string; | ||
get field(): import('./Field.js').Field<import('../index.js').FieldTypes>; | ||
get validationError(): import('./ValidationError.js').ValidationError | undefined; | ||
get field(): Field<import('../index.js').FieldTypes>; | ||
get validationError(): ValidationError | undefined; | ||
get message(): string | undefined; | ||
toJSON(): { | ||
type: "ValidationFieldError"; | ||
slug: string; | ||
field: ReturnType<ValidationFieldError["field"]["toJSON"]>; | ||
field: ReturnType<NonNullable<ValidationFieldError["field"]>["toJSON"]>; | ||
validationError: ReturnType<NonNullable<ValidationFieldError["validationError"]>["toJSON"]> | undefined; | ||
message: string | undefined; | ||
}; | ||
static fromJSON(json: ReturnType<ValidationFieldError["toJSON"]>): ValidationFieldError; | ||
} |
import { ValidationValidatorErrorDefinition } from '../types/index.js'; | ||
import { Validator } from './Validator.js'; | ||
export declare class ValidationValidatorError { | ||
#private; | ||
constructor(definition: ValidationValidatorErrorDefinition); | ||
get validator(): import('./Validator.js').Validator<import('../index.js').ValidatorTypes>; | ||
get validator(): Validator<import('../index.js').ValidatorTypes>; | ||
get value(): string | undefined; | ||
get message(): string | undefined; | ||
toJSON(): { | ||
type: string; | ||
validator: { | ||
@@ -39,2 +41,3 @@ type: import('../index.js').ValidatorTypes; | ||
}; | ||
static fromJSON(json: ReturnType<ValidationValidatorError["toJSON"]>): ValidationValidatorError; | ||
} |
@@ -23,2 +23,3 @@ import { ValidatorTypes } from '../enums/validator-types.js'; | ||
}; | ||
static fromJSON(json: ReturnType<Validator["toJSON"]>): Validator<ValidatorTypes>; | ||
} |
@@ -154,2 +154,3 @@ import { Model } from '../lib/Model.js'; | ||
validationError?: ValidationError; | ||
message?: string; | ||
}; | ||
@@ -156,0 +157,0 @@ export type ValidationValidatorErrorDefinition = { |
{ | ||
"name": "@graphand/core", | ||
"version": "1.3.7", | ||
"version": "1.3.8", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
387349
7985