firebase-admin 13.9.0 → 14.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 (281) hide show
  1. package/README.md +1 -2
  2. package/lib/app/core.d.ts +2 -38
  3. package/lib/app/core.js +1 -1
  4. package/lib/app/credential-factory.d.ts +1 -1
  5. package/lib/app/credential-factory.js +1 -1
  6. package/lib/app/credential-internal.d.ts +1 -1
  7. package/lib/app/credential-internal.js +48 -17
  8. package/lib/app/credential.d.ts +1 -1
  9. package/lib/app/credential.js +1 -1
  10. package/lib/app/error.d.ts +47 -0
  11. package/lib/app/error.js +57 -0
  12. package/lib/app/firebase-app.d.ts +1 -1
  13. package/lib/app/firebase-app.js +28 -12
  14. package/lib/app/index.d.ts +4 -3
  15. package/lib/app/index.js +6 -4
  16. package/lib/app/lifecycle.d.ts +2 -2
  17. package/lib/app/lifecycle.js +46 -21
  18. package/lib/app-check/app-check-api-client-internal.d.ts +2 -16
  19. package/lib/app-check/app-check-api-client-internal.js +71 -47
  20. package/lib/app-check/app-check-api.d.ts +19 -1
  21. package/lib/app-check/app-check-api.js +1 -1
  22. package/lib/app-check/app-check.d.ts +1 -1
  23. package/lib/app-check/app-check.js +7 -3
  24. package/lib/app-check/error.d.ts +47 -0
  25. package/lib/app-check/error.js +65 -0
  26. package/lib/app-check/index.d.ts +2 -1
  27. package/lib/app-check/index.js +5 -2
  28. package/lib/app-check/token-generator.d.ts +1 -1
  29. package/lib/app-check/token-generator.js +43 -13
  30. package/lib/app-check/token-verifier.d.ts +1 -1
  31. package/lib/app-check/token-verifier.js +39 -11
  32. package/lib/auth/action-code-settings-builder.d.ts +1 -1
  33. package/lib/auth/action-code-settings-builder.js +16 -16
  34. package/lib/auth/auth-api-request.d.ts +6 -4
  35. package/lib/auth/auth-api-request.js +277 -166
  36. package/lib/auth/auth-config.d.ts +31 -2
  37. package/lib/auth/auth-config.js +103 -103
  38. package/lib/auth/auth.d.ts +1 -1
  39. package/lib/auth/auth.js +1 -1
  40. package/lib/auth/base-auth.d.ts +2 -1
  41. package/lib/auth/base-auth.js +29 -27
  42. package/lib/auth/error.d.ts +137 -0
  43. package/lib/auth/error.js +690 -0
  44. package/lib/auth/identifier.d.ts +1 -1
  45. package/lib/auth/identifier.js +1 -1
  46. package/lib/auth/index.d.ts +2 -2
  47. package/lib/auth/index.js +4 -4
  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 +1 -1
  51. package/lib/auth/project-config.js +4 -4
  52. package/lib/auth/tenant-manager.d.ts +2 -1
  53. package/lib/auth/tenant-manager.js +13 -10
  54. package/lib/auth/tenant.d.ts +1 -1
  55. package/lib/auth/tenant.js +7 -7
  56. package/lib/auth/token-generator.d.ts +1 -1
  57. package/lib/auth/token-generator.js +13 -13
  58. package/lib/auth/token-verifier.d.ts +1 -1
  59. package/lib/auth/token-verifier.js +22 -22
  60. package/lib/auth/user-import-builder.d.ts +1 -1
  61. package/lib/auth/user-import-builder.js +22 -22
  62. package/lib/auth/user-record.d.ts +1 -1
  63. package/lib/auth/user-record.js +6 -6
  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 -16
  67. package/lib/data-connect/data-connect-api-client-internal.js +122 -65
  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/error.d.ts +47 -0
  73. package/lib/data-connect/error.js +66 -0
  74. package/lib/data-connect/index.d.ts +2 -1
  75. package/lib/data-connect/index.js +5 -2
  76. package/lib/data-connect/validate-admin-args.d.ts +1 -1
  77. package/lib/data-connect/validate-admin-args.js +6 -3
  78. package/lib/database/database.d.ts +1 -1
  79. package/lib/database/database.js +11 -6
  80. package/lib/database/error.d.ts +39 -0
  81. package/lib/database/error.js +49 -0
  82. package/lib/database/index.d.ts +2 -2
  83. package/lib/database/index.js +4 -3
  84. package/lib/esm/app/index.js +2 -1
  85. package/lib/esm/app-check/index.js +2 -0
  86. package/lib/esm/auth/index.js +1 -1
  87. package/lib/esm/data-connect/index.js +2 -0
  88. package/lib/esm/database/index.js +1 -0
  89. package/lib/esm/eventarc/index.js +2 -0
  90. package/lib/esm/extensions/index.js +2 -0
  91. package/lib/esm/firebase-admin/index.js +13 -0
  92. package/lib/esm/firestore/index.js +1 -0
  93. package/lib/esm/functions/index.js +2 -0
  94. package/lib/esm/installations/index.js +1 -1
  95. package/lib/esm/machine-learning/index.js +2 -0
  96. package/lib/esm/messaging/index.js +1 -1
  97. package/lib/esm/phone-number-verification/index.js +2 -0
  98. package/lib/esm/project-management/index.js +1 -0
  99. package/lib/esm/remote-config/index.js +2 -0
  100. package/lib/esm/security-rules/index.js +2 -0
  101. package/lib/esm/storage/index.js +2 -0
  102. package/lib/eventarc/cloudevent.d.ts +1 -1
  103. package/lib/eventarc/cloudevent.js +1 -1
  104. package/lib/eventarc/error.d.ts +38 -0
  105. package/lib/eventarc/error.js +47 -0
  106. package/lib/eventarc/eventarc-client-internal.d.ts +1 -1
  107. package/lib/eventarc/eventarc-client-internal.js +24 -9
  108. package/lib/eventarc/eventarc-utils.d.ts +1 -13
  109. package/lib/eventarc/eventarc-utils.js +36 -26
  110. package/lib/eventarc/eventarc.d.ts +1 -1
  111. package/lib/eventarc/eventarc.js +18 -6
  112. package/lib/eventarc/index.d.ts +2 -1
  113. package/lib/eventarc/index.js +5 -2
  114. package/lib/extensions/error.d.ts +41 -0
  115. package/lib/extensions/error.js +50 -0
  116. package/lib/extensions/extensions-api-client-internal.d.ts +1 -13
  117. package/lib/extensions/extensions-api-client-internal.js +40 -28
  118. package/lib/extensions/extensions-api.d.ts +1 -1
  119. package/lib/extensions/extensions-api.js +1 -1
  120. package/lib/extensions/extensions.d.ts +1 -1
  121. package/lib/extensions/extensions.js +18 -5
  122. package/lib/extensions/index.d.ts +2 -1
  123. package/lib/extensions/index.js +5 -2
  124. package/lib/firestore/error.d.ts +41 -0
  125. package/lib/firestore/error.js +51 -0
  126. package/lib/firestore/firestore-internal.d.ts +2 -1
  127. package/lib/firestore/firestore-internal.js +6 -6
  128. package/lib/firestore/index.d.ts +2 -2
  129. package/lib/firestore/index.js +7 -7
  130. package/lib/functions/error.d.ts +48 -0
  131. package/lib/functions/error.js +67 -0
  132. package/lib/functions/functions-api-client-internal.d.ts +1 -16
  133. package/lib/functions/functions-api-client-internal.js +111 -71
  134. package/lib/functions/functions-api.d.ts +1 -1
  135. package/lib/functions/functions-api.js +1 -1
  136. package/lib/functions/functions.d.ts +1 -1
  137. package/lib/functions/functions.js +14 -4
  138. package/lib/functions/index.d.ts +2 -1
  139. package/lib/functions/index.js +5 -2
  140. package/lib/index.d.ts +13 -8
  141. package/lib/index.js +19 -3
  142. package/lib/installations/error.d.ts +48 -0
  143. package/lib/installations/error.js +73 -0
  144. package/lib/installations/index.d.ts +2 -2
  145. package/lib/installations/index.js +4 -4
  146. package/lib/installations/installations-request-handler.d.ts +1 -1
  147. package/lib/installations/installations-request-handler.js +11 -5
  148. package/lib/installations/installations.d.ts +1 -1
  149. package/lib/installations/installations.js +3 -3
  150. package/lib/machine-learning/error.d.ts +53 -0
  151. package/lib/machine-learning/error.js +84 -0
  152. package/lib/machine-learning/index.d.ts +2 -1
  153. package/lib/machine-learning/index.js +5 -2
  154. package/lib/machine-learning/machine-learning-api-client.d.ts +1 -1
  155. package/lib/machine-learning/machine-learning-api-client.js +61 -24
  156. package/lib/machine-learning/machine-learning.d.ts +1 -1
  157. package/lib/machine-learning/machine-learning.js +21 -9
  158. package/lib/messaging/error.d.ts +63 -0
  159. package/lib/messaging/error.js +286 -0
  160. package/lib/messaging/index.d.ts +3 -3
  161. package/lib/messaging/index.js +4 -4
  162. package/lib/messaging/messaging-api-request-internal.d.ts +1 -1
  163. package/lib/messaging/messaging-api-request-internal.js +1 -1
  164. package/lib/messaging/messaging-api.d.ts +1 -280
  165. package/lib/messaging/messaging-api.js +1 -1
  166. package/lib/messaging/messaging-errors-internal.d.ts +2 -2
  167. package/lib/messaging/messaging-errors-internal.js +11 -8
  168. package/lib/messaging/messaging-internal.d.ts +1 -1
  169. package/lib/messaging/messaging-internal.js +48 -48
  170. package/lib/messaging/messaging.d.ts +1 -1
  171. package/lib/messaging/messaging.js +47 -50
  172. package/lib/phone-number-verification/error.d.ts +43 -0
  173. package/lib/phone-number-verification/error.js +48 -0
  174. package/lib/phone-number-verification/index.d.ts +2 -1
  175. package/lib/phone-number-verification/index.js +5 -2
  176. package/lib/phone-number-verification/phone-number-verification-api-client-internal.d.ts +1 -18
  177. package/lib/phone-number-verification/phone-number-verification-api-client-internal.js +2 -26
  178. package/lib/phone-number-verification/phone-number-verification-api.d.ts +2 -2
  179. package/lib/phone-number-verification/phone-number-verification-api.js +5 -4
  180. package/lib/phone-number-verification/phone-number-verification.d.ts +1 -1
  181. package/lib/phone-number-verification/phone-number-verification.js +1 -1
  182. package/lib/phone-number-verification/token-verifier.d.ts +1 -1
  183. package/lib/phone-number-verification/token-verifier.js +68 -20
  184. package/lib/project-management/android-app.d.ts +1 -1
  185. package/lib/project-management/android-app.js +15 -6
  186. package/lib/project-management/app-metadata.d.ts +1 -1
  187. package/lib/project-management/app-metadata.js +1 -1
  188. package/lib/project-management/error.d.ts +45 -0
  189. package/lib/project-management/error.js +55 -0
  190. package/lib/project-management/index.d.ts +2 -2
  191. package/lib/project-management/index.js +4 -3
  192. package/lib/project-management/ios-app.d.ts +1 -1
  193. package/lib/project-management/ios-app.js +6 -3
  194. package/lib/project-management/project-management-api-request-internal.d.ts +1 -1
  195. package/lib/project-management/project-management-api-request-internal.js +18 -6
  196. package/lib/project-management/project-management.d.ts +1 -1
  197. package/lib/project-management/project-management.js +13 -7
  198. package/lib/remote-config/condition-evaluator-internal.d.ts +1 -1
  199. package/lib/remote-config/condition-evaluator-internal.js +4 -4
  200. package/lib/remote-config/error.d.ts +49 -0
  201. package/lib/remote-config/error.js +70 -0
  202. package/lib/remote-config/index.d.ts +2 -1
  203. package/lib/remote-config/index.js +5 -2
  204. package/lib/remote-config/internal/value-impl.d.ts +1 -1
  205. package/lib/remote-config/internal/value-impl.js +1 -1
  206. package/lib/remote-config/remote-config-api-client-internal.d.ts +2 -13
  207. package/lib/remote-config/remote-config-api-client-internal.js +80 -52
  208. package/lib/remote-config/remote-config-api.d.ts +1 -1
  209. package/lib/remote-config/remote-config-api.js +1 -1
  210. package/lib/remote-config/remote-config.d.ts +1 -1
  211. package/lib/remote-config/remote-config.js +92 -23
  212. package/lib/security-rules/error.d.ts +45 -0
  213. package/lib/security-rules/error.js +54 -0
  214. package/lib/security-rules/index.d.ts +2 -1
  215. package/lib/security-rules/index.js +5 -2
  216. package/lib/security-rules/security-rules-api-client-internal.d.ts +1 -1
  217. package/lib/security-rules/security-rules-api-client-internal.js +50 -18
  218. package/lib/security-rules/security-rules.d.ts +1 -1
  219. package/lib/security-rules/security-rules.js +32 -11
  220. package/lib/storage/error.d.ts +41 -0
  221. package/lib/storage/error.js +50 -0
  222. package/lib/storage/index.d.ts +2 -1
  223. package/lib/storage/index.js +8 -5
  224. package/lib/storage/storage.d.ts +1 -1
  225. package/lib/storage/storage.js +12 -12
  226. package/lib/storage/utils.d.ts +1 -1
  227. package/lib/storage/utils.js +1 -1
  228. package/lib/utils/api-request.d.ts +12 -12
  229. package/lib/utils/api-request.js +97 -55
  230. package/lib/utils/crypto-signer.d.ts +1 -1
  231. package/lib/utils/crypto-signer.js +2 -7
  232. package/lib/utils/deep-copy.d.ts +1 -1
  233. package/lib/utils/deep-copy.js +1 -1
  234. package/lib/utils/error.d.ts +75 -570
  235. package/lib/utils/error.js +53 -1047
  236. package/lib/utils/index.d.ts +1 -1
  237. package/lib/utils/index.js +2 -2
  238. package/lib/utils/jwt.d.ts +1 -1
  239. package/lib/utils/jwt.js +1 -2
  240. package/lib/utils/validator.d.ts +1 -1
  241. package/lib/utils/validator.js +1 -1
  242. package/package.json +25 -33
  243. package/lib/app/firebase-namespace.d.ts +0 -163
  244. package/lib/app/firebase-namespace.js +0 -335
  245. package/lib/app-check/app-check-namespace.d.ts +0 -72
  246. package/lib/app-check/app-check-namespace.js +0 -18
  247. package/lib/auth/auth-namespace.d.ts +0 -257
  248. package/lib/auth/auth-namespace.js +0 -18
  249. package/lib/database/database-namespace.d.ts +0 -95
  250. package/lib/database/database-namespace.js +0 -23
  251. package/lib/default-namespace.d.ts +0 -24
  252. package/lib/default-namespace.js +0 -30
  253. package/lib/esm/instance-id/index.js +0 -6
  254. package/lib/firebase-namespace-api.d.ts +0 -91
  255. package/lib/firebase-namespace-api.js +0 -58
  256. package/lib/firestore/firestore-namespace.d.ts +0 -71
  257. package/lib/firestore/firestore-namespace.js +0 -52
  258. package/lib/installations/installations-namespace.d.ts +0 -55
  259. package/lib/installations/installations-namespace.js +0 -18
  260. package/lib/instance-id/index.d.ts +0 -62
  261. package/lib/instance-id/index.js +0 -74
  262. package/lib/instance-id/instance-id-namespace.d.ts +0 -38
  263. package/lib/instance-id/instance-id-namespace.js +0 -3
  264. package/lib/instance-id/instance-id.d.ts +0 -47
  265. package/lib/instance-id/instance-id.js +0 -77
  266. package/lib/machine-learning/machine-learning-namespace.d.ts +0 -81
  267. package/lib/machine-learning/machine-learning-namespace.js +0 -18
  268. package/lib/machine-learning/machine-learning-utils.d.ts +0 -22
  269. package/lib/machine-learning/machine-learning-utils.js +0 -47
  270. package/lib/messaging/messaging-namespace.d.ts +0 -161
  271. package/lib/messaging/messaging-namespace.js +0 -18
  272. package/lib/project-management/project-management-namespace.d.ts +0 -82
  273. package/lib/project-management/project-management-namespace.js +0 -18
  274. package/lib/remote-config/remote-config-namespace.d.ts +0 -141
  275. package/lib/remote-config/remote-config-namespace.js +0 -18
  276. package/lib/security-rules/security-rules-internal.d.ts +0 -21
  277. package/lib/security-rules/security-rules-internal.js +0 -26
  278. package/lib/security-rules/security-rules-namespace.d.ts +0 -69
  279. package/lib/security-rules/security-rules-namespace.js +0 -18
  280. package/lib/storage/storage-namespace.d.ts +0 -45
  281. package/lib/storage/storage-namespace.js +0 -18
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.9.0 */
1
+ /*! firebase-admin v14.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2021 Google LLC
@@ -19,7 +19,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
19
19
  exports.AppCheckTokenVerifier = void 0;
20
20
  const validator = require("../utils/validator");
21
21
  const util = require("../utils/index");
22
- const app_check_api_client_internal_1 = require("./app-check-api-client-internal");
22
+ const error_1 = require("./error");
23
23
  const jwt_1 = require("../utils/jwt");
24
24
  const APP_CHECK_ISSUER = 'https://firebaseappcheck.googleapis.com/';
25
25
  const JWKS_URL = 'https://firebaseappcheck.googleapis.com/v1/jwks';
@@ -41,7 +41,10 @@ class AppCheckTokenVerifier {
41
41
  */
