export type PgpOwnertrust = 'unknown' | 'never' | 'marginal' | 'full' | 'ultimate'; export type StorageUnit = 'MB' | 'GB' | 'TB'; export type DataFeedRetentionPolicy = 'append-only' | 'replace-snapshot'; export interface DataFeedSubscription { id: string; dataSourceId: string; peerId: string; datastoreKey: string | null; standardId: string; providerName: string; providerId: string | null; providerPublicKey: string | null; sourceName: string | null; remoteRows: number; storageCap: number; storageUnit: StorageUnit; syncFilter: string; queryProfile: string; retentionPolicy: DataFeedRetentionPolicy; createdAt: string; updatedAt: string; } export interface DataFeedSubscriptionInput { dataSourceId: string; peerId: string; datastoreKey?: string | null; standardId: string; providerName: string; providerId?: string | null; providerPublicKey: string | null; sourceName?: string | null; remoteRows: number; storageCap: number; storageUnit: StorageUnit; syncFilter: string; queryProfile?: string | null; retentionPolicy?: string | null; } export interface DataDirectoryState { peerTrust: Record; subscriptions: DataFeedSubscription[]; } export interface DataDirectoryMigrationSource { dataSourceId: string; peerId: string; providerName: string; providerId?: string | null; providerPublicKey: string | null; sourceName?: string | null; legacyDataSourceIds?: string[]; defaultStandardIds?: string[]; remoteRowsByStandard?: Record; } export interface LegacySchemaSyncPreference { mode?: unknown; storageCap?: unknown; storageUnit?: unknown; } export interface LegacySchemaSyncProgress { totalRows?: unknown; } export interface DataDirectoryStorage { getItem(key: string): string | null; setItem(key: string, value: string): void; } export declare const DATA_DIRECTORY_STORAGE_KEY = "sdn:data-directory:v1"; export declare const PGP_OWNERTRUST_LEVELS: PgpOwnertrust[]; export declare const DEFAULT_OWNERTRUST: PgpOwnertrust; export declare const DATA_SOURCE_OWNERTRUST: PgpOwnertrust; export declare const DEFAULT_DATA_FEED_QUERY_PROFILE = "dataset-publication-offset-v1"; export declare const DEFAULT_DATA_FEED_RETENTION_POLICY: DataFeedRetentionPolicy; export declare const DATA_FEED_RETENTION_POLICIES: DataFeedRetentionPolicy[]; export declare function normalizeOwnertrust(value: unknown): PgpOwnertrust; export declare function isTrustedDirectoryOwnertrust(value: unknown): boolean; export declare function ownertrustForDataSourceSubscription(current: unknown): PgpOwnertrust; export declare function subscriptionKey(dataSourceId: string, standardId: string, datastoreKey?: string | null): string; export declare function updatePeerOwnertrust(state: DataDirectoryState, peerId: string, ownertrust: PgpOwnertrust): DataDirectoryState; export declare function upsertDataFeedSubscription(state: DataDirectoryState, input: DataFeedSubscriptionInput): DataDirectoryState; export declare function updateDataFeedSubscription(state: DataDirectoryState, subscriptionId: string, patch: Partial>): DataDirectoryState; export declare function removeDataFeedSubscription(state: DataDirectoryState, subscriptionId: string): DataDirectoryState; export declare function migrateSchemaSyncPreferencesToDataDirectory(state: DataDirectoryState, preferences: Record, sources: DataDirectoryMigrationSource[], progress?: Record): DataDirectoryState; export declare function ensureReplaceSnapshotDataFeedSubscriptions(state: DataDirectoryState, sources: DataDirectoryMigrationSource[]): DataDirectoryState; export declare function canonicalizeDataDirectorySourceIds(state: DataDirectoryState, sources: DataDirectoryMigrationSource[]): DataDirectoryState; export declare function normalizeDataDirectoryState(value: unknown): DataDirectoryState; export declare function loadDataDirectoryState(storage?: DataDirectoryStorage | null): DataDirectoryState; export declare function persistDataDirectoryState(state: DataDirectoryState, storage?: DataDirectoryStorage | null): void; export declare function emptyDataDirectoryState(): DataDirectoryState; export declare function defaultDataFeedRetentionPolicy(standardId: unknown): DataFeedRetentionPolicy; export declare function normalizeDataFeedRetentionPolicy(value: unknown, standardId: unknown): DataFeedRetentionPolicy; //# sourceMappingURL=data-directory.d.ts.map