@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.
Files changed (119) hide show
  1. package/dist/esm/index.esm2017.js +1173 -1173
  2. package/dist/esm/index.esm2017.js.map +1 -1
  3. package/dist/esm/index.sw.esm2017.js +1228 -1228
  4. package/dist/esm/index.sw.esm2017.js.map +1 -1
  5. package/dist/esm/src/api/deleteToken.d.ts +18 -18
  6. package/dist/esm/src/api/getToken.d.ts +19 -19
  7. package/dist/esm/src/api/isSupported.d.ts +30 -30
  8. package/dist/esm/src/api/onBackgroundMessage.d.ts +19 -19
  9. package/dist/esm/src/api/onMessage.d.ts +19 -19
  10. package/dist/esm/src/api/setDeliveryMetricsExportedToBigQueryEnabled.d.ts +18 -18
  11. package/dist/esm/src/api.d.ts +101 -101
  12. package/dist/esm/src/helpers/array-base64-translator.d.ts +18 -18
  13. package/dist/esm/src/helpers/array-base64-translator.test.d.ts +17 -17
  14. package/dist/esm/src/helpers/externalizePayload.d.ts +19 -19
  15. package/dist/esm/src/helpers/externalizePayload.test.d.ts +17 -17
  16. package/dist/esm/src/helpers/extract-app-config.d.ts +19 -19
  17. package/dist/esm/src/helpers/extract-app-config.test.d.ts +17 -17
  18. package/dist/esm/src/helpers/is-console-message.d.ts +18 -18
  19. package/dist/esm/src/helpers/logToFirelog.d.ts +30 -30
  20. package/dist/esm/src/helpers/logToFirelog.test.d.ts +17 -17
  21. package/dist/esm/src/helpers/logToScion.d.ts +19 -19
  22. package/dist/esm/src/helpers/migrate-old-database.d.ts +51 -51
  23. package/dist/esm/src/helpers/migrate-old-database.test.d.ts +17 -17
  24. package/dist/esm/src/helpers/register.d.ts +23 -23
  25. package/dist/esm/src/helpers/registerDefaultSw.d.ts +18 -18
  26. package/dist/esm/src/helpers/sleep.d.ts +18 -18
  27. package/dist/esm/src/helpers/sleep.test.d.ts +17 -17
  28. package/dist/esm/src/helpers/updateSwReg.d.ts +18 -18
  29. package/dist/esm/src/helpers/updateVapidKey.d.ts +18 -18
  30. package/dist/esm/src/index.d.ts +32 -32
  31. package/dist/esm/src/index.sw.d.ts +26 -26
  32. package/dist/esm/src/interfaces/app-config.d.ts +24 -24
  33. package/dist/esm/src/interfaces/internal-dependencies.d.ts +27 -27
  34. package/dist/esm/src/interfaces/internal-message-payload.d.ts +65 -46
  35. package/dist/esm/src/interfaces/logging-types.d.ts +60 -60
  36. package/dist/esm/src/interfaces/public-types.d.ts +144 -144
  37. package/dist/esm/src/interfaces/token-details.d.ts +32 -32
  38. package/dist/esm/src/internals/idb-manager.d.ts +27 -27
  39. package/dist/esm/src/internals/idb-manager.test.d.ts +17 -17
  40. package/dist/esm/src/internals/requests.d.ts +35 -35
  41. package/dist/esm/src/internals/requests.test.d.ts +17 -17
  42. package/dist/esm/src/internals/token-manager.d.ts +23 -23
  43. package/dist/esm/src/internals/token-manager.test.d.ts +17 -17
  44. package/dist/esm/src/listeners/sw-listeners.d.ts +21 -21
  45. package/dist/esm/src/listeners/sw-listeners.test.d.ts +17 -17
  46. package/dist/esm/src/listeners/window-listener.d.ts +18 -18
  47. package/dist/esm/src/messaging-service.d.ts +36 -36
  48. package/dist/esm/src/testing/compare-headers.d.ts +22 -22
  49. package/dist/esm/src/testing/compare-headers.test.d.ts +17 -17
  50. package/dist/esm/src/testing/fakes/firebase-dependencies.d.ts +25 -25
  51. package/dist/esm/src/testing/fakes/logging-object.d.ts +18 -18
  52. package/dist/esm/src/testing/fakes/messaging-service.d.ts +18 -18
  53. package/dist/esm/src/testing/fakes/service-worker.d.ts +83 -83
  54. package/dist/esm/src/testing/fakes/token-details.d.ts +18 -18
  55. package/dist/esm/src/testing/setup.d.ts +17 -17
  56. package/dist/esm/src/testing/sinon-types.d.ts +19 -19
  57. package/dist/esm/src/util/constants.d.ts +39 -39
  58. package/dist/esm/src/util/errors.d.ts +57 -57
  59. package/dist/esm/src/util/sw-types.d.ts +90 -90
  60. package/dist/index.cjs.js +1173 -1173
  61. package/dist/index.cjs.js.map +1 -1
  62. package/dist/index.sw.cjs +1228 -1228
  63. package/dist/index.sw.cjs.map +1 -1
  64. package/dist/src/api/deleteToken.d.ts +18 -18
  65. package/dist/src/api/getToken.d.ts +19 -19
  66. package/dist/src/api/isSupported.d.ts +30 -30
  67. package/dist/src/api/onBackgroundMessage.d.ts +19 -19
  68. package/dist/src/api/onMessage.d.ts +19 -19
  69. package/dist/src/api/setDeliveryMetricsExportedToBigQueryEnabled.d.ts +18 -18
  70. package/dist/src/api.d.ts +101 -101
  71. package/dist/src/helpers/array-base64-translator.d.ts +18 -18
  72. package/dist/src/helpers/array-base64-translator.test.d.ts +17 -17
  73. package/dist/src/helpers/externalizePayload.d.ts +19 -19
  74. package/dist/src/helpers/externalizePayload.test.d.ts +17 -17
  75. package/dist/src/helpers/extract-app-config.d.ts +19 -19
  76. package/dist/src/helpers/extract-app-config.test.d.ts +17 -17
  77. package/dist/src/helpers/is-console-message.d.ts +18 -18
  78. package/dist/src/helpers/logToFirelog.d.ts +30 -30
  79. package/dist/src/helpers/logToFirelog.test.d.ts +17 -17
  80. package/dist/src/helpers/logToScion.d.ts +19 -19
  81. package/dist/src/helpers/migrate-old-database.d.ts +51 -51
  82. package/dist/src/helpers/migrate-old-database.test.d.ts +17 -17
  83. package/dist/src/helpers/register.d.ts +23 -23
  84. package/dist/src/helpers/registerDefaultSw.d.ts +18 -18
  85. package/dist/src/helpers/sleep.d.ts +18 -18
  86. package/dist/src/helpers/sleep.test.d.ts +17 -17
  87. package/dist/src/helpers/updateSwReg.d.ts +18 -18
  88. package/dist/src/helpers/updateVapidKey.d.ts +18 -18
  89. package/dist/src/index.d.ts +32 -32
  90. package/dist/src/index.sw.d.ts +26 -26
  91. package/dist/src/interfaces/app-config.d.ts +24 -24
  92. package/dist/src/interfaces/internal-dependencies.d.ts +27 -27
  93. package/dist/src/interfaces/internal-message-payload.d.ts +65 -46
  94. package/dist/src/interfaces/logging-types.d.ts +60 -60
  95. package/dist/src/interfaces/public-types.d.ts +144 -144
  96. package/dist/src/interfaces/token-details.d.ts +32 -32
  97. package/dist/src/internals/idb-manager.d.ts +27 -27
  98. package/dist/src/internals/idb-manager.test.d.ts +17 -17
  99. package/dist/src/internals/requests.d.ts +35 -35
  100. package/dist/src/internals/requests.test.d.ts +17 -17
  101. package/dist/src/internals/token-manager.d.ts +23 -23
  102. package/dist/src/internals/token-manager.test.d.ts +17 -17
  103. package/dist/src/listeners/sw-listeners.d.ts +21 -21
  104. package/dist/src/listeners/sw-listeners.test.d.ts +17 -17
  105. package/dist/src/listeners/window-listener.d.ts +18 -18
  106. package/dist/src/messaging-service.d.ts +36 -36
  107. package/dist/src/testing/compare-headers.d.ts +22 -22
  108. package/dist/src/testing/compare-headers.test.d.ts +17 -17
  109. package/dist/src/testing/fakes/firebase-dependencies.d.ts +25 -25
  110. package/dist/src/testing/fakes/logging-object.d.ts +18 -18
  111. package/dist/src/testing/fakes/messaging-service.d.ts +18 -18
  112. package/dist/src/testing/fakes/service-worker.d.ts +83 -83
  113. package/dist/src/testing/fakes/token-details.d.ts +18 -18
  114. package/dist/src/testing/setup.d.ts +17 -17
  115. package/dist/src/testing/sinon-types.d.ts +19 -19
  116. package/dist/src/util/constants.d.ts +39 -39
  117. package/dist/src/util/errors.d.ts +57 -57
  118. package/dist/src/util/sw-types.d.ts +90 -90
  119. 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';