import { AuthOptions } from './authOptions'; import { AuthResult } from './authResult'; import { HttpClient } from './httpClient'; import { IdentityEventManager } from './identityEventManager'; import { ApiClientConfig } from './main'; import OAuthClient from './oAuthClient'; import { DeviceCredential, InternalLoginWithWebAuthnParams, InternalSignupWithWebAuthnParams } from './webAuthnService'; type EmailResetPasskeysParams = { email: string; verificationCode: string; clientId: string; friendlyName?: string; }; type SmsResetPasskeysParams = { phoneNumber: string; verificationCode: string; clientId: string; friendlyName?: string; }; export type ResetPasskeysParams = EmailResetPasskeysParams | SmsResetPasskeysParams; export type InternalResetPasskeysParams = { webAuthnOrigin?: string; } & ResetPasskeysParams; /** * Identity Rest API Client */ export default class WebAuthnClient { private config; private http; private eventManager; private oAuthClient; private authenticationOptionsUrl; private authenticationUrl; private registrationOptionsUrl; private registrationUrl; private resetPasskeysOptionsUrl; private resetPasskeysUrl; private signupOptionsUrl; private signupUrl; constructor(props: { config: ApiClientConfig; http: HttpClient; eventManager: IdentityEventManager; oAuthClient: OAuthClient; }); isPublicKeyCredential(credentials: Credential): credentials is PublicKeyCredential; addNewWebAuthnDevice(accessToken: string, friendlyName?: string, webAuthnOrigin?: string): Promise; resetPasskeys(params: InternalResetPasskeysParams): Promise; listWebAuthnDevices(accessToken: string): Promise; private isDiscoverable; private buildWebAuthnParams; loginWithWebAuthn(params: InternalLoginWithWebAuthnParams): Promise; removeWebAuthnDevice(accessToken: string, deviceId: string): Promise; signupWithWebAuthn(params: InternalSignupWithWebAuthnParams, auth?: AuthOptions): Promise; } export {};