import { type Database } from "./database.js"; export type BillingSubscriptionOperationKind = "upgrade" | "change" | "cancel"; export type BillingSubscriptionOperation = { account_id: string; operation_key: string; kind: BillingSubscriptionOperationKind; request: Record; intent: Record; result: Record | null; created_at: string; completed_at: string | null; }; /** Intent must commit before provider I/O; a caller-owned transaction/savepoint * cannot supply that guarantee. The API runs two independent org-fenced phases. */ export declare function assertBillingSubscriptionOperationRoot(db: Database): void; export declare function getBillingSubscriptionOperation(db: Database, accountId: string, operationKey: string): Promise; export declare function beginBillingSubscriptionOperation(db: Database, input: { accountId: string; operationKey: string; kind: BillingSubscriptionOperationKind; request: Record; intent: Record; }): Promise; export declare function completeBillingSubscriptionOperation(db: Database, input: { accountId: string; operationKey: string; result: Record; }): Promise;