import { type Database } from "../database.js"; /** * The request-local account:admin proof the API's access resolver mints for an * authenticated account administrator (the core access layer's * `AccountAdminAuthorizationStamp`). The database checks it against the * transaction's own account and subject before it records anything (1103). */ export type SubscriptionAccountAdministratorStamp = Readonly<{ authorizationId: string; accountId: string; actorSubjectId: string; permission: "account:admin"; }>; /** * Resolves the current request's account:admin proof for one account and * subject, or null when the request holds none. Installed per request by the * API; background work runs without one. */ export type SubscriptionAccountAdministratorResolver = (input: { accountId: string; subjectId: string; }) => Promise; /** Run `fn` with this request's account-administrator resolver. */ export declare function withSubscriptionAccountAdministrators(resolver: SubscriptionAccountAdministratorResolver, fn: () => Promise): Promise; /** * Set the acting subject of a subscription administration transaction and, * when the request proves account:admin for exactly this account and subject, * record that authority for the transaction so subscription_organization_admin() * and the subscription write policies recognise it. Organization membership * administrators need no record. Returns whether this transaction now holds * account administration from the request's proof (not from a membership). */ export declare function setSubscriptionAdministrationSubject(tx: Database, input: { accountId: string; subjectId: string; }): Promise; /** * `setSubscriptionAdministrationSubject` for a transaction whose subject is * already set (for example by `withWorkspaceSubjectRls`). */ export declare function recordSubscriptionAccountAdministrator(tx: Database, input: { accountId: string; subjectId: string; }): Promise;