import { IEntityAuditColumn } from "../entity-audit-columns.interface"; import { IVendorEntity } from "../vendor.entity.interface"; import { IFieldMinMaxConstraint } from "./utils"; /** * excluded, and why: * - "locationType", "gstType", "panType", "contractApplicability", "status" * enums, they carry no min/max * - "panDocument", "gstDocument", "contractDocument", "attachmentDocuments" * url / url_multi fields, bounded by max_size, * allowed_file_formats and count instead * - "id", keyof IEntityAuditColumn generated columns * * VendorUpdateDto extends PartialType(OmitType(VendorCreateDto, ...)), so it inherits every * create bound — create and update cannot disagree for this entity */ export type IVendorFieldLengthConstraintsExclude = "id" | "locationType" | "gstType" | "panType" | "contractApplicability" | "status" | "panDocument" | "gstDocument" | "contractDocument" | "attachmentDocuments" | keyof IEntityAuditColumn; /** * since some fields are optional, but we still need their * min & max length constraints, we need to make them required in this type * hence we are using -? to make all properties required in this type */ export type IVendorFieldMinMaxConstraints = { [K in keyof Omit]-?: IFieldMinMaxConstraint; }; export declare const vendorFieldMinMaxConstraints: IVendorFieldMinMaxConstraints;