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