import { SmartObjectManifest } from '@happyvertical/smrt-core'; import { SmrtClassOptions } from '@happyvertical/smrt-core'; import { SmrtObject } from '@happyvertical/smrt-core'; export declare interface FeatureDefinitionOptions { id?: string; featureKey?: string; packageName?: string; qualifiedClassName?: string; className?: string; localId?: string; defaultEnabled?: boolean; label?: string; description?: string; metadata?: FeatureMetadata | string | null; visibility?: string; createdAt?: Date; updatedAt?: Date; } export declare interface FeatureDefinitionSeed { featureKey: string; packageName: string; qualifiedClassName: string; className: string; localId: string; defaultEnabled: boolean; label?: string; description?: string; metadata?: FeatureMetadata; visibility?: string; } export declare interface FeatureMetadata { [key: string]: unknown; } export declare enum FeatureOverrideEffect { INHERIT = "inherit", ENABLE = "enable", DISABLE = "disable" } export declare interface FeatureOverrideOptions { id?: string; featureKey?: string; scopeType?: FeatureScopeType; scopeId?: string; effect?: FeatureOverrideEffect; createdAt?: Date; updatedAt?: Date; } export declare interface FeatureResolutionContext { tenantId?: string; } export declare interface FeatureResolverOptions { tenantHierarchyLoader?: FeatureTenantHierarchyLoader; } export declare type FeatureScopeType = 'global' | 'tenant'; export declare interface FeatureSyncResult { total: number; created: number; updated: number; unchanged: number; deleted: number; featureKeys: string[]; } /** * Constructor type for any `@smrt()`-decorated class that may declare feature * toggles. Feature targets always extend `SmrtObject`, so this mirrors * `@happyvertical/smrt-core`'s internal (non-exported) `SmrtObjectConstructor` * and remains assignable to it for `ObjectRegistry.getClassByConstructor`. */ export declare type FeatureTargetConstructor = new (...args: unknown[]) => SmrtObject; export declare type FeatureTenantHierarchyLoader = (options: SmrtClassOptions) => Promise; export declare interface FeatureTenantHierarchyProvider { getChain(tenantId: string): Promise; } export declare interface FeatureTenantNode { id: string; inheritPermissions: boolean; cascadePermissions: boolean; } export declare interface FeatureUsersModule { TenantCollection: { create(options: SmrtClassOptions): Promise<{ get(criteria: { id: string; }): Promise; getAncestorsFromRoot(tenantId: string): Promise; }>; }; } /** * Minimal structural shape of a tenant record returned by * `@happyvertical/smrt-users`. Only the permission-cascade fields consumed by * feature resolution are modeled; everything else is left unconstrained. */ export declare interface FeatureUsersTenantRecord { id: string; inheritPermissions?: boolean; cascadePermissions?: boolean; } export declare const GLOBAL_FEATURE_SCOPE_ID = "*"; export { SmartObjectManifest } export { SmrtClassOptions } export declare interface SyncDefinitionsOptions { classNames?: string[]; constructors?: FeatureTargetConstructor[]; pruneStale?: boolean; } export declare interface SyncManifestOptions { pruneStale?: boolean; } export { }