mfarr_obsidian-archive/autoarchive/AutoArchiveTypes.ts
2026-04-06 09:52:34 -04:00

42 lines
887 B
TypeScript

export interface AutoArchiveCondition {
type: "fileAge" | "regexPattern";
value: string;
}
export interface AutoArchiveRule {
id: string;
enabled: boolean;
folderPath: string;
useFolderRegex: boolean;
applyRecursively: boolean;
conditions: AutoArchiveCondition[];
logicOperator: "AND" | "OR";
}
export interface SimpleArchiverSettings {
archiveFolder: string;
autoArchiveRules: AutoArchiveRule[];
autoArchiveFrequency: number;
autoArchiveStartupDelaySeconds: number;
}
export interface AutoArchiveRuntimeData {
lastAutoArchiveRunAt: number;
}
export interface ArchiveResult {
success: boolean;
message: string;
}
/**
* Interface for Obsidian's internal settings API.
* Used for type-safe access to settings functionality.
*/
export interface ObsidianInternalApis {
setting: {
open(): void;
openTabById(pluginId: string): void;
pluginTabs: unknown[];
};
}