/** * StrictDB — Automatic Timestamp Injection * * Pure utility functions for injecting created_at / updated_at timestamps. * Immutable — always returns new objects, never mutates input. */ import type { TimestampFieldNames } from './types.js'; export interface ResolvedTimestampConfig { enabled: boolean; createdAt: string; updatedAt: string; } /** * Resolve user-provided timestamp config into a normalized form. */ export declare function resolveTimestampConfig(config?: boolean | TimestampFieldNames): ResolvedTimestampConfig; /** * Inject created_at and updated_at into an insert document. * User-provided values are preserved (never overwritten). */ export declare function injectInsertTimestamps>(doc: T, config: ResolvedTimestampConfig, now?: Date): T; /** * Inject updated_at into an update operation's $set. * User-provided values in $set are preserved. Never adds created_at on updates. */ export declare function injectUpdateTimestamps>(update: T, config: ResolvedTimestampConfig, now?: Date): T; //# sourceMappingURL=timestamps.d.ts.map