firebase-admin 11.9.0 → 11.10.1
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.
- package/lib/app/core.d.ts +1 -1
- package/lib/app/core.js +1 -1
- package/lib/app/credential-factory.d.ts +1 -1
- package/lib/app/credential-factory.js +1 -1
- package/lib/app/credential-internal.d.ts +1 -1
- package/lib/app/credential-internal.js +1 -1
- package/lib/app/credential.d.ts +1 -1
- package/lib/app/credential.js +1 -1
- package/lib/app/firebase-app.d.ts +1 -1
- package/lib/app/firebase-app.js +1 -1
- package/lib/app/firebase-namespace.d.ts +1 -1
- package/lib/app/firebase-namespace.js +1 -1
- package/lib/app/index.d.ts +1 -1
- package/lib/app/index.js +1 -1
- package/lib/app/lifecycle.d.ts +1 -1
- package/lib/app/lifecycle.js +1 -1
- package/lib/app-check/app-check-api-client-internal.d.ts +1 -1
- package/lib/app-check/app-check-api-client-internal.js +1 -1
- package/lib/app-check/app-check-api.d.ts +1 -1
- package/lib/app-check/app-check-api.js +1 -1
- package/lib/app-check/app-check-namespace.d.ts +1 -1
- package/lib/app-check/app-check-namespace.js +1 -1
- package/lib/app-check/app-check.d.ts +1 -1
- package/lib/app-check/app-check.js +1 -1
- package/lib/app-check/index.d.ts +1 -1
- package/lib/app-check/index.js +1 -1
- package/lib/app-check/token-generator.d.ts +1 -1
- package/lib/app-check/token-generator.js +1 -1
- package/lib/app-check/token-verifier.d.ts +1 -1
- package/lib/app-check/token-verifier.js +1 -1
- package/lib/auth/action-code-settings-builder.d.ts +1 -1
- package/lib/auth/action-code-settings-builder.js +1 -1
- package/lib/auth/auth-api-request.d.ts +1 -1
- package/lib/auth/auth-api-request.js +1 -1
- package/lib/auth/auth-config.d.ts +1 -1
- package/lib/auth/auth-config.js +13 -13
- package/lib/auth/auth-namespace.d.ts +1 -1
- package/lib/auth/auth-namespace.js +1 -1
- package/lib/auth/auth.d.ts +1 -1
- package/lib/auth/auth.js +1 -1
- package/lib/auth/base-auth.d.ts +1 -1
- package/lib/auth/base-auth.js +1 -1
- package/lib/auth/identifier.d.ts +1 -1
- package/lib/auth/identifier.js +1 -1
- package/lib/auth/index.d.ts +1 -1
- package/lib/auth/index.js +1 -1
- package/lib/auth/project-config-manager.d.ts +1 -1
- package/lib/auth/project-config-manager.js +1 -1
- package/lib/auth/project-config.d.ts +1 -1
- package/lib/auth/project-config.js +1 -1
- package/lib/auth/tenant-manager.d.ts +1 -1
- package/lib/auth/tenant-manager.js +1 -1
- package/lib/auth/tenant.d.ts +1 -1
- package/lib/auth/tenant.js +1 -1
- package/lib/auth/token-generator.d.ts +1 -1
- package/lib/auth/token-generator.js +1 -1
- package/lib/auth/token-verifier.d.ts +1 -1
- package/lib/auth/token-verifier.js +1 -1
- package/lib/auth/user-import-builder.d.ts +1 -1
- package/lib/auth/user-import-builder.js +1 -1
- package/lib/auth/user-record.d.ts +28 -4
- package/lib/auth/user-record.js +58 -6
- package/lib/credential/index.d.ts +1 -1
- package/lib/credential/index.js +1 -1
- package/lib/database/database-namespace.d.ts +1 -1
- package/lib/database/database-namespace.js +1 -1
- package/lib/database/database.d.ts +1 -1
- package/lib/database/database.js +1 -1
- package/lib/database/index.d.ts +1 -1
- package/lib/database/index.js +1 -1
- package/lib/default-namespace.d.ts +1 -1
- package/lib/default-namespace.js +1 -1
- package/lib/esm/storage/index.js +1 -0
- package/lib/eventarc/cloudevent.d.ts +1 -1
- package/lib/eventarc/cloudevent.js +1 -1
- package/lib/eventarc/eventarc-client-internal.d.ts +1 -1
- package/lib/eventarc/eventarc-client-internal.js +1 -1
- package/lib/eventarc/eventarc-utils.d.ts +1 -1
- package/lib/eventarc/eventarc-utils.js +1 -1
- package/lib/eventarc/eventarc.d.ts +1 -1
- package/lib/eventarc/eventarc.js +1 -1
- package/lib/eventarc/index.d.ts +1 -1
- package/lib/eventarc/index.js +1 -1
- package/lib/extensions/extensions-api-client-internal.d.ts +1 -1
- package/lib/extensions/extensions-api-client-internal.js +1 -1
- package/lib/extensions/extensions-api.d.ts +1 -1
- package/lib/extensions/extensions-api.js +1 -1
- package/lib/extensions/extensions.d.ts +1 -1
- package/lib/extensions/extensions.js +1 -1
- package/lib/extensions/index.d.ts +1 -1
- package/lib/extensions/index.js +1 -1
- package/lib/firebase-namespace-api.d.ts +1 -1
- package/lib/firebase-namespace-api.js +1 -1
- package/lib/firestore/firestore-internal.d.ts +1 -1
- package/lib/firestore/firestore-internal.js +1 -1
- package/lib/firestore/firestore-namespace.d.ts +1 -1
- package/lib/firestore/firestore-namespace.js +1 -1
- package/lib/firestore/index.d.ts +67 -23
- package/lib/firestore/index.js +1 -1
- package/lib/functions/functions-api-client-internal.d.ts +3 -2
- package/lib/functions/functions-api-client-internal.js +105 -27
- package/lib/functions/functions-api.d.ts +33 -1
- package/lib/functions/functions-api.js +1 -1
- package/lib/functions/functions.d.ts +7 -1
- package/lib/functions/functions.js +9 -1
- package/lib/functions/index.d.ts +2 -2
- package/lib/functions/index.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/installations/index.d.ts +1 -1
- package/lib/installations/index.js +1 -1
- package/lib/installations/installations-namespace.d.ts +1 -1
- package/lib/installations/installations-namespace.js +1 -1
- package/lib/installations/installations-request-handler.d.ts +1 -1
- package/lib/installations/installations-request-handler.js +1 -1
- package/lib/installations/installations.d.ts +1 -1
- package/lib/installations/installations.js +1 -1
- package/lib/instance-id/index.d.ts +1 -1
- package/lib/instance-id/index.js +1 -1
- package/lib/instance-id/instance-id-namespace.d.ts +1 -1
- package/lib/instance-id/instance-id-namespace.js +1 -1
- package/lib/instance-id/instance-id.d.ts +1 -1
- package/lib/instance-id/instance-id.js +1 -1
- package/lib/machine-learning/index.d.ts +1 -1
- package/lib/machine-learning/index.js +1 -1
- package/lib/machine-learning/machine-learning-api-client.d.ts +1 -1
- package/lib/machine-learning/machine-learning-api-client.js +1 -1
- package/lib/machine-learning/machine-learning-namespace.d.ts +1 -1
- package/lib/machine-learning/machine-learning-namespace.js +1 -1
- package/lib/machine-learning/machine-learning-utils.d.ts +1 -1
- package/lib/machine-learning/machine-learning-utils.js +1 -1
- package/lib/machine-learning/machine-learning.d.ts +1 -1
- package/lib/machine-learning/machine-learning.js +1 -1
- package/lib/messaging/batch-request-internal.d.ts +1 -1
- package/lib/messaging/batch-request-internal.js +1 -1
- package/lib/messaging/index.d.ts +1 -1
- package/lib/messaging/index.js +1 -1
- package/lib/messaging/messaging-api-request-internal.d.ts +1 -1
- package/lib/messaging/messaging-api-request-internal.js +1 -1
- package/lib/messaging/messaging-api.d.ts +1 -1
- package/lib/messaging/messaging-api.js +1 -1
- package/lib/messaging/messaging-errors-internal.d.ts +1 -1
- package/lib/messaging/messaging-errors-internal.js +1 -1
- package/lib/messaging/messaging-internal.d.ts +1 -1
- package/lib/messaging/messaging-internal.js +1 -1
- package/lib/messaging/messaging-namespace.d.ts +1 -1
- package/lib/messaging/messaging-namespace.js +1 -1
- package/lib/messaging/messaging.d.ts +1 -1
- package/lib/messaging/messaging.js +1 -1
- package/lib/project-management/android-app.d.ts +1 -1
- package/lib/project-management/android-app.js +1 -1
- package/lib/project-management/app-metadata.d.ts +1 -1
- package/lib/project-management/app-metadata.js +1 -1
- package/lib/project-management/index.d.ts +1 -1
- package/lib/project-management/index.js +1 -1
- package/lib/project-management/ios-app.d.ts +1 -1
- package/lib/project-management/ios-app.js +1 -1
- package/lib/project-management/project-management-api-request-internal.d.ts +1 -1
- package/lib/project-management/project-management-api-request-internal.js +1 -1
- package/lib/project-management/project-management-namespace.d.ts +1 -1
- package/lib/project-management/project-management-namespace.js +1 -1
- package/lib/project-management/project-management.d.ts +1 -1
- package/lib/project-management/project-management.js +1 -1
- package/lib/remote-config/index.d.ts +1 -1
- package/lib/remote-config/index.js +1 -1
- package/lib/remote-config/remote-config-api-client-internal.d.ts +1 -1
- package/lib/remote-config/remote-config-api-client-internal.js +1 -1
- package/lib/remote-config/remote-config-api.d.ts +1 -1
- package/lib/remote-config/remote-config-api.js +1 -1
- package/lib/remote-config/remote-config-namespace.d.ts +1 -1
- package/lib/remote-config/remote-config-namespace.js +1 -1
- package/lib/remote-config/remote-config.d.ts +1 -1
- package/lib/remote-config/remote-config.js +1 -1
- package/lib/security-rules/index.d.ts +1 -1
- package/lib/security-rules/index.js +1 -1
- package/lib/security-rules/security-rules-api-client-internal.d.ts +1 -1
- package/lib/security-rules/security-rules-api-client-internal.js +1 -1
- package/lib/security-rules/security-rules-internal.d.ts +1 -1
- package/lib/security-rules/security-rules-internal.js +1 -1
- package/lib/security-rules/security-rules-namespace.d.ts +1 -1
- package/lib/security-rules/security-rules-namespace.js +1 -1
- package/lib/security-rules/security-rules.d.ts +1 -1
- package/lib/security-rules/security-rules.js +1 -1
- package/lib/storage/index.d.ts +14 -1
- package/lib/storage/index.js +29 -7
- package/lib/storage/storage-namespace.d.ts +1 -1
- package/lib/storage/storage-namespace.js +1 -1
- package/lib/storage/storage.d.ts +1 -1
- package/lib/storage/storage.js +1 -1
- package/lib/storage/utils.d.ts +20 -0
- package/lib/storage/utils.js +21 -0
- package/lib/utils/api-request.d.ts +1 -1
- package/lib/utils/api-request.js +1 -9
- package/lib/utils/crypto-signer.d.ts +1 -1
- package/lib/utils/crypto-signer.js +1 -1
- package/lib/utils/deep-copy.d.ts +1 -1
- package/lib/utils/deep-copy.js +1 -1
- package/lib/utils/error.d.ts +1 -1
- package/lib/utils/error.js +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +1 -1
- package/lib/utils/jwt.d.ts +1 -1
- package/lib/utils/jwt.js +1 -1
- package/lib/utils/validator.d.ts +9 -1
- package/lib/utils/validator.js +17 -2
- package/package.json +1 -1
package/lib/app/core.d.ts
CHANGED
package/lib/app/core.js
CHANGED
package/lib/app/credential.d.ts
CHANGED
package/lib/app/credential.js
CHANGED
package/lib/app/firebase-app.js
CHANGED
package/lib/app/index.d.ts
CHANGED
package/lib/app/index.js
CHANGED
package/lib/app/lifecycle.d.ts
CHANGED
package/lib/app/lifecycle.js
CHANGED
package/lib/app-check/index.d.ts
CHANGED
package/lib/app-check/index.js
CHANGED
package/lib/auth/auth-config.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v11.
|
|
1
|
+
/*! firebase-admin v11.10.1 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* Copyright 2018 Google Inc.
|
|
@@ -965,32 +965,29 @@ class PasswordPolicyAuthConfig {
|
|
|
965
965
|
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_CONFIG, `"${key}" is not a valid PasswordPolicyConfig.constraints parameter.`);
|
|
966
966
|
}
|
|
967
967
|
}
|
|
968
|
-
if (typeof options.constraints.requireUppercase !== undefined &&
|
|
968
|
+
if (typeof options.constraints.requireUppercase !== 'undefined' &&
|
|
969
969
|
!validator.isBoolean(options.constraints.requireUppercase)) {
|
|
970
970
|
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_CONFIG, '"PasswordPolicyConfig.constraints.requireUppercase" must be a boolean.');
|
|
971
971
|
}
|
|
972
|
-
if (typeof options.constraints.requireLowercase !== undefined &&
|
|
972
|
+
if (typeof options.constraints.requireLowercase !== 'undefined' &&
|
|
973
973
|
!validator.isBoolean(options.constraints.requireLowercase)) {
|
|
974
974
|
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_CONFIG, '"PasswordPolicyConfig.constraints.requireLowercase" must be a boolean.');
|
|
975
975
|
}
|
|
976
|
-
if (typeof options.constraints.requireNonAlphanumeric !== undefined &&
|
|
976
|
+
if (typeof options.constraints.requireNonAlphanumeric !== 'undefined' &&
|
|
977
977
|
!validator.isBoolean(options.constraints.requireNonAlphanumeric)) {
|
|
978
978
|
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_CONFIG, '"PasswordPolicyConfig.constraints.requireNonAlphanumeric"' +
|
|
979
979
|
' must be a boolean.');
|
|
980
980
|
}
|
|
981
|
-
if (typeof options.constraints.requireNumeric !== undefined &&
|
|
981
|
+
if (typeof options.constraints.requireNumeric !== 'undefined' &&
|
|
982
982
|
!validator.isBoolean(options.constraints.requireNumeric)) {
|
|
983
983
|
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_CONFIG, '"PasswordPolicyConfig.constraints.requireNumeric" must be a boolean.');
|
|
984
984
|
}
|
|
985
|
-
if (
|
|
986
|
-
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_CONFIG, '"PasswordPolicyConfig.constraints.minLength" must be a number.');
|
|
987
|
-
}
|
|
988
|
-
if (!validator.isNumber(options.constraints.maxLength)) {
|
|
989
|
-
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_CONFIG, '"PasswordPolicyConfig.constraints.maxLength" must be a number.');
|
|
990
|
-
}
|
|
991
|
-
if (options.constraints.minLength === undefined) {
|
|
985
|
+
if (typeof options.constraints.minLength === 'undefined') {
|
|
992
986
|
options.constraints.minLength = 6;
|
|
993
987
|
}
|
|
988
|
+
else if (!validator.isNumber(options.constraints.minLength)) {
|
|
989
|
+
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_CONFIG, '"PasswordPolicyConfig.constraints.minLength" must be a number.');
|
|
990
|
+
}
|
|
994
991
|
else {
|
|
995
992
|
if (!(options.constraints.minLength >= 6
|
|
996
993
|
&& options.constraints.minLength <= 30)) {
|
|
@@ -998,9 +995,12 @@ class PasswordPolicyAuthConfig {
|
|
|
998
995
|
' must be an integer between 6 and 30, inclusive.');
|
|
999
996
|
}
|
|
1000
997
|
}
|
|
1001
|
-
if (options.constraints.maxLength === undefined) {
|
|
998
|
+
if (typeof options.constraints.maxLength === 'undefined') {
|
|
1002
999
|
options.constraints.maxLength = 4096;
|
|
1003
1000
|
}
|
|
1001
|
+
else if (!validator.isNumber(options.constraints.maxLength)) {
|
|
1002
|
+
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_CONFIG, '"PasswordPolicyConfig.constraints.maxLength" must be a number.');
|
|
1003
|
+
}
|
|
1004
1004
|
else {
|
|
1005
1005
|
if (!(options.constraints.maxLength >= options.constraints.minLength &&
|
|
1006
1006
|
options.constraints.maxLength <= 4096)) {
|
package/lib/auth/auth.d.ts
CHANGED
package/lib/auth/auth.js
CHANGED
package/lib/auth/base-auth.d.ts
CHANGED
package/lib/auth/base-auth.js
CHANGED
package/lib/auth/identifier.d.ts
CHANGED
package/lib/auth/identifier.js
CHANGED
package/lib/auth/index.d.ts
CHANGED
package/lib/auth/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v11.
|
|
1
|
+
/*! firebase-admin v11.10.1 */
|
|
2
2
|
import { SmsRegionConfig, MultiFactorConfig, MultiFactorAuthServerConfig, RecaptchaConfig, PasswordPolicyAuthServerConfig, PasswordPolicyConfig } from './auth-config';
|
|
3
3
|
/**
|
|
4
4
|
* Interface representing the properties to update on the provided project config.
|
package/lib/auth/tenant.d.ts
CHANGED
package/lib/auth/tenant.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v11.
|
|
1
|
+
/*! firebase-admin v11.10.1 */
|
|
2
2
|
/*!
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google Inc.
|
|
@@ -19,8 +19,12 @@ export interface MultiFactorInfoResponse {
|
|
|
19
19
|
mfaEnrollmentId: string;
|
|
20
20
|
displayName?: string;
|
|
21
21
|
phoneInfo?: string;
|
|
22
|
+
totpInfo?: TotpInfoResponse;
|
|
22
23
|
enrolledAt?: string;
|
|
23
|
-
[key: string]:
|
|
24
|
+
[key: string]: unknown;
|
|
25
|
+
}
|
|
26
|
+
export interface TotpInfoResponse {
|
|
27
|
+
[key: string]: unknown;
|
|
24
28
|
}
|
|
25
29
|
export interface ProviderUserInfoResponse {
|
|
26
30
|
rawId: string;
|
|
@@ -64,7 +68,9 @@ export declare abstract class MultiFactorInfo {
|
|
|
64
68
|
*/
|
|
65
69
|
readonly displayName?: string;
|
|
66
70
|
/**
|
|
67
|
-
* The type identifier of the second factor.
|
|
71
|
+
* The type identifier of the second factor.
|
|
72
|
+
* For SMS second factors, this is `phone`.
|
|
73
|
+
* For TOTP second factors, this is `totp`.
|
|
68
74
|
*/
|
|
69
75
|
readonly factorId: string;
|
|
70
76
|
/**
|
|
@@ -97,13 +103,31 @@ export declare class PhoneMultiFactorInfo extends MultiFactorInfo {
|
|
|
97
103
|
*/
|
|
98
104
|
toJSON(): object;
|
|
99
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* `TotpInfo` struct associated with a second factor
|
|
108
|
+
*/
|
|
109
|
+
export declare class TotpInfo {
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Interface representing a TOTP specific user-enrolled second factor.
|
|
113
|
+
*/
|
|
114
|
+
export declare class TotpMultiFactorInfo extends MultiFactorInfo {
|
|
115
|
+
/**
|
|
116
|
+
* `TotpInfo` struct associated with a second factor
|
|
117
|
+
*/
|
|
118
|
+
readonly totpInfo: TotpInfo;
|
|
119
|
+
/**
|
|
120
|
+
* {@inheritdoc MultiFactorInfo.toJSON}
|
|
121
|
+
*/
|
|
122
|
+
toJSON(): object;
|
|
123
|
+
}
|
|
100
124
|
/**
|
|
101
125
|
* The multi-factor related user settings.
|
|
102
126
|
*/
|
|
103
127
|
export declare class MultiFactorSettings {
|
|
104
128
|
/**
|
|
105
129
|
* List of second factors enrolled with the current user.
|
|
106
|
-
* Currently only phone second factors are supported.
|
|
130
|
+
* Currently only phone and TOTP second factors are supported.
|
|
107
131
|
*/
|
|
108
132
|
enrolledFactors: MultiFactorInfo[];
|
|
109
133
|
/**
|