import { z } from 'zod'; export interface User { id: string; email: string; name: string; role: UserRole; tier: SubscriptionTier; permissions: Permission[]; apiKeys: APIKey[]; settings: UserSettings; createdAt: string; updatedAt: string; lastLoginAt?: string; } export type UserRole = 'admin' | 'developer' | 'viewer' | 'agent'; export type SubscriptionTier = 'free' | 'pro' | 'enterprise'; export interface Permission { resource: string; actions: string[]; conditions?: Record; } export interface APIKey { id: string; name: string; key: string; permissions: Permission[]; rateLimit?: { requests: number; window: string; }; expiresAt?: string; lastUsedAt?: string; isActive: boolean; createdAt: string; } export interface UserSettings { timezone: string; dateFormat: string; theme: 'light' | 'dark' | 'auto'; notifications: { email: boolean; browser: boolean; slack?: string; webhook?: string; }; defaultDatabase?: string; queryTimeout: number; } export interface JWTPayload { sub: string; email: string; role: UserRole; tier: SubscriptionTier; permissions: Permission[]; iat: number; exp: number; iss: string; aud: string; } export interface LoginRequest { email: string; password: string; remember?: boolean; } export interface LoginResponse { user: Omit; token: string; refreshToken: string; expiresIn: number; } export interface RefreshTokenRequest { refreshToken: string; } export interface CreateAPIKeyRequest { name: string; permissions: Permission[]; expiresAt?: string; rateLimit?: { requests: number; window: string; }; } export interface CreateAPIKeyResponse { key: APIKey; secretKey: string; } export interface OAuthProvider { name: string; clientId: string; clientSecret: string; redirectUri: string; scopes: string[]; enabled: boolean; } export interface Session { id: string; userId: string; deviceInfo: { userAgent: string; ipAddress: string; location?: string; }; createdAt: string; lastActivityAt: string; expiresAt: string; isActive: boolean; } export interface SecurityEvent { id: string; userId: string; type: 'login' | 'logout' | 'api_key_used' | 'permission_denied' | 'suspicious_activity'; details: { ipAddress: string; userAgent: string; resource?: string; action?: string; success: boolean; error?: string; }; timestamp: string; } export interface RLSRule { id: string; name: string; collection: string; condition: string; actions: ('select' | 'insert' | 'update' | 'delete')[]; roles: UserRole[]; enabled: boolean; priority: number; createdAt: string; } export declare const LoginSchema: z.ZodObject<{ email: z.ZodString; password: z.ZodString; remember: z.ZodDefault; }, z.core.$strip>; export declare const CreateAPIKeySchema: z.ZodObject<{ name: z.ZodString; permissions: z.ZodArray; conditions: z.ZodOptional>; }, z.core.$strip>>; expiresAt: z.ZodOptional; rateLimit: z.ZodOptional>; }, z.core.$strip>; export declare const PermissionSchema: z.ZodObject<{ resource: z.ZodString; actions: z.ZodArray; conditions: z.ZodOptional>; }, z.core.$strip>; export declare const UpdateUserSettingsSchema: z.ZodObject<{ timezone: z.ZodOptional; dateFormat: z.ZodOptional; theme: z.ZodOptional>; notifications: z.ZodOptional; webhook: z.ZodOptional; }, z.core.$strip>>; defaultDatabase: z.ZodOptional; queryTimeout: z.ZodOptional; }, z.core.$strip>; export declare const CreateRLSRuleSchema: z.ZodObject<{ name: z.ZodString; collection: z.ZodString; condition: z.ZodString; actions: z.ZodArray>; roles: z.ZodArray>; enabled: z.ZodDefault; priority: z.ZodDefault; }, z.core.$strip>; //# sourceMappingURL=auth.d.ts.map