export interface BrandingConfig {
    appName: string;
    appLogo: string;
    appIcon: string;
    companyName: string;
    primaryColor: string;
    secondaryColor: string;
    accentColor: string;
    backgroundColor: string;
    textColor: string;
    fontFamily: string;
    borderRadius: number;
    customCSS?: string;
    splashScreen?: string;
    loginBackground?: string;
    footerText?: string;
    helpUrl?: string;
    privacyUrl?: string;
    termsUrl?: string;
}
export declare const DEFAULT_BRANDING: BrandingConfig;
export declare function generateCSSVariables(branding: BrandingConfig): string;
export type AuthProvider = 'local' | 'ldap' | 'saml' | 'oidc' | 'oauth2' | 'azure-ad' | 'google' | 'github';
export interface AuthConfig {
    providers: AuthProviderConfig[];
    sessionTimeout: number;
    maxSessions: number;
    mfa: MFAConfig;
    passwordPolicy: PasswordPolicy;
    loginAttempts: number;
    lockoutDuration: number;
    jwtSecret?: string;
    jwtExpiry: number;
    refreshTokenExpiry: number;
    corsOrigins: string[];
}
export interface AuthProviderConfig {
    type: AuthProvider;
    enabled: boolean;
    displayName: string;
    icon?: string;
    config: Record<string, string>;
}
export interface MFAConfig {
    enabled: boolean;
    required: boolean;
    methods: ('totp' | 'sms' | 'email' | 'webauthn')[];
    gracePeriod: number;
}
export interface PasswordPolicy {
    minLength: number;
    maxLength: number;
    requireUppercase: boolean;
    requireLowercase: boolean;
    requireDigit: boolean;
    requireSpecial: boolean;
    preventReuse: number;
    expiryDays: number;
}
export declare const DEFAULT_PASSWORD_POLICY: PasswordPolicy;
export declare function validatePassword(password: string, policy: PasswordPolicy): string[];
export type Permission = 'project.create' | 'project.read' | 'project.edit' | 'project.delete' | 'project.publish' | 'asset.upload' | 'asset.edit' | 'asset.delete' | 'user.manage' | 'user.invite' | 'user.delete' | 'role.manage' | 'role.assign' | 'settings.view' | 'settings.edit' | 'billing.view' | 'billing.manage' | 'audit.view' | 'api.access' | 'api.admin' | 'marketplace.publish' | 'marketplace.moderate' | 'admin.all';
export interface RoleDef {
    id: string;
    name: string;
    description: string;
    permissions: Permission[];
    inherits?: string[];
    isSystem: boolean;
}
export declare const SYSTEM_ROLES: RoleDef[];
export declare function hasPermission(userPermissions: Permission[], required: Permission): boolean;
export declare function resolveRolePermissions(roleId: string, allRoles: RoleDef[]): Permission[];
export type AuditAction = 'login' | 'logout' | 'login_failed' | 'project_create' | 'project_update' | 'project_delete' | 'project_publish' | 'asset_upload' | 'asset_delete' | 'user_create' | 'user_update' | 'user_delete' | 'user_role_change' | 'settings_change' | 'permission_change' | 'api_key_create' | 'api_key_revoke' | 'export_start' | 'export_complete';
export interface AuditEntry {
    id: string;
    timestamp: number;
    action: AuditAction;
    userId: string;
    userEmail: string;
    ipAddress: string;
    userAgent: string;
    resourceType: string;
    resourceId: string;
    details: Record<string, unknown>;
    success: boolean;
    severity: 'info' | 'warning' | 'critical';
}
export interface AuditQuery {
    userId?: string;
    action?: AuditAction;
    resourceType?: string;
    resourceId?: string;
    severity?: AuditEntry['severity'];
    startDate?: number;
    endDate?: number;
    page: number;
    pageSize: number;
}
export declare class AuditLog {
    private entries;
    private maxEntries;
    constructor(maxEntries?: number);
    log(entry: Omit<AuditEntry, 'id' | 'timestamp'>): AuditEntry;
    query(q: AuditQuery): {
        entries: AuditEntry[];
        total: number;
    };
    getRecent(count: number): AuditEntry[];
    getFailedLogins(since: number): AuditEntry[];
    clear(): void;
}
export interface Organization {
    id: string;
    name: string;
    slug: string;
    ownerId: string;
    members: OrgMember[];
    plan: OrgPlan;
    branding: BrandingConfig;
    settings: OrgSettings;
    createdAt: number;
}
export interface OrgMember {
    userId: string;
    email: string;
    roleId: string;
    joinedAt: number;
    invitedBy: string;
    status: 'active' | 'invited' | 'suspended';
}
export type OrgPlan = 'free' | 'starter' | 'professional' | 'enterprise';
export interface OrgSettings {
    maxProjects: number;
    maxMembers: number;
    maxStorageGB: number;
    customDomain: boolean;
    ssoEnabled: boolean;
    apiAccess: boolean;
    prioritySupport: boolean;
    sla: string;
    dataRetentionDays: number;
}
export declare const PLAN_LIMITS: Record<OrgPlan, OrgSettings>;
export interface APIKey {
    id: string;
    name: string;
    prefix: string;
    hashedKey: string;
    userId: string;
    orgId: string;
    permissions: Permission[];
    rateLimit: number;
    expiresAt?: number;
    createdAt: number;
    lastUsedAt?: number;
    active: boolean;
}
export interface RateLimitConfig {
    windowMs: number;
    maxRequests: number;
    burstLimit: number;
    slowDownAfter: number;
    slowDownDelay: number;
}
export declare const DEFAULT_RATE_LIMITS: Record<string, RateLimitConfig>;
export declare class RateLimiter {
    private windows;
    private config;
    constructor(config: RateLimitConfig);
    tryConsume(key: string): {
        allowed: boolean;
        remaining: number;
        retryAfter?: number;
    };
    getRemainingRequests(key: string): number;
    reset(key: string): void;
}
export interface DeploymentConfig {
    mode: 'cloud' | 'self-hosted' | 'hybrid';
    region: string;
    database: DatabaseConfig;
    storage: StorageConfig;
    cache: CacheConfig;
    scaling: ScalingConfig;
}
export interface DatabaseConfig {
    type: 'postgresql' | 'mysql' | 'mongodb' | 'sqlite';
    host: string;
    port: number;
    database: string;
    ssl: boolean;
    poolSize: number;
    maxConnections: number;
}
export interface StorageConfig {
    type: 's3' | 'azure-blob' | 'gcs' | 'local';
    bucket: string;
    region: string;
    publicUrl: string;
    maxFileSizeMB: number;
}
export interface CacheConfig {
    type: 'redis' | 'memcached' | 'memory';
    host: string;
    port: number;
    defaultTTL: number;
    maxMemoryMB: number;
}
export interface ScalingConfig {
    minInstances: number;
    maxInstances: number;
    targetCPU: number;
    targetMemory: number;
    scaleUpCooldown: number;
    scaleDownCooldown: number;
}
