import { AppContext, UserPayload } from '../types.js';
import { RunView, UserInfo } from '@memberjunction/core';
import { RoleEntity, UserEntity } from '@memberjunction/core-entities';
export declare class SyncRolesAndUsersResultType {
    Success: boolean;
}
export declare class RoleInputType {
    ID: string;
    Name: string;
    Description: string;
}
export declare enum UserType {
    Owner = "Owner",
    User = "User"
}
export declare class UserInputType {
    ID: string;
    Name: string;
    Email: string;
    Type: UserType;
    FirstName: string;
    LastName: string;
    Title: string;
    Roles?: RoleInputType[];
}
export declare class RolesAndUsersInputType {
    Users: UserInputType[];
    Roles: RoleInputType[];
}
export declare class SyncRolesAndUsersResolver {
    /**
     * This mutation will sync both the roles and the users, and the user/role relationships in the system with the data provided in the input.
     * Roles are matched by the name (case insensitive) and users are matched by email
     * @param data
     */
    SyncRolesAndUsers(data: RolesAndUsersInputType, context: AppContext): Promise<SyncRolesAndUsersResultType>;
    /**
     * This mutation will sync the roles in the system with the data provided in the input, using the role name for matching (case insensitive)
     * @param data
     */
    SyncRoles(roles: RoleInputType[], context: AppContext): Promise<SyncRolesAndUsersResultType>;
    protected UpdateExistingRoles(currentRoles: RoleEntity[], futureRoles: RoleInputType[], userPayload: UserPayload): Promise<SyncRolesAndUsersResultType>;
    protected AddNewRoles(currentRoles: RoleEntity[], futureRoles: RoleInputType[], user: UserInfo, userPayload: UserPayload): Promise<boolean>;
    protected DeleteRemovedRoles(currentRoles: RoleEntity[], futureRoles: RoleInputType[], user: UserInfo, userPayload: UserPayload): Promise<boolean>;
    get StandardRoles(): string[];
    IsStandardRole(roleName: string): boolean;
    protected DeleteSingleRole(role: RoleEntity, rv: RunView, user: UserInfo, userPayload: UserPayload): Promise<boolean>;
    /**
     * This mutation will sync the just the users in the system with the data provided in the input, matches existing users by email
     * @important This method will NOT work if the roles are not already in sync, meaning if User/Role relationships exist in the input data where the Role doesn't already exist in this system the sync will fail
     * @param data
     */
    SyncUsers(users: UserInputType[], context: AppContext): Promise<SyncRolesAndUsersResultType>;
    protected UpdateExistingUsers(currentUsers: UserEntity[], futureUsers: UserInputType[], userPayload: UserPayload): Promise<boolean>;
    protected AddNewUsers(currentUsers: UserEntity[], futureUsers: UserInputType[], userPayload: UserPayload): Promise<boolean>;
    protected DeleteRemovedUsers(currentUsers: UserEntity[], futureUsers: UserInputType[], u: UserInfo, userPayload: UserPayload): Promise<boolean>;
    protected DeleteSingleUser(user: UserEntity, rv: RunView, u: UserInfo, userPayload: UserPayload): Promise<boolean>;
    protected SyncUserRoles(users: UserInputType[], u: UserInfo, userPayload: UserPayload): Promise<boolean>;
}
//# sourceMappingURL=SyncRolesUsersResolver.d.ts.map