42
42
  verifyToken(token) {
43
43
  if (!validator.isString(token)) {
44
- throw new app_check_api_client_internal_1.FirebaseAppCheckError('invalid-argument', 'App check token must be a non-null string.');
44
+ throw new error_1.FirebaseAppCheckError({
45
+ code: 'invalid-argument',
46
+ message: 'App check token must be a non-null string.'
47
+ });
45
48
  }
46
49
  return this.ensureProjectId()
47
50
  .then((projectId) => {
@@ -57,8 +60,11 @@ class AppCheckTokenVerifier {
57
60
  return util.findProjectId(this.app)
58
61
  .then((projectId) => {
59
62
  if (!validator.isNonEmptyString(projectId)) {
60
- throw new app_check_api_client_internal_1.FirebaseAppCheckError('invalid-credential', 'Must initialize app with a cert credential or set your Firebase project ID as the ' +
61
- 'GOOGLE_CLOUD_PROJECT environment variable to verify an App Check token.');
63
+ throw new error_1.FirebaseAppCheckError({
64
+ code: 'invalid-credential',
65
+ message: 'Must initialize app with a cert credential or set your Firebase project ID as the ' +
66
+ 'GOOGLE_CLOUD_PROJECT environment variable to verify an App Check token.'
67
+ });
62
68
  }
63
69
  return projectId;
64
70
  });
@@ -76,7 +82,10 @@ class AppCheckTokenVerifier {
76
82
  .catch(() => {
77
83
  const errorMessage = 'Decoding App Check token failed. Make sure you passed ' +
78
84
  'the entire string JWT which represents the Firebase App Check token.';
79
- throw new app_check_api_client_internal_1.FirebaseAppCheckError('invalid-argument', errorMessage);
85
+ throw new error_1.FirebaseAppCheckError({
86
+ code: 'invalid-argument',
87
+ message: errorMessage
88
+ });
80
89
  });
81
90
  }
82
91
  /**
@@ -110,7 +119,10 @@ class AppCheckTokenVerifier {
110
119
  errorMessage = 'The provided App Check token has an empty string "sub" (subject) claim.';
111
120
  }
112
121
  if (errorMessage) {
113
- throw new app_check_api_client_internal_1.FirebaseAppCheckError('invalid-argument', errorMessage);
122
+ throw new error_1.FirebaseAppCheckError({
123
+ code: 'invalid-argument',
124
+ message: errorMessage
125
+ });
114
126
  }
115
127
  }
116
128
  verifySignature(jwtToken) {
@@ -129,19 +141,35 @@ class AppCheckTokenVerifier {
129
141
  if (error.code === jwt_1.JwtErrorCode.TOKEN_EXPIRED) {
130
142
  const errorMessage = 'The provided App Check token has expired. Get a fresh App Check token' +
131
143
  ' from your client app and try again.';
132
- return new app_check_api_client_internal_1.FirebaseAppCheckError('app-check-token-expired', errorMessage);
144
+ return new error_1.FirebaseAppCheckError({
145
+ code: 'app-check-token-expired',
146
+ message: errorMessage,
147
+ cause: error
148
+ });
133
149
  }
134
150
  else if (error.code === jwt_1.JwtErrorCode.INVALID_SIGNATURE) {
135
151
  const errorMessage = 'The provided App Check token has invalid signature.';
136
- return new app_check_api_client_internal_1.FirebaseAppCheckError('invalid-argument', errorMessage);
152
+ return new error_1.FirebaseAppCheckError({
153
+ code: 'invalid-argument',
154
+ message: errorMessage,
155
+ cause: error
156
+ });
137
157
  }
138
158
  else if (error.code === jwt_1.JwtErrorCode.NO_MATCHING_KID) {
139
159
  const errorMessage = 'The provided App Check token has "kid" claim which does not ' +
140
160
  'correspond to a known public key. Most likely the provided App Check token ' +
141
161
  'is expired, so get a fresh token from your client app and try again.';
142
- return new app_check_api_client_internal_1.FirebaseAppCheckError('invalid-argument', errorMessage);
162
+ return new error_1.FirebaseAppCheckError({
163
+ code: 'invalid-argument',
164
+ message: errorMessage,
165
+ cause: error
166
+ });
143
167
  }
144
- return new app_check_api_client_internal_1.FirebaseAppCheckError('invalid-argument', error.message);
168
+ return new error_1.FirebaseAppCheckError({
169
+ code: 'invalid-argument',
170
+ message: error.message,
171
+ cause: error
172
+ });
145
173
  }
146
174
  }
147
175
  exports.AppCheckTokenVerifier = AppCheckTokenVerifier;
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.9.0 */
1
+ /*! firebase-admin v14.0.0 */
2
2
  /*!
3
3
  * Copyright 2018 Google LLC
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.9.0 */
1
+ /*! firebase-admin v14.0.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2018 Google LLC
@@ -18,7 +18,7 @@
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
19
  exports.ActionCodeSettingsBuilder = void 0;
20
20
  const validator = require("../utils/validator");
21
- const error_1 = require("../utils/error");
21
+ const error_1 = require("./error");
22
22
  /**
23
23
  * Defines the ActionCodeSettings builder class used to convert the
24
24
  * ActionCodeSettings object to its corresponding server request.
@@ -35,59 +35,59 @@ class ActionCodeSettingsBuilder {
35
35
  */
36
36
  constructor(actionCodeSettings) {
37
37
  if (!validator.isNonNullObject(actionCodeSettings)) {
38
- throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, '"ActionCodeSettings" must be a non-null object.');
38
+ throw new error_1.FirebaseAuthError(error_1.authClientErrorCode.INVALID_ARGUMENT, '"ActionCodeSettings" must be a non-null object.');
39
39
  }
40
40
  if (typeof actionCodeSettings.url === 'undefined') {
41
- throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.MISSING_CONTINUE_URI);
41
+ throw new error_1.FirebaseAuthError(error_1.authClientErrorCode.MISSING_CONTINUE_URI);
42
42
  }
43
43
  else if (!validator.isURL(actionCodeSettings.url)) {
44
- throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_CONTINUE_URI);
44
+ throw new error_1.FirebaseAuthError(error_1.authClientErrorCode.INVALID_CONTINUE_URI);
45
45
  }
46
46
  this.continueUrl = actionCodeSettings.url;
47
47
  if (typeof actionCodeSettings.handleCodeInApp !== 'undefined' &&
48
48
  !validator.isBoolean(actionCodeSettings.handleCodeInApp)) {
49
- throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, '"ActionCodeSettings.handleCodeInApp" must be a boolean.');
49
+ throw new error_1.FirebaseAuthError(error_1.authClientErrorCode.INVALID_ARGUMENT, '"ActionCodeSettings.handleCodeInApp" must be a boolean.');
50
50
  }
51
51
  this.canHandleCodeInApp = actionCodeSettings.handleCodeInApp || false;
52
52
  if (typeof actionCodeSettings.dynamicLinkDomain !== 'undefined' &&
53
53
  !validator.isNonEmptyString(actionCodeSettings.dynamicLinkDomain)) {
54
- throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_DYNAMIC_LINK_DOMAIN);
54
+ throw new error_1.FirebaseAuthError(error_1.authClientErrorCode.INVALID_DYNAMIC_LINK_DOMAIN);
55
55
  }
