Skip to content

Commit 4d5906f

Browse files
Merge
2 parents fe0469f + 72b1096 commit 4d5906f

File tree

545 files changed

+20920
-7977
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

545 files changed

+20920
-7977
lines changed

.changeset/config.json

+2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
"@firebase/installations-exp",
2424
"@firebase/installations-compat",
2525
"@firebase/messaging-exp",
26+
"@firebase/messaging-compat",
2627
"@firebase/performance-exp",
28+
"@firebase/performance-compat",
2729
"@firebase/remote-config-exp",
2830
"@firebase/remote-config-compat",
2931
"firebase-exp",

.changeset/cyan-wasps-worry.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@firebase/util": patch
3+
---
4+
5+
Added a utility function and type for compat interop API

.changeset/giant-eggs-nail.md

-5
This file was deleted.

.changeset/honest-hounds-sin.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@firebase/firestore": patch
3+
---
4+
5+
Added new internal HTTP header to all network requests.

.changeset/lemon-laws-brush.md

-7
This file was deleted.

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

+21-16
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,10 @@ export class EmailAuthProvider implements AuthProvider {
216216
readonly providerId = ProviderId.PASSWORD;
217217
}
218218

219+
// Warning: (ae-forgotten-export) The symbol "BaseOAuthProvider" needs to be exported by the entry point index.d.ts
220+
//
219221
// @public
220-
export class FacebookAuthProvider extends OAuthProvider {
222+
export class FacebookAuthProvider extends BaseOAuthProvider {
221223
constructor();
222224
static credential(accessToken: string): OAuthCredential;
223225
static credentialFromError(error: FirebaseError): OAuthCredential | null;
@@ -255,7 +257,7 @@ export function getMultiFactorResolver(auth: Auth, error: MultiFactorError_2): M
255257
export function getRedirectResult(auth: Auth, resolver?: PopupRedirectResolver): Promise<UserCredential | null>;
256258

257259
// @public
258-
export class GithubAuthProvider extends OAuthProvider {
260+
export class GithubAuthProvider extends BaseOAuthProvider {
259261
constructor();
260262
static credential(accessToken: string): OAuthCredential;
261263
static credentialFromError(error: FirebaseError): OAuthCredential | null;
@@ -265,7 +267,7 @@ export class GithubAuthProvider extends OAuthProvider {
265267
}
266268

267269
// @public
268-
export class GoogleAuthProvider extends OAuthProvider {
270+
export class GoogleAuthProvider extends BaseOAuthProvider {
269271
constructor();
270272
static credential(idToken?: string | null, accessToken?: string | null): OAuthCredential;
271273
static credentialFromError(error: FirebaseError): OAuthCredential | null;
@@ -380,23 +382,13 @@ export interface OAuthCredentialOptions {
380382
}
381383

382384
// @public
383-
export class OAuthProvider implements AuthProvider {
384-
constructor(providerId: string);
385-
addScope(scope: string): AuthProvider;
385+
export class OAuthProvider extends BaseOAuthProvider {
386386
credential(params: OAuthCredentialOptions): OAuthCredential;
387387
static credentialFromError(error: FirebaseError): OAuthCredential | null;
388388
// (undocumented)
389389
static credentialFromJSON(json: object | string): OAuthCredential;
390390
static credentialFromResult(userCredential: UserCredential): OAuthCredential | null;
391-
// @internal (undocumented)
392-
defaultLanguageCode: string | null;
393-
getCustomParameters(): CustomParameters;
394-
getScopes(): string[];
395-
// (undocumented)
396-
readonly providerId: string;
397-
setCustomParameters(customOAuthParameters: CustomParameters): AuthProvider;
398-
setDefaultLanguage(languageCode: string | null): void;
399-
}
391+
}
400392

401393
// @public
402394
export function onAuthStateChanged(auth: Auth, nextOrObserver: NextOrObserver<User>, error?: ErrorFn, completed?: CompleteFn): Unsubscribe;
@@ -566,6 +558,19 @@ export class RecaptchaVerifier implements ApplicationVerifierInternal {
566558
// @public
567559
export function reload(user: User): Promise<void>;
568560

561+
// Warning: (ae-forgotten-export) The symbol "FederatedAuthProvider" needs to be exported by the entry point index.d.ts
562+
//
563+
// @public
564+
export class SAMLAuthProvider extends FederatedAuthProvider {
565+
constructor(providerId: string);
566+
// (undocumented)
567+
static credentialFromError(error: FirebaseError): AuthCredential | null;
568+
// (undocumented)
569+
static credentialFromJSON(json: string | object): AuthCredential;
570+
// (undocumented)
571+
static credentialFromResult(userCredential: UserCredential): AuthCredential | null;
572+
}
573+
569574
// @public
570575
export function sendEmailVerification(user: User, actionCodeSettings?: ActionCodeSettings | null): Promise<void>;
571576

@@ -626,7 +631,7 @@ export function signInWithRedirect(auth: Auth, provider: AuthProvider, resolver?
626631
export function signOut(auth: Auth): Promise<void>;
627632

628633
// @public
629-
export class TwitterAuthProvider extends OAuthProvider {
634+
export class TwitterAuthProvider extends BaseOAuthProvider {
630635
constructor();
631636
static credential(token: string, secret: string): OAuthCredential;
632637
static credentialFromError(error: FirebaseError): OAuthCredential | null;

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

+6
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ export class CollectionReference<T = DocumentData> extends Query<T> {
5353
get path(): string;
5454
// (undocumented)
5555
readonly type = "collection";
56+
withConverter(converter: null): CollectionReference<DocumentData>;
57+
// (undocumented)
5658
withConverter<U>(converter: FirestoreDataConverter<U>): CollectionReference<U>;
5759
}
5860

@@ -101,6 +103,8 @@ export class DocumentReference<T = DocumentData> {
101103
get parent(): CollectionReference<T>;
102104
get path(): string;
103105
readonly type = "document";
106+
withConverter(converter: null): DocumentReference<DocumentData>;
107+
// (undocumented)
104108
withConverter<U>(converter: FirestoreDataConverter<U>): DocumentReference<U>;
105109
}
106110

@@ -318,6 +322,8 @@ export class Query<T = DocumentData> {
318322
protected constructor();
319323
readonly firestore: FirebaseFirestore;
320324
readonly type: 'query' | 'collection';
325+
withConverter(converter: null): Query<DocumentData>;
326+
// (undocumented)
321327
withConverter<U>(converter: FirestoreDataConverter<U>): Query<U>;
322328
}
323329

common/api-review/firestore-lite.api.md

+6
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ export class CollectionReference<T = DocumentData> extends Query<T> {
4747
get path(): string;
4848
// (undocumented)
4949
readonly type = "collection";
50+
withConverter(converter: null): CollectionReference<DocumentData>;
51+
// (undocumented)
5052
withConverter<U>(converter: FirestoreDataConverter<U>): CollectionReference<U>;
5153
}
5254

@@ -81,6 +83,8 @@ export class DocumentReference<T = DocumentData> {
8183
get parent(): CollectionReference<T>;
8284
get path(): string;
8385
readonly type = "document";
86+
withConverter(converter: null): DocumentReference<DocumentData>;
87+
// (undocumented)
8488
withConverter<U>(converter: FirestoreDataConverter<U>): DocumentReference<U>;
8589
}
8690

@@ -195,6 +199,8 @@ export class Query<T = DocumentData> {
195199
protected constructor();
196200
readonly firestore: FirebaseFirestore;
197201
readonly type: 'query' | 'collection';
202+
withConverter(converter: null): Query<DocumentData>;
203+
// (undocumented)
198204
withConverter<U>(converter: FirestoreDataConverter<U>): Query<U>;
199205
}
200206

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

+5
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ export interface NotificationPayload {
6262
title?: string;
6363
}
6464

65+
// Warning: (ae-internal-missing-underscore) The name "onBackgroundMessage" should be prefixed with an underscore because the declaration is marked as @internal
66+
//
67+
// @internal
68+
export function onBackgroundMessage(messaging: FirebaseMessaging, nextOrObserver: NextFn<MessagePayload> | Observer<MessagePayload>): Unsubscribe;
69+
6570
// @public
6671
export function onMessage(messaging: FirebaseMessaging, nextOrObserver: NextFn<MessagePayload> | Observer<MessagePayload>): Unsubscribe;
6772

common/api-review/storage.api.md

+86-1
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,32 @@
66

77
import { CompleteFn } from '@firebase/util';
88
import { FirebaseApp } from '@firebase/app';
9+
import { FirebaseAuthInternalName } from '@firebase/auth-interop-types';
910
import { FirebaseError } from '@firebase/util';
11+
import { _FirebaseService } from '@firebase/app';
1012
import { NextFn } from '@firebase/util';
13+
import { Provider } from '@firebase/component';
1114
import { Subscribe } from '@firebase/util';
1215
import { Unsubscribe } from '@firebase/util';
1316

1417
// @public
1518
export function deleteObject(ref: StorageReference): Promise<void>;
1619

20+
// @internal (undocumented)
21+
export class _FbsBlob {
22+
constructor(data: Blob | Uint8Array | ArrayBuffer, elideCopy?: boolean);
23+
// (undocumented)
24+
static getBlob(...args: Array<string | _FbsBlob>): _FbsBlob | null;
25+
// (undocumented)
26+
size(): number;
27+
// (undocumented)
28+
slice(startByte: number, endByte: number): _FbsBlob | null;
29+
// (undocumented)
30+
type(): string;
31+
// (undocumented)
32+
uploadData(): Blob | Uint8Array;
33+
}
34+
1735
// @public
1836
export interface FirebaseStorageError extends FirebaseError {
1937
serverResponse: string | null;
@@ -33,6 +51,9 @@ export interface FullMetadata extends UploadMetadata {
3351
updated: string;
3452
}
3553

54+
// @internal (undocumented)
55+
export function _getChild(ref: StorageReference, childPath: string): _Reference;
56+
3657
// @public
3758
export function getDownloadURL(ref: StorageReference): Promise<string>;
3859

@@ -61,12 +82,50 @@ export interface ListResult {
6182
prefixes: StorageReference[];
6283
}
6384

85+
// @internal
86+
export class _Location {
87+
constructor(bucket: string, path: string);
88+
// (undocumented)
89+
readonly bucket: string;
90+
// (undocumented)
91+
bucketOnlyServerUrl(): string;
92+
// (undocumented)
93+
fullServerUrl(): string;
94+
// (undocumented)
95+
get isRoot(): boolean;
96+
// (undocumented)
97+
static makeFromBucketSpec(bucketString: string): _Location;
98+
// (undocumented)
99+
static makeFromUrl(url: string): _Location;
100+
// (undocumented)
101+
get path(): string;
102+
}
103+
64104
// @public
65105
export function ref(storage: StorageService, url?: string): StorageReference;
66106

67107
// @public
68108
export function ref(storageOrRef: StorageService | StorageReference, path?: string): StorageReference;
69109

110+
// @internal
111+
export class _Reference {
112+
// Warning: (ae-forgotten-export) The symbol "StorageService" needs to be exported by the entry point index.d.ts
113+
constructor(_service: StorageService_2, location: string | _Location);
114+
get bucket(): string;
115+
get fullPath(): string;
116+
// (undocumented)
117+
_location: _Location;
118+
get name(): string;
119+
// (undocumented)
120+
protected _newRef(service: StorageService_2, location: _Location): _Reference;
121+
get parent(): _Reference | null;
122+
get root(): _Reference;
123+
get storage(): StorageService_2;
124+
_throwIfRoot(name: string): void;
125+
// @override
126+
toString(): string;
127+
}
128+
70129
// @public
71130
export interface SettableMetadata {
72131
cacheControl?: string | undefined;
@@ -101,7 +160,7 @@ export interface StorageReference {
101160
}
102161

103162
// @public
104-
export interface StorageService {
163+
export interface StorageService extends _FirebaseService {
105164
readonly app: FirebaseApp;
106165
maxOperationRetryTime: number;
107166
maxUploadRetryTime: number;
@@ -158,6 +217,32 @@ export interface UploadTask {
158217
then(onFulfilled?: ((snapshot: UploadTaskSnapshot) => unknown) | null, onRejected?: ((error: FirebaseStorageError) => unknown) | null): Promise<unknown>;
159218
}
160219

220+
// @internal
221+
export class _UploadTask {
222+
constructor(ref: _Reference, blob: _FbsBlob, metadata?: Metadata | null);
223+
_blob: _FbsBlob;
224+
cancel(): boolean;
225+
catch<T>(onRejected: (p1: FirebaseStorageError_2) => T | Promise<T>): Promise<T>;
226+
// Warning: (ae-forgotten-export) The symbol "Metadata" needs to be exported by the entry point index.d.ts
227+
_metadata: Metadata | null;
228+
// Warning: (ae-forgotten-export) The symbol "TaskEvent" needs to be exported by the entry point index.d.ts
229+
// Warning: (ae-forgotten-export) The symbol "StorageObserver" needs to be exported by the entry point index.d.ts
230+
// Warning: (ae-forgotten-export) The symbol "ErrorFn" needs to be exported by the entry point index.d.ts
231+
// Warning: (ae-forgotten-export) The symbol "CompleteFn" needs to be exported by the entry point index.d.ts
232+
// Warning: (ae-forgotten-export) The symbol "Unsubscribe" needs to be exported by the entry point index.d.ts
233+
// Warning: (ae-forgotten-export) The symbol "Subscribe" needs to be exported by the entry point index.d.ts
234+
on(type: TaskEvent_2, nextOrObserver?: StorageObserver_2<UploadTaskSnapshot_2> | ((a: UploadTaskSnapshot_2) => unknown), error?: ErrorFn, completed?: CompleteFn_2): Unsubscribe_2 | Subscribe_2<UploadTaskSnapshot_2>;
235+
pause(): boolean;
236+
resume(): boolean;
237+
// Warning: (ae-forgotten-export) The symbol "UploadTaskSnapshot" needs to be exported by the entry point index.d.ts
238+
get snapshot(): UploadTaskSnapshot_2;
239+
// Warning: (ae-forgotten-export) The symbol "InternalTaskState" needs to be exported by the entry point index.d.ts
240+
_state: InternalTaskState;
241+
// Warning: (ae-forgotten-export) The symbol "FirebaseStorageError" needs to be exported by the entry point index.d.ts
242+
then<U>(onFulfilled?: ((value: UploadTaskSnapshot_2) => U | Promise<U>) | null, onRejected?: ((error: FirebaseStorageError_2) => U | Promise<U>) | null): Promise<U>;
243+
_transferred: number;
244+
}
245+
161246
// @public
162247
export interface UploadTaskSnapshot {
163248
bytesTransferred: number;

integration/firebase/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test"
88
},
99
"devDependencies": {
10-
"firebase": "8.2.10",
10+
"firebase": "8.3.1",
1111
"@types/chai": "4.2.14",
1212
"@types/mocha": "7.0.2",
1313
"chai": "4.2.0",

integration/firestore/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"test:memory:debug": "yarn build:memory; karma start --auto-watch --browsers Chrome"
1515
},
1616
"devDependencies": {
17-
"@firebase/app": "0.6.15",
18-
"@firebase/firestore": "2.1.7",
17+
"@firebase/app": "0.6.17",
18+
"@firebase/firestore": "2.2.1",
1919
"@types/mocha": "7.0.2",
2020
"gulp": "4.0.2",
2121
"gulp-filter": "6.0.0",

integration/messaging/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"test:manual": "mocha --exit"
1010
},
1111
"devDependencies": {
12-
"firebase": "8.2.10",
12+
"firebase": "8.3.1",
1313
"chai": "4.2.0",
14-
"chromedriver": "88.0.0",
14+
"chromedriver": "89.0.0",
1515
"express": "4.17.1",
1616
"geckodriver": "1.21.1",
1717
"mocha": "7.2.0",

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
"api-report": "lerna run --scope @firebase/*-exp --scope @firebase/firestore --scope @firebase/storage --scope @firebase/storage-types --scope @firebase/database api-report",
5454
"docgen:exp": "ts-node-script scripts/exp/docgen.ts",
5555
"postinstall": "yarn --cwd repo-scripts/changelog-generator build",
56-
"sa": "ts-node-script repo-scripts/size-analysis/cli.ts"
56+
"sa": "ts-node-script repo-scripts/size-analysis/cli.ts",
57+
"api-documenter-devsite": "ts-node-script repo-scripts/api-documenter/src/start.ts"
5758
},
5859
"repository": {
5960
"type": "git",
@@ -89,8 +90,8 @@
8990
"@typescript-eslint/eslint-plugin": "4.11.1",
9091
"@typescript-eslint/eslint-plugin-tslint": "4.11.1",
9192
"@typescript-eslint/parser": "4.11.1",
92-
"api-documenter-me": "0.1.0",
93-
"api-extractor-me": "0.1.1",
93+
"api-documenter-me": "0.1.1",
94+
"api-extractor-me": "0.1.2",
9495
"babel-loader": "8.2.2",
9596
"chai": "4.2.0",
9697
"chai-as-promised": "7.1.1",

0 commit comments

Comments
 (0)