@firebase/messaging 0.9.2 → 0.9.3-2021102231614
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/CHANGELOG.md +12 -0
- package/dist/{index.esm.js → esm/index.esm.js} +2 -2
- package/dist/esm/index.esm.js.map +1 -0
- package/dist/{index.esm2017.js → esm/index.esm2017.js} +2 -2
- package/dist/esm/index.esm2017.js.map +1 -0
- package/dist/esm/package.json +1 -0
- package/dist/esm/src/api/deleteToken.d.ts +18 -0
- package/dist/esm/src/api/getToken.d.ts +19 -0
- package/dist/esm/src/api/isSupported.d.ts +30 -0
- package/dist/esm/src/api/onBackgroundMessage.d.ts +19 -0
- package/dist/esm/src/api/onMessage.d.ts +19 -0
- package/dist/esm/src/api/setDeliveryMetricsExportedToBigQueryEnabled.d.ts +18 -0
- package/dist/esm/src/api.d.ts +101 -0
- package/dist/esm/src/helpers/array-base64-translator.d.ts +18 -0
- package/dist/esm/src/helpers/array-base64-translator.test.d.ts +17 -0
- package/dist/esm/src/helpers/externalizePayload.d.ts +19 -0
- package/dist/esm/src/helpers/externalizePayload.test.d.ts +17 -0
- package/dist/esm/src/helpers/extract-app-config.d.ts +19 -0
- package/dist/esm/src/helpers/extract-app-config.test.d.ts +17 -0
- package/dist/esm/src/helpers/is-console-message.d.ts +18 -0
- package/dist/esm/src/helpers/logToFirelog.d.ts +30 -0
- package/dist/esm/src/helpers/logToFirelog.test.d.ts +17 -0
- package/dist/esm/src/helpers/logToScion.d.ts +19 -0
- package/dist/esm/src/helpers/migrate-old-database.d.ts +51 -0
- package/dist/esm/src/helpers/migrate-old-database.test.d.ts +17 -0
- package/dist/esm/src/helpers/register.d.ts +23 -0
- package/dist/esm/src/helpers/registerDefaultSw.d.ts +18 -0
- package/dist/esm/src/helpers/sleep.d.ts +18 -0
- package/dist/esm/src/helpers/sleep.test.d.ts +17 -0
- package/dist/esm/src/helpers/updateSwReg.d.ts +18 -0
- package/dist/esm/src/helpers/updateVapidKey.d.ts +18 -0
- package/dist/esm/src/index.d.ts +31 -0
- package/dist/esm/src/index.sw.d.ts +26 -0
- package/dist/esm/src/interfaces/app-config.d.ts +24 -0
- package/dist/esm/src/interfaces/internal-dependencies.d.ts +27 -0
- package/dist/esm/src/interfaces/internal-message-payload.d.ts +44 -0
- package/dist/esm/src/interfaces/logging-types.d.ts +50 -0
- package/dist/esm/src/interfaces/public-types.d.ts +139 -0
- package/dist/esm/src/interfaces/token-details.d.ts +32 -0
- package/dist/esm/src/internals/idb-manager.d.ts +27 -0
- package/dist/esm/src/internals/idb-manager.test.d.ts +17 -0
- package/dist/esm/src/internals/requests.d.ts +35 -0
- package/dist/esm/src/internals/requests.test.d.ts +17 -0
- package/dist/esm/src/internals/token-manager.d.ts +23 -0
- package/dist/esm/src/internals/token-manager.test.d.ts +17 -0
- package/dist/esm/src/listeners/sw-listeners.d.ts +21 -0
- package/dist/esm/src/listeners/sw-listeners.test.d.ts +17 -0
- package/dist/esm/src/listeners/window-listener.d.ts +18 -0
- package/dist/esm/src/messaging-service.d.ts +36 -0
- package/dist/esm/src/testing/compare-headers.d.ts +22 -0
- package/dist/esm/src/testing/compare-headers.test.d.ts +17 -0
- package/dist/esm/src/testing/fakes/firebase-dependencies.d.ts +25 -0
- package/dist/esm/src/testing/fakes/logging-object.d.ts +18 -0
- package/dist/esm/src/testing/fakes/messaging-service.d.ts +18 -0
- package/dist/esm/src/testing/fakes/service-worker.d.ts +84 -0
- package/dist/esm/src/testing/fakes/token-details.d.ts +18 -0
- package/dist/esm/src/testing/setup.d.ts +17 -0
- package/dist/esm/src/testing/sinon-types.d.ts +19 -0
- package/dist/esm/src/util/constants.d.ts +39 -0
- package/dist/esm/src/util/errors.d.ts +57 -0
- package/dist/esm/src/util/sw-types.d.ts +90 -0
- package/dist/index.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.sw.esm2017.js +1 -1
- package/dist/index.sw.esm2017.js.map +1 -1
- package/package.json +20 -11
- package/dist/index.esm.js.map +0 -1
- package/dist/index.esm2017.js.map +0 -1
|
@@ -0,0 +1,84 @@
|
|
|
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 { ExtendableEvent } from '../../util/sw-types';
|
|
18
|
+
export declare function mockServiceWorker(): void;
|
|
19
|
+
export declare function restoreServiceWorker(): void;
|
|
20
|
+
export declare class FakeServiceWorkerRegistration implements ServiceWorkerRegistration {
|
|
21
|
+
active: null;
|
|
22
|
+
installing: null;
|
|
23
|
+
waiting: null;
|
|
24
|
+
onupdatefound: null;
|
|
25
|
+
pushManager: FakePushManager;
|
|
26
|
+
scope: string;
|
|
27
|
+
navigationPreload: NavigationPreloadManager;
|
|
28
|
+
sync: SyncManager;
|
|
29
|
+
updateViaCache: ServiceWorkerUpdateViaCache;
|
|
30
|
+
getNotifications(): Promise<never[]>;
|
|
31
|
+
showNotification(): Promise<void>;
|
|
32
|
+
update(): Promise<void>;
|
|
33
|
+
unregister(): Promise<boolean>;
|
|
34
|
+
addEventListener(): void;
|
|
35
|
+
removeEventListener(): void;
|
|
36
|
+
dispatchEvent(): boolean;
|
|
37
|
+
}
|
|
38
|
+
declare class FakePushManager implements PushManager {
|
|
39
|
+
private subscription;
|
|
40
|
+
permissionState(): Promise<"granted">;
|
|
41
|
+
getSubscription(): Promise<FakePushSubscription | null>;
|
|
42
|
+
subscribe(): Promise<FakePushSubscription>;
|
|
43
|
+
}
|
|
44
|
+
export declare class FakePushSubscription implements PushSubscription {
|
|
45
|
+
endpoint: string;
|
|
46
|
+
expirationTime: number;
|
|
47
|
+
auth: string;
|
|
48
|
+
p256: string;
|
|
49
|
+
getKey(name: PushEncryptionKeyName): Uint8Array;
|
|
50
|
+
unsubscribe(): Promise<boolean>;
|
|
51
|
+
toJSON: () => PushSubscriptionJSON;
|
|
52
|
+
options: PushSubscriptionOptions;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Most of the fields in here are unused / deprecated. They are only added here to match the TS
|
|
56
|
+
* Event interface.
|
|
57
|
+
*/
|
|
58
|
+
export declare class FakeEvent implements ExtendableEvent {
|
|
59
|
+
type: string;
|
|
60
|
+
NONE: number;
|
|
61
|
+
AT_TARGET: number;
|
|
62
|
+
BUBBLING_PHASE: number;
|
|
63
|
+
CAPTURING_PHASE: number;
|
|
64
|
+
bubbles: boolean;
|
|
65
|
+
cancelable: boolean;
|
|
66
|
+
composed: boolean;
|
|
67
|
+
timeStamp: number;
|
|
68
|
+
isTrusted: boolean;
|
|
69
|
+
eventPhase: number;
|
|
70
|
+
target: null;
|
|
71
|
+
currentTarget: null;
|
|
72
|
+
srcElement: null;
|
|
73
|
+
cancelBubble: boolean;
|
|
74
|
+
defaultPrevented: boolean;
|
|
75
|
+
returnValue: boolean;
|
|
76
|
+
preventDefault(): void;
|
|
77
|
+
stopPropagation(): void;
|
|
78
|
+
stopImmediatePropagation(): void;
|
|
79
|
+
initEvent(): void;
|
|
80
|
+
waitUntil(): void;
|
|
81
|
+
composedPath(): never[];
|
|
82
|
+
constructor(type: string, options?: EventInit);
|
|
83
|
+
}
|
|
84
|
+
export {};
|
|
@@ -0,0 +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
|
+
import { TokenDetails } from '../../interfaces/token-details';
|
|
18
|
+
export declare function getFakeTokenDetails(): TokenDetails;
|
|
@@ -0,0 +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 {};
|
|
@@ -0,0 +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 { SinonSpy, SinonStub } from 'sinon';
|
|
18
|
+
export declare type Stub<T extends (...args: any) => any> = SinonStub<Parameters<T>, ReturnType<T>>;
|
|
19
|
+
export declare type Spy<T extends (...args: any) => any> = SinonSpy<Parameters<T>, ReturnType<T>>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2019 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export declare const DEFAULT_SW_PATH = "/firebase-messaging-sw.js";
|
|
18
|
+
export declare const DEFAULT_SW_SCOPE = "/firebase-cloud-messaging-push-scope";
|
|
19
|
+
export declare const DEFAULT_VAPID_KEY = "BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4";
|
|
20
|
+
export declare const ENDPOINT = "https://fcmregistrations.googleapis.com/v1";
|
|
21
|
+
/** Key of FCM Payload in Notification's data field. */
|
|
22
|
+
export declare const FCM_MSG = "FCM_MSG";
|
|
23
|
+
export declare const CONSOLE_CAMPAIGN_ID = "google.c.a.c_id";
|
|
24
|
+
export declare const CONSOLE_CAMPAIGN_NAME = "google.c.a.c_l";
|
|
25
|
+
export declare const CONSOLE_CAMPAIGN_TIME = "google.c.a.ts";
|
|
26
|
+
/** Set to '1' if Analytics is enabled for the campaign */
|
|
27
|
+
export declare const CONSOLE_CAMPAIGN_ANALYTICS_ENABLED = "google.c.a.e";
|
|
28
|
+
export declare const TAG = "FirebaseMessaging: ";
|
|
29
|
+
export declare const MAX_NUMBER_OF_EVENTS_PER_LOG_REQUEST = 1000;
|
|
30
|
+
export declare const MAX_RETRIES = 3;
|
|
31
|
+
export declare const LOG_INTERVAL_IN_MS = 86400000;
|
|
32
|
+
export declare const DEFAULT_BACKOFF_TIME_MS = 5000;
|
|
33
|
+
export declare const FCM_LOG_SOURCE = 1249;
|
|
34
|
+
export declare const SDK_PLATFORM_WEB = 3;
|
|
35
|
+
export declare const EVENT_MESSAGE_DELIVERED = 1;
|
|
36
|
+
export declare enum MessageType {
|
|
37
|
+
DATA_MESSAGE = 1,
|
|
38
|
+
DISPLAY_NOTIFICATION = 3
|
|
39
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
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 { ErrorFactory, ErrorMap } from '@firebase/util';
|
|
18
|
+
export declare const enum ErrorCode {
|
|
19
|
+
MISSING_APP_CONFIG_VALUES = "missing-app-config-values",
|
|
20
|
+
AVAILABLE_IN_WINDOW = "only-available-in-window",
|
|
21
|
+
AVAILABLE_IN_SW = "only-available-in-sw",
|
|
22
|
+
PERMISSION_DEFAULT = "permission-default",
|
|
23
|
+
PERMISSION_BLOCKED = "permission-blocked",
|
|
24
|
+
UNSUPPORTED_BROWSER = "unsupported-browser",
|
|
25
|
+
INDEXED_DB_UNSUPPORTED = "indexed-db-unsupported",
|
|
26
|
+
FAILED_DEFAULT_REGISTRATION = "failed-service-worker-registration",
|
|
27
|
+
TOKEN_SUBSCRIBE_FAILED = "token-subscribe-failed",
|
|
28
|
+
TOKEN_SUBSCRIBE_NO_TOKEN = "token-subscribe-no-token",
|
|
29
|
+
TOKEN_UNSUBSCRIBE_FAILED = "token-unsubscribe-failed",
|
|
30
|
+
TOKEN_UPDATE_FAILED = "token-update-failed",
|
|
31
|
+
TOKEN_UPDATE_NO_TOKEN = "token-update-no-token",
|
|
32
|
+
INVALID_BG_HANDLER = "invalid-bg-handler",
|
|
33
|
+
USE_SW_AFTER_GET_TOKEN = "use-sw-after-get-token",
|
|
34
|
+
INVALID_SW_REGISTRATION = "invalid-sw-registration",
|
|
35
|
+
USE_VAPID_KEY_AFTER_GET_TOKEN = "use-vapid-key-after-get-token",
|
|
36
|
+
INVALID_VAPID_KEY = "invalid-vapid-key"
|
|
37
|
+
}
|
|
38
|
+
export declare const ERROR_MAP: ErrorMap<ErrorCode>;
|
|
39
|
+
interface ErrorParams {
|
|
40
|
+
[ErrorCode.MISSING_APP_CONFIG_VALUES]: {
|
|
41
|
+
valueName: string;
|
|
42
|
+
};
|
|
43
|
+
[ErrorCode.FAILED_DEFAULT_REGISTRATION]: {
|
|
44
|
+
browserErrorMessage: string;
|
|
45
|
+
};
|
|
46
|
+
[ErrorCode.TOKEN_SUBSCRIBE_FAILED]: {
|
|
47
|
+
errorInfo: string;
|
|
48
|
+
};
|
|
49
|
+
[ErrorCode.TOKEN_UNSUBSCRIBE_FAILED]: {
|
|
50
|
+
errorInfo: string;
|
|
51
|
+
};
|
|
52
|
+
[ErrorCode.TOKEN_UPDATE_FAILED]: {
|
|
53
|
+
errorInfo: string;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export declare const ERROR_FACTORY: ErrorFactory<ErrorCode, ErrorParams>;
|
|
57
|
+
export {};
|
|
@@ -0,0 +1,90 @@
|
|
|
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
|
+
/**
|
|
18
|
+
* Subset of Web Worker types from lib.webworker.d.ts
|
|
19
|
+
* https://github.com/Microsoft/TypeScript/blob/master/lib/lib.webworker.d.ts
|
|
20
|
+
*
|
|
21
|
+
* Since it's not possible to have both "dom" and "webworker" libs in a single project, we have to
|
|
22
|
+
* manually declare the web worker types we need.
|
|
23
|
+
*/
|
|
24
|
+
export interface ServiceWorkerGlobalScope {
|
|
25
|
+
readonly location: WorkerLocation;
|
|
26
|
+
readonly clients: Clients;
|
|
27
|
+
readonly registration: ServiceWorkerRegistration;
|
|
28
|
+
addEventListener<K extends keyof ServiceWorkerGlobalScopeEventMap>(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
29
|
+
}
|
|
30
|
+
export interface ServiceWorkerGlobalScopeEventMap {
|
|
31
|
+
notificationclick: NotificationEvent;
|
|
32
|
+
push: PushEvent;
|
|
33
|
+
pushsubscriptionchange: PushSubscriptionChangeEvent;
|
|
34
|
+
}
|
|
35
|
+
export interface Client {
|
|
36
|
+
readonly id: string;
|
|
37
|
+
readonly type: ClientTypes;
|
|
38
|
+
readonly url: string;
|
|
39
|
+
postMessage(message: any, transfer?: Transferable[]): void;
|
|
40
|
+
}
|
|
41
|
+
export interface ClientQueryOptions {
|
|
42
|
+
includeReserved?: boolean;
|
|
43
|
+
includeUncontrolled?: boolean;
|
|
44
|
+
type?: ClientTypes;
|
|
45
|
+
}
|
|
46
|
+
export interface WindowClient extends Client {
|
|
47
|
+
readonly focused: boolean;
|
|
48
|
+
readonly visibilityState: VisibilityState;
|
|
49
|
+
focus(): Promise<WindowClient>;
|
|
50
|
+
navigate(url: string): Promise<WindowClient>;
|
|
51
|
+
}
|
|
52
|
+
export interface Clients {
|
|
53
|
+
claim(): Promise<void>;
|
|
54
|
+
get(id: string): Promise<any>;
|
|
55
|
+
matchAll(options?: ClientQueryOptions): Promise<Client[]>;
|
|
56
|
+
openWindow(url: string): Promise<WindowClient | null>;
|
|
57
|
+
}
|
|
58
|
+
export interface ExtendableEvent extends Event {
|
|
59
|
+
waitUntil(f: Promise<any>): void;
|
|
60
|
+
}
|
|
61
|
+
export interface NotificationEvent extends ExtendableEvent {
|
|
62
|
+
readonly action: string;
|
|
63
|
+
readonly notification: Notification;
|
|
64
|
+
}
|
|
65
|
+
interface PushMessageData {
|
|
66
|
+
arrayBuffer(): ArrayBuffer;
|
|
67
|
+
blob(): Blob;
|
|
68
|
+
json(): any;
|
|
69
|
+
text(): string;
|
|
70
|
+
}
|
|
71
|
+
export interface PushEvent extends ExtendableEvent {
|
|
72
|
+
readonly data: PushMessageData | null;
|
|
73
|
+
}
|
|
74
|
+
export interface PushSubscriptionChangeEvent extends ExtendableEvent {
|
|
75
|
+
readonly newSubscription: PushSubscription | null;
|
|
76
|
+
readonly oldSubscription: PushSubscription | null;
|
|
77
|
+
}
|
|
78
|
+
interface WorkerLocation {
|
|
79
|
+
readonly hash: string;
|
|
80
|
+
readonly host: string;
|
|
81
|
+
readonly hostname: string;
|
|
82
|
+
readonly href: string;
|
|
83
|
+
readonly origin: string;
|
|
84
|
+
readonly pathname: string;
|
|
85
|
+
readonly port: string;
|
|
86
|
+
readonly protocol: string;
|
|
87
|
+
readonly search: string;
|
|
88
|
+
toString(): string;
|
|
89
|
+
}
|
|
90
|
+
export {};
|
package/dist/index.cjs.js
CHANGED
|
@@ -394,7 +394,7 @@ var ERROR_MAP = (_a = {},
|
|
|
394
394
|
_a["only-available-in-sw" /* AVAILABLE_IN_SW */] = 'This method is available in a service worker context.',
|
|
395
395
|
_a["permission-default" /* PERMISSION_DEFAULT */] = 'The notification permission was not granted and dismissed instead.',
|
|
396
396
|
_a["permission-blocked" /* PERMISSION_BLOCKED */] = 'The notification permission was not granted and blocked instead.',
|
|
397
|
-
_a["unsupported-browser" /* UNSUPPORTED_BROWSER */] = "This browser doesn't support the API's required to use the
|
|
397
|
+
_a["unsupported-browser" /* UNSUPPORTED_BROWSER */] = "This browser doesn't support the API's required to use the Firebase SDK.",
|
|
398
398
|
_a["indexed-db-unsupported" /* INDEXED_DB_UNSUPPORTED */] = "This browser doesn't support indexedDb.open() (ex. Safari iFrame, Firefox Private Browsing, etc)",
|
|
399
399
|
_a["failed-service-worker-registration" /* FAILED_DEFAULT_REGISTRATION */] = 'We are unable to register the default service worker. {$browserErrorMessage}',
|
|
400
400
|
_a["token-subscribe-failed" /* TOKEN_SUBSCRIBE_FAILED */] = 'A problem occurred while subscribing the user to FCM: {$errorInfo}',
|
|
@@ -1260,7 +1260,7 @@ function messageEventListener(messaging, event) {
|
|
|
1260
1260
|
}
|
|
1261
1261
|
|
|
1262
1262
|
var name = "@firebase/messaging";
|
|
1263
|
-
var version = "0.9.
|
|
1263
|
+
var version = "0.9.3-2021102231614";
|
|
1264
1264
|
|
|
1265
1265
|
/**
|
|
1266
1266
|
* @license
|