56
56
  this.dynamicLinkDomain = actionCodeSettings.dynamicLinkDomain;
57
57
  if (typeof actionCodeSettings.linkDomain !== 'undefined' &&
58
58
  !validator.isNonEmptyString(actionCodeSettings.linkDomain)) {
59
- throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_HOSTING_LINK_DOMAIN);
59
+ throw new error_1.FirebaseAuthError(error_1.authClientErrorCode.INVALID_HOSTING_LINK_DOMAIN);
60
60
  }
61
61
  this.linkDomain = actionCodeSettings.linkDomain;
62
62
  if (typeof actionCodeSettings.iOS !== 'undefined') {
63
63
  if (!validator.isNonNullObject(actionCodeSettings.iOS)) {
64
- throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, '"ActionCodeSettings.iOS" must be a valid non-null object.');
64
+ throw new error_1.FirebaseAuthError(error_1.authClientErrorCode.INVALID_ARGUMENT, '"ActionCodeSettings.iOS" must be a valid non-null object.');
65
65
  }
66
66
  else if (typeof actionCodeSettings.iOS.bundleId === 'undefined') {
67
- throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.MISSING_IOS_BUNDLE_ID);
67
+ throw new error_1.FirebaseAuthError(error_1.authClientErrorCode.MISSING_IOS_BUNDLE_ID);
68
68
  }
