import { SmrtCollection } from '@happyvertical/smrt-core'; import { EarningEvent } from '../models/EarningEvent.js'; import { EarningEventOptions } from '../types.js'; export declare class EarningEventCollection extends SmrtCollection { static readonly _itemClass: typeof EarningEvent; /** Look up an event by its idempotency natural key. */ findByDedupeKey(dedupeKey: string): Promise; /** * Idempotent ingestion: if an event with `options.dedupeKey` already * exists, return it untouched (`created: false`) — evidence is immutable, * so a replay never updates the stored row. Otherwise create the event. * * `dedupeKey` is required — callers embed tenant/source identity in it * (e.g. `` `${tenantId}:${sourceKind}:${sourceId}:${eventKind}` ``); * an empty key would silently disable idempotency, so it throws instead. */ getOrCreateByDedupeKey(options: EarningEventOptions): Promise<{ event: EarningEvent; created: boolean; }>; /** Events for one generic earning source, newest occurrence first. */ findBySource(sourceKind: string, sourceId: string): Promise; /** Events by kind, newest occurrence first. */ findByKind(eventKind: string): Promise; } export default EarningEventCollection; //# sourceMappingURL=EarningEventCollection.d.ts.map