import { type Client } from '@did-plc/lib'; import { type Keypair } from '@atproto/crypto'; import { type HandleString } from '@atproto/lex'; import type { Account, AccountStore, AuthenticateAccountData, AuthorizedClientData, AuthorizedClients, ClientId, Code, DeactivateAccountData, DeleteAccountConfirmInput, DeleteAccountRequestInput, DeviceAccount, DeviceData, DeviceId, DeviceStore, Did, FoundRequestResult, LexiconData, LexiconStore, NewTokenData, ReactivateAccountData, RefreshToken, RequestData, RequestId, RequestStore, ResetPasswordConfirmInput, ResetPasswordRequestInput, SignUpData, TokenData, TokenId, TokenInfo, TokenStore, UpdateEmailConfirmInput, UpdateEmailRequestInput, UpdateEmailRequestOutput, UpdateHandleData, UpdateRequestData, VerifyEmailConfirmInput, VerifyEmailRequestInput } from '@atproto/oauth-provider/store'; import type { ActorStore } from '../actor-store/actor-store.js'; import type { BackgroundQueue } from '../background.js'; import type { ImageUrlBuilder } from '../image/image-url-builder.js'; import type { ServerMailer } from '../mailer/index.js'; import type { Sequencer } from '../sequencer/index.js'; import { type AccountManager } from './account-manager.js'; /** * 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; authenticateAccount({ locale: _locale, username: identifier, password, emailOtp, }: AuthenticateAccountData): Promise; setAuthorizedClient(did: Did, clientId: ClientId, data: AuthorizedClientData): Promise; getAccount(did: Did): Promise<{ account: Account; authorizedClients: AuthorizedClients; }>; upsertDeviceAccount(deviceId: DeviceId, sub: string): Promise; getDeviceAccount(deviceId: DeviceId, did: Did): Promise; removeDeviceAccount(deviceId: DeviceId, did: Did): Promise; listDeviceAccounts(filter: { did: Did; } | { deviceId: DeviceId; }): Promise; resetPasswordRequest({ email, locale, }: ResetPasswordRequestInput): Promise; resetPasswordConfirm(data: ResetPasswordConfirmInput): Promise; verifyHandleAvailability(handle: HandleString): Promise; createRequest(id: RequestId, data: RequestData): Promise; readRequest(id: RequestId): Promise; updateRequest(id: RequestId, data: UpdateRequestData): Promise; deleteRequest(id: RequestId): Promise; consumeRequestCode(code: Code): Promise; createDevice(deviceId: DeviceId, data: DeviceData): Promise; readDevice(deviceId: DeviceId): Promise; updateDevice(deviceId: DeviceId, data: Partial): Promise; deleteDevice(deviceId: DeviceId): Promise; findLexicon(nsid: string): Promise; storeLexicon(nsid: string, data: LexiconData): Promise; deleteLexicon(nsid: string): Promise; createToken(id: TokenId, data: TokenData, refreshToken?: RefreshToken): Promise; listAccountTokens(did: Did): Promise; readToken(tokenId: TokenId): Promise; deleteToken(tokenId: TokenId): Promise; rotateToken(tokenId: TokenId, newTokenId: TokenId, newRefreshToken: RefreshToken, newData: NewTokenData): Promise; findTokenByRefreshToken(refreshToken: RefreshToken): Promise; findTokenByCode(code: Code): Promise; verifyEmailRequest({ did, locale, }: VerifyEmailRequestInput): Promise; verifyEmailConfirm({ did, email, token, }: VerifyEmailConfirmInput): Promise; updateEmailRequest({ did, locale, }: UpdateEmailRequestInput): Promise; updateEmailConfirm({ did, token, email, locale, }: UpdateEmailConfirmInput): Promise; updateHandle({ did, handle }: UpdateHandleData): Promise; deactivateAccount({ did, deleteAfter, }: DeactivateAccountData): Promise; reactivateAccount({ did }: ReactivateAccountData): Promise; deleteAccountRequest({ did, locale, }: DeleteAccountRequestInput): Promise; deleteAccountConfirm({ did, token, password, }: DeleteAccountConfirmInput): Promise; private toTokenInfo; private buildAccount; } //# sourceMappingURL=oauth-store.d.ts.map