firebase-admin 12.6.0 → 13.0.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 (219) hide show
  1. package/README.md +1 -2
  2. package/lib/app/core.d.ts +1 -2
  3. package/lib/app/core.js +1 -1
  4. package/lib/app/credential-factory.d.ts +1 -2
  5. package/lib/app/credential-factory.js +5 -6
  6. package/lib/app/credential-internal.d.ts +37 -35
  7. package/lib/app/credential-internal.js +194 -294
  8. package/lib/app/credential.d.ts +1 -1
  9. package/lib/app/credential.js +1 -1
  10. package/lib/app/firebase-app.d.ts +1 -1
  11. package/lib/app/firebase-app.js +1 -1
  12. package/lib/app/firebase-namespace.d.ts +1 -1
  13. package/lib/app/firebase-namespace.js +1 -1
  14. package/lib/app/index.d.ts +1 -1
  15. package/lib/app/index.js +1 -1
  16. package/lib/app/lifecycle.d.ts +1 -1
  17. package/lib/app/lifecycle.js +6 -6
  18. package/lib/app-check/app-check-api-client-internal.d.ts +1 -1
  19. package/lib/app-check/app-check-api-client-internal.js +1 -1
  20. package/lib/app-check/app-check-api.d.ts +1 -1
  21. package/lib/app-check/app-check-api.js +1 -1
  22. package/lib/app-check/app-check-namespace.d.ts +1 -1
  23. package/lib/app-check/app-check-namespace.js +1 -1
  24. package/lib/app-check/app-check.d.ts +1 -1
  25. package/lib/app-check/app-check.js +1 -1
  26. package/lib/app-check/index.d.ts +1 -1
  27. package/lib/app-check/index.js +3 -3
  28. package/lib/app-check/token-generator.d.ts +1 -1
  29. package/lib/app-check/token-generator.js +3 -3
  30. package/lib/app-check/token-verifier.d.ts +1 -1
  31. package/lib/app-check/token-verifier.js +1 -1
  32. package/lib/auth/action-code-settings-builder.d.ts +1 -1
  33. package/lib/auth/action-code-settings-builder.js +1 -1
  34. package/lib/auth/auth-api-request.d.ts +1 -1
  35. package/lib/auth/auth-api-request.js +5 -5
  36. package/lib/auth/auth-config.d.ts +41 -17
  37. package/lib/auth/auth-config.js +114 -27
  38. package/lib/auth/auth-namespace.d.ts +1 -1
  39. package/lib/auth/auth-namespace.js +1 -1
  40. package/lib/auth/auth.d.ts +1 -1
  41. package/lib/auth/auth.js +1 -1
  42. package/lib/auth/base-auth.d.ts +1 -1
  43. package/lib/auth/base-auth.js +3 -3
  44. package/lib/auth/identifier.d.ts +1 -1
  45. package/lib/auth/identifier.js +5 -6
  46. package/lib/auth/index.d.ts +2 -2
  47. package/lib/auth/index.js +3 -3
  48. package/lib/auth/project-config-manager.d.ts +1 -1
  49. package/lib/auth/project-config-manager.js +1 -1
  50. package/lib/auth/project-config.d.ts +8 -8
  51. package/lib/auth/project-config.js +9 -9
  52. package/lib/auth/tenant-manager.d.ts +1 -1
  53. package/lib/auth/tenant-manager.js +1 -1
  54. package/lib/auth/tenant.d.ts +4 -4
  55. package/lib/auth/tenant.js +4 -4
  56. package/lib/auth/token-generator.d.ts +1 -2
  57. package/lib/auth/token-generator.js +3 -3
  58. package/lib/auth/token-verifier.d.ts +1 -1
  59. package/lib/auth/token-verifier.js +5 -5
  60. package/lib/auth/user-import-builder.d.ts +1 -2
  61. package/lib/auth/user-import-builder.js +3 -3
  62. package/lib/auth/user-record.d.ts +1 -1
  63. package/lib/auth/user-record.js +1 -1
  64. package/lib/credential/index.d.ts +1 -1
  65. package/lib/credential/index.js +1 -1
  66. package/lib/data-connect/data-connect-api-client-internal.d.ts +1 -1
  67. package/lib/data-connect/data-connect-api-client-internal.js +1 -1
  68. package/lib/data-connect/data-connect-api.d.ts +1 -1
  69. package/lib/data-connect/data-connect-api.js +1 -1
  70. package/lib/data-connect/data-connect.d.ts +1 -1
  71. package/lib/data-connect/data-connect.js +1 -1
  72. package/lib/data-connect/index.d.ts +1 -1
  73. package/lib/data-connect/index.js +3 -3
  74. package/lib/database/database-namespace.d.ts +1 -1
  75. package/lib/database/database-namespace.js +1 -1
  76. package/lib/database/database.d.ts +1 -2
  77. package/lib/database/database.js +1 -1
  78. package/lib/database/index.d.ts +1 -1
  79. package/lib/database/index.js +4 -4
  80. package/lib/default-namespace.d.ts +1 -1
  81. package/lib/default-namespace.js +1 -1
  82. package/lib/eventarc/cloudevent.d.ts +1 -1
  83. package/lib/eventarc/cloudevent.js +1 -1
  84. package/lib/eventarc/eventarc-client-internal.d.ts +1 -1
  85. package/lib/eventarc/eventarc-client-internal.js +1 -1
  86. package/lib/eventarc/eventarc-utils.d.ts +1 -1
  87. package/lib/eventarc/eventarc-utils.js +3 -3
  88. package/lib/eventarc/eventarc.d.ts +1 -1
  89. package/lib/eventarc/eventarc.js +1 -1
  90. package/lib/eventarc/index.d.ts +1 -1
  91. package/lib/eventarc/index.js +3 -3
  92. package/lib/extensions/extensions-api-client-internal.d.ts +1 -1
  93. package/lib/extensions/extensions-api-client-internal.js +1 -1
  94. package/lib/extensions/extensions-api.d.ts +1 -1
  95. package/lib/extensions/extensions-api.js +1 -1
  96. package/lib/extensions/extensions.d.ts +1 -1
  97. package/lib/extensions/extensions.js +1 -1
  98. package/lib/extensions/index.d.ts +1 -1
  99. package/lib/extensions/index.js +3 -3
  100. package/lib/firebase-namespace-api.d.ts +1 -1
  101. package/lib/firebase-namespace-api.js +1 -1
  102. package/lib/firestore/firestore-internal.d.ts +1 -1
  103. package/lib/firestore/firestore-internal.js +3 -3
  104. package/lib/firestore/firestore-namespace.d.ts +1 -1
  105. package/lib/firestore/firestore-namespace.js +1 -1
  106. package/lib/firestore/index.d.ts +1 -1
  107. package/lib/firestore/index.js +4 -4
  108. package/lib/functions/functions-api-client-internal.d.ts +1 -1
  109. package/lib/functions/functions-api-client-internal.js +7 -6
  110. package/lib/functions/functions-api.d.ts +1 -1
  111. package/lib/functions/functions-api.js +1 -1
  112. package/lib/functions/functions.d.ts +1 -1
  113. package/lib/functions/functions.js +1 -1
  114. package/lib/functions/index.d.ts +1 -1
  115. package/lib/functions/index.js +3 -3
  116. package/lib/index.d.ts +1 -1
  117. package/lib/index.js +1 -1
  118. package/lib/installations/index.d.ts +1 -1
  119. package/lib/installations/index.js +3 -3
  120. package/lib/installations/installations-namespace.d.ts +1 -1
  121. package/lib/installations/installations-namespace.js +1 -1
  122. package/lib/installations/installations-request-handler.d.ts +1 -1
  123. package/lib/installations/installations-request-handler.js +1 -1
  124. package/lib/installations/installations.d.ts +1 -1
  125. package/lib/installations/installations.js +1 -1
  126. package/lib/instance-id/index.d.ts +1 -1
  127. package/lib/instance-id/index.js +3 -3
  128. package/lib/instance-id/instance-id-namespace.d.ts +1 -1
  129. package/lib/instance-id/instance-id-namespace.js +1 -1
  130. package/lib/instance-id/instance-id.d.ts +1 -1
  131. package/lib/instance-id/instance-id.js +1 -1
  132. package/lib/machine-learning/index.d.ts +1 -1
  133. package/lib/machine-learning/index.js +3 -3
  134. package/lib/machine-learning/machine-learning-api-client.d.ts +1 -1
  135. package/lib/machine-learning/machine-learning-api-client.js +3 -3
  136. package/lib/machine-learning/machine-learning-namespace.d.ts +1 -1
  137. package/lib/machine-learning/machine-learning-namespace.js +1 -1
  138. package/lib/machine-learning/machine-learning-utils.d.ts +1 -1
  139. package/lib/machine-learning/machine-learning-utils.js +1 -1
  140. package/lib/machine-learning/machine-learning.d.ts +1 -1
  141. package/lib/machine-learning/machine-learning.js +1 -1
  142. package/lib/messaging/index.d.ts +2 -2
  143. package/lib/messaging/index.js +3 -3
  144. package/lib/messaging/messaging-api-request-internal.d.ts +2 -12
  145. package/lib/messaging/messaging-api-request-internal.js +4 -38
  146. package/lib/messaging/messaging-api.d.ts +8 -94
  147. package/lib/messaging/messaging-api.js +1 -1
  148. package/lib/messaging/messaging-errors-internal.d.ts +1 -1
  149. package/lib/messaging/messaging-errors-internal.js +3 -4
  150. package/lib/messaging/messaging-internal.d.ts +1 -1
  151. package/lib/messaging/messaging-internal.js +4 -3
  152. package/lib/messaging/messaging-namespace.d.ts +2 -22
  153. package/lib/messaging/messaging-namespace.js +1 -1
  154. package/lib/messaging/messaging.d.ts +3 -149
  155. package/lib/messaging/messaging.js +2 -539
  156. package/lib/project-management/android-app.d.ts +1 -1
  157. package/lib/project-management/android-app.js +1 -1
  158. package/lib/project-management/app-metadata.d.ts +1 -1
  159. package/lib/project-management/app-metadata.js +1 -1
  160. package/lib/project-management/index.d.ts +1 -1
  161. package/lib/project-management/index.js +3 -3
  162. package/lib/project-management/ios-app.d.ts +1 -1
  163. package/lib/project-management/ios-app.js +1 -1
  164. package/lib/project-management/project-management-api-request-internal.d.ts +1 -1
  165. package/lib/project-management/project-management-api-request-internal.js +3 -3
  166. package/lib/project-management/project-management-namespace.d.ts +1 -1
  167. package/lib/project-management/project-management-namespace.js +1 -1
  168. package/lib/project-management/project-management.d.ts +1 -1
  169. package/lib/project-management/project-management.js +1 -1
  170. package/lib/remote-config/condition-evaluator-internal.d.ts +1 -1
  171. package/lib/remote-config/condition-evaluator-internal.js +6 -14
  172. package/lib/remote-config/index.d.ts +1 -1
  173. package/lib/remote-config/index.js +3 -3
  174. package/lib/remote-config/internal/value-impl.d.ts +1 -1
  175. package/lib/remote-config/internal/value-impl.js +1 -1
  176. package/lib/remote-config/remote-config-api-client-internal.d.ts +1 -1
  177. package/lib/remote-config/remote-config-api-client-internal.js +1 -1
  178. package/lib/remote-config/remote-config-api.d.ts +1 -1
  179. package/lib/remote-config/remote-config-api.js +1 -1
  180. package/lib/remote-config/remote-config-namespace.d.ts +1 -1
  181. package/lib/remote-config/remote-config-namespace.js +1 -1
  182. package/lib/remote-config/remote-config.d.ts +1 -1
  183. package/lib/remote-config/remote-config.js +1 -1
  184. package/lib/security-rules/index.d.ts +1 -1
  185. package/lib/security-rules/index.js +3 -3
  186. package/lib/security-rules/security-rules-api-client-internal.d.ts +1 -1
  187. package/lib/security-rules/security-rules-api-client-internal.js +1 -1
  188. package/lib/security-rules/security-rules-internal.d.ts +1 -1
  189. package/lib/security-rules/security-rules-internal.js +1 -1
  190. package/lib/security-rules/security-rules-namespace.d.ts +1 -1
  191. package/lib/security-rules/security-rules-namespace.js +1 -1
  192. package/lib/security-rules/security-rules.d.ts +1 -2
  193. package/lib/security-rules/security-rules.js +1 -1
  194. package/lib/storage/index.d.ts +1 -1
  195. package/lib/storage/index.js +4 -4
  196. package/lib/storage/storage-namespace.d.ts +1 -1
  197. package/lib/storage/storage-namespace.js +1 -1
  198. package/lib/storage/storage.d.ts +1 -1
  199. package/lib/storage/storage.js +1 -1
  200. package/lib/storage/utils.d.ts +1 -1
  201. package/lib/storage/utils.js +2 -3
  202. package/lib/utils/api-request.d.ts +1 -5
  203. package/lib/utils/api-request.js +23 -8
  204. package/lib/utils/crypto-signer.d.ts +1 -2
  205. package/lib/utils/crypto-signer.js +3 -3
  206. package/lib/utils/deep-copy.d.ts +1 -1
  207. package/lib/utils/deep-copy.js +3 -4
  208. package/lib/utils/error.d.ts +1 -1
  209. package/lib/utils/error.js +1 -1
  210. package/lib/utils/index.d.ts +2 -2
  211. package/lib/utils/index.js +19 -16
  212. package/lib/utils/jwt.d.ts +1 -2
  213. package/lib/utils/jwt.js +5 -5
  214. package/lib/utils/validator.d.ts +1 -2
  215. package/lib/utils/validator.js +20 -21
  216. package/package.json +14 -13
  217. package/CHANGELOG.md +0 -4
  218. package/lib/messaging/batch-request-internal.d.ts +0 -55
  219. package/lib/messaging/batch-request-internal.js +0 -127
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  /*!
3
3
  * @license
4
4
  * Copyright 2022 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  /*!
3
3
  * @license
4
4
  * Copyright 2022 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -17,7 +17,8 @@
17
17
  * limitations under the License.
18
18
  */
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.getEventarc = exports.Channel = exports.Eventarc = void 0;
20
+ exports.Channel = exports.Eventarc = void 0;
21
+ exports.getEventarc = getEventarc;
21
22
  /**
22
23
  * Firebase Eventarc.
23
24
  *
@@ -61,4 +62,3 @@ function getEventarc(app) {
61
62
  const firebaseApp = app;
62
63
  return firebaseApp.getOrInitService('eventarc', (app) => new eventarc_1.Eventarc(app));
63
64
  }
64
- exports.getEventarc = getEventarc;
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  /*!
3
3
  * @license
4
4
  * Copyright 2022 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  /*!
3
3
  * @license
4
4
  * Copyright 2022 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  /*!
3
3
  * @license
4
4
  * Copyright 2022 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  /*!
3
3
  * @license
4
4
  * Copyright 2021 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -17,7 +17,8 @@
17
17
  * limitations under the License.
18
18
  */
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.getExtensions = exports.Runtime = exports.Extensions = void 0;
20
+ exports.Runtime = exports.Extensions = void 0;
21
+ exports.getExtensions = getExtensions;
21
22
  /**
22
23
  * Firebase Extensions service.
23
24
  *
@@ -61,4 +62,3 @@ function getExtensions(app) {
61
62
  const firebaseApp = app;
62
63
  return firebaseApp.getOrInitService('extensions', (app) => new extensions_1.Extensions(app));
63
64
  }
64
- exports.getExtensions = getExtensions;
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  /*!
3
3
  * Copyright 2021 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2021 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  /*!
3
3
  * @license
4
4
  * Copyright 2017 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -17,7 +17,8 @@
17
17
  * limitations under the License.
18
18
  */
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.getFirestoreOptions = exports.FirestoreService = void 0;
20
+ exports.FirestoreService = void 0;
21
+ exports.getFirestoreOptions = getFirestoreOptions;
21
22
  const error_1 = require("../utils/error");
