import { CustomCasesAdapter } from '~/data/use-cases/validation-builder-adapter/helper/make-custom-cases-adapter'; import { MakeSchema, ValidationBuilder } from '~/domain/protocols'; export class ValidationBuilderAdapter implements ValidationBuilder.GetBuilder { private customs: CustomCasesAdapter; constructor(private readonly makeSchema: MakeSchema.All) { this.customs = new CustomCasesAdapter(makeSchema); } load = (): ValidationBuilder => { return { string: this.makeSchema.string.make, number: this.makeSchema.number.make, object: this.makeSchema.object.make, array: this.makeSchema.array.make, custom: this.customs.getCustoms(), }; }; }