firebase-admin 13.0.2 → 13.2.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 +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 +10 -1
- package/lib/auth/action-code-settings-builder.js +7 -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 +15 -1
- package/lib/auth/auth-config.js +28 -2
- 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 +4 -4
- package/lib/auth/base-auth.js +4 -4
- package/lib/auth/identifier.d.ts +1 -1
- 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 +1 -1
- package/lib/auth/project-config-manager.js +1 -1
- package/lib/auth/project-config.d.ts +12 -2
- package/lib/auth/project-config.js +16 -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 +1 -1
- package/lib/auth/user-record.js +1 -1
- package/lib/credential/index.d.ts +1 -1
- package/lib/credential/index.js +1 -1
- package/lib/data-connect/data-connect-api-client-internal.d.ts +6 -1
- package/lib/data-connect/data-connect-api-client-internal.js +44 -11
- package/lib/data-connect/data-connect-api.d.ts +44 -1
- package/lib/data-connect/data-connect-api.js +1 -1
- package/lib/data-connect/data-connect.d.ts +1 -1
- package/lib/data-connect/data-connect.js +1 -1
- package/lib/data-connect/index.d.ts +2 -2
- package/lib/data-connect/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/remote-config/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 +1 -1
- package/lib/firestore/index.js +1 -1
- package/lib/functions/functions-api-client-internal.d.ts +1 -1
- package/lib/functions/functions-api-client-internal.js +14 -2
- package/lib/functions/functions-api.d.ts +1 -1
- 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 +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/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/condition-evaluator-internal.d.ts +1 -1
- package/lib/remote-config/condition-evaluator-internal.js +6 -5
- package/lib/remote-config/index.d.ts +3 -3
- package/lib/remote-config/index.js +3 -2
- package/lib/remote-config/internal/value-impl.d.ts +1 -1
- package/lib/remote-config/internal/value-impl.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 +35 -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 +20 -2
- package/lib/remote-config/remote-config.js +59 -2
- 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 +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/storage/utils.d.ts +1 -1
- package/lib/storage/utils.js +1 -1
- package/lib/utils/api-request.d.ts +1 -1
- package/lib/utils/api-request.js +1 -1
- 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 +5 -1
- package/lib/utils/error.js +8 -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 +1 -1
- package/lib/utils/validator.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v13.0
|
|
1
|
+
/*! firebase-admin v13.2.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.RemoteConfig = void 0;
|
|
19
|
+
exports.RemoteConfigFetchResponse = exports.RemoteConfig = void 0;
|
|
20
|
+
const utils = require("../utils/index");
|
|
20
21
|
const validator = require("../utils/validator");
|
|
21
22
|
const remote_config_api_client_internal_1 = require("./remote-config-api-client-internal");
|
|
22
23
|
const condition_evaluator_internal_1 = require("./condition-evaluator-internal");
|
|
@@ -351,6 +352,9 @@ class ServerConfigImpl {
|
|
|
351
352
|
getValue(key) {
|
|
352
353
|
return this.configValues[key] || new value_impl_1.ValueImpl('static');
|
|
353
354
|
}
|
|
355
|
+
getAll() {
|
|
356
|
+
return { ...this.configValues };
|
|
357
|
+
}
|
|
354
358
|
}
|
|
355
359
|
/**
|
|
356
360
|
* Remote Config dataplane template data implementation.
|
|
@@ -470,3 +474,56 @@ class VersionImpl {
|
|
|
470
474
|
return validator.isNonEmptyString(timestamp) && (new Date(timestamp)).getTime() > 0;
|
|
471
475
|
}
|
|
472
476
|
}
|
|
477
|
+
const HTTP_NOT_MODIFIED = 304;
|
|
478
|
+
const HTTP_OK = 200;
|
|
479
|
+
/**
|
|
480
|
+
* Represents a fetch response that can be used to interact with RC's client SDK.
|
|
481
|
+
*/
|
|
482
|
+
class RemoteConfigFetchResponse {
|
|
483
|
+
/**
|
|
484
|
+
* @param app - The app for this RemoteConfig service.
|
|
485
|
+
* @param serverConfig - The server config for which to generate a fetch response.
|
|
486
|
+
* @param requestEtag - A request eTag with which to compare the current response.
|
|
487
|
+
*/
|
|
488
|
+
constructor(app, serverConfig, requestEtag) {
|
|
489
|
+
const config = {};
|
|
490
|
+
for (const [param, value] of Object.entries(serverConfig.getAll())) {
|
|
491
|
+
config[param] = value.asString();
|
|
492
|
+
}
|
|
493
|
+
const currentEtag = this.processEtag(config, app);
|
|
494
|
+
if (currentEtag === requestEtag) {
|
|
495
|
+
this.response = {
|
|
496
|
+
status: HTTP_NOT_MODIFIED,
|
|
497
|
+
eTag: currentEtag,
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
else {
|
|
501
|
+
this.response = {
|
|
502
|
+
status: HTTP_OK,
|
|
503
|
+
eTag: currentEtag,
|
|
504
|
+
config,
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
/**
|
|
509
|
+
* @returns JSON representation of the fetch response that can be consumed
|
|
510
|
+
* by the RC client SDK.
|
|
511
|
+
*/
|
|
512
|
+
toJSON() {
|
|
513
|
+
return this.response;
|
|
514
|
+
}
|
|
515
|
+
processEtag(config, app) {
|
|
516
|
+
const configJson = JSON.stringify(config);
|
|
517
|
+
let hash = 0;
|
|
518
|
+
// Mimics Java's `String.hashCode()` which is used in RC's servers.
|
|
519
|
+
for (let i = 0; i < configJson.length; i++) {
|
|
520
|
+
const char = configJson.charCodeAt(i);
|
|
521
|
+
hash = (hash << 5) - hash + char;
|
|
522
|
+
hash |= 0;
|
|
523
|
+
}
|
|
524
|
+
const projectId = utils.getExplicitProjectId(app);
|
|
525
|
+
const parts = ['etag', projectId, 'firebase-server', 'fetch', hash];
|
|
526
|
+
return parts.filter(a => !!a).join('-');
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
exports.RemoteConfigFetchResponse = RemoteConfigFetchResponse;
|
package/lib/storage/index.d.ts
CHANGED
package/lib/storage/index.js
CHANGED
package/lib/storage/storage.d.ts
CHANGED
package/lib/storage/storage.js
CHANGED
package/lib/storage/utils.d.ts
CHANGED
package/lib/storage/utils.js
CHANGED
package/lib/utils/api-request.js
CHANGED
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 v13.0
|
|
1
|
+
/*! firebase-admin v13.2.0 */
|
|
2
2
|
/*!
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google Inc.
|
|
@@ -193,6 +193,10 @@ export declare class AuthClientErrorCode {
|
|
|
193
193
|
code: string;
|
|
194
194
|
message: string;
|
|
195
195
|
};
|
|
196
|
+
static INVALID_HOSTING_LINK_DOMAIN: {
|
|
197
|
+
code: string;
|
|
198
|
+
message: string;
|
|
199
|
+
};
|
|
196
200
|
static INVALID_EMAIL_VERIFIED: {
|
|
197
201
|
code: string;
|
|
198
202
|
message: string;
|
package/lib/utils/error.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v13.0
|
|
1
|
+
/*! firebase-admin v13.2.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* @license
|
|
@@ -432,6 +432,11 @@ AuthClientErrorCode.INVALID_DYNAMIC_LINK_DOMAIN = {
|
|
|
432
432
|
message: 'The provided dynamic link domain is not configured or authorized ' +
|
|
433
433
|
'for the current project.',
|
|
434
434
|
};
|
|
435
|
+
AuthClientErrorCode.INVALID_HOSTING_LINK_DOMAIN = {
|
|
436
|
+
code: 'invalid-hosting-link-domain',
|
|
437
|
+
message: 'The provided hosting link domain is not configured in Firebase ' +
|
|
438
|
+
'Hosting or is not owned by the current project.',
|
|
439
|
+
};
|
|
435
440
|
AuthClientErrorCode.INVALID_EMAIL_VERIFIED = {
|
|
436
441
|
code: 'invalid-email-verified',
|
|
437
442
|
message: 'The emailVerified field must be a boolean.',
|
|
@@ -881,6 +886,8 @@ const AUTH_SERVER_TO_CLIENT_CODE = {
|
|
|
881
886
|
INVALID_CONTINUE_URI: 'INVALID_CONTINUE_URI',
|
|
882
887
|
// Dynamic link domain in provided ActionCodeSettings is not authorized.
|
|
883
888
|
INVALID_DYNAMIC_LINK_DOMAIN: 'INVALID_DYNAMIC_LINK_DOMAIN',
|
|
889
|
+
// Hosting link domain in provided ActionCodeSettings is not owned by the current project.
|
|
890
|
+
INVALID_HOSTING_LINK_DOMAIN: 'INVALID_HOSTING_LINK_DOMAIN',
|
|
884
891
|
// uploadAccount provides an email that already exists.
|
|
885
892
|
DUPLICATE_EMAIL: 'EMAIL_ALREADY_EXISTS',
|
|
886
893
|
// uploadAccount provides a localId that already exists.
|
package/lib/utils/index.d.ts
CHANGED
package/lib/utils/index.js
CHANGED
package/lib/utils/jwt.d.ts
CHANGED
package/lib/utils/jwt.js
CHANGED
package/lib/utils/validator.d.ts
CHANGED
package/lib/utils/validator.js
CHANGED