Skip to content

Commit 6b5f366

Browse files
committed
remove classes from public types
1 parent 3e653fc commit 6b5f366

File tree

26 files changed

+414
-657
lines changed

26 files changed

+414
-657
lines changed

common/api-review/auth-exp.api.md

Lines changed: 43 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -48,25 +48,16 @@ export interface ActionCodeSettings {
4848
url: string;
4949
}
5050

51-
// Warning: (ae-forgotten-export) The symbol "ActionCodeURL" needs to be exported by the entry point index.d.ts
52-
//
53-
// @public (undocumented)
54-
export class ActionCodeURL implements ActionCodeURL_2 {
51+
// @public
52+
export class ActionCodeURL {
5553
// @internal
5654
constructor(actionLink: string);
57-
// (undocumented)
5855
readonly apiKey: string;
59-
// (undocumented)
6056
readonly code: string;
61-
// (undocumented)
6257
readonly continueUrl: string | null;
63-
// (undocumented)
6458
readonly languageCode: string | null;
65-
// (undocumented)
6659
readonly operation: ActionCodeOperation;
67-
// (undocumented)
6860
static parseLink(link: string): ActionCodeURL | null;
69-
// (undocumented)
7061
readonly tenantId: string | null;
7162
}
7263

@@ -106,10 +97,12 @@ export interface Auth {
10697
useDeviceLanguage(): void;
10798
}
10899

109-
// @public (undocumented)
100+
// @public
110101
export class AuthCredential {
111102
// @internal
112-
protected constructor(providerId: string, signInMethod: string);
103+
protected constructor(
104+
providerId: string,
105+
signInMethod: string);
113106
// Warning: (ae-forgotten-export) The symbol "AuthInternal" needs to be exported by the entry point index.d.ts
114107
// Warning: (ae-forgotten-export) The symbol "PhoneOrOauthTokenResponse" needs to be exported by the entry point index.d.ts
115108
//
@@ -121,11 +114,8 @@ export class AuthCredential {
121114
//
122115
// @internal (undocumented)
123116
_linkToIdToken(_auth: AuthInternal, _idToken: string): Promise<IdTokenResponse>;
124-
// (undocumented)
125117
readonly providerId: string;
126-
// (undocumented)
127118
readonly signInMethod: string;
128-
// (undocumented)
129119
toJSON(): object;
130120
}
131121

@@ -194,17 +184,14 @@ export const debugErrorMap: AuthErrorMap;
194184
// @public
195185
export function deleteUser(user: User): Promise<void>;
196186

197-
// Warning: (ae-forgotten-export) The symbol "AuthCredential" needs to be exported by the entry point index.d.ts
198-
//
199187
// @public
200-
export class EmailAuthCredential extends AuthCredential implements AuthCredential_2 {
188+
export class EmailAuthCredential extends AuthCredential {
201189
// (undocumented)
202190
readonly email: string;
203191
// @internal (undocumented)
204192
static _fromEmailAndCode(email: string, oobCode: string, tenantId?: string | null): EmailAuthCredential;
205193
// @internal (undocumented)
206194
static _fromEmailAndPassword(email: string, password: string): EmailAuthCredential;
207-
// (undocumented)
208195
static fromJSON(json: object | string): EmailAuthCredential | null;
209196
// @internal (undocumented)
210197
_getIdTokenResponse(auth: AuthInternal): Promise<IdTokenResponse>;
@@ -216,35 +203,25 @@ export class EmailAuthCredential extends AuthCredential implements AuthCredentia
216203
readonly password: string;
217204
// (undocumented)
218205
readonly tenantId: string | null;
219-
// (undocumented)
220206
toJSON(): object;
221207
}
222208

223-
// Warning: (ae-forgotten-export) The symbol "EmailAuthProvider" needs to be exported by the entry point index.d.ts
224-
//
225-
// @public (undocumented)
226-
export class EmailAuthProvider implements EmailAuthProvider_2 {
227-
// (undocumented)
209+
// @public
210+
export class EmailAuthProvider implements AuthProvider {
228211
static credential(email: string, password: string): EmailAuthCredential;
229-
// (undocumented)
230212
static credentialWithLink(email: string, emailLink: string): EmailAuthCredential;
231-
// (undocumented)
232213
static readonly EMAIL_LINK_SIGN_IN_METHOD = SignInMethod.EMAIL_LINK;
233-
// (undocumented)
234214
static readonly EMAIL_PASSWORD_SIGN_IN_METHOD = SignInMethod.EMAIL_PASSWORD;
235-
// (undocumented)
236215
static readonly PROVIDER_ID = ProviderId.PASSWORD;
237-
// (undocumented)
238216
readonly providerId = ProviderId.PASSWORD;
239217
}
240218

241219
// @public
242220
export class FacebookAuthProvider extends OAuthProvider {
243221
constructor();
244-
// Warning: (ae-forgotten-export) The symbol "OAuthCredential" needs to be exported by the entry point index.d.ts
245-
static credential(accessToken: string): OAuthCredential_2;
246-
static credentialFromError(error: FirebaseError): OAuthCredential_2 | null;
247-
static credentialFromResult(userCredential: UserCredential): OAuthCredential_2 | null;
222+
static credential(accessToken: string): OAuthCredential;
223+
static credentialFromError(error: FirebaseError): OAuthCredential | null;
224+
static credentialFromResult(userCredential: UserCredential): OAuthCredential | null;
248225
static readonly FACEBOOK_SIGN_IN_METHOD = SignInMethod.FACEBOOK;
249226
static readonly PROVIDER_ID = ProviderId.FACEBOOK;
250227
}
@@ -280,19 +257,19 @@ export function getRedirectResult(auth: Auth, resolver?: PopupRedirectResolver):
280257
// @public
281258
export class GithubAuthProvider extends OAuthProvider {
282259
constructor();
283-
static credential(accessToken: string): OAuthCredential_2;
284-
static credentialFromError(error: FirebaseError): OAuthCredential_2 | null;
285-
static credentialFromResult(userCredential: UserCredential): OAuthCredential_2 | null;
260+
static credential(accessToken: string): OAuthCredential;
261+
static credentialFromError(error: FirebaseError): OAuthCredential | null;
262+
static credentialFromResult(userCredential: UserCredential): OAuthCredential | null;
286263
static readonly GITHUB_SIGN_IN_METHOD = SignInMethod.GITHUB;
287264
static readonly PROVIDER_ID = ProviderId.GITHUB;
288265
}
289266

290267
// @public
291268
export class GoogleAuthProvider extends OAuthProvider {
292269
constructor();
293-
static credential(idToken?: string | null, accessToken?: string | null): OAuthCredential_2;
294-
static credentialFromError(error: FirebaseError): OAuthCredential_2 | null;
295-
static credentialFromResult(userCredential: UserCredential): OAuthCredential_2 | null;
270+
static credential(idToken?: string | null, accessToken?: string | null): OAuthCredential;
271+
static credentialFromError(error: FirebaseError): OAuthCredential | null;
272+
static credentialFromResult(userCredential: UserCredential): OAuthCredential | null;
296273
static readonly GOOGLE_SIGN_IN_METHOD = SignInMethod.GOOGLE;
297274
static readonly PROVIDER_ID = ProviderId.GOOGLE;
298275
}
@@ -323,7 +300,7 @@ export const inMemoryPersistence: Persistence;
323300
export function isSignInWithEmailLink(auth: Auth, emailLink: string): boolean;
324301

325302
// @public
326-
export function linkWithCredential(user: User, credential: AuthCredential_2): Promise<UserCredential>;
303+
export function linkWithCredential(user: User, credential: AuthCredential): Promise<UserCredential>;
327304

328305
// @public
329306
export function linkWithPhoneNumber(user: User, phoneNumber: string, appVerifier: ApplicationVerifier): Promise<ConfirmationResult>;
@@ -374,11 +351,9 @@ export interface MultiFactorUser {
374351
unenroll(option: MultiFactorInfo | string): Promise<void>;
375352
}
376353

377-
// @public (undocumented)
378-
export class OAuthCredential extends AuthCredential implements OAuthCredential_2 {
379-
// (undocumented)
354+
// @public
355+
export class OAuthCredential extends AuthCredential {
380356
accessToken?: string;
381-
// (undocumented)
382357
static fromJSON(json: string | object): OAuthCredential | null;
383358
// Warning: (ae-forgotten-export) The symbol "OAuthCredentialParams" needs to be exported by the entry point index.d.ts
384359
//
@@ -388,15 +363,12 @@ export class OAuthCredential extends AuthCredential implements OAuthCredential_2
388363
_getIdTokenResponse(auth: AuthInternal): Promise<IdTokenResponse>;
389364
// @internal (undocumented)
390365
_getReauthenticationResolver(auth: AuthInternal): Promise<IdTokenResponse>;
391-
// (undocumented)
392366
idToken?: string;
393367
// @internal (undocumented)
394368
_linkToIdToken(auth: AuthInternal, idToken: string): Promise<IdTokenResponse>;
395369
// @internal (undocumented)
396370
nonce?: string;
397-
// (undocumented)
398371
secret?: string;
399-
// (undocumented)
400372
toJSON(): object;
401373
}
402374

@@ -411,11 +383,11 @@ export interface OAuthCredentialOptions {
411383
export class OAuthProvider implements AuthProvider {
412384
constructor(providerId: string);
413385
addScope(scope: string): AuthProvider;
414-
credential(params: OAuthCredentialOptions): OAuthCredential_2;
415-
static credentialFromError(error: FirebaseError): OAuthCredential_2 | null;
386+
credential(params: OAuthCredentialOptions): OAuthCredential;
387+
static credentialFromError(error: FirebaseError): OAuthCredential | null;
416388
// (undocumented)
417-
static credentialFromJSON(json: object | string): OAuthCredential_2;
418-
static credentialFromResult(userCredential: UserCredential): OAuthCredential_2 | null;
389+
static credentialFromJSON(json: object | string): OAuthCredential;
390+
static credentialFromResult(userCredential: UserCredential): OAuthCredential | null;
419391
// @internal (undocumented)
420392
defaultLanguageCode: string | null;
421393
getCustomParameters(): CustomParameters;
@@ -460,10 +432,10 @@ export interface Persistence {
460432
readonly type: 'SESSION' | 'LOCAL' | 'NONE';
461433
}
462434

463-
// Warning: (ae-forgotten-export) The symbol "PhoneAuthCredential" needs to be exported by the entry point index.d.ts
464-
//
465-
// @public (undocumented)
466-
export class PhoneAuthCredential extends AuthCredential implements PhoneAuthCredential_2 {
435+
// @public
436+
export class PhoneAuthCredential extends AuthCredential {
437+
// Warning: (ae-unresolved-inheritdoc-reference) The @inheritDoc reference could not be resolved: No member was found with name "fromJSON"
438+
//
467439
// (undocumented)
468440
static fromJSON(json: object | string): PhoneAuthCredential | null;
469441
// @internal (undocumented)
@@ -480,26 +452,18 @@ export class PhoneAuthCredential extends AuthCredential implements PhoneAuthCred
480452
//
481453
// @internal (undocumented)
482454
_makeVerificationRequest(): SignInWithPhoneNumberRequest;
483-
// (undocumented)
484455
toJSON(): object;
485456
}
486457

487-
// Warning: (ae-forgotten-export) The symbol "PhoneAuthProvider" needs to be exported by the entry point index.d.ts
488-
//
489-
// @public (undocumented)
490-
export class PhoneAuthProvider implements PhoneAuthProvider_2 {
458+
// @public
459+
export class PhoneAuthProvider {
491460
constructor(auth: Auth);
492-
// (undocumented)
493461
static credential(verificationId: string, verificationCode: string): PhoneAuthCredential;
494462
// (undocumented)
495-
static credentialFromResult(userCredential: UserCredential): AuthCredential_2 | null;
496-
// (undocumented)
463+
static credentialFromResult(userCredential: UserCredential): AuthCredential | null;
497464
static readonly PHONE_SIGN_IN_METHOD = SignInMethod.PHONE;
498-
// (undocumented)
499465
static readonly PROVIDER_ID = ProviderId.PHONE;
500-
// (undocumented)
501466
readonly providerId = ProviderId.PHONE;
502-
// (undocumented)
503467
verifyPhoneNumber(phoneOptions: PhoneInfoOptions | string, applicationVerifier: ApplicationVerifier): Promise<string>;
504468
}
505469

@@ -516,12 +480,9 @@ export interface PhoneMultiFactorEnrollInfoOptions {
516480
session: MultiFactorSession;
517481
}
518482

519-
// Warning: (ae-forgotten-export) The symbol "PhoneMultiFactorGenerator" needs to be exported by the entry point index.d.ts
520-
//
521-
// @public (undocumented)
522-
export class PhoneMultiFactorGenerator implements PhoneMultiFactorGenerator_2 {
523-
// (undocumented)
524-
static assertion(credential: PhoneAuthCredential_2): PhoneMultiFactorAssertion;
483+
// @public
484+
export class PhoneMultiFactorGenerator {
485+
static assertion(credential: PhoneAuthCredential): PhoneMultiFactorAssertion;
525486
}
526487

527488
// @public
@@ -573,7 +534,7 @@ export interface ReactNativeAsyncStorage {
573534
}
574535

575536
// @public
576-
export function reauthenticateWithCredential(user: User, credential: AuthCredential_2): Promise<UserCredential>;
537+
export function reauthenticateWithCredential(user: User, credential: AuthCredential): Promise<UserCredential>;
577538

578539
// @public
579540
export function reauthenticateWithPhoneNumber(user: User, phoneNumber: string, appVerifier: ApplicationVerifier): Promise<ConfirmationResult>;
@@ -584,26 +545,21 @@ export function reauthenticateWithPopup(user: User, provider: AuthProvider, reso
584545
// @public
585546
export function reauthenticateWithRedirect(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<never>;
586547

587-
// Warning: (ae-forgotten-export) The symbol "RecaptchaVerifier" needs to be exported by the entry point index.d.ts
588548
// Warning: (ae-forgotten-export) The symbol "ApplicationVerifierInternal" needs to be exported by the entry point index.d.ts
589549
//
590-
// @public (undocumented)
591-
export class RecaptchaVerifier implements RecaptchaVerifier_2, ApplicationVerifierInternal {
550+
// @public
551+
export class RecaptchaVerifier implements ApplicationVerifierInternal {
592552
// Warning: (ae-forgotten-export) The symbol "Parameters" needs to be exported by the entry point index.d.ts
593553
constructor(containerOrId: HTMLElement | string, parameters: Parameters_2, authExtern: Auth);
594-
// (undocumented)
595554
clear(): void;
596555
// Warning: (ae-forgotten-export) The symbol "ReCaptchaLoader" needs to be exported by the entry point index.d.ts
597556
//
598557
// @internal (undocumented)
599558
readonly _recaptchaLoader: ReCaptchaLoader;
600-
// (undocumented)
601559
render(): Promise<number>;
602560
// @internal (undocumented)
603561
_reset(): void;
604-
// (undocumented)
605562
readonly type = "recaptcha";
606-
// (undocumented)
607563
verify(): Promise<string>;
608564
}
609565

@@ -646,7 +602,7 @@ export const enum SignInMethod {
646602
}
647603

648604
// @public
649-
export function signInWithCredential(auth: Auth, credential: AuthCredential_2): Promise<UserCredential>;
605+
export function signInWithCredential(auth: Auth, credential: AuthCredential): Promise<UserCredential>;
650606

651607
// @public
652608
export function signInWithCustomToken(auth: Auth, customToken: string): Promise<UserCredential>;
@@ -672,9 +628,9 @@ export function signOut(auth: Auth): Promise<void>;
672628
// @public
673629
export class TwitterAuthProvider extends OAuthProvider {
674630
constructor();
675-
static credential(token: string, secret: string): OAuthCredential_2;
676-
static credentialFromError(error: FirebaseError): OAuthCredential_2 | null;
677-
static credentialFromResult(userCredential: UserCredential): OAuthCredential_2 | null;
631+
static credential(token: string, secret: string): OAuthCredential;
632+
static credentialFromError(error: FirebaseError): OAuthCredential | null;
633+
static credentialFromResult(userCredential: UserCredential): OAuthCredential | null;
678634
// (undocumented)
679635
static readonly PROVIDER_ID = ProviderId.TWITTER;
680636
// (undocumented)
@@ -694,7 +650,7 @@ export function updateEmail(user: User, newEmail: string): Promise<void>;
694650
export function updatePassword(user: User, newPassword: string): Promise<void>;
695651

696652
// @public
697-
export function updatePhoneNumber(user: User, credential: PhoneAuthCredential_2): Promise<void>;
653+
export function updatePhoneNumber(user: User, credential: PhoneAuthCredential): Promise<void>;
698654

699655
// Warning: (ae-forgotten-export) The symbol "Profile" needs to be exported by the entry point index.d.ts
700656
//

packages-exp/auth-exp/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export { RecaptchaVerifier } from './src/platform_browser/recaptcha/recaptcha_ve
104104
export { browserPopupRedirectResolver } from './src/platform_browser/popup_redirect';
105105

106106
// MFA
107-
export { PhoneMultiFactorGeneratorImpl as PhoneMultiFactorGenerator } from './src/platform_browser/mfa/assertions/phone';
107+
export { PhoneMultiFactorGenerator } from './src/platform_browser/mfa/assertions/phone';
108108

109109
/**
110110
* Initializes an Auth instance with platform specific default dependencies.

0 commit comments

Comments
 (0)