firebase-admin 11.6.0 → 11.8.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.
Files changed (203) hide show
  1. package/lib/app/core.d.ts +1 -1
  2. package/lib/app/core.js +1 -1
  3. package/lib/app/credential-factory.d.ts +1 -1
  4. package/lib/app/credential-factory.js +1 -1
  5. package/lib/app/credential-internal.d.ts +1 -1
  6. package/lib/app/credential-internal.js +36 -36
  7. package/lib/app/credential.d.ts +1 -1
  8. package/lib/app/credential.js +1 -1
  9. package/lib/app/firebase-app.d.ts +1 -1
  10. package/lib/app/firebase-app.js +1 -1
  11. package/lib/app/firebase-namespace.d.ts +1 -1
  12. package/lib/app/firebase-namespace.js +1 -1
  13. package/lib/app/index.d.ts +1 -1
  14. package/lib/app/index.js +1 -1
  15. package/lib/app/lifecycle.d.ts +1 -1
  16. package/lib/app/lifecycle.js +1 -1
  17. package/lib/app-check/app-check-api-client-internal.d.ts +2 -2
  18. package/lib/app-check/app-check-api-client-internal.js +37 -1
  19. package/lib/app-check/app-check-api.d.ts +35 -1
  20. package/lib/app-check/app-check-api.js +1 -1
  21. package/lib/app-check/app-check-namespace.d.ts +9 -2
  22. package/lib/app-check/app-check-namespace.js +1 -1
  23. package/lib/app-check/app-check.d.ts +5 -3
  24. package/lib/app-check/app-check.js +23 -2
  25. package/lib/app-check/index.d.ts +2 -2
  26. package/lib/app-check/index.js +1 -1
  27. package/lib/app-check/token-generator.d.ts +1 -1
  28. package/lib/app-check/token-generator.js +1 -1
  29. package/lib/app-check/token-verifier.d.ts +1 -1
  30. package/lib/app-check/token-verifier.js +1 -1
  31. package/lib/auth/action-code-settings-builder.d.ts +1 -1
  32. package/lib/auth/action-code-settings-builder.js +1 -1
  33. package/lib/auth/auth-api-request.d.ts +1 -1
  34. package/lib/auth/auth-api-request.js +12 -12
  35. package/lib/auth/auth-config.d.ts +98 -9
  36. package/lib/auth/auth-config.js +227 -123
  37. package/lib/auth/auth-namespace.d.ts +1 -1
  38. package/lib/auth/auth-namespace.js +1 -1
  39. package/lib/auth/auth.d.ts +1 -1
  40. package/lib/auth/auth.js +1 -1
  41. package/lib/auth/base-auth.d.ts +1 -1
  42. package/lib/auth/base-auth.js +1 -1
  43. package/lib/auth/identifier.d.ts +2 -2
  44. package/lib/auth/identifier.js +1 -1
  45. package/lib/auth/index.d.ts +2 -2
  46. package/lib/auth/index.js +1 -1
  47. package/lib/auth/project-config-manager.d.ts +2 -5
  48. package/lib/auth/project-config-manager.js +2 -5
  49. package/lib/auth/project-config.d.ts +26 -7
  50. package/lib/auth/project-config.js +36 -18
  51. package/lib/auth/tenant-manager.d.ts +1 -1
  52. package/lib/auth/tenant-manager.js +1 -1
  53. package/lib/auth/tenant.d.ts +23 -3
  54. package/lib/auth/tenant.js +56 -35
  55. package/lib/auth/token-generator.d.ts +1 -1
  56. package/lib/auth/token-generator.js +1 -1
  57. package/lib/auth/token-verifier.d.ts +1 -1
  58. package/lib/auth/token-verifier.js +1 -1
  59. package/lib/auth/user-import-builder.d.ts +3 -3
  60. package/lib/auth/user-import-builder.js +1 -1
  61. package/lib/auth/user-record.d.ts +1 -1
  62. package/lib/auth/user-record.js +11 -11
  63. package/lib/credential/index.d.ts +1 -1
  64. package/lib/credential/index.js +1 -1
  65. package/lib/database/database-namespace.d.ts +1 -1
  66. package/lib/database/database-namespace.js +1 -1
  67. package/lib/database/database.d.ts +1 -1
  68. package/lib/database/database.js +1 -1
  69. package/lib/database/index.d.ts +1 -1
  70. package/lib/database/index.js +1 -1
  71. package/lib/default-namespace.d.ts +1 -1
  72. package/lib/default-namespace.js +1 -1
  73. package/lib/eventarc/cloudevent.d.ts +2 -2
  74. package/lib/eventarc/cloudevent.js +1 -1
  75. package/lib/eventarc/eventarc-client-internal.d.ts +1 -1
  76. package/lib/eventarc/eventarc-client-internal.js +1 -1
  77. package/lib/eventarc/eventarc-utils.d.ts +2 -2
  78. package/lib/eventarc/eventarc-utils.js +1 -1
  79. package/lib/eventarc/eventarc.d.ts +1 -1
  80. package/lib/eventarc/eventarc.js +1 -1
  81. package/lib/eventarc/index.d.ts +1 -1
  82. package/lib/eventarc/index.js +1 -1
  83. package/lib/extensions/extensions-api-client-internal.d.ts +2 -2
  84. package/lib/extensions/extensions-api-client-internal.js +1 -1
  85. package/lib/extensions/extensions-api.d.ts +2 -2
  86. package/lib/extensions/extensions-api.js +1 -1
  87. package/lib/extensions/extensions.d.ts +1 -1
  88. package/lib/extensions/extensions.js +1 -1
  89. package/lib/extensions/index.d.ts +1 -1
  90. package/lib/extensions/index.js +1 -1
  91. package/lib/firebase-namespace-api.d.ts +1 -1
  92. package/lib/firebase-namespace-api.js +1 -1
  93. package/lib/firestore/firestore-internal.d.ts +1 -1
  94. package/lib/firestore/firestore-internal.js +1 -1
  95. package/lib/firestore/firestore-namespace.d.ts +1 -1
  96. package/lib/firestore/firestore-namespace.js +1 -1
  97. package/lib/firestore/index.d.ts +1 -1
  98. package/lib/firestore/index.js +1 -1
  99. package/lib/functions/functions-api-client-internal.d.ts +2 -2
  100. package/lib/functions/functions-api-client-internal.js +1 -1
  101. package/lib/functions/functions-api.d.ts +3 -3
  102. package/lib/functions/functions-api.js +1 -1
  103. package/lib/functions/functions.d.ts +1 -1
  104. package/lib/functions/functions.js +1 -1
  105. package/lib/functions/index.d.ts +1 -1
  106. package/lib/functions/index.js +1 -1
  107. package/lib/index.d.ts +1 -1
  108. package/lib/index.js +1 -1
  109. package/lib/installations/index.d.ts +1 -1
  110. package/lib/installations/index.js +1 -1
  111. package/lib/installations/installations-namespace.d.ts +1 -1
  112. package/lib/installations/installations-namespace.js +1 -1
  113. package/lib/installations/installations-request-handler.d.ts +1 -1
  114. package/lib/installations/installations-request-handler.js +1 -1
  115. package/lib/installations/installations.d.ts +1 -1
  116. package/lib/installations/installations.js +1 -1
  117. package/lib/instance-id/index.d.ts +1 -1
  118. package/lib/instance-id/index.js +1 -1
  119. package/lib/instance-id/instance-id-namespace.d.ts +1 -1
  120. package/lib/instance-id/instance-id-namespace.js +1 -1
  121. package/lib/instance-id/instance-id.d.ts +1 -1
  122. package/lib/instance-id/instance-id.js +1 -1
  123. package/lib/machine-learning/index.d.ts +1 -1
  124. package/lib/machine-learning/index.js +1 -1
  125. package/lib/machine-learning/machine-learning-api-client.d.ts +3 -3
  126. package/lib/machine-learning/machine-learning-api-client.js +1 -1
  127. package/lib/machine-learning/machine-learning-namespace.d.ts +1 -1
  128. package/lib/machine-learning/machine-learning-namespace.js +1 -1
  129. package/lib/machine-learning/machine-learning-utils.d.ts +2 -2
  130. package/lib/machine-learning/machine-learning-utils.js +1 -1
  131. package/lib/machine-learning/machine-learning.d.ts +1 -1
  132. package/lib/machine-learning/machine-learning.js +1 -1
  133. package/lib/messaging/batch-request-internal.d.ts +1 -1
  134. package/lib/messaging/batch-request-internal.js +1 -1
  135. package/lib/messaging/index.d.ts +1 -1
  136. package/lib/messaging/index.js +1 -1
  137. package/lib/messaging/messaging-api-request-internal.d.ts +12 -2
  138. package/lib/messaging/messaging-api-request-internal.js +34 -1
  139. package/lib/messaging/messaging-api.d.ts +2 -2
  140. package/lib/messaging/messaging-api.js +1 -1
  141. package/lib/messaging/messaging-errors-internal.d.ts +1 -1
  142. package/lib/messaging/messaging-errors-internal.js +1 -1
  143. package/lib/messaging/messaging-internal.d.ts +1 -1
  144. package/lib/messaging/messaging-internal.js +1 -1
  145. package/lib/messaging/messaging-namespace.d.ts +1 -1
  146. package/lib/messaging/messaging-namespace.js +1 -1
  147. package/lib/messaging/messaging.d.ts +48 -6
  148. package/lib/messaging/messaging.js +116 -6
  149. package/lib/project-management/android-app.d.ts +1 -1
  150. package/lib/project-management/android-app.js +1 -1
  151. package/lib/project-management/app-metadata.d.ts +1 -1
  152. package/lib/project-management/app-metadata.js +1 -1
  153. package/lib/project-management/index.d.ts +1 -1
  154. package/lib/project-management/index.js +1 -1
  155. package/lib/project-management/ios-app.d.ts +1 -1
  156. package/lib/project-management/ios-app.js +1 -1
  157. package/lib/project-management/project-management-api-request-internal.d.ts +1 -1
  158. package/lib/project-management/project-management-api-request-internal.js +10 -10
  159. package/lib/project-management/project-management-namespace.d.ts +1 -1
  160. package/lib/project-management/project-management-namespace.js +1 -1
  161. package/lib/project-management/project-management.d.ts +1 -1
  162. package/lib/project-management/project-management.js +1 -1
  163. package/lib/remote-config/index.d.ts +1 -1
  164. package/lib/remote-config/index.js +1 -1
  165. package/lib/remote-config/remote-config-api-client-internal.d.ts +2 -2
  166. package/lib/remote-config/remote-config-api-client-internal.js +1 -1
  167. package/lib/remote-config/remote-config-api.d.ts +4 -4
  168. package/lib/remote-config/remote-config-api.js +1 -1
  169. package/lib/remote-config/remote-config-namespace.d.ts +1 -1
  170. package/lib/remote-config/remote-config-namespace.js +1 -1
  171. package/lib/remote-config/remote-config.d.ts +1 -1
  172. package/lib/remote-config/remote-config.js +1 -1
  173. package/lib/security-rules/index.d.ts +1 -1
  174. package/lib/security-rules/index.js +1 -1
  175. package/lib/security-rules/security-rules-api-client-internal.d.ts +1 -1
  176. package/lib/security-rules/security-rules-api-client-internal.js +1 -1
  177. package/lib/security-rules/security-rules-internal.d.ts +2 -2
  178. package/lib/security-rules/security-rules-internal.js +1 -1
  179. package/lib/security-rules/security-rules-namespace.d.ts +1 -1
  180. package/lib/security-rules/security-rules-namespace.js +1 -1
  181. package/lib/security-rules/security-rules.d.ts +1 -1
  182. package/lib/security-rules/security-rules.js +1 -1
  183. package/lib/storage/index.d.ts +1 -1
  184. package/lib/storage/index.js +1 -1
  185. package/lib/storage/storage-namespace.d.ts +1 -1
  186. package/lib/storage/storage-namespace.js +1 -1
  187. package/lib/storage/storage.d.ts +1 -1
  188. package/lib/storage/storage.js +1 -1
  189. package/lib/utils/api-request.d.ts +3 -3
  190. package/lib/utils/api-request.js +7 -7
  191. package/lib/utils/crypto-signer.d.ts +1 -1
  192. package/lib/utils/crypto-signer.js +1 -1
  193. package/lib/utils/deep-copy.d.ts +1 -1
  194. package/lib/utils/deep-copy.js +1 -1
  195. package/lib/utils/error.d.ts +14 -2
  196. package/lib/utils/error.js +19 -1
  197. package/lib/utils/index.d.ts +2 -2
  198. package/lib/utils/index.js +1 -1
  199. package/lib/utils/jwt.d.ts +3 -3
  200. package/lib/utils/jwt.js +1 -1
  201. package/lib/utils/validator.d.ts +1 -1
  202. package/lib/utils/validator.js +1 -1
  203. package/package.json +7 -7
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  /*!
3
3
  * @license
4
4
  * Copyright 2017 Google Inc.
@@ -45,6 +45,44 @@ export declare class Messaging {
45
45
  * service for delivery.
46
46
  */
