import { Client } from '@did-plc/lib';
import { Keypair } from '@atproto/crypto';
import { Account, AccountStore, AuthenticateAccountData, AuthorizedClientData, AuthorizedClients, ClientId, Code, DeviceAccount, DeviceData, DeviceId, DeviceStore, FoundRequestResult, LexiconData, LexiconStore, NewTokenData, RefreshToken, RequestData, RequestId, RequestStore, ResetPasswordConfirmInput, ResetPasswordRequestInput, SignUpData, Sub, TokenData, TokenId, TokenInfo, TokenStore, UpdateRequestData } from '@atproto/oauth-provider';
import { ActorStore } from '../actor-store/actor-store';
import { BackgroundQueue } from '../background';
import { ImageUrlBuilder } from '../image/image-url-builder';
import { ServerMailer } from '../mailer';
import { Sequencer } from '../sequencer';
import { AccountManager } from './account-manager';
/**
 * This class' purpose is to implement the interface needed by the OAuthProvider
 * to interact with the account database (through the {@link AccountManager}).
 *
 * @note The use of this class assumes that there is no entryway.
 */
export declare class OAuthStore implements AccountStore, RequestStore, DeviceStore, LexiconStore, TokenStore {
    private readonly accountManager;
    private readonly actorStore;
    private readonly imageUrlBuilder;
    private readonly backgroundQueue;
    private readonly mailer;
    private readonly sequencer;
    private readonly plcClient;
    private readonly plcRotationKey;
    private readonly publicUrl;
    private readonly recoveryDidKey;
    constructor(accountManager: AccountManager, actorStore: ActorStore, imageUrlBuilder: ImageUrlBuilder, backgroundQueue: BackgroundQueue, mailer: ServerMailer, sequencer: Sequencer, plcClient: Client, plcRotationKey: Keypair, publicUrl: string, recoveryDidKey: string | null);
    private get db();
    private get serviceDid();
    private verifyEmailAvailability;
    private verifyInviteCode;
    createAccount({ locale: _locale, inviteCode, handle, email, password, }: SignUpData): Promise<Account>;
    authenticateAccount({ locale: _locale, username: identifier, password, emailOtp, }: AuthenticateAccountData): Promise<Account>;
    setAuthorizedClient(sub: Sub, clientId: ClientId, data: AuthorizedClientData): Promise<void>;
    getAccount(sub: Sub): Promise<{
        account: Account;
        authorizedClients: AuthorizedClients;
    }>;
    upsertDeviceAccount(deviceId: DeviceId, sub: string): Promise<void>;
    getDeviceAccount(deviceId: DeviceId, sub: string): Promise<DeviceAccount | null>;
    removeDeviceAccount(deviceId: DeviceId, sub: Sub): Promise<void>;
    listDeviceAccounts(filter: {
        sub: Sub;
    } | {
        deviceId: DeviceId;
    }): Promise<DeviceAccount[]>;
    resetPasswordRequest({ locale: _locale, email, }: ResetPasswordRequestInput): Promise<Account | null>;
    resetPasswordConfirm(data: ResetPasswordConfirmInput): Promise<Account | null>;
    verifyHandleAvailability(handle: string): Promise<void>;
    createRequest(id: RequestId, data: RequestData): Promise<void>;
    readRequest(id: RequestId): Promise<RequestData | null>;
    updateRequest(id: RequestId, data: UpdateRequestData): Promise<void>;
    deleteRequest(id: RequestId): Promise<void>;
    consumeRequestCode(code: Code): Promise<FoundRequestResult | null>;
    createDevice(deviceId: DeviceId, data: DeviceData): Promise<void>;
    readDevice(deviceId: DeviceId): Promise<null | DeviceData>;
    updateDevice(deviceId: DeviceId, data: Partial<DeviceData>): Promise<void>;
    deleteDevice(deviceId: DeviceId): Promise<void>;
    findLexicon(nsid: string): Promise<LexiconData | null>;
    storeLexicon(nsid: string, data: LexiconData): Promise<void>;
    deleteLexicon(nsid: string): Promise<void>;
    createToken(id: TokenId, data: TokenData, refreshToken?: RefreshToken): Promise<void>;
    listAccountTokens(sub: Sub): Promise<TokenInfo[]>;
    readToken(tokenId: TokenId): Promise<TokenInfo | null>;
    deleteToken(tokenId: TokenId): Promise<void>;
    rotateToken(tokenId: TokenId, newTokenId: TokenId, newRefreshToken: RefreshToken, newData: NewTokenData): Promise<void>;
    findTokenByRefreshToken(refreshToken: RefreshToken): Promise<TokenInfo | null>;
    findTokenByCode(code: Code): Promise<TokenInfo | null>;
    private toTokenInfo;
    private buildAccount;
}
//# sourceMappingURL=oauth-store.d.ts.map