Skip to content

Export public types from auth-exp #4362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 29, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
243 changes: 133 additions & 110 deletions common/api-review/auth-exp.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,63 +4,83 @@

```ts

import { Auth } from '@firebase/auth-types-exp';
import { ActionCodeInfo } from '@firebase/auth-types';
import { ActionCodeOperation } from '@firebase/auth-types';
import { ActionCodeSettings } from '@firebase/auth-types';
import { ActionCodeURL } from '@firebase/auth-types';
import { AdditionalUserInfo } from '@firebase/auth-types';
import { ApplicationVerifier } from '@firebase/auth-types';
import { Auth } from '@firebase/auth-types';
import { AuthCredential } from '@firebase/auth-types';
import { AuthError } from '@firebase/auth-types';
import { AuthErrorMap } from '@firebase/auth-types';
import { AuthProvider } from '@firebase/auth-types';
import { AuthSettings } from '@firebase/auth-types';
import { CompleteFn } from '@firebase/util';
import { Config } from '@firebase/auth-types';
import { ConfirmationResult } from '@firebase/auth-types';
import { EmailAuthProvider } from '@firebase/auth-types';
import { ErrorFactory } from '@firebase/util';
import { ErrorFn } from '@firebase/util';
import * as externs from '@firebase/auth-types-exp';
import { FirebaseApp } from '@firebase/app-types-exp';
import * as externs from '@firebase/auth-types';
import { FactorId } from '@firebase/auth-types';
import { FirebaseApp } from '@firebase/app-types';
import { FirebaseError } from '@firebase/util';
import { IdTokenResult } from '@firebase/auth-types';
import { MultiFactorAssertion } from '@firebase/auth-types';
import { MultiFactorError } from '@firebase/auth-types';
import { MultiFactorInfo } from '@firebase/auth-types';
import { MultiFactorResolver } from '@firebase/auth-types';
import { MultiFactorSession } from '@firebase/auth-types';
import { MultiFactorUser } from '@firebase/auth-types';
import { NextFn } from '@firebase/util';
import { ProviderId } from '@firebase/auth-types-exp';
import { OAuthCredential } from '@firebase/auth-types';
import { OperationType } from '@firebase/auth-types';
import { ParsedToken } from '@firebase/auth-types';
import { Persistence } from '@firebase/auth-types';
import { PhoneAuthCredential } from '@firebase/auth-types';
import { PhoneInfoOptions } from '@firebase/auth-types';
import { PhoneMultiFactorAssertion } from '@firebase/auth-types';
import { PhoneMultiFactorEnrollInfoOptions } from '@firebase/auth-types';
import { PhoneMultiFactorSignInInfoOptions } from '@firebase/auth-types';
import { PhoneSingleFactorInfoOptions } from '@firebase/auth-types';
import { PopupRedirectResolver } from '@firebase/auth-types';
import { ProviderId } from '@firebase/auth-types';
import { ReactNativeAsyncStorage } from '@firebase/auth-types';
import { SignInMethod } from '@firebase/auth-types';
import { Unsubscribe } from '@firebase/util';
import { UserCredential } from '@firebase/auth-types-exp';
import { User } from '@firebase/auth-types';
import { UserCredential } from '@firebase/auth-types';
import { UserInfo } from '@firebase/auth-types';
import { UserMetadata } from '@firebase/auth-types';
import { UserProfile } from '@firebase/auth-types';

// @public (undocumented)
export class ActionCodeURL implements externs.ActionCodeURL {
// @internal
constructor(actionLink: string);
// (undocumented)
readonly apiKey: string;
// (undocumented)
readonly code: string;
// (undocumented)
readonly continueUrl: string | null;
// (undocumented)
readonly languageCode: string | null;
// (undocumented)
readonly operation: externs.ActionCodeOperation;
// (undocumented)
static parseLink(link: string): externs.ActionCodeURL | null;
// (undocumented)
readonly tenantId: string | null;
}
export { ActionCodeInfo }

export { ActionCodeOperation }

export { ActionCodeSettings }

export { ActionCodeURL }

export { AdditionalUserInfo }

export { ApplicationVerifier }

// @public
export function applyActionCode(auth: externs.Auth, oobCode: string): Promise<void>;

// @public (undocumented)
export class AuthCredential {
// @internal
protected constructor(providerId: string, signInMethod: string);
// Warning: (ae-forgotten-export) The symbol "Auth" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "PhoneOrOauthTokenResponse" needs to be exported by the entry point index.d.ts
//
// @internal (undocumented)
_getIdTokenResponse(_auth: Auth_2): Promise<PhoneOrOauthTokenResponse>;
// @internal (undocumented)
_getReauthenticationResolver(_auth: Auth_2): Promise<IdTokenResponse>;
// Warning: (ae-forgotten-export) The symbol "IdTokenResponse" needs to be exported by the entry point index.d.ts
//
// @internal (undocumented)
_linkToIdToken(_auth: Auth_2, _idToken: string): Promise<IdTokenResponse>;
// (undocumented)
readonly providerId: string;
// (undocumented)
readonly signInMethod: string;
// (undocumented)
toJSON(): object;
}
export { Auth }

export { AuthCredential }

export { AuthError }

export { AuthErrorMap }

export { AuthProvider }

export { AuthSettings }

// @public
export const browserLocalPersistence: externs.Persistence;
Expand All @@ -74,6 +94,10 @@ export const browserSessionPersistence: externs.Persistence;
// @public
export function checkActionCode(auth: externs.Auth, oobCode: string): Promise<externs.ActionCodeInfo>;

export { Config }

export { ConfirmationResult }

// @public
export function confirmPasswordReset(auth: externs.Auth, oobCode: string, newPassword: string): Promise<void>;

Expand All @@ -89,8 +113,10 @@ export const debugErrorMap: externs.AuthErrorMap;
// @public
export function deleteUser(user: externs.User): Promise<void>;

// Warning: (ae-forgotten-export) The symbol "AuthCredential" needs to be exported by the entry point index.d.ts
//
// @public
export class EmailAuthCredential extends AuthCredential implements externs.AuthCredential {
export class EmailAuthCredential extends AuthCredential_2 implements externs.AuthCredential {
// (undocumented)
readonly email: string;
// @internal (undocumented)
Expand All @@ -99,6 +125,9 @@ export class EmailAuthCredential extends AuthCredential implements externs.AuthC
static _fromEmailAndPassword(email: string, password: string): EmailAuthCredential;
// (undocumented)
static fromJSON(json: object | string): EmailAuthCredential | null;
// Warning: (ae-forgotten-export) The symbol "Auth" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "IdTokenResponse" needs to be exported by the entry point index.d.ts
//
// @internal (undocumented)
_getIdTokenResponse(auth: Auth_2): Promise<IdTokenResponse>;
// @internal (undocumented)
Expand All @@ -113,21 +142,7 @@ export class EmailAuthCredential extends AuthCredential implements externs.AuthC
toJSON(): object;
}

// @public (undocumented)
export class EmailAuthProvider implements externs.EmailAuthProvider {
// (undocumented)
static credential(email: string, password: string): EmailAuthCredential;
// (undocumented)
static credentialWithLink(email: string, emailLink: string): EmailAuthCredential;
// (undocumented)
static readonly EMAIL_LINK_SIGN_IN_METHOD = externs.SignInMethod.EMAIL_LINK;
// (undocumented)
static readonly EMAIL_PASSWORD_SIGN_IN_METHOD = externs.SignInMethod.EMAIL_PASSWORD;
// (undocumented)
static readonly PROVIDER_ID = externs.ProviderId.PASSWORD;
// (undocumented)
readonly providerId = externs.ProviderId.PASSWORD;
}
export { EmailAuthProvider }

// @public
export class FacebookAuthProvider extends OAuthProvider {
Expand All @@ -139,6 +154,8 @@ export class FacebookAuthProvider extends OAuthProvider {
static readonly PROVIDER_ID = externs.ProviderId.FACEBOOK;
}

export { FactorId }

// @public
export function fetchSignInMethodsForEmail(auth: externs.Auth, email: string): Promise<string[]>;

Expand Down Expand Up @@ -180,6 +197,8 @@ export class GoogleAuthProvider extends OAuthProvider {
static readonly PROVIDER_ID = externs.ProviderId.GOOGLE;
}

export { IdTokenResult }

// @public
export const indexedDBLocalPersistence: externs.Persistence;

Expand Down Expand Up @@ -209,31 +228,19 @@ export function linkWithRedirect(user: externs.User, provider: externs.AuthProvi
// @public
export function multiFactor(user: externs.User): externs.MultiFactorUser;

// @public (undocumented)
export class OAuthCredential extends AuthCredential implements externs.OAuthCredential {
// (undocumented)
accessToken?: string;
// (undocumented)
static fromJSON(json: string | object): OAuthCredential | null;
// Warning: (ae-forgotten-export) The symbol "OAuthCredentialParams" needs to be exported by the entry point index.d.ts
//
// @internal (undocumented)
static _fromParams(params: OAuthCredentialParams): OAuthCredential;
// @internal (undocumented)
_getIdTokenResponse(auth: Auth_2): Promise<IdTokenResponse>;
// @internal (undocumented)
_getReauthenticationResolver(auth: Auth_2): Promise<IdTokenResponse>;
// (undocumented)
idToken?: string;
// @internal (undocumented)
_linkToIdToken(auth: Auth_2, idToken: string): Promise<IdTokenResponse>;
// @internal (undocumented)
nonce?: string;
// (undocumented)
secret?: string;
// (undocumented)
toJSON(): object;
}
export { MultiFactorAssertion }

export { MultiFactorError }

export { MultiFactorInfo }

export { MultiFactorResolver }

export { MultiFactorSession }

export { MultiFactorUser }

export { OAuthCredential }

// @public
export interface OAuthCredentialOptions {
Expand Down Expand Up @@ -267,36 +274,24 @@ export function onAuthStateChanged(auth: externs.Auth, nextOrObserver: externs.N
// @public
export function onIdTokenChanged(auth: externs.Auth, nextOrObserver: externs.NextOrObserver<externs.User>, error?: ErrorFn, completed?: CompleteFn): Unsubscribe;

export { OperationType }

// @public (undocumented)
export function parseActionCodeURL(link: string): externs.ActionCodeURL | null;

// @public (undocumented)
export class PhoneAuthCredential extends AuthCredential implements externs.PhoneAuthCredential {
// (undocumented)
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: Auth_2): Promise<PhoneOrOauthTokenResponse>;
// @internal (undocumented)
_getReauthenticationResolver(auth: Auth_2): Promise<IdTokenResponse>;
// @internal (undocumented)
_linkToIdToken(auth: Auth_2, idToken: string): Promise<IdTokenResponse>;
// Warning: (ae-forgotten-export) The symbol "SignInWithPhoneNumberRequest" needs to be exported by the entry point index.d.ts
//
// @internal (undocumented)
_makeVerificationRequest(): SignInWithPhoneNumberRequest;
// (undocumented)
toJSON(): object;
}
export { ParsedToken }

export { Persistence }

export { PhoneAuthCredential }

// @public (undocumented)
export class PhoneAuthProvider implements externs.PhoneAuthProvider {
constructor(auth: externs.Auth);
// Warning: (ae-forgotten-export) The symbol "PhoneAuthCredential" needs to be exported by the entry point index.d.ts
//
// (undocumented)
static credential(verificationId: string, verificationCode: string): PhoneAuthCredential;
static credential(verificationId: string, verificationCode: string): PhoneAuthCredential_2;
// (undocumented)
static credentialFromResult(userCredential: externs.UserCredential): externs.AuthCredential | null;
// (undocumented)
Expand All @@ -309,15 +304,31 @@ export class PhoneAuthProvider implements externs.PhoneAuthProvider {
verifyPhoneNumber(phoneOptions: externs.PhoneInfoOptions | string, applicationVerifier: externs.ApplicationVerifier): Promise<string>;
}

export { PhoneInfoOptions }

export { PhoneMultiFactorAssertion }

export { PhoneMultiFactorEnrollInfoOptions }

// @public (undocumented)
export class PhoneMultiFactorGenerator implements externs.PhoneMultiFactorGenerator {
// (undocumented)
static assertion(credential: externs.PhoneAuthCredential): externs.PhoneMultiFactorAssertion;
}

export { PhoneMultiFactorSignInInfoOptions }

export { PhoneSingleFactorInfoOptions }

export { PopupRedirectResolver }

// @public
export const prodErrorMap: externs.AuthErrorMap;

export { ProviderId }

export { ReactNativeAsyncStorage }

// @public
export function reauthenticateWithCredential(user: externs.User, credential: externs.AuthCredential): Promise<externs.UserCredential>;

Expand All @@ -333,7 +344,7 @@ export function reauthenticateWithRedirect(user: externs.User, provider: externs
// Warning: (ae-forgotten-export) The symbol "ApplicationVerifier" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
export class RecaptchaVerifier implements externs.RecaptchaVerifier, ApplicationVerifier {
export class RecaptchaVerifier implements externs.RecaptchaVerifier, ApplicationVerifier_2 {
// Warning: (ae-forgotten-export) The symbol "Parameters" needs to be exported by the entry point index.d.ts
constructor(containerOrId: HTMLElement | string, parameters: Parameters_2, authExtern: externs.Auth);
// (undocumented)
Expand Down Expand Up @@ -370,6 +381,8 @@ export function setPersistence(auth: externs.Auth, persistence: externs.Persiste
// @public
export function signInAnonymously(auth: externs.Auth): Promise<externs.UserCredential>;

export { SignInMethod }

// @public
export function signInWithCredential(auth: externs.Auth, credential: externs.AuthCredential): Promise<externs.UserCredential>;

Expand Down Expand Up @@ -429,6 +442,16 @@ export function updateProfile(user: externs.User, { displayName, photoURL: photo
// @public
export function useDeviceLanguage(auth: externs.Auth): void;

export { User }

export { UserCredential }

export { UserInfo }

export { UserMetadata }

export { UserProfile }

// @public
export function verifyBeforeUpdateEmail(user: externs.User, newEmail: string, actionCodeSettings?: externs.ActionCodeSettings | null): Promise<void>;

Expand Down
Loading