mirror of
https://github.com/musix-org/musix-oss
synced 2025-06-17 04:26:00 +00:00
Modules
This commit is contained in:
5
node_modules/@firebase/messaging/README.md
generated
vendored
Normal file
5
node_modules/@firebase/messaging/README.md
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
# @firebase/messaging
|
||||
|
||||
This is the Firebase Cloud Messaging component of the Firebase JS SDK.
|
||||
|
||||
**This package is not intended for direct usage, and should only be used via the officially supported [firebase](https://www.npmjs.com/package/firebase) package.**
|
68
node_modules/@firebase/messaging/dist/controllers/sw-controller.d.ts
generated
vendored
Normal file
68
node_modules/@firebase/messaging/dist/controllers/sw-controller.d.ts
generated
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { FirebaseInternalDependencies } from '../interfaces/internal-dependencies';
|
||||
import { FirebaseMessaging } from '@firebase/messaging-types';
|
||||
import { MessagePayload } from '../interfaces/message-payload';
|
||||
import { Unsubscribe } from '@firebase/util';
|
||||
import { FirebaseApp } from '@firebase/app-types';
|
||||
import { FirebaseService } from '@firebase/app-types/private';
|
||||
export declare type BgMessageHandler = (payload: MessagePayload) => unknown;
|
||||
export declare class SwController implements FirebaseMessaging, FirebaseService {
|
||||
private readonly firebaseDependencies;
|
||||
private vapidKey;
|
||||
private bgMessageHandler;
|
||||
constructor(firebaseDependencies: FirebaseInternalDependencies);
|
||||
get app(): FirebaseApp;
|
||||
/**
|
||||
* Calling setBackgroundMessageHandler will opt in to some specific
|
||||
* behaviours.
|
||||
* 1.) If a notification doesn't need to be shown due to a window already
|
||||
* being visible, then push messages will be sent to the page.
|
||||
* 2.) If a notification needs to be shown, and the message contains no
|
||||
* notification data this method will be called
|
||||
* and the promise it returns will be passed to event.waitUntil.
|
||||
* If you do not set this callback then all push messages will let and the
|
||||
* developer can handle them in a their own 'push' event callback
|
||||
*
|
||||
* @param callback The callback to be called when a push message is received
|
||||
* and a notification must be shown. The callback will be given the data from
|
||||
* the push message.
|
||||
*/
|
||||
setBackgroundMessageHandler(callback: BgMessageHandler): void;
|
||||
getToken(): Promise<string>;
|
||||
deleteToken(): Promise<boolean>;
|
||||
requestPermission(): Promise<void>;
|
||||
usePublicVapidKey(vapidKey: string): void;
|
||||
useServiceWorker(): void;
|
||||
onMessage(): Unsubscribe;
|
||||
onTokenRefresh(): Unsubscribe;
|
||||
/**
|
||||
* A handler for push events that shows notifications based on the content of
|
||||
* the payload.
|
||||
*
|
||||
* The payload must be a JSON-encoded Object with a `notification` key. The
|
||||
* value of the `notification` property will be used as the NotificationOptions
|
||||
* object passed to showNotification. Additionally, the `title` property of the
|
||||
* notification object will be used as the title.
|
||||
*
|
||||
* If there is no notification data in the payload then no notification will be
|
||||
* shown.
|
||||
*/
|
||||
onPush(event: PushEvent): Promise<void>;
|
||||
onSubChange(event: PushSubscriptionChangeEvent): Promise<void>;
|
||||
onNotificationClick(event: NotificationEvent): Promise<void>;
|
||||
}
|
1
node_modules/@firebase/messaging/dist/controllers/sw-controller.test.d.ts
generated
vendored
Normal file
1
node_modules/@firebase/messaging/dist/controllers/sw-controller.test.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
import '../testing/setup';
|
57
node_modules/@firebase/messaging/dist/controllers/window-controller.d.ts
generated
vendored
Normal file
57
node_modules/@firebase/messaging/dist/controllers/window-controller.d.ts
generated
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { FirebaseInternalDependencies } from '../interfaces/internal-dependencies';
|
||||
import { FirebaseMessaging } from '@firebase/messaging-types';
|
||||
import { NextFn, Observer, Unsubscribe } from '@firebase/util';
|
||||
import { FirebaseApp } from '@firebase/app-types';
|
||||
import { FirebaseService } from '@firebase/app-types/private';
|
||||
export declare class WindowController implements FirebaseMessaging, FirebaseService {
|
||||
private readonly firebaseDependencies;
|
||||
private vapidKey;
|
||||
private swRegistration?;
|
||||
private onMessageCallback;
|
||||
constructor(firebaseDependencies: FirebaseInternalDependencies);
|
||||
get app(): FirebaseApp;
|
||||
getToken(): Promise<string>;
|
||||
deleteToken(): Promise<boolean>;
|
||||
/**
|
||||
* Request permission if it is not currently granted.
|
||||
*
|
||||
* @return Resolves if the permission was granted, rejects otherwise.
|
||||
*
|
||||
* @deprecated Use Notification.requestPermission() instead.
|
||||
* https://developer.mozilla.org/en-US/docs/Web/API/Notification/requestPermission
|
||||
*/
|
||||
requestPermission(): Promise<void>;
|
||||
usePublicVapidKey(vapidKey: string): void;
|
||||
useServiceWorker(swRegistration: ServiceWorkerRegistration): void;
|
||||
/**
|
||||
* @param nextOrObserver An observer object or a function triggered on
|
||||
* message.
|
||||
* @return The unsubscribe function for the observer.
|
||||
*/
|
||||
onMessage(nextOrObserver: NextFn<object> | Observer<object>): Unsubscribe;
|
||||
setBackgroundMessageHandler(): void;
|
||||
onTokenRefresh(): Unsubscribe;
|
||||
/**
|
||||
* Creates or updates the default service worker registration.
|
||||
* @return The service worker registration to be used for the push service.
|
||||
*/
|
||||
private getServiceWorkerRegistration;
|
||||
private messageEventListener;
|
||||
private logEvent;
|
||||
}
|
1
node_modules/@firebase/messaging/dist/controllers/window-controller.test.d.ts
generated
vendored
Normal file
1
node_modules/@firebase/messaging/dist/controllers/window-controller.test.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
import '../testing/setup';
|
35
node_modules/@firebase/messaging/dist/core/api.d.ts
generated
vendored
Normal file
35
node_modules/@firebase/messaging/dist/core/api.d.ts
generated
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { TokenDetails, SubscriptionOptions } from '../interfaces/token-details';
|
||||
import { FirebaseInternalDependencies } from '../interfaces/internal-dependencies';
|
||||
export interface ApiResponse {
|
||||
token?: string;
|
||||
error?: {
|
||||
message: string;
|
||||
};
|
||||
}
|
||||
export interface ApiRequestBody {
|
||||
web: {
|
||||
endpoint: string;
|
||||
p256dh: string;
|
||||
auth: string;
|
||||
applicationPubKey?: string;
|
||||
};
|
||||
}
|
||||
export declare function requestGetToken(firebaseDependencies: FirebaseInternalDependencies, subscriptionOptions: SubscriptionOptions): Promise<string>;
|
||||
export declare function requestUpdateToken(firebaseDependencies: FirebaseInternalDependencies, tokenDetails: TokenDetails): Promise<string>;
|
||||
export declare function requestDeleteToken(firebaseDependencies: FirebaseInternalDependencies, token: string): Promise<void>;
|
17
node_modules/@firebase/messaging/dist/core/api.test.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/core/api.test.d.ts
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '../testing/setup';
|
23
node_modules/@firebase/messaging/dist/core/token-management.d.ts
generated
vendored
Normal file
23
node_modules/@firebase/messaging/dist/core/token-management.d.ts
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { FirebaseInternalDependencies } from '../interfaces/internal-dependencies';
|
||||
export declare function getToken(firebaseDependencies: FirebaseInternalDependencies, swRegistration: ServiceWorkerRegistration, vapidKey: string): Promise<string>;
|
||||
/**
|
||||
* This method deletes the token from the database, unsubscribes the token from
|
||||
* FCM, and unregisters the push subscription if it exists.
|
||||
*/
|
||||
export declare function deleteToken(firebaseDependencies: FirebaseInternalDependencies, swRegistration: ServiceWorkerRegistration): Promise<boolean>;
|
17
node_modules/@firebase/messaging/dist/core/token-management.test.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/core/token-management.test.d.ts
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '../testing/setup';
|
17
node_modules/@firebase/messaging/dist/helpers/array-to-base64.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/helpers/array-to-base64.d.ts
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export declare function arrayToBase64(array: Uint8Array | ArrayBuffer): string;
|
17
node_modules/@firebase/messaging/dist/helpers/array-to-base64.test.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/helpers/array-to-base64.test.d.ts
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '../testing/setup';
|
19
node_modules/@firebase/messaging/dist/helpers/extract-app-config.d.ts
generated
vendored
Normal file
19
node_modules/@firebase/messaging/dist/helpers/extract-app-config.d.ts
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { FirebaseApp } from '@firebase/app-types';
|
||||
import { AppConfig } from '../interfaces/app-config';
|
||||
export declare function extractAppConfig(app: FirebaseApp): AppConfig;
|
17
node_modules/@firebase/messaging/dist/helpers/extract-app-config.test.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/helpers/extract-app-config.test.d.ts
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '../testing/setup';
|
27
node_modules/@firebase/messaging/dist/helpers/idb-manager.d.ts
generated
vendored
Normal file
27
node_modules/@firebase/messaging/dist/helpers/idb-manager.d.ts
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { TokenDetails } from '../interfaces/token-details';
|
||||
import { FirebaseInternalDependencies } from '../interfaces/internal-dependencies';
|
||||
export declare const DATABASE_NAME = "firebase-messaging-database";
|
||||
/** Gets record(s) from the objectStore that match the given key. */
|
||||
export declare function dbGet(firebaseDependencies: FirebaseInternalDependencies): Promise<TokenDetails | undefined>;
|
||||
/** Assigns or overwrites the record for the given key with the given value. */
|
||||
export declare function dbSet(firebaseDependencies: FirebaseInternalDependencies, tokenDetails: TokenDetails): Promise<TokenDetails>;
|
||||
/** Removes record(s) from the objectStore that match the given key. */
|
||||
export declare function dbRemove(firebaseDependencies: FirebaseInternalDependencies): Promise<void>;
|
||||
/** Deletes the DB. Useful for tests. */
|
||||
export declare function dbDelete(): Promise<void>;
|
17
node_modules/@firebase/messaging/dist/helpers/idb-manager.test.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/helpers/idb-manager.test.d.ts
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '../testing/setup';
|
18
node_modules/@firebase/messaging/dist/helpers/is-console-message.d.ts
generated
vendored
Normal file
18
node_modules/@firebase/messaging/dist/helpers/is-console-message.d.ts
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { ConsoleMessageData } from '../interfaces/message-payload';
|
||||
export declare function isConsoleMessage(data: unknown): data is ConsoleMessageData;
|
51
node_modules/@firebase/messaging/dist/helpers/migrate-old-database.d.ts
generated
vendored
Normal file
51
node_modules/@firebase/messaging/dist/helpers/migrate-old-database.d.ts
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { TokenDetails } from '../interfaces/token-details';
|
||||
export interface V2TokenDetails {
|
||||
fcmToken: string;
|
||||
swScope: string;
|
||||
vapidKey: string | Uint8Array;
|
||||
subscription: PushSubscription;
|
||||
fcmSenderId: string;
|
||||
fcmPushSet: string;
|
||||
createTime?: number;
|
||||
endpoint?: string;
|
||||
auth?: string;
|
||||
p256dh?: string;
|
||||
}
|
||||
export interface V3TokenDetails {
|
||||
fcmToken: string;
|
||||
swScope: string;
|
||||
vapidKey: Uint8Array;
|
||||
fcmSenderId: string;
|
||||
fcmPushSet: string;
|
||||
endpoint: string;
|
||||
auth: ArrayBuffer;
|
||||
p256dh: ArrayBuffer;
|
||||
createTime: number;
|
||||
}
|
||||
export interface V4TokenDetails {
|
||||
fcmToken: string;
|
||||
swScope: string;
|
||||
vapidKey: Uint8Array;
|
||||
fcmSenderId: string;
|
||||
endpoint: string;
|
||||
auth: ArrayBufferLike;
|
||||
p256dh: ArrayBufferLike;
|
||||
createTime: number;
|
||||
}
|
||||
export declare function migrateOldDatabase(senderId: string): Promise<TokenDetails | null>;
|
17
node_modules/@firebase/messaging/dist/helpers/migrate-old-database.test.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/helpers/migrate-old-database.test.d.ts
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '../testing/setup';
|
18
node_modules/@firebase/messaging/dist/helpers/sleep.d.ts
generated
vendored
Normal file
18
node_modules/@firebase/messaging/dist/helpers/sleep.d.ts
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/** Returns a promise that resolves after given time passes. */
|
||||
export declare function sleep(ms: number): Promise<void>;
|
17
node_modules/@firebase/messaging/dist/helpers/sleep.test.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/helpers/sleep.test.d.ts
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '../testing/setup';
|
1582
node_modules/@firebase/messaging/dist/index.cjs.js
generated
vendored
Normal file
1582
node_modules/@firebase/messaging/dist/index.cjs.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/@firebase/messaging/dist/index.cjs.js.map
generated
vendored
Normal file
1
node_modules/@firebase/messaging/dist/index.cjs.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
32
node_modules/@firebase/messaging/dist/index.d.ts
generated
vendored
Normal file
32
node_modules/@firebase/messaging/dist/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '@firebase/installations';
|
||||
import { FirebaseMessaging } from '@firebase/messaging-types';
|
||||
/**
|
||||
* Define extension behavior of `registerMessaging`
|
||||
*/
|
||||
declare module '@firebase/app-types' {
|
||||
interface FirebaseNamespace {
|
||||
messaging: {
|
||||
(app?: FirebaseApp): FirebaseMessaging;
|
||||
isSupported(): boolean;
|
||||
};
|
||||
}
|
||||
interface FirebaseApp {
|
||||
messaging(): FirebaseMessaging;
|
||||
}
|
||||
}
|
1578
node_modules/@firebase/messaging/dist/index.esm.js
generated
vendored
Normal file
1578
node_modules/@firebase/messaging/dist/index.esm.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/@firebase/messaging/dist/index.esm.js.map
generated
vendored
Normal file
1
node_modules/@firebase/messaging/dist/index.esm.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1200
node_modules/@firebase/messaging/dist/index.esm2017.js
generated
vendored
Normal file
1200
node_modules/@firebase/messaging/dist/index.esm2017.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/@firebase/messaging/dist/index.esm2017.js.map
generated
vendored
Normal file
1
node_modules/@firebase/messaging/dist/index.esm2017.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
24
node_modules/@firebase/messaging/dist/interfaces/app-config.d.ts
generated
vendored
Normal file
24
node_modules/@firebase/messaging/dist/interfaces/app-config.d.ts
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export interface AppConfig {
|
||||
readonly appName: string;
|
||||
readonly projectId: string;
|
||||
readonly apiKey: string;
|
||||
readonly appId: string;
|
||||
/** Only used for old DB migration. */
|
||||
readonly senderId: string;
|
||||
}
|
27
node_modules/@firebase/messaging/dist/interfaces/internal-dependencies.d.ts
generated
vendored
Normal file
27
node_modules/@firebase/messaging/dist/interfaces/internal-dependencies.d.ts
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { FirebaseInstallations } from '@firebase/installations-types';
|
||||
import { FirebaseAnalyticsInternalName } from '@firebase/analytics-interop-types';
|
||||
import { Provider } from '@firebase/component';
|
||||
import { AppConfig } from './app-config';
|
||||
import { FirebaseApp } from '@firebase/app-types';
|
||||
export interface FirebaseInternalDependencies {
|
||||
app: FirebaseApp;
|
||||
appConfig: AppConfig;
|
||||
installations: FirebaseInstallations;
|
||||
analyticsProvider: Provider<FirebaseAnalyticsInternalName>;
|
||||
}
|
27
node_modules/@firebase/messaging/dist/interfaces/internal-message.d.ts
generated
vendored
Normal file
27
node_modules/@firebase/messaging/dist/interfaces/internal-message.d.ts
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { MessagePayload } from './message-payload';
|
||||
export declare enum MessageType {
|
||||
PUSH_RECEIVED = "push-received",
|
||||
NOTIFICATION_CLICKED = "notification-clicked"
|
||||
}
|
||||
export interface InternalMessage {
|
||||
firebaseMessaging: {
|
||||
type: MessageType;
|
||||
payload: MessagePayload;
|
||||
};
|
||||
}
|
36
node_modules/@firebase/messaging/dist/interfaces/message-payload.d.ts
generated
vendored
Normal file
36
node_modules/@firebase/messaging/dist/interfaces/message-payload.d.ts
generated
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2018 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { CONSOLE_CAMPAIGN_ID, CONSOLE_CAMPAIGN_TIME, CONSOLE_CAMPAIGN_NAME, CONSOLE_CAMPAIGN_ANALYTICS_ENABLED } from '../util/constants';
|
||||
export interface NotificationDetails extends NotificationOptions {
|
||||
title: string;
|
||||
click_action?: string;
|
||||
}
|
||||
export interface FcmOptions {
|
||||
link?: string;
|
||||
}
|
||||
export interface MessagePayload {
|
||||
fcmOptions?: FcmOptions;
|
||||
notification?: NotificationDetails;
|
||||
data?: unknown;
|
||||
}
|
||||
/** Additional data of a message sent from the FN Console. */
|
||||
export interface ConsoleMessageData {
|
||||
[CONSOLE_CAMPAIGN_ID]: string;
|
||||
[CONSOLE_CAMPAIGN_TIME]: string;
|
||||
[CONSOLE_CAMPAIGN_NAME]?: string;
|
||||
[CONSOLE_CAMPAIGN_ANALYTICS_ENABLED]?: '1';
|
||||
}
|
32
node_modules/@firebase/messaging/dist/interfaces/token-details.d.ts
generated
vendored
Normal file
32
node_modules/@firebase/messaging/dist/interfaces/token-details.d.ts
generated
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2018 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export interface TokenDetails {
|
||||
token: string;
|
||||
createTime: number;
|
||||
/** Does not exist in Safari since it's not using Push API. */
|
||||
subscriptionOptions?: SubscriptionOptions;
|
||||
}
|
||||
/**
|
||||
* Additional options and values required by a Push API subscription.
|
||||
*/
|
||||
export interface SubscriptionOptions {
|
||||
vapidKey: string;
|
||||
swScope: string;
|
||||
endpoint: string;
|
||||
auth: string;
|
||||
p256dh: string;
|
||||
}
|
22
node_modules/@firebase/messaging/dist/testing/compare-headers.d.ts
generated
vendored
Normal file
22
node_modules/@firebase/messaging/dist/testing/compare-headers.d.ts
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '../testing/setup';
|
||||
declare class HeadersWithEntries extends Headers {
|
||||
entries?(): Iterable<[string, string]>;
|
||||
}
|
||||
export declare function compareHeaders(expectedHeaders: HeadersWithEntries, actualHeaders: HeadersWithEntries): void;
|
||||
export {};
|
17
node_modules/@firebase/messaging/dist/testing/compare-headers.test.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/testing/compare-headers.test.d.ts
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import '../testing/setup';
|
20
node_modules/@firebase/messaging/dist/testing/fakes/firebase-dependencies.d.ts
generated
vendored
Normal file
20
node_modules/@firebase/messaging/dist/testing/fakes/firebase-dependencies.d.ts
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { FirebaseApp, FirebaseOptions } from '@firebase/app-types';
|
||||
import { FirebaseInternalDependencies } from '../../interfaces/internal-dependencies';
|
||||
export declare function getFakeFirebaseDependencies(options?: FirebaseOptions): FirebaseInternalDependencies;
|
||||
export declare function getFakeApp(options?: FirebaseOptions): FirebaseApp;
|
83
node_modules/@firebase/messaging/dist/testing/fakes/service-worker.d.ts
generated
vendored
Normal file
83
node_modules/@firebase/messaging/dist/testing/fakes/service-worker.d.ts
generated
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export declare function mockServiceWorker(): void;
|
||||
export declare function restoreServiceWorker(): void;
|
||||
export declare class FakeServiceWorkerRegistration implements ServiceWorkerRegistration {
|
||||
active: null;
|
||||
installing: null;
|
||||
waiting: null;
|
||||
onupdatefound: null;
|
||||
pushManager: FakePushManager;
|
||||
scope: string;
|
||||
navigationPreload: NavigationPreloadManager;
|
||||
sync: SyncManager;
|
||||
updateViaCache: ServiceWorkerUpdateViaCache;
|
||||
getNotifications(): Promise<never[]>;
|
||||
showNotification(): Promise<void>;
|
||||
update(): Promise<void>;
|
||||
unregister(): Promise<boolean>;
|
||||
addEventListener(): void;
|
||||
removeEventListener(): void;
|
||||
dispatchEvent(): boolean;
|
||||
}
|
||||
declare class FakePushManager implements PushManager {
|
||||
private subscription;
|
||||
permissionState(): Promise<"granted">;
|
||||
getSubscription(): Promise<FakePushSubscription | null>;
|
||||
subscribe(): Promise<FakePushSubscription>;
|
||||
}
|
||||
export declare class FakePushSubscription implements PushSubscription {
|
||||
endpoint: string;
|
||||
expirationTime: number;
|
||||
auth: string;
|
||||
p256: string;
|
||||
getKey(name: PushEncryptionKeyName): Uint8Array;
|
||||
unsubscribe(): Promise<boolean>;
|
||||
toJSON: () => PushSubscriptionJSON;
|
||||
options: PushSubscriptionOptions;
|
||||
}
|
||||
/**
|
||||
* Most of the fields in here are unused / deprecated.
|
||||
* They are only added here to match the TS Event interface.
|
||||
*/
|
||||
export declare class FakeEvent implements ExtendableEvent {
|
||||
type: string;
|
||||
NONE: number;
|
||||
AT_TARGET: number;
|
||||
BUBBLING_PHASE: number;
|
||||
CAPTURING_PHASE: number;
|
||||
bubbles: boolean;
|
||||
cancelable: boolean;
|
||||
composed: boolean;
|
||||
timeStamp: number;
|
||||
isTrusted: boolean;
|
||||
eventPhase: number;
|
||||
target: null;
|
||||
currentTarget: null;
|
||||
srcElement: null;
|
||||
cancelBubble: boolean;
|
||||
defaultPrevented: boolean;
|
||||
returnValue: boolean;
|
||||
preventDefault(): void;
|
||||
stopPropagation(): void;
|
||||
stopImmediatePropagation(): void;
|
||||
initEvent(): void;
|
||||
waitUntil(): void;
|
||||
composedPath(): never[];
|
||||
constructor(type: string, options?: EventInit);
|
||||
}
|
||||
export {};
|
18
node_modules/@firebase/messaging/dist/testing/fakes/token-details.d.ts
generated
vendored
Normal file
18
node_modules/@firebase/messaging/dist/testing/fakes/token-details.d.ts
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { TokenDetails } from '../../interfaces/token-details';
|
||||
export declare function getFakeTokenDetails(): TokenDetails;
|
17
node_modules/@firebase/messaging/dist/testing/setup.d.ts
generated
vendored
Normal file
17
node_modules/@firebase/messaging/dist/testing/setup.d.ts
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export {};
|
19
node_modules/@firebase/messaging/dist/testing/sinon-types.d.ts
generated
vendored
Normal file
19
node_modules/@firebase/messaging/dist/testing/sinon-types.d.ts
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { SinonStub, SinonSpy } from 'sinon';
|
||||
export declare type Stub<T extends (...args: any) => any> = SinonStub<Parameters<T>, ReturnType<T>>;
|
||||
export declare type Spy<T extends (...args: any) => any> = SinonSpy<Parameters<T>, ReturnType<T>>;
|
27
node_modules/@firebase/messaging/dist/util/constants.d.ts
generated
vendored
Normal file
27
node_modules/@firebase/messaging/dist/util/constants.d.ts
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2019 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
export declare const DEFAULT_SW_PATH = "/firebase-messaging-sw.js";
|
||||
export declare const DEFAULT_SW_SCOPE = "/firebase-cloud-messaging-push-scope";
|
||||
export declare const DEFAULT_VAPID_KEY = "BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4";
|
||||
export declare const ENDPOINT = "https://fcmregistrations.googleapis.com/v1";
|
||||
/** Key of FCM Payload in Notification's data field. */
|
||||
export declare const FCM_MSG = "FCM_MSG";
|
||||
export declare const CONSOLE_CAMPAIGN_ID = "google.c.a.c_id";
|
||||
export declare const CONSOLE_CAMPAIGN_NAME = "google.c.a.c_l";
|
||||
export declare const CONSOLE_CAMPAIGN_TIME = "google.c.a.ts";
|
||||
/** Set to '1' if Analytics is enabled for the campaign */
|
||||
export declare const CONSOLE_CAMPAIGN_ANALYTICS_ENABLED = "google.c.a.e";
|
56
node_modules/@firebase/messaging/dist/util/errors.d.ts
generated
vendored
Normal file
56
node_modules/@firebase/messaging/dist/util/errors.d.ts
generated
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2017 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { ErrorFactory, ErrorMap } from '@firebase/util';
|
||||
export declare const enum ErrorCode {
|
||||
MISSING_APP_CONFIG_VALUES = "missing-app-config-values",
|
||||
AVAILABLE_IN_WINDOW = "only-available-in-window",
|
||||
AVAILABLE_IN_SW = "only-available-in-sw",
|
||||
PERMISSION_DEFAULT = "permission-default",
|
||||
PERMISSION_BLOCKED = "permission-blocked",
|
||||
UNSUPPORTED_BROWSER = "unsupported-browser",
|
||||
FAILED_DEFAULT_REGISTRATION = "failed-service-worker-registration",
|
||||
TOKEN_SUBSCRIBE_FAILED = "token-subscribe-failed",
|
||||
TOKEN_SUBSCRIBE_NO_TOKEN = "token-subscribe-no-token",
|
||||
TOKEN_UNSUBSCRIBE_FAILED = "token-unsubscribe-failed",
|
||||
TOKEN_UPDATE_FAILED = "token-update-failed",
|
||||
TOKEN_UPDATE_NO_TOKEN = "token-update-no-token",
|
||||
INVALID_BG_HANDLER = "invalid-bg-handler",
|
||||
USE_SW_AFTER_GET_TOKEN = "use-sw-after-get-token",
|
||||
INVALID_SW_REGISTRATION = "invalid-sw-registration",
|
||||
USE_VAPID_KEY_AFTER_GET_TOKEN = "use-vapid-key-after-get-token",
|
||||
INVALID_VAPID_KEY = "invalid-vapid-key"
|
||||
}
|
||||
export declare const ERROR_MAP: ErrorMap<ErrorCode>;
|
||||
interface ErrorParams {
|
||||
[ErrorCode.MISSING_APP_CONFIG_VALUES]: {
|
||||
valueName: string;
|
||||
};
|
||||
[ErrorCode.FAILED_DEFAULT_REGISTRATION]: {
|
||||
browserErrorMessage: string;
|
||||
};
|
||||
[ErrorCode.TOKEN_SUBSCRIBE_FAILED]: {
|
||||
errorInfo: string;
|
||||
};
|
||||
[ErrorCode.TOKEN_UNSUBSCRIBE_FAILED]: {
|
||||
errorInfo: string;
|
||||
};
|
||||
[ErrorCode.TOKEN_UPDATE_FAILED]: {
|
||||
errorInfo: string;
|
||||
};
|
||||
}
|
||||
export declare const ERROR_FACTORY: ErrorFactory<ErrorCode, ErrorParams>;
|
||||
export {};
|
89
node_modules/@firebase/messaging/dist/util/sw-types.d.ts
generated
vendored
Normal file
89
node_modules/@firebase/messaging/dist/util/sw-types.d.ts
generated
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2018 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/**
|
||||
* Subset of Web Worker types from lib.webworker.d.ts
|
||||
* https://github.com/Microsoft/TypeScript/blob/master/lib/lib.webworker.d.ts
|
||||
*
|
||||
* Since it's not possible to have both "dom" and "webworker" libs in a single
|
||||
* project, we have to manually declare the web worker types we need.
|
||||
*/
|
||||
interface ServiceWorkerGlobalScope {
|
||||
readonly location: WorkerLocation;
|
||||
readonly clients: Clients;
|
||||
readonly registration: ServiceWorkerRegistration;
|
||||
addEventListener<K extends keyof ServiceWorkerGlobalScopeEventMap>(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
||||
}
|
||||
interface ServiceWorkerGlobalScopeEventMap {
|
||||
notificationclick: NotificationEvent;
|
||||
push: PushEvent;
|
||||
pushsubscriptionchange: PushSubscriptionChangeEvent;
|
||||
}
|
||||
interface Client {
|
||||
readonly id: string;
|
||||
readonly type: ClientTypes;
|
||||
readonly url: string;
|
||||
postMessage(message: any, transfer?: Transferable[]): void;
|
||||
}
|
||||
interface ClientQueryOptions {
|
||||
includeReserved?: boolean;
|
||||
includeUncontrolled?: boolean;
|
||||
type?: ClientTypes;
|
||||
}
|
||||
interface WindowClient extends Client {
|
||||
readonly focused: boolean;
|
||||
readonly visibilityState: VisibilityState;
|
||||
focus(): Promise<WindowClient>;
|
||||
navigate(url: string): Promise<WindowClient>;
|
||||
}
|
||||
interface Clients {
|
||||
claim(): Promise<void>;
|
||||
get(id: string): Promise<any>;
|
||||
matchAll(options?: ClientQueryOptions): Promise<Client[]>;
|
||||
openWindow(url: string): Promise<WindowClient | null>;
|
||||
}
|
||||
interface ExtendableEvent extends Event {
|
||||
waitUntil(f: Promise<any>): void;
|
||||
}
|
||||
interface NotificationEvent extends ExtendableEvent {
|
||||
readonly action: string;
|
||||
readonly notification: Notification;
|
||||
}
|
||||
interface PushMessageData {
|
||||
arrayBuffer(): ArrayBuffer;
|
||||
blob(): Blob;
|
||||
json(): any;
|
||||
text(): string;
|
||||
}
|
||||
interface PushEvent extends ExtendableEvent {
|
||||
readonly data: PushMessageData | null;
|
||||
}
|
||||
interface PushSubscriptionChangeEvent extends ExtendableEvent {
|
||||
readonly newSubscription: PushSubscription | null;
|
||||
readonly oldSubscription: PushSubscription | null;
|
||||
}
|
||||
interface WorkerLocation {
|
||||
readonly hash: string;
|
||||
readonly host: string;
|
||||
readonly hostname: string;
|
||||
readonly href: string;
|
||||
readonly origin: string;
|
||||
readonly pathname: string;
|
||||
readonly port: string;
|
||||
readonly protocol: string;
|
||||
readonly search: string;
|
||||
toString(): string;
|
||||
}
|
82
node_modules/@firebase/messaging/package.json
generated
vendored
Normal file
82
node_modules/@firebase/messaging/package.json
generated
vendored
Normal file
@ -0,0 +1,82 @@
|
||||
{
|
||||
"_from": "@firebase/messaging@0.6.3",
|
||||
"_id": "@firebase/messaging@0.6.3",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-PgkKsJwErLDsCqrcFSaLgFH/oXzMcwBbNN7HyAXTsWxUwhBbG7c5xtGRGd21F82EEmXcFl3VU/Y/kyYuXskrbQ==",
|
||||
"_location": "/@firebase/messaging",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "@firebase/messaging@0.6.3",
|
||||
"name": "@firebase/messaging",
|
||||
"escapedName": "@firebase%2fmessaging",
|
||||
"scope": "@firebase",
|
||||
"rawSpec": "0.6.3",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "0.6.3"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/firebase"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@firebase/messaging/-/messaging-0.6.3.tgz",
|
||||
"_shasum": "a9a2648c12dc0c5339c35afcd4588b62c7fd76ed",
|
||||
"_spec": "@firebase/messaging@0.6.3",
|
||||
"_where": "C:\\Users\\matia\\Documents\\GitHub\\Musix-V3\\node_modules\\firebase",
|
||||
"author": {
|
||||
"name": "Firebase",
|
||||
"email": "firebase-support@google.com",
|
||||
"url": "https://firebase.google.com/"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/firebase/firebase-js-sdk/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"@firebase/component": "0.1.4",
|
||||
"@firebase/installations": "0.4.1",
|
||||
"@firebase/messaging-types": "0.4.1",
|
||||
"@firebase/util": "0.2.39",
|
||||
"idb": "3.0.2",
|
||||
"tslib": "1.10.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "This is the Firebase Cloud Messaging component of the Firebase JS SDK.",
|
||||
"devDependencies": {
|
||||
"rollup": "1.28.0",
|
||||
"rollup-plugin-typescript2": "0.25.3",
|
||||
"ts-essentials": "4.0.0",
|
||||
"typescript": "3.7.3"
|
||||
},
|
||||
"esm2017": "dist/index.esm2017.js",
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"homepage": "https://github.com/firebase/firebase-js-sdk#readme",
|
||||
"license": "Apache-2.0",
|
||||
"main": "dist/index.cjs.js",
|
||||
"module": "dist/index.esm.js",
|
||||
"name": "@firebase/messaging",
|
||||
"peerDependencies": {
|
||||
"@firebase/app": "0.x",
|
||||
"@firebase/app-types": "0.x"
|
||||
},
|
||||
"repository": {
|
||||
"directory": "packages/messaging",
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/firebase/firebase-js-sdk.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rollup -c",
|
||||
"dev": "rollup -c -w",
|
||||
"lint": "eslint -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
|
||||
"lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
|
||||
"prepare": "yarn build",
|
||||
"test": "run-p test:karma type-check lint",
|
||||
"test:debug": "karma start --browsers=Chrome --auto-watch",
|
||||
"test:karma": "karma start --single-run",
|
||||
"type-check": "tsc --noEmit"
|
||||
},
|
||||
"typings": "dist/index.d.ts",
|
||||
"version": "0.6.3"
|
||||
}
|
Reference in New Issue
Block a user