@depup/firebase__messaging 0.12.24-depup.0
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/README.md +32 -0
- package/changes.json +14 -0
- package/dist/esm/index.esm.js +1270 -0
- package/dist/esm/index.esm.js.map +1 -0
- package/dist/esm/index.sw.esm.js +1278 -0
- package/dist/esm/index.sw.esm.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/externalizePayload.d.ts +19 -0
- package/dist/esm/src/helpers/extract-app-config.d.ts +19 -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/logToScion.d.ts +19 -0
- package/dist/esm/src/helpers/migrate-old-database.d.ts +51 -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/updateSwReg.d.ts +18 -0
- package/dist/esm/src/helpers/updateVapidKey.d.ts +18 -0
- package/dist/esm/src/index.d.ts +32 -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 +65 -0
- package/dist/esm/src/interfaces/logging-types.d.ts +60 -0
- package/dist/esm/src/interfaces/public-types.d.ts +144 -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/requests.d.ts +35 -0
- package/dist/esm/src/internals/token-manager.d.ts +23 -0
- package/dist/esm/src/listeners/sw-listeners.d.ts +21 -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/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 +83 -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 +40 -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-public.d.ts +204 -0
- package/dist/index.cjs.js +1278 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.sw.cjs +1285 -0
- package/dist/index.sw.cjs.map +1 -0
- package/dist/internal.d.ts +220 -0
- package/dist/private.d.ts +217 -0
- package/dist/src/api/deleteToken.d.ts +18 -0
- package/dist/src/api/getToken.d.ts +19 -0
- package/dist/src/api/isSupported.d.ts +30 -0
- package/dist/src/api/onBackgroundMessage.d.ts +19 -0
- package/dist/src/api/onMessage.d.ts +19 -0
- package/dist/src/api/setDeliveryMetricsExportedToBigQueryEnabled.d.ts +18 -0
- package/dist/src/api.d.ts +101 -0
- package/dist/src/helpers/array-base64-translator.d.ts +18 -0
- package/dist/src/helpers/externalizePayload.d.ts +19 -0
- package/dist/src/helpers/extract-app-config.d.ts +19 -0
- package/dist/src/helpers/is-console-message.d.ts +18 -0
- package/dist/src/helpers/logToFirelog.d.ts +30 -0
- package/dist/src/helpers/logToScion.d.ts +19 -0
- package/dist/src/helpers/migrate-old-database.d.ts +51 -0
- package/dist/src/helpers/register.d.ts +23 -0
- package/dist/src/helpers/registerDefaultSw.d.ts +18 -0
- package/dist/src/helpers/sleep.d.ts +18 -0
- package/dist/src/helpers/updateSwReg.d.ts +18 -0
- package/dist/src/helpers/updateVapidKey.d.ts +18 -0
- package/dist/src/index.d.ts +32 -0
- package/dist/src/index.sw.d.ts +26 -0
- package/dist/src/interfaces/app-config.d.ts +24 -0
- package/dist/src/interfaces/internal-dependencies.d.ts +27 -0
- package/dist/src/interfaces/internal-message-payload.d.ts +65 -0
- package/dist/src/interfaces/logging-types.d.ts +60 -0
- package/dist/src/interfaces/public-types.d.ts +144 -0
- package/dist/src/interfaces/token-details.d.ts +32 -0
- package/dist/src/internals/idb-manager.d.ts +27 -0
- package/dist/src/internals/requests.d.ts +35 -0
- package/dist/src/internals/token-manager.d.ts +23 -0
- package/dist/src/listeners/sw-listeners.d.ts +21 -0
- package/dist/src/listeners/window-listener.d.ts +18 -0
- package/dist/src/messaging-service.d.ts +36 -0
- package/dist/src/testing/compare-headers.d.ts +22 -0
- package/dist/src/testing/fakes/firebase-dependencies.d.ts +25 -0
- package/dist/src/testing/fakes/logging-object.d.ts +18 -0
- package/dist/src/testing/fakes/messaging-service.d.ts +18 -0
- package/dist/src/testing/fakes/service-worker.d.ts +83 -0
- package/dist/src/testing/fakes/token-details.d.ts +18 -0
- package/dist/src/testing/setup.d.ts +17 -0
- package/dist/src/testing/sinon-types.d.ts +19 -0
- package/dist/src/tsdoc-metadata.json +11 -0
- package/dist/src/util/constants.d.ts +40 -0
- package/dist/src/util/errors.d.ts +57 -0
- package/dist/src/util/sw-types.d.ts +90 -0
- package/dist/sw/index-public.d.ts +166 -0
- package/dist/sw/internal.d.ts +180 -0
- package/dist/sw/private.d.ts +177 -0
- package/package.json +103 -0
- package/sw/package.json +8 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { FirebaseApp } from '@firebase/app';
|
|
2
|
+
import { NextFn } from '@firebase/util';
|
|
3
|
+
import { Observer } from '@firebase/util';
|
|
4
|
+
import { Unsubscribe } from '@firebase/util';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Enables or disables Firebase Cloud Messaging message delivery metrics export to BigQuery. By
|
|
8
|
+
* default, message delivery metrics are not exported to BigQuery. Use this method to enable or
|
|
9
|
+
* disable the export at runtime.
|
|
10
|
+
*
|
|
11
|
+
* @param messaging - The `FirebaseMessaging` instance.
|
|
12
|
+
* @param enable - Whether Firebase Cloud Messaging should export message delivery metrics to
|
|
13
|
+
* BigQuery.
|
|
14
|
+
*
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
export declare function experimentalSetDeliveryMetricsExportedToBigQueryEnabled(messaging: Messaging, enable: boolean): void;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Options for features provided by the FCM SDK for Web. See {@link
|
|
21
|
+
* https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#webpushfcmoptions |
|
|
22
|
+
* WebpushFcmOptions}.
|
|
23
|
+
*
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export declare interface FcmOptions {
|
|
27
|
+
/**
|
|
28
|
+
* The link to open when the user clicks on the notification.
|
|
29
|
+
*/
|
|
30
|
+
link?: string;
|
|
31
|
+
/**
|
|
32
|
+
* The label associated with the message's analytics data.
|
|
33
|
+
*/
|
|
34
|
+
analyticsLabel?: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
export declare type _FirebaseMessagingName = 'messaging';
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Retrieves a Firebase Cloud Messaging instance.
|
|
44
|
+
*
|
|
45
|
+
* @returns The Firebase Cloud Messaging instance associated with the provided firebase app.
|
|
46
|
+
*
|
|
47
|
+
* @public
|
|
48
|
+
*/
|
|
49
|
+
export declare function getMessaging(app?: FirebaseApp): Messaging;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Options for {@link getToken}.
|
|
53
|
+
*
|
|
54
|
+
* @public
|
|
55
|
+
*/
|
|
56
|
+
export declare interface GetTokenOptions {
|
|
57
|
+
/**
|
|
58
|
+
* The public server key provided to push services. The key is used to
|
|
59
|
+
* authenticate push subscribers to receive push messages only from sending servers that hold
|
|
60
|
+
* the corresponding private key. If it is not provided, a default VAPID key is used. Note that some
|
|
61
|
+
* push services (Chrome Push Service) require a non-default VAPID key. Therefore, it is recommended
|
|
62
|
+
* to generate and import a VAPID key for your project with
|
|
63
|
+
* {@link https://firebase.google.com/docs/cloud-messaging/js/client#configure_web_credentials_in_your_app | Configure Web Credentials with FCM}.
|
|
64
|
+
* See
|
|
65
|
+
* {@link https://developers.google.com/web/fundamentals/push-notifications/web-push-protocol | The Web Push Protocol}
|
|
66
|
+
* for details on web push services.
|
|
67
|
+
*/
|
|
68
|
+
vapidKey?: string;
|
|
69
|
+
/**
|
|
70
|
+
* The service worker registration for receiving push
|
|
71
|
+
* messaging. If the registration is not provided explicitly, you need to have a
|
|
72
|
+
* `firebase-messaging-sw.js` at your root location. See
|
|
73
|
+
* {@link https://firebase.google.com/docs/cloud-messaging/js/client#access_the_registration_token | Access the registration token}
|
|
74
|
+
* for more details.
|
|
75
|
+
*/
|
|
76
|
+
serviceWorkerRegistration?: ServiceWorkerRegistration;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Checks whether all required APIs exist within SW Context
|
|
81
|
+
* @returns a Promise that resolves to a boolean.
|
|
82
|
+
*
|
|
83
|
+
* @public
|
|
84
|
+
*/
|
|
85
|
+
export declare function isSupported(): Promise<boolean>;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Message payload that contains the notification payload that is represented with
|
|
89
|
+
* {@link NotificationPayload} and the data payload that contains an arbitrary
|
|
90
|
+
* number of key-value pairs sent by developers through the
|
|
91
|
+
* {@link https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification | Send API}.
|
|
92
|
+
*
|
|
93
|
+
* @public
|
|
94
|
+
*/
|
|
95
|
+
export declare interface MessagePayload {
|
|
96
|
+
/**
|
|
97
|
+
* {@inheritdoc NotificationPayload}
|
|
98
|
+
*/
|
|
99
|
+
notification?: NotificationPayload;
|
|
100
|
+
/**
|
|
101
|
+
* Arbitrary key/value payload.
|
|
102
|
+
*/
|
|
103
|
+
data?: {
|
|
104
|
+
[key: string]: string;
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* {@inheritdoc FcmOptions}
|
|
108
|
+
*/
|
|
109
|
+
fcmOptions?: FcmOptions;
|
|
110
|
+
/**
|
|
111
|
+
* The sender of this message.
|
|
112
|
+
*/
|
|
113
|
+
from: string;
|
|
114
|
+
/**
|
|
115
|
+
* The collapse key of the message. See
|
|
116
|
+
* {@link https://firebase.google.com/docs/cloud-messaging/concept-options#collapsible_and_non-collapsible_messages | Non-collapsible and collapsible messages}
|
|
117
|
+
*/
|
|
118
|
+
collapseKey: string;
|
|
119
|
+
/**
|
|
120
|
+
* The message ID of a message.
|
|
121
|
+
*/
|
|
122
|
+
messageId: string;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Public interface of the Firebase Cloud Messaging SDK.
|
|
127
|
+
*
|
|
128
|
+
* @public
|
|
129
|
+
*/
|
|
130
|
+
export declare interface Messaging {
|
|
131
|
+
/**
|
|
132
|
+
* The {@link @firebase/app#FirebaseApp} this `Messaging` instance is associated with.
|
|
133
|
+
*/
|
|
134
|
+
app: FirebaseApp;
|
|
135
|
+
}
|
|
136
|
+
export { NextFn }
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Display notification details. Details are sent through the
|
|
140
|
+
* {@link https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification | Send API}.
|
|
141
|
+
*
|
|
142
|
+
* @public
|
|
143
|
+
*/
|
|
144
|
+
export declare interface NotificationPayload {
|
|
145
|
+
/**
|
|
146
|
+
* The notification's title.
|
|
147
|
+
*/
|
|
148
|
+
title?: string;
|
|
149
|
+
/**
|
|
150
|
+
* The notification's body text.
|
|
151
|
+
*/
|
|
152
|
+
body?: string;
|
|
153
|
+
/**
|
|
154
|
+
* The URL of an image that is downloaded on the device and displayed in the notification.
|
|
155
|
+
*/
|
|
156
|
+
image?: string;
|
|
157
|
+
/**
|
|
158
|
+
* The URL to use for the notification's icon. If you don't send this key in the request,
|
|
159
|
+
* FCM displays the launcher icon specified in your app manifest.
|
|
160
|
+
*/
|
|
161
|
+
icon?: string;
|
|
162
|
+
}
|
|
163
|
+
export { Observer }
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Called when a message is received while the app is in the background. An app is considered to be
|
|
167
|
+
* in the background if no active window is displayed.
|
|
168
|
+
*
|
|
169
|
+
* @param messaging - The {@link Messaging} instance.
|
|
170
|
+
* @param nextOrObserver - This function, or observer object with `next` defined, is called when a
|
|
171
|
+
* message is received and the app is currently in the background.
|
|
172
|
+
*
|
|
173
|
+
* @returns To stop listening for messages execute this returned function
|
|
174
|
+
*
|
|
175
|
+
* @public
|
|
176
|
+
*/
|
|
177
|
+
export declare function onBackgroundMessage(messaging: Messaging, nextOrObserver: NextFn<MessagePayload> | Observer<MessagePayload>): Unsubscribe;
|
|
178
|
+
export { Unsubscribe }
|
|
179
|
+
|
|
180
|
+
export { }
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { FirebaseApp } from '@firebase/app';
|
|
2
|
+
import { NextFn } from '@firebase/util';
|
|
3
|
+
import { Observer } from '@firebase/util';
|
|
4
|
+
import { Unsubscribe } from '@firebase/util';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Enables or disables Firebase Cloud Messaging message delivery metrics export to BigQuery. By
|
|
8
|
+
* default, message delivery metrics are not exported to BigQuery. Use this method to enable or
|
|
9
|
+
* disable the export at runtime.
|
|
10
|
+
*
|
|
11
|
+
* @param messaging - The `FirebaseMessaging` instance.
|
|
12
|
+
* @param enable - Whether Firebase Cloud Messaging should export message delivery metrics to
|
|
13
|
+
* BigQuery.
|
|
14
|
+
*
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
export declare function experimentalSetDeliveryMetricsExportedToBigQueryEnabled(messaging: Messaging, enable: boolean): void;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Options for features provided by the FCM SDK for Web. See {@link
|
|
21
|
+
* https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#webpushfcmoptions |
|
|
22
|
+
* WebpushFcmOptions}.
|
|
23
|
+
*
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export declare interface FcmOptions {
|
|
27
|
+
/**
|
|
28
|
+
* The link to open when the user clicks on the notification.
|
|
29
|
+
*/
|
|
30
|
+
link?: string;
|
|
31
|
+
/**
|
|
32
|
+
* The label associated with the message's analytics data.
|
|
33
|
+
*/
|
|
34
|
+
analyticsLabel?: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Excluded from this release type: _FirebaseMessagingName */
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Retrieves a Firebase Cloud Messaging instance.
|
|
41
|
+
*
|
|
42
|
+
* @returns The Firebase Cloud Messaging instance associated with the provided firebase app.
|
|
43
|
+
*
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
export declare function getMessaging(app?: FirebaseApp): Messaging;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Options for {@link getToken}.
|
|
50
|
+
*
|
|
51
|
+
* @public
|
|
52
|
+
*/
|
|
53
|
+
export declare interface GetTokenOptions {
|
|
54
|
+
/**
|
|
55
|
+
* The public server key provided to push services. The key is used to
|
|
56
|
+
* authenticate push subscribers to receive push messages only from sending servers that hold
|
|
57
|
+
* the corresponding private key. If it is not provided, a default VAPID key is used. Note that some
|
|
58
|
+
* push services (Chrome Push Service) require a non-default VAPID key. Therefore, it is recommended
|
|
59
|
+
* to generate and import a VAPID key for your project with
|
|
60
|
+
* {@link https://firebase.google.com/docs/cloud-messaging/js/client#configure_web_credentials_in_your_app | Configure Web Credentials with FCM}.
|
|
61
|
+
* See
|
|
62
|
+
* {@link https://developers.google.com/web/fundamentals/push-notifications/web-push-protocol | The Web Push Protocol}
|
|
63
|
+
* for details on web push services.
|
|
64
|
+
*/
|
|
65
|
+
vapidKey?: string;
|
|
66
|
+
/**
|
|
67
|
+
* The service worker registration for receiving push
|
|
68
|
+
* messaging. If the registration is not provided explicitly, you need to have a
|
|
69
|
+
* `firebase-messaging-sw.js` at your root location. See
|
|
70
|
+
* {@link https://firebase.google.com/docs/cloud-messaging/js/client#access_the_registration_token | Access the registration token}
|
|
71
|
+
* for more details.
|
|
72
|
+
*/
|
|
73
|
+
serviceWorkerRegistration?: ServiceWorkerRegistration;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Checks whether all required APIs exist within SW Context
|
|
78
|
+
* @returns a Promise that resolves to a boolean.
|
|
79
|
+
*
|
|
80
|
+
* @public
|
|
81
|
+
*/
|
|
82
|
+
export declare function isSupported(): Promise<boolean>;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Message payload that contains the notification payload that is represented with
|
|
86
|
+
* {@link NotificationPayload} and the data payload that contains an arbitrary
|
|
87
|
+
* number of key-value pairs sent by developers through the
|
|
88
|
+
* {@link https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification | Send API}.
|
|
89
|
+
*
|
|
90
|
+
* @public
|
|
91
|
+
*/
|
|
92
|
+
export declare interface MessagePayload {
|
|
93
|
+
/**
|
|
94
|
+
* {@inheritdoc NotificationPayload}
|
|
95
|
+
*/
|
|
96
|
+
notification?: NotificationPayload;
|
|
97
|
+
/**
|
|
98
|
+
* Arbitrary key/value payload.
|
|
99
|
+
*/
|
|
100
|
+
data?: {
|
|
101
|
+
[key: string]: string;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* {@inheritdoc FcmOptions}
|
|
105
|
+
*/
|
|
106
|
+
fcmOptions?: FcmOptions;
|
|
107
|
+
/**
|
|
108
|
+
* The sender of this message.
|
|
109
|
+
*/
|
|
110
|
+
from: string;
|
|
111
|
+
/**
|
|
112
|
+
* The collapse key of the message. See
|
|
113
|
+
* {@link https://firebase.google.com/docs/cloud-messaging/concept-options#collapsible_and_non-collapsible_messages | Non-collapsible and collapsible messages}
|
|
114
|
+
*/
|
|
115
|
+
collapseKey: string;
|
|
116
|
+
/**
|
|
117
|
+
* The message ID of a message.
|
|
118
|
+
*/
|
|
119
|
+
messageId: string;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Public interface of the Firebase Cloud Messaging SDK.
|
|
124
|
+
*
|
|
125
|
+
* @public
|
|
126
|
+
*/
|
|
127
|
+
export declare interface Messaging {
|
|
128
|
+
/**
|
|
129
|
+
* The {@link @firebase/app#FirebaseApp} this `Messaging` instance is associated with.
|
|
130
|
+
*/
|
|
131
|
+
app: FirebaseApp;
|
|
132
|
+
}
|
|
133
|
+
export { NextFn }
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Display notification details. Details are sent through the
|
|
137
|
+
* {@link https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification | Send API}.
|
|
138
|
+
*
|
|
139
|
+
* @public
|
|
140
|
+
*/
|
|
141
|
+
export declare interface NotificationPayload {
|
|
142
|
+
/**
|
|
143
|
+
* The notification's title.
|
|
144
|
+
*/
|
|
145
|
+
title?: string;
|
|
146
|
+
/**
|
|
147
|
+
* The notification's body text.
|
|
148
|
+
*/
|
|
149
|
+
body?: string;
|
|
150
|
+
/**
|
|
151
|
+
* The URL of an image that is downloaded on the device and displayed in the notification.
|
|
152
|
+
*/
|
|
153
|
+
image?: string;
|
|
154
|
+
/**
|
|
155
|
+
* The URL to use for the notification's icon. If you don't send this key in the request,
|
|
156
|
+
* FCM displays the launcher icon specified in your app manifest.
|
|
157
|
+
*/
|
|
158
|
+
icon?: string;
|
|
159
|
+
}
|
|
160
|
+
export { Observer }
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Called when a message is received while the app is in the background. An app is considered to be
|
|
164
|
+
* in the background if no active window is displayed.
|
|
165
|
+
*
|
|
166
|
+
* @param messaging - The {@link Messaging} instance.
|
|
167
|
+
* @param nextOrObserver - This function, or observer object with `next` defined, is called when a
|
|
168
|
+
* message is received and the app is currently in the background.
|
|
169
|
+
*
|
|
170
|
+
* @returns To stop listening for messages execute this returned function
|
|
171
|
+
*
|
|
172
|
+
* @public
|
|
173
|
+
*/
|
|
174
|
+
export declare function onBackgroundMessage(messaging: Messaging, nextOrObserver: NextFn<MessagePayload> | Observer<MessagePayload>): Unsubscribe;
|
|
175
|
+
export { Unsubscribe }
|
|
176
|
+
|
|
177
|
+
export { }
|
package/package.json
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@depup/firebase__messaging",
|
|
3
|
+
"version": "0.12.24-depup.0",
|
|
4
|
+
"description": "[DepUp] Dependency-bumped version of @firebase/messaging",
|
|
5
|
+
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
|
|
6
|
+
"main": "dist/index.cjs.js",
|
|
7
|
+
"browser": "dist/esm/index.esm.js",
|
|
8
|
+
"module": "dist/esm/index.esm.js",
|
|
9
|
+
"sw": "dist/esm/index.sw.esm.js",
|
|
10
|
+
"sw-main": "dist/index.sw.cjs",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index-public.d.ts",
|
|
14
|
+
"require": "./dist/index.cjs.js",
|
|
15
|
+
"module": "./dist/esm/index.esm.js",
|
|
16
|
+
"default": "./dist/esm/index.esm.js"
|
|
17
|
+
},
|
|
18
|
+
"./sw": {
|
|
19
|
+
"types": "./dist/sw/index-public.d.ts",
|
|
20
|
+
"require": "./dist/index.sw.cjs",
|
|
21
|
+
"default": "./dist/esm/index.sw.esm.js"
|
|
22
|
+
},
|
|
23
|
+
"./package.json": "./package.json"
|
|
24
|
+
},
|
|
25
|
+
"typings": "./dist/index-public.d.ts",
|
|
26
|
+
"files": [
|
|
27
|
+
"dist",
|
|
28
|
+
"sw/package.json",
|
|
29
|
+
"changes.json",
|
|
30
|
+
"README.md"
|
|
31
|
+
],
|
|
32
|
+
"scripts": {
|
|
33
|
+
"lint": "eslint -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
|
|
34
|
+
"lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
|
|
35
|
+
"build": "rollup -c && yarn api-report",
|
|
36
|
+
"build:deps": "lerna run --scope @firebase/'{app,messaging}' --include-dependencies build",
|
|
37
|
+
"build:release": "yarn build && yarn typings:public",
|
|
38
|
+
"dev": "rollup -c -w",
|
|
39
|
+
"test": "run-p --npm-path npm test:karma type-check lint ",
|
|
40
|
+
"test:integration": "run-p --npm-path npm test:karma type-check lint && cd ../../integration/messaging && npm run-script test",
|
|
41
|
+
"test:ci": "node ../../scripts/run_tests_in_ci.js",
|
|
42
|
+
"test:karma": "karma start",
|
|
43
|
+
"test:debug": "karma start --browsers=Chrome --auto-watch",
|
|
44
|
+
"api-report": "yarn api-report:main && yarn api-report:sw && yarn api-report:api-json",
|
|
45
|
+
"api-report:main": "ts-node-script ../../repo-scripts/prune-dts/extract-public-api.ts --package messaging --packageRoot . --typescriptDts ./dist/src/index.d.ts --rollupDts ./dist/private.d.ts --untrimmedRollupDts ./dist/internal.d.ts --publicDts ./dist/index-public.d.ts",
|
|
46
|
+
"api-report:sw": "ts-node-script ../../repo-scripts/prune-dts/extract-public-api.ts --package messaging-sw --packageRoot . --typescriptDts ./dist/src/index.sw.d.ts --rollupDts ./dist/sw/private.d.ts --untrimmedRollupDts ./dist/sw/internal.d.ts --publicDts ./dist/sw/index-public.d.ts",
|
|
47
|
+
"api-report:api-json": "api-extractor run --local --verbose",
|
|
48
|
+
"type-check": "tsc --noEmit",
|
|
49
|
+
"trusted-type-check": "tsec -p tsconfig.json --noEmit",
|
|
50
|
+
"typings:public": "node ../../scripts/build/use_typings.js ./dist/index-public.d.ts"
|
|
51
|
+
},
|
|
52
|
+
"license": "Apache-2.0",
|
|
53
|
+
"peerDependencies": {
|
|
54
|
+
"@firebase/app": "0.x"
|
|
55
|
+
},
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"@firebase/installations": "0.6.20",
|
|
58
|
+
"@firebase/messaging-interop-types": "0.2.3",
|
|
59
|
+
"@firebase/util": "1.14.0",
|
|
60
|
+
"@firebase/component": "0.7.1",
|
|
61
|
+
"idb": "^8.0.3",
|
|
62
|
+
"tslib": "^2.8.1"
|
|
63
|
+
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"@firebase/app": "0.14.9",
|
|
66
|
+
"rollup": "2.79.2",
|
|
67
|
+
"rollup-plugin-typescript2": "0.36.0",
|
|
68
|
+
"@rollup/plugin-json": "6.1.0",
|
|
69
|
+
"ts-essentials": "10.0.4",
|
|
70
|
+
"typescript": "5.5.4"
|
|
71
|
+
},
|
|
72
|
+
"repository": {
|
|
73
|
+
"directory": "packages/messaging",
|
|
74
|
+
"type": "git",
|
|
75
|
+
"url": "git+https://github.com/firebase/firebase-js-sdk.git"
|
|
76
|
+
},
|
|
77
|
+
"bugs": {
|
|
78
|
+
"url": "https://github.com/firebase/firebase-js-sdk/issues"
|
|
79
|
+
},
|
|
80
|
+
"keywords": [
|
|
81
|
+
"depup",
|
|
82
|
+
"dependency-bumped",
|
|
83
|
+
"updated-deps",
|
|
84
|
+
"@firebase/messaging"
|
|
85
|
+
],
|
|
86
|
+
"depup": {
|
|
87
|
+
"changes": {
|
|
88
|
+
"idb": {
|
|
89
|
+
"from": "7.1.1",
|
|
90
|
+
"to": "^8.0.3"
|
|
91
|
+
},
|
|
92
|
+
"tslib": {
|
|
93
|
+
"from": "^2.1.0",
|
|
94
|
+
"to": "^2.8.1"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"depsUpdated": 2,
|
|
98
|
+
"originalPackage": "@firebase/messaging",
|
|
99
|
+
"originalVersion": "0.12.24",
|
|
100
|
+
"processedAt": "2026-03-17T16:31:15.579Z",
|
|
101
|
+
"smokeTest": "passed"
|
|
102
|
+
}
|
|
103
|
+
}
|
package/sw/package.json
ADDED