69
69
  else if (!validator.isNonEmptyString(actionCodeSettings.iOS.bundleId)) {
70
- throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, '"ActionCodeSettings.iOS.bundleId" must be a valid non-empty string.');
70
+ throw new error_1.FirebaseAuthError(error_1.authClientErrorCode.INVALID_ARGUMENT, '"ActionCodeSettings.iOS.bundleId" must be a valid non-empty string.');
71
71
  }
72
72
  this.ibi = actionCodeSettings.iOS.bundleId;
73
73
  }
74
74
  if (typeof actionCodeSettings.android !== 'undefined') {
75
75
  if (!validator.isNonNullObject(actionCodeSettings.android)) {
76
- throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, '"ActionCodeSettings.android" must be a valid non-null object.');
76
+ throw new error_1.FirebaseAuthError(error_1.authClientErrorCode.INVALID_ARGUMENT, '"ActionCodeSettings.android" must be a valid non-null object.');
77
77
  }
78
78
  else if (typeof actionCodeSettings.android.packageName === 'undefined') {
79
- throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.MISSING_ANDROID_PACKAGE_NAME);
79
+ throw new error_1.FirebaseAuthError(error_1.authClientErrorCode.MISSING_ANDROID_PACKAGE_NAME);
80
80
  }