47
47
  send(message: Message, dryRun?: boolean): Promise<string>;
48
+ /**
49
+ * Sends each message in the given array via Firebase Cloud Messaging.
50
+ *
51
+ * Unlike {@link Messaging.sendAll}, this method makes a single RPC call for each message
52
+ * in the given array.
53
+ *
54
+ * The responses list obtained from the return value corresponds to the order of `messages`.
55
+ * An error from this method or a `BatchResponse` with all failures indicates a total failure,
56
+ * meaning that none of the messages in the list could be sent. Partial failures or no
57
+ * failures are only indicated by a `BatchResponse` return value.
58
+ *
59
+ * @param messages - A non-empty array
60
+ * containing up to 500 messages.
61
+ * @param dryRun - Whether to send the messages in the dry-run
62
+ * (validation only) mode.
63
+ * @returns A Promise fulfilled with an object representing the result of the
64
+ * send operation.
65
+ */
66
+ sendEach(messages: Message[], dryRun?: boolean): Promise<BatchResponse>;
67
+ /**
68
+ * Sends the given multicast message to all the FCM registration tokens
69
+ * specified in it.
70
+ *
71
+ * This method uses the {@link Messaging.sendEach} API under the hood to send the given
72
+ * message to all the target recipients. The responses list obtained from the
73
+ * return value corresponds to the order of tokens in the `MulticastMessage`.
74
+ * An error from this method or a `BatchResponse` with all failures indicates a total
75
+ * failure, meaning that the messages in the list could be sent. Partial failures or
76
+ * failures are only indicated by a `BatchResponse` return value.
77
+ *
78
+ * @param message - A multicast message
79
+ * containing up to 500 tokens.
80
+ * @param dryRun - Whether to send the message in the dry-run
81
+ * (validation only) mode.
82
+ * @returns A Promise fulfilled with an object representing the result of the
83
+ * send operation.
84
+ */
85
+ sendEachForMulticast(message: MulticastMessage, dryRun?: boolean): Promise<BatchResponse>;
48
86
  /**
49
87
  * Sends all the messages in the given array via Firebase Cloud Messaging.
50
88
  * Employs batching to send the entire list as a single RPC call. Compared
@@ -53,8 +91,8 @@ export declare class Messaging {
53
91
  *
54
92
  * The responses list obtained from the return value
55
93
  * corresponds to the order of tokens in the `MulticastMessage`. An error
56
- * from this method indicates a total failure -- i.e. none of the messages in
57
- * the list could be sent. Partial failures are indicated by a `BatchResponse`
94
+ * from this method indicates a total failure, meaning that none of the messages
95
+ * in the list could be sent. Partial failures are indicated by a `BatchResponse`
58
96
  * return value.
59
97
  *
60
98
  * @param messages - A non-empty array
@@ -63,6 +101,8 @@ export declare class Messaging {
63
101
  * (validation only) mode.
64
102
  * @returns A Promise fulfilled with an object representing the result of the
65
103
  * send operation.
104
+ *
105
+ * @deprecated Use {@link Messaging.sendEach} instead.
66
106
  */
