import type { Permission, TeamRole } from './types';
/**
 * Check if current user has a permission in the current team
 *
 * SERVER USAGE:
 * ```typescript
 * if (!await checkPermission(userId, teamId, 'customers.create')) {
 *   return createApiError('Permission denied', 403)
 * }
 * ```
 *
 * @param userId - User ID to check
 * @param teamId - Team ID where permission is being checked
 * @param permission - Permission to check
 * @returns true if user has the permission
 */
export declare function checkPermission(userId: string, teamId: string, permission: Permission): Promise<boolean>;
/**
 * Check multiple permissions (AND - all required)
 *
 * @param userId - User ID to check
 * @param teamId - Team ID where permissions are being checked
 * @param permissions - Array of permissions to check
 * @returns true if user has ALL permissions
 *
 * @example
 * ```typescript
 * const canEditAndDelete = await checkPermissions(userId, teamId, [
 *   'customers.update',
 *   'customers.delete'
 * ])
 * ```
 */
export declare function checkPermissions(userId: string, teamId: string, permissions: Permission[]): Promise<boolean>;
/**
 * Check at least one permission (OR - any is sufficient)
 *
 * @param userId - User ID to check
 * @param teamId - Team ID where permissions are being checked
 * @param permissions - Array of permissions to check
 * @returns true if user has AT LEAST ONE permission
 *
 * @example
 * ```typescript
 * const canModify = await checkAnyPermission(userId, teamId, [
 *   'customers.update',
 *   'customers.delete'
 * ])
 * ```
 */
export declare function checkAnyPermission(userId: string, teamId: string, permissions: Permission[]): Promise<boolean>;
/**
 * Get all permissions for a user in a team
 *
 * @param userId - User ID
 * @param teamId - Team ID
 * @returns Array of permission IDs the user has
 *
 * @example
 * ```typescript
 * const userPerms = await getUserPermissions(userId, teamId)
 * console.log('User permissions:', userPerms)
 * ```
 */
export declare function getUserPermissions(userId: string, teamId: string): Promise<Permission[]>;
/**
 * Check permission synchronously (when you already have the role)
 *
 * Useful in contexts where you've already fetched the role
 *
 * @param teamRole - Team role
 * @param permission - Permission to check
 * @returns true if the role has the permission
 *
 * @example
 * ```typescript
 * // When you already have the role from context
 * const canCreate = hasPermissionSync(userRole, 'customers.create')
 * ```
 */
export declare function hasPermissionSync(teamRole: TeamRole, permission: Permission): boolean;
//# sourceMappingURL=check.d.ts.map