firebase-admin 13.8.0 → 13.9.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/README.md +2 -2
- 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 +1 -1
- 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 +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 +1 -1
- package/lib/data-connect/data-connect-api-client-internal.js +1 -1
- package/lib/data-connect/data-connect-api.d.ts +1 -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 +1 -1
- package/lib/data-connect/index.js +1 -1
- package/lib/data-connect/validate-admin-args.d.ts +1 -1
- package/lib/data-connect/validate-admin-args.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 +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 +1 -1
- 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/phone-number-verification/index.d.ts +1 -1
- package/lib/phone-number-verification/index.js +1 -1
- package/lib/phone-number-verification/phone-number-verification-api-client-internal.d.ts +1 -1
- package/lib/phone-number-verification/phone-number-verification-api-client-internal.js +1 -1
- package/lib/phone-number-verification/phone-number-verification-api.d.ts +1 -1
- package/lib/phone-number-verification/phone-number-verification-api.js +1 -1
- package/lib/phone-number-verification/phone-number-verification.d.ts +1 -1
- package/lib/phone-number-verification/phone-number-verification.js +1 -1
- package/lib/phone-number-verification/token-verifier.d.ts +1 -1
- package/lib/phone-number-verification/token-verifier.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 +1 -1
- package/lib/remote-config/index.d.ts +1 -1
- package/lib/remote-config/index.js +1 -1
- 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 +6 -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 +40 -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 +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 +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 +1 -1
- package/lib/utils/validator.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v13.
|
|
1
|
+
/*! firebase-admin v13.9.0 */
|
|
2
2
|
/*!
|
|
3
3
|
* Copyright 2021 Google LLC
|
|
4
4
|
*
|
|
@@ -381,6 +381,11 @@ export interface ExperimentValue {
|
|
|
381
381
|
* served by the Experiment.
|
|
382
382
|
*/
|
|
383
383
|
variantValue: ExperimentVariantValue[];
|
|
384
|
+
/**
|
|
385
|
+
* The percentage of users included in the Experiment, represented as a number
|
|
386
|
+
* between 0 and 100.
|
|
387
|
+
*/
|
|
388
|
+
exposurePercent?: number;
|
|
384
389
|
}
|
|
385
390
|
/**
|
|
386
391
|
* Interface representing a parameter value linked to a Rollout.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v13.
|
|
1
|
+
/*! firebase-admin v13.9.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* Copyright 2020 Google LLC
|
|
@@ -187,6 +187,7 @@ class RemoteConfigTemplateImpl {
|
|
|
187
187
|
else {
|
|
188
188
|
this.parameters = {};
|
|
189
189
|
}
|
|
190
|
+
validateAllParameterExposures(this.parameters);
|
|
190
191
|
if (typeof config.parameterGroups !== 'undefined') {
|
|
191
192
|
if (!validator.isNonNullObject(config.parameterGroups)) {
|
|
192
193
|
throw new remote_config_api_client_internal_1.FirebaseRemoteConfigError('invalid-argument', 'Remote Config parameter groups must be a non-null object');
|
|
@@ -196,6 +197,11 @@ class RemoteConfigTemplateImpl {
|
|
|
196
197
|
else {
|
|
197
198
|
this.parameterGroups = {};
|
|
198
199
|
}
|
|
200
|
+
for (const group of Object.values(this.parameterGroups)) {
|
|
201
|
+
if (validator.isNonNullObject(group) && validator.isNonNullObject(group.parameters)) {
|
|
202
|
+
validateAllParameterExposures(group.parameters);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
199
205
|
if (typeof config.conditions !== 'undefined') {
|
|
200
206
|
if (!validator.isArray(config.conditions)) {
|
|
201
207
|
throw new remote_config_api_client_internal_1.FirebaseRemoteConfigError('invalid-argument', 'Remote Config conditions must be an array');
|
|
@@ -358,6 +364,39 @@ class ServerConfigImpl {
|
|
|
358
364
|
return { ...this.configValues };
|
|
359
365
|
}
|
|
360
366
|
}
|
|
367
|
+
function validateAllParameterExposures(parameters) {
|
|
368
|
+
// Walk each parameter and validate any exposurePercent present in
|
|
369
|
+
// conditional values only. Experiment exposure is condition-scoped.
|
|
370
|
+
for (const [parameterName, parameter] of Object.entries(parameters)) {
|
|
371
|
+
if (!validator.isNonNullObject(parameter)) {
|
|
372
|
+
continue;
|
|
373
|
+
}
|
|
374
|
+
if (!validator.isNonNullObject(parameter.conditionalValues)) {
|
|
375
|
+
continue;
|
|
376
|
+
}
|
|
377
|
+
for (const conditionalValue of Object.values(parameter.conditionalValues)) {
|
|
378
|
+
validateExperimentExposurePercent(conditionalValue, parameterName);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
function validateExperimentExposurePercent(parameterValue, parameterName) {
|
|
383
|
+
// Only experiment-backed values can carry `exposurePercent`.
|
|
384
|
+
// For other parameter value types, this validator is a no-op.
|
|
385
|
+
if (!validator.isNonNullObject(parameterValue) ||
|
|
386
|
+
!validator.isNonNullObject(parameterValue.experimentValue)) {
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
389
|
+
const exposurePercent = parameterValue.experimentValue.exposurePercent;
|
|
390
|
+
// `exposurePercent` is optional. If absent, leave behavior unchanged.
|
|
391
|
+
if (typeof exposurePercent === 'undefined') {
|
|
392
|
+
return;
|
|
393
|
+
}
|
|
394
|
+
// Enforce public contract: numeric and within [0, 100].
|
|
395
|
+
if (!validator.isNumber(exposurePercent) || !Number.isFinite(exposurePercent) ||
|
|
396
|
+
exposurePercent < 0 || exposurePercent > 100) {
|
|
397
|
+
throw new remote_config_api_client_internal_1.FirebaseRemoteConfigError('invalid-argument', `Experiment exposure percent must be between 0 and 100 (${parameterName})`);
|
|
398
|
+
}
|
|
399
|
+
}
|
|
361
400
|
/**
|
|
362
401
|
* Remote Config dataplane template data implementation.
|
|
363
402
|
*/
|
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
package/lib/utils/error.js
CHANGED
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