/** * Storage Adapters * Multiple backend options: Memory, AgentDB, SQLite, PostgreSQL */ import { StorageAdapter, Subscription, UsageRecord, Coupon, Invoice, BillingEvent, BillingEventType } from '../types.js'; /** * In-Memory Storage Adapter (for testing and development) */ export declare class MemoryStorageAdapter implements StorageAdapter { private subscriptions; private usageRecords; private coupons; private invoices; private events; saveSubscription(subscription: Subscription): Promise; getSubscription(id: string): Promise; updateSubscription(subscription: Subscription): Promise; deleteSubscription(id: string): Promise; listSubscriptions(userId: string): Promise; saveUsageRecord(record: UsageRecord): Promise; getUsageRecords(subscriptionId: string, period: string): Promise; saveCoupon(coupon: Coupon): Promise; getCoupon(code: string): Promise; updateCoupon(coupon: Coupon): Promise; listCoupons(): Promise; saveInvoice(invoice: Invoice): Promise; getInvoice(id: string): Promise; listInvoices(userId: string): Promise; saveEvent(event: BillingEvent): Promise; getEvents(userId: string, type?: BillingEventType): Promise; clear(): void; } /** * AgentDB Storage Adapter (vector database with semantic search) */ export declare class AgentDBStorageAdapter implements StorageAdapter { private db; private collections; constructor(agentDB: any); initialize(): Promise; saveSubscription(subscription: Subscription): Promise; getSubscription(id: string): Promise; updateSubscription(subscription: Subscription): Promise; deleteSubscription(id: string): Promise; listSubscriptions(userId: string): Promise; saveUsageRecord(record: UsageRecord): Promise; getUsageRecords(subscriptionId: string, period: string): Promise; saveCoupon(coupon: Coupon): Promise; getCoupon(code: string): Promise; updateCoupon(coupon: Coupon): Promise; listCoupons(): Promise; saveInvoice(invoice: Invoice): Promise; getInvoice(id: string): Promise; listInvoices(userId: string): Promise; saveEvent(event: BillingEvent): Promise; getEvents(userId: string, type?: BillingEventType): Promise; } /** * SQLite Storage Adapter */ export declare class SQLiteStorageAdapter implements StorageAdapter { private db; constructor(dbPath: string); initialize(): Promise; saveSubscription(subscription: Subscription): Promise; getSubscription(id: string): Promise; updateSubscription(subscription: Subscription): Promise; deleteSubscription(id: string): Promise; listSubscriptions(userId: string): Promise; saveUsageRecord(record: UsageRecord): Promise; getUsageRecords(subscriptionId: string, period: string): Promise; saveCoupon(coupon: Coupon): Promise; getCoupon(code: string): Promise; updateCoupon(coupon: Coupon): Promise; listCoupons(): Promise; saveInvoice(invoice: Invoice): Promise; getInvoice(id: string): Promise; listInvoices(userId: string): Promise; saveEvent(event: BillingEvent): Promise; getEvents(userId: string, type?: BillingEventType): Promise; } /** * Storage Adapter Factory */ export declare class StorageAdapterFactory { static createMemory(): MemoryStorageAdapter; static createAgentDB(agentDB: any): AgentDBStorageAdapter; static createSQLite(dbPath: string): SQLiteStorageAdapter; } //# sourceMappingURL=adapters.d.ts.map