22
23
  const credential_internal_1 = require("../app/credential-internal");
23
24
  const validator = require("../utils/validator");
@@ -114,7 +115,6 @@ function getFirestoreOptions(app, firestoreSettings) {
114
115
  'to use Cloud Firestore API.',
115
116
  });
116
117
  }
117
- exports.getFirestoreOptions = getFirestoreOptions;
118
118
  function initFirestore(app, databaseId, firestoreSettings) {
119
119
  const options = getFirestoreOptions(app, firestoreSettings);
120
120
  options.databaseId = databaseId;
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  /*!
3
3
  * Copyright 2021 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2021 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  /*!
3
3
  * Copyright 2020 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2020 Google Inc.
@@ -16,7 +16,9 @@
16
16
  * limitations under the License.
17
17
  */
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.FirebaseFirestoreError = exports.initializeFirestore = exports.getFirestore = exports.setLogFunction = exports.v1 = exports.WriteResult = exports.WriteBatch = exports.Transaction = exports.Timestamp = exports.QuerySnapshot = exports.QueryPartition = exports.QueryDocumentSnapshot = exports.Query = exports.GrpcStatus = exports.GeoPoint = exports.Firestore = exports.Filter = exports.FieldValue = exports.FieldPath = exports.DocumentSnapshot = exports.DocumentReference = exports.CollectionReference = exports.CollectionGroup = exports.BundleBuilder = exports.BulkWriter = exports.AggregateQuerySnapshot = exports.AggregateQuery = exports.AggregateField = void 0;
19
+ exports.FirebaseFirestoreError = exports.setLogFunction = exports.v1 = exports.WriteResult = exports.WriteBatch = exports.Transaction = exports.Timestamp = exports.QuerySnapshot = exports.QueryPartition = exports.QueryDocumentSnapshot = exports.Query = exports.GrpcStatus = exports.GeoPoint = exports.Firestore = exports.Filter = exports.FieldValue = exports.FieldPath = exports.DocumentSnapshot = exports.DocumentReference = exports.CollectionReference = exports.CollectionGroup = exports.BundleBuilder = exports.BulkWriter = exports.AggregateQuerySnapshot = exports.AggregateQuery = exports.AggregateField = void 0;
20
+ exports.getFirestore = getFirestore;
21
+ exports.initializeFirestore = initializeFirestore;
20
22
  const app_1 = require("../app");
21
23
  const firestore_internal_1 = require("./firestore-internal");
22
24
  const path_1 = require("@google-cloud/firestore/build/src/path");
@@ -53,7 +55,6 @@ function getFirestore(appOrDatabaseId, optionalDatabaseId) {
53
55
  const firestoreService = firebaseApp.getOrInitService('firestore', (app) => new firestore_internal_1.FirestoreService(app));
54
56
  return firestoreService.getDatabase(databaseId);
55
57
  }
56
- exports.getFirestore = getFirestore;
57
58
  function initializeFirestore(app, settings, databaseId) {
58
59
  settings ?? (settings = {});
59
60
  databaseId ?? (databaseId = path_1.DEFAULT_DATABASE_ID);
@@ -61,6 +62,5 @@ function initializeFirestore(app, settings, databaseId) {
61
62
  const firestoreService = firebaseApp.getOrInitService('firestore', (app) => new firestore_internal_1.FirestoreService(app));
62
63
  return firestoreService.initializeDatabase(databaseId, settings);
63
64
  }
64
- exports.initializeFirestore = initializeFirestore;
65
65
  var error_1 = require("../utils/error");
66
66
  Object.defineProperty(exports, "FirebaseFirestoreError", { enumerable: true, get: function () { return error_1.FirebaseFirestoreError; } });
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  /*!
3
3
  * @license
4
4
  * Copyright 2021 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -76,7 +76,7 @@ class FunctionsApiClient {
76
76
  resources.resourceId = `ext-${extensionId}-${resources.resourceId}`;
77
77
  }
78
78
  try {
79
- const serviceUrl = tasksEmulatorUrl(resources, functionName)?.concat('/', id)
79
+ const serviceUrl = tasksEmulatorUrl(resources)?.concat('/', id)
80
80
  ?? await this.getUrl(resources, CLOUD_TASKS_API_URL_FORMAT.concat('/', id));
81
81
  const request = {
82
82
  method: 'DELETE',
@@ -127,7 +127,7 @@ class FunctionsApiClient {
127
127
  }
128
128
  const task = this.validateTaskOptions(data, resources, opts);
129
129
  try {
130
- const serviceUrl = tasksEmulatorUrl(resources, functionName) ??
130
+ const serviceUrl = tasksEmulatorUrl(resources) ??
131
131
  await this.getUrl(resources, CLOUD_TASKS_API_URL_FORMAT);
132
132
  const taskPayload = await this.updateTaskPayload(task, resources, extensionId);
133
133
  const request = {
@@ -282,7 +282,8 @@ class FunctionsApiClient {
282
282
  : defaultUrl;
283
283
  task.httpRequest.url = functionUrl;
284
284
  // When run from a deployed extension, we should be using ComputeEngineCredentials
285
- if (validator.isNonEmptyString(extensionId) && this.app.options.credential instanceof credential_internal_1.ComputeEngineCredential) {
285
+ if (validator.isNonEmptyString(extensionId) && this.app.options.credential
286
+ instanceof credential_internal_1.ApplicationDefaultCredential && await this.app.options.credential.isComputeEngineCredential()) {
286
287
  const idToken = await this.app.options.credential.getIDToken(functionUrl);
287
288
  task.httpRequest.headers = { ...task.httpRequest.headers, 'Authorization': `Bearer ${idToken}` };
288
289
  // Don't send httpRequest.oidcToken if we set Authorization header, or Cloud Tasks will overwrite it.
@@ -351,9 +352,9 @@ class FirebaseFunctionsError extends error_1.PrefixedFirebaseError {
351
352
  }
352
353
  }
353
354
  exports.FirebaseFunctionsError = FirebaseFunctionsError;
354
- function tasksEmulatorUrl(resources, functionName) {
355
+ function tasksEmulatorUrl(resources) {
355
356
  if (process.env.CLOUD_TASKS_EMULATOR_HOST) {
356
- return `http://${process.env.CLOUD_TASKS_EMULATOR_HOST}/projects/${resources.projectId}/locations/${resources.locationId}/queues/${functionName}/tasks`;
357
+ return `http://${process.env.CLOUD_TASKS_EMULATOR_HOST}/projects/${resources.projectId}/locations/${resources.locationId}/queues/${resources.resourceId}/tasks`;
357
358
  }
358
359
  return undefined;
359
360
  }
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  /*!
3
3
  * @license
4
4
  * Copyright 2021 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  /*!
3
3
  * @license
4
4
  * Copyright 2021 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  /*!
3
3
  * @license
4
4
  * Copyright 2021 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -17,7 +17,8 @@
17
17
  * limitations under the License.
18
18
  */
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.getFunctions = exports.TaskQueue = exports.Functions = void 0;
20
+ exports.TaskQueue = exports.Functions = void 0;
21
+ exports.getFunctions = getFunctions;
21
22
  /**
22
23
  * Firebase Functions service.
23
24
  *
@@ -61,4 +62,3 @@ function getFunctions(app) {
61
62
  const firebaseApp = app;
62
63
  return firebaseApp.getOrInitService('functions', (app) => new functions_1.Functions(app));
63
64
  }
64
- exports.getFunctions = getFunctions;
package/lib/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  /*!
3
3
  * @license
4
4
  * Copyright 2017 Google Inc.
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  /*!
3
3
  * Copyright 2021 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2021 Google Inc.
@@ -16,7 +16,8 @@
16
16
  * limitations under the License.
17
17
  */
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.InstallationsClientErrorCode = exports.FirebaseInstallationsError = exports.getInstallations = exports.Installations = void 0;
19
+ exports.InstallationsClientErrorCode = exports.FirebaseInstallationsError = exports.Installations = void 0;
20
+ exports.getInstallations = getInstallations;
20
21
  /**
21
22
  * Firebase Instance ID service.
22
23
  *
@@ -59,7 +60,6 @@ function getInstallations(app) {
59
60
  const firebaseApp = app;
60
61
  return firebaseApp.getOrInitService('installations', (app) => new installations_1.Installations(app));
61
62
  }
62
- exports.getInstallations = getInstallations;
63
63
  var error_1 = require("../utils/error");
64
64
  Object.defineProperty(exports, "FirebaseInstallationsError", { enumerable: true, get: function () { return error_1.FirebaseInstallationsError; } });
65
65
  Object.defineProperty(exports, "InstallationsClientErrorCode", { enumerable: true, get: function () { return error_1.InstallationsClientErrorCode; } });
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  /*!
3
3
  * Copyright 2021 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2021 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  /*!
3
3
  * @license
4
4
  * Copyright 2021 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  /*!
3
3
  * Copyright 2021 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2021 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  /*!
3
3
  * Copyright 2020 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2020 Google Inc.
@@ -16,7 +16,8 @@
16
16
  * limitations under the License.
17
17
  */
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.InstanceIdClientErrorCode = exports.FirebaseInstanceIdError = exports.getInstanceId = exports.InstanceId = void 0;
19
+ exports.InstanceIdClientErrorCode = exports.FirebaseInstanceIdError = exports.InstanceId = void 0;
20
+ exports.getInstanceId = getInstanceId;
20
21
  /**
21
22
  * Firebase Instance ID service.
22
23
  *
@@ -68,7 +69,6 @@ function getInstanceId(app) {
68
69
  const firebaseApp = app;
69
70
  return firebaseApp.getOrInitService('instanceId', (app) => new instance_id_1.InstanceId(app));
70
71
  }
71
- exports.getInstanceId = getInstanceId;
72
72
  var error_1 = require("../utils/error");
73
73
  Object.defineProperty(exports, "FirebaseInstanceIdError", { enumerable: true, get: function () { return error_1.FirebaseInstanceIdError; } });
74
74
  Object.defineProperty(exports, "InstanceIdClientErrorCode", { enumerable: true, get: function () { return error_1.InstanceIdClientErrorCode; } });
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  import { App } from '../app/index';
3
3
  import { InstanceId as TInstanceId } from './instance-id';
4
4
  /**
@@ -1,3 +1,3 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  /*!
3
3
  * Copyright 2020 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2020 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  /*!
3
3
  * Copyright 2020 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2020 Google Inc.
@@ -16,7 +16,8 @@
16
16
  * limitations under the License.
17
17
  */
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.getMachineLearning = exports.Model = exports.MachineLearning = void 0;
19
+ exports.Model = exports.MachineLearning = void 0;
20
+ exports.getMachineLearning = getMachineLearning;
20
21
  /**
21
22
  * Firebase Machine Learning.
22
23
  *
@@ -60,4 +61,3 @@ function getMachineLearning(app) {
60
61
  const firebaseApp = app;
61
62
  return firebaseApp.getOrInitService('machineLearning', (app) => new machine_learning_1.MachineLearning(app));
62
63
  }
63
- exports.getMachineLearning = getMachineLearning;
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  /*!
3
3
  * Copyright 2020 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2020 Google Inc.
@@ -16,7 +16,8 @@
16
16
  * limitations under the License.
17
17
  */
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.MachineLearningApiClient = exports.isGcsTfliteModelOptions = void 0;
19
+ exports.MachineLearningApiClient = void 0;
20
+ exports.isGcsTfliteModelOptions = isGcsTfliteModelOptions;
20
21
  const api_request_1 = require("../utils/api-request");
21
22
  const error_1 = require("../utils/error");
22
23
  const utils = require("../utils/index");
@@ -34,7 +35,6 @@ function isGcsTfliteModelOptions(options) {
34
35
  const gcsUri = options?.tfliteModel?.gcsTfliteUri;
35
36
  return typeof gcsUri !== 'undefined';
36
37
  }
37
- exports.isGcsTfliteModelOptions = isGcsTfliteModelOptions;
38
38
  /**
39
39
  * Class that facilitates sending requests to the Firebase ML backend API.
40
40
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  /*!
3
3
  * Copyright 2021 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2021 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  /*!
3
3
  * Copyright 2020 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2020 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  /*!
3
3
  * Copyright 2020 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2020 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  /*!
3
3
  * Copyright 2020 Google Inc.
4
4
  *
@@ -22,7 +22,7 @@
22
22
  import { App } from '../app';
23
23
  import { Messaging } from './messaging';
24
24
  export { Messaging, } from './messaging';
25
- export { AndroidConfig, AndroidFcmOptions, AndroidNotification, ApnsConfig, ApnsFcmOptions, ApnsPayload, Aps, ApsAlert, BaseMessage, BatchResponse, CriticalSound, ConditionMessage, FcmOptions, LightSettings, Message, MessagingTopicManagementResponse, MulticastMessage, Notification, SendResponse, TokenMessage, TopicMessage, WebpushConfig, WebpushFcmOptions, WebpushNotification, DataMessagePayload, MessagingConditionResponse, MessagingDeviceGroupResponse, MessagingDeviceResult, MessagingDevicesResponse, MessagingOptions, MessagingPayload, MessagingTopicResponse, NotificationMessagePayload, } from './messaging-api';
25
+ export { AndroidConfig, AndroidFcmOptions, AndroidNotification, ApnsConfig, ApnsFcmOptions, ApnsPayload, Aps, ApsAlert, BaseMessage, BatchResponse, CriticalSound, ConditionMessage, FcmOptions, LightSettings, Message, MessagingTopicManagementResponse, MulticastMessage, Notification, SendResponse, TokenMessage, TopicMessage, WebpushConfig, WebpushFcmOptions, WebpushNotification, DataMessagePayload, MessagingOptions, MessagingPayload, NotificationMessagePayload, } from './messaging-api';
26
26
  /**
27
27
  * Gets the {@link Messaging} service for the default app or a given app.
28
28
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v12.6.0 */
1
+ /*! firebase-admin v13.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2020 Google Inc.
@@ -16,7 +16,8 @@
16
16
  * limitations under the License.
17
17
  */
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.MessagingClientErrorCode = exports.FirebaseMessagingError = exports.getMessaging = exports.Messaging = void 0;
19
+ exports.MessagingClientErrorCode = exports.FirebaseMessagingError = exports.Messaging = void 0;
20
+ exports.getMessaging = getMessaging;
20
21
  /**
21
22
  * Firebase Cloud Messaging (FCM).
22
23
  *
@@ -59,7 +60,6 @@ function getMessaging(app) {
59
60
  const firebaseApp = app;
60
61
  return firebaseApp.getOrInitService('messaging', (app) => new messaging_1.Messaging(app));
61
62
  }
62
- exports.getMessaging = getMessaging;
63
63
  var error_1 = require("../utils/error");
64
64
  Object.defineProperty(exports, "FirebaseMessagingError", { enumerable: true, get: function () { return error_1.FirebaseMessagingError; } });
65
65
  Object.defineProperty(exports, "MessagingClientErrorCode", { enumerable: true, get: function () { return error_1.MessagingClientErrorCode; } });