import { Aggregate, Model } from "@mongez/monpulse"; import { Rule } from "./rule"; export declare class UniqueRule extends Rule { protected columnName?: string; /** * Rule name */ static ruleName: string; /** * Table name */ protected tableName?: string; /** * Except column */ protected exceptColumn: string; /** * Except value */ protected exceptValue: any; /** * Is case sensitive */ protected isCaseSensitive: boolean; /** * Model */ protected model?: typeof Model; /** * Filter without current user value */ protected exceptUserId: boolean; /** * Add custom query */ protected _query?: (query: Aggregate) => void; /** * Constructor */ constructor(tableName: string | typeof Model, columnName?: string); /** * Run the rule except for current user */ exceptCurrentUser(exceptCurrentUser?: boolean): this; /** * Except value */ except(column: string, value?: any): this; /** * Ignore case sensitive */ insensitive(): this; /** * Strict to be sensitive */ sensitive(): this; /** * Validate the rule */ validate(): Promise; /** * Add custom query */ query(query: (query: Aggregate) => void): this; /** * Get error message */ error(): any; } //# sourceMappingURL=unique.d.ts.map