import { NotificationsStorage } from '@mastra/core/storage'; import type { CreateIndexOptions, CreateNotificationInput, ListDueNotificationsInput, ListNotificationsInput, NotificationRecord, NotificationStatus, UpdateNotificationInput, PruneOptions, PruneResult, RetentionTablesDescriptor, TableRetentionPolicy } from '@mastra/core/storage'; import type { PgDomainConfig } from '../../db/index.js'; export declare class NotificationsPG extends NotificationsStorage { #private; static readonly MANAGED_TABLES: readonly ["mastra_notifications"]; /** * Notifications are an append-only event feed that grows unbounded. Single * table, anchored on the timezone-aware `createdAtZ` mirror column. */ static readonly retentionTables: RetentionTablesDescriptor; constructor(config: PgDomainConfig); init(): Promise; /** * Lazily ensures a btree index exists on each configured policy's retention * anchor column so age-based `prune()` deletes stay fast on large tables. * Called from the prune path (not init) so only deployments that configure * retention pay the index's write/disk overhead. Best-effort: failures are * logged and pruning proceeds (correct, just slower). * Created even with `skipDefaultIndexes` — retention is an explicit opt-in, * so its supporting index is not part of the default index set. */ private ensureRetentionIndexes; /** Delete notifications older than the `notifications` policy's `maxAge`, batched. */ prune(policies: Record, options?: PruneOptions): Promise; static getDefaultIndexDefs(schemaPrefix: string): CreateIndexOptions[]; static getExportDDL(schemaName?: string): string[]; getDefaultIndexDefinitions(): CreateIndexOptions[]; createDefaultIndexes(): Promise; createCustomIndexes(): Promise; dangerouslyClearAll(): Promise; private updateNotificationRow; createNotification(input: CreateNotificationInput): Promise; listNotifications(input: ListNotificationsInput): Promise; listDueNotifications(input: ListDueNotificationsInput): Promise; getNotification(input: { threadId: string; id: string; }): Promise; updateNotification(input: UpdateNotificationInput): Promise; updateNotificationsStatus(input: { threadId: string; ids: string[]; status: NotificationStatus; }): Promise; private findCoalescable; } //# sourceMappingURL=index.d.ts.map