import { type SpawnerConfig, type EntityTypeConfig } from './entity-type-config.js'; export interface ParsedEntity { filepath: string; meta: Record; content: string; } export interface SpawnResult { created: number; skipped: number; } export interface ChildSpec { title: string; fields?: Record; body?: string; } export interface CadenceDetails { dayOfMonth?: number; dayOfWeek?: string; startTime?: string; endTime?: string; location?: string; } export interface BlackoutWindow { start: string; end: string; reason?: string; } export declare function formatDate(d: Date): string; /** * Compute all occurrence dates within [start, end] for daily/weekly/monthly cadences. */ export declare function computeOccurrences(cadence: string, details: CadenceDetails, start: Date, end: Date): Date[]; /** * Returns true if the date falls inside any blackout window. */ export declare function isBlackedOut(date: Date, windows: BlackoutWindow[]): boolean; /** * Interpolate a title pattern like "{title} — {YYYY-MM-DD}" for a given date. */ export declare function interpolateTitlePattern(pattern: string, title: string, date: Date): string; /** * Build child entity fields from a FieldMapping array. * Tokens: {date} → YYYY-MM-DD string, {title} → template title */ export declare function applyFieldMapping(mappings: SpawnerConfig['fieldMapping'], template: ParsedEntity, date: Date | null): Record; /** * Generate child entities for a date-series spawner (e.g. recurrence). * Creates one child per occurrence date within [startDate, endDate]. * Idempotent: skips already-created children based on dedupeFields. */ export declare function spawnDateSeries(template: ParsedEntity, spawnerConfig: SpawnerConfig, targetTypeConfig: EntityTypeConfig, startDate: Date, endDate: Date): Promise; /** * Spawn a fixed set of child entities from a template entity. * The template entity must have a field (childrenField) containing an array of ChildSpec. * Idempotent: skips children whose title already exists in the target directory. */ export declare function spawnTemplate(template: ParsedEntity, spawnerConfig: SpawnerConfig, targetTypeConfig: EntityTypeConfig): Promise; /** * Spawn children from a template entity. * Resolves the target entity type from the spawner config, then delegates to * the appropriate spawn mode. */ export declare function spawn(template: ParsedEntity, spawnerConfig: SpawnerConfig, opts?: { startDate?: Date; endDate?: Date; }): Promise; //# sourceMappingURL=spawner.d.ts.map