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
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -306,6 +306,12 @@ exports.parseHttpResponse = parseHttpResponse;
306
306
  * It also wraps the callback API of the Node.js standard library in a more flexible Promise API.
307
307
  */
308
308
  class AsyncHttpCall {
309
+ /**
310
+ * Sends an HTTP request based on the provided configuration.
311
+ */
312
+ static invoke(config) {
313
+ return new AsyncHttpCall(config).promise;
314
+ }
309
315
  constructor(config) {
310
316
  try {
311
317
  this.config = new HttpRequestConfigImpl(config);
@@ -321,12 +327,6 @@ class AsyncHttpCall {
321
327
  this.promise = Promise.reject(this.enhanceError(err, null));
322
328
  }
323
329
  }
324
- /**
325
- * Sends an HTTP request based on the provided configuration.
326
- */
327
- static invoke(config) {
328
- return new AsyncHttpCall(config).promise;
329
- }
330
330
  execute() {
331
331
  const transport = this.options.protocol === 'https:' ? https : http;
332
332
  const req = transport.request(this.options, (res) => {
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v11.6.0 */
1
+ /*! firebase-admin v11.8.0 */
2
2
  /*!
3
3
  * @license
4
4
  * Copyright 2021 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.
@@ -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.
@@ -549,6 +549,18 @@ export declare class AuthClientErrorCode {
549
549
  code: string;
550
550
  message: string;
551
551
  };
552
+ static INVALID_RECAPTCHA_ACTION: {
553
+ code: string;
554
+ message: string;
555
+ };
556
+ static INVALID_RECAPTCHA_ENFORCEMENT_STATE: {
557
+ code: string;
558
+ message: string;
559
+ };
560
+ static RECAPTCHA_NOT_ENABLED: {
561
+ code: string;
562
+ message: string;
563
+ };
552
564
  }
553
565
  /**
554
566
  * Messaging client error codes and their default messages.
@@ -655,4 +667,4 @@ export declare class InstanceIdClientErrorCode extends InstallationsClientErrorC
655
667
  message: string;
656
668
  };
657
669
  }
658
- export declare type ProjectManagementErrorCode = 'already-exists' | 'authentication-error' | 'internal-error' | 'invalid-argument' | 'invalid-project-id' | 'invalid-server-response' | 'not-found' | 'service-unavailable' | 'unknown-error';
670
+ export type ProjectManagementErrorCode = 'already-exists' | 'authentication-error' | 'internal-error' | 'invalid-argument' | 'invalid-project-id' | 'invalid-server-response' | 'not-found' | 'service-unavailable' | 'unknown-error';
@@ -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
@@ -698,6 +698,18 @@ AuthClientErrorCode.USER_NOT_DISABLED = {
698
698
  code: 'user-not-disabled',
699
699
  message: 'The user must be disabled in order to bulk delete it (or you must pass force=true).',
700
700
  };
701
+ AuthClientErrorCode.INVALID_RECAPTCHA_ACTION = {
702
+ code: 'invalid-recaptcha-action',
703
+ message: 'reCAPTCHA action must be "BLOCK".'
704
+ };
705
+ AuthClientErrorCode.INVALID_RECAPTCHA_ENFORCEMENT_STATE = {
706
+ code: 'invalid-recaptcha-enforcement-state',
707
+ message: 'reCAPTCHA enforcement state must be either "OFF", "AUDIT" or "ENFORCE".'
708
+ };
709
+ AuthClientErrorCode.RECAPTCHA_NOT_ENABLED = {
710
+ code: 'racaptcha-not-enabled',
711
+ message: 'reCAPTCHA enterprise is not enabled.'
712
+ };
701
713
  /**
702
714
  * Messaging client error codes and their default messages.
703
715
  */
@@ -944,6 +956,12 @@ const AUTH_SERVER_TO_CLIENT_CODE = {
944
956
  USER_DISABLED: 'USER_DISABLED',
945
957
  // Password provided is too weak.
946
958
  WEAK_PASSWORD: 'INVALID_PASSWORD',
959
+ // Unrecognized reCAPTCHA action.
960
+ INVALID_RECAPTCHA_ACTION: 'INVALID_RECAPTCHA_ACTION',
961
+ // Unrecognized reCAPTCHA enforcement state.
962
+ INVALID_RECAPTCHA_ENFORCEMENT_STATE: 'INVALID_RECAPTCHA_ENFORCEMENT_STATE',
963
+ // reCAPTCHA is not enabled for account defender.
964
+ RECAPTCHA_NOT_ENABLED: 'RECAPTCHA_NOT_ENABLED'
947
965
  };
948
966
  /** @const {ServerToClientCode} Messaging server to client enum error codes. */
949
967
  const MESSAGING_SERVER_TO_CLIENT_CODE = {
@@ -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.
@@ -128,7 +128,7 @@ export declare function transformMillisecondsToSecondsString(milliseconds: numbe
128
128
  /**
129
129
  * Internal type to represent a resource name
130
130
  */
131
- export declare type ParsedResource = {
131
+ export type ParsedResource = {
132
132
  projectId?: string;
133
133
  locationId?: string;
134
134
  resourceId: string;
@@ -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
  * Copyright 2021 Google Inc.
4
4
  *
@@ -18,10 +18,10 @@
18
18
  import * as jwt from 'jsonwebtoken';
19
19
  import { Agent } from 'http';
20
20
  export declare const ALGORITHM_RS256: jwt.Algorithm;
21
- export declare type Dictionary = {
21
+ export type Dictionary = {
22
22
  [key: string]: any;
23
23
  };
24
- export declare type DecodedToken = {
24
+ export type DecodedToken = {
25
25
  header: Dictionary;
26
26
  payload: Dictionary;
27
27
  };
package/lib/utils/jwt.js CHANGED
@@ -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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "firebase-admin",
3
- "version": "11.6.0",
3
+ "version": "11.8.0",
4
4
  "description": "Firebase admin SDK for Node.js",
5
5
  "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
6
6
  "license": "Apache-2.0",
@@ -196,9 +196,9 @@
196
196
  }
197
197
  },
198
198
  "dependencies": {
199
- "@fastify/busboy": "^1.1.0",
200
- "@firebase/database-compat": "^0.3.0",
201
- "@firebase/database-types": "^0.10.0",
199
+ "@fastify/busboy": "^1.2.1",
200
+ "@firebase/database-compat": "^0.3.4",
201
+ "@firebase/database-types": "^0.10.4",
202
202
  "@types/node": ">=12.12.47",
203
203
  "jsonwebtoken": "^9.0.0",
204
204
  "jwks-rsa": "^3.0.1",
@@ -206,13 +206,13 @@
206
206
  "uuid": "^9.0.0"
207
207
  },
208
208
  "optionalDependencies": {
209
- "@google-cloud/firestore": "^6.4.0",
210
- "@google-cloud/storage": "^6.5.2"
209
+ "@google-cloud/firestore": "^6.5.0",
210
+ "@google-cloud/storage": "^6.9.5"
211
211
  },
212
212
  "devDependencies": {
213
213
  "@firebase/api-documenter": "^0.3.0",
214
214
  "@firebase/app-compat": "^0.2.1",
215
- "@firebase/auth-compat": "^0.3.1",
215
+ "@firebase/auth-compat": "^0.4.1",
216
216
  "@firebase/auth-types": "^0.12.0",
217
217
  "@microsoft/api-extractor": "^7.11.2",
218
218
  "@types/bcrypt": "^5.0.0",