/** * Append-only JSONL persistence for the call ledger. Each line is one * {@link CallRecord} as JSON. Writes are serialized through a promise tail so * concurrent event appends cannot interleave partial lines; the service flushes * the tail on dispose. * @module @dsh-usage-meter/usage/store */ import type { CallRecord } from './types.ts'; /** Parse one JSONL line into a record; unknown or malformed lines are dropped. */ export declare function parseRecord(line: string): CallRecord | null; /** JSONL call-ledger store. */ export declare class JsonlUsageStore { private readonly file; private tail; /** * @param file - absolute path of the ledger file. */ constructor(file: string); /** * Read and parse every valid record in the ledger. * @returns the persisted records; an absent file yields an empty list. */ load(): Promise; /** * Append one record, serialized behind every earlier append. * @param record - the record to persist. * @returns a promise settling when this record (and every earlier one) is on disk. */ append(record: CallRecord): Promise; /** Await every queued append. */ flush(): Promise; } //# sourceMappingURL=store.d.ts.map