import { ValidatorConstraintInterface } from 'class-validator'; import { ID, IOrganization } from '@metad/contracts'; import { Repository } from 'typeorm'; import { UserOrganization } from '../../../core/entities/internal'; /** * Validator constraint for checking if a user belongs to the organization. */ export declare class OrganizationBelongsToUserConstraint implements ValidatorConstraintInterface { private readonly repository; constructor(repository: Repository); /** * Validates if the user belongs to the organization. * * @param value - The organization ID or organization object. * @returns {Promise} - True if the user belongs to the organization, otherwise false. */ validate(value: ID | IOrganization): Promise; /** * Checks if the given organization exists for the current user in the database. * * @param organizationId - The ID of the organization. * @returns {Promise} - True if found, false otherwise. */ checkOrganizationExistence(organizationId: string): Promise; /** * Gets the default error message when validation fails. * * @returns {string} - Default error message. */ defaultMessage(): string; }