import { DynamicValue, OneOrMoreOf } from 'vest-utils'; export type OptionalFields = Record; export type OptionalsInput = | OneOrMoreOf | OptionalsObject; type OptionalsObject = Record; type ImmediateOptionalFieldDeclaration = { type: OptionalFieldTypes.CUSTOM_LOGIC; rule: TOptionalRule; applied: boolean; }; type DelayedOptionalFieldDeclaration = { type: OptionalFieldTypes.AUTO; applied: boolean; rule: null; }; type TOptionalRule = DynamicValue; export type OptionalFieldDeclaration = | ImmediateOptionalFieldDeclaration | DelayedOptionalFieldDeclaration; export enum OptionalFieldTypes { CUSTOM_LOGIC, AUTO, }