@firebase/installations 0.6.10 → 0.6.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.esm2017.js +1102 -1102
- package/dist/esm/index.esm2017.js.map +1 -1
- package/dist/esm/src/api/delete-installations.d.ts +24 -24
- package/dist/esm/src/api/delete-installations.test.d.ts +17 -17
- package/dist/esm/src/api/get-id.d.ts +25 -25
- package/dist/esm/src/api/get-id.test.d.ts +17 -17
- package/dist/esm/src/api/get-installations.d.ts +26 -26
- package/dist/esm/src/api/get-token.d.ts +26 -26
- package/dist/esm/src/api/get-token.test.d.ts +17 -17
- package/dist/esm/src/api/index.d.ts +21 -21
- package/dist/esm/src/api/on-id-change.d.ts +39 -39
- package/dist/esm/src/api/on-id-change.test.d.ts +17 -17
- package/dist/esm/src/functions/common.d.ts +38 -38
- package/dist/esm/src/functions/common.test.d.ts +17 -17
- package/dist/esm/src/functions/config.d.ts +17 -17
- package/dist/esm/src/functions/create-installation-request.d.ts +19 -19
- package/dist/esm/src/functions/create-installation-request.test.d.ts +17 -17
- package/dist/esm/src/functions/delete-installation-request.d.ts +19 -19
- package/dist/esm/src/functions/delete-installation-request.test.d.ts +17 -17
- package/dist/esm/src/functions/generate-auth-token-request.d.ts +19 -19
- package/dist/esm/src/functions/generate-auth-token-request.test.d.ts +17 -17
- package/dist/esm/src/helpers/buffer-to-base64-url-safe.d.ts +17 -17
- package/dist/esm/src/helpers/buffer-to-base64-url-safe.test.d.ts +17 -17
- package/dist/esm/src/helpers/extract-app-config.d.ts +19 -19
- package/dist/esm/src/helpers/extract-app-config.test.d.ts +17 -17
- package/dist/esm/src/helpers/fid-changed.d.ts +25 -25
- package/dist/esm/src/helpers/fid-changed.test.d.ts +17 -17
- package/dist/esm/src/helpers/generate-fid.d.ts +23 -23
- package/dist/esm/src/helpers/generate-fid.test.d.ts +17 -17
- package/dist/esm/src/helpers/get-installation-entry.d.ts +28 -28
- package/dist/esm/src/helpers/get-installation-entry.test.d.ts +17 -17
- package/dist/esm/src/helpers/idb-manager.d.ts +32 -32
- package/dist/esm/src/helpers/idb-manager.test.d.ts +17 -17
- package/dist/esm/src/helpers/refresh-auth-token.d.ts +25 -25
- package/dist/esm/src/helpers/refresh-auth-token.test.d.ts +17 -17
- package/dist/esm/src/index.d.ts +8 -8
- package/dist/esm/src/interfaces/api-response.d.ts +31 -31
- package/dist/esm/src/interfaces/installation-entry.d.ts +85 -85
- package/dist/esm/src/interfaces/installation-impl.d.ts +29 -29
- package/dist/esm/src/interfaces/public-types.d.ts +50 -50
- package/dist/esm/src/testing/compare-headers.d.ts +21 -21
- package/dist/esm/src/testing/compare-headers.test.d.ts +17 -17
- package/dist/esm/src/testing/fake-generators.d.ts +21 -21
- package/dist/esm/src/testing/setup.d.ts +17 -17
- package/dist/esm/src/util/constants.d.ts +23 -23
- package/dist/esm/src/util/errors.d.ts +46 -46
- package/dist/esm/src/util/get-key.d.ts +19 -19
- package/dist/esm/src/util/sleep.d.ts +18 -18
- package/dist/esm/src/util/sleep.test.d.ts +17 -17
- package/dist/index.cjs.js +1102 -1102
- package/dist/index.cjs.js.map +1 -1
- package/dist/src/api/delete-installations.d.ts +24 -24
- package/dist/src/api/delete-installations.test.d.ts +17 -17
- package/dist/src/api/get-id.d.ts +25 -25
- package/dist/src/api/get-id.test.d.ts +17 -17
- package/dist/src/api/get-installations.d.ts +26 -26
- package/dist/src/api/get-token.d.ts +26 -26
- package/dist/src/api/get-token.test.d.ts +17 -17
- package/dist/src/api/index.d.ts +21 -21
- package/dist/src/api/on-id-change.d.ts +39 -39
- package/dist/src/api/on-id-change.test.d.ts +17 -17
- package/dist/src/functions/common.d.ts +38 -38
- package/dist/src/functions/common.test.d.ts +17 -17
- package/dist/src/functions/config.d.ts +17 -17
- package/dist/src/functions/create-installation-request.d.ts +19 -19
- package/dist/src/functions/create-installation-request.test.d.ts +17 -17
- package/dist/src/functions/delete-installation-request.d.ts +19 -19
- package/dist/src/functions/delete-installation-request.test.d.ts +17 -17
- package/dist/src/functions/generate-auth-token-request.d.ts +19 -19
- package/dist/src/functions/generate-auth-token-request.test.d.ts +17 -17
- package/dist/src/helpers/buffer-to-base64-url-safe.d.ts +17 -17
- package/dist/src/helpers/buffer-to-base64-url-safe.test.d.ts +17 -17
- package/dist/src/helpers/extract-app-config.d.ts +19 -19
- package/dist/src/helpers/extract-app-config.test.d.ts +17 -17
- package/dist/src/helpers/fid-changed.d.ts +25 -25
- package/dist/src/helpers/fid-changed.test.d.ts +17 -17
- package/dist/src/helpers/generate-fid.d.ts +23 -23
- package/dist/src/helpers/generate-fid.test.d.ts +17 -17
- package/dist/src/helpers/get-installation-entry.d.ts +28 -28
- package/dist/src/helpers/get-installation-entry.test.d.ts +17 -17
- package/dist/src/helpers/idb-manager.d.ts +32 -32
- package/dist/src/helpers/idb-manager.test.d.ts +17 -17
- package/dist/src/helpers/refresh-auth-token.d.ts +25 -25
- package/dist/src/helpers/refresh-auth-token.test.d.ts +17 -17
- package/dist/src/index.d.ts +8 -8
- package/dist/src/interfaces/api-response.d.ts +31 -31
- package/dist/src/interfaces/installation-entry.d.ts +85 -85
- package/dist/src/interfaces/installation-impl.d.ts +29 -29
- package/dist/src/interfaces/public-types.d.ts +50 -50
- package/dist/src/testing/compare-headers.d.ts +21 -21
- package/dist/src/testing/compare-headers.test.d.ts +17 -17
- package/dist/src/testing/fake-generators.d.ts +21 -21
- package/dist/src/testing/setup.d.ts +17 -17
- package/dist/src/util/constants.d.ts +23 -23
- package/dist/src/util/errors.d.ts +46 -46
- package/dist/src/util/get-key.d.ts +19 -19
- package/dist/src/util/sleep.d.ts +18 -18
- package/dist/src/util/sleep.test.d.ts +17 -17
- package/package.json +5 -5
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import { Installations } from '../interfaces/public-types';
|
|
18
|
-
/**
|
|
19
|
-
* Returns a Firebase Installations auth token, identifying the current
|
|
20
|
-
* Firebase Installation.
|
|
21
|
-
* @param installations - The `Installations` instance.
|
|
22
|
-
* @param forceRefresh - Force refresh regardless of token expiration.
|
|
23
|
-
*
|
|
24
|
-
* @public
|
|
25
|
-
*/
|
|
26
|
-
export declare function getToken(installations: Installations, forceRefresh?: boolean): Promise<string>;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { Installations } from '../interfaces/public-types';
|
|
18
|
+
/**
|
|
19
|
+
* Returns a Firebase Installations auth token, identifying the current
|
|
20
|
+
* Firebase Installation.
|
|
21
|
+
* @param installations - The `Installations` instance.
|
|
22
|
+
* @param forceRefresh - Force refresh regardless of token expiration.
|
|
23
|
+
*
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export declare function getToken(installations: Installations, forceRefresh?: boolean): Promise<string>;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import '../testing/setup';
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import '../testing/setup';
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
export * from './get-id';
|
|
18
|
-
export * from './get-token';
|
|
19
|
-
export * from './delete-installations';
|
|
20
|
-
export * from './on-id-change';
|
|
21
|
-
export * from './get-installations';
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export * from './get-id';
|
|
18
|
+
export * from './get-token';
|
|
19
|
+
export * from './delete-installations';
|
|
20
|
+
export * from './on-id-change';
|
|
21
|
+
export * from './get-installations';
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import { Installations } from '../interfaces/public-types';
|
|
18
|
-
/**
|
|
19
|
-
* An user defined callback function that gets called when Installations ID changes.
|
|
20
|
-
*
|
|
21
|
-
* @public
|
|
22
|
-
*/
|
|
23
|
-
export
|
|
24
|
-
/**
|
|
25
|
-
* Unsubscribe a callback function previously added via {@link IdChangeCallbackFn}.
|
|
26
|
-
*
|
|
27
|
-
* @public
|
|
28
|
-
*/
|
|
29
|
-
export
|
|
30
|
-
/**
|
|
31
|
-
* Sets a new callback that will get called when Installation ID changes.
|
|
32
|
-
* Returns an unsubscribe function that will remove the callback when called.
|
|
33
|
-
* @param installations - The `Installations` instance.
|
|
34
|
-
* @param callback - The callback function that is invoked when FID changes.
|
|
35
|
-
* @returns A function that can be called to unsubscribe.
|
|
36
|
-
*
|
|
37
|
-
* @public
|
|
38
|
-
*/
|
|
39
|
-
export declare function onIdChange(installations: Installations, callback: IdChangeCallbackFn): IdChangeUnsubscribeFn;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { Installations } from '../interfaces/public-types';
|
|
18
|
+
/**
|
|
19
|
+
* An user defined callback function that gets called when Installations ID changes.
|
|
20
|
+
*
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
export type IdChangeCallbackFn = (installationId: string) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Unsubscribe a callback function previously added via {@link IdChangeCallbackFn}.
|
|
26
|
+
*
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
export type IdChangeUnsubscribeFn = () => void;
|
|
30
|
+
/**
|
|
31
|
+
* Sets a new callback that will get called when Installation ID changes.
|
|
32
|
+
* Returns an unsubscribe function that will remove the callback when called.
|
|
33
|
+
* @param installations - The `Installations` instance.
|
|
34
|
+
* @param callback - The callback function that is invoked when FID changes.
|
|
35
|
+
* @returns A function that can be called to unsubscribe.
|
|
36
|
+
*
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
export declare function onIdChange(installations: Installations, callback: IdChangeCallbackFn): IdChangeUnsubscribeFn;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import '../testing/setup';
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import '../testing/setup';
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import { FirebaseError } from '@firebase/util';
|
|
18
|
-
import { GenerateAuthTokenResponse } from '../interfaces/api-response';
|
|
19
|
-
import { CompletedAuthToken, RegisteredInstallationEntry } from '../interfaces/installation-entry';
|
|
20
|
-
import { AppConfig } from '../interfaces/installation-impl';
|
|
21
|
-
export declare function getInstallationsEndpoint({ projectId }: AppConfig): string;
|
|
22
|
-
export declare function extractAuthTokenInfoFromResponse(response: GenerateAuthTokenResponse): CompletedAuthToken;
|
|
23
|
-
export declare function getErrorFromResponse(requestName: string, response: Response): Promise<FirebaseError>;
|
|
24
|
-
export declare function getHeaders({ apiKey }: AppConfig): Headers;
|
|
25
|
-
export declare function getHeadersWithAuth(appConfig: AppConfig, { refreshToken }: RegisteredInstallationEntry): Headers;
|
|
26
|
-
export interface ErrorResponse {
|
|
27
|
-
error: {
|
|
28
|
-
code: number;
|
|
29
|
-
message: string;
|
|
30
|
-
status: string;
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Calls the passed in fetch wrapper and returns the response.
|
|
35
|
-
* If the returned response has a status of 5xx, re-runs the function once and
|
|
36
|
-
* returns the response.
|
|
37
|
-
*/
|
|
38
|
-
export declare function retryIfServerError(fn: () => Promise<Response>): Promise<Response>;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { FirebaseError } from '@firebase/util';
|
|
18
|
+
import { GenerateAuthTokenResponse } from '../interfaces/api-response';
|
|
19
|
+
import { CompletedAuthToken, RegisteredInstallationEntry } from '../interfaces/installation-entry';
|
|
20
|
+
import { AppConfig } from '../interfaces/installation-impl';
|
|
21
|
+
export declare function getInstallationsEndpoint({ projectId }: AppConfig): string;
|
|
22
|
+
export declare function extractAuthTokenInfoFromResponse(response: GenerateAuthTokenResponse): CompletedAuthToken;
|
|
23
|
+
export declare function getErrorFromResponse(requestName: string, response: Response): Promise<FirebaseError>;
|
|
24
|
+
export declare function getHeaders({ apiKey }: AppConfig): Headers;
|
|
25
|
+
export declare function getHeadersWithAuth(appConfig: AppConfig, { refreshToken }: RegisteredInstallationEntry): Headers;
|
|
26
|
+
export interface ErrorResponse {
|
|
27
|
+
error: {
|
|
28
|
+
code: number;
|
|
29
|
+
message: string;
|
|
30
|
+
status: string;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Calls the passed in fetch wrapper and returns the response.
|
|
35
|
+
* If the returned response has a status of 5xx, re-runs the function once and
|
|
36
|
+
* returns the response.
|
|
37
|
+
*/
|
|
38
|
+
export declare function retryIfServerError(fn: () => Promise<Response>): Promise<Response>;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import '../testing/setup';
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import '../testing/setup';
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2020 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
export declare function registerInstallations(): void;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export declare function registerInstallations(): void;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import { InProgressInstallationEntry, RegisteredInstallationEntry } from '../interfaces/installation-entry';
|
|
18
|
-
import { FirebaseInstallationsImpl } from '../interfaces/installation-impl';
|
|
19
|
-
export declare function createInstallationRequest({ appConfig, heartbeatServiceProvider }: FirebaseInstallationsImpl, { fid }: InProgressInstallationEntry): Promise<RegisteredInstallationEntry>;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { InProgressInstallationEntry, RegisteredInstallationEntry } from '../interfaces/installation-entry';
|
|
18
|
+
import { FirebaseInstallationsImpl } from '../interfaces/installation-impl';
|
|
19
|
+
export declare function createInstallationRequest({ appConfig, heartbeatServiceProvider }: FirebaseInstallationsImpl, { fid }: InProgressInstallationEntry): Promise<RegisteredInstallationEntry>;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import '../testing/setup';
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import '../testing/setup';
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import { AppConfig } from '../interfaces/installation-impl';
|
|
18
|
-
import { RegisteredInstallationEntry } from '../interfaces/installation-entry';
|
|
19
|
-
export declare function deleteInstallationRequest(appConfig: AppConfig, installationEntry: RegisteredInstallationEntry): Promise<void>;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { AppConfig } from '../interfaces/installation-impl';
|
|
18
|
+
import { RegisteredInstallationEntry } from '../interfaces/installation-entry';
|
|
19
|
+
export declare function deleteInstallationRequest(appConfig: AppConfig, installationEntry: RegisteredInstallationEntry): Promise<void>;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import '../testing/setup';
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import '../testing/setup';
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import { CompletedAuthToken, RegisteredInstallationEntry } from '../interfaces/installation-entry';
|
|
18
|
-
import { FirebaseInstallationsImpl } from '../interfaces/installation-impl';
|
|
19
|
-
export declare function generateAuthTokenRequest({ appConfig, heartbeatServiceProvider }: FirebaseInstallationsImpl, installationEntry: RegisteredInstallationEntry): Promise<CompletedAuthToken>;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { CompletedAuthToken, RegisteredInstallationEntry } from '../interfaces/installation-entry';
|
|
18
|
+
import { FirebaseInstallationsImpl } from '../interfaces/installation-impl';
|
|
19
|
+
export declare function generateAuthTokenRequest({ appConfig, heartbeatServiceProvider }: FirebaseInstallationsImpl, installationEntry: RegisteredInstallationEntry): Promise<CompletedAuthToken>;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
import '../testing/setup';
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import '../testing/setup';
|