import type { ExistingState, EnvironmentKey, DatafileContent, EntityType, HistoryEntry, Commit, CommitHash } from "@featurevisor/types"; import { Adapter, DatafileOptions } from "./adapter"; import { ProjectConfig } from "../config"; export declare function getExistingStateFilePath(projectConfig: ProjectConfig, environment: EnvironmentKey | false): string; export declare function getRevisionFilePath(projectConfig: ProjectConfig): string; export declare function getAllEntityFilePathsRecursively(directoryPath: any, extension: any): string[]; export declare class FilesystemAdapter extends Adapter { private config; private rootDirectoryPath?; private parser; constructor(config: ProjectConfig, rootDirectoryPath?: string); getEntityDirectoryPath(entityType: EntityType): string; getEntityPath(entityType: EntityType, entityKey: string): string; getFeatureEnvironmentPath(featureKey: string, environment: string): string; private assertSplitByEnvironmentIsValidFeatureBase; private readFeatureEnvironmentEntity; listEntities(entityType: EntityType): Promise; entityExists(entityType: EntityType, entityKey: string): Promise; readEntity(entityType: EntityType, entityKey: string): Promise; writeEntity(entityType: EntityType, entityKey: string, entity: T): Promise; deleteEntity(entityType: EntityType, entityKey: string): Promise; /** * State */ readState(environment: EnvironmentKey): Promise; writeState(environment: EnvironmentKey, existingState: ExistingState): Promise; /** * Revision */ readRevision(): Promise; writeRevision(revision: string): Promise; /** * Datafile */ getDatafilePath(options: DatafileOptions): string; readDatafile(options: DatafileOptions): Promise; writeDatafile(datafileContent: DatafileContent, options: DatafileOptions): Promise; /** * History */ getRawHistory(pathPatterns: string[]): Promise; getPathPatterns(entityType?: EntityType, entityKey?: string): string[]; getFeatureSourcePaths(featureKey: string): Promise<{ baseFilePath: string; environmentFilePaths: Record; }>; getFeaturePropertySourcePath(featureKey: string, _property: "rules" | "force" | "expose", environment?: string): Promise; listHistoryEntries(entityType?: EntityType, entityKey?: string): Promise; readCommit(commitHash: CommitHash, entityType?: EntityType, entityKey?: string): Promise; }