UNPKG

@agility/cli

Version:

Agility CLI for working with your content. (Public Beta)

77 lines (76 loc) 3.02 kB
/** * Timestamp tracking system for incremental pull operations * * Stores last successful pull timestamps per entity type to enable * incremental downloading of only changed entities. */ export interface LastPullTimestamps { models?: string; containers?: string; content?: string; assets?: string; pages?: string; galleries?: string; templates?: string; } /** * Load last pull timestamps for an instance * @param guid Instance GUID * @param rootPath Root path (e.g., "agility-files") * @returns LastPullTimestamps object or empty object if file doesn't exist */ export declare function loadLastPullTimestamps(guid: string, rootPath: string): LastPullTimestamps; /** * Save last pull timestamps for an instance * @param guid Instance GUID * @param rootPath Root path (e.g., "agility-files") * @param timestamps Timestamps to save */ export declare function saveLastPullTimestamps(guid: string, rootPath: string, timestamps: LastPullTimestamps): void; /** * Update timestamp for a specific entity type * @param guid Instance GUID * @param rootPath Root path (e.g., "agility-files") * @param entityType Entity type to update * @param timestamp ISO 8601 timestamp */ export declare function updateEntityTypeTimestamp(guid: string, rootPath: string, entityType: string, timestamp: string): void; /** * Get the last pull timestamp for a specific entity type * @param guid Instance GUID * @param rootPath Root path (e.g., "agility-files") * @param entityType Entity type to check * @returns ISO 8601 timestamp or null if no previous pull */ export declare function getLastPullTimestamp(guid: string, rootPath: string, entityType: string): string | null; /** * Check if an entity has been modified since the last pull * @param entityModifiedDate Entity's modified date (ISO 8601) * @param lastPullTimestamp Last pull timestamp (ISO 8601) or null * @returns true if entity was modified since last pull, false otherwise */ export declare function isEntityModifiedSinceLastPull(entityModifiedDate: string | null, lastPullTimestamp: string | null): boolean; /** * Mark the start of a pull operation with current timestamp * @returns Current ISO 8601 timestamp */ export declare function markPullStart(): string; /** * Mark the start of a push operation with current timestamp * @returns Current ISO 8601 timestamp */ export declare function markPushStart(): string; /** * Clear all timestamps for an instance (used with --reset flag) * @param guid Instance GUID * @param rootPath Root path (e.g., "agility-files") */ export declare function clearTimestamps(guid: string, rootPath: string): void; /** * Get incremental pull decision for an entity type * @param guid Instance GUID * @param rootPath Root path (e.g., "agility-files") * @param entityType Entity type to check * @returns "incremental" | "full" | "skip" */ export declare function getIncrementalPullDecision(guid: string, rootPath: string, entityType: string): "incremental" | "full" | "skip";