@firebase/messaging 0.12.4 → 0.12.5-20231120214520

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.
@@ -16,8 +16,8 @@
16
16
  */
17
17
  import { FirebaseApp } from '@firebase/app';
18
18
  /**
19
- * Display notification details. They are sent through the
20
- * {@link https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification | Send API}
19
+ * Display notification details. Details are sent through the
20
+ * {@link https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification | Send API}.
21
21
  *
22
22
  * @public
23
23
  */
@@ -43,7 +43,7 @@ export interface NotificationPayload {
43
43
  /**
44
44
  * Options for features provided by the FCM SDK for Web. See {@link
45
45
  * https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#webpushfcmoptions |
46
- * WebpushFcmOptions}
46
+ * WebpushFcmOptions}.
47
47
  *
48
48
  * @public
49
49
  */
@@ -61,7 +61,7 @@ export interface FcmOptions {
61
61
  * Message payload that contains the notification payload that is represented with
62
62
  * {@link NotificationPayload} and the data payload that contains an arbitrary
63
63
  * number of key-value pairs sent by developers through the
64
- * {@link https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification | Send API}
64
+ * {@link https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification | Send API}.
65
65
  *
66
66
  * @public
67
67
  */
@@ -90,23 +90,23 @@ export interface MessagePayload {
90
90
  */
91
91
  collapseKey: string;
92
92
  /**
93
- * The message id of a message.
93
+ * The message ID of a message.
94
94
  */
95
95
  messageId: string;
96
96
  }
97
97
  /**
98
- * Options for {@link getToken}
98
+ * Options for {@link getToken}.
99
99
  *
100
100
  * @public
101
101
  */
102
102
  export interface GetTokenOptions {
103
103
  /**
104
- * The public server key provided to push services. It is used to
105
- * authenticate the push subscribers to receive push messages only from sending servers that hold
104
+ * The public server key provided to push services. The key is used to
105
+ * authenticate push subscribers to receive push messages only from sending servers that hold
106
106
  * the corresponding private key. If it is not provided, a default VAPID key is used. Note that some
107
107
  * push services (Chrome Push Service) require a non-default VAPID key. Therefore, it is recommended
108
108
  * to generate and import a VAPID key for your project with
109
- * {@link https://firebase.google.com/docs/cloud-messaging/js/client#configure_web_credentials_with_fcm | Configure Web Credentials with FCM}.
109
+ * {@link https://firebase.google.com/docs/cloud-messaging/js/client#configure_web_credentials_in_your_app | Configure Web Credentials with FCM}.
110
110
  * See
111
111
  * {@link https://developers.google.com/web/fundamentals/push-notifications/web-push-protocol | The Web Push Protocol}
112
112
  * for details on web push services.
@@ -116,7 +116,7 @@ export interface GetTokenOptions {
116
116
  * The service worker registration for receiving push
117
117
  * messaging. If the registration is not provided explicitly, you need to have a
118
118
  * `firebase-messaging-sw.js` at your root location. See
119
- * {@link https://firebase.google.com/docs/cloud-messaging/js/client#retrieve-the-current-registration-token | Retrieve the current registration token}
119
+ * {@link https://firebase.google.com/docs/cloud-messaging/js/client#access_the_registration_token | Access the registration token}
120
120
  * for more details.
121
121
  */
122
122
  serviceWorkerRegistration?: ServiceWorkerRegistration;
@@ -1,5 +1,6 @@
1
1
  /**
2
- * Firebase Cloud Messaging
2
+ * The Firebase Cloud Messaging Web SDK.
3
+ * This SDK does not work in a Node.js environment.
3
4
  *
4
5
  * @packageDocumentation
5
6
  */
@@ -21,7 +22,7 @@ export declare function deleteToken(messaging: Messaging): Promise<boolean>;
21
22
  /**
22
23
  * Options for features provided by the FCM SDK for Web. See {@link
23
24
  * https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#webpushfcmoptions |
24
- * WebpushFcmOptions}
25
+ * WebpushFcmOptions}.
25
26
  *
26
27
  * @public
27
28
  */
@@ -45,15 +46,15 @@ export declare interface FcmOptions {
45
46
  */
46
47
  export declare function getMessaging(app?: FirebaseApp): Messaging;
47
48
  /**
48
- * Subscribes the {@link Messaging} instance to push notifications. Returns an Firebase Cloud
49
+ * Subscribes the {@link Messaging} instance to push notifications. Returns a Firebase Cloud
49
50
  * Messaging registration token that can be used to send push messages to that {@link Messaging}
50
51
  * instance.
51
52
  *
52
- * If a notification permission isn't already granted, this method asks the user for permission. The
53
+ * If notification permission isn't already granted, this method asks the user for permission. The
53
54
  * returned promise rejects if the user does not allow the app to show notifications.
54
55
  *
55
56
  * @param messaging - The {@link Messaging} instance.
56
- * @param options - Provides an optional vapid key and an optinoal service worker registration
57
+ * @param options - Provides an optional vapid key and an optional service worker registration.
57
58
  *
58
59
  * @returns The promise resolves with an FCM registration token.
59
60
  *
@@ -61,18 +62,18 @@ export declare function getMessaging(app?: FirebaseApp): Messaging;
61
62
  */
62
63
  export declare function getToken(messaging: Messaging, options?: GetTokenOptions): Promise<string>;
63
64
  /**
64
- * Options for {@link getToken}
65
+ * Options for {@link getToken}.
65
66
  *
66
67
  * @public
67
68
  */
68
69
  export declare interface GetTokenOptions {
69
70
  /**
70
- * The public server key provided to push services. It is used to
71
- * authenticate the push subscribers to receive push messages only from sending servers that hold
71
+ * The public server key provided to push services. The key is used to
72
+ * authenticate push subscribers to receive push messages only from sending servers that hold
72
73
  * the corresponding private key. If it is not provided, a default VAPID key is used. Note that some
73
74
  * push services (Chrome Push Service) require a non-default VAPID key. Therefore, it is recommended
74
75
  * to generate and import a VAPID key for your project with
75
- * {@link https://firebase.google.com/docs/cloud-messaging/js/client#configure_web_credentials_with_fcm | Configure Web Credentials with FCM}.
76
+ * {@link https://firebase.google.com/docs/cloud-messaging/js/client#configure_web_credentials_in_your_app | Configure Web Credentials with FCM}.
76
77
  * See
77
78
  * {@link https://developers.google.com/web/fundamentals/push-notifications/web-push-protocol | The Web Push Protocol}
78
79
  * for details on web push services.
@@ -82,7 +83,7 @@ export declare interface GetTokenOptions {
82
83
  * The service worker registration for receiving push
83
84
  * messaging. If the registration is not provided explicitly, you need to have a
84
85
  * `firebase-messaging-sw.js` at your root location. See
85
- * {@link https://firebase.google.com/docs/cloud-messaging/js/client#retrieve-the-current-registration-token | Retrieve the current registration token}
86
+ * {@link https://firebase.google.com/docs/cloud-messaging/js/client#access_the_registration_token | Access the registration token}
86
87
  * for more details.
87
88
  */
88
89
  serviceWorkerRegistration?: ServiceWorkerRegistration;
@@ -114,7 +115,7 @@ export declare function isSupported(): Promise<boolean>;
114
115
  * Message payload that contains the notification payload that is represented with
115
116
  * {@link NotificationPayload} and the data payload that contains an arbitrary
116
117
  * number of key-value pairs sent by developers through the
117
- * {@link https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification | Send API}
118
+ * {@link https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification | Send API}.
118
119
  *
119
120
  * @public
120
121
  */
@@ -143,7 +144,7 @@ export declare interface MessagePayload {
143
144
  */
144
145
  collapseKey: string;
145
146
  /**
146
- * The message id of a message.
147
+ * The message ID of a message.
147
148
  */
148
149
  messageId: string;
149
150
  }
@@ -160,8 +161,8 @@ export declare interface Messaging {
160
161
  }
161
162
  export { NextFn };
162
163
  /**
163
- * Display notification details. They are sent through the
164
- * {@link https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification | Send API}
164
+ * Display notification details. Details are sent through the
165
+ * {@link https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification | Send API}.
165
166
  *
166
167
  * @public
167
168
  */
package/dist/index.cjs.js CHANGED
@@ -1271,7 +1271,7 @@ function messageEventListener(messaging, event) {
1271
1271
  }
1272
1272
 
1273
1273
  var name = "@firebase/messaging";
1274
- var version = "0.12.4";
1274
+ var version = "0.12.5-20231120214520";
1275
1275
 
1276
1276
  /**
1277
1277
  * @license
@@ -1472,15 +1472,15 @@ function getMessagingInWindow(app$1) {
1472
1472
  return app._getProvider(util.getModularInstance(app$1), 'messaging').getImmediate();
1473
1473
  }
1474
1474
  /**
1475
- * Subscribes the {@link Messaging} instance to push notifications. Returns an Firebase Cloud
1475
+ * Subscribes the {@link Messaging} instance to push notifications. Returns a Firebase Cloud
1476
1476
  * Messaging registration token that can be used to send push messages to that {@link Messaging}
1477
1477
  * instance.
1478
1478
  *
1479
- * If a notification permission isn't already granted, this method asks the user for permission. The
1479
+ * If notification permission isn't already granted, this method asks the user for permission. The
1480
1480
  * returned promise rejects if the user does not allow the app to show notifications.
1481
1481
  *
1482
1482
  * @param messaging - The {@link Messaging} instance.
1483
- * @param options - Provides an optional vapid key and an optinoal service worker registration
1483
+ * @param options - Provides an optional vapid key and an optional service worker registration.
1484
1484
  *
1485
1485
  * @returns The promise resolves with an FCM registration token.
1486
1486
  *
@@ -1527,7 +1527,8 @@ function onMessage(messaging, nextOrObserver) {
1527
1527
  }
1528
1528
 
1529
1529
  /**
1530
- * Firebase Cloud Messaging
1530
+ * The Firebase Cloud Messaging Web SDK.
1531
+ * This SDK does not work in a Node.js environment.
1531
1532
  *
1532
1533
  * @packageDocumentation
1533
1534
  */