/** * Cloudflare D1 Store Implementations * * Production-ready stores using D1 SQLite database */ import type { Tenant, User, Membership, PhotonGrant, ElicitationRequest } from '../types/index.js'; import type { TenantStore } from '../middleware/tenant.js'; import type { UserStore, MembershipStore } from '../middleware/auth.js'; import type { ElicitationStore, GrantStore } from '../auth/oauth.js'; import type { D1Client } from './d1-client.js'; export declare class D1TenantStore implements TenantStore { private db; constructor(db: D1Client); findBySlug(slug: string): Promise; findByCustomDomain(domain: string): Promise; findById(id: string): Promise; create(tenant: Omit): Promise; update(id: string, data: Partial): Promise; delete(id: string): Promise; private rowToTenant; } export declare class D1UserStore implements UserStore { private db; constructor(db: D1Client); findById(id: string): Promise; findByEmail(email: string): Promise; create(user: Omit): Promise; update(id: string, data: Partial): Promise; private rowToUser; } export declare class D1MembershipStore implements MembershipStore { private db; constructor(db: D1Client); find(tenantId: string, userId: string): Promise; findByUser(userId: string): Promise; findByTenant(tenantId: string): Promise; create(membership: Omit): Promise; update(tenantId: string, userId: string, data: Partial): Promise; delete(tenantId: string, userId: string): Promise; private rowToMembership; } export declare class D1GrantStore implements GrantStore { private db; constructor(db: D1Client); find(tenantId: string, photonId: string, provider: string, userId?: string): Promise; create(grant: Omit): Promise; update(id: string, data: Partial): Promise; delete(id: string): Promise; findByUser(tenantId: string, userId: string): Promise; private rowToGrant; } export declare class D1ElicitationStore implements ElicitationStore { private db; constructor(db: D1Client); create(data: Omit): Promise; get(id: string): Promise; update(id: string, data: Partial): Promise; delete(id: string): Promise; cleanup(): Promise; private rowToElicitation; } //# sourceMappingURL=d1-stores.d.ts.map