/** * Isolation Types */ /** * Data isolation strategy */ export type IsolationStrategy = 'shared' | 'schema' | 'database' | 'hybrid'; /** * Tenant resolution strategy */ export type ResolutionStrategy = 'subdomain' | 'custom_domain' | 'path' | 'header' | 'query' | 'jwt' | 'custom'; /** * Isolation configuration */ export interface IsolationConfig { /** Data isolation strategy */ strategy: IsolationStrategy; /** Tenant resolution strategy */ resolution: ResolutionStrategy; /** Header name for header-based resolution */ headerName?: string; /** Query param name for query-based resolution */ queryParam?: string; /** JWT claim name for JWT-based resolution */ jwtClaim?: string; /** Domain lookup function for custom_domain resolution */ domainLookup?: (domain: string) => Promise; /** Custom resolver function */ customResolver?: (request: unknown) => Promise; /** Default tenant ID (for public routes) */ defaultTenantId?: string; /** Routes that don't require tenant context */ publicRoutes?: string[]; } /** * Database isolation config */ export interface DatabaseIsolationConfig { /** Isolation strategy */ strategy: IsolationStrategy; /** Schema prefix for schema-based isolation */ schemaPrefix?: string; /** Database name template for database-based isolation */ databaseTemplate?: string; /** Connection pool per tenant */ poolPerTenant?: boolean; /** Max connections per tenant pool */ maxConnectionsPerTenant?: number; } /** * Storage isolation config */ export interface StorageIsolationConfig { /** Use separate S3 prefix per tenant */ prefixByTenant: boolean; /** Prefix template (e.g., "tenants/{tenantId}/") */ prefixTemplate?: string; /** Use separate bucket per tenant */ bucketPerTenant?: boolean; } //# sourceMappingURL=isolation.d.ts.map