67
107
  sendAll(messages: Message[], dryRun?: boolean): Promise<BatchResponse>;
68
108
  /**
@@ -72,9 +112,9 @@ export declare class Messaging {
72
112
  * This method uses the `sendAll()` API under the hood to send the given
73
113
  * message to all the target recipients. The responses list obtained from the
74
114
  * return value corresponds to the order of tokens in the `MulticastMessage`.
75
- * An error from this method indicates a total failure -- i.e. the message was
76
- * not sent to any of the tokens in the list. Partial failures are indicated by
77
- * a `BatchResponse` return value.
115
+ * An error from this method indicates a total failure, meaning that the message
116
+ * was not sent to any of the tokens in the list. Partial failures are indicated
117
+ * by a `BatchResponse` return value.
78
118
  *
79
119
  * @param message - A multicast message
80
120
  * containing up to 500 tokens.
@@ -82,6 +122,8 @@ export declare class Messaging {
82
122
  * (validation only) mode.
83
123
  * @returns A Promise fulfilled with an object representing the result of the
84
124
  * send operation.
125
+ *
126
+ * @deprecated Use {@link Messaging.sendEachForMulticast} instead.
85
127
  */
86
128
  sendMulticast(message: MulticastMessage, dryRun?: boolean): Promise<BatchResponse>;
