import { IEntityAuditColumn } from "../entity-audit-columns.interface"; import { IPermissionEntity } from "../permission.entity.interface"; import { IFieldMinMaxConstraint } from "./utils"; /** * excluded, and why: * - "id", keyof IEntityAuditColumn generated columns * * neither PermissionCreateDto nor PermissionUpdateDto carries a single @MaxLength — the lengths they * advertise live only in @ApiProperty metadata, which documents but does not validate (and on the * create DTO the description's @ApiProperty is commented out entirely). Every bound below therefore * comes from the column definition */ export type IPermissionFieldLengthConstraintsExclude = "id" | 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 IPermissionFieldMinMaxConstraints = { [K in keyof Omit]-?: IFieldMinMaxConstraint; }; export declare const permissionFieldMinMaxConstraints: IPermissionFieldMinMaxConstraints;