import { IBillingEntity } from "../billing.entity.interface"; import { IEntityAuditColumn } from "../entity-audit-columns.interface"; import { IFieldMinMaxConstraint } from "./utils"; /** * excluded, and why: * - "status", "paymentStatus", "invoiceEntityType", "currency", "type" * enums, they carry no min/max * - "id", keyof IEntityAuditColumn generated columns * - "isProjectComplete" boolean, no min/max * - "startDate", "endDate" datecodes held as varchar(255); they are flagged for an int * migration rather than bounded against a column that is the * wrong type to begin with. invoiceDate is already an int * column and so is kept below * - "invoiceDocument" url field, bounded by max_size, allowed_file_formats and * count, not by a character length */ export type IBillingFieldLengthConstraintsExclude = "id" | "status" | "paymentStatus" | "invoiceEntityType" | "currency" | "type" | "isProjectComplete" | "startDate" | "endDate" | "invoiceDocument" | 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 IBillingFieldMinMaxConstraints = { [K in keyof Omit]-?: IFieldMinMaxConstraint; }; export declare const billingFieldMinMaxConstraints: IBillingFieldMinMaxConstraints;