87
129
  /**
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -198,6 +198,112 @@ class Messaging {
198
198
  return response.name;
199
199
  });
200
200
  }
201
+ /**
202
+ * Sends each message in the given array via Firebase Cloud Messaging.
203
+ *
204
+ * Unlike {@link Messaging.sendAll}, this method makes a single RPC call for each message
205
+ * in the given array.
206
+ *
207
+ * The responses list obtained from the return value corresponds to the order of `messages`.
208
+ * An error from this method or a `BatchResponse` with all failures indicates a total failure,
209
+ * meaning that none of the messages in the list could be sent. Partial failures or no
210
+ * failures are only indicated by a `BatchResponse` return value.
211
+ *
212
+ * @param messages - A non-empty array
213
+ * containing up to 500 messages.
214
+ * @param dryRun - Whether to send the messages in the dry-run
215
+ * (validation only) mode.
216
+ * @returns A Promise fulfilled with an object representing the result of the
217
+ * send operation.
218
+ */
219
+ sendEach(messages, dryRun) {
220
+ if (validator.isArray(messages) && messages.constructor !== Array) {
221
+ // In more recent JS specs, an array-like object might have a constructor that is not of
222
+ // Array type. Our deepCopy() method doesn't handle them properly. Convert such objects to
223
+ // a regular array here before calling deepCopy(). See issue #566 for details.
224
+ messages = Array.from(messages);
225
+ }
226
+ const copy = (0, deep_copy_1.deepCopy)(messages);
227
+ if (!validator.isNonEmptyArray(copy)) {
228
+ throw new error_1.FirebaseMessagingError(error_1.MessagingClientErrorCode.INVALID_ARGUMENT, 'messages must be a non-empty array');
229
+ }
230
+ if (copy.length > FCM_MAX_BATCH_SIZE) {
231
+ throw new error_1.FirebaseMessagingError(error_1.MessagingClientErrorCode.INVALID_ARGUMENT, `messages list must not contain more than ${FCM_MAX_BATCH_SIZE} items`);
232
+ }
233
+ if (typeof dryRun !== 'undefined' && !validator.isBoolean(dryRun)) {
234
+ throw new error_1.FirebaseMessagingError(error_1.MessagingClientErrorCode.INVALID_ARGUMENT, 'dryRun must be a boolean');
235
+ }
236
+ return this.getUrlPath()
237
+ .then((urlPath) => {
238
+ const requests = copy.map((message) => {
239
+ (0, messaging_internal_1.validateMessage)(message);
240
+ const request = { message };
241
+ if (dryRun) {
242
+ request.validate_only = true;
243
+ }
244
+ return this.messagingRequestHandler.invokeRequestHandlerForSendResponse(FCM_SEND_HOST, urlPath, request);
245
+ });
246
+ return Promise.allSettled(requests);
247
+ }).then((results) => {
248
+ const responses = [];
249
+ results.forEach(result => {
250
+ if (result.status === 'fulfilled') {
251
+ responses.push(result.value);
252
+ }
253
+ else { // rejected
254
+ responses.push({ success: false, error: result.reason });
255
+ }
256
+ });
257
+ const successCount = responses.filter((resp) => resp.success).length;
258
+ return {
259
+ responses,
260
+ successCount,
261
+ failureCount: responses.length - successCount,
262
+ };
263
+ });
264
+ }
265
+ /**
266
+ * Sends the given multicast message to all the FCM registration tokens
267
+ * specified in it.
268
+ *
269
+ * This method uses the {@link Messaging.sendEach} API under the hood to send the given
270
+ * message to all the target recipients. The responses list obtained from the
271
+ * return value corresponds to the order of tokens in the `MulticastMessage`.
272
+ * An error from this method or a `BatchResponse` with all failures indicates a total
273
+ * failure, meaning that the messages in the list could be sent. Partial failures or
274
+ * failures are only indicated by a `BatchResponse` return value.
275
+ *
276
+ * @param message - A multicast message
277
+ * containing up to 500 tokens.
278
+ * @param dryRun - Whether to send the message in the dry-run
279
+ * (validation only) mode.
280
+ * @returns A Promise fulfilled with an object representing the result of the
281
+ * send operation.
282
+ */
283
+ sendEachForMulticast(message, dryRun) {
284
+ const copy = (0, deep_copy_1.deepCopy)(message);
285
+ if (!validator.isNonNullObject(copy)) {
286
+ throw new error_1.FirebaseMessagingError(error_1.MessagingClientErrorCode.INVALID_ARGUMENT, 'MulticastMessage must be a non-null object');
287
+ }
288
+ if (!validator.isNonEmptyArray(copy.tokens)) {
289
+ throw new error_1.FirebaseMessagingError(error_1.MessagingClientErrorCode.INVALID_ARGUMENT, 'tokens must be a non-empty array');
290
+ }
291
+ if (copy.tokens.length > FCM_MAX_BATCH_SIZE) {
292
+ throw new error_1.FirebaseMessagingError(error_1.MessagingClientErrorCode.INVALID_ARGUMENT, `tokens list must not contain more than ${FCM_MAX_BATCH_SIZE} items`);
293
+ }
294
+ const messages = copy.tokens.map((token) => {
295
+ return {
296
+ token,
297
+ android: copy.android,
298
+ apns: copy.apns,
299
+ data: copy.data,
300
+ notification: copy.notification,
301
+ webpush: copy.webpush,
302
+ fcmOptions: copy.fcmOptions,
303
+ };
304
+ });
305
+ return this.sendEach(messages, dryRun);
306
+ }
201
307
  /**
202
308
  * Sends all the messages in the given array via Firebase Cloud Messaging.
203
309
  * Employs batching to send the entire list as a single RPC call. Compared
@@ -206,8 +312,8 @@ class Messaging {
206
312
  *
207
313
  * The responses list obtained from the return value
208
314
  * corresponds to the order of tokens in the `MulticastMessage`. An error
209
- * from this method indicates a total failure -- i.e. none of the messages in
210
- * the list could be sent. Partial failures are indicated by a `BatchResponse`
315
+ * from this method indicates a total failure, meaning that none of the messages
316
+ * in the list could be sent. Partial failures are indicated by a `BatchResponse`
211
317
  * return value.
212
318
  *
213
319
  * @param messages - A non-empty array
@@ -216,6 +322,8 @@ class Messaging {
216
322
  * (validation only) mode.
217
323
  * @returns A Promise fulfilled with an object representing the result of the
218
324
  * send operation.
325
+ *
326
+ * @deprecated Use {@link Messaging.sendEach} instead.
219
327
  */
