import type { Database } from "@opengeni/db"; import { prepareOrganizationRecoveryNotifications, settleOrganizationRecoveryNotification, type OrganizationRecoveryNotificationClaim, type OrganizationRecoveryNotificationSettlement } from "@opengeni/db"; export type OrganizationRecoveryNotificationDeliveryResult = { status: "sent"; providerMessageId: string | null; } | { status: "failed"; errorClass: string; } | { status: "outcome_unknown"; }; export interface OrganizationRecoveryNotificationTransport { readonly provider: string; send(claim: OrganizationRecoveryNotificationClaim): Promise; } export type OrganizationRecoveryNotificationLifecycle = { prepare: typeof prepareOrganizationRecoveryNotifications; settle: typeof settleOrganizationRecoveryNotification; }; export declare function dispatchOrganizationRecoveryNotifications(input: { db: Database; transport: OrganizationRecoveryNotificationTransport; claimOwner: string; limit?: number; leaseSeconds?: number; lifecycle?: OrganizationRecoveryNotificationLifecycle; }): Promise; export declare class InMemoryOrganizationRecoveryNotificationTransport implements OrganizationRecoveryNotificationTransport { readonly provider = "fake"; readonly attempts: Array<{ idempotencyKey: string; payloadDigest: string; recipientCanonicalIdentityId: string; providerMessageId: string; }>; private readonly deliveries; private readonly scripted; enqueue(...results: OrganizationRecoveryNotificationDeliveryResult[]): void; logicalDeliveryCount(): number; send(claim: OrganizationRecoveryNotificationClaim): Promise; }