import { RelationMappings, JSONSchema, Pojo } from 'objection';
import BaseModel, { TrxOption } from '../base.model';
import TeamMember from '../teamMember/teamMember.model';
import User from '../user/user.model';
type TrxAndStatusOptions = {
    status?: string;
} & TrxOption;
declare class Team extends BaseModel {
    objectId: string;
    objectType: string;
    displayName: string;
    role: string;
    global: boolean;
    members: TeamMember[];
    users: User[];
    constructor();
    static get tableName(): string;
    static get relationMappings(): RelationMappings;
    static get schema(): object;
    $beforeValidate(jsonSchema: JSONSchema, json: Pojo): JSONSchema;
    static findAllGlobalTeams(options?: TrxOption): Promise<Team[]>;
    static findGlobalTeamByRole(role: any, options?: TrxOption): Promise<Team>;
    static findTeamByRoleAndObject(role: string, objectId: string, options?: TrxOption): Promise<Team>;
    /**
     * Members should be an array of user ids
     */
    static updateMembershipByTeamId(teamId: string, members: string[], options?: TrxAndStatusOptions): Promise<Team>;
    static addMember(teamId: string, userId: string, options?: TrxAndStatusOptions): Promise<Team>;
    static removeMember(teamId: any, userId: any, options?: TrxOption): Promise<Team>;
    static addMemberToGlobalTeam(userId: string, role: string, options?: TrxOption): Promise<Team>;
    static removeMemberFromGlobalTeam(userId: string, role: string, options?: TrxOption): Promise<Team>;
}
export default Team;
//# sourceMappingURL=team.model.d.ts.map