81
81
  else if (!validator.isNonEmptyString(actionCodeSettings.android.packageName)) {
82
- throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, '"ActionCodeSettings.android.packageName" must be a valid non-empty string.');
82
+ throw new error_1.FirebaseAuthError(error_1.authClientErrorCode.INVALID_ARGUMENT, '"ActionCodeSettings.android.packageName" must be a valid non-empty string.');
83
83
  }
84
84
  else if (typeof actionCodeSettings.android.minimumVersion !== 'undefined' &&
85
85
  !validator.isNonEmptyString(actionCodeSettings.android.minimumVersion)) {
86
- throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, '"ActionCodeSettings.android.minimumVersion" must be a valid non-empty string.');
86
+ throw new error_1.FirebaseAuthError(error_1.authClientErrorCode.INVALID_ARGUMENT, '"ActionCodeSettings.android.minimumVersion" must be a valid non-empty string.');
87
87
  }
88
88
  else if (typeof actionCodeSettings.android.installApp !== 'undefined' &&
89
89
  !validator.isBoolean(actionCodeSettings.android.installApp)) {
90
- throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, '"ActionCodeSettings.android.installApp" must be a valid boolean.');
90
+ throw new error_1.FirebaseAuthError(error_1.authClientErrorCode.INVALID_ARGUMENT, '"ActionCodeSettings.android.installApp" must be a valid boolean.');
91
91
  }
