import { ValidationArguments, ValidatorConstraintInterface } from 'class-validator'; import { IRole } from '@metad/contracts'; import { Role } from '../../../core/entities/internal'; import { Repository } from 'typeorm'; /** * Role should existed validation constraint * * @param validationOptions * @returns */ export declare class RoleShouldExistConstraint implements ValidatorConstraintInterface { private readonly roleRepository; constructor(roleRepository: Repository); /** * Validates if the given role exists for the current tenant. * * @param role - The role to validate, either as a string ID or an IRole object. * @returns True if the role exists, false otherwise. */ validate(role: string | IRole): Promise; /** * Gets default message when validation for this constraint fail. */ defaultMessage(validationArguments?: ValidationArguments): string; }