@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,30 +1,30 @@
|
|
|
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 { LogEvent, LogRequest } from '../interfaces/logging-types';
|
|
18
|
-
import { MessagePayloadInternal } from '../interfaces/internal-message-payload';
|
|
19
|
-
import { MessagingService } from '../messaging-service';
|
|
20
|
-
export declare function startLoggingService(messaging: MessagingService): void;
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
* @param messaging the messaging instance.
|
|
24
|
-
* @param offsetInMs this method execute after `offsetInMs` elapsed .
|
|
25
|
-
*/
|
|
26
|
-
export declare function _processQueue(messaging: MessagingService, offsetInMs: number): void;
|
|
27
|
-
export declare function _dispatchLogEvents(messaging: MessagingService): Promise<void>;
|
|
28
|
-
export declare function stageLog(messaging: MessagingService, internalPayload: MessagePayloadInternal): Promise<void>;
|
|
29
|
-
export declare function _createLogRequest(logEventQueue: LogEvent[]): LogRequest;
|
|
30
|
-
export declare function _mergeStrings(s1: string, s2: string): 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 { LogEvent, LogRequest } from '../interfaces/logging-types';
|
|
18
|
+
import { MessagePayloadInternal } from '../interfaces/internal-message-payload';
|
|
19
|
+
import { MessagingService } from '../messaging-service';
|
|
20
|
+
export declare function startLoggingService(messaging: MessagingService): void;
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @param messaging the messaging instance.
|
|
24
|
+
* @param offsetInMs this method execute after `offsetInMs` elapsed .
|
|
25
|
+
*/
|
|
26
|
+
export declare function _processQueue(messaging: MessagingService, offsetInMs: number): void;
|
|
27
|
+
export declare function _dispatchLogEvents(messaging: MessagingService): Promise<void>;
|
|
28
|
+
export declare function stageLog(messaging: MessagingService, internalPayload: MessagePayloadInternal): Promise<void>;
|
|
29
|
+
export declare function _createLogRequest(logEventQueue: LogEvent[]): LogRequest;
|
|
30
|
+
export declare function _mergeStrings(s1: string, s2: string): 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
|
-
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
|
+
export {};
|
|
@@ -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 { ConsoleMessageData, MessageType } from '../interfaces/internal-message-payload';
|
|
18
|
-
import { MessagingService } from '../messaging-service';
|
|
19
|
-
export declare function logToScion(messaging: MessagingService, messageType: MessageType, data: ConsoleMessageData): 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 { ConsoleMessageData, MessageType } from '../interfaces/internal-message-payload';
|
|
18
|
+
import { MessagingService } from '../messaging-service';
|
|
19
|
+
export declare function logToScion(messaging: MessagingService, messageType: MessageType, data: ConsoleMessageData): Promise<void>;
|
|
@@ -1,51 +1,51 @@
|
|
|
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 { TokenDetails } from '../interfaces/token-details';
|
|
18
|
-
export interface V2TokenDetails {
|
|
19
|
-
fcmToken: string;
|
|
20
|
-
swScope: string;
|
|
21
|
-
vapidKey: string | Uint8Array;
|
|
22
|
-
subscription: PushSubscription;
|
|
23
|
-
fcmSenderId: string;
|
|
24
|
-
fcmPushSet: string;
|
|
25
|
-
createTime?: number;
|
|
26
|
-
endpoint?: string;
|
|
27
|
-
auth?: string;
|
|
28
|
-
p256dh?: string;
|
|
29
|
-
}
|
|
30
|
-
export interface V3TokenDetails {
|
|
31
|
-
fcmToken: string;
|
|
32
|
-
swScope: string;
|
|
33
|
-
vapidKey: Uint8Array;
|
|
34
|
-
fcmSenderId: string;
|
|
35
|
-
fcmPushSet: string;
|
|
36
|
-
endpoint: string;
|
|
37
|
-
auth: ArrayBuffer;
|
|
38
|
-
p256dh: ArrayBuffer;
|
|
39
|
-
createTime: number;
|
|
40
|
-
}
|
|
41
|
-
export interface V4TokenDetails {
|
|
42
|
-
fcmToken: string;
|
|
43
|
-
swScope: string;
|
|
44
|
-
vapidKey: Uint8Array;
|
|
45
|
-
fcmSenderId: string;
|
|
46
|
-
endpoint: string;
|
|
47
|
-
auth: ArrayBufferLike;
|
|
48
|
-
p256dh: ArrayBufferLike;
|
|
49
|
-
createTime: number;
|
|
50
|
-
}
|
|
51
|
-
export declare function migrateOldDatabase(senderId: string): Promise<TokenDetails | null>;
|
|
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 { TokenDetails } from '../interfaces/token-details';
|
|
18
|
+
export interface V2TokenDetails {
|
|
19
|
+
fcmToken: string;
|
|
20
|
+
swScope: string;
|
|
21
|
+
vapidKey: string | Uint8Array;
|
|
22
|
+
subscription: PushSubscription;
|
|
23
|
+
fcmSenderId: string;
|
|
24
|
+
fcmPushSet: string;
|
|
25
|
+
createTime?: number;
|
|
26
|
+
endpoint?: string;
|
|
27
|
+
auth?: string;
|
|
28
|
+
p256dh?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface V3TokenDetails {
|
|
31
|
+
fcmToken: string;
|
|
32
|
+
swScope: string;
|
|
33
|
+
vapidKey: Uint8Array;
|
|
34
|
+
fcmSenderId: string;
|
|
35
|
+
fcmPushSet: string;
|
|
36
|
+
endpoint: string;
|
|
37
|
+
auth: ArrayBuffer;
|
|
38
|
+
p256dh: ArrayBuffer;
|
|
39
|
+
createTime: number;
|
|
40
|
+
}
|
|
41
|
+
export interface V4TokenDetails {
|
|
42
|
+
fcmToken: string;
|
|
43
|
+
swScope: string;
|
|
44
|
+
vapidKey: Uint8Array;
|
|
45
|
+
fcmSenderId: string;
|
|
46
|
+
endpoint: string;
|
|
47
|
+
auth: ArrayBufferLike;
|
|
48
|
+
p256dh: ArrayBufferLike;
|
|
49
|
+
createTime: number;
|
|
50
|
+
}
|
|
51
|
+
export declare function migrateOldDatabase(senderId: string): Promise<TokenDetails | null>;
|
|
@@ -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 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 registerMessagingInWindow(): void;
|
|
18
|
-
/**
|
|
19
|
-
* The messaging instance registered in sw is named differently than that of in client. This is
|
|
20
|
-
* because both `registerMessagingInWindow` and `registerMessagingInSw` would be called in
|
|
21
|
-
* `messaging-compat` and component with the same name can only be registered once.
|
|
22
|
-
*/
|
|
23
|
-
export declare function registerMessagingInSw(): 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 registerMessagingInWindow(): void;
|
|
18
|
+
/**
|
|
19
|
+
* The messaging instance registered in sw is named differently than that of in client. This is
|
|
20
|
+
* because both `registerMessagingInWindow` and `registerMessagingInSw` would be called in
|
|
21
|
+
* `messaging-compat` and component with the same name can only be registered once.
|
|
22
|
+
*/
|
|
23
|
+
export declare function registerMessagingInSw(): void;
|
|
@@ -1,18 +1,18 @@
|
|
|
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 { MessagingService } from '../messaging-service';
|
|
18
|
-
export declare function registerDefaultSw(messaging: MessagingService): Promise<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
|
+
import { MessagingService } from '../messaging-service';
|
|
18
|
+
export declare function registerDefaultSw(messaging: MessagingService): Promise<void>;
|
|
@@ -1,18 +1,18 @@
|
|
|
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
|
-
/** Returns a promise that resolves after given time passes. */
|
|
18
|
-
export declare function sleep(ms: number): 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
|
+
/** Returns a promise that resolves after given time passes. */
|
|
18
|
+
export declare function sleep(ms: number): 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,18 +1,18 @@
|
|
|
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 { MessagingService } from '../messaging-service';
|
|
18
|
-
export declare function updateSwReg(messaging: MessagingService, swRegistration?: ServiceWorkerRegistration | undefined): Promise<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
|
+
import { MessagingService } from '../messaging-service';
|
|
18
|
+
export declare function updateSwReg(messaging: MessagingService, swRegistration?: ServiceWorkerRegistration | undefined): Promise<void>;
|
|
@@ -1,18 +1,18 @@
|
|
|
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 { MessagingService } from '../messaging-service';
|
|
18
|
-
export declare function updateVapidKey(messaging: MessagingService, vapidKey?: string | undefined): Promise<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
|
+
import { MessagingService } from '../messaging-service';
|
|
18
|
+
export declare function updateVapidKey(messaging: MessagingService, vapidKey?: string | undefined): Promise<void>;
|
package/dist/esm/src/index.d.ts
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The Firebase Cloud Messaging Web SDK.
|
|
3
|
-
* This SDK does not work in a Node.js environment.
|
|
4
|
-
*
|
|
5
|
-
* @packageDocumentation
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* @license
|
|
9
|
-
* Copyright 2017 Google LLC
|
|
10
|
-
*
|
|
11
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
12
|
-
* you may not use this file except in compliance with the License.
|
|
13
|
-
* You may obtain a copy of the License at
|
|
14
|
-
*
|
|
15
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
-
*
|
|
17
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
18
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
19
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
20
|
-
* See the License for the specific language governing permissions and
|
|
21
|
-
* limitations under the License.
|
|
22
|
-
*/
|
|
23
|
-
import '@firebase/installations';
|
|
24
|
-
import { Messaging } from './interfaces/public-types';
|
|
25
|
-
export { getToken, deleteToken, onMessage, getMessagingInWindow as getMessaging } from './api';
|
|
26
|
-
export { isWindowSupported as isSupported } from './api/isSupported';
|
|
27
|
-
export * from './interfaces/public-types';
|
|
28
|
-
declare module '@firebase/component' {
|
|
29
|
-
interface NameServiceMapping {
|
|
30
|
-
'messaging': Messaging;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* The Firebase Cloud Messaging Web SDK.
|
|
3
|
+
* This SDK does not work in a Node.js environment.
|
|
4
|
+
*
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* @license
|
|
9
|
+
* Copyright 2017 Google LLC
|
|
10
|
+
*
|
|
11
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
12
|
+
* you may not use this file except in compliance with the License.
|
|
13
|
+
* You may obtain a copy of the License at
|
|
14
|
+
*
|
|
15
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
+
*
|
|
17
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
18
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
19
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
20
|
+
* See the License for the specific language governing permissions and
|
|
21
|
+
* limitations under the License.
|
|
22
|
+
*/
|
|
23
|
+
import '@firebase/installations';
|
|
24
|
+
import { Messaging } from './interfaces/public-types';
|
|
25
|
+
export { getToken, deleteToken, onMessage, getMessagingInWindow as getMessaging } from './api';
|
|
26
|
+
export { isWindowSupported as isSupported } from './api/isSupported';
|
|
27
|
+
export * from './interfaces/public-types';
|
|
28
|
+
declare module '@firebase/component' {
|
|
29
|
+
interface NameServiceMapping {
|
|
30
|
+
'messaging': Messaging;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -1,26 +1,26 @@
|
|
|
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 '@firebase/installations';
|
|
18
|
-
import { Messaging } from './interfaces/public-types';
|
|
19
|
-
export * from './interfaces/public-types';
|
|
20
|
-
export { onBackgroundMessage, getMessagingInSw as getMessaging, experimentalSetDeliveryMetricsExportedToBigQueryEnabled } from './api';
|
|
21
|
-
export { isSwSupported as isSupported } from './api/isSupported';
|
|
22
|
-
declare module '@firebase/component' {
|
|
23
|
-
interface NameServiceMapping {
|
|
24
|
-
'messaging-sw': Messaging;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
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 '@firebase/installations';
|
|
18
|
+
import { Messaging } from './interfaces/public-types';
|
|
19
|
+
export * from './interfaces/public-types';
|
|
20
|
+
export { onBackgroundMessage, getMessagingInSw as getMessaging, experimentalSetDeliveryMetricsExportedToBigQueryEnabled } from './api';
|
|
21
|
+
export { isSwSupported as isSupported } from './api/isSupported';
|
|
22
|
+
declare module '@firebase/component' {
|
|
23
|
+
interface NameServiceMapping {
|
|
24
|
+
'messaging-sw': Messaging;
|
|
25
|
+
}
|
|
26
|
+
}
|