/**
 * @deprecated DEPRECATED - Use service layer instead
 *
 * This file is DEPRECATED. All functions have been migrated to the service layer:
 * - createTeam → TeamService.create()
 * - getGlobalTeam → TeamService.getGlobal()
 * - hasGlobalTeam → TeamService.hasGlobal()
 * - getUserTeamRole → TeamMemberService.getRole(teamId, userId) [NOTE: param order changed!]
 * - checkTeamPermission → TeamMemberService.hasPermission()
 * - isTeamMember → TeamMemberService.isMember(teamId, userId) [NOTE: param order changed!]
 * - isSlugAvailable → TeamService.isSlugAvailable()
 * - switchActiveTeam → TeamService.switchActive()
 * - deleteTeam → TeamService.delete()
 *
 * Import from '../services' instead:
 * import { TeamService, TeamMemberService } from '../services'
 *
 * This file will be removed in a future version.
 */
import type { Team, TeamRole } from './types';
/**
 * Create Team (UNIFIED function - no type distinction)
 * Used for signup and manual team creation
 *
 * @param userId - The ID of the user creating the team
 * @param name - Optional team name (defaults to user's name + Team)
 * @returns The created Team
 */
export declare function createTeam(userId: string, name?: string): Promise<Team>;
/**
 * Get the global team (for single-tenant mode)
 * Returns the first team found (should be the only one)
 *
 * @returns The global team or null if none exists
 */
export declare function getGlobalTeam(): Promise<Team | null>;
/**
 * Check if global team exists (for single-tenant mode)
 * Used to determine if public signup should be blocked
 *
 * @returns True if a team exists, false otherwise
 */
export declare function hasGlobalTeam(): Promise<boolean>;
/**
 * Add user to the global team (for single-tenant invite flow)
 *
 * @param userId - The user ID to add
 * @param role - The role to assign (default: 'member')
 * @param invitedBy - The user ID who invited them
 */
export declare function addUserToGlobalTeam(userId: string, role?: TeamRole, invitedBy?: string): Promise<void>;
/**
 * Check if user has required permission in team
 *
 * @param userId - The user ID
 * @param teamId - The team ID
 * @param requiredRoles - Array of roles that are allowed
 * @returns True if user has permission, false otherwise
 */
export declare function checkTeamPermission(userId: string, teamId: string, requiredRoles?: TeamRole[]): Promise<boolean>;
/**
 * Get user's role in a team
 *
 * @param userId - The user ID
 * @param teamId - The team ID
 * @returns The user's role or null if not a member
 */
export declare function getUserTeamRole(userId: string, teamId: string): Promise<TeamRole | null>;
/**
 * Check if user is a member of a team
 *
 * @param userId - The user ID
 * @param teamId - The team ID
 * @returns True if user is a member, false otherwise
 */
export declare function isTeamMember(userId: string, teamId: string): Promise<boolean>;
/**
 * Get all teams for a user with detailed information
 *
 * @param userId - The user ID
 * @returns Array of teams with membership details
 */
export declare function getUserTeamsWithDetails(userId: string): Promise<{
    memberCount: number;
    id: string;
    name: string;
    slug: string;
    description: string | null;
    ownerId: string;
    avatarUrl: string | null;
    settings: Record<string, any>;
    createdAt: string;
    updatedAt: string;
    userRole: TeamRole;
    joinedAt: string;
}[]>;
/**
 * Get team by ID with member count
 *
 * @param teamId - The team ID
 * @param userId - The user ID (for RLS)
 * @returns Team with member count or null
 */
export declare function getTeamWithMemberCount(teamId: string, userId: string): Promise<(Team & {
    memberCount: number;
}) | null>;
/**
 * Get team members with user details
 *
 * @param teamId - The team ID
 * @param userId - The requesting user ID (for RLS)
 * @returns Array of team members with user information
 */
export declare function getTeamMembersWithUsers(teamId: string, userId: string): Promise<{
    id: string;
    teamId: string;
    userId: string;
    role: TeamRole;
    invitedBy: string | null;
    joinedAt: string;
    createdAt: string;
    updatedAt: string;
    userName: string | null;
    userEmail: string;
    userImage: string | null;
}[]>;
/**
 * Check if slug is available (not used by another team)
 *
 * @param slug - The slug to check
 * @param excludeTeamId - Optional team ID to exclude from check (for updates)
 * @returns True if slug is available, false otherwise
 */
export declare function isSlugAvailable(slug: string, excludeTeamId?: string): Promise<boolean>;
/**
 * Switch active team (for session management)
 * This would typically update the session with the new team context
 *
 * @param userId - The user ID
 * @param teamId - The team ID to switch to
 * @returns True if successful, throws error otherwise
 */
export declare function switchActiveTeam(userId: string, teamId: string): Promise<boolean>;
/**
 * Delete team
 * No special protection needed (all teams can be deleted)
 *
 * @param teamId - The team ID
 * @param userId - The user ID (must be owner)
 */
export declare function deleteTeam(teamId: string, userId: string): Promise<void>;
//# sourceMappingURL=actions.d.ts.map