220
328
  sendAll(messages, dryRun) {
221
329
  if (validator.isArray(messages) && messages.constructor !== Array) {
@@ -257,9 +365,9 @@ class Messaging {
257
365
  * This method uses the `sendAll()` API under the hood to send the given
258
366
  * message to all the target recipients. The responses list obtained from the
259
367
  * return value corresponds to the order of tokens in the `MulticastMessage`.
260
- * An error from this method indicates a total failure -- i.e. the message was
261
- * not sent to any of the tokens in the list. Partial failures are indicated by
262
- * a `BatchResponse` return value.
368
+ * An error from this method indicates a total failure, meaning that the message
369
+ * was not sent to any of the tokens in the list. Partial failures are indicated
370
+ * by a `BatchResponse` return value.
263
371
  *
264
372
  * @param message - A multicast message
265
373
  * containing up to 500 tokens.
@@ -267,6 +375,8 @@ class Messaging {
267
375
  * (validation only) mode.
268
376
  * @returns A Promise fulfilled with an object representing the result of the
269
377
  * send operation.
378
+ *
379
+ * @deprecated Use {@link Messaging.sendEachForMulticast} instead.
270
380
  */
271
381
  sendMulticast(message, dryRun) {
272
382
  const copy = (0, deep_copy_1.deepCopy)(message);
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  /*!
3
3
  * Copyright 2018 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2018 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  /*!
3
3
  * Copyright 2021 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2021 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  /*!
3
3
  * Copyright 2020 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2020 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  /*!
3
3
  * Copyright 2018 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2018 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  /*!
3
3
  * Copyright 2018 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2018 Google Inc.
@@ -51,15 +51,6 @@ exports.assertServerResponse = assertServerResponse;
51
51
  * @internal
52
52
  */
53
53
  class ProjectManagementRequestHandler {
54
- /**
55
- * @param app - The app used to fetch access tokens to sign API requests.
56
- * @constructor
57
- */
58
- constructor(app) {
59
- this.baseUrl = `https://${PROJECT_MANAGEMENT_HOST_AND_PORT}${PROJECT_MANAGEMENT_PATH}`;
60
- this.baseBetaUrl = `https://${PROJECT_MANAGEMENT_HOST_AND_PORT}${PROJECT_MANAGEMENT_BETA_PATH}`;
61
- this.httpClient = new api_request_1.AuthorizedHttpClient(app);
62
- }
63
54
  static wrapAndRethrowHttpError(errStatusCode, errText) {
64
55
  let errorCode;
65
56
  let errorMessage;
@@ -101,6 +92,15 @@ class ProjectManagementRequestHandler {
101
92
  }
102
93
  throw new error_1.FirebaseProjectManagementError(errorCode, `${errorMessage} Status code: ${errStatusCode}. Raw server response: "${errText}".`);
103
94
  }
95
+ /**
96
+ * @param app - The app used to fetch access tokens to sign API requests.
97
+ * @constructor
98
+ */
99
+ constructor(app) {
100
+ this.baseUrl = `https://${PROJECT_MANAGEMENT_HOST_AND_PORT}${PROJECT_MANAGEMENT_PATH}`;
101
+ this.baseBetaUrl = `https://${PROJECT_MANAGEMENT_HOST_AND_PORT}${PROJECT_MANAGEMENT_BETA_PATH}`;
102
+ this.httpClient = new api_request_1.AuthorizedHttpClient(app);
103
+ }
104
104
  /**
105
105
  * @param parentResourceName - Fully-qualified resource name of the project whose Android
106
106
  * apps you want to list.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  /*!
3
3
  * Copyright 2021 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2021 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  /*!
3
3
  * Copyright 2018 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2018 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  /*!
3
3
  * Copyright 2020 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2020 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  /*!
3
3
  * Copyright 2020 Google Inc.
4
4
  *
@@ -15,7 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  import { PrefixedFirebaseError } from '../utils/error';
18
- export declare type RemoteConfigErrorCode = 'aborted' | 'already-exists' | 'failed-precondition' | 'internal-error' | 'invalid-argument' | 'not-found' | 'out-of-range' | 'permission-denied' | 'resource-exhausted' | 'unauthenticated' | 'unknown-error';
18
+ export type RemoteConfigErrorCode = 'aborted' | 'already-exists' | 'failed-precondition' | 'internal-error' | 'invalid-argument' | 'not-found' | 'out-of-range' | 'permission-denied' | 'resource-exhausted' | 'unauthenticated' | 'unknown-error';
19
19
  /**
20
20
  * Firebase Remote Config error code structure. This extends PrefixedFirebaseError.
21
21
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2020 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  /*!
3
3
  * Copyright 2021 Google Inc.
4
4
  *
@@ -17,12 +17,12 @@
17
17
  /**
18
18
  * Colors that are associated with conditions for display purposes.
19
19
  */
20
- export declare type TagColor = 'BLUE' | 'BROWN' | 'CYAN' | 'DEEP_ORANGE' | 'GREEN' | 'INDIGO' | 'LIME' | 'ORANGE' | 'PINK' | 'PURPLE' | 'TEAL';
20
+ export type TagColor = 'BLUE' | 'BROWN' | 'CYAN' | 'DEEP_ORANGE' | 'GREEN' | 'INDIGO' | 'LIME' | 'ORANGE' | 'PINK' | 'PURPLE' | 'TEAL';
21
21
  /**
22
22
  * Type representing a Remote Config parameter value data type.
23
23
  * Defaults to `STRING` if unspecified.
24
24
  */
25
- export declare type ParameterValueType = 'STRING' | 'BOOLEAN' | 'NUMBER' | 'JSON';
25
+ export type ParameterValueType = 'STRING' | 'BOOLEAN' | 'NUMBER' | 'JSON';
26
26
  /**
27
27
  * Interface representing a Remote Config condition.
28
28
  * A condition targets a specific group of users. A list of these conditions make up
@@ -70,7 +70,7 @@ export interface InAppDefaultValue {
70
70
  * A `RemoteConfigParameterValue` could be either an `ExplicitParameterValue` or
71
71
  * an `InAppDefaultValue`.
72
72
  */
73
- export declare type RemoteConfigParameterValue = ExplicitParameterValue | InAppDefaultValue;
73
+ export type RemoteConfigParameterValue = ExplicitParameterValue | InAppDefaultValue;
74
74
  /**
75
75
  * Interface representing a Remote Config parameter.
76
76
  * At minimum, a `defaultValue` or a `conditionalValues` entry must be present for the
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2021 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  /*!
3
3
  * Copyright 2021 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2021 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  /*!
3
3
  * Copyright 2020 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2020 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  /*!
3
3
  * Copyright 2020 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2020 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  /*!
3
3
  * Copyright 2019 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2019 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  /*!
3
3
  * Copyright 2019 Google Inc.
4
4
  *
@@ -15,7 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  import { PrefixedFirebaseError } from '../utils/error';
18
- export declare type SecurityRulesErrorCode = 'already-exists' | 'authentication-error' | 'internal-error' | 'invalid-argument' | 'invalid-server-response' | 'not-found' | 'resource-exhausted' | 'service-unavailable' | 'unknown-error';
18
+ export type SecurityRulesErrorCode = 'already-exists' | 'authentication-error' | 'internal-error' | 'invalid-argument' | 'invalid-server-response' | 'not-found' | 'resource-exhausted' | 'service-unavailable' | 'unknown-error';
19
19
  export declare class FirebaseSecurityRulesError extends PrefixedFirebaseError {
20
20
  constructor(code: SecurityRulesErrorCode, message: string);
21
21
  }
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2019 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  /*!
3
3
  * Copyright 2021 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2021 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  /*!
3
3
  * Copyright 2019 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2019 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  /*!
3
3
  * Copyright 2020 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2020 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  /*!
3
3
  * Copyright 2021 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2021 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  /*!
3
3
  * @license
4
4
  * Copyright 2017 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  /*!
3
3
  * @license
4
4
  * Copyright 2017 Google Inc.
@@ -22,9 +22,9 @@ import { FirebaseApp } from '../app/firebase-app';
22
22
  import http = require('http');
23
23
  import { EventEmitter } from 'events';
24
24
  /** Http method type definition. */
25
- export declare type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD';
25
+ export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD';
26
26
  /** API callback function type definition. */
27
- export declare type ApiCallbackFunction = (data: object) => void;
27
+ export type ApiCallbackFunction = (data: object) => void;
28
28
  /**
29
29
  * Configuration for constructing a new HTTP request.
30
30
  */