From 4583e82c73eac2d6cc25876ecf800660d16001a4 Mon Sep 17 00:00:00 2001 From: Daniel La Rocque Date: Thu, 16 May 2024 11:27:26 -0400 Subject: [PATCH] Generate dts rollups for auth webextension and cordova --- common/api-review/auth-cordova.api.md | 833 ++++++++++++++++++ common/api-review/auth-web-extension.api.md | 508 +++++++++++ packages/auth/cordova/api-extractor.json | 9 + packages/auth/cordova/package.json | 2 +- packages/auth/package.json | 2 +- .../auth/web-extension/api-extractor.json | 9 + packages/auth/web-extension/package.json | 2 +- 7 files changed, 1362 insertions(+), 3 deletions(-) create mode 100644 common/api-review/auth-cordova.api.md create mode 100644 common/api-review/auth-web-extension.api.md create mode 100644 packages/auth/cordova/api-extractor.json create mode 100644 packages/auth/web-extension/api-extractor.json diff --git a/common/api-review/auth-cordova.api.md b/common/api-review/auth-cordova.api.md new file mode 100644 index 00000000000..576b9e4df47 --- /dev/null +++ b/common/api-review/auth-cordova.api.md @@ -0,0 +1,833 @@ +## API Report File for "@firebase/auth-cordova" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { CompleteFn } from '@firebase/util'; +import { ErrorFactory } from '@firebase/util'; +import { ErrorFn } from '@firebase/util'; +import { FirebaseApp } from '@firebase/app'; +import { FirebaseError } from '@firebase/util'; +import { NextFn } from '@firebase/util'; +import { Observer } from '@firebase/util'; +import { Unsubscribe } from '@firebase/util'; + +// @public +export interface ActionCodeInfo { + data: { + email?: string | null; + multiFactorInfo?: MultiFactorInfo | null; + previousEmail?: string | null; + }; + operation: (typeof ActionCodeOperation)[keyof typeof ActionCodeOperation]; +} + +// @public +export const ActionCodeOperation: { + readonly EMAIL_SIGNIN: "EMAIL_SIGNIN"; + readonly PASSWORD_RESET: "PASSWORD_RESET"; + readonly RECOVER_EMAIL: "RECOVER_EMAIL"; + readonly REVERT_SECOND_FACTOR_ADDITION: "REVERT_SECOND_FACTOR_ADDITION"; + readonly VERIFY_AND_CHANGE_EMAIL: "VERIFY_AND_CHANGE_EMAIL"; + readonly VERIFY_EMAIL: "VERIFY_EMAIL"; +}; + +// @public +export interface ActionCodeSettings { + android?: { + installApp?: boolean; + minimumVersion?: string; + packageName: string; + }; + dynamicLinkDomain?: string; + handleCodeInApp?: boolean; + iOS?: { + bundleId: string; + }; + url: string; +} + +// @public +export class ActionCodeURL { + // @internal + constructor(actionLink: string); + readonly apiKey: string; + readonly code: string; + readonly continueUrl: string | null; + readonly languageCode: string | null; + readonly operation: string; + static parseLink(link: string): ActionCodeURL | null; + readonly tenantId: string | null; +} + +// @public +export interface AdditionalUserInfo { + readonly isNewUser: boolean; + readonly profile: Record | null; + readonly providerId: string | null; + readonly username?: string | null; +} + +// @public +export interface ApplicationVerifier { + readonly type: string; + verify(): Promise; +} + +// @public +export function applyActionCode(auth: Auth, oobCode: string): Promise; + +// @public +export interface Auth { + readonly app: FirebaseApp; + authStateReady(): Promise; + beforeAuthStateChanged(callback: (user: User | null) => void | Promise, onAbort?: () => void): Unsubscribe; + readonly config: Config; + readonly currentUser: User | null; + readonly emulatorConfig: EmulatorConfig | null; + languageCode: string | null; + readonly name: string; + onAuthStateChanged(nextOrObserver: NextOrObserver, error?: ErrorFn, completed?: CompleteFn): Unsubscribe; + onIdTokenChanged(nextOrObserver: NextOrObserver, error?: ErrorFn, completed?: CompleteFn): Unsubscribe; + setPersistence(persistence: Persistence): Promise; + readonly settings: AuthSettings; + signOut(): Promise; + tenantId: string | null; + updateCurrentUser(user: User | null): Promise; + useDeviceLanguage(): void; +} + +// @public +export class AuthCredential { + // @internal + protected constructor( + providerId: string, + signInMethod: string); + // Warning: (ae-forgotten-export) The symbol "AuthInternal" needs to be exported by the entry point index.cordova.d.ts + // Warning: (ae-forgotten-export) The symbol "PhoneOrOauthTokenResponse" needs to be exported by the entry point index.cordova.d.ts + // + // @internal (undocumented) + _getIdTokenResponse(_auth: AuthInternal): Promise; + // @internal (undocumented) + _getReauthenticationResolver(_auth: AuthInternal): Promise; + // Warning: (ae-forgotten-export) The symbol "IdTokenResponse" needs to be exported by the entry point index.cordova.d.ts + // + // @internal (undocumented) + _linkToIdToken(_auth: AuthInternal, _idToken: string): Promise; + readonly providerId: string; + readonly signInMethod: string; + toJSON(): object; +} + +// @public +export interface AuthError extends FirebaseError { + readonly customData: { + readonly appName: string; + readonly email?: string; + readonly phoneNumber?: string; + readonly tenantId?: string; + }; +} + +// @public +export const AuthErrorCodes: { + readonly ADMIN_ONLY_OPERATION: "auth/admin-restricted-operation"; + readonly ARGUMENT_ERROR: "auth/argument-error"; + readonly APP_NOT_AUTHORIZED: "auth/app-not-authorized"; + readonly APP_NOT_INSTALLED: "auth/app-not-installed"; + readonly CAPTCHA_CHECK_FAILED: "auth/captcha-check-failed"; + readonly CODE_EXPIRED: "auth/code-expired"; + readonly CORDOVA_NOT_READY: "auth/cordova-not-ready"; + readonly CORS_UNSUPPORTED: "auth/cors-unsupported"; + readonly CREDENTIAL_ALREADY_IN_USE: "auth/credential-already-in-use"; + readonly CREDENTIAL_MISMATCH: "auth/custom-token-mismatch"; + readonly CREDENTIAL_TOO_OLD_LOGIN_AGAIN: "auth/requires-recent-login"; + readonly DEPENDENT_SDK_INIT_BEFORE_AUTH: "auth/dependent-sdk-initialized-before-auth"; + readonly DYNAMIC_LINK_NOT_ACTIVATED: "auth/dynamic-link-not-activated"; + readonly EMAIL_CHANGE_NEEDS_VERIFICATION: "auth/email-change-needs-verification"; + readonly EMAIL_EXISTS: "auth/email-already-in-use"; + readonly EMULATOR_CONFIG_FAILED: "auth/emulator-config-failed"; + readonly EXPIRED_OOB_CODE: "auth/expired-action-code"; + readonly EXPIRED_POPUP_REQUEST: "auth/cancelled-popup-request"; + readonly INTERNAL_ERROR: "auth/internal-error"; + readonly INVALID_API_KEY: "auth/invalid-api-key"; + readonly INVALID_APP_CREDENTIAL: "auth/invalid-app-credential"; + readonly INVALID_APP_ID: "auth/invalid-app-id"; + readonly INVALID_AUTH: "auth/invalid-user-token"; + readonly INVALID_AUTH_EVENT: "auth/invalid-auth-event"; + readonly INVALID_CERT_HASH: "auth/invalid-cert-hash"; + readonly INVALID_CODE: "auth/invalid-verification-code"; + readonly INVALID_CONTINUE_URI: "auth/invalid-continue-uri"; + readonly INVALID_CORDOVA_CONFIGURATION: "auth/invalid-cordova-configuration"; + readonly INVALID_CUSTOM_TOKEN: "auth/invalid-custom-token"; + readonly INVALID_DYNAMIC_LINK_DOMAIN: "auth/invalid-dynamic-link-domain"; + readonly INVALID_EMAIL: "auth/invalid-email"; + readonly INVALID_EMULATOR_SCHEME: "auth/invalid-emulator-scheme"; + readonly INVALID_IDP_RESPONSE: "auth/invalid-credential"; + readonly INVALID_LOGIN_CREDENTIALS: "auth/invalid-credential"; + readonly INVALID_MESSAGE_PAYLOAD: "auth/invalid-message-payload"; + readonly INVALID_MFA_SESSION: "auth/invalid-multi-factor-session"; + readonly INVALID_OAUTH_CLIENT_ID: "auth/invalid-oauth-client-id"; + readonly INVALID_OAUTH_PROVIDER: "auth/invalid-oauth-provider"; + readonly INVALID_OOB_CODE: "auth/invalid-action-code"; + readonly INVALID_ORIGIN: "auth/unauthorized-domain"; + readonly INVALID_PASSWORD: "auth/wrong-password"; + readonly INVALID_PERSISTENCE: "auth/invalid-persistence-type"; + readonly INVALID_PHONE_NUMBER: "auth/invalid-phone-number"; + readonly INVALID_PROVIDER_ID: "auth/invalid-provider-id"; + readonly INVALID_RECIPIENT_EMAIL: "auth/invalid-recipient-email"; + readonly INVALID_SENDER: "auth/invalid-sender"; + readonly INVALID_SESSION_INFO: "auth/invalid-verification-id"; + readonly INVALID_TENANT_ID: "auth/invalid-tenant-id"; + readonly MFA_INFO_NOT_FOUND: "auth/multi-factor-info-not-found"; + readonly MFA_REQUIRED: "auth/multi-factor-auth-required"; + readonly MISSING_ANDROID_PACKAGE_NAME: "auth/missing-android-pkg-name"; + readonly MISSING_APP_CREDENTIAL: "auth/missing-app-credential"; + readonly MISSING_AUTH_DOMAIN: "auth/auth-domain-config-required"; + readonly MISSING_CODE: "auth/missing-verification-code"; + readonly MISSING_CONTINUE_URI: "auth/missing-continue-uri"; + readonly MISSING_IFRAME_START: "auth/missing-iframe-start"; + readonly MISSING_IOS_BUNDLE_ID: "auth/missing-ios-bundle-id"; + readonly MISSING_OR_INVALID_NONCE: "auth/missing-or-invalid-nonce"; + readonly MISSING_MFA_INFO: "auth/missing-multi-factor-info"; + readonly MISSING_MFA_SESSION: "auth/missing-multi-factor-session"; + readonly MISSING_PHONE_NUMBER: "auth/missing-phone-number"; + readonly MISSING_SESSION_INFO: "auth/missing-verification-id"; + readonly MODULE_DESTROYED: "auth/app-deleted"; + readonly NEED_CONFIRMATION: "auth/account-exists-with-different-credential"; + readonly NETWORK_REQUEST_FAILED: "auth/network-request-failed"; + readonly NULL_USER: "auth/null-user"; + readonly NO_AUTH_EVENT: "auth/no-auth-event"; + readonly NO_SUCH_PROVIDER: "auth/no-such-provider"; + readonly OPERATION_NOT_ALLOWED: "auth/operation-not-allowed"; + readonly OPERATION_NOT_SUPPORTED: "auth/operation-not-supported-in-this-environment"; + readonly POPUP_BLOCKED: "auth/popup-blocked"; + readonly POPUP_CLOSED_BY_USER: "auth/popup-closed-by-user"; + readonly PROVIDER_ALREADY_LINKED: "auth/provider-already-linked"; + readonly QUOTA_EXCEEDED: "auth/quota-exceeded"; + readonly REDIRECT_CANCELLED_BY_USER: "auth/redirect-cancelled-by-user"; + readonly REDIRECT_OPERATION_PENDING: "auth/redirect-operation-pending"; + readonly REJECTED_CREDENTIAL: "auth/rejected-credential"; + readonly SECOND_FACTOR_ALREADY_ENROLLED: "auth/second-factor-already-in-use"; + readonly SECOND_FACTOR_LIMIT_EXCEEDED: "auth/maximum-second-factor-count-exceeded"; + readonly TENANT_ID_MISMATCH: "auth/tenant-id-mismatch"; + readonly TIMEOUT: "auth/timeout"; + readonly TOKEN_EXPIRED: "auth/user-token-expired"; + readonly TOO_MANY_ATTEMPTS_TRY_LATER: "auth/too-many-requests"; + readonly UNAUTHORIZED_DOMAIN: "auth/unauthorized-continue-uri"; + readonly UNSUPPORTED_FIRST_FACTOR: "auth/unsupported-first-factor"; + readonly UNSUPPORTED_PERSISTENCE: "auth/unsupported-persistence-type"; + readonly UNSUPPORTED_TENANT_OPERATION: "auth/unsupported-tenant-operation"; + readonly UNVERIFIED_EMAIL: "auth/unverified-email"; + readonly USER_CANCELLED: "auth/user-cancelled"; + readonly USER_DELETED: "auth/user-not-found"; + readonly USER_DISABLED: "auth/user-disabled"; + readonly USER_MISMATCH: "auth/user-mismatch"; + readonly USER_SIGNED_OUT: "auth/user-signed-out"; + readonly WEAK_PASSWORD: "auth/weak-password"; + readonly WEB_STORAGE_UNSUPPORTED: "auth/web-storage-unsupported"; + readonly ALREADY_INITIALIZED: "auth/already-initialized"; + readonly RECAPTCHA_NOT_ENABLED: "auth/recaptcha-not-enabled"; + readonly MISSING_RECAPTCHA_TOKEN: "auth/missing-recaptcha-token"; + readonly INVALID_RECAPTCHA_TOKEN: "auth/invalid-recaptcha-token"; + readonly INVALID_RECAPTCHA_ACTION: "auth/invalid-recaptcha-action"; + readonly MISSING_CLIENT_TYPE: "auth/missing-client-type"; + readonly MISSING_RECAPTCHA_VERSION: "auth/missing-recaptcha-version"; + readonly INVALID_RECAPTCHA_VERSION: "auth/invalid-recaptcha-version"; + readonly INVALID_REQ_TYPE: "auth/invalid-req-type"; +}; + +// @public +export interface AuthErrorMap { +} + +// @public +export interface AuthProvider { + readonly providerId: string; +} + +// @public +export interface AuthSettings { + appVerificationDisabledForTesting: boolean; +} + +// @public +export function beforeAuthStateChanged(auth: Auth, callback: (user: User | null) => void | Promise, onAbort?: () => void): Unsubscribe; + +// @public +export const browserLocalPersistence: Persistence; + +// @public +export const browserSessionPersistence: Persistence; + +// @public +export function checkActionCode(auth: Auth, oobCode: string): Promise; + +export { CompleteFn } + +// @public +export interface Config { + apiHost: string; + apiKey: string; + apiScheme: string; + authDomain?: string; + sdkClientVersion: string; + tokenApiHost: string; +} + +// @public +export interface ConfirmationResult { + confirm(verificationCode: string): Promise; + readonly verificationId: string; +} + +// @public +export function confirmPasswordReset(auth: Auth, oobCode: string, newPassword: string): Promise; + +// @public +export function connectAuthEmulator(auth: Auth, url: string, options?: { + disableWarnings: boolean; +}): void; + +// @public +export const cordovaPopupRedirectResolver: PopupRedirectResolver; + +// @public +export function createUserWithEmailAndPassword(auth: Auth, email: string, password: string): Promise; + +// @public +export type CustomParameters = Record; + +// @public +export const debugErrorMap: AuthErrorMap; + +// @public +export function deleteUser(user: User): Promise; + +// @public +export interface Dependencies { + errorMap?: AuthErrorMap; + persistence?: Persistence | Persistence[]; + popupRedirectResolver?: PopupRedirectResolver; +} + +// @public +export class EmailAuthCredential extends AuthCredential { + // @internal (undocumented) + readonly _email: string; + // @internal (undocumented) + static _fromEmailAndCode(email: string, oobCode: string, tenantId?: string | null): EmailAuthCredential; + // @internal (undocumented) + static _fromEmailAndPassword(email: string, password: string): EmailAuthCredential; + static fromJSON(json: object | string): EmailAuthCredential | null; + // @internal (undocumented) + _getIdTokenResponse(auth: AuthInternal): Promise; + // @internal (undocumented) + _getReauthenticationResolver(auth: AuthInternal): Promise; + // @internal (undocumented) + _linkToIdToken(auth: AuthInternal, idToken: string): Promise; + // @internal (undocumented) + readonly _password: string; + // @internal (undocumented) + readonly _tenantId: string | null; + toJSON(): object; +} + +// @public +export class EmailAuthProvider implements AuthProvider { + static credential(email: string, password: string): EmailAuthCredential; + static credentialWithLink(email: string, emailLink: string): EmailAuthCredential; + static readonly EMAIL_LINK_SIGN_IN_METHOD: 'emailLink'; + static readonly EMAIL_PASSWORD_SIGN_IN_METHOD: 'password'; + static readonly PROVIDER_ID: 'password'; + readonly providerId: "password"; +} + +// @public +export interface EmulatorConfig { + readonly host: string; + readonly options: { + readonly disableWarnings: boolean; + }; + readonly port: number | null; + readonly protocol: string; +} + +export { ErrorFn } + +// Warning: (ae-forgotten-export) The symbol "BaseOAuthProvider" needs to be exported by the entry point index.cordova.d.ts +// +// @public +export class FacebookAuthProvider extends BaseOAuthProvider { + constructor(); + static credential(accessToken: string): OAuthCredential; + static credentialFromError(error: FirebaseError): OAuthCredential | null; + static credentialFromResult(userCredential: UserCredential): OAuthCredential | null; + static readonly FACEBOOK_SIGN_IN_METHOD: 'facebook.com'; + static readonly PROVIDER_ID: 'facebook.com'; +} + +// @public +export const FactorId: { + readonly PHONE: "phone"; + readonly TOTP: "totp"; +}; + +// @public +export function fetchSignInMethodsForEmail(auth: Auth, email: string): Promise; + +// @public +export function getAdditionalUserInfo(userCredential: UserCredential): AdditionalUserInfo | null; + +// @public (undocumented) +export function getAuth(app?: FirebaseApp): Auth; + +// @public +export function getIdToken(user: User, forceRefresh?: boolean): Promise; + +// @public +export function getIdTokenResult(user: User, forceRefresh?: boolean): Promise; + +// @public +export function getMultiFactorResolver(auth: Auth, error: MultiFactorError): MultiFactorResolver; + +// @public +export function getRedirectResult(auth: Auth, resolver?: PopupRedirectResolver): Promise; + +// @public +export class GithubAuthProvider extends BaseOAuthProvider { + constructor(); + static credential(accessToken: string): OAuthCredential; + static credentialFromError(error: FirebaseError): OAuthCredential | null; + static credentialFromResult(userCredential: UserCredential): OAuthCredential | null; + static readonly GITHUB_SIGN_IN_METHOD: 'github.com'; + static readonly PROVIDER_ID: 'github.com'; +} + +// @public +export class GoogleAuthProvider extends BaseOAuthProvider { + constructor(); + static credential(idToken?: string | null, accessToken?: string | null): OAuthCredential; + static credentialFromError(error: FirebaseError): OAuthCredential | null; + static credentialFromResult(userCredential: UserCredential): OAuthCredential | null; + static readonly GOOGLE_SIGN_IN_METHOD: 'google.com'; + static readonly PROVIDER_ID: 'google.com'; +} + +// @public +export interface IdTokenResult { + authTime: string; + claims: ParsedToken; + expirationTime: string; + issuedAtTime: string; + signInProvider: string | null; + signInSecondFactor: string | null; + token: string; +} + +// @public +export const indexedDBLocalPersistence: Persistence; + +// @public +export function initializeAuth(app: FirebaseApp, deps?: Dependencies): Auth; + +// @public +export function initializeRecaptchaConfig(auth: Auth): Promise; + +// @public +export const inMemoryPersistence: Persistence; + +// @public +export function isSignInWithEmailLink(auth: Auth, emailLink: string): boolean; + +// @public +export function linkWithCredential(user: User, credential: AuthCredential): Promise; + +// @public (undocumented) +export function linkWithRedirect(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise; + +// @public +export function multiFactor(user: User): MultiFactorUser; + +// @public +export interface MultiFactorAssertion { + readonly factorId: (typeof FactorId)[keyof typeof FactorId]; +} + +// @public +export interface MultiFactorError extends AuthError { + readonly customData: AuthError['customData'] & { + readonly operationType: (typeof OperationType)[keyof typeof OperationType]; + }; +} + +// @public +export interface MultiFactorInfo { + readonly displayName?: string | null; + readonly enrollmentTime: string; + readonly factorId: (typeof FactorId)[keyof typeof FactorId]; + readonly uid: string; +} + +// @public +export interface MultiFactorResolver { + readonly hints: MultiFactorInfo[]; + resolveSignIn(assertion: MultiFactorAssertion): Promise; + readonly session: MultiFactorSession; +} + +// @public +export interface MultiFactorSession { +} + +// @public +export interface MultiFactorUser { + enroll(assertion: MultiFactorAssertion, displayName?: string | null): Promise; + readonly enrolledFactors: MultiFactorInfo[]; + getSession(): Promise; + unenroll(option: MultiFactorInfo | string): Promise; +} + +export { NextFn } + +// @public +export type NextOrObserver = NextFn | Observer; + +// @public +export class OAuthCredential extends AuthCredential { + accessToken?: string; + static fromJSON(json: string | object): OAuthCredential | null; + // Warning: (ae-forgotten-export) The symbol "OAuthCredentialParams" needs to be exported by the entry point index.cordova.d.ts + // + // @internal (undocumented) + static _fromParams(params: OAuthCredentialParams): OAuthCredential; + // @internal (undocumented) + _getIdTokenResponse(auth: AuthInternal): Promise; + // @internal (undocumented) + _getReauthenticationResolver(auth: AuthInternal): Promise; + idToken?: string; + // @internal (undocumented) + _linkToIdToken(auth: AuthInternal, idToken: string): Promise; + secret?: string; + toJSON(): object; +} + +// @public +export interface OAuthCredentialOptions { + accessToken?: string; + idToken?: string; + rawNonce?: string; +} + +// @public +export class OAuthProvider extends BaseOAuthProvider { + credential(params: OAuthCredentialOptions): OAuthCredential; + static credentialFromError(error: FirebaseError): OAuthCredential | null; + static credentialFromJSON(json: object | string): OAuthCredential; + static credentialFromResult(userCredential: UserCredential): OAuthCredential | null; + } + +// @public +export function onAuthStateChanged(auth: Auth, nextOrObserver: NextOrObserver, error?: ErrorFn, completed?: CompleteFn): Unsubscribe; + +// @public +export function onIdTokenChanged(auth: Auth, nextOrObserver: NextOrObserver, error?: ErrorFn, completed?: CompleteFn): Unsubscribe; + +// @public +export const OperationType: { + readonly LINK: "link"; + readonly REAUTHENTICATE: "reauthenticate"; + readonly SIGN_IN: "signIn"; +}; + +// @public +export function parseActionCodeURL(link: string): ActionCodeURL | null; + +// @public +export interface ParsedToken { + [key: string]: unknown; + 'auth_time'?: string; + 'exp'?: string; + 'firebase'?: { + 'sign_in_provider'?: string; + 'sign_in_second_factor'?: string; + 'identities'?: Record; + }; + 'iat'?: string; + 'sub'?: string; +} + +// @public +export interface PasswordPolicy { + readonly allowedNonAlphanumericCharacters: string; + readonly customStrengthOptions: { + readonly minPasswordLength?: number; + readonly maxPasswordLength?: number; + readonly containsLowercaseLetter?: boolean; + readonly containsUppercaseLetter?: boolean; + readonly containsNumericCharacter?: boolean; + readonly containsNonAlphanumericCharacter?: boolean; + }; + readonly enforcementState: string; + readonly forceUpgradeOnSignin: boolean; +} + +// @public +export interface PasswordValidationStatus { + readonly containsLowercaseLetter?: boolean; + readonly containsNonAlphanumericCharacter?: boolean; + readonly containsNumericCharacter?: boolean; + readonly containsUppercaseLetter?: boolean; + readonly isValid: boolean; + readonly meetsMaxPasswordLength?: boolean; + readonly meetsMinPasswordLength?: boolean; + readonly passwordPolicy: PasswordPolicy; +} + +// @public +export interface Persistence { + readonly type: 'SESSION' | 'LOCAL' | 'NONE'; +} + +// @public +export class PhoneAuthCredential extends AuthCredential { + static fromJSON(json: object | string): PhoneAuthCredential | null; + // @internal (undocumented) + static _fromTokenResponse(phoneNumber: string, temporaryProof: string): PhoneAuthCredential; + // @internal (undocumented) + static _fromVerification(verificationId: string, verificationCode: string): PhoneAuthCredential; + // @internal (undocumented) + _getIdTokenResponse(auth: AuthInternal): Promise; + // @internal (undocumented) + _getReauthenticationResolver(auth: AuthInternal): Promise; + // @internal (undocumented) + _linkToIdToken(auth: AuthInternal, idToken: string): Promise; + // Warning: (ae-forgotten-export) The symbol "SignInWithPhoneNumberRequest" needs to be exported by the entry point index.cordova.d.ts + // + // @internal (undocumented) + _makeVerificationRequest(): SignInWithPhoneNumberRequest; + toJSON(): object; +} + +// @public +export type PhoneInfoOptions = PhoneSingleFactorInfoOptions | PhoneMultiFactorEnrollInfoOptions | PhoneMultiFactorSignInInfoOptions; + +// @public +export interface PhoneMultiFactorAssertion extends MultiFactorAssertion { +} + +// @public +export interface PhoneMultiFactorEnrollInfoOptions { + phoneNumber: string; + session: MultiFactorSession; +} + +// @public +export interface PhoneMultiFactorInfo extends MultiFactorInfo { + readonly phoneNumber: string; +} + +// @public +export interface PhoneMultiFactorSignInInfoOptions { + multiFactorHint?: MultiFactorInfo; + multiFactorUid?: string; + session: MultiFactorSession; +} + +// @public +export interface PhoneSingleFactorInfoOptions { + phoneNumber: string; +} + +// @public +export interface PopupRedirectResolver { +} + +// @public +export const prodErrorMap: AuthErrorMap; + +// @public +export const ProviderId: { + readonly FACEBOOK: "facebook.com"; + readonly GITHUB: "github.com"; + readonly GOOGLE: "google.com"; + readonly PASSWORD: "password"; + readonly PHONE: "phone"; + readonly TWITTER: "twitter.com"; +}; + +// @public +export interface ReactNativeAsyncStorage { + getItem(key: string): Promise; + removeItem(key: string): Promise; + setItem(key: string, value: string): Promise; +} + +// @public +export function reauthenticateWithCredential(user: User, credential: AuthCredential): Promise; + +// @public (undocumented) +export function reauthenticateWithRedirect(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise; + +// @public +export interface RecaptchaParameters { + // (undocumented) + [key: string]: any; +} + +// @public +export function reload(user: User): Promise; + +// @public +export function revokeAccessToken(auth: Auth, token: string): Promise; + +// Warning: (ae-forgotten-export) The symbol "FederatedAuthProvider" needs to be exported by the entry point index.cordova.d.ts +// +// @public +export class SAMLAuthProvider extends FederatedAuthProvider { + constructor(providerId: string); + static credentialFromError(error: FirebaseError): AuthCredential | null; + static credentialFromJSON(json: string | object): AuthCredential; + static credentialFromResult(userCredential: UserCredential): AuthCredential | null; + } + +// @public +export function sendEmailVerification(user: User, actionCodeSettings?: ActionCodeSettings | null): Promise; + +// @public +export function sendPasswordResetEmail(auth: Auth, email: string, actionCodeSettings?: ActionCodeSettings): Promise; + +// @public +export function sendSignInLinkToEmail(auth: Auth, email: string, actionCodeSettings: ActionCodeSettings): Promise; + +// @public +export function setPersistence(auth: Auth, persistence: Persistence): Promise; + +// @public +export function signInAnonymously(auth: Auth): Promise; + +// @public +export const SignInMethod: { + readonly EMAIL_LINK: "emailLink"; + readonly EMAIL_PASSWORD: "password"; + readonly FACEBOOK: "facebook.com"; + readonly GITHUB: "github.com"; + readonly GOOGLE: "google.com"; + readonly PHONE: "phone"; + readonly TWITTER: "twitter.com"; +}; + +// @public +export function signInWithCredential(auth: Auth, credential: AuthCredential): Promise; + +// @public +export function signInWithCustomToken(auth: Auth, customToken: string): Promise; + +// @public +export function signInWithEmailAndPassword(auth: Auth, email: string, password: string): Promise; + +// @public +export function signInWithEmailLink(auth: Auth, email: string, emailLink?: string): Promise; + +// @public (undocumented) +export function signInWithRedirect(auth: Auth, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise; + +// @public +export function signOut(auth: Auth): Promise; + +// @public +export interface TotpMultiFactorAssertion extends MultiFactorAssertion { +} + +// @public +export interface TotpMultiFactorInfo extends MultiFactorInfo { +} + +// @public +export class TwitterAuthProvider extends BaseOAuthProvider { + constructor(); + static credential(token: string, secret: string): OAuthCredential; + static credentialFromError(error: FirebaseError): OAuthCredential | null; + static credentialFromResult(userCredential: UserCredential): OAuthCredential | null; + static readonly PROVIDER_ID: 'twitter.com'; + static readonly TWITTER_SIGN_IN_METHOD: 'twitter.com'; +} + +// @public +export function unlink(user: User, providerId: string): Promise; + +export { Unsubscribe } + +// @public +export function updateCurrentUser(auth: Auth, user: User | null): Promise; + +// @public +export function updateEmail(user: User, newEmail: string): Promise; + +// @public +export function updatePassword(user: User, newPassword: string): Promise; + +// @public +export function updateProfile(user: User, { displayName, photoURL: photoUrl }: { + displayName?: string | null; + photoURL?: string | null; +}): Promise; + +// @public +export function useDeviceLanguage(auth: Auth): void; + +// @public +export interface User extends UserInfo { + delete(): Promise; + readonly emailVerified: boolean; + getIdToken(forceRefresh?: boolean): Promise; + getIdTokenResult(forceRefresh?: boolean): Promise; + readonly isAnonymous: boolean; + readonly metadata: UserMetadata; + readonly providerData: UserInfo[]; + readonly refreshToken: string; + reload(): Promise; + readonly tenantId: string | null; + toJSON(): object; +} + +// @public +export interface UserCredential { + operationType: (typeof OperationType)[keyof typeof OperationType]; + providerId: string | null; + user: User; +} + +// @public +export interface UserInfo { + readonly displayName: string | null; + readonly email: string | null; + readonly phoneNumber: string | null; + readonly photoURL: string | null; + readonly providerId: string; + readonly uid: string; +} + +// @public +export interface UserMetadata { + readonly creationTime?: string; + readonly lastSignInTime?: string; +} + +// @public +export type UserProfile = Record; + +// @public +export function validatePassword(auth: Auth, password: string): Promise; + +// @public +export function verifyBeforeUpdateEmail(user: User, newEmail: string, actionCodeSettings?: ActionCodeSettings | null): Promise; + +// @public +export function verifyPasswordResetCode(auth: Auth, code: string): Promise; + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/common/api-review/auth-web-extension.api.md b/common/api-review/auth-web-extension.api.md new file mode 100644 index 00000000000..98dcc000047 --- /dev/null +++ b/common/api-review/auth-web-extension.api.md @@ -0,0 +1,508 @@ +## API Report File for "@firebase/auth-web-extension" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { CompleteFn } from '@firebase/util'; +import { ErrorFactory } from '@firebase/util'; +import { ErrorFn } from '@firebase/util'; +import { FirebaseApp } from '@firebase/app'; +import { FirebaseError } from '@firebase/util'; +import { NextFn } from '@firebase/util'; +import { Observer } from '@firebase/util'; +import { Unsubscribe } from '@firebase/util'; + +// @public +export class ActionCodeURL { + // @internal + constructor(actionLink: string); + readonly apiKey: string; + readonly code: string; + readonly continueUrl: string | null; + readonly languageCode: string | null; + readonly operation: string; + static parseLink(link: string): ActionCodeURL | null; + readonly tenantId: string | null; +} + +// Warning: (ae-forgotten-export) The symbol "Auth" needs to be exported by the entry point index.web-extension.d.ts +// +// @public +export function applyActionCode(auth: Auth, oobCode: string): Promise; + +// @public +export class AuthCredential { + // @internal + protected constructor( + providerId: string, + signInMethod: string); + // Warning: (ae-forgotten-export) The symbol "AuthInternal" needs to be exported by the entry point index.web-extension.d.ts + // Warning: (ae-forgotten-export) The symbol "PhoneOrOauthTokenResponse" needs to be exported by the entry point index.web-extension.d.ts + // + // @internal (undocumented) + _getIdTokenResponse(_auth: AuthInternal): Promise; + // @internal (undocumented) + _getReauthenticationResolver(_auth: AuthInternal): Promise; + // Warning: (ae-forgotten-export) The symbol "IdTokenResponse" needs to be exported by the entry point index.web-extension.d.ts + // + // @internal (undocumented) + _linkToIdToken(_auth: AuthInternal, _idToken: string): Promise; + readonly providerId: string; + readonly signInMethod: string; + toJSON(): object; +} + +// @public +export const AuthErrorCodes: { + readonly ADMIN_ONLY_OPERATION: "auth/admin-restricted-operation"; + readonly ARGUMENT_ERROR: "auth/argument-error"; + readonly APP_NOT_AUTHORIZED: "auth/app-not-authorized"; + readonly APP_NOT_INSTALLED: "auth/app-not-installed"; + readonly CAPTCHA_CHECK_FAILED: "auth/captcha-check-failed"; + readonly CODE_EXPIRED: "auth/code-expired"; + readonly CORDOVA_NOT_READY: "auth/cordova-not-ready"; + readonly CORS_UNSUPPORTED: "auth/cors-unsupported"; + readonly CREDENTIAL_ALREADY_IN_USE: "auth/credential-already-in-use"; + readonly CREDENTIAL_MISMATCH: "auth/custom-token-mismatch"; + readonly CREDENTIAL_TOO_OLD_LOGIN_AGAIN: "auth/requires-recent-login"; + readonly DEPENDENT_SDK_INIT_BEFORE_AUTH: "auth/dependent-sdk-initialized-before-auth"; + readonly DYNAMIC_LINK_NOT_ACTIVATED: "auth/dynamic-link-not-activated"; + readonly EMAIL_CHANGE_NEEDS_VERIFICATION: "auth/email-change-needs-verification"; + readonly EMAIL_EXISTS: "auth/email-already-in-use"; + readonly EMULATOR_CONFIG_FAILED: "auth/emulator-config-failed"; + readonly EXPIRED_OOB_CODE: "auth/expired-action-code"; + readonly EXPIRED_POPUP_REQUEST: "auth/cancelled-popup-request"; + readonly INTERNAL_ERROR: "auth/internal-error"; + readonly INVALID_API_KEY: "auth/invalid-api-key"; + readonly INVALID_APP_CREDENTIAL: "auth/invalid-app-credential"; + readonly INVALID_APP_ID: "auth/invalid-app-id"; + readonly INVALID_AUTH: "auth/invalid-user-token"; + readonly INVALID_AUTH_EVENT: "auth/invalid-auth-event"; + readonly INVALID_CERT_HASH: "auth/invalid-cert-hash"; + readonly INVALID_CODE: "auth/invalid-verification-code"; + readonly INVALID_CONTINUE_URI: "auth/invalid-continue-uri"; + readonly INVALID_CORDOVA_CONFIGURATION: "auth/invalid-cordova-configuration"; + readonly INVALID_CUSTOM_TOKEN: "auth/invalid-custom-token"; + readonly INVALID_DYNAMIC_LINK_DOMAIN: "auth/invalid-dynamic-link-domain"; + readonly INVALID_EMAIL: "auth/invalid-email"; + readonly INVALID_EMULATOR_SCHEME: "auth/invalid-emulator-scheme"; + readonly INVALID_IDP_RESPONSE: "auth/invalid-credential"; + readonly INVALID_LOGIN_CREDENTIALS: "auth/invalid-credential"; + readonly INVALID_MESSAGE_PAYLOAD: "auth/invalid-message-payload"; + readonly INVALID_MFA_SESSION: "auth/invalid-multi-factor-session"; + readonly INVALID_OAUTH_CLIENT_ID: "auth/invalid-oauth-client-id"; + readonly INVALID_OAUTH_PROVIDER: "auth/invalid-oauth-provider"; + readonly INVALID_OOB_CODE: "auth/invalid-action-code"; + readonly INVALID_ORIGIN: "auth/unauthorized-domain"; + readonly INVALID_PASSWORD: "auth/wrong-password"; + readonly INVALID_PERSISTENCE: "auth/invalid-persistence-type"; + readonly INVALID_PHONE_NUMBER: "auth/invalid-phone-number"; + readonly INVALID_PROVIDER_ID: "auth/invalid-provider-id"; + readonly INVALID_RECIPIENT_EMAIL: "auth/invalid-recipient-email"; + readonly INVALID_SENDER: "auth/invalid-sender"; + readonly INVALID_SESSION_INFO: "auth/invalid-verification-id"; + readonly INVALID_TENANT_ID: "auth/invalid-tenant-id"; + readonly MFA_INFO_NOT_FOUND: "auth/multi-factor-info-not-found"; + readonly MFA_REQUIRED: "auth/multi-factor-auth-required"; + readonly MISSING_ANDROID_PACKAGE_NAME: "auth/missing-android-pkg-name"; + readonly MISSING_APP_CREDENTIAL: "auth/missing-app-credential"; + readonly MISSING_AUTH_DOMAIN: "auth/auth-domain-config-required"; + readonly MISSING_CODE: "auth/missing-verification-code"; + readonly MISSING_CONTINUE_URI: "auth/missing-continue-uri"; + readonly MISSING_IFRAME_START: "auth/missing-iframe-start"; + readonly MISSING_IOS_BUNDLE_ID: "auth/missing-ios-bundle-id"; + readonly MISSING_OR_INVALID_NONCE: "auth/missing-or-invalid-nonce"; + readonly MISSING_MFA_INFO: "auth/missing-multi-factor-info"; + readonly MISSING_MFA_SESSION: "auth/missing-multi-factor-session"; + readonly MISSING_PHONE_NUMBER: "auth/missing-phone-number"; + readonly MISSING_SESSION_INFO: "auth/missing-verification-id"; + readonly MODULE_DESTROYED: "auth/app-deleted"; + readonly NEED_CONFIRMATION: "auth/account-exists-with-different-credential"; + readonly NETWORK_REQUEST_FAILED: "auth/network-request-failed"; + readonly NULL_USER: "auth/null-user"; + readonly NO_AUTH_EVENT: "auth/no-auth-event"; + readonly NO_SUCH_PROVIDER: "auth/no-such-provider"; + readonly OPERATION_NOT_ALLOWED: "auth/operation-not-allowed"; + readonly OPERATION_NOT_SUPPORTED: "auth/operation-not-supported-in-this-environment"; + readonly POPUP_BLOCKED: "auth/popup-blocked"; + readonly POPUP_CLOSED_BY_USER: "auth/popup-closed-by-user"; + readonly PROVIDER_ALREADY_LINKED: "auth/provider-already-linked"; + readonly QUOTA_EXCEEDED: "auth/quota-exceeded"; + readonly REDIRECT_CANCELLED_BY_USER: "auth/redirect-cancelled-by-user"; + readonly REDIRECT_OPERATION_PENDING: "auth/redirect-operation-pending"; + readonly REJECTED_CREDENTIAL: "auth/rejected-credential"; + readonly SECOND_FACTOR_ALREADY_ENROLLED: "auth/second-factor-already-in-use"; + readonly SECOND_FACTOR_LIMIT_EXCEEDED: "auth/maximum-second-factor-count-exceeded"; + readonly TENANT_ID_MISMATCH: "auth/tenant-id-mismatch"; + readonly TIMEOUT: "auth/timeout"; + readonly TOKEN_EXPIRED: "auth/user-token-expired"; + readonly TOO_MANY_ATTEMPTS_TRY_LATER: "auth/too-many-requests"; + readonly UNAUTHORIZED_DOMAIN: "auth/unauthorized-continue-uri"; + readonly UNSUPPORTED_FIRST_FACTOR: "auth/unsupported-first-factor"; + readonly UNSUPPORTED_PERSISTENCE: "auth/unsupported-persistence-type"; + readonly UNSUPPORTED_TENANT_OPERATION: "auth/unsupported-tenant-operation"; + readonly UNVERIFIED_EMAIL: "auth/unverified-email"; + readonly USER_CANCELLED: "auth/user-cancelled"; + readonly USER_DELETED: "auth/user-not-found"; + readonly USER_DISABLED: "auth/user-disabled"; + readonly USER_MISMATCH: "auth/user-mismatch"; + readonly USER_SIGNED_OUT: "auth/user-signed-out"; + readonly WEAK_PASSWORD: "auth/weak-password"; + readonly WEB_STORAGE_UNSUPPORTED: "auth/web-storage-unsupported"; + readonly ALREADY_INITIALIZED: "auth/already-initialized"; + readonly RECAPTCHA_NOT_ENABLED: "auth/recaptcha-not-enabled"; + readonly MISSING_RECAPTCHA_TOKEN: "auth/missing-recaptcha-token"; + readonly INVALID_RECAPTCHA_TOKEN: "auth/invalid-recaptcha-token"; + readonly INVALID_RECAPTCHA_ACTION: "auth/invalid-recaptcha-action"; + readonly MISSING_CLIENT_TYPE: "auth/missing-client-type"; + readonly MISSING_RECAPTCHA_VERSION: "auth/missing-recaptcha-version"; + readonly INVALID_RECAPTCHA_VERSION: "auth/invalid-recaptcha-version"; + readonly INVALID_REQ_TYPE: "auth/invalid-req-type"; +}; + +// Warning: (ae-forgotten-export) The symbol "User" needs to be exported by the entry point index.web-extension.d.ts +// +// @public +export function beforeAuthStateChanged(auth: Auth, callback: (user: User | null) => void | Promise, onAbort?: () => void): Unsubscribe; + +// Warning: (ae-forgotten-export) The symbol "ActionCodeInfo" needs to be exported by the entry point index.web-extension.d.ts +// +// @public +export function checkActionCode(auth: Auth, oobCode: string): Promise; + +// @public +export function confirmPasswordReset(auth: Auth, oobCode: string, newPassword: string): Promise; + +// @public +export function connectAuthEmulator(auth: Auth, url: string, options?: { + disableWarnings: boolean; +}): void; + +// Warning: (ae-forgotten-export) The symbol "UserCredential" needs to be exported by the entry point index.web-extension.d.ts +// +// @public +export function createUserWithEmailAndPassword(auth: Auth, email: string, password: string): Promise; + +// @public +export type CustomParameters = Record; + +// Warning: (ae-forgotten-export) The symbol "AuthErrorMap" needs to be exported by the entry point index.web-extension.d.ts +// +// @public +export const debugErrorMap: AuthErrorMap; + +// @public +export function deleteUser(user: User): Promise; + +// @public +export class EmailAuthCredential extends AuthCredential { + // @internal (undocumented) + readonly _email: string; + // @internal (undocumented) + static _fromEmailAndCode(email: string, oobCode: string, tenantId?: string | null): EmailAuthCredential; + // @internal (undocumented) + static _fromEmailAndPassword(email: string, password: string): EmailAuthCredential; + static fromJSON(json: object | string): EmailAuthCredential | null; + // @internal (undocumented) + _getIdTokenResponse(auth: AuthInternal): Promise; + // @internal (undocumented) + _getReauthenticationResolver(auth: AuthInternal): Promise; + // @internal (undocumented) + _linkToIdToken(auth: AuthInternal, idToken: string): Promise; + // @internal (undocumented) + readonly _password: string; + // @internal (undocumented) + readonly _tenantId: string | null; + toJSON(): object; +} + +// Warning: (ae-forgotten-export) The symbol "AuthProvider" needs to be exported by the entry point index.web-extension.d.ts +// +// @public +export class EmailAuthProvider implements AuthProvider { + static credential(email: string, password: string): EmailAuthCredential; + static credentialWithLink(email: string, emailLink: string): EmailAuthCredential; + static readonly EMAIL_LINK_SIGN_IN_METHOD: 'emailLink'; + static readonly EMAIL_PASSWORD_SIGN_IN_METHOD: 'password'; + static readonly PROVIDER_ID: 'password'; + readonly providerId: "password"; +} + +// Warning: (ae-forgotten-export) The symbol "BaseOAuthProvider" needs to be exported by the entry point index.web-extension.d.ts +// +// @public +export class FacebookAuthProvider extends BaseOAuthProvider { + constructor(); + static credential(accessToken: string): OAuthCredential; + static credentialFromError(error: FirebaseError): OAuthCredential | null; + static credentialFromResult(userCredential: UserCredential): OAuthCredential | null; + static readonly FACEBOOK_SIGN_IN_METHOD: 'facebook.com'; + static readonly PROVIDER_ID: 'facebook.com'; +} + +// @public +export function fetchSignInMethodsForEmail(auth: Auth, email: string): Promise; + +// Warning: (ae-forgotten-export) The symbol "AdditionalUserInfo" needs to be exported by the entry point index.web-extension.d.ts +// +// @public +export function getAdditionalUserInfo(userCredential: UserCredential): AdditionalUserInfo | null; + +// @public +export function getAuth(app?: FirebaseApp): Auth; + +// @public +export function getIdToken(user: User, forceRefresh?: boolean): Promise; + +// Warning: (ae-forgotten-export) The symbol "IdTokenResult" needs to be exported by the entry point index.web-extension.d.ts +// +// @public +export function getIdTokenResult(user: User, forceRefresh?: boolean): Promise; + +// Warning: (ae-forgotten-export) The symbol "MultiFactorError" needs to be exported by the entry point index.web-extension.d.ts +// Warning: (ae-forgotten-export) The symbol "MultiFactorResolver" needs to be exported by the entry point index.web-extension.d.ts +// +// @public +export function getMultiFactorResolver(auth: Auth, error: MultiFactorError): MultiFactorResolver; + +// @public +export class GithubAuthProvider extends BaseOAuthProvider { + constructor(); + static credential(accessToken: string): OAuthCredential; + static credentialFromError(error: FirebaseError): OAuthCredential | null; + static credentialFromResult(userCredential: UserCredential): OAuthCredential | null; + static readonly GITHUB_SIGN_IN_METHOD: 'github.com'; + static readonly PROVIDER_ID: 'github.com'; +} + +// @public +export class GoogleAuthProvider extends BaseOAuthProvider { + constructor(); + static credential(idToken?: string | null, accessToken?: string | null): OAuthCredential; + static credentialFromError(error: FirebaseError): OAuthCredential | null; + static credentialFromResult(userCredential: UserCredential): OAuthCredential | null; + static readonly GOOGLE_SIGN_IN_METHOD: 'google.com'; + static readonly PROVIDER_ID: 'google.com'; +} + +// Warning: (ae-forgotten-export) The symbol "Persistence" needs to be exported by the entry point index.web-extension.d.ts +// +// @public +export const indexedDBLocalPersistence: Persistence; + +// Warning: (ae-forgotten-export) The symbol "Dependencies" needs to be exported by the entry point index.web-extension.d.ts +// +// @public +export function initializeAuth(app: FirebaseApp, deps?: Dependencies): Auth; + +// @public +export function initializeRecaptchaConfig(auth: Auth): Promise; + +// @public +export const inMemoryPersistence: Persistence; + +// @public +export function isSignInWithEmailLink(auth: Auth, emailLink: string): boolean; + +// @public +export function linkWithCredential(user: User, credential: AuthCredential): Promise; + +// Warning: (ae-forgotten-export) The symbol "MultiFactorUser" needs to be exported by the entry point index.web-extension.d.ts +// +// @public +export function multiFactor(user: User): MultiFactorUser; + +// @public +export class OAuthCredential extends AuthCredential { + accessToken?: string; + static fromJSON(json: string | object): OAuthCredential | null; + // Warning: (ae-forgotten-export) The symbol "OAuthCredentialParams" needs to be exported by the entry point index.web-extension.d.ts + // + // @internal (undocumented) + static _fromParams(params: OAuthCredentialParams): OAuthCredential; + // @internal (undocumented) + _getIdTokenResponse(auth: AuthInternal): Promise; + // @internal (undocumented) + _getReauthenticationResolver(auth: AuthInternal): Promise; + idToken?: string; + // @internal (undocumented) + _linkToIdToken(auth: AuthInternal, idToken: string): Promise; + secret?: string; + toJSON(): object; +} + +// @public +export interface OAuthCredentialOptions { + accessToken?: string; + idToken?: string; + rawNonce?: string; +} + +// @public +export class OAuthProvider extends BaseOAuthProvider { + credential(params: OAuthCredentialOptions): OAuthCredential; + static credentialFromError(error: FirebaseError): OAuthCredential | null; + static credentialFromJSON(json: object | string): OAuthCredential; + static credentialFromResult(userCredential: UserCredential): OAuthCredential | null; + } + +// Warning: (ae-forgotten-export) The symbol "NextOrObserver" needs to be exported by the entry point index.web-extension.d.ts +// +// @public +export function onAuthStateChanged(auth: Auth, nextOrObserver: NextOrObserver, error?: ErrorFn, completed?: CompleteFn): Unsubscribe; + +// @public +export function onIdTokenChanged(auth: Auth, nextOrObserver: NextOrObserver, error?: ErrorFn, completed?: CompleteFn): Unsubscribe; + +// @public +export function parseActionCodeURL(link: string): ActionCodeURL | null; + +// @public +export class PhoneAuthCredential extends AuthCredential { + static fromJSON(json: object | string): PhoneAuthCredential | null; + // @internal (undocumented) + static _fromTokenResponse(phoneNumber: string, temporaryProof: string): PhoneAuthCredential; + // @internal (undocumented) + static _fromVerification(verificationId: string, verificationCode: string): PhoneAuthCredential; + // @internal (undocumented) + _getIdTokenResponse(auth: AuthInternal): Promise; + // @internal (undocumented) + _getReauthenticationResolver(auth: AuthInternal): Promise; + // @internal (undocumented) + _linkToIdToken(auth: AuthInternal, idToken: string): Promise; + // Warning: (ae-forgotten-export) The symbol "SignInWithPhoneNumberRequest" needs to be exported by the entry point index.web-extension.d.ts + // + // @internal (undocumented) + _makeVerificationRequest(): SignInWithPhoneNumberRequest; + toJSON(): object; +} + +// @public +export const prodErrorMap: AuthErrorMap; + +// @public +export function reauthenticateWithCredential(user: User, credential: AuthCredential): Promise; + +// @public +export function reload(user: User): Promise; + +// @public +export function revokeAccessToken(auth: Auth, token: string): Promise; + +// Warning: (ae-forgotten-export) The symbol "FederatedAuthProvider" needs to be exported by the entry point index.web-extension.d.ts +// +// @public +export class SAMLAuthProvider extends FederatedAuthProvider { + constructor(providerId: string); + static credentialFromError(error: FirebaseError): AuthCredential | null; + static credentialFromJSON(json: string | object): AuthCredential; + static credentialFromResult(userCredential: UserCredential): AuthCredential | null; + } + +// Warning: (ae-forgotten-export) The symbol "ActionCodeSettings" needs to be exported by the entry point index.web-extension.d.ts +// +// @public +export function sendEmailVerification(user: User, actionCodeSettings?: ActionCodeSettings | null): Promise; + +// @public +export function sendPasswordResetEmail(auth: Auth, email: string, actionCodeSettings?: ActionCodeSettings): Promise; + +// @public +export function sendSignInLinkToEmail(auth: Auth, email: string, actionCodeSettings: ActionCodeSettings): Promise; + +// @public +export function setPersistence(auth: Auth, persistence: Persistence): Promise; + +// @public +export function signInAnonymously(auth: Auth): Promise; + +// @public +export function signInWithCredential(auth: Auth, credential: AuthCredential): Promise; + +// @public +export function signInWithCustomToken(auth: Auth, customToken: string): Promise; + +// @public +export function signInWithEmailAndPassword(auth: Auth, email: string, password: string): Promise; + +// @public +export function signInWithEmailLink(auth: Auth, email: string, emailLink?: string): Promise; + +// @public +export function signOut(auth: Auth): Promise; + +// @public +export class TotpMultiFactorGenerator { + // Warning: (ae-forgotten-export) The symbol "TotpMultiFactorAssertion" needs to be exported by the entry point index.web-extension.d.ts + static assertionForEnrollment(secret: TotpSecret, oneTimePassword: string): TotpMultiFactorAssertion; + static assertionForSignIn(enrollmentId: string, oneTimePassword: string): TotpMultiFactorAssertion; + static FACTOR_ID: 'totp'; + // Warning: (ae-forgotten-export) The symbol "MultiFactorSession" needs to be exported by the entry point index.web-extension.d.ts + static generateSecret(session: MultiFactorSession): Promise; +} + +// @public +export class TotpSecret { + readonly codeIntervalSeconds: number; + readonly codeLength: number; + readonly enrollmentCompletionDeadline: string; + // Warning: (ae-forgotten-export) The symbol "StartTotpMfaEnrollmentResponse" needs to be exported by the entry point index.web-extension.d.ts + // + // @internal (undocumented) + static _fromStartTotpMfaEnrollmentResponse(response: StartTotpMfaEnrollmentResponse, auth: AuthInternal): TotpSecret; + generateQrCodeUrl(accountName?: string, issuer?: string): string; + readonly hashingAlgorithm: string; + // Warning: (ae-forgotten-export) The symbol "TotpVerificationInfo" needs to be exported by the entry point index.web-extension.d.ts + // + // @internal (undocumented) + _makeTotpVerificationInfo(otp: string): TotpVerificationInfo; + readonly secretKey: string; + } + +// @public +export class TwitterAuthProvider extends BaseOAuthProvider { + constructor(); + static credential(token: string, secret: string): OAuthCredential; + static credentialFromError(error: FirebaseError): OAuthCredential | null; + static credentialFromResult(userCredential: UserCredential): OAuthCredential | null; + static readonly PROVIDER_ID: 'twitter.com'; + static readonly TWITTER_SIGN_IN_METHOD: 'twitter.com'; +} + +// @public +export function unlink(user: User, providerId: string): Promise; + +// @public +export function updateCurrentUser(auth: Auth, user: User | null): Promise; + +// @public +export function updateEmail(user: User, newEmail: string): Promise; + +// @public +export function updatePassword(user: User, newPassword: string): Promise; + +// @public +export function updateProfile(user: User, { displayName, photoURL: photoUrl }: { + displayName?: string | null; + photoURL?: string | null; +}): Promise; + +// @public +export function useDeviceLanguage(auth: Auth): void; + +// Warning: (ae-forgotten-export) The symbol "PasswordValidationStatus" needs to be exported by the entry point index.web-extension.d.ts +// +// @public +export function validatePassword(auth: Auth, password: string): Promise; + +// @public +export function verifyBeforeUpdateEmail(user: User, newEmail: string, actionCodeSettings?: ActionCodeSettings | null): Promise; + +// @public +export function verifyPasswordResetCode(auth: Auth, code: string): Promise; + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/packages/auth/cordova/api-extractor.json b/packages/auth/cordova/api-extractor.json new file mode 100644 index 00000000000..46086bc0e1a --- /dev/null +++ b/packages/auth/cordova/api-extractor.json @@ -0,0 +1,9 @@ +{ + "extends": "../../../config/api-extractor.json", + "mainEntryPointFilePath": "/dist/cordova/index.cordova.d.ts", + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "/dist/cordova/index.cordova.d.ts", + "publicTrimmedFilePath": "/dist/cordova/index.cordova-public.d.ts" + } +} diff --git a/packages/auth/cordova/package.json b/packages/auth/cordova/package.json index b133d280d44..f25a1711e2b 100644 --- a/packages/auth/cordova/package.json +++ b/packages/auth/cordova/package.json @@ -1,5 +1,5 @@ { - "name": "@firebase/auth/cordova", + "name": "@firebase/auth-cordova", "description": "A Cordova-specific build of the Firebase Auth JS SDK", "browser": "../dist/cordova/index.js", "module": "../dist/cordova/index.js", diff --git a/packages/auth/package.json b/packages/auth/package.json index aaee40abd50..d83c911e618 100644 --- a/packages/auth/package.json +++ b/packages/auth/package.json @@ -111,7 +111,7 @@ "test:node:integration": "ts-node -O '{\"module\": \"commonjs\", \"target\": \"es6\"}' scripts/run_node_tests.ts --integration", "test:node:integration:local": "ts-node -O '{\"module\": \"commonjs\", \"target\": \"es6\"}' scripts/run_node_tests.ts --integration --local", "test:webdriver": "rollup -c test/integration/webdriver/static/rollup.config.js && ts-node -O '{\"module\": \"commonjs\", \"target\": \"es6\"}' scripts/run_node_tests.ts --webdriver", - "api-report": "api-extractor run --local --verbose", + "api-report": "api-extractor run --local --verbose --config ./api-extractor.json && api-extractor run --local --verbose --config ./web-extension/api-extractor.json && api-extractor run --local --verbose --config ./cordova/api-extractor.json", "doc": "api-documenter markdown --input temp --output docs", "build:doc": "yarn build && yarn doc", "typings:public": "node ../../scripts/build/use_typings.js ./dist/auth-public.d.ts" diff --git a/packages/auth/web-extension/api-extractor.json b/packages/auth/web-extension/api-extractor.json new file mode 100644 index 00000000000..8d314f4d484 --- /dev/null +++ b/packages/auth/web-extension/api-extractor.json @@ -0,0 +1,9 @@ +{ + "extends": "../../../config/api-extractor.json", + "mainEntryPointFilePath": "/dist/web-extension-esm2017/index.web-extension.d.ts", + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "/dist/web-extension-esm2017/index.web-extension.d.ts", + "publicTrimmedFilePath": "/dist/web-extension-esm2017/index.web-extension-public.d.ts" + } +} diff --git a/packages/auth/web-extension/package.json b/packages/auth/web-extension/package.json index 1a46dcf1f90..88805d0ff3a 100644 --- a/packages/auth/web-extension/package.json +++ b/packages/auth/web-extension/package.json @@ -1,5 +1,5 @@ { - "name": "@firebase/auth/web-extension", + "name": "@firebase/auth-web-extension", "description": "A Chrome-Manifest-v3-specific build of the Firebase Auth JS SDK", "main": "../dist/web-extension-cjs/index.js", "browser": "../dist/web-extension-esm2017/index.js",