92
92
  this.apn = actionCodeSettings.android.packageName;
93
93
  this.amv = actionCodeSettings.android.minimumVersion;
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.9.0 */
1
+ /*! firebase-admin v14.0.0 */
2
2
  /*!
3
3
  * @license
4
4
  * Copyright 2017 Google LLC
@@ -32,11 +32,12 @@ declare class AuthResourceUrlBuilder {
32
32
  /**
33
33
  * The resource URL builder constructor.
34
34
  *
35
- * @param projectId - The resource project ID.
35
+ * @param app - The app for this URL builder.
36
36
  * @param version - The endpoint API version.
37
+ * @param emulatorHost - Optional emulator host captured at init time.
37
38
  * @constructor
38
39
  */
39
- constructor(app: App, version?: string);
40
+ constructor(app: App, version?: string, emHost?: string);
40
41
  /**
41
42
  * Returns the resource URL corresponding to the provided parameters.
42
43
  *
@@ -148,9 +149,10 @@ export declare class TenantAwareAuthRequestHandler extends AbstractAuthRequestHa
148
149
  *
149
150
  * @param app - The app used to fetch access tokens to sign API requests.
150
151
  * @param tenantId - The request handler's tenant ID.
152
+ * @param emHost - Optional emulator host override captured at init time.
151
153
  * @constructor
152
154
  */
153
- constructor(app: App, tenantId: string);
155
+ constructor(app: App, tenantId: string, emHost?: string | null);
154
156
  /**
155
157
  * @returns A new Auth user management resource URL builder instance.
156
158
  */