firebase-admin 9.4.2 → 9.5.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 (72) hide show
  1. package/lib/auth/action-code-settings-builder.js +1 -1
  2. package/lib/auth/auth-api-request.js +52 -10
  3. package/lib/auth/auth-config.js +1 -1
  4. package/lib/auth/auth.js +78 -47
  5. package/lib/auth/identifier.js +1 -1
  6. package/lib/auth/index.d.ts +70 -1
  7. package/lib/auth/index.js +1 -1
  8. package/lib/auth/tenant-manager.js +1 -1
  9. package/lib/auth/tenant.js +7 -1
  10. package/lib/auth/token-generator.js +1 -1
  11. package/lib/auth/token-verifier.js +16 -20
  12. package/lib/auth/user-import-builder.js +1 -1
  13. package/lib/auth/user-record.js +1 -1
  14. package/lib/credential/credential-internal.js +1 -1
  15. package/lib/credential/credential.js +1 -1
  16. package/lib/credential/index.d.ts +1 -1
  17. package/lib/credential/index.js +1 -1
  18. package/lib/database/database-internal.js +19 -26
  19. package/lib/database/index.d.ts +1 -1
  20. package/lib/database/index.js +1 -1
  21. package/lib/default-namespace.js +1 -1
  22. package/lib/firebase-app.js +10 -33
  23. package/lib/firebase-namespace-api.d.ts +1 -1
  24. package/lib/firebase-namespace-api.js +1 -1
  25. package/lib/firebase-namespace.d.ts +1 -1
  26. package/lib/firebase-namespace.js +2 -67
  27. package/lib/firestore/firestore-internal.js +1 -19
  28. package/lib/firestore/index.d.ts +1 -1
  29. package/lib/firestore/index.js +1 -1
  30. package/lib/index.d.ts +1 -1
  31. package/lib/index.js +1 -1
  32. package/lib/instance-id/index.d.ts +1 -1
  33. package/lib/instance-id/index.js +1 -1
  34. package/lib/instance-id/instance-id-request-internal.js +1 -1
  35. package/lib/instance-id/instance-id.js +1 -19
  36. package/lib/machine-learning/index.d.ts +1 -1
  37. package/lib/machine-learning/index.js +1 -1
  38. package/lib/machine-learning/machine-learning-api-client.js +1 -1
  39. package/lib/machine-learning/machine-learning-utils.js +1 -1
  40. package/lib/machine-learning/machine-learning.js +1 -20
  41. package/lib/messaging/batch-request-internal.js +1 -1
  42. package/lib/messaging/index.d.ts +4 -4
  43. package/lib/messaging/index.js +1 -1
  44. package/lib/messaging/messaging-api-request-internal.js +1 -1
  45. package/lib/messaging/messaging-errors-internal.js +1 -1
  46. package/lib/messaging/messaging-internal.js +1 -1
  47. package/lib/messaging/messaging.js +1 -19
  48. package/lib/project-management/android-app.js +1 -1
  49. package/lib/project-management/index.d.ts +1 -1
  50. package/lib/project-management/index.js +1 -1
  51. package/lib/project-management/ios-app.js +1 -1
  52. package/lib/project-management/project-management-api-request-internal.js +1 -1
  53. package/lib/project-management/project-management.js +1 -19
  54. package/lib/remote-config/index.d.ts +1 -1
  55. package/lib/remote-config/index.js +1 -1
  56. package/lib/remote-config/remote-config-api-client-internal.js +1 -1
  57. package/lib/remote-config/remote-config.js +5 -21
  58. package/lib/security-rules/index.d.ts +1 -1
  59. package/lib/security-rules/index.js +1 -1
  60. package/lib/security-rules/security-rules-api-client-internal.js +1 -1
  61. package/lib/security-rules/security-rules-internal.js +1 -1
  62. package/lib/security-rules/security-rules.js +1 -10
  63. package/lib/storage/index.d.ts +1 -1
  64. package/lib/storage/index.js +1 -1
  65. package/lib/storage/storage.js +1 -19
  66. package/lib/utils/api-request.js +1 -1
  67. package/lib/utils/deep-copy.js +1 -1
  68. package/lib/utils/error.js +1 -1
  69. package/lib/utils/index.js +1 -1
  70. package/lib/utils/validator.js +1 -1
  71. package/package.json +2 -2
  72. package/lib/firebase-service.js +0 -19
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v9.4.2 */
1
+ /*! firebase-admin v9.5.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2018 Google Inc.
@@ -25,23 +25,6 @@ var ios_app_1 = require("./ios-app");
25
25
  var project_management_api_request_internal_1 = require("./project-management-api-request-internal");
26
26
  var index_1 = require("./index");
27
27
  var AppPlatform = index_1.projectManagement.AppPlatform;
28
- /**
29
- * Internals of a Project Management instance.
30
- */
31
- var ProjectManagementInternals = /** @class */ (function () {
32
- function ProjectManagementInternals() {
33
- }
34
- /**
35
- * Deletes the service and its associated resources.
36
- *
37
- * @return {Promise<void>} An empty Promise that will be resolved when the service is deleted.
38
- */
39
- ProjectManagementInternals.prototype.delete = function () {
40
- // There are no resources to clean up.
41
- return Promise.resolve();
42
- };
43
- return ProjectManagementInternals;
44
- }());
45
28
  /**
46
29
  * The Firebase ProjectManagement service interface.
47
30
  *
@@ -55,7 +38,6 @@ var ProjectManagement = /** @class */ (function () {
55
38
  */
56
39
  function ProjectManagement(app) {
57
40
  this.app = app;
58
- this.INTERNAL = new ProjectManagementInternals();
59
41
  if (!validator.isNonNullObject(app) || !('options' in app)) {
60
42
  throw new error_1.FirebaseProjectManagementError('invalid-argument', 'First argument passed to admin.projectManagement() must be a valid Firebase app '
61
43
  + 'instance.');
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v9.4.2 */
1
+ /*! firebase-admin v9.5.0 */
2
2
  /*!
3
3
  * Copyright 2020 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v9.4.2 */
1
+ /*! firebase-admin v9.5.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2020 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v9.4.2 */
1
+ /*! firebase-admin v9.5.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2020 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v9.4.2 */
1
+ /*! firebase-admin v9.5.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2020 Google Inc.
@@ -19,23 +19,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
19
19
  exports.RemoteConfig = void 0;
20
20
  var validator = require("../utils/validator");
21
21
  var remote_config_api_client_internal_1 = require("./remote-config-api-client-internal");
22
- /**
23
- * Internals of an RemoteConfig service instance.
24
- */
25
- var RemoteConfigInternals = /** @class */ (function () {
26
- function RemoteConfigInternals() {
27
- }
28
- /**
29
- * Deletes the service and its associated resources.
30
- *
31
- * @return {Promise<()>} An empty Promise that will be fulfilled when the service is deleted.
32
- */
33
- RemoteConfigInternals.prototype.delete = function () {
34
- // There are no resources to clean up
35
- return Promise.resolve(undefined);
36
- };
37
- return RemoteConfigInternals;
38
- }());
39
22
  /**
40
23
  * Remote Config service bound to the provided app.
41
24
  */
@@ -46,7 +29,6 @@ var RemoteConfig = /** @class */ (function () {
46
29
  */
47
30
  function RemoteConfig(app) {
48
31
  this.app = app;
49
- this.INTERNAL = new RemoteConfigInternals();
50
32
  this.client = new remote_config_api_client_internal_1.RemoteConfigApiClient(app);
51
33
  }
52
34
  /**
@@ -288,8 +270,8 @@ var VersionImpl = /** @class */ (function () {
288
270
  }
289
271
  this.isLegacy = version.isLegacy;
290
272
  }
291
- // The backend API provides timestamps as ISO date strings. The Admin SDK exposes timestamps
292
- // as UTC date strings. If a developer uses a previously obtained template with UTC timestamps
273
+ // The backend API provides timestamps in ISO date strings. The Admin SDK exposes timestamps
274
+ // in UTC date strings. If a developer uses a previously obtained template with UTC timestamps
293
275
  // we could still validate it below.
294
276
  if (typeof version.updateTime !== 'undefined') {
295
277
  if (!this.isValidTimestamp(version.updateTime)) {
@@ -314,6 +296,8 @@ var VersionImpl = /** @class */ (function () {
314
296
  };
315
297
  };
316
298
  VersionImpl.prototype.isValidTimestamp = function (timestamp) {
299
+ // This validation fails for timestamps earlier than January 1, 1970 and considers strings
300
+ // such as "1.2" as valid timestamps.
317
301
  return validator.isNonEmptyString(timestamp) && (new Date(timestamp)).getTime() > 0;
318
302
  };
319
303
  return VersionImpl;
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v9.4.2 */
1
+ /*! firebase-admin v9.5.0 */
2
2
  /*!
3
3
  * Copyright 2020 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v9.4.2 */
1
+ /*! firebase-admin v9.5.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2020 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v9.4.2 */
1
+ /*! firebase-admin v9.5.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2019 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v9.4.2 */
1
+ /*! firebase-admin v9.5.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2019 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v9.4.2 */
1
+ /*! firebase-admin v9.5.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2019 Google Inc.
@@ -68,7 +68,6 @@ var SecurityRules = /** @class */ (function () {
68
68
  */
69
69
  function SecurityRules(app) {
70
70
  this.app = app;
71
- this.INTERNAL = new SecurityRulesInternals();
72
71
  this.client = new security_rules_api_client_internal_1.SecurityRulesApiClient(app);
73
72
  }
74
73
  /**
@@ -306,14 +305,6 @@ var SecurityRules = /** @class */ (function () {
306
305
  return SecurityRules;
307
306
  }());
308
307
  exports.SecurityRules = SecurityRules;
309
- var SecurityRulesInternals = /** @class */ (function () {
310
- function SecurityRulesInternals() {
311
- }
312
- SecurityRulesInternals.prototype.delete = function () {
313
- return Promise.resolve();
314
- };
315
- return SecurityRulesInternals;
316
- }());
317
308
  function stripProjectIdPrefix(name) {
318
309
  return name.split('/').pop();
319
310
  }
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v9.4.2 */
1
+ /*! firebase-admin v9.5.0 */
2
2
  /*!
3
3
  * Copyright 2020 Google Inc.
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v9.4.2 */
1
+ /*! firebase-admin v9.5.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2020 Google Inc.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v9.4.2 */
1
+ /*! firebase-admin v9.5.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -22,23 +22,6 @@ var error_1 = require("../utils/error");
22
22
  var credential_internal_1 = require("../credential/credential-internal");
23
23
  var utils = require("../utils/index");
24
24
  var validator = require("../utils/validator");
25
- /**
26
- * Internals of a Storage instance.
27
- */
28
- var StorageInternals = /** @class */ (function () {
29
- function StorageInternals() {
30
- }
31
- /**
32
- * Deletes the service and its associated resources.
33
- *
34
- * @return {Promise<()>} An empty Promise that will be fulfilled when the service is deleted.
35
- */
36
- StorageInternals.prototype.delete = function () {
37
- // There are no resources to clean up.
38
- return Promise.resolve();
39
- };
40
- return StorageInternals;
41
- }());
42
25
  /**
43
26
  * The default `Storage` service if no
44
27
  * app is provided or the `Storage` service associated with the provided
@@ -51,7 +34,6 @@ var Storage = /** @class */ (function () {
51
34
  * @internal
52
35
  */
53
36
  function Storage(app) {
54
- this.INTERNAL = new StorageInternals();
55
37
  if (!validator.isNonNullObject(app) || !('options' in app)) {
56
38
  throw new error_1.FirebaseError({
57
39
  code: 'storage/invalid-argument',
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v9.4.2 */
1
+ /*! firebase-admin v9.5.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v9.4.2 */
1
+ /*! firebase-admin v9.5.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v9.4.2 */
1
+ /*! firebase-admin v9.5.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v9.4.2 */
1
+ /*! firebase-admin v9.5.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v9.4.2 */
1
+ /*! firebase-admin v9.5.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": "9.4.2",
3
+ "version": "9.5.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",
@@ -69,7 +69,7 @@
69
69
  },
70
70
  "devDependencies": {
71
71
  "@firebase/app": "^0.6.13",
72
- "@firebase/auth": "^0.15.2",
72
+ "@firebase/auth": "^0.16.2",
73
73
  "@firebase/auth-types": "^0.10.1",
74
74
  "@microsoft/api-extractor": "^7.11.2",
75
75
  "@types/bcrypt": "^2.0.0",
@@ -1,19 +0,0 @@
1
- /*! firebase-admin v9.4.2 */
2
- "use strict";
3
- /*!
4
- * @license
5
- * Copyright 2017 Google Inc.
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- */
19
- Object.defineProperty(exports, "__esModule", { value: true });