@firebase/messaging 0.12.13 → 0.12.14
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 +1173 -1173
- package/dist/esm/index.esm2017.js.map +1 -1
- package/dist/esm/index.sw.esm2017.js +1228 -1228
- package/dist/esm/index.sw.esm2017.js.map +1 -1
- package/dist/esm/src/api/deleteToken.d.ts +18 -18
- package/dist/esm/src/api/getToken.d.ts +19 -19
- package/dist/esm/src/api/isSupported.d.ts +30 -30
- package/dist/esm/src/api/onBackgroundMessage.d.ts +19 -19
- package/dist/esm/src/api/onMessage.d.ts +19 -19
- package/dist/esm/src/api/setDeliveryMetricsExportedToBigQueryEnabled.d.ts +18 -18
- package/dist/esm/src/api.d.ts +101 -101
- package/dist/esm/src/helpers/array-base64-translator.d.ts +18 -18
- package/dist/esm/src/helpers/array-base64-translator.test.d.ts +17 -17
- package/dist/esm/src/helpers/externalizePayload.d.ts +19 -19
- package/dist/esm/src/helpers/externalizePayload.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/is-console-message.d.ts +18 -18
- package/dist/esm/src/helpers/logToFirelog.d.ts +30 -30
- package/dist/esm/src/helpers/logToFirelog.test.d.ts +17 -17
- package/dist/esm/src/helpers/logToScion.d.ts +19 -19
- package/dist/esm/src/helpers/migrate-old-database.d.ts +51 -51
- package/dist/esm/src/helpers/migrate-old-database.test.d.ts +17 -17
- package/dist/esm/src/helpers/register.d.ts +23 -23
- package/dist/esm/src/helpers/registerDefaultSw.d.ts +18 -18
- package/dist/esm/src/helpers/sleep.d.ts +18 -18
- package/dist/esm/src/helpers/sleep.test.d.ts +17 -17
- package/dist/esm/src/helpers/updateSwReg.d.ts +18 -18
- package/dist/esm/src/helpers/updateVapidKey.d.ts +18 -18
- package/dist/esm/src/index.d.ts +32 -32
- package/dist/esm/src/index.sw.d.ts +26 -26
- package/dist/esm/src/interfaces/app-config.d.ts +24 -24
- package/dist/esm/src/interfaces/internal-dependencies.d.ts +27 -27
- package/dist/esm/src/interfaces/internal-message-payload.d.ts +65 -46
- package/dist/esm/src/interfaces/logging-types.d.ts +60 -60
- package/dist/esm/src/interfaces/public-types.d.ts +144 -144
- package/dist/esm/src/interfaces/token-details.d.ts +32 -32
- package/dist/esm/src/internals/idb-manager.d.ts +27 -27
- package/dist/esm/src/internals/idb-manager.test.d.ts +17 -17
- package/dist/esm/src/internals/requests.d.ts +35 -35
- package/dist/esm/src/internals/requests.test.d.ts +17 -17
- package/dist/esm/src/internals/token-manager.d.ts +23 -23
- package/dist/esm/src/internals/token-manager.test.d.ts +17 -17
- package/dist/esm/src/listeners/sw-listeners.d.ts +21 -21
- package/dist/esm/src/listeners/sw-listeners.test.d.ts +17 -17
- package/dist/esm/src/listeners/window-listener.d.ts +18 -18
- package/dist/esm/src/messaging-service.d.ts +36 -36
- package/dist/esm/src/testing/compare-headers.d.ts +22 -22
- package/dist/esm/src/testing/compare-headers.test.d.ts +17 -17
- package/dist/esm/src/testing/fakes/firebase-dependencies.d.ts +25 -25
- package/dist/esm/src/testing/fakes/logging-object.d.ts +18 -18
- package/dist/esm/src/testing/fakes/messaging-service.d.ts +18 -18
- package/dist/esm/src/testing/fakes/service-worker.d.ts +83 -83
- package/dist/esm/src/testing/fakes/token-details.d.ts +18 -18
- package/dist/esm/src/testing/setup.d.ts +17 -17
- package/dist/esm/src/testing/sinon-types.d.ts +19 -19
- package/dist/esm/src/util/constants.d.ts +39 -39
- package/dist/esm/src/util/errors.d.ts +57 -57
- package/dist/esm/src/util/sw-types.d.ts +90 -90
- package/dist/index.cjs.js +1173 -1173
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.sw.cjs +1228 -1228
- package/dist/index.sw.cjs.map +1 -1
- package/dist/src/api/deleteToken.d.ts +18 -18
- package/dist/src/api/getToken.d.ts +19 -19
- package/dist/src/api/isSupported.d.ts +30 -30
- package/dist/src/api/onBackgroundMessage.d.ts +19 -19
- package/dist/src/api/onMessage.d.ts +19 -19
- package/dist/src/api/setDeliveryMetricsExportedToBigQueryEnabled.d.ts +18 -18
- package/dist/src/api.d.ts +101 -101
- package/dist/src/helpers/array-base64-translator.d.ts +18 -18
- package/dist/src/helpers/array-base64-translator.test.d.ts +17 -17
- package/dist/src/helpers/externalizePayload.d.ts +19 -19
- package/dist/src/helpers/externalizePayload.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/is-console-message.d.ts +18 -18
- package/dist/src/helpers/logToFirelog.d.ts +30 -30
- package/dist/src/helpers/logToFirelog.test.d.ts +17 -17
- package/dist/src/helpers/logToScion.d.ts +19 -19
- package/dist/src/helpers/migrate-old-database.d.ts +51 -51
- package/dist/src/helpers/migrate-old-database.test.d.ts +17 -17
- package/dist/src/helpers/register.d.ts +23 -23
- package/dist/src/helpers/registerDefaultSw.d.ts +18 -18
- package/dist/src/helpers/sleep.d.ts +18 -18
- package/dist/src/helpers/sleep.test.d.ts +17 -17
- package/dist/src/helpers/updateSwReg.d.ts +18 -18
- package/dist/src/helpers/updateVapidKey.d.ts +18 -18
- package/dist/src/index.d.ts +32 -32
- package/dist/src/index.sw.d.ts +26 -26
- package/dist/src/interfaces/app-config.d.ts +24 -24
- package/dist/src/interfaces/internal-dependencies.d.ts +27 -27
- package/dist/src/interfaces/internal-message-payload.d.ts +65 -46
- package/dist/src/interfaces/logging-types.d.ts +60 -60
- package/dist/src/interfaces/public-types.d.ts +144 -144
- package/dist/src/interfaces/token-details.d.ts +32 -32
- package/dist/src/internals/idb-manager.d.ts +27 -27
- package/dist/src/internals/idb-manager.test.d.ts +17 -17
- package/dist/src/internals/requests.d.ts +35 -35
- package/dist/src/internals/requests.test.d.ts +17 -17
- package/dist/src/internals/token-manager.d.ts +23 -23
- package/dist/src/internals/token-manager.test.d.ts +17 -17
- package/dist/src/listeners/sw-listeners.d.ts +21 -21
- package/dist/src/listeners/sw-listeners.test.d.ts +17 -17
- package/dist/src/listeners/window-listener.d.ts +18 -18
- package/dist/src/messaging-service.d.ts +36 -36
- package/dist/src/testing/compare-headers.d.ts +22 -22
- package/dist/src/testing/compare-headers.test.d.ts +17 -17
- package/dist/src/testing/fakes/firebase-dependencies.d.ts +25 -25
- package/dist/src/testing/fakes/logging-object.d.ts +18 -18
- package/dist/src/testing/fakes/messaging-service.d.ts +18 -18
- package/dist/src/testing/fakes/service-worker.d.ts +83 -83
- package/dist/src/testing/fakes/token-details.d.ts +18 -18
- package/dist/src/testing/setup.d.ts +17 -17
- package/dist/src/testing/sinon-types.d.ts +19 -19
- package/dist/src/util/constants.d.ts +39 -39
- package/dist/src/util/errors.d.ts +57 -57
- package/dist/src/util/sw-types.d.ts +90 -90
- package/package.json +8 -8
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2018 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 interface TokenDetails {
|
|
18
|
-
token: string;
|
|
19
|
-
createTime: number;
|
|
20
|
-
/** Does not exist in Safari since it's not using Push API. */
|
|
21
|
-
subscriptionOptions?: SubscriptionOptions;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Additional options and values required by a Push API subscription.
|
|
25
|
-
*/
|
|
26
|
-
export interface SubscriptionOptions {
|
|
27
|
-
vapidKey: string;
|
|
28
|
-
swScope: string;
|
|
29
|
-
endpoint: string;
|
|
30
|
-
auth: string;
|
|
31
|
-
p256dh: string;
|
|
32
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2018 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 interface TokenDetails {
|
|
18
|
+
token: string;
|
|
19
|
+
createTime: number;
|
|
20
|
+
/** Does not exist in Safari since it's not using Push API. */
|
|
21
|
+
subscriptionOptions?: SubscriptionOptions;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Additional options and values required by a Push API subscription.
|
|
25
|
+
*/
|
|
26
|
+
export interface SubscriptionOptions {
|
|
27
|
+
vapidKey: string;
|
|
28
|
+
swScope: string;
|
|
29
|
+
endpoint: string;
|
|
30
|
+
auth: string;
|
|
31
|
+
p256dh: string;
|
|
32
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
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 { FirebaseInternalDependencies } from '../interfaces/internal-dependencies';
|
|
18
|
-
import { TokenDetails } from '../interfaces/token-details';
|
|
19
|
-
export declare const DATABASE_NAME = "firebase-messaging-database";
|
|
20
|
-
/** Gets record(s) from the objectStore that match the given key. */
|
|
21
|
-
export declare function dbGet(firebaseDependencies: FirebaseInternalDependencies): Promise<TokenDetails | undefined>;
|
|
22
|
-
/** Assigns or overwrites the record for the given key with the given value. */
|
|
23
|
-
export declare function dbSet(firebaseDependencies: FirebaseInternalDependencies, tokenDetails: TokenDetails): Promise<TokenDetails>;
|
|
24
|
-
/** Removes record(s) from the objectStore that match the given key. */
|
|
25
|
-
export declare function dbRemove(firebaseDependencies: FirebaseInternalDependencies): Promise<void>;
|
|
26
|
-
/** Deletes the DB. Useful for tests. */
|
|
27
|
-
export declare function dbDelete(): 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 { FirebaseInternalDependencies } from '../interfaces/internal-dependencies';
|
|
18
|
+
import { TokenDetails } from '../interfaces/token-details';
|
|
19
|
+
export declare const DATABASE_NAME = "firebase-messaging-database";
|
|
20
|
+
/** Gets record(s) from the objectStore that match the given key. */
|
|
21
|
+
export declare function dbGet(firebaseDependencies: FirebaseInternalDependencies): Promise<TokenDetails | undefined>;
|
|
22
|
+
/** Assigns or overwrites the record for the given key with the given value. */
|
|
23
|
+
export declare function dbSet(firebaseDependencies: FirebaseInternalDependencies, tokenDetails: TokenDetails): Promise<TokenDetails>;
|
|
24
|
+
/** Removes record(s) from the objectStore that match the given key. */
|
|
25
|
+
export declare function dbRemove(firebaseDependencies: FirebaseInternalDependencies): Promise<void>;
|
|
26
|
+
/** Deletes the DB. Useful for tests. */
|
|
27
|
+
export declare function dbDelete(): 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,35 +1,35 @@
|
|
|
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 { SubscriptionOptions, TokenDetails } from '../interfaces/token-details';
|
|
18
|
-
import { FirebaseInternalDependencies } from '../interfaces/internal-dependencies';
|
|
19
|
-
export interface ApiResponse {
|
|
20
|
-
token?: string;
|
|
21
|
-
error?: {
|
|
22
|
-
message: string;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
export interface ApiRequestBody {
|
|
26
|
-
web: {
|
|
27
|
-
endpoint: string;
|
|
28
|
-
p256dh: string;
|
|
29
|
-
auth: string;
|
|
30
|
-
applicationPubKey?: string;
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
export declare function requestGetToken(firebaseDependencies: FirebaseInternalDependencies, subscriptionOptions: SubscriptionOptions): Promise<string>;
|
|
34
|
-
export declare function requestUpdateToken(firebaseDependencies: FirebaseInternalDependencies, tokenDetails: TokenDetails): Promise<string>;
|
|
35
|
-
export declare function requestDeleteToken(firebaseDependencies: FirebaseInternalDependencies, token: string): 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 { SubscriptionOptions, TokenDetails } from '../interfaces/token-details';
|
|
18
|
+
import { FirebaseInternalDependencies } from '../interfaces/internal-dependencies';
|
|
19
|
+
export interface ApiResponse {
|
|
20
|
+
token?: string;
|
|
21
|
+
error?: {
|
|
22
|
+
message: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export interface ApiRequestBody {
|
|
26
|
+
web: {
|
|
27
|
+
endpoint: string;
|
|
28
|
+
p256dh: string;
|
|
29
|
+
auth: string;
|
|
30
|
+
applicationPubKey?: string;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export declare function requestGetToken(firebaseDependencies: FirebaseInternalDependencies, subscriptionOptions: SubscriptionOptions): Promise<string>;
|
|
34
|
+
export declare function requestUpdateToken(firebaseDependencies: FirebaseInternalDependencies, tokenDetails: TokenDetails): Promise<string>;
|
|
35
|
+
export declare function requestDeleteToken(firebaseDependencies: FirebaseInternalDependencies, token: string): 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,23 +1,23 @@
|
|
|
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 { MessagingService } from '../messaging-service';
|
|
18
|
-
export declare function getTokenInternal(messaging: MessagingService): Promise<string>;
|
|
19
|
-
/**
|
|
20
|
-
* This method deletes the token from the database, unsubscribes the token from FCM, and unregisters
|
|
21
|
-
* the push subscription if it exists.
|
|
22
|
-
*/
|
|
23
|
-
export declare function deleteTokenInternal(messaging: MessagingService): Promise<boolean>;
|
|
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 { MessagingService } from '../messaging-service';
|
|
18
|
+
export declare function getTokenInternal(messaging: MessagingService): Promise<string>;
|
|
19
|
+
/**
|
|
20
|
+
* This method deletes the token from the database, unsubscribes the token from FCM, and unregisters
|
|
21
|
+
* the push subscription if it exists.
|
|
22
|
+
*/
|
|
23
|
+
export declare function deleteTokenInternal(messaging: MessagingService): Promise<boolean>;
|
|
@@ -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 2017 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 { NotificationEvent, PushEvent, PushSubscriptionChangeEvent } from '../util/sw-types';
|
|
18
|
-
import { MessagingService } from '../messaging-service';
|
|
19
|
-
export declare function onSubChange(event: PushSubscriptionChangeEvent, messaging: MessagingService): Promise<void>;
|
|
20
|
-
export declare function onPush(event: PushEvent, messaging: MessagingService): Promise<void>;
|
|
21
|
-
export declare function onNotificationClick(event: NotificationEvent): Promise<void>;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 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 { NotificationEvent, PushEvent, PushSubscriptionChangeEvent } from '../util/sw-types';
|
|
18
|
+
import { MessagingService } from '../messaging-service';
|
|
19
|
+
export declare function onSubChange(event: PushSubscriptionChangeEvent, messaging: MessagingService): Promise<void>;
|
|
20
|
+
export declare function onPush(event: PushEvent, messaging: MessagingService): Promise<void>;
|
|
21
|
+
export declare function onNotificationClick(event: NotificationEvent): Promise<void>;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 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 2017 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,18 +1,18 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 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 { MessagingService } from '../messaging-service';
|
|
18
|
-
export declare function messageEventListener(messaging: MessagingService, event: MessageEvent): Promise<void>;
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2017 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 { MessagingService } from '../messaging-service';
|
|
18
|
+
export declare function messageEventListener(messaging: MessagingService, event: MessageEvent): Promise<void>;
|
|
@@ -1,36 +1,36 @@
|
|
|
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
|
-
import { FirebaseApp, _FirebaseService } from '@firebase/app';
|
|
18
|
-
import { MessagePayload, NextFn, Observer } from './interfaces/public-types';
|
|
19
|
-
import { FirebaseAnalyticsInternalName } from '@firebase/analytics-interop-types';
|
|
20
|
-
import { FirebaseInternalDependencies } from './interfaces/internal-dependencies';
|
|
21
|
-
import { LogEvent } from './interfaces/logging-types';
|
|
22
|
-
import { Provider } from '@firebase/component';
|
|
23
|
-
import { _FirebaseInstallationsInternal } from '@firebase/installations';
|
|
24
|
-
export declare class MessagingService implements _FirebaseService {
|
|
25
|
-
readonly app: FirebaseApp;
|
|
26
|
-
readonly firebaseDependencies: FirebaseInternalDependencies;
|
|
27
|
-
swRegistration?: ServiceWorkerRegistration;
|
|
28
|
-
vapidKey?: string;
|
|
29
|
-
deliveryMetricsExportedToBigQueryEnabled: boolean;
|
|
30
|
-
onBackgroundMessageHandler: NextFn<MessagePayload> | Observer<MessagePayload> | null;
|
|
31
|
-
onMessageHandler: NextFn<MessagePayload> | Observer<MessagePayload> | null;
|
|
32
|
-
logEvents: LogEvent[];
|
|
33
|
-
isLogServiceStarted: boolean;
|
|
34
|
-
constructor(app: FirebaseApp, installations: _FirebaseInstallationsInternal, analyticsProvider: Provider<FirebaseAnalyticsInternalName>);
|
|
35
|
-
_delete(): Promise<void>;
|
|
36
|
-
}
|
|
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
|
+
import { FirebaseApp, _FirebaseService } from '@firebase/app';
|
|
18
|
+
import { MessagePayload, NextFn, Observer } from './interfaces/public-types';
|
|
19
|
+
import { FirebaseAnalyticsInternalName } from '@firebase/analytics-interop-types';
|
|
20
|
+
import { FirebaseInternalDependencies } from './interfaces/internal-dependencies';
|
|
21
|
+
import { LogEvent } from './interfaces/logging-types';
|
|
22
|
+
import { Provider } from '@firebase/component';
|
|
23
|
+
import { _FirebaseInstallationsInternal } from '@firebase/installations';
|
|
24
|
+
export declare class MessagingService implements _FirebaseService {
|
|
25
|
+
readonly app: FirebaseApp;
|
|
26
|
+
readonly firebaseDependencies: FirebaseInternalDependencies;
|
|
27
|
+
swRegistration?: ServiceWorkerRegistration;
|
|
28
|
+
vapidKey?: string;
|
|
29
|
+
deliveryMetricsExportedToBigQueryEnabled: boolean;
|
|
30
|
+
onBackgroundMessageHandler: NextFn<MessagePayload> | Observer<MessagePayload> | null;
|
|
31
|
+
onMessageHandler: NextFn<MessagePayload> | Observer<MessagePayload> | null;
|
|
32
|
+
logEvents: LogEvent[];
|
|
33
|
+
isLogServiceStarted: boolean;
|
|
34
|
+
constructor(app: FirebaseApp, installations: _FirebaseInstallationsInternal, analyticsProvider: Provider<FirebaseAnalyticsInternalName>);
|
|
35
|
+
_delete(): Promise<void>;
|
|
36
|
+
}
|
|
@@ -1,22 +1,22 @@
|
|
|
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 './setup';
|
|
18
|
-
declare class HeadersWithEntries extends Headers {
|
|
19
|
-
entries?(): Iterable<[string, string]>;
|
|
20
|
-
}
|
|
21
|
-
export declare function compareHeaders(expectedHeaders: HeadersWithEntries, actualHeaders: HeadersWithEntries): void;
|
|
22
|
-
export {};
|
|
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 './setup';
|
|
18
|
+
declare class HeadersWithEntries extends Headers {
|
|
19
|
+
entries?(): Iterable<[string, string]>;
|
|
20
|
+
}
|
|
21
|
+
export declare function compareHeaders(expectedHeaders: HeadersWithEntries, actualHeaders: HeadersWithEntries): void;
|
|
22
|
+
export {};
|
|
@@ -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 './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 './setup';
|