Socket
Socket
Sign inDemoInstall

firebase-admin

Package Overview
Dependencies
204
Maintainers
5
Versions
131
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 9.100.0-alpha.0 to 9.100.0-alpha.1

lib/app-check/app-check-api-client-internal.d.ts

30

lib/app/core.d.ts

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -22,3 +22,3 @@ * @license

/**
* Available options to pass to [`initializeApp()`](admin#.initializeApp).
* Available options to pass to {@link firebase-admin.app#initializeApp}.
*/

@@ -30,8 +30,8 @@ export interface AppOptions {

*
* See [Initialize the SDK](/docs/admin/setup#initialize_the_sdk) for detailed
* documentation and code samples.
* See {@link https://firebase.google.com/docs/admin/setup#initialize_the_sdk | Initialize the SDK}
* for detailed documentation and code samples.
*/
credential?: Credential;
/**
* The object to use as the [`auth`](/docs/reference/security/database/#auth)
* The object to use as the {@link https://firebase.google.com/docs/reference/security/database/#auth | auth}
* variable in your Realtime Database Rules when the Admin SDK reads from or

@@ -44,3 +44,4 @@ * writes to the Realtime Database. This allows you to downscope the Admin SDK

* See
* [Authenticate with limited privileges](/docs/database/admin/start#authenticate-with-limited-privileges)
* {@link https://firebase.google.com/docs/database/admin/start#authenticate-with-limited-privileges |
* Authenticate with limited privileges}
* for detailed documentation and code samples.

@@ -69,3 +70,3 @@ */

/**
* An [HTTP Agent](https://nodejs.org/api/http.html#http_class_http_agent)
* An {@link https://nodejs.org/api/http.html#http_class_http_agent | HTTP Agent}
* to be used when making outgoing HTTP calls. This Agent instance is used

@@ -85,8 +86,2 @@ * by all services that make REST calls (e.g. `auth`, `messaging`,

* services.
*
* Do not call this constructor directly. Instead, use
* {@link
* https://firebase.google.com/docs/reference/admin/node/admin#.initializeApp
* `admin.initializeApp()`}
* to create an app.
*/

@@ -116,6 +111,3 @@ export interface App {

* The (read-only) configuration options for this app. These are the original
* parameters given in
* {@link
* https://firebase.google.com/docs/reference/admin/node/admin#.initializeApp
* `admin.initializeApp()`}.
* parameters given in {@link firebase-admin.app#initializeApp}.
*

@@ -163,3 +155,5 @@ * @example

/**
* @return A JSON-serializable representation of this object.
* Returns a JSON-serializable object representation of this error.
*
* @returns A JSON-serializable representation of this object.
*/

@@ -166,0 +160,0 @@ toJSON(): object;

2

lib/app/core.js

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -23,10 +23,6 @@ * @license

* Returns a credential created from the
* {@link
* https://developers.google.com/identity/protocols/application-default-credentials
* Google Application Default Credentials}
* {@link https://developers.google.com/identity/protocols/application-default-credentials |
* Google Application Default Credentials}
* that grants admin access to Firebase services. This credential can be used
* in the call to
* {@link
* https://firebase.google.com/docs/reference/admin/node/admin#.initializeApp
* `admin.initializeApp()`}.
* in the call to {@link firebase-admin.app#initializeApp}.
*

@@ -37,5 +33,3 @@ * Google Application Default Credentials are available on any Google

* See
* {@link
* https://firebase.google.com/docs/admin/setup#initialize_the_sdk
* Initialize the SDK}
* {@link https://firebase.google.com/docs/admin/setup#initialize_the_sdk | Initialize the SDK}
* for more details.

@@ -51,6 +45,6 @@ *

*
* @param httpAgent Optional [HTTP Agent](https://nodejs.org/api/http.html#http_class_http_agent)
* @param httpAgent Optional {@link https://nodejs.org/api/http.html#http_class_http_agent | HTTP Agent}
* to be used when retrieving access tokens from Google token servers.
*
* @return A credential authenticated via Google
* @returns A credential authenticated via Google
* Application Default Credentials that can be used to initialize an app.

@@ -62,11 +56,6 @@ */

* admin access to Firebase services. This credential can be used in the call
* to
* {@link
* https://firebase.google.com/docs/reference/admin/node/admin#.initializeApp
* `admin.initializeApp()`}.
* to {@link firebase-admin.app#initializeApp}.
*
* See
* {@link
* https://firebase.google.com/docs/admin/setup#initialize_the_sdk
* Initialize the SDK}
* {@link https://firebase.google.com/docs/admin/setup#initialize_the_sdk | Initialize the SDK}
* for more details.

@@ -99,6 +88,6 @@ *

* account key JSON file or an object representing a service account key.
* @param httpAgent Optional [HTTP Agent](https://nodejs.org/api/http.html#http_class_http_agent)
* @param httpAgent Optional {@link https://nodejs.org/api/http.html#http_class_http_agent | HTTP Agent}
* to be used when retrieving access tokens from Google token servers.
*
* @return A credential authenticated via the
* @returns A credential authenticated via the
* provided service account that can be used to initialize an app.

@@ -110,11 +99,6 @@ */

* admin access to Firebase services. This credential can be used in the call
* to
* {@link
* https://firebase.google.com/docs/reference/admin/node/admin#.initializeApp
* `admin.initializeApp()`}.
* to {@link firebase-admin.app#initializeApp}.
*
* See
* {@link
* https://firebase.google.com/docs/admin/setup#initialize_the_sdk
* Initialize the SDK}
* {@link https://firebase.google.com/docs/admin/setup#initialize_the_sdk | Initialize the SDK}
* for more details.

@@ -135,6 +119,6 @@ *

* refresh token.
* @param httpAgent Optional [HTTP Agent](https://nodejs.org/api/http.html#http_class_http_agent)
* @param httpAgent Optional {@link https://nodejs.org/api/http.html#http_class_http_agent | HTTP Agent}
* to be used when retrieving access tokens from Google token servers.
*
* @return A credential authenticated via the
* @returns A credential authenticated via the
* provided service account that can be used to initialize an app.

@@ -141,0 +125,0 @@ */

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -27,10 +27,6 @@ /*!

* Returns a credential created from the
* {@link
* https://developers.google.com/identity/protocols/application-default-credentials
* Google Application Default Credentials}
* {@link https://developers.google.com/identity/protocols/application-default-credentials |
* Google Application Default Credentials}
* that grants admin access to Firebase services. This credential can be used
* in the call to
* {@link
* https://firebase.google.com/docs/reference/admin/node/admin#.initializeApp
* `admin.initializeApp()`}.
* in the call to {@link firebase-admin.app#initializeApp}.
*

@@ -41,5 +37,3 @@ * Google Application Default Credentials are available on any Google

* See
* {@link
* https://firebase.google.com/docs/admin/setup#initialize_the_sdk
* Initialize the SDK}
* {@link https://firebase.google.com/docs/admin/setup#initialize_the_sdk | Initialize the SDK}
* for more details.

@@ -55,6 +49,6 @@ *

*
* @param httpAgent Optional [HTTP Agent](https://nodejs.org/api/http.html#http_class_http_agent)
* @param httpAgent Optional {@link https://nodejs.org/api/http.html#http_class_http_agent | HTTP Agent}
* to be used when retrieving access tokens from Google token servers.
*
* @return A credential authenticated via Google
* @returns A credential authenticated via Google
* Application Default Credentials that can be used to initialize an app.

@@ -72,11 +66,6 @@ */

* admin access to Firebase services. This credential can be used in the call
* to
* {@link
* https://firebase.google.com/docs/reference/admin/node/admin#.initializeApp
* `admin.initializeApp()`}.
* to {@link firebase-admin.app#initializeApp}.
*
* See
* {@link
* https://firebase.google.com/docs/admin/setup#initialize_the_sdk
* Initialize the SDK}
* {@link https://firebase.google.com/docs/admin/setup#initialize_the_sdk | Initialize the SDK}
* for more details.

@@ -109,6 +98,6 @@ *

* account key JSON file or an object representing a service account key.
* @param httpAgent Optional [HTTP Agent](https://nodejs.org/api/http.html#http_class_http_agent)
* @param httpAgent Optional {@link https://nodejs.org/api/http.html#http_class_http_agent | HTTP Agent}
* to be used when retrieving access tokens from Google token servers.
*
* @return A credential authenticated via the
* @returns A credential authenticated via the
* provided service account that can be used to initialize an app.

@@ -127,11 +116,6 @@ */

* admin access to Firebase services. This credential can be used in the call
* to
* {@link
* https://firebase.google.com/docs/reference/admin/node/admin#.initializeApp
* `admin.initializeApp()`}.
* to {@link firebase-admin.app#initializeApp}.
*
* See
* {@link
* https://firebase.google.com/docs/admin/setup#initialize_the_sdk
* Initialize the SDK}
* {@link https://firebase.google.com/docs/admin/setup#initialize_the_sdk | Initialize the SDK}
* for more details.

@@ -152,6 +136,6 @@ *

* refresh token.
* @param httpAgent Optional [HTTP Agent](https://nodejs.org/api/http.html#http_class_http_agent)
* @param httpAgent Optional {@link https://nodejs.org/api/http.html#http_class_http_agent | HTTP Agent}
* to be used when retrieving access tokens from Google token servers.
*
* @return A credential authenticated via the
* @returns A credential authenticated via the
* provided service account that can be used to initialize an app.

@@ -158,0 +142,0 @@ */

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -3,0 +3,0 @@ * @license

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -43,10 +43,5 @@ * @license

*
* This object contains the following properties:
* * `access_token` (`string`): The actual Google OAuth2 access token.
* * `expires_in` (`number`): The number of seconds from when the token was
* issued that it expires.
*
* @return A Google OAuth2 access token object.
* @returns A Google OAuth2 access token object.
*/
getAccessToken(): Promise<GoogleOAuthAccessToken>;
}

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -37,20 +37,13 @@ * @license

private credential_;
private isDeleted_;
private cachedToken_;
private cachedTokenPromise_;
private tokenListeners_;
private tokenRefreshTimeout_;
constructor(credential_: Credential);
/**
* Gets an auth token for the associated app.
*
* @param {boolean} forceRefresh Whether or not to force a token refresh.
* @return {Promise<FirebaseAccessToken>} A Promise that will be fulfilled with the current or
* new token.
*/
getToken(forceRefresh?: boolean): Promise<FirebaseAccessToken>;
getCachedToken(): FirebaseAccessToken | null;
private refreshToken;
private shouldRefresh;
/**
* Adds a listener that is called each time a token changes.
*
* @param {function(string)} listener The listener that will be called with each new token.
* @param listener The listener that will be called with each new token.
*/

@@ -61,17 +54,5 @@ addAuthTokenListener(listener: (token: string) => void): void;

*
* @param {function(string)} listener The listener to remove.
* @param listener The listener to remove.
*/
removeAuthTokenListener(listener: (token: string) => void): void;
/**
* Deletes the FirebaseAppInternals instance.
*/
delete(): void;
/**
* Establishes timeout to refresh the Google OAuth2 access token used by the SDK.
*
* @param {number} delayInMilliseconds The delay to use for the timeout.
* @param {number} numRetries The number of times to retry fetching a new token if the prior fetch
* failed.
*/
private setTokenRefreshTimeout;
}

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -25,2 +25,3 @@ /*!

var error_1 = require("../utils/error");
var TOKEN_EXPIRY_THRESHOLD_MILLIS = 5 * 60 * 1000;
/**

@@ -32,103 +33,66 @@ * Internals of a FirebaseApp instance.

this.credential_ = credential_;
this.isDeleted_ = false;
this.tokenListeners_ = [];
}
/**
* Gets an auth token for the associated app.
*
* @param {boolean} forceRefresh Whether or not to force a token refresh.
* @return {Promise<FirebaseAccessToken>} A Promise that will be fulfilled with the current or
* new token.
*/
FirebaseAppInternals.prototype.getToken = function (forceRefresh) {
var _this = this;
var expired = this.cachedToken_ && this.cachedToken_.expirationTime < Date.now();
if (this.cachedTokenPromise_ && !forceRefresh && !expired) {
return this.cachedTokenPromise_
.catch(function (error) {
// Update the cached token promise to avoid caching errors. Set it to resolve with the
// cached token if we have one (and return that promise since the token has still not
// expired).
if (_this.cachedToken_) {
_this.cachedTokenPromise_ = Promise.resolve(_this.cachedToken_);
return _this.cachedTokenPromise_;
}
// Otherwise, set the cached token promise to null so that it will force a refresh next
// time getToken() is called.
_this.cachedTokenPromise_ = null;
// And re-throw the caught error.
throw error;
});
if (forceRefresh === void 0) { forceRefresh = false; }
if (forceRefresh || this.shouldRefresh()) {
return this.refreshToken();
}
else {
// Clear the outstanding token refresh timeout. This is a noop if the timeout is undefined.
clearTimeout(this.tokenRefreshTimeout_);
// this.credential_ may be an external class; resolving it in a promise helps us
// protect against exceptions and upgrades the result to a promise in all cases.
this.cachedTokenPromise_ = Promise.resolve(this.credential_.getAccessToken())
.then(function (result) {
// Since the developer can provide the credential implementation, we want to weakly verify
// the return type until the type is properly exported.
if (!validator.isNonNullObject(result) ||
typeof result.expires_in !== 'number' ||
typeof result.access_token !== 'string') {
throw new error_1.FirebaseAppError(error_1.AppErrorCodes.INVALID_CREDENTIAL, "Invalid access token generated: \"" + JSON.stringify(result) + "\". Valid access " +
'tokens must be an object with the "expires_in" (number) and "access_token" ' +
'(string) properties.');
}
var token = {
accessToken: result.access_token,
expirationTime: Date.now() + (result.expires_in * 1000),
};
var hasAccessTokenChanged = (_this.cachedToken_ && _this.cachedToken_.accessToken !== token.accessToken);
var hasExpirationChanged = (_this.cachedToken_ && _this.cachedToken_.expirationTime !== token.expirationTime);
if (!_this.cachedToken_ || hasAccessTokenChanged || hasExpirationChanged) {
_this.cachedToken_ = token;
_this.tokenListeners_.forEach(function (listener) {
listener(token.accessToken);
});
}
// Establish a timeout to proactively refresh the token every minute starting at five
// minutes before it expires. Once a token refresh succeeds, no further retries are
// needed; if it fails, retry every minute until the token expires (resulting in a total
// of four retries: at 4, 3, 2, and 1 minutes).
var refreshTimeInSeconds = (result.expires_in - (5 * 60));
var numRetries = 4;
// In the rare cases the token is short-lived (that is, it expires in less than five
// minutes from when it was fetched), establish the timeout to refresh it after the
// current minute ends and update the number of retries that should be attempted before
// the token expires.
if (refreshTimeInSeconds <= 0) {
refreshTimeInSeconds = result.expires_in % 60;
numRetries = Math.floor(result.expires_in / 60) - 1;
}
// The token refresh timeout keeps the Node.js process alive, so only create it if this
// instance has not already been deleted.
if (numRetries && !_this.isDeleted_) {
_this.setTokenRefreshTimeout(refreshTimeInSeconds * 1000, numRetries);
}
return token;
})
.catch(function (error) {
var errorMessage = (typeof error === 'string') ? error : error.message;
errorMessage = 'Credential implementation provided to initializeApp() via the ' +
'"credential" property failed to fetch a valid Google OAuth2 access token with the ' +
("following error: \"" + errorMessage + "\".");
if (errorMessage.indexOf('invalid_grant') !== -1) {
errorMessage += ' There are two likely causes: (1) your server time is not properly ' +
'synced or (2) your certificate key file has been revoked. To solve (1), re-sync the ' +
'time on your server. To solve (2), make sure the key ID for your key file is still ' +
'present at https://console.firebase.google.com/iam-admin/serviceaccounts/project. If ' +
'not, generate a new key file at ' +
'https://console.firebase.google.com/project/_/settings/serviceaccounts/adminsdk.';
}
throw new error_1.FirebaseAppError(error_1.AppErrorCodes.INVALID_CREDENTIAL, errorMessage);
});
return this.cachedTokenPromise_;
}
return Promise.resolve(this.cachedToken_);
};
FirebaseAppInternals.prototype.getCachedToken = function () {
return this.cachedToken_ || null;
};
FirebaseAppInternals.prototype.refreshToken = function () {
var _this = this;
return Promise.resolve(this.credential_.getAccessToken())
.then(function (result) {
// Since the developer can provide the credential implementation, we want to weakly verify
// the return type until the type is properly exported.
if (!validator.isNonNullObject(result) ||
typeof result.expires_in !== 'number' ||
typeof result.access_token !== 'string') {
throw new error_1.FirebaseAppError(error_1.AppErrorCodes.INVALID_CREDENTIAL, "Invalid access token generated: \"" + JSON.stringify(result) + "\". Valid access " +
'tokens must be an object with the "expires_in" (number) and "access_token" ' +
'(string) properties.');
}
var token = {
accessToken: result.access_token,
expirationTime: Date.now() + (result.expires_in * 1000),
};
if (!_this.cachedToken_
|| _this.cachedToken_.accessToken !== token.accessToken
|| _this.cachedToken_.expirationTime !== token.expirationTime) {
// Update the cache before firing listeners. Listeners may directly query the
// cached token state.
_this.cachedToken_ = token;
_this.tokenListeners_.forEach(function (listener) {
listener(token.accessToken);
});
}
return token;
})
.catch(function (error) {
var errorMessage = (typeof error === 'string') ? error : error.message;
errorMessage = 'Credential implementation provided to initializeApp() via the ' +
'"credential" property failed to fetch a valid Google OAuth2 access token with the ' +
("following error: \"" + errorMessage + "\".");
if (errorMessage.indexOf('invalid_grant') !== -1) {
errorMessage += ' There are two likely causes: (1) your server time is not properly ' +
'synced or (2) your certificate key file has been revoked. To solve (1), re-sync the ' +
'time on your server. To solve (2), make sure the key ID for your key file is still ' +
'present at https://console.firebase.google.com/iam-admin/serviceaccounts/project. If ' +
'not, generate a new key file at ' +
'https://console.firebase.google.com/project/_/settings/serviceaccounts/adminsdk.';
}
throw new error_1.FirebaseAppError(error_1.AppErrorCodes.INVALID_CREDENTIAL, errorMessage);
});
};
FirebaseAppInternals.prototype.shouldRefresh = function () {
return !this.cachedToken_ || (this.cachedToken_.expirationTime - Date.now()) <= TOKEN_EXPIRY_THRESHOLD_MILLIS;
};
/**
* Adds a listener that is called each time a token changes.
*
* @param {function(string)} listener The listener that will be called with each new token.
* @param listener The listener that will be called with each new token.
*/

@@ -144,3 +108,3 @@ FirebaseAppInternals.prototype.addAuthTokenListener = function (listener) {

*
* @param {function(string)} listener The listener to remove.
* @param listener The listener to remove.
*/

@@ -150,31 +114,2 @@ FirebaseAppInternals.prototype.removeAuthTokenListener = function (listener) {

};
/**
* Deletes the FirebaseAppInternals instance.
*/
FirebaseAppInternals.prototype.delete = function () {
this.isDeleted_ = true;
// Clear the token refresh timeout so it doesn't keep the Node.js process alive.
clearTimeout(this.tokenRefreshTimeout_);
};
/**
* Establishes timeout to refresh the Google OAuth2 access token used by the SDK.
*
* @param {number} delayInMilliseconds The delay to use for the timeout.
* @param {number} numRetries The number of times to retry fetching a new token if the prior fetch
* failed.
*/
FirebaseAppInternals.prototype.setTokenRefreshTimeout = function (delayInMilliseconds, numRetries) {
var _this = this;
this.tokenRefreshTimeout_ = setTimeout(function () {
_this.getToken(/* forceRefresh */ true)
.catch(function () {
// Ignore the error since this might just be an intermittent failure. If we really cannot
// refresh the token, an error will be logged once the existing token expires and we try
// to fetch a fresh one.
if (numRetries > 0) {
_this.setTokenRefreshTimeout(60 * 1000, numRetries - 1);
}
});
}, delayInMilliseconds);
};
return FirebaseAppInternals;

@@ -212,5 +147,14 @@ }());

/**
* Returns the AppCheck service instance associated with this app.
*
* @returns The AppCheck service instance of this app.
*/
FirebaseApp.prototype.appCheck = function () {
var fn = require('../app-check/index').getAppCheck;
return fn(this);
};
/**
* Returns the Auth service instance associated with this app.
*
* @return The Auth service instance of this app.
* @returns The Auth service instance of this app.
*/

@@ -224,3 +168,3 @@ FirebaseApp.prototype.auth = function () {

*
* @return The Database service instance of this app.
* @returns The Database service instance of this app.
*/

@@ -234,3 +178,3 @@ FirebaseApp.prototype.database = function (url) {

*
* @return The Messaging service instance of this app.
* @returns The Messaging service instance of this app.
*/

@@ -244,3 +188,3 @@ FirebaseApp.prototype.messaging = function () {

*
* @return The Storage service instance of this app.
* @returns The Storage service instance of this app.
*/

@@ -258,3 +202,3 @@ FirebaseApp.prototype.storage = function () {

*
* @return The InstanceId service instance of this app.
* @returns The InstanceId service instance of this app.
*/

@@ -268,3 +212,3 @@ FirebaseApp.prototype.instanceId = function () {

*
* @return The Machine Learning service instance of this app
* @returns The Machine Learning service instance of this app
*/

@@ -278,3 +222,3 @@ FirebaseApp.prototype.machineLearning = function () {

*
* @return The ProjectManagement service instance of this app.
* @returns The ProjectManagement service instance of this app.
*/

@@ -288,3 +232,3 @@ FirebaseApp.prototype.projectManagement = function () {

*
* @return The SecurityRules service instance of this app.
* @returns The SecurityRules service instance of this app.
*/

@@ -298,3 +242,3 @@ FirebaseApp.prototype.securityRules = function () {

*
* @return The RemoteConfig service instance of this app.
* @returns The RemoteConfig service instance of this app.
*/

@@ -309,3 +253,3 @@ FirebaseApp.prototype.remoteConfig = function () {

*
* @return The name of the FirebaseApp instance.
* @returns The name of the FirebaseApp instance.
*/

@@ -323,3 +267,3 @@ get: function () {

*
* @return The options for the FirebaseApp instance.
* @returns The options for the FirebaseApp instance.
*/

@@ -343,3 +287,3 @@ get: function () {

*
* @return An empty Promise fulfilled once the FirebaseApp instance is deleted.
* @returns An empty Promise fulfilled once the FirebaseApp instance is deleted.
*/

@@ -350,3 +294,2 @@ FirebaseApp.prototype.delete = function () {

this.firebaseInternals_.removeApp(this.name_);
this.INTERNAL.delete();
return Promise.all(Object.keys(this.services_).map(function (serviceName) {

@@ -353,0 +296,0 @@ var service = _this.services_[serviceName];

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -18,5 +18,6 @@ * @license

*/
import { app, auth, messaging, machineLearning, storage, firestore, database, instanceId, projectManagement, securityRules, remoteConfig, AppOptions } from '../firebase-namespace-api';
import { app, appCheck, auth, messaging, machineLearning, storage, firestore, database, instanceId, projectManagement, securityRules, remoteConfig, AppOptions } from '../firebase-namespace-api';
import { cert, refreshToken, applicationDefault } from './credential-factory';
import App = app.App;
import AppCheck = appCheck.AppCheck;
import Auth = auth.Auth;

@@ -62,3 +63,3 @@ import Database = database.Database;

*
* @return A new App instance.
* @returns A new App instance.
*/

@@ -71,3 +72,3 @@ initializeApp(options?: AppOptions, appName?: string): App;

* @param appName Optional name of the FirebaseApp instance to return.
* @return The App instance which has the provided name.
* @returns The App instance which has the provided name.
*/

@@ -151,2 +152,7 @@ app(appName?: string): App;

/**
* Gets the `AppCheck` service namespace. The returned namespace can be used to get the
* `AppCheck` service for the default app or an explicitly specified app.
*/
get appCheck(): FirebaseServiceNamespace<AppCheck>;
/**
* Initializes the FirebaseApp instance.

@@ -160,3 +166,3 @@ *

*
* @return A new FirebaseApp instance.
* @returns A new FirebaseApp instance.
*/

@@ -169,3 +175,3 @@ initializeApp(options?: AppOptions, appName?: string): App;

* @param appName Optional name of the FirebaseApp instance to return.
* @return The FirebaseApp instance which has the provided name.
* @returns The FirebaseApp instance which has the provided name.
*/

@@ -172,0 +178,0 @@ app(appName?: string): App;

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -52,3 +52,3 @@ /*!

*
* @return A new App instance.
* @returns A new App instance.
*/

@@ -87,3 +87,3 @@ FirebaseNamespaceInternals.prototype.initializeApp = function (options, appName) {

* @param appName Optional name of the FirebaseApp instance to return.
* @return The App instance which has the provided name.
* @returns The App instance which has the provided name.
*/

@@ -344,2 +344,18 @@ FirebaseNamespaceInternals.prototype.app = function (appName) {

});
Object.defineProperty(FirebaseNamespace.prototype, "appCheck", {
/**
* Gets the `AppCheck` service namespace. The returned namespace can be used to get the
* `AppCheck` service for the default app or an explicitly specified app.
*/
get: function () {
var _this = this;
var fn = function (app) {
return _this.ensureApp(app).appCheck();
};
var appCheck = require('../app-check/app-check').AppCheck;
return Object.assign(fn, { AppCheck: appCheck });
},
enumerable: false,
configurable: true
});
// TODO: Change the return types to app.App in the following methods.

@@ -355,3 +371,3 @@ /**

*
* @return A new FirebaseApp instance.
* @returns A new FirebaseApp instance.
*/

@@ -366,3 +382,3 @@ FirebaseNamespace.prototype.initializeApp = function (options, appName) {

* @param appName Optional name of the FirebaseApp instance to return.
* @return The FirebaseApp instance which has the provided name.
* @returns The FirebaseApp instance which has the provided name.
*/

@@ -369,0 +385,0 @@ FirebaseNamespace.prototype.app = function (appName) {

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -18,2 +18,7 @@ * @license

*/
/**
* Firebase App and SDK initialization.
*
* @packageDocumentation
*/
export { App, AppOptions, FirebaseArrayIndexError, FirebaseError } from './core';

@@ -20,0 +25,0 @@ export { initializeApp, getApp, getApps, deleteApp } from './lifecycle';

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -3,0 +3,0 @@ * @license

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -3,0 +3,0 @@ * Copyright 2018 Google Inc.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -96,3 +96,3 @@ /*!

*
* @return {EmailActionCodeRequest} The constructed EmailActionCodeRequest request.
* @returns The constructed EmailActionCodeRequest request.
*/

@@ -99,0 +99,0 @@ ActionCodeSettingsBuilder.prototype.buildRequest = function () {

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -34,4 +34,4 @@ * @license

*
* @param {string} projectId The resource project ID.
* @param {string} version The endpoint API version.
* @param projectId The resource project ID.
* @param version The endpoint API version.
* @constructor

@@ -43,6 +43,6 @@ */

*
* @param {string=} api The backend API name.
* @param {object=} params The optional additional parameters to substitute in the
* @param api The backend API name.
* @param params The optional additional parameters to substitute in the
* URL path.
* @return {Promise<string>} The corresponding resource URL.
* @returns The corresponding resource URL.
*/

@@ -70,3 +70,3 @@ getUrl(api?: string, params?: object): Promise<string>;

*
* @param {FirebaseApp} app The app used to fetch access tokens to sign API requests.
* @param app The app used to fetch access tokens to sign API requests.
* @constructor.

@@ -76,7 +76,7 @@ */

/**
* @return {AuthResourceUrlBuilder} A new Auth user management resource URL builder instance.
* @returns A new Auth user management resource URL builder instance.
*/
protected newAuthUrlBuilder(): AuthResourceUrlBuilder;
/**
* @return {AuthResourceUrlBuilder} A new project config resource URL builder instance.
* @returns A new project config resource URL builder instance.
*/

@@ -87,4 +87,4 @@ protected newProjectConfigUrlBuilder(): AuthResourceUrlBuilder;

*
* @param {string} tenantId The tenant identifier of the tenant to lookup.
* @return {Promise<TenantServerResponse>} A promise that resolves with the tenant information.
* @param tenantId The tenant identifier of the tenant to lookup.
* @returns A promise that resolves with the tenant information.
*/

@@ -96,8 +96,8 @@ getTenant(tenantId: string): Promise<TenantServerResponse>;

*
* @param {number=} maxResults The page size, 1000 if undefined. This is also the maximum
* @param maxResults The page size, 1000 if undefined. This is also the maximum
* allowed limit.
* @param {string=} pageToken The next page token. If not specified, returns tenants starting
* @param pageToken The next page token. If not specified, returns tenants starting
* without any offset. Tenants are returned in the order they were created from oldest to
* newest, relative to the page token offset.
* @return {Promise<object>} A promise that resolves with the current batch of downloaded
* @returns A promise that resolves with the current batch of downloaded
* tenants and the next page token if available. For the last page, an empty list of tenants

@@ -113,4 +113,4 @@ * and no page token are returned.

*
* @param {string} tenantId The identifier of the tenant to delete.
* @return {Promise<void>} A promise that resolves when the tenant is deleted.
* @param tenantId The identifier of the tenant to delete.
* @returns A promise that resolves when the tenant is deleted.
*/

@@ -121,4 +121,4 @@ deleteTenant(tenantId: string): Promise<void>;

*
* @param {TenantOptions} tenantOptions The properties to set on the new tenant to be created.
* @return {Promise<TenantServerResponse>} A promise that resolves with the newly created tenant object.
* @param tenantOptions The properties to set on the new tenant to be created.
* @returns A promise that resolves with the newly created tenant object.
*/

@@ -129,5 +129,5 @@ createTenant(tenantOptions: CreateTenantRequest): Promise<TenantServerResponse>;

*
* @param {string} tenantId The tenant identifier of the tenant to update.
* @param {TenantOptions} tenantOptions The properties to update on the existing tenant.
* @return {Promise<TenantServerResponse>} A promise that resolves with the modified tenant object.
* @param tenantId The tenant identifier of the tenant to update.
* @param tenantOptions The properties to update on the existing tenant.
* @returns A promise that resolves with the modified tenant object.
*/

@@ -147,4 +147,4 @@ updateTenant(tenantId: string, tenantOptions: UpdateTenantRequest): Promise<TenantServerResponse>;

*
* @param {FirebaseApp} app The app used to fetch access tokens to sign API requests.
* @param {string} tenantId The request handler's tenant ID.
* @param app The app used to fetch access tokens to sign API requests.
* @param tenantId The request handler's tenant ID.
* @constructor

@@ -154,7 +154,7 @@ */

/**
* @return {AuthResourceUrlBuilder} A new Auth user management resource URL builder instance.
* @returns A new Auth user management resource URL builder instance.
*/
protected newAuthUrlBuilder(): AuthResourceUrlBuilder;
/**
* @return {AuthResourceUrlBuilder} A new project config resource URL builder instance.
* @returns A new project config resource URL builder instance.
*/

@@ -171,6 +171,6 @@ protected newProjectConfigUrlBuilder(): AuthResourceUrlBuilder;

*
* @param {UserImportRecord[]} users The list of user records to import to Firebase Auth.
* @param {UserImportOptions=} options The user import options, required when the users provided
* @param users The list of user records to import to Firebase Auth.
* @param options The user import options, required when the users provided
* include password credentials.
* @return {Promise<UserImportResult>} A promise that resolves when the operation completes
* @returns A promise that resolves when the operation completes
* with the result of the import. This includes the number of successful imports, the number

@@ -184,8 +184,4 @@ * of failed uploads and their corresponding errors.

* calls and also produce unsigned tokens.
*
* This alone does <b>NOT<b> short-circuit ID Token verification.
* For security reasons that must be explicitly disabled through
* setJwtVerificationEnabled(false);
*/
export declare function useEmulator(): boolean;
export {};

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -18,6 +18,6 @@ * Copyright 2018 Google Inc.

/**
* Interface representing base properties of a user enrolled second factor for a
* Interface representing base properties of a user-enrolled second factor for a
* `CreateRequest`.
*/
export interface CreateMultiFactorInfoRequest {
export interface BaseCreateMultiFactorInfoRequest {
/**

@@ -33,6 +33,6 @@ * The optional display name for an enrolled second factor.

/**
* Interface representing a phone specific user enrolled second factor for a
* Interface representing a phone specific user-enrolled second factor for a
* `CreateRequest`.
*/
export interface CreatePhoneMultiFactorInfoRequest extends CreateMultiFactorInfoRequest {
export interface CreatePhoneMultiFactorInfoRequest extends BaseCreateMultiFactorInfoRequest {
/**

@@ -44,6 +44,11 @@ * The phone number associated with a phone second factor.

/**
* Interface representing common properties of a user enrolled second factor
* Type representing the properties of a user-enrolled second factor
* for a `CreateRequest`.
*/
export declare type CreateMultiFactorInfoRequest = CreatePhoneMultiFactorInfoRequest;
/**
* Interface representing common properties of a user-enrolled second factor
* for an `UpdateRequest`.
*/
export interface UpdateMultiFactorInfoRequest {
export interface BaseUpdateMultiFactorInfoRequest {
/**

@@ -68,6 +73,6 @@ * The ID of the enrolled second factor. This ID is unique to the user. When not provided,

/**
* Interface representing a phone specific user enrolled second factor
* Interface representing a phone specific user-enrolled second factor
* for an `UpdateRequest`.
*/
export interface UpdatePhoneMultiFactorInfoRequest extends UpdateMultiFactorInfoRequest {
export interface UpdatePhoneMultiFactorInfoRequest extends BaseUpdateMultiFactorInfoRequest {
/**

@@ -79,2 +84,7 @@ * The phone number associated with a phone second factor.

/**
* Type representing the properties of a user-enrolled second factor
* for an `UpdateRequest`.
*/
export declare type UpdateMultiFactorInfoRequest = UpdatePhoneMultiFactorInfoRequest;
/**
* The multi-factor related user settings for create operations.

@@ -136,4 +146,51 @@ */

multiFactor?: MultiFactorUpdateSettings;
/**
* Links this user to the specified provider.
*
* Linking a provider to an existing user account does not invalidate the
* refresh token of that account. In other words, the existing account
* would continue to be able to access resources, despite not having used
* the newly linked provider to log in. If you wish to force the user to
* authenticate with this new provider, you need to (a) revoke their
* refresh token (see
* https://firebase.google.com/docs/auth/admin/manage-sessions#revoke_refresh_tokens),
* and (b) ensure no other authentication methods are present on this
* account.
*/
providerToLink?: UserProvider;
/**
* Unlinks this user from the specified providers.
*/
providersToUnlink?: string[];
}
/**
* Represents a user identity provider that can be associated with a Firebase user.
*/
export interface UserProvider {
/**
* The user identifier for the linked provider.
*/
uid?: string;
/**
* The display name for the linked provider.
*/
displayName?: string;
/**
* The email for the linked provider.
*/
email?: string;
/**
* The phone number for the linked provider.
*/
phoneNumber?: string;
/**
* The photo URL for the linked provider.
*/
photoURL?: string;
/**
* The linked provider ID (for example, "google.com" for the Google provider).
*/
providerId?: string;
}
/**
* Interface representing the properties to set on a new user record to be

@@ -258,2 +315,11 @@ * created.

issuer?: string;
/**
* The OIDC provider's client secret to enable OIDC code flow.
* If not provided, the existing configuration's value is not modified.
*/
clientSecret?: string;
/**
* The OIDC provider's response object for OAuth authorization flow.
*/
responseType?: OAuthResponseType;
}

@@ -305,2 +371,4 @@ export declare type UpdateAuthProviderRequest = SAMLUpdateAuthProviderRequest | OIDCUpdateAuthProviderRequest;

enabled?: boolean;
clientSecret?: string;
responseType?: OAuthResponseType;
[key: string]: any;

@@ -315,2 +383,4 @@ }

enabled?: boolean;
clientSecret?: string;
responseType?: OAuthResponseType;
}

@@ -366,3 +436,3 @@ /** The server side email configuration request interface. */

private static validate;
/** @return The plain object representation of the multi-factor config instance. */
/** @returns The plain object representation of the multi-factor config instance. */
toJSON(): object;

@@ -394,3 +464,3 @@ }

*/
export interface AuthProviderConfig {
export interface BaseAuthProviderConfig {
/**

@@ -419,3 +489,3 @@ * The provider ID defined by the developer.

*/
export interface SAMLAuthProviderConfig extends AuthProviderConfig {
export interface SAMLAuthProviderConfig extends BaseAuthProviderConfig {
/**

@@ -455,2 +525,21 @@ * The SAML IdP entity identifier.

/**
* The interface representing OIDC provider's response object for OAuth
* authorization flow.
* One of the following settings is required:
* <ul>
* <li>Set <code>code</code> to <code>true</code> for the code flow.</li>
* <li>Set <code>idToken</code> to <code>true</code> for the ID token flow.</li>
* </ul>
*/
export interface OAuthResponseType {
/**
* Whether ID token is returned from IdP's authorization endpoint.
*/
idToken?: boolean;
/**
* Whether authorization code is returned from IdP's authorization endpoint.
*/
code?: boolean;
}
/**
* The [OIDC](https://openid.net/specs/openid-connect-core-1_0-final.html) Auth

@@ -460,3 +549,3 @@ * provider configuration interface. An OIDC provider can be created via

*/
export interface OIDCAuthProviderConfig extends AuthProviderConfig {
export interface OIDCAuthProviderConfig extends BaseAuthProviderConfig {
/**

@@ -486,3 +575,16 @@ * This is the required client ID used to confirm the audience of an OIDC

issuer: string;
/**
* The OIDC provider's client secret to enable OIDC code flow.
*/
clientSecret?: string;
/**
* The OIDC provider's response object for OAuth authorization flow.
*/
responseType?: OAuthResponseType;
}
/**
* The Auth provider configuration type.
* {@link auth.Auth.createProviderConfig `createProviderConfig()`}.
*/
export declare type AuthProviderConfig = SAMLAuthProviderConfig | OIDCAuthProviderConfig;
export {};

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -68,3 +68,3 @@ /*!

* @param options The options object to convert to a server request.
* @return The resulting server request.
* @returns The resulting server request.
* @internal

@@ -129,3 +129,3 @@ */

};
/** @return The plain object representation of the multi-factor config instance. */
/** @returns The plain object representation of the multi-factor config instance. */
MultiFactorAuthConfig.prototype.toJSON = function () {

@@ -174,3 +174,3 @@ return {

*
* @param {any} response The server side response used to initialize the
* @param response The server side response used to initialize the
* EmailSignInConfig object.

@@ -190,4 +190,4 @@ * @constructor

*
* @param {any} options The options object to convert to a server request.
* @return {EmailSignInConfigServerRequest} The resulting server request.
* @param options The options object to convert to a server request.
* @returns The resulting server request.
* @internal

@@ -209,3 +209,3 @@ */

*
* @param {any} options The options object to validate.
* @param options The options object to validate.
*/

@@ -237,3 +237,3 @@ EmailSignInConfig.validate = function (options) {

};
/** @return {object} The plain object representation of the email sign-in config. */
/** @returns The plain object representation of the email sign-in config. */
EmailSignInConfig.prototype.toJSON = function () {

@@ -303,5 +303,5 @@ return {

*
* @param {SAMLAuthProviderRequest} options The options object to convert to a server request.
* @param {boolean=} ignoreMissingFields Whether to ignore missing fields.
* @return {?SAMLConfigServerRequest} The resulting server request or null if not valid.
* @param options The options object to convert to a server request.
* @param ignoreMissingFields Whether to ignore missing fields.
* @returns The resulting server request or null if not valid.
*/

@@ -347,4 +347,4 @@ SAMLConfig.buildServerRequest = function (options, ignoreMissingFields) {

*
* @param {string} resourceName The server side resource name.
* @return {?string} The provider ID corresponding to the resource, null otherwise.
* @param resourceName The server side resource name.
* @returns The provider ID corresponding to the resource, null otherwise.
*/

@@ -360,4 +360,4 @@ SAMLConfig.getProviderIdFromResourceName = function (resourceName) {

/**
* @param {any} providerId The provider ID to check.
* @return {boolean} Whether the provider ID corresponds to a SAML provider.
* @param providerId The provider ID to check.
* @returns Whether the provider ID corresponds to a SAML provider.
*/

@@ -370,4 +370,4 @@ SAMLConfig.isProviderId = function (providerId) {

*
* @param {SAMLAuthProviderRequest} options The options object to validate.
* @param {boolean=} ignoreMissingFields Whether to ignore missing fields.
* @param options The options object to validate.
* @param ignoreMissingFields Whether to ignore missing fields.
*/

@@ -445,3 +445,3 @@ SAMLConfig.validate = function (options, ignoreMissingFields) {

};
/** @return The plain object representation of the SAMLConfig. */
/** @returns The plain object representation of the SAMLConfig. */
SAMLConfig.prototype.toJSON = function () {

@@ -495,2 +495,8 @@ return {

this.displayName = response.displayName;
if (typeof response.clientSecret !== 'undefined') {
this.clientSecret = response.clientSecret;
}
if (typeof response.responseType !== 'undefined') {
this.responseType = response.responseType;
}
}

@@ -505,3 +511,3 @@ /**

* @param ignoreMissingFields Whether to ignore missing fields.
* @return The resulting server request or null if not valid.
* @returns The resulting server request or null if not valid.
*/

@@ -522,2 +528,8 @@ OIDCConfig.buildServerRequest = function (options, ignoreMissingFields) {

request.clientId = options.clientId;
if (typeof options.clientSecret !== 'undefined') {
request.clientSecret = options.clientSecret;
}
if (typeof options.responseType !== 'undefined') {
request.responseType = options.responseType;
}
return request;

@@ -528,4 +540,4 @@ };

*
* @param {string} resourceName The server side resource name
* @return {?string} The provider ID corresponding to the resource, null otherwise.
* @param resourceName The server side resource name
* @returns The provider ID corresponding to the resource, null otherwise.
*/

@@ -541,4 +553,4 @@ OIDCConfig.getProviderIdFromResourceName = function (resourceName) {

/**
* @param {any} providerId The provider ID to check.
* @return {boolean} Whether the provider ID corresponds to an OIDC provider.
* @param providerId The provider ID to check.
* @returns Whether the provider ID corresponds to an OIDC provider.
*/

@@ -562,3 +574,9 @@ OIDCConfig.isProviderId = function (providerId) {

issuer: true,
clientSecret: true,
responseType: true,
};
var validResponseTypes = {
idToken: true,
code: true,
};
if (!validator.isNonNullObject(options)) {

@@ -598,4 +616,35 @@ throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_CONFIG, '"OIDCAuthProviderConfig" must be a valid non-null object.');

}
if (typeof options.clientSecret !== 'undefined' &&
!validator.isNonEmptyString(options.clientSecret)) {
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_CONFIG, '"OIDCAuthProviderConfig.clientSecret" must be a valid string.');
}
if (validator.isNonNullObject(options.responseType) && typeof options.responseType !== 'undefined') {
Object.keys(options.responseType).forEach(function (key) {
if (!(key in validResponseTypes)) {
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_CONFIG, "\"" + key + "\" is not a valid OAuthResponseType parameter.");
}
});
var idToken = options.responseType.idToken;
if (typeof idToken !== 'undefined' && !validator.isBoolean(idToken)) {
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, '"OIDCAuthProviderConfig.responseType.idToken" must be a boolean.');
}
var code = options.responseType.code;
if (typeof code !== 'undefined') {
if (!validator.isBoolean(code)) {
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, '"OIDCAuthProviderConfig.responseType.code" must be a boolean.');
}
// If code flow is enabled, client secret must be provided.
if (code && typeof options.clientSecret === 'undefined') {
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.MISSING_OAUTH_CLIENT_SECRET, 'The OAuth configuration client secret is required to enable OIDC code flow.');
}
}
var allKeys = Object.keys(options.responseType).length;
var enabledCount = Object.values(options.responseType).filter(Boolean).length;
// Only one of OAuth response types can be set to true.
if (allKeys > 1 && enabledCount != 1) {
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_OAUTH_RESPONSETYPE, 'Only exactly one OAuth responseType should be set to true.');
}
}
};
/** @return {OIDCAuthProviderConfig} The plain object representation of the OIDCConfig. */
/** @returns The plain object representation of the OIDCConfig. */
OIDCConfig.prototype.toJSON = function () {

@@ -608,2 +657,4 @@ return {

clientId: this.clientId,
clientSecret: deep_copy_1.deepCopy(this.clientSecret),
responseType: deep_copy_1.deepCopy(this.responseType),
};

@@ -610,0 +661,0 @@ };

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -51,53 +51,206 @@ * Copyright 2021 Google Inc.

export declare namespace auth {
/**
* Type alias to {@link firebase-admin.auth#ActionCodeSettings}.
*/
type ActionCodeSettings = TActionCodeSettings;
/**
* Type alias to {@link firebase-admin.auth#Auth}.
*/
type Auth = TAuth;
/**
* Type alias to {@link firebase-admin.auth#AuthFactorType}.
*/
type AuthFactorType = TAuthFactorType;
/**
* Type alias to {@link firebase-admin.auth#AuthProviderConfig}.
*/
type AuthProviderConfig = TAuthProviderConfig;
/**
* Type alias to {@link firebase-admin.auth#AuthProviderConfigFilter}.
*/
type AuthProviderConfigFilter = TAuthProviderConfigFilter;
/**
* Type alias to {@link firebase-admin.auth#BaseAuth}.
*/
type BaseAuth = TBaseAuth;
/**
* Type alias to {@link firebase-admin.auth#CreateMultiFactorInfoRequest}.
*/
type CreateMultiFactorInfoRequest = TCreateMultiFactorInfoRequest;
/**
* Type alias to {@link firebase-admin.auth#CreatePhoneMultiFactorInfoRequest}.
*/
type CreatePhoneMultiFactorInfoRequest = TCreatePhoneMultiFactorInfoRequest;
/**
* Type alias to {@link firebase-admin.auth#CreateRequest}.
*/
type CreateRequest = TCreateRequest;
/**
* Type alias to {@link firebase-admin.auth#CreateTenantRequest}.
*/
type CreateTenantRequest = TCreateTenantRequest;
/**
* Type alias to {@link firebase-admin.auth#DecodedIdToken}.
*/
type DecodedIdToken = TDecodedIdToken;
/**
* Type alias to {@link firebase-admin.auth#DeleteUsersResult}.
*/
type DeleteUsersResult = TDeleteUsersResult;
/**
* Type alias to {@link firebase-admin.auth#EmailIdentifier}.
*/
type EmailIdentifier = TEmailIdentifier;
/**
* Type alias to {@link firebase-admin.auth#EmailSignInProviderConfig}.
*/
type EmailSignInProviderConfig = TEmailSignInProviderConfig;
/**
* Type alias to {@link firebase-admin.auth#GetUsersResult}.
*/
type GetUsersResult = TGetUsersResult;
/**
* Type alias to {@link firebase-admin.auth#HashAlgorithmType}.
*/
type HashAlgorithmType = THashAlgorithmType;
/**
* Type alias to {@link firebase-admin.auth#ListProviderConfigResults}.
*/
type ListProviderConfigResults = TListProviderConfigResults;
/**
* Type alias to {@link firebase-admin.auth#ListTenantsResult}.
*/
type ListTenantsResult = TListTenantsResult;
/**
* Type alias to {@link firebase-admin.auth#ListUsersResult}.
*/
type ListUsersResult = TListUsersResult;
/**
* Type alias to {@link firebase-admin.auth#MultiFactorCreateSettings}.
*/
type MultiFactorCreateSettings = TMultiFactorCreateSettings;
/**
* Type alias to {@link firebase-admin.auth#MultiFactorConfig}.
*/
type MultiFactorConfig = TMultiFactorConfig;
/**
* Type alias to {@link firebase-admin.auth#MultiFactorConfigState}.
*/
type MultiFactorConfigState = TMultiFactorConfigState;
/**
* Type alias to {@link firebase-admin.auth#MultiFactorInfo}.
*/
type MultiFactorInfo = TMultiFactorInfo;
/**
* Type alias to {@link firebase-admin.auth#MultiFactorUpdateSettings}.
*/
type MultiFactorUpdateSettings = TMultiFactorUpdateSettings;
/**
* Type alias to {@link firebase-admin.auth#MultiFactorSettings}.
*/
type MultiFactorSettings = TMultiFactorSettings;
/**
* Type alias to {@link firebase-admin.auth#OIDCAuthProviderConfig}.
*/
type OIDCAuthProviderConfig = TOIDCAuthProviderConfig;
/**
* Type alias to {@link firebase-admin.auth#OIDCUpdateAuthProviderRequest}.
*/
type OIDCUpdateAuthProviderRequest = TOIDCUpdateAuthProviderRequest;
/**
* Type alias to {@link firebase-admin.auth#PhoneIdentifier}.
*/
type PhoneIdentifier = TPhoneIdentifier;
/**
* Type alias to {@link firebase-admin.auth#PhoneMultiFactorInfo}.
*/
type PhoneMultiFactorInfo = TPhoneMultiFactorInfo;
/**
* Type alias to {@link firebase-admin.auth#ProviderIdentifier}.
*/
type ProviderIdentifier = TProviderIdentifier;
/**
* Type alias to {@link firebase-admin.auth#SAMLAuthProviderConfig}.
*/
type SAMLAuthProviderConfig = TSAMLAuthProviderConfig;
/**
* Type alias to {@link firebase-admin.auth#SAMLUpdateAuthProviderRequest}.
*/
type SAMLUpdateAuthProviderRequest = TSAMLUpdateAuthProviderRequest;
/**
* Type alias to {@link firebase-admin.auth#SessionCookieOptions}.
*/
type SessionCookieOptions = TSessionCookieOptions;
/**
* Type alias to {@link firebase-admin.auth#Tenant}.
*/
type Tenant = TTenant;
/**
* Type alias to {@link firebase-admin.auth#TenantAwareAuth}.
*/
type TenantAwareAuth = TTenantAwareAuth;
/**
* Type alias to {@link firebase-admin.auth#TenantManager}.
*/
type TenantManager = TTenantManager;
/**
* Type alias to {@link firebase-admin.auth#UidIdentifier}.
*/
type UidIdentifier = TUidIdentifier;
/**
* Type alias to {@link firebase-admin.auth#UpdateAuthProviderRequest}.
*/
type UpdateAuthProviderRequest = TUpdateAuthProviderRequest;
/**
* Type alias to {@link firebase-admin.auth#UpdateMultiFactorInfoRequest}.
*/
type UpdateMultiFactorInfoRequest = TUpdateMultiFactorInfoRequest;
/**
* Type alias to {@link firebase-admin.auth#UpdatePhoneMultiFactorInfoRequest}.
*/
type UpdatePhoneMultiFactorInfoRequest = TUpdatePhoneMultiFactorInfoRequest;
/**
* Type alias to {@link firebase-admin.auth#UpdateRequest}.
*/
type UpdateRequest = TUpdateRequest;
/**
* Type alias to {@link firebase-admin.auth#UpdateTenantRequest}.
*/
type UpdateTenantRequest = TUpdateTenantRequest;
/**
* Type alias to {@link firebase-admin.auth#UserIdentifier}.
*/
type UserIdentifier = TUserIdentifier;
/**
* Type alias to {@link firebase-admin.auth#UserImportOptions}.
*/
type UserImportOptions = TUserImportOptions;
/**
* Type alias to {@link firebase-admin.auth#UserImportRecord}.
*/
type UserImportRecord = TUserImportRecord;
/**
* Type alias to {@link firebase-admin.auth#UserImportResult}.
*/
type UserImportResult = TUserImportResult;
/**
* Type alias to {@link firebase-admin.auth#UserInfo}.
*/
type UserInfo = TUserInfo;
/**
* Type alias to {@link firebase-admin.auth#UserMetadata}.
*/
type UserMetadata = TUserMetadata;
/**
* Type alias to {@link firebase-admin.auth#UserMetadataRequest}.
*/
type UserMetadataRequest = TUserMetadataRequest;
/**
* Type alias to {@link firebase-admin.auth#UserProviderRequest}.
*/
type UserProviderRequest = TUserProviderRequest;
/**
* Type alias to {@link firebase-admin.auth#UserRecord}.
*/
type UserRecord = TUserRecord;
}

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -31,9 +31,11 @@ * @license

*
* @return The app associated with this Auth instance.
* @returns The app associated with this Auth instance.
*/
get app(): App;
/**
* @return The tenant manager instance associated with the current project.
* Returns the tenant manager instance associated with the current project.
*
* @returns The tenant manager instance associated with the current project.
*/
tenantManager(): TenantManager;
}

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -58,3 +58,3 @@ /*!

*
* @return The app associated with this Auth instance.
* @returns The app associated with this Auth instance.
*/

@@ -68,3 +68,5 @@ get: function () {

/**
* @return The tenant manager instance associated with the current project.
* Returns the tenant manager instance associated with the current project.
*
* @returns The tenant manager instance associated with the current project.
*/

@@ -71,0 +73,0 @@ Auth.prototype.tenantManager = function () {

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -24,3 +24,3 @@ * Copyright 2021 Google Inc.

import { ActionCodeSettings } from './action-code-settings-builder';
/** Represents the result of the {@link auth.Auth.getUsers} API. */
/** Represents the result of the {@link BaseAuth.getUsers} API. */
export interface GetUsersResult {

@@ -53,4 +53,3 @@ /**

/**
* Represents the result of the
* {@link auth.Auth.deleteUsers `deleteUsers()`}
* Represents the result of the {@link BaseAuth.deleteUsers}.
* API.

@@ -72,3 +71,3 @@ */

* were encountered during the deletion. Length of this list is equal to
* the return value of [`failureCount`](#failureCount).
* the return value of {@link DeleteUsersResult.failureCount}.
*/

@@ -79,3 +78,3 @@ errors: FirebaseArrayIndexError[];

* Interface representing the session cookie options needed for the
* {@link auth.Auth.createSessionCookie `createSessionCookie()`} method.
* {@link BaseAuth.createSessionCookie} method.
*/

@@ -99,4 +98,4 @@ export interface SessionCookieOptions {

*
* See [Create Custom Tokens](/docs/auth/admin/create-custom-tokens) for code
* samples and detailed documentation.
* See {@link https://firebase.google.com/docs/auth/admin/create-custom-tokens | Create Custom Tokens}
* for code samples and detailed documentation.
*

@@ -107,3 +106,3 @@ * @param uid The `uid` to use as the custom token's subject.

*
* @return A promise fulfilled with a custom token for the
* @returns A promise fulfilled with a custom token for the
* provided `uid` and payload.

@@ -119,4 +118,4 @@ */

*
* See [Verify ID Tokens](/docs/auth/admin/verify-id-tokens) for code samples
* and detailed documentation.
* See {@link https://firebase.google.com/docs/auth/admin/verify-id-tokens | Verify ID Tokens}
* for code samples and detailed documentation.
*

@@ -129,3 +128,3 @@ * @param idToken The ID token to verify.

*
* @return A promise fulfilled with the
* @returns A promise fulfilled with the
* token's decoded claims if the ID token is valid; otherwise, a rejected

@@ -138,3 +137,3 @@ * promise.

*
* See [Retrieve user data](/docs/auth/admin/manage-users#retrieve_user_data)
* See {@link https://firebase.google.com/docs/auth/admin/manage-users#retrieve_user_data | Retrieve user data}
* for code samples and detailed documentation.

@@ -144,3 +143,3 @@ *

*
* @return A promise fulfilled with the user
* @returns A promise fulfilled with the user
* data corresponding to the provided `uid`.

@@ -152,3 +151,3 @@ */

*
* See [Retrieve user data](/docs/auth/admin/manage-users#retrieve_user_data)
* See {@link https://firebase.google.com/docs/auth/admin/manage-users#retrieve_user_data | Retrieve user data}
* for code samples and detailed documentation.

@@ -159,3 +158,3 @@ *

*
* @return A promise fulfilled with the user
* @returns A promise fulfilled with the user
* data corresponding to the provided email.

@@ -168,3 +167,3 @@ */

*
* See [Retrieve user data](/docs/auth/admin/manage-users#retrieve_user_data)
* See {@link https://firebase.google.com/docs/auth/admin/manage-users#retrieve_user_data | Retrieve user data}
* for code samples and detailed documentation.

@@ -175,3 +174,3 @@ *

*
* @return A promise fulfilled with the user
* @returns A promise fulfilled with the user
* data corresponding to the provided phone number.

@@ -181,2 +180,16 @@ */

/**
* Gets the user data for the user corresponding to a given provider id.
*
* See {@link https://firebase.google.com/docs/auth/admin/manage-users#retrieve_user_data | Retrieve user data}
* for code samples and detailed documentation.
*
* @param providerId The provider ID, for example, "google.com" for the
* Google provider.
* @param uid The user identifier for the given provider.
*
* @returns A promise fulfilled with the user data corresponding to the
* given provider id.
*/
getUserByProviderUid(providerId: string, uid: string): Promise<UserRecord>;
/**
* Gets the user data corresponding to the specified identifiers.

@@ -192,3 +205,3 @@ *

* Must have <= 100 entries.
* @return {Promise<GetUsersResult>} A promise that resolves to the corresponding user records.
* @returns A promise that resolves to the corresponding user records.
* @throws FirebaseAuthError If any of the identifiers are invalid or if more than 100

@@ -203,3 +216,3 @@ * identifiers are specified.

*
* See [List all users](/docs/auth/admin/manage-users#list_all_users)
* See {@link https://firebase.google.com/docs/auth/admin/manage-users#list_all_users | List all users}
* for code samples and detailed documentation.

@@ -211,3 +224,3 @@ *

* users starting without any offset.
* @return A promise that resolves with
* @returns A promise that resolves with
* the current batch of downloaded users and the next page token.

@@ -219,4 +232,4 @@ */

*
* See [Create a user](/docs/auth/admin/manage-users#create_a_user) for code
* samples and detailed documentation.
* See {@link https://firebase.google.com/docs/auth/admin/manage-users#create_a_user | Create a user}
* for code samples and detailed documentation.
*

@@ -226,3 +239,3 @@ * @param properties The properties to set on the

*
* @return A promise fulfilled with the user
* @returns A promise fulfilled with the user
* data corresponding to the newly created user.

@@ -234,8 +247,8 @@ */

*
* See [Delete a user](/docs/auth/admin/manage-users#delete_a_user) for code
* samples and detailed documentation.
* See {@link https://firebase.google.com/docs/auth/admin/manage-users#delete_a_user | Delete a user}
* for code samples and detailed documentation.
*
* @param uid The `uid` corresponding to the user to delete.
*
* @return An empty promise fulfilled once the user has been
* @returns An empty promise fulfilled once the user has been
* deleted.

@@ -262,3 +275,3 @@ */

*
* @return A Promise that resolves to the total number of successful/failed
* @returns A Promise that resolves to the total number of successful/failed
* deletions, as well as the array of errors that corresponds to the

@@ -271,4 +284,4 @@ * failed deletions.

*
* See [Update a user](/docs/auth/admin/manage-users#update_a_user) for code
* samples and detailed documentation.
* See {@link https://firebsae.google.com/docs/auth/admin/manage-users#update_a_user | Update a user}
* for code samples and detailed documentation.
*

@@ -279,3 +292,3 @@ * @param uid The `uid` corresponding to the user to update.

*
* @return A promise fulfilled with the
* @returns A promise fulfilled with the
* updated user data.

@@ -293,4 +306,4 @@ */

*
* See
* [Defining user roles and access levels](/docs/auth/admin/custom-claims)
* See {@link https://firebase.google.com/docs/auth/admin/custom-claims |
* Defining user roles and access levels}
* for code samples and detailed documentation.

@@ -305,3 +318,3 @@ *

* separate storage systems.
* @return A promise that resolves when the operation completes
* @returns A promise that resolves when the operation completes
* successfully.

@@ -313,4 +326,3 @@ */

*
* This API will update the user's
* {@link auth.UserRecord.tokensValidAfterTime `tokensValidAfterTime`} to
* This API will update the user's {@link UserRecord.tokensValidAfterTime} to
* the current UTC. It is important that the server on which this is called has

@@ -322,4 +334,3 @@ * its clock set correctly and synchronized.

* may remain active until their natural expiration (one hour). To verify that
* ID tokens are revoked, use
* {@link auth.Auth.verifyIdToken `verifyIdToken(idToken, true)`}
* ID tokens are revoked, use {@link BaseAuth.verifyIdToken}
* where `checkRevoked` is set to true.

@@ -330,3 +341,3 @@ *

*
* @return An empty promise fulfilled once the user's refresh
* @returns An empty promise fulfilled once the user's refresh
* tokens have been revoked.

@@ -339,3 +350,3 @@ */

* When importing users with passwords,
* {@link auth.UserImportOptions `UserImportOptions`} are required to be
* {@link UserImportOptions} are required to be
* specified.

@@ -348,3 +359,3 @@ * This operation is optimized for bulk imports and will ignore checks on `uid`,

* password credentials.
* @return A promise that resolves when
* @returns A promise that resolves when
* the operation completes with the result of the import. This includes the

@@ -361,4 +372,4 @@ * number of successful imports, the number of failed imports and their

*
* See [Manage Session Cookies](/docs/auth/admin/manage-cookies) for code
* samples and detailed documentation.
* See {@link https://firebase.google.com/docs/auth/admin/manage-cookies | Manage Session Cookies}
* for code samples and detailed documentation.
*

@@ -370,3 +381,3 @@ * @param idToken The Firebase ID token to exchange for a session

*
* @return A promise that resolves on success with the
* @returns A promise that resolves on success with the
* created session cookie.

@@ -383,3 +394,4 @@ */

*
* See [Verify Session Cookies](/docs/auth/admin/manage-cookies#verify_session_cookie_and_check_permissions)
* See {@link https://firebase.google.com/docs/auth/admin/manage-cookies#verify_session_cookie_and_check_permissions |
* Verify Session Cookies}
* for code samples and detailed documentation

@@ -393,3 +405,3 @@ *

*
* @return A promise fulfilled with the
* @returns A promise fulfilled with the
* session cookie's decoded claims if the session cookie is valid; otherwise,

@@ -402,3 +414,3 @@ * a rejected promise.

* The link is generated for the user with the specified email address. The
* optional {@link auth.ActionCodeSettings `ActionCodeSettings`} object
* optional {@link ActionCodeSettings} object
* defines whether the link is to be handled by a mobile app or browser and the

@@ -447,3 +459,3 @@ * additional state information to be passed in the deep link, etc.

* are configured in the same Firebase Auth project.
* @return A promise that resolves with the generated link.
* @returns A promise that resolves with the generated link.
*/

@@ -453,4 +465,3 @@ generatePasswordResetLink(email: string, actionCodeSettings?: ActionCodeSettings): Promise<string>;

* Generates the out of band email action link to verify the user's ownership
* of the specified email. The
* {@link auth.ActionCodeSettings `ActionCodeSettings`} object provided
* of the specified email. The {@link ActionCodeSettings} object provided
* as an argument to this method defines whether the link is to be handled by a

@@ -499,3 +510,3 @@ * mobile app or browser along with additional state information to be passed in

* are configured in the same Firebase Auth project.
* @return A promise that resolves with the generated link.
* @returns A promise that resolves with the generated link.
*/

@@ -505,4 +516,3 @@ generateEmailVerificationLink(email: string, actionCodeSettings?: ActionCodeSettings): Promise<string>;

* Generates the out of band email action link to verify the user's ownership
* of the specified email. The
* {@link auth.ActionCodeSettings `ActionCodeSettings`} object provided
* of the specified email. The {@link ActionCodeSettings} object provided
* as an argument to this method defines whether the link is to be handled by a

@@ -551,3 +561,3 @@ * mobile app or browser along with additional state information to be passed in

* are configured in the same Firebase Auth project.
* @return A promise that resolves with the generated link.
* @returns A promise that resolves with the generated link.
*/

@@ -561,6 +571,6 @@ generateSignInWithEmailLink(email: string, actionCodeSettings: ActionCodeSettings): Promise<string>;

* (GCIP). To learn more about GCIP, including pricing and features,
* see the [GCIP documentation](https://cloud.google.com/identity-platform).
* see the {@link https://cloud.google.com/identity-platform | GCIP documentation}.
*
* @param options The provider config filter to apply.
* @return A promise that resolves with the list of provider configs meeting the
* @returns A promise that resolves with the list of provider configs meeting the
* filter requirements.

@@ -577,7 +587,7 @@ */

* (GCIP). To learn more about GCIP, including pricing and features,
* see the [GCIP documentation](https://cloud.google.com/identity-platform).
* see the {@link https://cloud.google.com/identity-platform | GCIP documentation}.
*
* @param providerId The provider ID corresponding to the provider
* config to return.
* @return A promise that resolves
* @returns A promise that resolves
* with the configuration corresponding to the provided ID.

@@ -593,7 +603,7 @@ */

* (GCIP). To learn more about GCIP, including pricing and features,
* see the [GCIP documentation](https://cloud.google.com/identity-platform).
* see the {@link https://cloud.google.com/identity-platform | GCIP documentation}.
*
* @param providerId The provider ID corresponding to the provider
* config to delete.
* @return A promise that resolves on completion.
* @returns A promise that resolves on completion.
*/

@@ -609,3 +619,3 @@ deleteProviderConfig(providerId: string): Promise<void>;

* (GCIP). To learn more about GCIP, including pricing and features,
* see the [GCIP documentation](https://cloud.google.com/identity-platform).
* see the {@link https://cloud.google.com/identity-platform | GCIP documentation}.
*

@@ -615,3 +625,3 @@ * @param providerId The provider ID corresponding to the provider

* @param updatedConfig The updated configuration.
* @return A promise that resolves with the updated provider configuration.
* @returns A promise that resolves with the updated provider configuration.
*/

@@ -625,6 +635,6 @@ updateProviderConfig(providerId: string, updatedConfig: UpdateAuthProviderRequest): Promise<AuthProviderConfig>;

* (GCIP). To learn more about GCIP, including pricing and features,
* see the [GCIP documentation](https://cloud.google.com/identity-platform).
* see the {@link https://cloud.google.com/identity-platform | GCIP documentation}.
*
* @param config The provider configuration to create.
* @return A promise that resolves with the created provider configuration.
* @returns A promise that resolves with the created provider configuration.
*/

@@ -639,5 +649,5 @@ createProviderConfig(config: AuthProviderConfig): Promise<AuthProviderConfig>;

* detection.
* @return A Promise that will be fulfilled after a successful verification.
* @returns A Promise that will be fulfilled after a successful verification.
*/
private verifyDecodedJWTNotRevoked;
}

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -21,2 +21,3 @@ /*!

var error_1 = require("../utils/error");
var deep_copy_1 = require("../utils/deep-copy");
var validator = require("../utils/validator");

@@ -29,2 +30,3 @@ var auth_api_request_1 = require("./auth-api-request");

var identifier_1 = require("./identifier");
var crypto_signer_1 = require("../utils/crypto-signer");
/**

@@ -52,3 +54,3 @@ * Common parent interface for both `Auth` and `TenantAwareAuth` APIs.

else {
var cryptoSigner = auth_api_request_1.useEmulator() ? new token_generator_1.EmulatedSigner() : token_generator_1.cryptoSignerFromApp(app);
var cryptoSigner = auth_api_request_1.useEmulator() ? new token_generator_1.EmulatedSigner() : crypto_signer_1.cryptoSignerFromApp(app);
this.tokenGenerator = new token_generator_1.FirebaseTokenGenerator(cryptoSigner);

@@ -65,4 +67,4 @@ }

*
* See [Create Custom Tokens](/docs/auth/admin/create-custom-tokens) for code
* samples and detailed documentation.
* See {@link https://firebase.google.com/docs/auth/admin/create-custom-tokens | Create Custom Tokens}
* for code samples and detailed documentation.
*

@@ -73,3 +75,3 @@ * @param uid The `uid` to use as the custom token's subject.

*
* @return A promise fulfilled with a custom token for the
* @returns A promise fulfilled with a custom token for the
* provided `uid` and payload.

@@ -87,4 +89,4 @@ */

*
* See [Verify ID Tokens](/docs/auth/admin/verify-id-tokens) for code samples
* and detailed documentation.
* See {@link https://firebase.google.com/docs/auth/admin/verify-id-tokens | Verify ID Tokens}
* for code samples and detailed documentation.
*

@@ -97,3 +99,3 @@ * @param idToken The ID token to verify.

*
* @return A promise fulfilled with the
* @returns A promise fulfilled with the
* token's decoded claims if the ID token is valid; otherwise, a rejected

@@ -105,9 +107,10 @@ * promise.

if (checkRevoked === void 0) { checkRevoked = false; }
return this.idTokenVerifier.verifyJWT(idToken)
var isEmulator = auth_api_request_1.useEmulator();
return this.idTokenVerifier.verifyJWT(idToken, isEmulator)
.then(function (decodedIdToken) {
// Whether to check if the token was revoked.
if (!checkRevoked) {
return decodedIdToken;
if (checkRevoked || isEmulator) {
return _this.verifyDecodedJWTNotRevoked(decodedIdToken, error_1.AuthClientErrorCode.ID_TOKEN_REVOKED);
}
return _this.verifyDecodedJWTNotRevoked(decodedIdToken, error_1.AuthClientErrorCode.ID_TOKEN_REVOKED);
return decodedIdToken;
});

@@ -118,3 +121,3 @@ };

*
* See [Retrieve user data](/docs/auth/admin/manage-users#retrieve_user_data)
* See {@link https://firebase.google.com/docs/auth/admin/manage-users#retrieve_user_data | Retrieve user data}
* for code samples and detailed documentation.

@@ -124,3 +127,3 @@ *

*
* @return A promise fulfilled with the user
* @returns A promise fulfilled with the user
* data corresponding to the provided `uid`.

@@ -138,3 +141,3 @@ */

*
* See [Retrieve user data](/docs/auth/admin/manage-users#retrieve_user_data)
* See {@link https://firebase.google.com/docs/auth/admin/manage-users#retrieve_user_data | Retrieve user data}
* for code samples and detailed documentation.

@@ -145,3 +148,3 @@ *

*
* @return A promise fulfilled with the user
* @returns A promise fulfilled with the user
* data corresponding to the provided email.

@@ -160,3 +163,3 @@ */

*
* See [Retrieve user data](/docs/auth/admin/manage-users#retrieve_user_data)
* See {@link https://firebase.google.com/docs/auth/admin/manage-users#retrieve_user_data | Retrieve user data}
* for code samples and detailed documentation.

@@ -167,3 +170,3 @@ *

*
* @return A promise fulfilled with the user
* @returns A promise fulfilled with the user
* data corresponding to the provided phone number.

@@ -179,2 +182,31 @@ */

/**
* Gets the user data for the user corresponding to a given provider id.
*
* See {@link https://firebase.google.com/docs/auth/admin/manage-users#retrieve_user_data | Retrieve user data}
* for code samples and detailed documentation.
*
* @param providerId The provider ID, for example, "google.com" for the
* Google provider.
* @param uid The user identifier for the given provider.
*
* @returns A promise fulfilled with the user data corresponding to the
* given provider id.
*/
BaseAuth.prototype.getUserByProviderUid = function (providerId, uid) {
// Although we don't really advertise it, we want to also handle
// non-federated idps with this call. So if we detect one of them, we'll
// reroute this request appropriately.
if (providerId === 'phone') {
return this.getUserByPhoneNumber(uid);
}
else if (providerId === 'email') {
return this.getUserByEmail(uid);
}
return this.authRequestHandler.getAccountInfoByFederatedUid(providerId, uid)
.then(function (response) {
// Returns the user record populated with server response.
return new user_record_1.UserRecord(response.users[0]);
});
};
/**
* Gets the user data corresponding to the specified identifiers.

@@ -190,3 +222,3 @@ *

* Must have <= 100 entries.
* @return {Promise<GetUsersResult>} A promise that resolves to the corresponding user records.
* @returns A promise that resolves to the corresponding user records.
* @throws FirebaseAuthError If any of the identifiers are invalid or if more than 100

@@ -238,3 +270,3 @@ * identifiers are specified.

*
* See [List all users](/docs/auth/admin/manage-users#list_all_users)
* See {@link https://firebase.google.com/docs/auth/admin/manage-users#list_all_users | List all users}
* for code samples and detailed documentation.

@@ -246,3 +278,3 @@ *

* users starting without any offset.
* @return A promise that resolves with
* @returns A promise that resolves with
* the current batch of downloaded users and the next page token.

@@ -274,4 +306,4 @@ */

*
* See [Create a user](/docs/auth/admin/manage-users#create_a_user) for code
* samples and detailed documentation.
* See {@link https://firebase.google.com/docs/auth/admin/manage-users#create_a_user | Create a user}
* for code samples and detailed documentation.
*

@@ -281,3 +313,3 @@ * @param properties The properties to set on the

*
* @return A promise fulfilled with the user
* @returns A promise fulfilled with the user
* data corresponding to the newly created user.

@@ -303,8 +335,8 @@ */

*
* See [Delete a user](/docs/auth/admin/manage-users#delete_a_user) for code
* samples and detailed documentation.
* See {@link https://firebase.google.com/docs/auth/admin/manage-users#delete_a_user | Delete a user}
* for code samples and detailed documentation.
*
* @param uid The `uid` corresponding to the user to delete.
*
* @return An empty promise fulfilled once the user has been
* @returns An empty promise fulfilled once the user has been
* deleted.

@@ -336,3 +368,3 @@ */

*
* @return A Promise that resolves to the total number of successful/failed
* @returns A Promise that resolves to the total number of successful/failed
* deletions, as well as the array of errors that corresponds to the

@@ -379,4 +411,4 @@ * failed deletions.

*
* See [Update a user](/docs/auth/admin/manage-users#update_a_user) for code
* samples and detailed documentation.
* See {@link https://firebsae.google.com/docs/auth/admin/manage-users#update_a_user | Update a user}
* for code samples and detailed documentation.
*

@@ -387,3 +419,3 @@ * @param uid The `uid` corresponding to the user to update.

*
* @return A promise fulfilled with the
* @returns A promise fulfilled with the
* updated user data.

@@ -393,2 +425,39 @@ */

var _this = this;
// Although we don't really advertise it, we want to also handle linking of
// non-federated idps with this call. So if we detect one of them, we'll
// adjust the properties parameter appropriately. This *does* imply that a
// conflict could arise, e.g. if the user provides a phoneNumber property,
// but also provides a providerToLink with a 'phone' provider id. In that
// case, we'll throw an error.
properties = deep_copy_1.deepCopy(properties);
if (properties === null || properties === void 0 ? void 0 : properties.providerToLink) {
if (properties.providerToLink.providerId === 'email') {
if (typeof properties.email !== 'undefined') {
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, "Both UpdateRequest.email and UpdateRequest.providerToLink.providerId='email' were set. To "
+ 'link to the email/password provider, only specify the UpdateRequest.email field.');
}
properties.email = properties.providerToLink.uid;
delete properties.providerToLink;
}
else if (properties.providerToLink.providerId === 'phone') {
if (typeof properties.phoneNumber !== 'undefined') {
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, "Both UpdateRequest.phoneNumber and UpdateRequest.providerToLink.providerId='phone' were set. To "
+ 'link to a phone provider, only specify the UpdateRequest.phoneNumber field.');
}
properties.phoneNumber = properties.providerToLink.uid;
delete properties.providerToLink;
}
}
if (properties === null || properties === void 0 ? void 0 : properties.providersToUnlink) {
if (properties.providersToUnlink.indexOf('phone') !== -1) {
// If we've been told to unlink the phone provider both via setting
// phoneNumber to null *and* by setting providersToUnlink to include
// 'phone', then we'll reject that. Though it might also be reasonable
// to relax this restriction and just unlink it.
if (properties.phoneNumber === null) {
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, "Both UpdateRequest.phoneNumber=null and UpdateRequest.providersToUnlink=['phone'] were set. To "
+ 'unlink from a phone provider, only specify the UpdateRequest.phoneNumber=null field.');
}
}
}
return this.authRequestHandler.updateExistingAccount(uid, properties)

@@ -409,4 +478,4 @@ .then(function (existingUid) {

*
* See
* [Defining user roles and access levels](/docs/auth/admin/custom-claims)
* See {@link https://firebase.google.com/docs/auth/admin/custom-claims |
* Defining user roles and access levels}
* for code samples and detailed documentation.

@@ -421,3 +490,3 @@ *

* separate storage systems.
* @return A promise that resolves when the operation completes
* @returns A promise that resolves when the operation completes
* successfully.

@@ -434,4 +503,3 @@ */

*
* This API will update the user's
* {@link auth.UserRecord.tokensValidAfterTime `tokensValidAfterTime`} to
* This API will update the user's {@link UserRecord.tokensValidAfterTime} to
* the current UTC. It is important that the server on which this is called has

@@ -443,4 +511,3 @@ * its clock set correctly and synchronized.

* may remain active until their natural expiration (one hour). To verify that
* ID tokens are revoked, use
* {@link auth.Auth.verifyIdToken `verifyIdToken(idToken, true)`}
* ID tokens are revoked, use {@link BaseAuth.verifyIdToken}
* where `checkRevoked` is set to true.

@@ -451,3 +518,3 @@ *

*
* @return An empty promise fulfilled once the user's refresh
* @returns An empty promise fulfilled once the user's refresh
* tokens have been revoked.

@@ -465,3 +532,3 @@ */

* When importing users with passwords,
* {@link auth.UserImportOptions `UserImportOptions`} are required to be
* {@link UserImportOptions} are required to be
* specified.

@@ -474,3 +541,3 @@ * This operation is optimized for bulk imports and will ignore checks on `uid`,

* password credentials.
* @return A promise that resolves when
* @returns A promise that resolves when
* the operation completes with the result of the import. This includes the

@@ -489,4 +556,4 @@ * number of successful imports, the number of failed imports and their

*
* See [Manage Session Cookies](/docs/auth/admin/manage-cookies) for code
* samples and detailed documentation.
* See {@link https://firebase.google.com/docs/auth/admin/manage-cookies | Manage Session Cookies}
* for code samples and detailed documentation.
*

@@ -498,3 +565,3 @@ * @param idToken The Firebase ID token to exchange for a session

*
* @return A promise that resolves on success with the
* @returns A promise that resolves on success with the
* created session cookie.

@@ -518,3 +585,4 @@ */

*
* See [Verify Session Cookies](/docs/auth/admin/manage-cookies#verify_session_cookie_and_check_permissions)
* See {@link https://firebase.google.com/docs/auth/admin/manage-cookies#verify_session_cookie_and_check_permissions |
* Verify Session Cookies}
* for code samples and detailed documentation

@@ -528,3 +596,3 @@ *

*
* @return A promise fulfilled with the
* @returns A promise fulfilled with the
* session cookie's decoded claims if the session cookie is valid; otherwise,

@@ -536,9 +604,10 @@ * a rejected promise.

if (checkRevoked === void 0) { checkRevoked = false; }
return this.sessionCookieVerifier.verifyJWT(sessionCookie)
var isEmulator = auth_api_request_1.useEmulator();
return this.sessionCookieVerifier.verifyJWT(sessionCookie, isEmulator)
.then(function (decodedIdToken) {
// Whether to check if the token was revoked.
if (!checkRevoked) {
return decodedIdToken;
if (checkRevoked || isEmulator) {
return _this.verifyDecodedJWTNotRevoked(decodedIdToken, error_1.AuthClientErrorCode.SESSION_COOKIE_REVOKED);
}
return _this.verifyDecodedJWTNotRevoked(decodedIdToken, error_1.AuthClientErrorCode.SESSION_COOKIE_REVOKED);
return decodedIdToken;
});

@@ -549,3 +618,3 @@ };

* The link is generated for the user with the specified email address. The
* optional {@link auth.ActionCodeSettings `ActionCodeSettings`} object
* optional {@link ActionCodeSettings} object
* defines whether the link is to be handled by a mobile app or browser and the

@@ -594,3 +663,3 @@ * additional state information to be passed in the deep link, etc.

* are configured in the same Firebase Auth project.
* @return A promise that resolves with the generated link.
* @returns A promise that resolves with the generated link.
*/

@@ -602,4 +671,3 @@ BaseAuth.prototype.generatePasswordResetLink = function (email, actionCodeSettings) {

* Generates the out of band email action link to verify the user's ownership
* of the specified email. The
* {@link auth.ActionCodeSettings `ActionCodeSettings`} object provided
* of the specified email. The {@link ActionCodeSettings} object provided
* as an argument to this method defines whether the link is to be handled by a

@@ -648,3 +716,3 @@ * mobile app or browser along with additional state information to be passed in

* are configured in the same Firebase Auth project.
* @return A promise that resolves with the generated link.
* @returns A promise that resolves with the generated link.
*/

@@ -656,4 +724,3 @@ BaseAuth.prototype.generateEmailVerificationLink = function (email, actionCodeSettings) {

* Generates the out of band email action link to verify the user's ownership
* of the specified email. The
* {@link auth.ActionCodeSettings `ActionCodeSettings`} object provided
* of the specified email. The {@link ActionCodeSettings} object provided
* as an argument to this method defines whether the link is to be handled by a

@@ -702,3 +769,3 @@ * mobile app or browser along with additional state information to be passed in

* are configured in the same Firebase Auth project.
* @return A promise that resolves with the generated link.
* @returns A promise that resolves with the generated link.
*/

@@ -714,6 +781,6 @@ BaseAuth.prototype.generateSignInWithEmailLink = function (email, actionCodeSettings) {

* (GCIP). To learn more about GCIP, including pricing and features,
* see the [GCIP documentation](https://cloud.google.com/identity-platform).
* see the {@link https://cloud.google.com/identity-platform | GCIP documentation}.
*
* @param options The provider config filter to apply.
* @return A promise that resolves with the list of provider configs meeting the
* @returns A promise that resolves with the list of provider configs meeting the
* filter requirements.

@@ -769,7 +836,7 @@ */

* (GCIP). To learn more about GCIP, including pricing and features,
* see the [GCIP documentation](https://cloud.google.com/identity-platform).
* see the {@link https://cloud.google.com/identity-platform | GCIP documentation}.
*
* @param providerId The provider ID corresponding to the provider
* config to return.
* @return A promise that resolves
* @returns A promise that resolves
* with the configuration corresponding to the provided ID.

@@ -799,7 +866,7 @@ */

* (GCIP). To learn more about GCIP, including pricing and features,
* see the [GCIP documentation](https://cloud.google.com/identity-platform).
* see the {@link https://cloud.google.com/identity-platform | GCIP documentation}.
*
* @param providerId The provider ID corresponding to the provider
* config to delete.
* @return A promise that resolves on completion.
* @returns A promise that resolves on completion.
*/

@@ -823,3 +890,3 @@ BaseAuth.prototype.deleteProviderConfig = function (providerId) {

* (GCIP). To learn more about GCIP, including pricing and features,
* see the [GCIP documentation](https://cloud.google.com/identity-platform).
* see the {@link https://cloud.google.com/identity-platform | GCIP documentation}.
*

@@ -829,3 +896,3 @@ * @param providerId The provider ID corresponding to the provider

* @param updatedConfig The updated configuration.
* @return A promise that resolves with the updated provider configuration.
* @returns A promise that resolves with the updated provider configuration.
*/

@@ -856,6 +923,6 @@ BaseAuth.prototype.updateProviderConfig = function (providerId, updatedConfig) {

* (GCIP). To learn more about GCIP, including pricing and features,
* see the [GCIP documentation](https://cloud.google.com/identity-platform).
* see the {@link https://cloud.google.com/identity-platform | GCIP documentation}.
*
* @param config The provider configuration to create.
* @return A promise that resolves with the created provider configuration.
* @returns A promise that resolves with the created provider configuration.
*/

@@ -887,3 +954,3 @@ BaseAuth.prototype.createProviderConfig = function (config) {

* detection.
* @return A Promise that will be fulfilled after a successful verification.
* @returns A Promise that will be fulfilled after a successful verification.
*/

@@ -909,24 +976,4 @@ BaseAuth.prototype.verifyDecodedJWTNotRevoked = function (decodedIdToken, revocationErrorInfo) {

};
/**
* Enable or disable ID token verification. This is used to safely short-circuit token verification with the
* Auth emulator. When disabled ONLY unsigned tokens will pass verification, production tokens will not pass.
*
* WARNING: This is a dangerous method that will compromise your app's security and break your app in
* production. Developers should never call this method, it is for internal testing use only.
*
* @internal
*/
// @ts-expect-error: this method appears unused but is used privately.
BaseAuth.prototype.setJwtVerificationEnabled = function (enabled) {
if (!enabled && !auth_api_request_1.useEmulator()) {
// We only allow verification to be disabled in conjunction with
// the emulator environment variable.
throw new Error('This method is only available when connected to the Authentication emulator.');
}
var algorithm = enabled ? token_verifier_1.ALGORITHM_RS256 : 'none';
this.idTokenVerifier.setAlgorithm(algorithm);
this.sessionCookieVerifier.setAlgorithm(algorithm);
};
return BaseAuth;
}());
exports.BaseAuth = BaseAuth;

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -20,3 +20,3 @@ * Copyright 2020 Google Inc.

*
* See `auth.getUsers()`
* See {@link BaseAuth.getUsers}.
*/

@@ -29,3 +29,3 @@ export interface UidIdentifier {

*
* See `auth.getUsers()`
* See {@link BaseAuth.getUsers}.
*/

@@ -38,3 +38,3 @@ export interface EmailIdentifier {

*
* See `auth.getUsers()`
* See {@link BaseAuth.getUsers}.
*/

@@ -47,3 +47,3 @@ export interface PhoneIdentifier {

*
* See `auth.getUsers()`
* See {@link BaseAuth.getUsers}.
*/

@@ -50,0 +50,0 @@ export interface ProviderIdentifier {

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -17,2 +17,7 @@ * Copyright 2020 Google Inc.

*/
/**
* Firebase Authentication.
*
* @packageDocumentation
*/
import { App } from '../app/index';

@@ -44,3 +49,3 @@ import { Auth } from './auth';

export { Auth, } from './auth';
export { AuthFactorType, AuthProviderConfig, AuthProviderConfigFilter, CreateMultiFactorInfoRequest, CreatePhoneMultiFactorInfoRequest, CreateRequest, EmailSignInProviderConfig, ListProviderConfigResults, MultiFactorConfig, MultiFactorConfigState, MultiFactorCreateSettings, MultiFactorUpdateSettings, OIDCAuthProviderConfig, OIDCUpdateAuthProviderRequest, SAMLAuthProviderConfig, SAMLUpdateAuthProviderRequest, UpdateAuthProviderRequest, UpdateMultiFactorInfoRequest, UpdatePhoneMultiFactorInfoRequest, UpdateRequest, } from './auth-config';
export { AuthFactorType, AuthProviderConfig, AuthProviderConfigFilter, BaseAuthProviderConfig, BaseCreateMultiFactorInfoRequest, BaseUpdateMultiFactorInfoRequest, CreateMultiFactorInfoRequest, CreatePhoneMultiFactorInfoRequest, CreateRequest, EmailSignInProviderConfig, ListProviderConfigResults, MultiFactorConfig, MultiFactorConfigState, MultiFactorCreateSettings, MultiFactorUpdateSettings, OAuthResponseType, OIDCAuthProviderConfig, OIDCUpdateAuthProviderRequest, SAMLAuthProviderConfig, SAMLUpdateAuthProviderRequest, UserProvider, UpdateAuthProviderRequest, UpdateMultiFactorInfoRequest, UpdatePhoneMultiFactorInfoRequest, UpdateRequest, } from './auth-config';
export { BaseAuth, DeleteUsersResult, GetUsersResult, ListUsersResult, SessionCookieOptions, } from './base-auth';

@@ -47,0 +52,0 @@ export { EmailIdentifier, PhoneIdentifier, ProviderIdentifier, UidIdentifier, UserIdentifier, } from './identifier';

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -20,2 +20,7 @@ /*!

exports.getAuth = void 0;
/**
* Firebase Authentication.
*
* @packageDocumentation
*/
var index_1 = require("../app/index");

@@ -22,0 +27,0 @@ var auth_1 = require("./auth");

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -22,3 +22,3 @@ * Copyright 2019 Google Inc.

* Interface representing the object returned from a
* {@link auth.TenantManager.listTenants `listTenants()`}
* {@link TenantManager.listTenants}
* operation.

@@ -29,3 +29,3 @@ * Contains the list of tenants for the current batch and the next page token if available.

/**
* The list of {@link auth.Tenant `Tenant`} objects for the downloaded batch.
* The list of {@link Tenant} objects for the downloaded batch.
*/

@@ -44,3 +44,3 @@ tenants: Tenant[];

* (GCIP). To learn more about GCIP, including pricing and features,
* see the [GCIP documentation](https://cloud.google.com/identity-platform)
* see the {@link https://cloud.google.com/identity-platform | GCIP documentation}.
*

@@ -54,3 +54,3 @@ * Each tenant contains its own identity providers, settings and sets of users.

* `TenantAwareAuth` instances for a specific `tenantId` can be instantiated by calling
* `auth.tenantManager().authForTenant(tenantId)`.
* {@link TenantManager.authForTenant}.
*/

@@ -97,3 +97,3 @@ export declare class TenantAwareAuth extends BaseAuth {

*
* @return The `TenantAwareAuth` instance corresponding to this tenant identifier.
* @returns The `TenantAwareAuth` instance corresponding to this tenant identifier.
*/

@@ -106,3 +106,3 @@ authForTenant(tenantId: string): TenantAwareAuth;

*
* @return A promise fulfilled with the tenant configuration to the provided `tenantId`.
* @returns A promise fulfilled with the tenant configuration to the provided `tenantId`.
*/

@@ -120,3 +120,3 @@ getTenant(tenantId: string): Promise<Tenant>;

*
* @return A promise that resolves with
* @returns A promise that resolves with
* a batch of downloaded tenants and the next page token.

@@ -130,3 +130,3 @@ */

*
* @return An empty promise fulfilled once the tenant has been deleted.
* @returns An empty promise fulfilled once the tenant has been deleted.
*/

@@ -141,3 +141,3 @@ deleteTenant(tenantId: string): Promise<void>;

*
* @return A promise fulfilled with the tenant configuration corresponding to the newly
* @returns A promise fulfilled with the tenant configuration corresponding to the newly
* created tenant.

@@ -152,5 +152,5 @@ */

*
* @return A promise fulfilled with the update tenant data.
* @returns A promise fulfilled with the update tenant data.
*/
updateTenant(tenantId: string, tenantOptions: UpdateTenantRequest): Promise<Tenant>;
}

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -40,2 +40,3 @@ /*!

var auth_api_request_1 = require("./auth-api-request");
var crypto_signer_1 = require("../utils/crypto-signer");
/**

@@ -47,3 +48,3 @@ * Tenant-aware `Auth` interface used for managing users, configuring SAML/OIDC providers,

* (GCIP). To learn more about GCIP, including pricing and features,
* see the [GCIP documentation](https://cloud.google.com/identity-platform)
* see the {@link https://cloud.google.com/identity-platform | GCIP documentation}.
*

@@ -57,3 +58,3 @@ * Each tenant contains its own identity providers, settings and sets of users.

* `TenantAwareAuth` instances for a specific `tenantId` can be instantiated by calling
* `auth.tenantManager().authForTenant(tenantId)`.
* {@link TenantManager.authForTenant}.
*/

@@ -72,3 +73,3 @@ var TenantAwareAuth = /** @class */ (function (_super) {

var _this = this;
var cryptoSigner = auth_api_request_1.useEmulator() ? new token_generator_1.EmulatedSigner() : token_generator_1.cryptoSignerFromApp(app);
var cryptoSigner = auth_api_request_1.useEmulator() ? new token_generator_1.EmulatedSigner() : crypto_signer_1.cryptoSignerFromApp(app);
var tokenGenerator = new token_generator_1.FirebaseTokenGenerator(cryptoSigner, tenantId);

@@ -160,3 +161,3 @@ _this = _super.call(this, app, new auth_api_request_1.TenantAwareAuthRequestHandler(app, tenantId), tokenGenerator) || this;

*
* @return The `TenantAwareAuth` instance corresponding to this tenant identifier.
* @returns The `TenantAwareAuth` instance corresponding to this tenant identifier.
*/

@@ -177,3 +178,3 @@ TenantManager.prototype.authForTenant = function (tenantId) {

*
* @return A promise fulfilled with the tenant configuration to the provided `tenantId`.
* @returns A promise fulfilled with the tenant configuration to the provided `tenantId`.
*/

@@ -196,3 +197,3 @@ TenantManager.prototype.getTenant = function (tenantId) {

*
* @return A promise that resolves with
* @returns A promise that resolves with
* a batch of downloaded tenants and the next page token.

@@ -226,3 +227,3 @@ */

*
* @return An empty promise fulfilled once the tenant has been deleted.
* @returns An empty promise fulfilled once the tenant has been deleted.
*/

@@ -239,3 +240,3 @@ TenantManager.prototype.deleteTenant = function (tenantId) {

*
* @return A promise fulfilled with the tenant configuration corresponding to the newly
* @returns A promise fulfilled with the tenant configuration corresponding to the newly
* created tenant.

@@ -255,3 +256,3 @@ */

*
* @return A promise fulfilled with the update tenant data.
* @returns A promise fulfilled with the update tenant data.
*/

@@ -258,0 +259,0 @@ TenantManager.prototype.updateTenant = function (tenantId, tenantOptions) {

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -31,2 +31,6 @@ * Copyright 2019 Google Inc.

/**
* Whether the anonymous provider is enabled.
*/
anonymousSignInEnabled?: boolean;
/**
* The multi-factor auth configuration to update on the tenant.

@@ -50,2 +54,3 @@ */

displayName?: string;
enableAnonymousUser?: boolean;
mfaConfig?: MultiFactorAuthServerConfig;

@@ -62,2 +67,3 @@ testPhoneNumbers?: {

enableEmailLinkSignin?: boolean;
enableAnonymousUser?: boolean;
mfaConfig?: MultiFactorAuthServerConfig;

@@ -73,3 +79,3 @@ testPhoneNumbers?: {

* (GCIP). To learn more about GCIP, including pricing and features,
* see the [GCIP documentation](https://cloud.google.com/identity-platform)
* see the {@link https://cloud.google.com/identity-platform | GCIP documentation}.
*

@@ -98,2 +104,3 @@ * Before multi-tenancy can be used on a Google Cloud Identity Platform project,

readonly displayName?: string;
readonly anonymousSignInEnabled: boolean;
/**

@@ -123,5 +130,7 @@ * The map containing the test phone number / code pairs for the tenant.

/**
* @return A JSON-serializable representation of this object.
* Returns a JSON-serializable representation of this object.
*
* @returns A JSON-serializable representation of this object.
*/
toJSON(): object;
}

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -29,3 +29,3 @@ /*!

* (GCIP). To learn more about GCIP, including pricing and features,
* see the [GCIP documentation](https://cloud.google.com/identity-platform)
* see the {@link https://cloud.google.com/identity-platform | GCIP documentation}.
*

@@ -69,2 +69,3 @@ * Before multi-tenancy can be used on a Google Cloud Identity Platform project,

}
this.anonymousSignInEnabled = !!response.enableAnonymousUser;
if (typeof response.mfaConfig !== 'undefined') {

@@ -82,3 +83,3 @@ this.multiFactorConfig_ = new auth_config_1.MultiFactorAuthConfig(response.mfaConfig);

* @param createRequest Whether this is a create request.
* @return The equivalent server request.
* @returns The equivalent server request.
*

@@ -97,2 +98,5 @@ * @internal

}
if (typeof tenantOptions.anonymousSignInEnabled !== 'undefined') {
request.enableAnonymousUser = tenantOptions.anonymousSignInEnabled;
}
if (typeof tenantOptions.multiFactorConfig !== 'undefined') {

@@ -110,4 +114,4 @@ request.mfaConfig = auth_config_1.MultiFactorAuthConfig.buildServerRequest(tenantOptions.multiFactorConfig);

*
* @param {string} resourceName The server side resource name
* @return {?string} The tenant ID corresponding to the resource, null otherwise.
* @param resourceName The server side resource name
* @returns The tenant ID corresponding to the resource, null otherwise.
*

@@ -134,2 +138,3 @@ * @internal

emailSignInConfig: true,
anonymousSignInEnabled: true,
multiFactorConfig: true,

@@ -194,3 +199,5 @@ testPhoneNumbers: true,

/**
* @return A JSON-serializable representation of this object.
* Returns a JSON-serializable representation of this object.
*
* @returns A JSON-serializable representation of this object.
*/

@@ -204,2 +211,3 @@ Tenant.prototype.toJSON = function () {

multiFactorConfig: (_b = this.multiFactorConfig_) === null || _b === void 0 ? void 0 : _b.toJSON(),
anonymousSignInEnabled: this.anonymousSignInEnabled,
testPhoneNumbers: this.testPhoneNumbers,

@@ -206,0 +214,0 @@ };

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -19,74 +19,6 @@ * @license

/// <reference types="node" />
import { ServiceAccountCredential } from '../app/credential-internal';
import { AuthorizedHttpClient } from '../utils/api-request';
import { CryptoSigner } from '../utils/crypto-signer';
import { Algorithm } from 'jsonwebtoken';
import { App } from '../app';
export declare const BLACKLISTED_CLAIMS: string[];
/**
* CryptoSigner interface represents an object that can be used to sign JWTs.
*/
export interface CryptoSigner {
/**
* The name of the signing algorithm.
*/
readonly algorithm: Algorithm;
/**
* Cryptographically signs a buffer of data.
*
* @param {Buffer} buffer The data to be signed.
* @return {Promise<Buffer>} A promise that resolves with the raw bytes of a signature.
*/
sign(buffer: Buffer): Promise<Buffer>;
/**
* Returns the ID of the service account used to sign tokens.
*
* @return {Promise<string>} A promise that resolves with a service account ID.
*/
getAccountId(): Promise<string>;
}
/**
* A CryptoSigner implementation that uses an explicitly specified service account private key to
* sign data. Performs all operations locally, and does not make any RPC calls.
*/
export declare class ServiceAccountSigner implements CryptoSigner {
private readonly credential;
algorithm: Algorithm;
/**
* Creates a new CryptoSigner instance from the given service account credential.
*
* @param {ServiceAccountCredential} credential A service account credential.
*/
constructor(credential: ServiceAccountCredential);
/**
* @inheritDoc
*/
sign(buffer: Buffer): Promise<Buffer>;
/**
* @inheritDoc
*/
getAccountId(): Promise<string>;
}
/**
* A CryptoSigner implementation that uses the remote IAM service to sign data. If initialized without
* a service account ID, attempts to discover a service account ID by consulting the local Metadata
* service. This will succeed in managed environments like Google Cloud Functions and App Engine.
*
* @see https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/signBlob
* @see https://cloud.google.com/compute/docs/storing-retrieving-metadata
*/
export declare class IAMSigner implements CryptoSigner {
algorithm: Algorithm;
private readonly httpClient;
private serviceAccountId?;
constructor(httpClient: AuthorizedHttpClient, serviceAccountId?: string);
/**
* @inheritDoc
*/
sign(buffer: Buffer): Promise<Buffer>;
/**
* @inheritDoc
*/
getAccountId(): Promise<string>;
}
/**
* A CryptoSigner implementation that is used when communicating with the Auth emulator.

@@ -107,10 +39,2 @@ * It produces unsigned tokens.

/**
* Create a new CryptoSigner instance for the given app. If the app has been initialized with a service
* account credential, creates a ServiceAccountSigner. Otherwise creates an IAMSigner.
*
* @param {FirebaseApp} app A FirebaseApp instance.
* @return {CryptoSigner} A CryptoSigner instance.
*/
export declare function cryptoSignerFromApp(app: App): CryptoSigner;
/**
* Class for generating different types of Firebase Auth tokens (JWTs).

@@ -133,3 +57,3 @@ */

* Auth Custom token.
* @return A Promise fulfilled with a Firebase Auth Custom token signed with a
* @returns A Promise fulfilled with a Firebase Auth Custom token signed with a
* service account key and containing the provided payload.

@@ -144,6 +68,14 @@ */

*
* @param {object} [developerClaims] Optional developer claims to validate.
* @return {boolean} True if the provided claims are valid; otherwise, false.
* @param developerClaims Optional developer claims to validate.
* @returns True if the provided claims are valid; otherwise, false.
*/
private isDeveloperClaimsValid_;
}
/**
* Creates a new FirebaseAuthError by extracting the error code, message and other relevant
* details from a CryptoSignerError.
*
* @param {Error} err The Error to convert into a FirebaseAuthError error
* @return {FirebaseAuthError} A Firebase Auth error that can be returned to the user.
*/
export declare function handleCryptoSignerError(err: Error): Error;

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -20,9 +20,7 @@ /*!

Object.defineProperty(exports, "__esModule", { value: true });
exports.FirebaseTokenGenerator = exports.cryptoSignerFromApp = exports.EmulatedSigner = exports.IAMSigner = exports.ServiceAccountSigner = exports.BLACKLISTED_CLAIMS = void 0;
var credential_internal_1 = require("../app/credential-internal");
exports.handleCryptoSignerError = exports.FirebaseTokenGenerator = exports.EmulatedSigner = exports.BLACKLISTED_CLAIMS = void 0;
var error_1 = require("../utils/error");
var api_request_1 = require("../utils/api-request");
var crypto_signer_1 = require("../utils/crypto-signer");
var validator = require("../utils/validator");
var utils_1 = require("../utils");
var ALGORITHM_RS256 = 'RS256';
var ALGORITHM_NONE = 'none';

@@ -38,120 +36,2 @@ var ONE_HOUR_IN_SECONDS = 60 * 60;

/**
* A CryptoSigner implementation that uses an explicitly specified service account private key to
* sign data. Performs all operations locally, and does not make any RPC calls.
*/
var ServiceAccountSigner = /** @class */ (function () {
/**
* Creates a new CryptoSigner instance from the given service account credential.
*
* @param {ServiceAccountCredential} credential A service account credential.
*/
function ServiceAccountSigner(credential) {
this.credential = credential;
this.algorithm = ALGORITHM_RS256;
if (!credential) {
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_CREDENTIAL, 'INTERNAL ASSERT: Must provide a service account credential to initialize ServiceAccountSigner.');
}
}
/**
* @inheritDoc
*/
ServiceAccountSigner.prototype.sign = function (buffer) {
var crypto = require('crypto'); // eslint-disable-line @typescript-eslint/no-var-requires
var sign = crypto.createSign('RSA-SHA256');
sign.update(buffer);
return Promise.resolve(sign.sign(this.credential.privateKey));
};
/**
* @inheritDoc
*/
ServiceAccountSigner.prototype.getAccountId = function () {
return Promise.resolve(this.credential.clientEmail);
};
return ServiceAccountSigner;
}());
exports.ServiceAccountSigner = ServiceAccountSigner;
/**
* A CryptoSigner implementation that uses the remote IAM service to sign data. If initialized without
* a service account ID, attempts to discover a service account ID by consulting the local Metadata
* service. This will succeed in managed environments like Google Cloud Functions and App Engine.
*
* @see https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/signBlob
* @see https://cloud.google.com/compute/docs/storing-retrieving-metadata
*/
var IAMSigner = /** @class */ (function () {
function IAMSigner(httpClient, serviceAccountId) {
this.algorithm = ALGORITHM_RS256;
if (!httpClient) {
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, 'INTERNAL ASSERT: Must provide a HTTP client to initialize IAMSigner.');
}
if (typeof serviceAccountId !== 'undefined' && !validator.isNonEmptyString(serviceAccountId)) {
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, 'INTERNAL ASSERT: Service account ID must be undefined or a non-empty string.');
}
this.httpClient = httpClient;
this.serviceAccountId = serviceAccountId;
}
/**
* @inheritDoc
*/
IAMSigner.prototype.sign = function (buffer) {
var _this = this;
return this.getAccountId().then(function (serviceAccount) {
var request = {
method: 'POST',
url: "https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/" + serviceAccount + ":signBlob",
data: { payload: buffer.toString('base64') },
};
return _this.httpClient.send(request);
}).then(function (response) {
// Response from IAM is base64 encoded. Decode it into a buffer and return.
return Buffer.from(response.data.signedBlob, 'base64');
}).catch(function (err) {
if (err instanceof api_request_1.HttpError) {
var error = err.response.data;
if (validator.isNonNullObject(error) && error.error) {
var errorCode = error.error.status;
var description = 'Please refer to https://firebase.google.com/docs/auth/admin/create-custom-tokens ' +
'for more details on how to use and troubleshoot this feature.';
var errorMsg = error.error.message + "; " + description;
throw error_1.FirebaseAuthError.fromServerError(errorCode, errorMsg, error);
}
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INTERNAL_ERROR, 'Error returned from server: ' + error + '. Additionally, an ' +
'internal error occurred while attempting to extract the ' +
'errorcode from the error.');
}
throw err;
});
};
/**
* @inheritDoc
*/
IAMSigner.prototype.getAccountId = function () {
var _this = this;
if (validator.isNonEmptyString(this.serviceAccountId)) {
return Promise.resolve(this.serviceAccountId);
}
var request = {
method: 'GET',
url: 'http://metadata/computeMetadata/v1/instance/service-accounts/default/email',
headers: {
'Metadata-Flavor': 'Google',
},
};
var client = new api_request_1.HttpClient();
return client.send(request).then(function (response) {
if (!response.text) {
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INTERNAL_ERROR, 'HTTP Response missing payload');
}
_this.serviceAccountId = response.text;
return response.text;
}).catch(function (err) {
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_CREDENTIAL, 'Failed to determine service account. Make sure to initialize ' +
'the SDK with a service account credential. Alternatively specify a service ' +
("account with iam.serviceAccounts.signBlob permission. Original error: " + err));
});
};
return IAMSigner;
}());
exports.IAMSigner = IAMSigner;
/**
* A CryptoSigner implementation that is used when communicating with the Auth emulator.

@@ -181,17 +61,2 @@ * It produces unsigned tokens.

/**
* Create a new CryptoSigner instance for the given app. If the app has been initialized with a service
* account credential, creates a ServiceAccountSigner. Otherwise creates an IAMSigner.
*
* @param {FirebaseApp} app A FirebaseApp instance.
* @return {CryptoSigner} A CryptoSigner instance.
*/
function cryptoSignerFromApp(app) {
var credential = app.options.credential;
if (credential instanceof credential_internal_1.ServiceAccountCredential) {
return new ServiceAccountSigner(credential);
}
return new IAMSigner(new api_request_1.AuthorizedHttpClient(app), app.options.serviceAccountId);
}
exports.cryptoSignerFromApp = cryptoSignerFromApp;
/**
* Class for generating different types of Firebase Auth tokens (JWTs).

@@ -221,3 +86,3 @@ */

* Auth Custom token.
* @return A Promise fulfilled with a Firebase Auth Custom token signed with a
* @returns A Promise fulfilled with a Firebase Auth Custom token signed with a
* service account key and containing the provided payload.

@@ -279,2 +144,4 @@ */

return token + "." + _this.encodeSegment(signature);
}).catch(function (err) {
throw handleCryptoSignerError(err);
});

@@ -289,4 +156,4 @@ };

*
* @param {object} [developerClaims] Optional developer claims to validate.
* @return {boolean} True if the provided claims are valid; otherwise, false.
* @param developerClaims Optional developer claims to validate.
* @returns True if the provided claims are valid; otherwise, false.
*/

@@ -302,1 +169,39 @@ FirebaseTokenGenerator.prototype.isDeveloperClaimsValid_ = function (developerClaims) {

exports.FirebaseTokenGenerator = FirebaseTokenGenerator;
/**
* Creates a new FirebaseAuthError by extracting the error code, message and other relevant
* details from a CryptoSignerError.
*
* @param {Error} err The Error to convert into a FirebaseAuthError error
* @return {FirebaseAuthError} A Firebase Auth error that can be returned to the user.
*/
function handleCryptoSignerError(err) {
if (!(err instanceof crypto_signer_1.CryptoSignerError)) {
return err;
}
if (err.code === crypto_signer_1.CryptoSignerErrorCode.SERVER_ERROR && validator.isNonNullObject(err.cause)) {
var httpError = err.cause;
var errorResponse = httpError.response.data;
if (validator.isNonNullObject(errorResponse) && errorResponse.error) {
var errorCode = errorResponse.error.status;
var description = 'Please refer to https://firebase.google.com/docs/auth/admin/create-custom-tokens ' +
'for more details on how to use and troubleshoot this feature.';
var errorMsg = errorResponse.error.message + "; " + description;
return error_1.FirebaseAuthError.fromServerError(errorCode, errorMsg, errorResponse);
}
return new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INTERNAL_ERROR, 'Error returned from server: ' + errorResponse + '. Additionally, an ' +
'internal error occurred while attempting to extract the ' +
'errorcode from the error.');
}
return new error_1.FirebaseAuthError(mapToAuthClientErrorCode(err.code), err.message);
}
exports.handleCryptoSignerError = handleCryptoSignerError;
function mapToAuthClientErrorCode(code) {
switch (code) {
case crypto_signer_1.CryptoSignerErrorCode.INVALID_CREDENTIAL:
return error_1.AuthClientErrorCode.INVALID_CREDENTIAL;
case crypto_signer_1.CryptoSignerErrorCode.INVALID_ARGUMENT:
return error_1.AuthClientErrorCode.INVALID_ARGUMENT;
default:
return error_1.AuthClientErrorCode.INTERNAL_ERROR;
}
}

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -151,2 +151,1 @@ * Copyright 2018 Google Inc.

}
export declare const ALGORITHM_RS256 = "RS256";

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -19,11 +19,9 @@ /*!

Object.defineProperty(exports, "__esModule", { value: true });
exports.createSessionCookieVerifier = exports.createIdTokenVerifier = exports.FirebaseTokenVerifier = exports.SESSION_COOKIE_INFO = exports.ID_TOKEN_INFO = exports.ALGORITHM_RS256 = void 0;
exports.createSessionCookieVerifier = exports.createIdTokenVerifier = exports.FirebaseTokenVerifier = exports.SESSION_COOKIE_INFO = exports.ID_TOKEN_INFO = void 0;
var error_1 = require("../utils/error");
var util = require("../utils/index");
var validator = require("../utils/validator");
var jwt = require("jsonwebtoken");
var api_request_1 = require("../utils/api-request");
var jwt_1 = require("../utils/jwt");
// Audience to use for Firebase Auth Custom tokens
var FIREBASE_AUDIENCE = 'https://identitytoolkit.googleapis.com/google.identity.identitytoolkit.v1.IdentityToolkit';
exports.ALGORITHM_RS256 = 'RS256';
// URL containing the public keys for the Google certs (whose private keys are used to sign Firebase

@@ -34,2 +32,3 @@ // Auth ID tokens)

var SESSION_COOKIE_CERT_URL = 'https://www.googleapis.com/identitytoolkit/v3/relyingparty/publicKeys';
var EMULATOR_VERIFIER = new jwt_1.EmulatorSignatureVerifier();
/**

@@ -65,5 +64,3 @@ * User facing token information related to the Firebase ID token.

var FirebaseTokenVerifier = /** @class */ (function () {
function FirebaseTokenVerifier(clientCertUrl, algorithm, issuer, tokenInfo, app) {
this.clientCertUrl = clientCertUrl;
this.algorithm = algorithm;
function FirebaseTokenVerifier(clientCertUrl, issuer, tokenInfo, app) {
this.issuer = issuer;

@@ -75,5 +72,2 @@ this.tokenInfo = tokenInfo;

}
else if (!validator.isNonEmptyString(algorithm)) {
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, 'The provided JWT algorithm is an empty string.');
}
else if (!validator.isURL(issuer)) {

@@ -101,2 +95,4 @@ throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, 'The provided JWT issuer is an invalid URL.');

this.shortNameArticle = tokenInfo.shortName.charAt(0).match(/[aeiou]/i) ? 'an' : 'a';
this.signatureVerifier =
jwt_1.PublicKeySignatureVerifier.withCertificateUrl(clientCertUrl, app.options.httpAgent);
// For backward compatibility, the project ID is validated in the verification call.

@@ -107,32 +103,65 @@ }

*
* @param {string} jwtToken The Firebase Auth JWT token to verify.
* @return {Promise<DecodedIdToken>} A promise fulfilled with the decoded claims of the Firebase Auth ID
* token.
* @param jwtToken The Firebase Auth JWT token to verify.
* @param isEmulator Whether to accept Auth Emulator tokens.
* @returns A promise fulfilled with the decoded claims of the Firebase Auth ID token.
*/
FirebaseTokenVerifier.prototype.verifyJWT = function (jwtToken) {
FirebaseTokenVerifier.prototype.verifyJWT = function (jwtToken, isEmulator) {
var _this = this;
if (isEmulator === void 0) { isEmulator = false; }
if (!validator.isString(jwtToken)) {
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, "First argument to " + this.tokenInfo.verifyApiName + " must be a " + this.tokenInfo.jwtName + " string.");
}
return this.ensureProjectId()
.then(function (projectId) {
return _this.decodeAndVerify(jwtToken, projectId, isEmulator);
})
.then(function (decoded) {
var decodedIdToken = decoded.payload;
decodedIdToken.uid = decodedIdToken.sub;
return decodedIdToken;
});
};
FirebaseTokenVerifier.prototype.ensureProjectId = function () {
var _this = this;
return util.findProjectId(this.app)
.then(function (projectId) {
return _this.verifyJWTWithProjectId(jwtToken, projectId);
if (!validator.isNonEmptyString(projectId)) {
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_CREDENTIAL, 'Must initialize app with a cert credential or set your Firebase project ID as the ' +
("GOOGLE_CLOUD_PROJECT environment variable to call " + _this.tokenInfo.verifyApiName + "."));
}
return Promise.resolve(projectId);
});
};
/**
* Override the JWT signing algorithm.
* @param algorithm the new signing algorithm.
*/
FirebaseTokenVerifier.prototype.setAlgorithm = function (algorithm) {
this.algorithm = algorithm;
FirebaseTokenVerifier.prototype.decodeAndVerify = function (token, projectId, isEmulator) {
var _this = this;
return this.safeDecode(token)
.then(function (decodedToken) {
_this.verifyContent(decodedToken, projectId, isEmulator);
return _this.verifySignature(token, isEmulator)
.then(function () { return decodedToken; });
});
};
FirebaseTokenVerifier.prototype.verifyJWTWithProjectId = function (jwtToken, projectId) {
FirebaseTokenVerifier.prototype.safeDecode = function (jwtToken) {
var _this = this;
if (!validator.isNonEmptyString(projectId)) {
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_CREDENTIAL, 'Must initialize app with a cert credential or set your Firebase project ID as the ' +
("GOOGLE_CLOUD_PROJECT environment variable to call " + this.tokenInfo.verifyApiName + "."));
}
var fullDecodedToken = jwt.decode(jwtToken, {
complete: true,
return jwt_1.decodeJwt(jwtToken)
.catch(function (err) {
if (err.code == jwt_1.JwtErrorCode.INVALID_ARGUMENT) {
var verifyJwtTokenDocsMessage = " See " + _this.tokenInfo.url + " " +
("for details on how to retrieve " + _this.shortNameArticle + " " + _this.tokenInfo.shortName + ".");
var errorMessage = "Decoding " + _this.tokenInfo.jwtName + " failed. Make sure you passed " +
("the entire string JWT which represents " + _this.shortNameArticle + " ") +
(_this.tokenInfo.shortName + ".") + verifyJwtTokenDocsMessage;
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, errorMessage);
}
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INTERNAL_ERROR, err.message);
});
};
/**
* Verifies the content of a Firebase Auth JWT.
*
* @param fullDecodedToken The decoded JWT.
* @param projectId The Firebase Project Id.
* @param isEmulator Whether the token is an Emulator token.
*/
FirebaseTokenVerifier.prototype.verifyContent = function (fullDecodedToken, projectId, isEmulator) {
var header = fullDecodedToken && fullDecodedToken.header;

@@ -145,7 +174,3 @@ var payload = fullDecodedToken && fullDecodedToken.payload;

var errorMessage;
if (!fullDecodedToken) {
errorMessage = "Decoding " + this.tokenInfo.jwtName + " failed. Make sure you passed the entire string JWT " +
("which represents " + this.shortNameArticle + " " + this.tokenInfo.shortName + ".") + verifyJwtTokenDocsMessage;
}
else if (typeof header.kid === 'undefined' && this.algorithm !== 'none') {
if (!isEmulator && typeof header.kid === 'undefined') {
var isCustomToken = (payload.aud === FIREBASE_AUDIENCE);

@@ -166,4 +191,4 @@ var isLegacyCustomToken = (header.alg === 'HS256' && payload.v === 0 && 'd' in payload && 'uid' in payload.d);

}
else if (header.alg !== this.algorithm) {
errorMessage = this.tokenInfo.jwtName + " has incorrect algorithm. Expected \"" + this.algorithm + '" but got ' +
else if (!isEmulator && header.alg !== jwt_1.ALGORITHM_RS256) {
errorMessage = this.tokenInfo.jwtName + " has incorrect algorithm. Expected \"" + jwt_1.ALGORITHM_RS256 + '" but got ' +
'"' + header.alg + '".' + verifyJwtTokenDocsMessage;

@@ -178,3 +203,3 @@ }

errorMessage = this.tokenInfo.jwtName + " has incorrect \"iss\" (issuer) claim. Expected " +
("\"" + this.issuer + "\"") + projectId + '" but got "' +
("\"" + this.issuer) + projectId + '" but got "' +
payload.iss + '".' + projectIdMatchMessage + verifyJwtTokenDocsMessage;

@@ -193,111 +218,39 @@ }

if (errorMessage) {
return Promise.reject(new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, errorMessage));
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, errorMessage);
}
// When the algorithm is set to 'none' there will be no signature and therefore we don't check
// the public keys.
if (this.algorithm === 'none') {
return this.verifyJwtSignatureWithKey(jwtToken, null);
}
return this.fetchPublicKeys().then(function (publicKeys) {
if (!Object.prototype.hasOwnProperty.call(publicKeys, header.kid)) {
return Promise.reject(new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, _this.tokenInfo.jwtName + " has \"kid\" claim which does not correspond to a known public key. " +
("Most likely the " + _this.tokenInfo.shortName + " is expired, so get a fresh token from your ") +
'client app and try again.'));
}
else {
return _this.verifyJwtSignatureWithKey(jwtToken, publicKeys[header.kid]);
}
});
};
/**
* Verifies the JWT signature using the provided public key.
* @param {string} jwtToken The JWT token to verify.
* @param {string} publicKey The public key certificate.
* @return {Promise<DecodedIdToken>} A promise that resolves with the decoded JWT claims on successful
* verification.
*/
FirebaseTokenVerifier.prototype.verifyJwtSignatureWithKey = function (jwtToken, publicKey) {
FirebaseTokenVerifier.prototype.verifySignature = function (jwtToken, isEmulator) {
var _this = this;
var verifyJwtTokenDocsMessage = " See " + this.tokenInfo.url + " " +
("for details on how to retrieve " + this.shortNameArticle + " " + this.tokenInfo.shortName + ".");
return new Promise(function (resolve, reject) {
jwt.verify(jwtToken, publicKey || '', {
algorithms: [_this.algorithm],
}, function (error, decodedToken) {
if (error) {
if (error.name === 'TokenExpiredError') {
var errorMessage = _this.tokenInfo.jwtName + " has expired. Get a fresh " + _this.tokenInfo.shortName +
(" from your client app and try again (auth/" + _this.tokenInfo.expiredErrorCode.code + ").") +
verifyJwtTokenDocsMessage;
return reject(new error_1.FirebaseAuthError(_this.tokenInfo.expiredErrorCode, errorMessage));
}
else if (error.name === 'JsonWebTokenError') {
var errorMessage = _this.tokenInfo.jwtName + " has invalid signature." + verifyJwtTokenDocsMessage;
return reject(new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, errorMessage));
}
return reject(new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, error.message));
}
else {
var decodedIdToken = decodedToken;
decodedIdToken.uid = decodedIdToken.sub;
resolve(decodedIdToken);
}
});
var verifier = isEmulator ? EMULATOR_VERIFIER : this.signatureVerifier;
return verifier.verify(jwtToken)
.catch(function (error) {
throw _this.mapJwtErrorToAuthError(error);
});
};
/**
* Fetches the public keys for the Google certs.
* Maps JwtError to FirebaseAuthError
*
* @return {Promise<object>} A promise fulfilled with public keys for the Google certs.
* @param error JwtError to be mapped.
* @returns FirebaseAuthError or Error instance.
*/
FirebaseTokenVerifier.prototype.fetchPublicKeys = function () {
var _this = this;
var publicKeysExist = (typeof this.publicKeys !== 'undefined');
var publicKeysExpiredExists = (typeof this.publicKeysExpireAt !== 'undefined');
var publicKeysStillValid = (publicKeysExpiredExists && Date.now() < this.publicKeysExpireAt);
if (publicKeysExist && publicKeysStillValid) {
return Promise.resolve(this.publicKeys);
FirebaseTokenVerifier.prototype.mapJwtErrorToAuthError = function (error) {
var verifyJwtTokenDocsMessage = " See " + this.tokenInfo.url + " " +
("for details on how to retrieve " + this.shortNameArticle + " " + this.tokenInfo.shortName + ".");
if (error.code === jwt_1.JwtErrorCode.TOKEN_EXPIRED) {
var errorMessage = this.tokenInfo.jwtName + " has expired. Get a fresh " + this.tokenInfo.shortName +
(" from your client app and try again (auth/" + this.tokenInfo.expiredErrorCode.code + ").") +
verifyJwtTokenDocsMessage;
return new error_1.FirebaseAuthError(this.tokenInfo.expiredErrorCode, errorMessage);
}
var client = new api_request_1.HttpClient();
var request = {
method: 'GET',
url: this.clientCertUrl,
httpAgent: this.app.options.httpAgent,
};
return client.send(request).then(function (resp) {
if (!resp.isJson() || resp.data.error) {
// Treat all non-json messages and messages with an 'error' field as
// error responses.
throw new api_request_1.HttpError(resp);
}
if (Object.prototype.hasOwnProperty.call(resp.headers, 'cache-control')) {
var cacheControlHeader = resp.headers['cache-control'];
var parts = cacheControlHeader.split(',');
parts.forEach(function (part) {
var subParts = part.trim().split('=');
if (subParts[0] === 'max-age') {
var maxAge = +subParts[1];
_this.publicKeysExpireAt = Date.now() + (maxAge * 1000);
}
});
}
_this.publicKeys = resp.data;
return resp.data;
}).catch(function (err) {
if (err instanceof api_request_1.HttpError) {
var errorMessage = 'Error fetching public keys for Google certs: ';
var resp = err.response;
if (resp.isJson() && resp.data.error) {
errorMessage += "" + resp.data.error;
if (resp.data.error_description) {
errorMessage += ' (' + resp.data.error_description + ')';
}
}
else {
errorMessage += "" + resp.text;
}
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INTERNAL_ERROR, errorMessage);
}
throw err;
});
else if (error.code === jwt_1.JwtErrorCode.INVALID_SIGNATURE) {
var errorMessage = this.tokenInfo.jwtName + " has invalid signature." + verifyJwtTokenDocsMessage;
return new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, errorMessage);
}
else if (error.code === jwt_1.JwtErrorCode.NO_MATCHING_KID) {
var errorMessage = this.tokenInfo.jwtName + " has \"kid\" claim which does not " +
("correspond to a known public key. Most likely the " + this.tokenInfo.shortName + " ") +
'is expired, so get a fresh token from your client app and try again.';
return new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, errorMessage);
}
return new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.INVALID_ARGUMENT, error.message);
};

@@ -310,9 +263,8 @@ return FirebaseTokenVerifier;

*
* @param {FirebaseApp} app Firebase app instance.
* @return {FirebaseTokenVerifier}
*
* @internal
* @param app Firebase app instance.
* @returns FirebaseTokenVerifier
*/
function createIdTokenVerifier(app) {
return new FirebaseTokenVerifier(CLIENT_CERT_URL, exports.ALGORITHM_RS256, 'https://securetoken.google.com/', exports.ID_TOKEN_INFO, app);
return new FirebaseTokenVerifier(CLIENT_CERT_URL, 'https://securetoken.google.com/', exports.ID_TOKEN_INFO, app);
}

@@ -323,10 +275,9 @@ exports.createIdTokenVerifier = createIdTokenVerifier;

*
* @param {FirebaseApp} app Firebase app instance.
* @return {FirebaseTokenVerifier}
*
* @internal
* @param app Firebase app instance.
* @returns FirebaseTokenVerifier
*/
function createSessionCookieVerifier(app) {
return new FirebaseTokenVerifier(SESSION_COOKIE_CERT_URL, exports.ALGORITHM_RS256, 'https://session.firebase.google.com/', exports.SESSION_COOKIE_INFO, app);
return new FirebaseTokenVerifier(SESSION_COOKIE_CERT_URL, 'https://session.firebase.google.com/', exports.SESSION_COOKIE_INFO, app);
}
exports.createSessionCookieVerifier = createSessionCookieVerifier;

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -266,3 +266,3 @@ * Copyright 2018 Google Inc.

* @param multiFactorInfo The client format second factor.
* @return The corresponding AuthFactorInfo server request format.
* @returns The corresponding AuthFactorInfo server request format.
*/

@@ -290,3 +290,3 @@ export declare function convertMultiFactorInfoToServerFormat(multiFactorInfo: UpdateMultiFactorInfoRequest): AuthFactorInfo;

* Returns the corresponding constructed uploadAccount request.
* @return {UploadAccountRequest} The constructed uploadAccount request.
* @returns {UploadAccountRequest} The constructed uploadAccount request.
*/

@@ -297,3 +297,3 @@ buildRequest(): UploadAccountRequest;

* side returned errors.
* @return {UserImportResult} The user import result based on the returned failed
* @returns {UserImportResult} The user import result based on the returned failed
* uploadAccount response.

@@ -310,3 +310,3 @@ */

* @param {boolean} requiresHashOptions Whether to require hash options.
* @return {UploadAccountOptions} The populated UploadAccount options.
* @returns {UploadAccountOptions} The populated UploadAccount options.
*/

@@ -322,3 +322,3 @@ private populateOptions;

* @param {ValidatorFunction=} userValidator The user validator function.
* @return {UploadAccountUser[]} The populated uploadAccount users.
* @returns {UploadAccountUser[]} The populated uploadAccount users.
*/

@@ -325,0 +325,0 @@ private populateUsers;

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -27,3 +27,3 @@ /*!

* @param multiFactorInfo The client format second factor.
* @return The corresponding AuthFactorInfo server request format.
* @returns The corresponding AuthFactorInfo server request format.
*/

@@ -71,3 +71,3 @@ function convertMultiFactorInfoToServerFormat(multiFactorInfo) {

* @param {string} key The entry key.
* @return {number} The corresponding number if available. Otherwise, NaN.
* @returns {number} The corresponding number if available. Otherwise, NaN.
*/

@@ -85,3 +85,3 @@ function getNumberField(obj, key) {

* @param {ValidatorFunction=} userValidator The user validator function.
* @return {UploadAccountUser} The corresponding UploadAccountUser to return.
* @returns {UploadAccountUser} The corresponding UploadAccountUser to return.
*/

@@ -182,3 +182,3 @@ function populateUploadAccountUser(user, userValidator) {

* Returns the corresponding constructed uploadAccount request.
* @return {UploadAccountRequest} The constructed uploadAccount request.
* @returns {UploadAccountRequest} The constructed uploadAccount request.
*/

@@ -194,3 +194,3 @@ UserImportBuilder.prototype.buildRequest = function () {

* side returned errors.
* @return {UserImportResult} The user import result based on the returned failed
* @returns {UserImportResult} The user import result based on the returned failed
* uploadAccount response.

@@ -227,3 +227,3 @@ */

* @param {boolean} requiresHashOptions Whether to require hash options.
* @return {UploadAccountOptions} The populated UploadAccount options.
* @returns {UploadAccountOptions} The populated UploadAccount options.
*/

@@ -365,3 +365,3 @@ UserImportBuilder.prototype.populateOptions = function (options, requiresHashOptions) {

* @param {ValidatorFunction=} userValidator The user validator function.
* @return {UploadAccountUser[]} The populated uploadAccount users.
* @returns {UploadAccountUser[]} The populated uploadAccount users.
*/

@@ -368,0 +368,0 @@ UserImportBuilder.prototype.populateUsers = function (users, userValidator) {

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -55,3 +55,3 @@ * @license

/**
* Interface representing the common properties of a user enrolled second factor.
* Interface representing the common properties of a user-enrolled second factor.
*/

@@ -76,3 +76,5 @@ export declare abstract class MultiFactorInfo {

/**
* @return A JSON-serializable representation of this object.
* Returns a JSON-serializable representation of this object.
*
* @returns A JSON-serializable representation of this object.
*/

@@ -88,3 +90,3 @@ toJSON(): object;

/**
* Interface representing a phone specific user enrolled second factor.
* Interface representing a phone specific user-enrolled second factor.
*/

@@ -111,3 +113,5 @@ export declare class PhoneMultiFactorInfo extends MultiFactorInfo {

/**
* @return A JSON-serializable representation of this multi-factor object.
* Returns a JSON-serializable representation of this multi-factor object.
*
* @returns A JSON-serializable representation of this multi-factor object.
*/

@@ -135,3 +139,5 @@ toJSON(): object;

/**
* @return A JSON-serializable representation of this object.
* Returns a JSON-serializable representation of this object.
*
* @returns A JSON-serializable representation of this object.
*/

@@ -170,3 +176,5 @@ toJSON(): object;

/**
* @return A JSON-serializable representation of this object.
* Returns a JSON-serializable representation of this object.
*
* @returns A JSON-serializable representation of this object.
*/

@@ -222,3 +230,3 @@ toJSON(): object;

* null. This is only available when the user is obtained from
* {@link auth.Auth.listUsers `listUsers()`}.
* {@link BaseAuth.listUsers}.
*/

@@ -231,4 +239,3 @@ readonly passwordHash?: string;

* be an empty string. If no password is set, this is null. This is only
* available when the user is obtained from
* {@link auth.Auth.listUsers `listUsers()`}.
* available when the user is obtained from {@link BaseAuth.listUsers}.
*/

@@ -239,4 +246,3 @@ readonly passwordSalt?: string;

* user roles and propagated to an authenticated user's ID token.
* This is set via
* {@link auth.Auth.setCustomUserClaims `setCustomUserClaims()`}
* This is set via {@link BaseAuth.setCustomUserClaims}
*/

@@ -253,3 +259,3 @@ readonly customClaims?: {

* This is updated every time the user's refresh token are revoked either
* from the {@link auth.Auth.revokeRefreshTokens `revokeRefreshTokens()`}
* from the {@link BaseAuth.revokeRefreshTokens}
* API or from the Firebase Auth backend on big account changes (password

@@ -264,5 +270,7 @@ * resets, password or email updates, etc).

/**
* @return A JSON-serializable representation of this object.
* Returns a JSON-serializable representation of this object.
*
* @returns A JSON-serializable representation of this object.
*/
toJSON(): object;
}

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -45,4 +45,4 @@ /*!

*
* @param {any} time The unix timestamp string or number in milliseconds.
* @return {string} The corresponding date as a UTC string, if valid. Otherwise, null.
* @param time The unix timestamp string or number in milliseconds.
* @returns The corresponding date as a UTC string, if valid. Otherwise, null.
*/

@@ -66,3 +66,3 @@ function parseDate(time) {

/**
* Interface representing the common properties of a user enrolled second factor.
* Interface representing the common properties of a user-enrolled second factor.
*/

@@ -99,3 +99,5 @@ var MultiFactorInfo = /** @class */ (function () {

/**
* @return A JSON-serializable representation of this object.
* Returns a JSON-serializable representation of this object.
*
* @returns A JSON-serializable representation of this object.
*/

@@ -138,3 +140,3 @@ MultiFactorInfo.prototype.toJSON = function () {

/**
* Interface representing a phone specific user enrolled second factor.
* Interface representing a phone specific user-enrolled second factor.
*/

@@ -167,3 +169,3 @@ var PhoneMultiFactorInfo = /** @class */ (function (_super) {

* @param response The server side response.
* @return The multi-factor ID associated with the provided response. If the response is
* @returns The multi-factor ID associated with the provided response. If the response is
* not associated with any known multi-factor ID, null is returned.

@@ -207,3 +209,5 @@ *

/**
* @return A JSON-serializable representation of this multi-factor object.
* Returns a JSON-serializable representation of this multi-factor object.
*
* @returns A JSON-serializable representation of this multi-factor object.
*/

@@ -239,3 +243,5 @@ MultiFactorSettings.prototype.toJSON = function () {

/**
* @return A JSON-serializable representation of this object.
* Returns a JSON-serializable representation of this object.
*
* @returns A JSON-serializable representation of this object.
*/

@@ -275,3 +281,5 @@ UserMetadata.prototype.toJSON = function () {

/**
* @return A JSON-serializable representation of this object.
* Returns a JSON-serializable representation of this object.
*
* @returns A JSON-serializable representation of this object.
*/

@@ -347,3 +355,5 @@ UserInfo.prototype.toJSON = function () {

/**
* @return A JSON-serializable representation of this object.
* Returns a JSON-serializable representation of this object.
*
* @returns A JSON-serializable representation of this object.
*/

@@ -350,0 +360,0 @@ UserRecord.prototype.toJSON = function () {

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -31,10 +31,6 @@ * Copyright 2020 Google Inc.

* Returns a credential created from the
* {@link
* https://developers.google.com/identity/protocols/application-default-credentials
* Google Application Default Credentials}
* {@link https://developers.google.com/identity/protocols/application-default-credentials |
* Google Application Default Credentials}
* that grants admin access to Firebase services. This credential can be used
* in the call to
* {@link
* https://firebase.google.com/docs/reference/admin/node/admin#.initializeApp
* `admin.initializeApp()`}.
* in the call to {@link firebase-admin.app#initializeApp}.
*

@@ -45,5 +41,3 @@ * Google Application Default Credentials are available on any Google

* See
* {@link
* https://firebase.google.com/docs/admin/setup#initialize_the_sdk
* Initialize the SDK}
* {@link https://firebase.google.com/docs/admin/setup#initialize_the_sdk | Initialize the SDK}
* for more details.

@@ -59,6 +53,6 @@ *

*
* @param {!Object=} httpAgent Optional [HTTP Agent](https://nodejs.org/api/http.html#http_class_http_agent)
* @param httpAgent Optional {@link https://nodejs.org/api/http.html#http_class_http_agent | HTTP Agent}
* to be used when retrieving access tokens from Google token servers.
*
* @return {!admin.credential.Credential} A credential authenticated via Google
* @returns A credential authenticated via Google
* Application Default Credentials that can be used to initialize an app.

@@ -70,11 +64,6 @@ */

* admin access to Firebase services. This credential can be used in the call
* to
* {@link
* https://firebase.google.com/docs/reference/admin/node/admin#.initializeApp
* `admin.initializeApp()`}.
* to {@link firebase-admin.app#initializeApp}.
*
* See
* {@link
* https://firebase.google.com/docs/admin/setup#initialize_the_sdk
* Initialize the SDK}
* {@link https://firebase.google.com/docs/admin/setup#initialize_the_sdk | Initialize the SDK}
* for more details.

@@ -107,6 +96,6 @@ *

* account key JSON file or an object representing a service account key.
* @param httpAgent Optional [HTTP Agent](https://nodejs.org/api/http.html#http_class_http_agent)
* @param httpAgent Optional {@link https://nodejs.org/api/http.html#http_class_http_agent | HTTP Agent}
* to be used when retrieving access tokens from Google token servers.
*
* @return A credential authenticated via the
* @returns A credential authenticated via the
* provided service account that can be used to initialize an app.

@@ -118,11 +107,6 @@ */

* admin access to Firebase services. This credential can be used in the call
* to
* {@link
* https://firebase.google.com/docs/reference/admin/node/admin#.initializeApp
* `admin.initializeApp()`}.
* to {@link firebase-admin.app#initializeApp}.
*
* See
* {@link
* https://firebase.google.com/docs/admin/setup#initialize_the_sdk
* Initialize the SDK}
* {@link https://firebase.google.com/docs/admin/setup#initialize_the_sdk | Initialize the SDK}
* for more details.

@@ -143,6 +127,6 @@ *

* refresh token.
* @param httpAgent Optional [HTTP Agent](https://nodejs.org/api/http.html#http_class_http_agent)
* @param httpAgent Optional {@link https://nodejs.org/api/http.html#http_class_http_agent | HTTP Agent}
* to be used when retrieving access tokens from Google token servers.
*
* @return A credential authenticated via the
* @returns A credential authenticated via the
* provided service account that can be used to initialize an app.

@@ -149,0 +133,0 @@ */

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -26,10 +26,6 @@ /*!

* Returns a credential created from the
* {@link
* https://developers.google.com/identity/protocols/application-default-credentials
* Google Application Default Credentials}
* {@link https://developers.google.com/identity/protocols/application-default-credentials |
* Google Application Default Credentials}
* that grants admin access to Firebase services. This credential can be used
* in the call to
* {@link
* https://firebase.google.com/docs/reference/admin/node/admin#.initializeApp
* `admin.initializeApp()`}.
* in the call to {@link firebase-admin.app#initializeApp}.
*

@@ -40,5 +36,3 @@ * Google Application Default Credentials are available on any Google

* See
* {@link
* https://firebase.google.com/docs/admin/setup#initialize_the_sdk
* Initialize the SDK}
* {@link https://firebase.google.com/docs/admin/setup#initialize_the_sdk | Initialize the SDK}
* for more details.

@@ -54,6 +48,6 @@ *

*
* @param {!Object=} httpAgent Optional [HTTP Agent](https://nodejs.org/api/http.html#http_class_http_agent)
* @param httpAgent Optional {@link https://nodejs.org/api/http.html#http_class_http_agent | HTTP Agent}
* to be used when retrieving access tokens from Google token servers.
*
* @return {!admin.credential.Credential} A credential authenticated via Google
* @returns A credential authenticated via Google
* Application Default Credentials that can be used to initialize an app.

@@ -65,11 +59,6 @@ */

* admin access to Firebase services. This credential can be used in the call
* to
* {@link
* https://firebase.google.com/docs/reference/admin/node/admin#.initializeApp
* `admin.initializeApp()`}.
* to {@link firebase-admin.app#initializeApp}.
*
* See
* {@link
* https://firebase.google.com/docs/admin/setup#initialize_the_sdk
* Initialize the SDK}
* {@link https://firebase.google.com/docs/admin/setup#initialize_the_sdk | Initialize the SDK}
* for more details.

@@ -102,6 +91,6 @@ *

* account key JSON file or an object representing a service account key.
* @param httpAgent Optional [HTTP Agent](https://nodejs.org/api/http.html#http_class_http_agent)
* @param httpAgent Optional {@link https://nodejs.org/api/http.html#http_class_http_agent | HTTP Agent}
* to be used when retrieving access tokens from Google token servers.
*
* @return A credential authenticated via the
* @returns A credential authenticated via the
* provided service account that can be used to initialize an app.

@@ -113,11 +102,6 @@ */

* admin access to Firebase services. This credential can be used in the call
* to
* {@link
* https://firebase.google.com/docs/reference/admin/node/admin#.initializeApp
* `admin.initializeApp()`}.
* to {@link firebase-admin.app#initializeApp}.
*
* See
* {@link
* https://firebase.google.com/docs/admin/setup#initialize_the_sdk
* Initialize the SDK}
* {@link https://firebase.google.com/docs/admin/setup#initialize_the_sdk | Initialize the SDK}
* for more details.

@@ -138,6 +122,6 @@ *

* refresh token.
* @param httpAgent Optional [HTTP Agent](https://nodejs.org/api/http.html#http_class_http_agent)
* @param httpAgent Optional {@link https://nodejs.org/api/http.html#http_class_http_agent | HTTP Agent}
* to be used when retrieving access tokens from Google token servers.
*
* @return A credential authenticated via the
* @returns A credential authenticated via the
* provided service account that can be used to initialize an app.

@@ -144,0 +128,0 @@ */

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -21,10 +21,8 @@ * Copyright 2021 Google Inc.

/**
* Gets the {@link database.Database `Database`} service for the default
* Gets the {@link firebase-admin.database#Database} service for the default
* app or a given app.
*
* `admin.database()` can be called with no arguments to access the default
* app's {@link database.Database `Database`} service or as
* `admin.database(app)` to access the
* {@link database.Database `Database`} service associated with a specific
* app.
* app's `Database` service or as `admin.database(app)` to access the
* `Database` service associated with a specific app.
*

@@ -49,3 +47,3 @@ * `admin.database` is also a namespace that can be used to access global

*
* @return The default `Database` service if no app
* @returns The default `Database` service if no app
* is provided or the `Database` service associated with the provided app.

@@ -55,15 +53,46 @@ */

export declare namespace database {
/**
* Type alias to {@link firebase-admin.database#Database}.
*/
type Database = TDatabase;
/**
* Type alias to {@link https://firebase.google.com/docs/reference/js/firebase.database.DataSnapshot | DataSnapshot}
* type from the `@firebase/database` package.
*/
type DataSnapshot = rtdb.DataSnapshot;
/**
* Type alias to the {@link https://firebase.google.com/docs/reference/js/firebase.database#eventtype | EventType}
* type from the `@firebase/database` package.
*/
type EventType = rtdb.EventType;
/**
* Type alias to {@link https://firebase.google.com/docs/reference/js/firebase.database.OnDisconnect | OnDisconnect}
* type from the `@firebase/database` package.
*/
type OnDisconnect = rtdb.OnDisconnect;
/**
* Type alias to {@link https://firebase.google.com/docs/reference/js/firebase.database.Query | Query}
* type from the `@firebase/database` package.
*/
type Query = rtdb.Query;
/**
* Type alias to {@link https://firebase.google.com/docs/reference/js/firebase.database.Reference | Reference}
* type from the `@firebase/database` package.
*/
type Reference = rtdb.Reference;
/**
* Type alias to {@link https://firebase.google.com/docs/reference/js/firebase.database.ThenableReference |
* ThenableReference} type from the `@firebase/database` package.
*/
type ThenableReference = rtdb.ThenableReference;
/**
* {@link https://firebase.google.com/docs/reference/js/firebase.database#enablelogging | enableLogging}
* function from the `@firebase/database` package.
*/
const enableLogging: typeof rtdb.enableLogging;
/**
* [`ServerValue`](https://firebase.google.com/docs/reference/js/firebase.database.ServerValue)
* module from the `@firebase/database` package.
* {@link https://firebase.google.com/docs/reference/js/firebase.database.ServerValue | ServerValue}
* constant from the `@firebase/database` package.
*/
const ServerValue: rtdb.ServerValue;
}

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -20,2 +20,7 @@ * Copyright 2020 Google Inc.

import { App } from '../app';
/**
* The Firebase Database service interface. Extends the
* {@link https://firebase.google.com/docs/reference/js/firebase.database.Database | Database}
* interface provided by the `@firebase/database` package.
*/
export interface Database extends FirebaseDatabase {

@@ -26,3 +31,3 @@ /**

*
* @return A promise fulfilled with the rules as a raw string.
* @returns A promise fulfilled with the rules as a raw string.
*/

@@ -34,3 +39,3 @@ getRules(): Promise<string>;

*
* @return A promise fulfilled with the parsed rules object.
* @returns A promise fulfilled with the parsed rules object.
*/

@@ -43,3 +48,3 @@ getRulesJSON(): Promise<object>;

* @param source Source of the rules to apply. Must not be `null` or empty.
* @return Resolves when the rules are set on the Realtime Database.
* @returns Resolves when the rules are set on the Realtime Database.
*/

@@ -50,12 +55,17 @@ setRules(source: string | Buffer | object): Promise<void>;

private readonly appInternal;
private tokenListener;
private tokenRefreshTimeout;
private databases;
constructor(app: App);
private get firebaseApp();
/**
* Returns the app associated with this DatabaseService instance.
*
* @return The app associated with this DatabaseService instance.
* @returns The app associated with this DatabaseService instance.
*/
get app(): App;
getDatabase(url?: string): Database;
private onTokenChange;
private scheduleTokenRefresh;
private ensureUrl;
}

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -26,2 +26,3 @@ /*!

var index_1 = require("../utils/index");
var TOKEN_REFRESH_THRESHOLD_MILLIS = 5 * 60 * 1000;
var DatabaseService = /** @class */ (function () {

@@ -38,2 +39,9 @@ function DatabaseService(app) {

}
Object.defineProperty(DatabaseService.prototype, "firebaseApp", {
get: function () {
return this.app;
},
enumerable: false,
configurable: true
});
/**

@@ -44,2 +52,6 @@ * @internal

var _this = this;
if (this.tokenListener) {
this.firebaseApp.INTERNAL.removeAuthTokenListener(this.tokenListener);
clearTimeout(this.tokenRefreshTimeout);
}
var promises = [];

@@ -59,3 +71,3 @@ for (var _i = 0, _a = Object.keys(this.databases); _i < _a.length; _i++) {

*
* @return The app associated with this DatabaseService instance.
* @returns The app associated with this DatabaseService instance.
*/

@@ -92,4 +104,32 @@ get: function () {

}
if (!this.tokenListener) {
this.tokenListener = this.onTokenChange.bind(this);
this.firebaseApp.INTERNAL.addAuthTokenListener(this.tokenListener);
}
return db;
};
// eslint-disable-next-line @typescript-eslint/no-unused-vars
DatabaseService.prototype.onTokenChange = function (_) {
var token = this.firebaseApp.INTERNAL.getCachedToken();
if (token) {
var delayMillis = token.expirationTime - TOKEN_REFRESH_THRESHOLD_MILLIS - Date.now();
// If the new token is set to expire soon (unlikely), do nothing. Somebody will eventually
// notice and refresh the token, at which point this callback will fire again.
if (delayMillis > 0) {
this.scheduleTokenRefresh(delayMillis);
}
}
};
DatabaseService.prototype.scheduleTokenRefresh = function (delayMillis) {
var _this = this;
clearTimeout(this.tokenRefreshTimeout);
this.tokenRefreshTimeout = setTimeout(function () {
_this.firebaseApp.INTERNAL.getToken(/*forceRefresh=*/ true)
.catch(function () {
// Ignore the error since this might just be an intermittent failure. If we really cannot
// refresh the token, an error will be logged once the existing token expires and we try
// to fetch a fresh one.
});
}, delayMillis);
};
DatabaseService.prototype.ensureUrl = function (url) {

@@ -117,2 +157,7 @@ if (typeof url !== 'undefined') {

var parsedUrl = new url_1.URL(dbUrl);
var emulatorHost = process.env.FIREBASE_DATABASE_EMULATOR_HOST;
if (emulatorHost) {
var namespace = extractNamespace(parsedUrl);
parsedUrl = new url_1.URL("http://" + emulatorHost + "?ns=" + namespace);
}
parsedUrl.pathname = path.join(parsedUrl.pathname, RULES_URL_PATH);

@@ -126,3 +171,3 @@ this.dbUrl = parsedUrl.toString();

*
* @return {Promise<string>} A promise fulfilled with the rules as a raw string.
* @returns A promise fulfilled with the rules as a raw string.
*/

@@ -150,3 +195,3 @@ DatabaseRulesClient.prototype.getRules = function () {

*
* @return {Promise<object>} A promise fulfilled with the parsed rules source.
* @returns {Promise<object>} A promise fulfilled with the parsed rules source.
*/

@@ -174,3 +219,3 @@ DatabaseRulesClient.prototype.getRulesJSON = function () {

* or empty.
* @return {Promise<void>} Resolves when the rules are set on the Database.
* @returns {Promise<void>} Resolves when the rules are set on the Database.
*/

@@ -228,1 +273,10 @@ DatabaseRulesClient.prototype.setRules = function (source) {

}());
function extractNamespace(parsedUrl) {
var ns = parsedUrl.searchParams.get('ns');
if (ns) {
return ns;
}
var hostname = parsedUrl.hostname;
var dotIndex = hostname.indexOf('.');
return hostname.substring(0, dotIndex).toLowerCase();
}

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -17,2 +17,7 @@ * Copyright 2020 Google Inc.

*/
/**
* Firebase Realtime Database.
*
* @packageDocumentation
*/
import * as rtdb from '@firebase/database-types';

@@ -24,3 +29,3 @@ import { App } from '../app';

/**
* [`enableLogging`](https://firebase.google.com/docs/reference/js/firebase.database#enablelogging)
* {@link https://firebase.google.com/docs/reference/js/firebase.database#enablelogging | enableLogging}
* function from the `@firebase/database` package.

@@ -30,15 +35,13 @@ */

/**
* [`ServerValue`](https://firebase.google.com/docs/reference/js/firebase.database.ServerValue)
* module from the `@firebase/database` package.
* {@link https://firebase.google.com/docs/reference/js/firebase.database.ServerValue | ServerValue}
* constant from the `@firebase/database` package.
*/
export declare const ServerValue: rtdb.ServerValue;
/**
* Gets the {@link database.Database `Database`} service for the default
* Gets the {@link Database} service for the default
* app or a given app.
*
* `getDatabase()` can be called with no arguments to access the default
* app's {@link database.Database `Database`} service or as
* `getDatabase(app)` to access the
* {@link database.Database `Database`} service associated with a specific
* app.
* app's `Database` service or as `getDatabase(app)` to access the
* `Database` service associated with a specific app.
*

@@ -60,3 +63,3 @@ * @example

*
* @return The default `Database` service if no app
* @returns The default `Database` service if no app
* is provided or the `Database` service associated with the provided app.

@@ -66,10 +69,8 @@ */

/**
* Gets the {@link database.Database `Database`} service for the default
* Gets the {@link Database} service for the default
* app or a given app.
*
* `getDatabaseWithUrl()` can be called with no arguments to access the default
* app's {@link database.Database `Database`} service or as
* `getDatabaseWithUrl(app)` to access the
* {@link database.Database `Database`} service associated with a specific
* app.
* app's {@link Database} service or as `getDatabaseWithUrl(app)` to access the
* {@link Database} service associated with a specific app.
*

@@ -91,5 +92,5 @@ * @example

*
* @return The default `Database` service if no app
* @returns The default `Database` service if no app
* is provided or the `Database` service associated with the provided app.
*/
export declare function getDatabaseWithUrl(url: string, app?: App): Database;

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -24,3 +24,3 @@ /*!

/**
* [`enableLogging`](https://firebase.google.com/docs/reference/js/firebase.database#enablelogging)
* {@link https://firebase.google.com/docs/reference/js/firebase.database#enablelogging | enableLogging}
* function from the `@firebase/database` package.

@@ -30,15 +30,13 @@ */

/**
* [`ServerValue`](https://firebase.google.com/docs/reference/js/firebase.database.ServerValue)
* module from the `@firebase/database` package.
* {@link https://firebase.google.com/docs/reference/js/firebase.database.ServerValue | ServerValue}
* constant from the `@firebase/database` package.
*/
exports.ServerValue = database_1.ServerValue;
/**
* Gets the {@link database.Database `Database`} service for the default
* Gets the {@link Database} service for the default
* app or a given app.
*
* `getDatabase()` can be called with no arguments to access the default
* app's {@link database.Database `Database`} service or as
* `getDatabase(app)` to access the
* {@link database.Database `Database`} service associated with a specific
* app.
* app's `Database` service or as `getDatabase(app)` to access the
* `Database` service associated with a specific app.
*

@@ -60,3 +58,3 @@ * @example

*
* @return The default `Database` service if no app
* @returns The default `Database` service if no app
* is provided or the `Database` service associated with the provided app.

@@ -69,10 +67,8 @@ */

/**
* Gets the {@link database.Database `Database`} service for the default
* Gets the {@link Database} service for the default
* app or a given app.
*
* `getDatabaseWithUrl()` can be called with no arguments to access the default
* app's {@link database.Database `Database`} service or as
* `getDatabaseWithUrl(app)` to access the
* {@link database.Database `Database`} service associated with a specific
* app.
* app's {@link Database} service or as `getDatabaseWithUrl(app)` to access the
* {@link Database} service associated with a specific app.
*

@@ -94,3 +90,3 @@ * @example

*
* @return The default `Database` service if no app
* @returns The default `Database` service if no app
* is provided or the `Database` service associated with the provided app.

@@ -97,0 +93,0 @@ */

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -18,2 +18,8 @@ * Copyright 2020 Google Inc.

/**
* Firebase namespaced API (legacy).
*
* @packageDocumentation
*/
export * from './firebase-namespace-api';

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -17,2 +17,3 @@ * Copyright 2021 Google Inc.

*/
import { appCheck } from './app-check/app-check-namespace';
import { auth } from './auth/auth-namespace';

@@ -29,3 +30,3 @@ import { database } from './database/database-namespace';

import { App as AppCore, AppOptions } from './app/index';
export { App, AppOptions, FirebaseError, FirebaseArrayIndexError } from './app/index';
export { AppOptions, FirebaseError, FirebaseArrayIndexError } from './app/index';
export declare namespace app {

@@ -43,2 +44,3 @@ /**

interface App extends AppCore {
appCheck(): appCheck.AppCheck;
auth(): auth.Auth;

@@ -75,2 +77,3 @@ database(url?: string): database.Database;

export * from './credential/index';
export { appCheck } from './app-check/app-check-namespace';
export { auth } from './auth/auth-namespace';

@@ -77,0 +80,0 @@ export { database } from './database/database-namespace';

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -30,2 +30,4 @@ /*!

__exportStar(require("./credential/index"), exports);
var app_check_namespace_1 = require("./app-check/app-check-namespace");
Object.defineProperty(exports, "appCheck", { enumerable: true, get: function () { return app_check_namespace_1.appCheck; } });
var auth_namespace_1 = require("./auth/auth-namespace");

@@ -32,0 +34,0 @@ Object.defineProperty(exports, "auth", { enumerable: true, get: function () { return auth_namespace_1.auth; } });

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -27,3 +27,3 @@ * @license

*
* @return The app associated with this Storage instance.
* @returns The app associated with this Storage instance.
*/

@@ -30,0 +30,0 @@ get app(): App;

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -34,3 +34,3 @@ /*!

*
* @return The app associated with this Storage instance.
* @returns The app associated with this Storage instance.
*/

@@ -37,0 +37,0 @@ get: function () {

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -3,0 +3,0 @@ * Copyright 2021 Google Inc.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -17,5 +17,37 @@ * Copyright 2020 Google Inc.

*/
import * as _firestore from '@google-cloud/firestore';
/**
* Cloud Firestore.
*
* @packageDocumentation
*/
import { Firestore } from '@google-cloud/firestore';
import { App } from '../app';
export { BulkWriter, BulkWriterOptions, CollectionGroup, CollectionReference, DocumentChangeType, DocumentData, DocumentReference, DocumentSnapshot, FieldPath, FieldValue, Firestore, FirestoreDataConverter, GeoPoint, GrpcStatus, Precondition, Query, QueryDocumentSnapshot, QueryPartition, QuerySnapshot, ReadOptions, Settings, Timestamp, Transaction, UpdateData, WriteBatch, WriteResult, v1, setLogFunction, } from '@google-cloud/firestore';
export declare function getFirestore(app?: App): _firestore.Firestore;
/**
* Gets the {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
* service for the default app or a given app.
*
* `getFirestore()` can be called with no arguments to access the default
* app's `Firestore` service or as `getFirestore(app)` to access the
* `Firestore` service associated with a specific app.
*
* @example
* ```javascript
* // Get the Firestore service for the default app
* const defaultFirestore = getFirestore();
* ```
*
* @example
* ```javascript
* // Get the Firestore service for a specific app
* const otherFirestore = getFirestore(app);
* ```
*
* @param App whose `Firestore` service to
* return. If not provided, the default `Firestore` service will be returned.
*
* @returns The default {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
* service if no app is provided or the `Firestore` service associated with the
* provided app.
*/
export declare function getFirestore(app?: App): Firestore;

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -43,2 +43,29 @@ /*!

Object.defineProperty(exports, "setLogFunction", { enumerable: true, get: function () { return firestore_1.setLogFunction; } });
/**
* Gets the {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
* service for the default app or a given app.
*
* `getFirestore()` can be called with no arguments to access the default
* app's `Firestore` service or as `getFirestore(app)` to access the
* `Firestore` service associated with a specific app.
*
* @example
* ```javascript
* // Get the Firestore service for the default app
* const defaultFirestore = getFirestore();
* ```
*
* @example
* ```javascript
* // Get the Firestore service for a specific app
* const otherFirestore = getFirestore(app);
* ```
*
* @param App whose `Firestore` service to
* return. If not provided, the default `Firestore` service will be returned.
*
* @returns The default {@link https://googleapis.dev/nodejs/firestore/latest/Firestore.html | Firestore}
* service if no app is provided or the `Firestore` service associated with the
* provided app.
*/
function getFirestore(app) {

@@ -45,0 +72,0 @@ if (typeof app === 'undefined') {

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -3,0 +3,0 @@ * @license

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -17,2 +17,7 @@ * Copyright 2020 Google Inc.

*/
/**
* Firebase Instance ID service.
*
* @packageDocumentation
*/
import { App } from '../app/index';

@@ -22,10 +27,7 @@ import { InstanceId } from './instance-id';

/**
* Gets the {@link InstanceId `InstanceId`} service for the
* default app or a given app.
* Gets the {@link InstanceId} service for the default app or a given app.
*
* `getInstanceId()` can be called with no arguments to access the default
* app's {@link InstanceId `InstanceId`} service or as
* `getInstanceId(app)` to access the
* {@link InstanceId `InstanceId`} service associated with a
* specific app.
* app's `InstanceId` service or as `getInstanceId(app)` to access the
* `InstanceId` service associated with a specific app.
*

@@ -48,3 +50,3 @@ * @example

*
* @return The default `InstanceId` service if
* @returns The default `InstanceId` service if
* no app is provided or the `InstanceId` service associated with the

@@ -51,0 +53,0 @@ * provided app.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -20,2 +20,7 @@ /*!

exports.getInstanceId = exports.InstanceId = void 0;
/**
* Firebase Instance ID service.
*
* @packageDocumentation
*/
var index_1 = require("../app/index");

@@ -25,10 +30,7 @@ var instance_id_1 = require("./instance-id");

/**
* Gets the {@link InstanceId `InstanceId`} service for the
* default app or a given app.
* Gets the {@link InstanceId} service for the default app or a given app.
*
* `getInstanceId()` can be called with no arguments to access the default
* app's {@link InstanceId `InstanceId`} service or as
* `getInstanceId(app)` to access the
* {@link InstanceId `InstanceId`} service associated with a
* specific app.
* app's `InstanceId` service or as `getInstanceId(app)` to access the
* `InstanceId` service associated with a specific app.
*

@@ -51,3 +53,3 @@ * @example

*
* @return The default `InstanceId` service if
* @returns The default `InstanceId` service if
* no app is provided or the `InstanceId` service associated with the

@@ -54,0 +56,0 @@ * provided app.

@@ -1,13 +0,11 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
import { App } from '../app/index';
import { InstanceId as TInstanceId } from './instance-id';
/**
* Gets the {@link instanceId.InstanceId `InstanceId`} service for the
* Gets the {@link firebase-admin.instance-id#InstanceId} service for the
* default app or a given app.
*
* `admin.instanceId()` can be called with no arguments to access the default
* app's {@link instanceId.InstanceId `InstanceId`} service or as
* `admin.instanceId(app)` to access the
* {@link instanceId.InstanceId `InstanceId`} service associated with a
* specific app.
* app's `InstanceId` service or as `admin.instanceId(app)` to access the
* `InstanceId` service associated with a specific app.
*

@@ -30,3 +28,3 @@ * @example

*
* @return The default `InstanceId` service if
* @returns The default `InstanceId` service if
* no app is provided or the `InstanceId` service associated with the

@@ -37,3 +35,6 @@ * provided app.

export declare namespace instanceId {
/**
* Type alias to {@link firebase-admin.instance-id#InstanceId}.
*/
type InstanceId = TInstanceId;
}

@@ -1,3 +0,3 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -38,4 +38,4 @@ * @license

*
* @param {ApiSettings} apiSettings The API endpoint settings to apply to request and response.
* @return {Promise<void>} A promise that resolves when the request is complete.
* @param apiSettings The API endpoint settings to apply to request and response.
* @returns A promise that resolves when the request is complete.
*/

@@ -42,0 +42,0 @@ private invokeRequestHandler;

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -66,4 +66,4 @@ /*!

*
* @param {ApiSettings} apiSettings The API endpoint settings to apply to request and response.
* @return {Promise<void>} A promise that resolves when the request is complete.
* @param apiSettings The API endpoint settings to apply to request and response.
* @returns A promise that resolves when the request is complete.
*/

@@ -70,0 +70,0 @@ FirebaseInstanceIdRequestHandler.prototype.invokeRequestHandler = function (apiSettings) {

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -31,3 +31,4 @@ * Copyright 2020 Google Inc.

* not delete Analytics data. See
* [Delete an Instance ID](/support/privacy/manage-iids#delete_an_instance_id)
* {@link https://firebase.google.com/support/privacy/manage-iids#delete_an_instance_id |
* Delete an Instance ID}
* for more information.

@@ -37,3 +38,3 @@ *

*
* @return A promise fulfilled when the instance ID is deleted.
* @returns A promise fulfilled when the instance ID is deleted.
*/

@@ -44,5 +45,5 @@ deleteInstanceId(instanceId: string): Promise<void>;

*
* @return The app associated with this InstanceId instance.
* @returns The app associated with this InstanceId instance.
*/
get app(): App;
}

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -46,3 +46,4 @@ /*!

* not delete Analytics data. See
* [Delete an Instance ID](/support/privacy/manage-iids#delete_an_instance_id)
* {@link https://firebase.google.com/support/privacy/manage-iids#delete_an_instance_id |
* Delete an Instance ID}
* for more information.

@@ -52,3 +53,3 @@ *

*
* @return A promise fulfilled when the instance ID is deleted.
* @returns A promise fulfilled when the instance ID is deleted.
*/

@@ -65,3 +66,3 @@ InstanceId.prototype.deleteInstanceId = function (instanceId) {

*
* @return The app associated with this InstanceId instance.
* @returns The app associated with this InstanceId instance.
*/

@@ -68,0 +69,0 @@ get: function () {

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -17,2 +17,7 @@ * Copyright 2020 Google Inc.

*/
/**
* Firebase Machine Learning.
*
* @packageDocumentation
*/
import { App } from '../app';

@@ -23,30 +28,27 @@ import { MachineLearning } from './machine-learning';

/**
* Gets the {@link machineLearning.MachineLearning `MachineLearning`} service for the
* default app or a given app.
* Gets the {@link MachineLearning} service for the default app or a given app.
*
* `getMachineLearning()` can be called with no arguments to access the
* default app's {@link machineLearning.MachineLearning
* `MachineLearning`} service or as `getMachineLearning(app)` to access
* the {@link machineLearning.MachineLearning `MachineLearning`}
* service associated with a specific app.
*
* @example
* ```javascript
* // Get the MachineLearning service for the default app
* const defaultMachineLearning = getMachineLearning();
* ```
*
* @example
* ```javascript
* // Get the MachineLearning service for a given app
* const otherMachineLearning = getMachineLearning(otherApp);
* ```
*
* @param app Optional app whose `MachineLearning` service to
* return. If not provided, the default `MachineLearning` service
* will be returned.
*
* @return The default `MachineLearning` service if no app is provided or the
* `MachineLearning` service associated with the provided app.
*/
* default app's {`MachineLearning` service or as `getMachineLearning(app)` to access
* the `MachineLearning` service associated with a specific app.
*
* @example
* ```javascript
* // Get the MachineLearning service for the default app
* const defaultMachineLearning = getMachineLearning();
* ```
*
* @example
* ```javascript
* // Get the MachineLearning service for a given app
* const otherMachineLearning = getMachineLearning(otherApp);
* ```
*
* @param app Optional app whose `MachineLearning` service to
* return. If not provided, the default `MachineLearning` service
* will be returned.
*
* @returns The default `MachineLearning` service if no app is provided or the
* `MachineLearning` service associated with the provided app.
*/
export declare function getMachineLearning(app?: App): MachineLearning;

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -20,2 +20,7 @@ /*!

exports.getMachineLearning = void 0;
/**
* Firebase Machine Learning.
*
* @packageDocumentation
*/
var app_1 = require("../app");

@@ -27,30 +32,27 @@ var machine_learning_1 = require("./machine-learning");

/**
* Gets the {@link machineLearning.MachineLearning `MachineLearning`} service for the
* default app or a given app.
* Gets the {@link MachineLearning} service for the default app or a given app.
*
* `getMachineLearning()` can be called with no arguments to access the
* default app's {@link machineLearning.MachineLearning
* `MachineLearning`} service or as `getMachineLearning(app)` to access
* the {@link machineLearning.MachineLearning `MachineLearning`}
* service associated with a specific app.
*
* @example
* ```javascript
* // Get the MachineLearning service for the default app
* const defaultMachineLearning = getMachineLearning();
* ```
*
* @example
* ```javascript
* // Get the MachineLearning service for a given app
* const otherMachineLearning = getMachineLearning(otherApp);
* ```
*
* @param app Optional app whose `MachineLearning` service to
* return. If not provided, the default `MachineLearning` service
* will be returned.
*
* @return The default `MachineLearning` service if no app is provided or the
* `MachineLearning` service associated with the provided app.
*/
* default app's {`MachineLearning` service or as `getMachineLearning(app)` to access
* the `MachineLearning` service associated with a specific app.
*
* @example
* ```javascript
* // Get the MachineLearning service for the default app
* const defaultMachineLearning = getMachineLearning();
* ```
*
* @example
* ```javascript
* // Get the MachineLearning service for a given app
* const otherMachineLearning = getMachineLearning(otherApp);
* ```
*
* @param app Optional app whose `MachineLearning` service to
* return. If not provided, the default `MachineLearning` service
* will be returned.
*
* @returns The default `MachineLearning` service if no app is provided or the
* `MachineLearning` service associated with the provided app.
*/
function getMachineLearning(app) {

@@ -57,0 +59,0 @@ if (typeof app === 'undefined') {

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -3,0 +3,0 @@ * Copyright 2020 Google Inc.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -21,10 +21,8 @@ * Copyright 2021 Google Inc.

/**
* Gets the {@link machineLearning.MachineLearning `MachineLearning`} service for the
* Gets the {@link firebase-admin.machine-learning#MachineLearning} service for the
* default app or a given app.
*
* `admin.machineLearning()` can be called with no arguments to access the
* default app's {@link machineLearning.MachineLearning
* `MachineLearning`} service or as `admin.machineLearning(app)` to access
* the {@link machineLearning.MachineLearning `MachineLearning`}
* service associated with a specific app.
* default app's `MachineLearning` service or as `admin.machineLearning(app)` to access
* the `MachineLearning` service associated with a specific app.
*

@@ -47,3 +45,3 @@ * @example

*
* @return The default `MachineLearning` service if no app is provided or the
* @returns The default `MachineLearning` service if no app is provided or the
* `MachineLearning` service associated with the provided app.

@@ -53,11 +51,38 @@ */

export declare namespace machineLearning {
/**
* Type alias to {@link firebase-admin.machine-learning#ListModelsResult}.
*/
type ListModelsResult = TListModelsResult;
/**
* Type alias to {@link firebase-admin.machine-learning#MachineLearning}.
*/
type MachineLearning = TMachineLearning;
/**
* Type alias to {@link firebase-admin.machine-learning#Model}.
*/
type Model = TModel;
/**
* Type alias to {@link firebase-admin.machine-learning#TFLiteModel}.
*/
type TFLiteModel = TTFLiteModel;
/**
* Type alias to {@link firebase-admin.machine-learning#AutoMLTfliteModelOptions}.
*/
type AutoMLTfliteModelOptions = TAutoMLTfliteModelOptions;
/**
* Type alias to {@link firebase-admin.machine-learning#GcsTfliteModelOptions}.
*/
type GcsTfliteModelOptions = TGcsTfliteModelOptions;
/**
* Type alias to {@link firebase-admin.machine-learning#ListModelsOptions}.
*/
type ListModelsOptions = TListModelsOptions;
/**
* Type alias to {@link firebase-admin.machine-learning#ModelOptions}.
*/
type ModelOptions = TModelOptions;
/**
* Type alias to {@link firebase-admin.machine-learning#ModelOptionsBase}.
*/
type ModelOptionsBase = TModelOptionsBase;
}

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -3,0 +3,0 @@ * Copyright 2020 Google Inc.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -53,3 +53,3 @@ * Copyright 2020 Google Inc.

/**
* The {@link app.App} associated with the current `MachineLearning`
* The {@link firebase-admin.app#App} associated with the current `MachineLearning`
* service instance.

@@ -63,3 +63,3 @@ */

*
* @return A Promise fulfilled with the created model.
* @returns A Promise fulfilled with the created model.
*/

@@ -73,3 +73,3 @@ createModel(model: ModelOptions): Promise<Model>;

*
* @return A Promise fulfilled with the updated model.
* @returns A Promise fulfilled with the updated model.
*/

@@ -84,3 +84,3 @@ updateModel(modelId: string, model: ModelOptions): Promise<Model>;

*
* @return A Promise fulfilled with the published model.
* @returns A Promise fulfilled with the published model.
*/

@@ -93,3 +93,3 @@ publishModel(modelId: string): Promise<Model>;

*
* @return A Promise fulfilled with the unpublished model.
* @returns A Promise fulfilled with the unpublished model.
*/

@@ -102,3 +102,3 @@ unpublishModel(modelId: string): Promise<Model>;

*
* @return A Promise fulfilled with the model object.
* @returns A Promise fulfilled with the model object.
*/

@@ -111,3 +111,3 @@ getModel(modelId: string): Promise<Model>;

*
* @return A promise that
* @returns A promise that
* resolves with the current (filtered) list of models and the next page

@@ -183,3 +183,3 @@ * token. For the last page, an empty list of models and no page token

*
* @return A promise that resolves when the model is unlocked
* @returns A promise that resolves when the model is unlocked
* or the maximum wait time has passed.

@@ -186,0 +186,0 @@ */

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -49,3 +49,3 @@ /*!

/**
* The {@link app.App} associated with the current `MachineLearning`
* The {@link firebase-admin.app#App} associated with the current `MachineLearning`
* service instance.

@@ -64,3 +64,3 @@ */

*
* @return A Promise fulfilled with the created model.
* @returns A Promise fulfilled with the created model.
*/

@@ -80,3 +80,3 @@ MachineLearning.prototype.createModel = function (model) {

*
* @return A Promise fulfilled with the updated model.
* @returns A Promise fulfilled with the updated model.
*/

@@ -98,3 +98,3 @@ MachineLearning.prototype.updateModel = function (modelId, model) {

*
* @return A Promise fulfilled with the published model.
* @returns A Promise fulfilled with the published model.
*/

@@ -109,3 +109,3 @@ MachineLearning.prototype.publishModel = function (modelId) {

*
* @return A Promise fulfilled with the unpublished model.
* @returns A Promise fulfilled with the unpublished model.
*/

@@ -120,3 +120,3 @@ MachineLearning.prototype.unpublishModel = function (modelId) {

*
* @return A Promise fulfilled with the model object.
* @returns A Promise fulfilled with the model object.
*/

@@ -133,3 +133,3 @@ MachineLearning.prototype.getModel = function (modelId) {

*
* @return A promise that
* @returns A promise that
* resolves with the current (filtered) list of models and the next page

@@ -360,3 +360,3 @@ * token. For the last page, an empty list of models and no page token

*
* @return A promise that resolves when the model is unlocked
* @returns A promise that resolves when the model is unlocked
* or the maximum wait time has passed.

@@ -363,0 +363,0 @@ */

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -50,4 +50,4 @@ * Copyright 2019 Google Inc.

*
* @param {SubRequest[]} requests An array of sub requests to send.
* @return {Promise<HttpResponse[]>} A promise that resolves when the send operation is complete.
* @param requests An array of sub requests to send.
* @returns A promise that resolves when the send operation is complete.
*/

@@ -54,0 +54,0 @@ send(requests: SubRequest[]): Promise<HttpResponse[]>;

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -47,4 +47,4 @@ /*!

*
* @param {SubRequest[]} requests An array of sub requests to send.
* @return {Promise<HttpResponse[]>} A promise that resolves when the send operation is complete.
* @param requests An array of sub requests to send.
* @returns A promise that resolves when the send operation is complete.
*/

@@ -93,6 +93,6 @@ BatchRequestClient.prototype.send = function (requests) {

*
* @param {SubRequest} request A sub request that will be used to populate the part.
* @param {string} boundary Multipart boundary string.
* @param {number} idx An index number that is used to set the content-id header.
* @return {string} The part as a string that can be included in the HTTP body.
* @param request A sub request that will be used to populate the part.
* @param boundary Multipart boundary string.
* @param idx An index number that is used to set the content-id header.
* @returns The part as a string that can be included in the HTTP body.
*/

@@ -115,4 +115,4 @@ function createPart(request, boundary, idx) {

*
* @param request {SubRequest} The sub request to be serialized.
* @return {string} String representation of the SubRequest.
* @param request The sub request to be serialized.
* @returns String representation of the SubRequest.
*/

@@ -119,0 +119,0 @@ function serializeSubRequest(request) {

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -17,2 +17,7 @@ * Copyright 2020 Google Inc.

*/
/**
* Firebase Cloud Messaging (FCM).
*
* @packageDocumentation
*/
import { App } from '../app';

@@ -23,10 +28,7 @@ import { Messaging } from './messaging';

/**
* Gets the {@link messaging.Messaging `Messaging`} service for the
* default app or a given app.
* Gets the {@link Messaging} service for the default app or a given app.
*
* `admin.messaging()` can be called with no arguments to access the default
* app's {@link messaging.Messaging `Messaging`} service or as
* `admin.messaging(app)` to access the
* {@link messaging.Messaging `Messaging`} service associated with a
* specific app.
* app's `Messaging` service or as `admin.messaging(app)` to access the
* `Messaging` service associated with aspecific app.
*

@@ -48,3 +50,3 @@ * @example

*
* @return The default `Messaging` service if no
* @returns The default `Messaging` service if no
* app is provided or the `Messaging` service associated with the provided

@@ -51,0 +53,0 @@ * app.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -20,2 +20,7 @@ /*!

exports.getMessaging = void 0;
/**
* Firebase Cloud Messaging (FCM).
*
* @packageDocumentation
*/
var app_1 = require("../app");

@@ -26,10 +31,7 @@ var messaging_1 = require("./messaging");

/**
* Gets the {@link messaging.Messaging `Messaging`} service for the
* default app or a given app.
* Gets the {@link Messaging} service for the default app or a given app.
*
* `admin.messaging()` can be called with no arguments to access the default
* app's {@link messaging.Messaging `Messaging`} service or as
* `admin.messaging(app)` to access the
* {@link messaging.Messaging `Messaging`} service associated with a
* specific app.
* app's `Messaging` service or as `admin.messaging(app)` to access the
* `Messaging` service associated with aspecific app.
*

@@ -51,3 +53,3 @@ * @example

*
* @return The default `Messaging` service if no
* @returns The default `Messaging` service if no
* app is provided or the `Messaging` service associated with the provided

@@ -54,0 +56,0 @@ * app.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -35,6 +35,6 @@ * @license

*
* @param {string} host The host to which to send the request.
* @param {string} path The path to which to send the request.
* @param {object} requestData The request data.
* @return {Promise<object>} A promise that resolves with the response.
* @param host The host to which to send the request.
* @param path The path to which to send the request.
* @param requestData The request data.
* @returns A promise that resolves with the response.
*/

@@ -46,4 +46,4 @@ invokeRequestHandler(host: string, path: string, requestData: object): Promise<object>;

*
* @param {SubRequest[]} requests An array of sub requests to send.
* @return {Promise<BatchResponse>} A promise that resolves when the send operation is complete.
* @param requests An array of sub requests to send.
* @returns A promise that resolves when the send operation is complete.
*/

@@ -50,0 +50,0 @@ sendBatchRequest(requests: SubRequest[]): Promise<BatchResponse>;

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -51,6 +51,6 @@ /*!

*
* @param {string} host The host to which to send the request.
* @param {string} path The path to which to send the request.
* @param {object} requestData The request data.
* @return {Promise<object>} A promise that resolves with the response.
* @param host The host to which to send the request.
* @param path The path to which to send the request.
* @param requestData The request data.
* @returns A promise that resolves with the response.
*/

@@ -90,4 +90,4 @@ FirebaseMessagingRequestHandler.prototype.invokeRequestHandler = function (host, path, requestData) {

*
* @param {SubRequest[]} requests An array of sub requests to send.
* @return {Promise<BatchResponse>} A promise that resolves when the send operation is complete.
* @param requests An array of sub requests to send.
* @returns A promise that resolves when the send operation is complete.
*/

@@ -94,0 +94,0 @@ FirebaseMessagingRequestHandler.prototype.sendBatchRequest = function (requests) {

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -39,3 +39,3 @@ * @license

/**
* Payload for the admin.messaging.send() operation. The payload contains all the fields
* Payload for the {@link Messaging.send} operation. The payload contains all the fields
* in the BaseMessage type, and exactly one of token, topic or condition.

@@ -45,3 +45,3 @@ */

/**
* Payload for the admin.messaing.sendMulticast() method. The payload contains all the fields
* Payload for the {@link Messaging.sendMulticast} method. The payload contains all the fields
* in the BaseMessage type, and a list of tokens.

@@ -53,3 +53,3 @@ */

/**
* A notification that can be included in {@link messaging.Message}.
* A notification that can be included in {@link Message}.
*/

@@ -81,3 +81,3 @@ export interface Notification {

* Represents the WebPush protocol options that can be included in an
* {@link messaging.Message}.
* {@link Message}.
*/

@@ -88,3 +88,3 @@ export interface WebpushConfig {

*
* See [WebPush specification](https://tools.ietf.org/html/rfc8030#section-5)
* See {@link https://tools.ietf.org/html/rfc8030#section-5 | WebPush specification}
* for supported headers.

@@ -122,5 +122,5 @@ */

* Represents the WebPush-specific notification options that can be included in
* {@link messaging.WebpushConfig}. This supports most of the standard
* {@link WebpushConfig}. This supports most of the standard
* options as defined in the Web Notification
* [specification](https://developer.mozilla.org/en-US/docs/Web/API/notification/Notification).
* {@link https://developer.mozilla.org/en-US/docs/Web/API/notification/Notification | specification}.
*/

@@ -216,5 +216,5 @@ export interface WebpushNotification {

* Represents the APNs-specific options that can be included in an
* {@link messaging.Message}. Refer to
* [Apple documentation](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html)
* for various headers and payload fields supported by APNs.
* {@link Message}. Refer to
* {@link https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html |
* Apple documentation} for various headers and payload fields supported by APNs.
*/

@@ -249,4 +249,4 @@ export interface ApnsConfig {

/**
* Represents the [aps dictionary](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/PayloadKeyReference.html)
* that is part of APNs messages.
* Represents the {@link https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/PayloadKeyReference.html |
* aps dictionary} that is part of APNs messages.
*/

@@ -336,3 +336,3 @@ export interface Aps {

* Represents the Android-specific options that can be included in an
* {@link messaging.Message}.
* {@link Message}.
*/

@@ -379,3 +379,3 @@ export interface AndroidConfig {

* Represents the Android-specific notification options that can be included in
* {@link messaging.AndroidConfig}.
* {@link AndroidConfig}.
*/

@@ -473,3 +473,4 @@ export interface AndroidNotification {

* a Wear OS watch. This hint can be set to recommend this notification not be bridged.
* See [Wear OS guides](https://developer.android.com/training/wearables/notifications/bridger#existing-method-of-preventing-bridging)
* See {@link https://developer.android.com/training/wearables/notifications/bridger#existing-method-of-preventing-bridging |
* Wear OS guides}.
*/

@@ -496,4 +497,4 @@ localOnly?: boolean;

* If set to `true`, use the Android framework's default vibrate pattern for the
* notification. Default values are specified in [`config.xml`](https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml).
* If `default_vibrate_timings` is set to `true` and `vibrate_timings` is also set,
* notification. Default values are specified in {@link https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml |
* config.xml}. If `default_vibrate_timings` is set to `true` and `vibrate_timings` is also set,
* the default value is used instead of the user-specified `vibrate_timings`.

@@ -504,3 +505,4 @@ */

* If set to `true`, use the Android framework's default sound for the notification.
* Default values are specified in [`config.xml`](https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml).
* Default values are specified in {@link https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml |
* config.xml}.
*/

@@ -515,3 +517,4 @@ defaultSound?: boolean;

* If set to `true`, use the Android framework's default LED light settings
* for the notification. Default values are specified in [`config.xml`](https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml).
* for the notification. Default values are specified in {@link https://android.googlesource.com/platform/frameworks/base/+/master/core/res/res/values/config.xml |
* config.xml}.
* If `default_light_settings` is set to `true` and `light_settings` is also set,

@@ -528,3 +531,4 @@ * the user-specified `light_settings` is used instead of the default value.

* Sets the number of items this notification represents. May be displayed as a
* badge count for Launchers that support badging. See [`NotificationBadge`(https://developer.android.com/training/notify-user/badges).
* badge count for Launchers that support badging. See {@link https://developer.android.com/training/notify-user/badges |
* NotificationBadge}.
* For example, this might be useful if you're using just one notification to

@@ -540,3 +544,3 @@ * represent multiple new messages but you want the count here to represent

* Represents settings to control notification LED that can be included in
* {@link messaging.AndroidNotification}.
* {@link AndroidNotification}.
*/

@@ -572,6 +576,8 @@ export interface LightSettings {

*
* * `"from"`
* * Anything starting with `"google."`.
* <ul>
* <li><code>from</code></li>
* <li>Anything starting with <code>google.</code></li>
* </ul>
*
* See [Build send requests](/docs/cloud-messaging/send-message)
* See {@link https://firebase.google.com/docs/cloud-messaging/send-message | Build send requests}
* for code samples and detailed documentation.

@@ -587,3 +593,3 @@ */

*
* See [Build send requests](/docs/cloud-messaging/send-message)
* See {@link https://firebase.google.com/docs/cloud-messaging/send-message | Build send requests}
* for code samples and detailed documentation.

@@ -657,9 +663,10 @@ */

* **iOS:** Corresponds to `loc-key` in the APNs payload. See
* [Payload Key Reference](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/PayloadKeyReference.html)
* and
* [Localizing the Content of Your Remote Notifications](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CreatingtheNotificationPayload.html#//apple_ref/doc/uid/TP40008194-CH10-SW9)
* for more information.
* {@link https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/PayloadKeyReference.html |
* Payload Key Reference} and
* {@link https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CreatingtheNotificationPayload.html#//apple_ref/doc/uid/TP40008194-CH10-SW9 |
* Localizing the Content of Your Remote Notifications} for more information.
*
* **Android:** See
* [String Resources](http://developer.android.com/guide/topics/resources/string-resource.html) * for more information.
* {@link http://developer.android.com/guide/topics/resources/string-resource.html | String Resources}
* for more information.
*

@@ -677,10 +684,10 @@ * **Platforms:** iOS, Android

* **iOS:** Corresponds to `loc-args` in the APNs payload. See
* [Payload Key Reference](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/PayloadKeyReference.html)
* and
* [Localizing the Content of Your Remote Notifications](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CreatingtheNotificationPayload.html#//apple_ref/doc/uid/TP40008194-CH10-SW9)
* for more information.
* {@link https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/PayloadKeyReference.html |
* Payload Key Reference} and
* {@link https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CreatingtheNotificationPayload.html#//apple_ref/doc/uid/TP40008194-CH10-SW9 |
* Localizing the Content of Your Remote Notifications} for more information.
*
* **Android:** See
* [Formatting and Styling](http://developer.android.com/guide/topics/resources/string-resource.html#FormattingAndStyling)
* for more information.
* {@link http://developer.android.com/guide/topics/resources/string-resource.html#FormattingAndStyling |
* Formatting and Styling} for more information.
*

@@ -703,9 +710,9 @@ * **Platforms:** iOS, Android

* **iOS:** Corresponds to `title-loc-key` in the APNs payload. See
* [Payload Key Reference](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/PayloadKeyReference.html)
* and
* [Localizing the Content of Your Remote Notifications](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CreatingtheNotificationPayload.html#//apple_ref/doc/uid/TP40008194-CH10-SW9)
* for more information.
* {@link https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/PayloadKeyReference.html |
* Payload Key Reference} and
* {@link https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CreatingtheNotificationPayload.html#//apple_ref/doc/uid/TP40008194-CH10-SW9 |
* Localizing the Content of Your Remote Notifications} for more information.
*
* **Android:** See
* [String Resources](http://developer.android.com/guide/topics/resources/string-resource.html)
* {@link http://developer.android.com/guide/topics/resources/string-resource.html | String Resources}
* for more information.

@@ -724,10 +731,10 @@ *

* **iOS:** Corresponds to `title-loc-args` in the APNs payload. See
* [Payload Key Reference](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/PayloadKeyReference.html)
* and
* [Localizing the Content of Your Remote Notifications](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CreatingtheNotificationPayload.html#//apple_ref/doc/uid/TP40008194-CH10-SW9)
* for more information.
* {@link https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/PayloadKeyReference.html |
* Payload Key Reference} and
* {@link https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CreatingtheNotificationPayload.html#//apple_ref/doc/uid/TP40008194-CH10-SW9 |
* Localizing the Content of Your Remote Notifications} for more information.
*
* **Android:** See
* [Formatting and Styling](http://developer.android.com/guide/topics/resources/string-resource.html#FormattingAndStyling)
* for more information.
* {@link http://developer.android.com/guide/topics/resources/string-resource.html#FormattingAndStyling |
* Formatting and Styling} for more information.
*

@@ -743,4 +750,3 @@ * **Platforms:** iOS, Android

*
* See
* [Build send requests](/docs/cloud-messaging/send-message)
* See {@link https://firebase.google.com/docs/cloud-messaging/send-message | Build send requests}
* for code samples and detailed documentation.

@@ -762,3 +768,3 @@ */

*
* See [Build send requests](/docs/cloud-messaging/send-message)
* See {@link https://firebase.google.com/docs/cloud-messaging/send-message | Build send requests}
* for code samples and detailed documentation.

@@ -789,3 +795,4 @@ */

* For more information, see
* [Setting the priority of a message](/docs/cloud-messaging/concept-options#setting-the-priority-of-a-message).
* {@link https://firebase.google.com/docs/cloud-messaging/concept-options#setting-the-priority-of-a-message |
* Setting the priority of a message}.
*

@@ -800,3 +807,3 @@ * **Default value:** `"high"` for notification messages, `"normal"` for data

* value is also four weeks. For more information, see
* [Setting the lifespan of a message](/docs/cloud-messaging/concept-options#ttl).
* {@link https://firebase.google.com/docs/cloud-messaging/concept-options#ttl | Setting the lifespan of a message}.
*

@@ -826,3 +833,4 @@ * **Default value:** `2419200` (representing four weeks, in seconds)

* notification can be modified before it is displayed, using a
* [Notification Service app extension](https://developer.apple.com/reference/usernotifications/unnotificationserviceextension)
* {@link https://developer.apple.com/reference/usernotifications/unnotificationserviceextension |
* Notification Service app extension}.
*

@@ -873,4 +881,4 @@ * On Android and Web, this parameter will be ignored.

* See
* [Send to individual devices](/docs/cloud-messaging/admin/send-messages#send_to_individual_devices)
* for code samples and detailed documentation.
* {@link https://firebase.google.com/docs/cloud-messaging/admin/send-messages#send_to_individual_devices |
* Send to individual devices} for code samples and detailed documentation.
*/

@@ -885,9 +893,8 @@ export interface MessagingDevicesResponse {

/**
* Interface representing the server response from the
* {@link messaging.Messaging.sendToDeviceGroup `sendToDeviceGroup()`}
* Interface representing the server response from the {@link Messaging.sendToDeviceGroup}
* method.
*
* See
* [Send messages to device groups](/docs/cloud-messaging/send-message?authuser=0#send_messages_to_device_groups)
* for code samples and detailed documentation.
* {@link https://firebase.google.com/docs/cloud-messaging/send-message?authuser=0#send_messages_to_device_groups |
* Send messages to device groups} for code samples and detailed documentation.
*/

@@ -909,8 +916,7 @@ export interface MessagingDeviceGroupResponse {

/**
* Interface representing the server response from the legacy
* {@link messaging.Messaging.sendToTopic `sendToTopic()`} method.
* Interface representing the server response from the legacy {@link Messaging.sendToTopic} method.
*
* See
* [Send to a topic](/docs/cloud-messaging/admin/send-messages#send_to_a_topic)
* for code samples and detailed documentation.
* {@link https://firebase.google.com/docs/cloud-messaging/admin/send-messages#send_to_a_topic |
* Send to a topic} for code samples and detailed documentation.
*/

@@ -926,7 +932,7 @@ export interface MessagingTopicResponse {

* Interface representing the server response from the legacy
* {@link messaging.Messaging.sendToCondition `sendToCondition()`} method.
* {@link Messaging.sendToCondition} method.
*
* See
* [Send to a condition](/docs/cloud-messaging/admin/send-messages#send_to_a_condition)
* for code samples and detailed documentation.
* {@link https://firebase.google.com/docs/cloud-messaging/admin/send-messages#send_to_a_condition |
* Send to a condition} for code samples and detailed documentation.
*/

@@ -942,9 +948,8 @@ export interface MessagingConditionResponse {

* Interface representing the server response from the
* {@link messaging.Messaging.subscribeToTopic `subscribeToTopic()`} and
* {@link messaging.Messaging.unsubscribeFromTopic `unsubscribeFromTopic()`}
* {@link Messaging.subscribeToTopic} and {@link Messaging.unsubscribeFromTopic}
* methods.
*
* See
* [Manage topics from the server](/docs/cloud-messaging/manage-topics)
* for code samples and detailed documentation.
* {@link https://firebase.google.com/docs/cloud-messaging/manage-topics |
* Manage topics from the server} for code samples and detailed documentation.
*/

@@ -964,3 +969,3 @@ export interface MessagingTopicManagementResponse {

* An array of errors corresponding to the provided registration token(s). The
* length of this array will be equal to [`failureCount`](#failureCount).
* length of this array will be equal to {@link MessagingTopicManagementResponse.failureCount}.
*/

@@ -971,4 +976,3 @@ errors: FirebaseArrayIndexError[];

* Interface representing the server response from the
* {@link messaging.Messaging.sendAll `sendAll()`} and
* {@link messaging.Messaging.sendMulticast `sendMulticast()`} methods.
* {@link Messaging.sendAll} and {@link Messaging.sendMulticast} methods.
*/

@@ -975,0 +979,0 @@ export interface BatchResponse {

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -23,10 +23,10 @@ * Copyright 2019 Google Inc.

*
* @param {HttpError} err The HttpError to convert into a Firebase error
* @return {FirebaseMessagingError} A Firebase error that can be returned to the user.
* @param err The HttpError to convert into a Firebase error
* @returns A Firebase error that can be returned to the user.
*/
export declare function createFirebaseError(err: HttpError): FirebaseMessagingError;
/**
* @param {object} response The response to check for errors.
* @return {string|null} The error code if present; null otherwise.
* @param response The response to check for errors.
* @returns The error code if present; null otherwise.
*/
export declare function getErrorCode(response: any): string | null;

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -26,4 +26,4 @@ /*!

*
* @param {HttpError} err The HttpError to convert into a Firebase error
* @return {FirebaseMessagingError} A Firebase error that can be returned to the user.
* @param err The HttpError to convert into a Firebase error
* @returns A Firebase error that can be returned to the user.
*/

@@ -66,4 +66,4 @@ function createFirebaseError(err) {

/**
* @param {object} response The response to check for errors.
* @return {string|null} The error code if present; null otherwise.
* @param response The response to check for errors.
* @returns The error code if present; null otherwise.
*/

@@ -98,4 +98,4 @@ function getErrorCode(response) {

*
* @param {object} response The response to check for errors.
* @return {string|null} The error message if present; null otherwise.
* @param response The response to check for errors.
* @returns The error message if present; null otherwise.
*/

@@ -102,0 +102,0 @@ function getErrorMessage(response) {

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -3,0 +3,0 @@ * Copyright 2020 Google Inc.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -318,3 +318,3 @@ /*!

*
* @param {AndroidConfig} config An object to be validated.
* @param config An object to be validated.
*/

@@ -491,4 +491,4 @@ function validateAndroidConfig(config) {

*
* @param {number} milliseconds The duration in milliseconds.
* @return {string} The resulting formatted string in seconds with up to nine fractional
* @param milliseconds The duration in milliseconds.
* @returns The resulting formatted string in seconds with up to nine fractional
* digits, terminated by 's'.

@@ -495,0 +495,0 @@ */

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -21,10 +21,8 @@ * Copyright 2021 Google Inc.

/**
* Gets the {@link messaging.Messaging `Messaging`} service for the
* Gets the {@link firebase-admin.messaging#Messaging} service for the
* default app or a given app.
*
* `admin.messaging()` can be called with no arguments to access the default
* app's {@link messaging.Messaging `Messaging`} service or as
* `admin.messaging(app)` to access the
* {@link messaging.Messaging `Messaging`} service associated with a
* specific app.
* app's `Messaging` service or as `admin.messaging(app)` to access the
* `Messaging` service associated with a specific app.
*

@@ -46,3 +44,3 @@ * @example

*
* @return The default `Messaging` service if no
* @returns The default `Messaging` service if no
* app is provided or the `Messaging` service associated with the provided

@@ -53,35 +51,134 @@ * app.

export declare namespace messaging {
/**
* Type alias to {@link firebase-admin.messaging#Messaging}.
*/
type Messaging = TMessaging;
/**
* Type alias to {@link firebase-admin.messaging#AndroidConfig}.
*/
type AndroidConfig = TAndroidConfig;
/**
* Type alias to {@link firebase-admin.messaging#AndroidFcmOptions}.
*/
type AndroidFcmOptions = TAndroidFcmOptions;
/**
* Type alias to {@link firebase-admin.messaging#AndroidNotification}.
*/
type AndroidNotification = TAndroidNotification;
/**
* Type alias to {@link firebase-admin.messaging#ApnsConfig}.
*/
type ApnsConfig = TApnsConfig;
/**
* Type alias to {@link firebase-admin.messaging#ApnsFcmOptions}.
*/
type ApnsFcmOptions = TApnsFcmOptions;
/**
* Type alias to {@link firebase-admin.messaging#ApnsPayload}.
*/
type ApnsPayload = TApnsPayload;
/**
* Type alias to {@link firebase-admin.messaging#Aps}.
*/
type Aps = TAps;
/**
* Type alias to {@link firebase-admin.messaging#ApsAlert}.
*/
type ApsAlert = TApsAlert;
/**
* Type alias to {@link firebase-admin.messaging#BatchResponse}.
*/
type BatchResponse = TBatchResponse;
/**
* Type alias to {@link firebase-admin.messaging#CriticalSound}.
*/
type CriticalSound = TCriticalSound;
/**
* Type alias to {@link firebase-admin.messaging#ConditionMessage}.
*/
type ConditionMessage = TConditionMessage;
/**
* Type alias to {@link firebase-admin.messaging#FcmOptions}.
*/
type FcmOptions = TFcmOptions;
/**
* Type alias to {@link firebase-admin.messaging#LightSettings}.
*/
type LightSettings = TLightSettings;
/**
* Type alias to {@link firebase-admin.messaging#Message}.
*/
type Message = TMessage;
/**
* Type alias to {@link firebase-admin.messaging#MessagingTopicManagementResponse}.
*/
type MessagingTopicManagementResponse = TMessagingTopicManagementResponse;
/**
* Type alias to {@link firebase-admin.messaging#MulticastMessage}.
*/
type MulticastMessage = TMulticastMessage;
/**
* Type alias to {@link firebase-admin.messaging#Notification}.
*/
type Notification = TNotification;
/**
* Type alias to {@link firebase-admin.messaging#SendResponse}.
*/
type SendResponse = TSendResponse;
/**
* Type alias to {@link firebase-admin.messaging#TokenMessage}.
*/
type TokenMessage = TTokenMessage;
/**
* Type alias to {@link firebase-admin.messaging#TopicMessage}.
*/
type TopicMessage = TTopicMessage;
/**
* Type alias to {@link firebase-admin.messaging#WebpushConfig}.
*/
type WebpushConfig = TWebpushConfig;
/**
* Type alias to {@link firebase-admin.messaging#WebpushFcmOptions}.
*/
type WebpushFcmOptions = TWebpushFcmOptions;
/**
* Type alias to {@link firebase-admin.messaging#WebpushNotification}.
*/
type WebpushNotification = TWebpushNotification;
/**
* Type alias to {@link firebase-admin.messaging#DataMessagePayload}.
*/
type DataMessagePayload = TDataMessagePayload;
/**
* Type alias to {@link firebase-admin.messaging#MessagingConditionResponse}.
*/
type MessagingConditionResponse = TMessagingConditionResponse;
/**
* Type alias to {@link firebase-admin.messaging#MessagingDeviceGroupResponse}.
*/
type MessagingDeviceGroupResponse = TMessagingDeviceGroupResponse;
/**
* Type alias to {@link firebase-admin.messaging#MessagingDeviceResult}.
*/
type MessagingDeviceResult = TMessagingDeviceResult;
/**
* Type alias to {@link firebase-admin.messaging#MessagingDevicesResponse}.
*/
type MessagingDevicesResponse = TMessagingDevicesResponse;
/**
* Type alias to {@link firebase-admin.messaging#MessagingOptions}.
*/
type MessagingOptions = TMessagingOptions;
/**
* Type alias to {@link firebase-admin.messaging#MessagingPayload}.
*/
type MessagingPayload = TMessagingPayload;
/**
* Type alias to {@link firebase-admin.messaging#MessagingTopicResponse}.
*/
type MessagingTopicResponse = TMessagingTopicResponse;
/**
* Type alias to {@link firebase-admin.messaging#NotificationMessagePayload}.
*/
type NotificationMessagePayload = TNotificationMessagePayload;
}

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -28,17 +28,3 @@ * @license

/**
* Gets the {@link messaging.Messaging `Messaging`} service for the
* current app.
*
* @example
* ```javascript
* var messaging = app.messaging();
* // The above is shorthand for:
* // var messaging = admin.messaging(app);
* ```
*
* @return The `Messaging` service for the current app.
*/
constructor(app: App);
/**
* The {@link app.App app} associated with the current `Messaging` service
* The {@link firebase-admin.app#App} associated with the current `Messaging` service
* instance.

@@ -58,3 +44,3 @@ *

* (validation only) mode.
* @return A promise fulfilled with a unique message ID
* @returns A promise fulfilled with a unique message ID
* string after the message has been successfully handed off to the FCM

@@ -80,3 +66,3 @@ * service for delivery.

* (validation only) mode.
* @return A Promise fulfilled with an object representing the result of the
* @returns A Promise fulfilled with an object representing the result of the
* send operation.

@@ -100,3 +86,3 @@ */

* (validation only) mode.
* @return A Promise fulfilled with an object representing the result of the
* @returns A Promise fulfilled with an object representing the result of the
* send operation.

@@ -109,4 +95,4 @@ */

*
* See
* [Send to individual devices](/docs/cloud-messaging/admin/legacy-fcm#send_to_individual_devices)
* See {@link https://firebase.google.com/docs/cloud-messaging/admin/legacy-fcm#send_to_individual_devices |
* Send to individual devices}
* for code samples and detailed documentation. Takes either a

@@ -123,3 +109,3 @@ * `registrationToken` to send to a single device or a

*
* @return A promise fulfilled with the server's response after the message
* @returns A promise fulfilled with the server's response after the message
* has been sent.

@@ -132,5 +118,4 @@ */

*
* See
* [Send to a device group](/docs/cloud-messaging/admin/legacy-fcm#send_to_a_device_group)
* for code samples and detailed documentation.
* See {@link https://firebase.google.com/docs/cloud-messaging/admin/legacy-fcm#send_to_a_device_group |
* Send to a device group} for code samples and detailed documentation.
*

@@ -143,3 +128,3 @@ * @param notificationKey The notification key for the device group to

*
* @return A promise fulfilled with the server's response after the message
* @returns A promise fulfilled with the server's response after the message
* has been sent.

@@ -151,5 +136,4 @@ */

*
* See
* [Send to a topic](/docs/cloud-messaging/admin/legacy-fcm#send_to_a_topic)
* for code samples and detailed documentation.
* See {@link https://firebase.google.com/docs/cloud-messaging/admin/legacy-fcm#send_to_a_topic |
* Send to a topic} for code samples and detailed documentation.
*

@@ -161,3 +145,3 @@ * @param topic The topic to which to send the message.

*
* @return A promise fulfilled with the server's response after the message
* @returns A promise fulfilled with the server's response after the message
* has been sent.

@@ -169,4 +153,4 @@ */

*
* See
* [Send to a condition](/docs/cloud-messaging/admin/legacy-fcm#send_to_a_condition)
* See {@link https://firebase.google.com/docs/cloud-messaging/admin/legacy-fcm#send_to_a_condition |
* Send to a condition}
* for code samples and detailed documentation.

@@ -180,3 +164,3 @@ *

*
* @return A promise fulfilled with the server's response after the message
* @returns A promise fulfilled with the server's response after the message
* has been sent.

@@ -188,4 +172,4 @@ */

*
* See [Subscribe to a
* topic](/docs/cloud-messaging/manage-topics#suscribe_and_unsubscribe_using_the)
* See {@link https://firebase.google.com/docs/cloud-messaging/manage-topics#suscribe_and_unsubscribe_using_the |
* Subscribe to a topic}
* for code samples and detailed documentation. Optionally, you can provide an

@@ -198,3 +182,3 @@ * array of tokens to subscribe multiple devices.

*
* @return A promise fulfilled with the server's response after the device has been
* @returns A promise fulfilled with the server's response after the device has been
* subscribed to the topic.

@@ -206,4 +190,4 @@ */

*
* See [Unsubscribe from a
* topic](/docs/cloud-messaging/admin/manage-topic-subscriptions#unsubscribe_from_a_topic)
* See {@link https://firebase.google.com/docs/cloud-messaging/admin/manage-topic-subscriptions#unsubscribe_from_a_topic |
* Unsubscribe from a topic}
* for code samples and detailed documentation. Optionally, you can provide an

@@ -216,3 +200,3 @@ * array of tokens to unsubscribe multiple devices.

*
* @return A promise fulfilled with the server's response after the device has been
* @returns A promise fulfilled with the server's response after the device has been
* unsubscribed from the topic.

@@ -225,9 +209,9 @@ */

*
* @param {string|string[]} registrationTokenOrTokens The registration token or an array of
* @param registrationTokenOrTokens The registration token or an array of
* registration tokens to unsubscribe from the topic.
* @param {string} topic The topic to which to subscribe.
* @param {string} methodName The name of the original method called.
* @param {string} path The endpoint path to use for the request.
* @param topic The topic to which to subscribe.
* @param methodName The name of the original method called.
* @param path The endpoint path to use for the request.
*
* @return {Promise<MessagingTopicManagementResponse>} A Promise fulfilled with the parsed server
* @returns A Promise fulfilled with the parsed server
* response.

@@ -239,4 +223,4 @@ */

*
* @param {MessagingPayload} payload The messaging payload to validate.
* @param {MessagingOptions} options The messaging options to validate.
* @param payload The messaging payload to validate.
* @param options The messaging options to validate.
*/

@@ -247,5 +231,5 @@ private validateMessagingPayloadAndOptionsTypes;

*
* @param {MessagingPayload} payload The messaging payload to validate.
* @param payload The messaging payload to validate.
*
* @return {MessagingPayload} A copy of the provided payload with whitelisted properties switched
* @returns A copy of the provided payload with whitelisted properties switched
* from camelCase to underscore_case.

@@ -257,5 +241,5 @@ */

*
* @param {MessagingOptions} options The messaging options to validate.
* @param options The messaging options to validate.
*
* @return {MessagingOptions} A copy of the provided options with whitelisted properties switched
* @returns A copy of the provided options with whitelisted properties switched
* from camelCase to underscore_case.

@@ -267,5 +251,5 @@ */

*
* @param {string|string[]} registrationTokenOrTokens The registration token(s) to validate.
* @param {string} method The method name to use in error messages.
* @param {ErrorInfo?} [errorInfo] The error info to use if the registration tokens are invalid.
* @param registrationTokenOrTokens The registration token(s) to validate.
* @param method The method name to use in error messages.
* @param errorInfo The error info to use if the registration tokens are invalid.
*/

@@ -276,6 +260,6 @@ private validateRegistrationTokensType;

*
* @param {string|string[]} registrationTokenOrTokens The registration token or an array of
* @param registrationTokenOrTokens The registration token or an array of
* registration tokens to validate.
* @param {string} method The method name to use in error messages.
* @param {errorInfo?} [ErrorInfo] The error info to use if the registration tokens are invalid.
* @param method The method name to use in error messages.
* @param errorInfo The error info to use if the registration tokens are invalid.
*/

@@ -286,5 +270,5 @@ private validateRegistrationTokens;

*
* @param {string} topic The topic to validate.
* @param {string} method The method name to use in error messages.
* @param {ErrorInfo?} [errorInfo] The error info to use if the topic is invalid.
* @param topic The topic to validate.
* @param method The method name to use in error messages.
* @param errorInfo The error info to use if the topic is invalid.
*/

@@ -295,5 +279,5 @@ private validateTopicType;

*
* @param {string} topic The topic to validate.
* @param {string} method The method name to use in error messages.
* @param {ErrorInfo?} [errorInfo] The error info to use if the topic is invalid.
* @param topic The topic to validate.
* @param method The method name to use in error messages.
* @param errorInfo The error info to use if the topic is invalid.
*/

@@ -304,7 +288,7 @@ private validateTopic;

*
* @param {string} topic The topic name to normalize.
* @param topic The topic name to normalize.
*
* @return {string} The normalized topic name.
* @returns The normalized topic name.
*/
private normalizeTopic;
}

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -93,5 +93,5 @@ /*!

*
* @param {object} response The raw FCM server response to map.
* @param response The raw FCM server response to map.
*
* @return {MessagingDeviceGroupResponse} The mapped MessagingDevicesResponse object.
* @returns The mapped MessagingDevicesResponse object.
*/

@@ -116,5 +116,5 @@ function mapRawResponseToDevicesResponse(response) {

*
* @param {object} response The raw FCM server response to map.
* @param response The raw FCM server response to map.
*
* @return {MessagingDeviceGroupResponse} The mapped MessagingDeviceGroupResponse object.
* @returns The mapped MessagingDeviceGroupResponse object.
*/

@@ -134,3 +134,3 @@ function mapRawResponseToDeviceGroupResponse(response) {

*
* @return {MessagingTopicManagementResponse} The mapped MessagingTopicManagementResponse object.
* @returns {MessagingTopicManagementResponse} The mapped MessagingTopicManagementResponse object.
*/

@@ -167,13 +167,3 @@ function mapRawResponseToTopicManagementResponse(response) {

/**
* Gets the {@link messaging.Messaging `Messaging`} service for the
* current app.
*
* @example
* ```javascript
* var messaging = app.messaging();
* // The above is shorthand for:
* // var messaging = admin.messaging(app);
* ```
*
* @return The `Messaging` service for the current app.
* @internal
*/

@@ -189,3 +179,3 @@ function Messaging(app) {

/**
* The {@link app.App app} associated with the current `Messaging` service
* The {@link firebase-admin.app#App} associated with the current `Messaging` service
* instance.

@@ -210,3 +200,3 @@ *

* (validation only) mode.
* @return A promise fulfilled with a unique message ID
* @returns A promise fulfilled with a unique message ID
* string after the message has been successfully handed off to the FCM

@@ -250,3 +240,3 @@ * service for delivery.

* (validation only) mode.
* @return A Promise fulfilled with an object representing the result of the
* @returns A Promise fulfilled with an object representing the result of the
* send operation.

@@ -303,3 +293,3 @@ */

* (validation only) mode.
* @return A Promise fulfilled with an object representing the result of the
* @returns A Promise fulfilled with an object representing the result of the
* send operation.

@@ -335,4 +325,4 @@ */

*
* See
* [Send to individual devices](/docs/cloud-messaging/admin/legacy-fcm#send_to_individual_devices)
* See {@link https://firebase.google.com/docs/cloud-messaging/admin/legacy-fcm#send_to_individual_devices |
* Send to individual devices}
* for code samples and detailed documentation. Takes either a

@@ -349,3 +339,3 @@ * `registrationToken` to send to a single device or a

*
* @return A promise fulfilled with the server's response after the message
* @returns A promise fulfilled with the server's response after the message
* has been sent.

@@ -396,5 +386,4 @@ */

*
* See
* [Send to a device group](/docs/cloud-messaging/admin/legacy-fcm#send_to_a_device_group)
* for code samples and detailed documentation.
* See {@link https://firebase.google.com/docs/cloud-messaging/admin/legacy-fcm#send_to_a_device_group |
* Send to a device group} for code samples and detailed documentation.
*

@@ -407,3 +396,3 @@ * @param notificationKey The notification key for the device group to

*
* @return A promise fulfilled with the server's response after the message
* @returns A promise fulfilled with the server's response after the message
* has been sent.

@@ -464,5 +453,4 @@ */

*
* See
* [Send to a topic](/docs/cloud-messaging/admin/legacy-fcm#send_to_a_topic)
* for code samples and detailed documentation.
* See {@link https://firebase.google.com/docs/cloud-messaging/admin/legacy-fcm#send_to_a_topic |
* Send to a topic} for code samples and detailed documentation.
*

@@ -474,3 +462,3 @@ * @param topic The topic to which to send the message.

*
* @return A promise fulfilled with the server's response after the message
* @returns A promise fulfilled with the server's response after the message
* has been sent.

@@ -508,4 +496,4 @@ */

*
* See
* [Send to a condition](/docs/cloud-messaging/admin/legacy-fcm#send_to_a_condition)
* See {@link https://firebase.google.com/docs/cloud-messaging/admin/legacy-fcm#send_to_a_condition |
* Send to a condition}
* for code samples and detailed documentation.

@@ -519,3 +507,3 @@ *

*
* @return A promise fulfilled with the server's response after the message
* @returns A promise fulfilled with the server's response after the message
* has been sent.

@@ -557,4 +545,4 @@ */

*
* See [Subscribe to a
* topic](/docs/cloud-messaging/manage-topics#suscribe_and_unsubscribe_using_the)
* See {@link https://firebase.google.com/docs/cloud-messaging/manage-topics#suscribe_and_unsubscribe_using_the |
* Subscribe to a topic}
* for code samples and detailed documentation. Optionally, you can provide an

@@ -567,3 +555,3 @@ * array of tokens to subscribe multiple devices.

*
* @return A promise fulfilled with the server's response after the device has been
* @returns A promise fulfilled with the server's response after the device has been
* subscribed to the topic.

@@ -577,4 +565,4 @@ */

*
* See [Unsubscribe from a
* topic](/docs/cloud-messaging/admin/manage-topic-subscriptions#unsubscribe_from_a_topic)
* See {@link https://firebase.google.com/docs/cloud-messaging/admin/manage-topic-subscriptions#unsubscribe_from_a_topic |
* Unsubscribe from a topic}
* for code samples and detailed documentation. Optionally, you can provide an

@@ -587,3 +575,3 @@ * array of tokens to unsubscribe multiple devices.

*
* @return A promise fulfilled with the server's response after the device has been
* @returns A promise fulfilled with the server's response after the device has been
* unsubscribed from the topic.

@@ -614,9 +602,9 @@ */

*
* @param {string|string[]} registrationTokenOrTokens The registration token or an array of
* @param registrationTokenOrTokens The registration token or an array of
* registration tokens to unsubscribe from the topic.
* @param {string} topic The topic to which to subscribe.
* @param {string} methodName The name of the original method called.
* @param {string} path The endpoint path to use for the request.
* @param topic The topic to which to subscribe.
* @param methodName The name of the original method called.
* @param path The endpoint path to use for the request.
*
* @return {Promise<MessagingTopicManagementResponse>} A Promise fulfilled with the parsed server
* @returns A Promise fulfilled with the parsed server
* response.

@@ -654,4 +642,4 @@ */

*
* @param {MessagingPayload} payload The messaging payload to validate.
* @param {MessagingOptions} options The messaging options to validate.
* @param payload The messaging payload to validate.
* @param options The messaging options to validate.
*/

@@ -671,5 +659,5 @@ Messaging.prototype.validateMessagingPayloadAndOptionsTypes = function (payload, options) {

*
* @param {MessagingPayload} payload The messaging payload to validate.
* @param payload The messaging payload to validate.
*
* @return {MessagingPayload} A copy of the provided payload with whitelisted properties switched
* @returns A copy of the provided payload with whitelisted properties switched
* from camelCase to underscore_case.

@@ -737,5 +725,5 @@ */

*
* @param {MessagingOptions} options The messaging options to validate.
* @param options The messaging options to validate.
*
* @return {MessagingOptions} A copy of the provided options with whitelisted properties switched
* @returns A copy of the provided options with whitelisted properties switched
* from camelCase to underscore_case.

@@ -794,5 +782,5 @@ */

*
* @param {string|string[]} registrationTokenOrTokens The registration token(s) to validate.
* @param {string} method The method name to use in error messages.
* @param {ErrorInfo?} [errorInfo] The error info to use if the registration tokens are invalid.
* @param registrationTokenOrTokens The registration token(s) to validate.
* @param method The method name to use in error messages.
* @param errorInfo The error info to use if the registration tokens are invalid.
*/

@@ -810,6 +798,6 @@ Messaging.prototype.validateRegistrationTokensType = function (registrationTokenOrTokens, methodName, errorInfo) {

*
* @param {string|string[]} registrationTokenOrTokens The registration token or an array of
* @param registrationTokenOrTokens The registration token or an array of
* registration tokens to validate.
* @param {string} method The method name to use in error messages.
* @param {errorInfo?} [ErrorInfo] The error info to use if the registration tokens are invalid.
* @param method The method name to use in error messages.
* @param errorInfo The error info to use if the registration tokens are invalid.
*/

@@ -836,5 +824,5 @@ Messaging.prototype.validateRegistrationTokens = function (registrationTokenOrTokens, methodName, errorInfo) {

*
* @param {string} topic The topic to validate.
* @param {string} method The method name to use in error messages.
* @param {ErrorInfo?} [errorInfo] The error info to use if the topic is invalid.
* @param topic The topic to validate.
* @param method The method name to use in error messages.
* @param errorInfo The error info to use if the topic is invalid.
*/

@@ -851,5 +839,5 @@ Messaging.prototype.validateTopicType = function (topic, methodName, errorInfo) {

*
* @param {string} topic The topic to validate.
* @param {string} method The method name to use in error messages.
* @param {ErrorInfo?} [errorInfo] The error info to use if the topic is invalid.
* @param topic The topic to validate.
* @param method The method name to use in error messages.
* @param errorInfo The error info to use if the topic is invalid.
*/

@@ -866,5 +854,5 @@ Messaging.prototype.validateTopic = function (topic, methodName, errorInfo) {

*
* @param {string} topic The topic name to normalize.
* @param topic The topic name to normalize.
*
* @return {string} The normalized topic name.
* @returns The normalized topic name.
*/

@@ -871,0 +859,0 @@ Messaging.prototype.normalizeTopic = function (topic) {

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -37,4 +37,3 @@ * Copyright 2018 Google Inc.

*
* Do not call this constructor directly. Instead, use
* [`projectManagement.androidApp()`](projectManagement.ProjectManagement#androidApp).
* Do not call this constructor directly. Instead, use {@link ProjectManagement.androidApp}.
*/

@@ -48,3 +47,3 @@ export declare class AndroidApp {

*
* @return A promise that resolves to the retrieved metadata about this Android app.
* @returns A promise that resolves to the retrieved metadata about this Android app.
*/

@@ -57,3 +56,3 @@ getMetadata(): Promise<AndroidAppMetadata>;

*
* @return A promise that resolves when the display name has been set.
* @returns A promise that resolves when the display name has been set.
*/

@@ -64,3 +63,3 @@ setDisplayName(newDisplayName: string): Promise<void>;

*
* @return The list of SHA-1 and SHA-256 certificates associated with this Android app in
* @returns The list of SHA-1 and SHA-256 certificates associated with this Android app in
* Firebase.

@@ -74,3 +73,3 @@ */

*
* @return A promise that resolves when the given certificate
* @returns A promise that resolves when the given certificate
* has been added to the Android app.

@@ -84,3 +83,3 @@ */

*
* @return A promise that resolves when the specified
* @returns A promise that resolves when the specified
* certificate has been removed from the Android app.

@@ -92,3 +91,3 @@ */

*
* @return A promise that resolves to the Android app's
* @returns A promise that resolves to the Android app's
* Firebase config file, in UTF-8 string format. This string is typically

@@ -95,0 +94,0 @@ * intended to be written to a JSON file that gets shipped with your Android

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -27,4 +27,3 @@ /*!

*
* Do not call this constructor directly. Instead, use
* [`projectManagement.androidApp()`](projectManagement.ProjectManagement#androidApp).
* Do not call this constructor directly. Instead, use {@link ProjectManagement.androidApp}.
*/

@@ -46,3 +45,3 @@ var AndroidApp = /** @class */ (function () {

*
* @return A promise that resolves to the retrieved metadata about this Android app.
* @returns A promise that resolves to the retrieved metadata about this Android app.
*/

@@ -73,3 +72,3 @@ AndroidApp.prototype.getMetadata = function () {

*
* @return A promise that resolves when the display name has been set.
* @returns A promise that resolves when the display name has been set.
*/

@@ -82,3 +81,3 @@ AndroidApp.prototype.setDisplayName = function (newDisplayName) {

*
* @return The list of SHA-1 and SHA-256 certificates associated with this Android app in
* @returns The list of SHA-1 and SHA-256 certificates associated with this Android app in
* Firebase.

@@ -109,3 +108,3 @@ */

*
* @return A promise that resolves when the given certificate
* @returns A promise that resolves when the given certificate
* has been added to the Android app.

@@ -121,3 +120,3 @@ */

*
* @return A promise that resolves when the specified
* @returns A promise that resolves when the specified
* certificate has been removed from the Android app.

@@ -135,3 +134,3 @@ */

*
* @return A promise that resolves to the Android app's
* @returns A promise that resolves to the Android app's
* Firebase config file, in UTF-8 string format. This string is typically

@@ -138,0 +137,0 @@ * intended to be written to a JSON file that gets shipped with your Android

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -3,0 +3,0 @@ * Copyright 2021 Google Inc.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -17,2 +17,7 @@ * Copyright 2020 Google Inc.

*/
/**
* Firebase project management.
*
* @packageDocumentation
*/
import { App } from '../app';

@@ -25,10 +30,7 @@ import { ProjectManagement } from './project-management';

/**
* Gets the {@link projectManagement.ProjectManagement
* `ProjectManagement`} service for the default app or a given app.
* Gets the {@link ProjectManagement} service for the default app or a given app.
*
* `getProjectManagement()` can be called with no arguments to access the
* default app's {@link projectManagement.ProjectManagement
* `ProjectManagement`} service, or as `getProjectManagement(app)` to access
* the {@link projectManagement.ProjectManagement `ProjectManagement`}
* service associated with a specific app.
* default app's `ProjectManagement` service, or as `getProjectManagement(app)` to access
* the `ProjectManagement` service associated with a specific app.
*

@@ -50,5 +52,5 @@ * @example

* be returned. *
* @return The default `ProjectManagement` service if no app is provided or the
* @returns The default `ProjectManagement` service if no app is provided or the
* `ProjectManagement` service associated with the provided app.
*/
export declare function getProjectManagement(app?: App): ProjectManagement;

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -20,2 +20,7 @@ /*!

exports.getProjectManagement = void 0;
/**
* Firebase project management.
*
* @packageDocumentation
*/
var app_1 = require("../app");

@@ -33,10 +38,7 @@ var project_management_1 = require("./project-management");

/**
* Gets the {@link projectManagement.ProjectManagement
* `ProjectManagement`} service for the default app or a given app.
* Gets the {@link ProjectManagement} service for the default app or a given app.
*
* `getProjectManagement()` can be called with no arguments to access the
* default app's {@link projectManagement.ProjectManagement
* `ProjectManagement`} service, or as `getProjectManagement(app)` to access
* the {@link projectManagement.ProjectManagement `ProjectManagement`}
* service associated with a specific app.
* default app's `ProjectManagement` service, or as `getProjectManagement(app)` to access
* the `ProjectManagement` service associated with a specific app.
*

@@ -58,3 +60,3 @@ * @example

* be returned. *
* @return The default `ProjectManagement` service if no app is provided or the
* @returns The default `ProjectManagement` service if no app is provided or the
* `ProjectManagement` service associated with the provided app.

@@ -61,0 +63,0 @@ */

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -36,4 +36,3 @@ * Copyright 2018 Google Inc.

*
* Do not call this constructor directly. Instead, use
* [`projectManagement.iosApp()`](projectManagement.ProjectManagement#iosApp).
* Do not call this constructor directly. Instead, use {@link ProjectManagement.iosApp}.
*/

@@ -47,3 +46,3 @@ export declare class IosApp {

*
* @return A promise that
* @returns A promise that
* resolves to the retrieved metadata about this iOS app.

@@ -57,3 +56,3 @@ */

*
* @return A promise that resolves when the display name has
* @returns A promise that resolves when the display name has
* been set.

@@ -65,3 +64,3 @@ */

*
* @return A promise that resolves to the iOS app's Firebase
* @returns A promise that resolves to the iOS app's Firebase
* config file, in UTF-8 string format. This string is typically intended to

@@ -68,0 +67,0 @@ * be written to a plist file that gets shipped with your iOS app.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -27,4 +27,3 @@ /*!

*
* Do not call this constructor directly. Instead, use
* [`projectManagement.iosApp()`](projectManagement.ProjectManagement#iosApp).
* Do not call this constructor directly. Instead, use {@link ProjectManagement.iosApp}.
*/

@@ -46,3 +45,3 @@ var IosApp = /** @class */ (function () {

*
* @return A promise that
* @returns A promise that
* resolves to the retrieved metadata about this iOS app.

@@ -74,3 +73,3 @@ */

*
* @return A promise that resolves when the display name has
* @returns A promise that resolves when the display name has
* been set.

@@ -84,3 +83,3 @@ */

*
* @return A promise that resolves to the iOS app's Firebase
* @returns A promise that resolves to the iOS app's Firebase
* config file, in UTF-8 string format. This string is typically intended to

@@ -87,0 +86,0 @@ * be written to a plist file that gets shipped with your iOS app.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -17,81 +17,2 @@ * Copyright 2018 Google Inc.

*/
import { App } from '../app';
import { ShaCertificate } from './android-app';
export declare function assertServerResponse(condition: boolean, responseData: object, message: string): void;
/**
* Class that provides mechanism to send requests to the Firebase project management backend
* endpoints.
*
* @private
*/
export declare class ProjectManagementRequestHandler {
private readonly baseUrl;
private readonly baseBetaUrl;
private readonly httpClient;
private static wrapAndRethrowHttpError;
/**
* @param app The app used to fetch access tokens to sign API requests.
* @constructor
*/
constructor(app: App);
/**
* @param {string} parentResourceName Fully-qualified resource name of the project whose Android
* apps you want to list.
*/
listAndroidApps(parentResourceName: string): Promise<object>;
/**
* @param {string} parentResourceName Fully-qualified resource name of the project whose iOS apps
* you want to list.
*/
listIosApps(parentResourceName: string): Promise<object>;
/**
* @param {string} parentResourceName Fully-qualified resource name of the project whose iOS apps
* you want to list.
*/
listAppMetadata(parentResourceName: string): Promise<object>;
/**
* @param {string} parentResourceName Fully-qualified resource name of the project that you want
* to create the Android app within.
*/
createAndroidApp(parentResourceName: string, packageName: string, displayName?: string): Promise<object>;
/**
* @param {string} parentResourceName Fully-qualified resource name of the project that you want
* to create the iOS app within.
*/
createIosApp(parentResourceName: string, bundleId: string, displayName?: string): Promise<object>;
/**
* @param {string} resourceName Fully-qualified resource name of the entity whose display name you
* want to set.
*/
setDisplayName(resourceName: string, newDisplayName: string): Promise<void>;
/**
* @param {string} parentResourceName Fully-qualified resource name of the Android app whose SHA
* certificates you want to get.
*/
getAndroidShaCertificates(parentResourceName: string): Promise<object>;
/**
* @param {string} parentResourceName Fully-qualified resource name of the Android app that you
* want to add the given SHA certificate to.
*/
addAndroidShaCertificate(parentResourceName: string, certificate: ShaCertificate): Promise<void>;
/**
* @param {string} parentResourceName Fully-qualified resource name of the app whose config you
* want to get.
*/
getConfig(parentResourceName: string): Promise<object>;
/**
* @param {string} parentResourceName Fully-qualified resource name of the entity that you want to
* get.
*/
getResource(parentResourceName: string): Promise<object>;
/**
* @param {string} resourceName Fully-qualified resource name of the entity that you want to
* delete.
*/
deleteResource(resourceName: string): Promise<void>;
private pollRemoteOperationWithExponentialBackoff;
/**
* Invokes the request handler with the provided request data.
*/
private invokeRequestHandler;
}

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -51,3 +51,3 @@ /*!

*
* @private
* @internal
*/

@@ -106,3 +106,3 @@ var ProjectManagementRequestHandler = /** @class */ (function () {

/**
* @param {string} parentResourceName Fully-qualified resource name of the project whose Android
* @param parentResourceName Fully-qualified resource name of the project whose Android
* apps you want to list.

@@ -115,3 +115,3 @@ */

/**
* @param {string} parentResourceName Fully-qualified resource name of the project whose iOS apps
* @param parentResourceName Fully-qualified resource name of the project whose iOS apps
* you want to list.

@@ -124,3 +124,3 @@ */

/**
* @param {string} parentResourceName Fully-qualified resource name of the project whose iOS apps
* @param parentResourceName Fully-qualified resource name of the project whose iOS apps
* you want to list.

@@ -133,3 +133,3 @@ */

/**
* @param {string} parentResourceName Fully-qualified resource name of the project that you want
* @param parentResourceName Fully-qualified resource name of the project that you want
* to create the Android app within.

@@ -154,3 +154,3 @@ */

/**
* @param {string} parentResourceName Fully-qualified resource name of the project that you want
* @param parentResourceName Fully-qualified resource name of the project that you want
* to create the iOS app within.

@@ -175,3 +175,3 @@ */

/**
* @param {string} resourceName Fully-qualified resource name of the entity whose display name you
* @param resourceName Fully-qualified resource name of the entity whose display name you
* want to set.

@@ -188,3 +188,3 @@ */

/**
* @param {string} parentResourceName Fully-qualified resource name of the Android app whose SHA
* @param parentResourceName Fully-qualified resource name of the Android app whose SHA
* certificates you want to get.

@@ -196,3 +196,3 @@ */

/**
* @param {string} parentResourceName Fully-qualified resource name of the Android app that you
* @param parentResourceName Fully-qualified resource name of the Android app that you
* want to add the given SHA certificate to.

@@ -210,3 +210,3 @@ */

/**
* @param {string} parentResourceName Fully-qualified resource name of the app whose config you
* @param parentResourceName Fully-qualified resource name of the app whose config you
* want to get.

@@ -218,3 +218,3 @@ */

/**
* @param {string} parentResourceName Fully-qualified resource name of the entity that you want to
* @param parentResourceName Fully-qualified resource name of the entity that you want to
* get.

@@ -226,3 +226,3 @@ */

/**
* @param {string} resourceName Fully-qualified resource name of the entity that you want to
* @param resourceName Fully-qualified resource name of the entity that you want to
* delete.

@@ -229,0 +229,0 @@ */

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -23,10 +23,8 @@ * Copyright 2021 Google Inc.

/**
* Gets the {@link projectManagement.ProjectManagement
* `ProjectManagement`} service for the default app or a given app.
* Gets the {@link firebase-admin.project-management#ProjectManagement} service for the
* default app or a given app.
*
* `admin.projectManagement()` can be called with no arguments to access the
* default app's {@link projectManagement.ProjectManagement
* `ProjectManagement`} service, or as `admin.projectManagement(app)` to access
* the {@link projectManagement.ProjectManagement `ProjectManagement`}
* service associated with a specific app.
* default app's `ProjectManagement` service, or as `admin.projectManagement(app)` to access
* the `ProjectManagement` service associated with a specific app.
*

@@ -48,3 +46,3 @@ * @example

* be returned. *
* @return The default `ProjectManagement` service if no app is provided or the
* @returns The default `ProjectManagement` service if no app is provided or the
* `ProjectManagement` service associated with the provided app.

@@ -54,10 +52,34 @@ */

export declare namespace projectManagement {
/**
* Type alias to {@link firebase-admin.project-management#AppMetadata}.
*/
type AppMetadata = TAppMetadata;
/**
* Type alias to {@link firebase-admin.project-management#AppPlatform}.
*/
type AppPlatform = TAppPlatform;
/**
* Type alias to {@link firebase-admin.project-management#ProjectManagement}.
*/
type ProjectManagement = TProjectManagement;
/**
* Type alias to {@link firebase-admin.project-management#IosApp}.
*/
type IosApp = TIosApp;
/**
* Type alias to {@link firebase-admin.project-management#IosAppMetadata}.
*/
type IosAppMetadata = TIosAppMetadata;
/**
* Type alias to {@link firebase-admin.project-management#AndroidApp}.
*/
type AndroidApp = TAndroidApp;
/**
* Type alias to {@link firebase-admin.project-management#AndroidAppMetadata}.
*/
type AndroidAppMetadata = TAndroidAppMetadata;
/**
* Type alias to {@link firebase-admin.project-management#ShaCertificate}.
*/
type ShaCertificate = TShaCertificate;
}

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -23,5 +23,2 @@ * Copyright 2018 Google Inc.

* The Firebase ProjectManagement service interface.
*
* Do not call this constructor directly. Instead, use
* [`admin.projectManagement()`](projectManagement#projectManagement).
*/

@@ -35,3 +32,3 @@ export declare class ProjectManagement {

*
* @return The list of Android apps.
* @returns The list of Android apps.
*/

@@ -42,3 +39,3 @@ listAndroidApps(): Promise<AndroidApp[]>;

*
* @return The list of iOS apps.
* @returns The list of iOS apps.
*/

@@ -54,3 +51,3 @@ listIosApps(): Promise<IosApp[]>;

*
* @return An `AndroidApp` object that references the specified Firebase Android app.
* @returns An `AndroidApp` object that references the specified Firebase Android app.
*/

@@ -66,3 +63,3 @@ androidApp(appId: string): AndroidApp;

*
* @return An `iOSApp` object that references the specified Firebase iOS app.
* @returns An `iOSApp` object that references the specified Firebase iOS app.
*/

@@ -77,3 +74,3 @@ iosApp(appId: string): IosApp;

*
* @return A `ShaCertificate` object contains the specified SHA hash.
* @returns A `ShaCertificate` object contains the specified SHA hash.
*/

@@ -89,3 +86,3 @@ shaCertificate(shaHash: string): ShaCertificate;

*
* @return A promise that resolves to the newly created Android app.
* @returns A promise that resolves to the newly created Android app.
*/

@@ -100,3 +97,3 @@ createAndroidApp(packageName: string, displayName?: string): Promise<AndroidApp>;

*
* @return A promise that resolves to the newly created iOS app.
* @returns A promise that resolves to the newly created iOS app.
*/

@@ -107,3 +104,3 @@ createIosApp(bundleId: string, displayName?: string): Promise<IosApp>;

*
* @return A promise that resolves to the metadata list of the apps.
* @returns A promise that resolves to the metadata list of the apps.
*/

@@ -116,3 +113,3 @@ listAppMetadata(): Promise<AppMetadata[]>;

*
* @return A promise that resolves when the project display name has been updated.
* @returns A promise that resolves when the project display name has been updated.
*/

@@ -119,0 +116,0 @@ setDisplayName(newDisplayName: string): Promise<void>;

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -29,5 +29,2 @@ /*!

* The Firebase ProjectManagement service interface.
*
* Do not call this constructor directly. Instead, use
* [`admin.projectManagement()`](projectManagement#projectManagement).
*/

@@ -51,3 +48,3 @@ var ProjectManagement = /** @class */ (function () {

*
* @return The list of Android apps.
* @returns The list of Android apps.
*/

@@ -60,3 +57,3 @@ ProjectManagement.prototype.listAndroidApps = function () {

*
* @return The list of iOS apps.
* @returns The list of iOS apps.
*/

@@ -74,3 +71,3 @@ ProjectManagement.prototype.listIosApps = function () {

*
* @return An `AndroidApp` object that references the specified Firebase Android app.
* @returns An `AndroidApp` object that references the specified Firebase Android app.
*/

@@ -88,3 +85,3 @@ ProjectManagement.prototype.androidApp = function (appId) {

*
* @return An `iOSApp` object that references the specified Firebase iOS app.
* @returns An `iOSApp` object that references the specified Firebase iOS app.
*/

@@ -101,3 +98,3 @@ ProjectManagement.prototype.iosApp = function (appId) {

*
* @return A `ShaCertificate` object contains the specified SHA hash.
* @returns A `ShaCertificate` object contains the specified SHA hash.
*/

@@ -115,3 +112,3 @@ ProjectManagement.prototype.shaCertificate = function (shaHash) {

*
* @return A promise that resolves to the newly created Android app.
* @returns A promise that resolves to the newly created Android app.
*/

@@ -137,3 +134,3 @@ ProjectManagement.prototype.createAndroidApp = function (packageName, displayName) {

*
* @return A promise that resolves to the newly created iOS app.
* @returns A promise that resolves to the newly created iOS app.
*/

@@ -155,3 +152,3 @@ ProjectManagement.prototype.createIosApp = function (bundleId, displayName) {

*
* @return A promise that resolves to the metadata list of the apps.
* @returns A promise that resolves to the metadata list of the apps.
*/

@@ -176,3 +173,3 @@ ProjectManagement.prototype.listAppMetadata = function () {

*
* @return A promise that resolves when the project display name has been updated.
* @returns A promise that resolves when the project display name has been updated.
*/

@@ -179,0 +176,0 @@ ProjectManagement.prototype.setDisplayName = function (newDisplayName) {

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -17,2 +17,7 @@ * Copyright 2020 Google Inc.

*/
/**
* Firebase Remote Config.
*
* @packageDocumentation
*/
import { App } from '../app';

@@ -23,10 +28,7 @@ import { RemoteConfig } from './remote-config';

/**
* Gets the {@link remoteConfig.RemoteConfig `RemoteConfig`} service for the
* default app or a given app.
* Gets the {@link RemoteConfig} service for the default app or a given app.
*
* `getRemoteConfig()` can be called with no arguments to access the default
* app's {@link remoteConfig.RemoteConfig `RemoteConfig`} service or as
* `getRemoteConfig(app)` to access the
* {@link remoteConfig.RemoteConfig `RemoteConfig`} service associated with a
* specific app.
* app's `RemoteConfig` service or as `getRemoteConfig(app)` to access the
* `RemoteConfig` service associated with a specific app.
*

@@ -48,3 +50,3 @@ * @example

*
* @return The default `RemoteConfig` service if no
* @returns The default `RemoteConfig` service if no
* app is provided, or the `RemoteConfig` service associated with the provided

@@ -51,0 +53,0 @@ * app.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -20,2 +20,7 @@ /*!

exports.getRemoteConfig = void 0;
/**
* Firebase Remote Config.
*
* @packageDocumentation
*/
var app_1 = require("../app");

@@ -26,10 +31,7 @@ var remote_config_1 = require("./remote-config");

/**
* Gets the {@link remoteConfig.RemoteConfig `RemoteConfig`} service for the
* default app or a given app.
* Gets the {@link RemoteConfig} service for the default app or a given app.
*
* `getRemoteConfig()` can be called with no arguments to access the default
* app's {@link remoteConfig.RemoteConfig `RemoteConfig`} service or as
* `getRemoteConfig(app)` to access the
* {@link remoteConfig.RemoteConfig `RemoteConfig`} service associated with a
* specific app.
* app's `RemoteConfig` service or as `getRemoteConfig(app)` to access the
* `RemoteConfig` service associated with a specific app.
*

@@ -51,3 +53,3 @@ * @example

*
* @return The default `RemoteConfig` service if no
* @returns The default `RemoteConfig` service if no
* app is provided, or the `RemoteConfig` service associated with the provided

@@ -54,0 +56,0 @@ * app.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -3,0 +3,0 @@ * Copyright 2020 Google Inc.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -325,3 +325,3 @@ /*!

*
* @return {ListVersionsOptions} A copy of the provided options object with timestamps converted
* @returns {ListVersionsOptions} A copy of the provided options object with timestamps converted
* to UTC Zulu format.

@@ -328,0 +328,0 @@ */

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -34,3 +34,3 @@ * Copyright 2021 Google Inc.

* See the documentation on
* {@link https://firebase.google.com/docs/remote-config/condition-reference condition expressions}
* {@link https://firebase.google.com/docs/remote-config/condition-reference | condition expressions}
* for the expected syntax of this field.

@@ -37,0 +37,0 @@ */

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -21,10 +21,8 @@ * Copyright 2021 Google Inc.

/**
* Gets the {@link remoteConfig.RemoteConfig `RemoteConfig`} service for the
* Gets the {@link firebase-admin.remote-config#RemoteConfig} service for the
* default app or a given app.
*
* `admin.remoteConfig()` can be called with no arguments to access the default
* app's {@link remoteConfig.RemoteConfig `RemoteConfig`} service or as
* `admin.remoteConfig(app)` to access the
* {@link remoteConfig.RemoteConfig `RemoteConfig`} service associated with a
* specific app.
* app's `RemoteConfig` service or as `admin.remoteConfig(app)` to access the
* `RemoteConfig` service associated with a specific app.
*

@@ -46,3 +44,3 @@ * @example

*
* @return The default `RemoteConfig` service if no
* @returns The default `RemoteConfig` service if no
* app is provided, or the `RemoteConfig` service associated with the provided

@@ -53,15 +51,54 @@ * app.

export declare namespace remoteConfig {
/**
* Type alias to {@link firebase-admin.remote-config#ExplicitParameterValue}.
*/
type ExplicitParameterValue = TExplicitParameterValue;
/**
* Type alias to {@link firebase-admin.remote-config#InAppDefaultValue}.
*/
type InAppDefaultValue = TInAppDefaultValue;
/**
* Type alias to {@link firebase-admin.remote-config#ListVersionsOptions}.
*/
type ListVersionsOptions = TListVersionsOptions;
/**
* Type alias to {@link firebase-admin.remote-config#ListVersionsResult}.
*/
type ListVersionsResult = TListVersionsResult;
/**
* Type alias to {@link firebase-admin.remote-config#RemoteConfig}.
*/
type RemoteConfig = TRemoteConfig;
/**
* Type alias to {@link firebase-admin.remote-config#RemoteConfigCondition}.
*/
type RemoteConfigCondition = TRemoteConfigCondition;
/**
* Type alias to {@link firebase-admin.remote-config#RemoteConfigParameter}.
*/
type RemoteConfigParameter = TRemoteConfigParameter;
/**
* Type alias to {@link firebase-admin.remote-config#RemoteConfigParameterGroup}.
*/
type RemoteConfigParameterGroup = TRemoteConfigParameterGroup;
/**
* Type alias to {@link firebase-admin.remote-config#RemoteConfigParameterValue}.
*/
type RemoteConfigParameterValue = TRemoteConfigParameterValue;
/**
* Type alias to {@link firebase-admin.remote-config#RemoteConfigTemplate}.
*/
type RemoteConfigTemplate = TRemoteConfigTemplate;
/**
* Type alias to {@link firebase-admin.remote-config#RemoteConfigUser}.
*/
type RemoteConfigUser = TRemoteConfigUser;
/**
* Type alias to {@link firebase-admin.remote-config#TagColor}.
*/
type TagColor = TTagColor;
/**
* Type alias to {@link firebase-admin.remote-config#Version}.
*/
type Version = TVersion;
}

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -26,19 +26,17 @@ * Copyright 2020 Google Inc.

/**
* Gets the current active version of the {@link remoteConfig.RemoteConfigTemplate
* `RemoteConfigTemplate`} of the project.
* Gets the current active version of the {@link RemoteConfigTemplate} of the project.
*
* @return A promise that fulfills with a `RemoteConfigTemplate`.
* @returns A promise that fulfills with a `RemoteConfigTemplate`.
*/
getTemplate(): Promise<RemoteConfigTemplate>;
/**
* Gets the requested version of the {@link remoteConfig.RemoteConfigTemplate
* `RemoteConfigTemplate`} of the project.
* Gets the requested version of the {@link RemoteConfigTemplate} of the project.
*
* @param versionNumber Version number of the Remote Config template to look up.
*
* @return A promise that fulfills with a `RemoteConfigTemplate`.
* @returns A promise that fulfills with a `RemoteConfigTemplate`.
*/
getTemplateAtVersion(versionNumber: number | string): Promise<RemoteConfigTemplate>;
/**
* Validates a {@link remoteConfig.RemoteConfigTemplate `RemoteConfigTemplate`}.
* Validates a {@link RemoteConfigTemplate}.
*

@@ -54,10 +52,10 @@ * @param template The Remote Config template to be validated.

* @param options Optional options object when publishing a Remote Config template:
* - {boolean} `force` Setting this to `true` forces the Remote Config template to
* - `force`: Setting this to `true` forces the Remote Config template to
* be updated and circumvent the ETag. This approach is not recommended
* because it risks causing the loss of updates to your Remote Config
* template if multiple clients are updating the Remote Config template.
* See {@link https://firebase.google.com/docs/remote-config/use-config-rest#etag_usage_and_forced_updates
* See {@link https://firebase.google.com/docs/remote-config/use-config-rest#etag_usage_and_forced_updates |
* ETag usage and forced updates}.
*
* @return A Promise that fulfills with the published `RemoteConfigTemplate`.
* @returns A Promise that fulfills with the published `RemoteConfigTemplate`.
*/

@@ -77,3 +75,3 @@ publishTemplate(template: RemoteConfigTemplate, options?: {

* template that is being fetched by clients) are also deleted if they are more than 90 days old.
* @return A promise that fulfills with the published `RemoteConfigTemplate`.
* @returns A promise that fulfills with the published `RemoteConfigTemplate`.
*/

@@ -88,3 +86,3 @@ rollback(versionNumber: number | string): Promise<RemoteConfigTemplate>;

* @param options Optional options object for getting a list of versions.
* @return A promise that fulfills with a `ListVersionsResult`.
* @returns A promise that fulfills with a `ListVersionsResult`.
*/

@@ -97,5 +95,5 @@ listVersions(options?: ListVersionsOptions): Promise<ListVersionsResult>;

*
* @return A new template instance.
* @returns A new template instance.
*/
createTemplateFromJSON(json: string): RemoteConfigTemplate;
}

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -36,6 +36,5 @@ /*!

/**
* Gets the current active version of the {@link remoteConfig.RemoteConfigTemplate
* `RemoteConfigTemplate`} of the project.
* Gets the current active version of the {@link RemoteConfigTemplate} of the project.
*
* @return A promise that fulfills with a `RemoteConfigTemplate`.
* @returns A promise that fulfills with a `RemoteConfigTemplate`.
*/

@@ -49,8 +48,7 @@ RemoteConfig.prototype.getTemplate = function () {

/**
* Gets the requested version of the {@link remoteConfig.RemoteConfigTemplate
* `RemoteConfigTemplate`} of the project.
* Gets the requested version of the {@link RemoteConfigTemplate} of the project.
*
* @param versionNumber Version number of the Remote Config template to look up.
*
* @return A promise that fulfills with a `RemoteConfigTemplate`.
* @returns A promise that fulfills with a `RemoteConfigTemplate`.
*/

@@ -64,3 +62,3 @@ RemoteConfig.prototype.getTemplateAtVersion = function (versionNumber) {

/**
* Validates a {@link remoteConfig.RemoteConfigTemplate `RemoteConfigTemplate`}.
* Validates a {@link RemoteConfigTemplate}.
*

@@ -81,10 +79,10 @@ * @param template The Remote Config template to be validated.

* @param options Optional options object when publishing a Remote Config template:
* - {boolean} `force` Setting this to `true` forces the Remote Config template to
* - `force`: Setting this to `true` forces the Remote Config template to
* be updated and circumvent the ETag. This approach is not recommended
* because it risks causing the loss of updates to your Remote Config
* template if multiple clients are updating the Remote Config template.
* See {@link https://firebase.google.com/docs/remote-config/use-config-rest#etag_usage_and_forced_updates
* See {@link https://firebase.google.com/docs/remote-config/use-config-rest#etag_usage_and_forced_updates |
* ETag usage and forced updates}.
*
* @return A Promise that fulfills with the published `RemoteConfigTemplate`.
* @returns A Promise that fulfills with the published `RemoteConfigTemplate`.
*/

@@ -107,3 +105,3 @@ RemoteConfig.prototype.publishTemplate = function (template, options) {

* template that is being fetched by clients) are also deleted if they are more than 90 days old.
* @return A promise that fulfills with the published `RemoteConfigTemplate`.
* @returns A promise that fulfills with the published `RemoteConfigTemplate`.
*/

@@ -123,3 +121,3 @@ RemoteConfig.prototype.rollback = function (versionNumber) {

* @param options Optional options object for getting a list of versions.
* @return A promise that fulfills with a `ListVersionsResult`.
* @returns A promise that fulfills with a `ListVersionsResult`.
*/

@@ -141,3 +139,3 @@ RemoteConfig.prototype.listVersions = function (options) {

*
* @return A new template instance.
* @returns A new template instance.
*/

@@ -205,3 +203,3 @@ RemoteConfig.prototype.createTemplateFromJSON = function (json) {

*
* @return The ETag of the Remote Config template.
* @returns The ETag of the Remote Config template.
*/

@@ -215,3 +213,5 @@ get: function () {

/**
* @return A JSON-serializable representation of this object.
* Returns a JSON-serializable representation of this object.
*
* @returns A JSON-serializable representation of this object.
*/

@@ -294,3 +294,3 @@ RemoteConfigTemplateImpl.prototype.toJSON = function () {

/**
* @return A JSON-serializable representation of this object.
* @returns A JSON-serializable representation of this object.
*/

@@ -297,0 +297,0 @@ VersionImpl.prototype.toJSON = function () {

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -17,2 +17,7 @@ * Copyright 2020 Google Inc.

*/
/**
* Security Rules for Cloud Firestore and Cloud Storage.
*
* @packageDocumentation
*/
import { App } from '../app';

@@ -22,10 +27,7 @@ import { SecurityRules } from './security-rules';

/**
* Gets the {@link securityRules.SecurityRules
* `SecurityRules`} service for the default app or a given app.
* Gets the {@link SecurityRules} service for the default app or a given app.
*
* `admin.securityRules()` can be called with no arguments to access the
* default app's {@link securityRules.SecurityRules
* `SecurityRules`} service, or as `admin.securityRules(app)` to access
* the {@link securityRules.SecurityRules `SecurityRules`}
* service associated with a specific app.
* default app's `SecurityRules` service, or as `admin.securityRules(app)` to access
* the `SecurityRules` service associated with a specific app.
*

@@ -47,5 +49,5 @@ * @example

* is returned.
* @return The default `SecurityRules` service if no app is provided, or the
* @returns The default `SecurityRules` service if no app is provided, or the
* `SecurityRules` service associated with the provided app.
*/
export declare function getSecurityRules(app?: App): SecurityRules;

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -20,2 +20,7 @@ /*!

exports.getSecurityRules = void 0;
/**
* Security Rules for Cloud Firestore and Cloud Storage.
*
* @packageDocumentation
*/
var app_1 = require("../app");

@@ -28,10 +33,7 @@ var security_rules_1 = require("./security-rules");

/**
* Gets the {@link securityRules.SecurityRules
* `SecurityRules`} service for the default app or a given app.
* Gets the {@link SecurityRules} service for the default app or a given app.
*
* `admin.securityRules()` can be called with no arguments to access the
* default app's {@link securityRules.SecurityRules
* `SecurityRules`} service, or as `admin.securityRules(app)` to access
* the {@link securityRules.SecurityRules `SecurityRules`}
* service associated with a specific app.
* default app's `SecurityRules` service, or as `admin.securityRules(app)` to access
* the `SecurityRules` service associated with a specific app.
*

@@ -53,3 +55,3 @@ * @example

* is returned.
* @return The default `SecurityRules` service if no app is provided, or the
* @returns The default `SecurityRules` service if no app is provided, or the
* `SecurityRules` service associated with the provided app.

@@ -56,0 +58,0 @@ */

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -3,0 +3,0 @@ * Copyright 2019 Google Inc.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -3,0 +3,0 @@ * Copyright 2019 Google Inc.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -44,3 +44,3 @@ * Copyright 2021 Google Inc.

* is returned.
* @return The default `SecurityRules` service if no app is provided, or the
* @returns The default `SecurityRules` service if no app is provided, or the
* `SecurityRules` service associated with the provided app.

@@ -50,7 +50,22 @@ */

export declare namespace securityRules {
/**
* Type alias to {@link firebase-admin.security-rules#RulesFile}.
*/
type RulesFile = TRulesFile;
/**
* Type alias to {@link firebase-admin.security-rules#Ruleset}.
*/
type Ruleset = TRuleset;
/**
* Type alias to {@link firebase-admin.security-rules#RulesetMetadata}.
*/
type RulesetMetadata = TRulesetMetadata;
/**
* Type alias to {@link firebase-admin.security-rules#RulesetMetadataList}.
*/
type RulesetMetadataList = TRulesetMetadataList;
/**
* Type alias to {@link firebase-admin.security-rules#SecurityRules}.
*/
type SecurityRules = TSecurityRules;
}

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -22,4 +22,3 @@ * Copyright 2019 Google Inc.

* source code including text formatting, indentation and comments. Use the
* [`securityRules.createRulesFileFromSource()`](securityRules.SecurityRules#createRulesFileFromSource)
* method to create new instances of this type.
* {@link SecurityRules.createRulesFileFromSource} method to create new instances of this type.
*/

@@ -36,4 +35,3 @@ export interface RulesFile {

* Name of the `Ruleset` as a short string. This can be directly passed into APIs
* like {@link securityRules.SecurityRules.getRuleset `securityRules.getRuleset()`}
* and {@link securityRules.SecurityRules.deleteRuleset `securityRules.deleteRuleset()`}.
* like {@link SecurityRules.getRuleset} and {@link SecurityRules.deleteRuleset}.
*/

@@ -82,3 +80,3 @@ readonly name: string;

/**
* Gets the {@link securityRules.Ruleset `Ruleset`} identified by the given
* Gets the {@link Ruleset} identified by the given
* name. The input name should be the short name string without the project ID

@@ -90,23 +88,23 @@ * prefix. For example, to retrieve the `projects/project-id/rulesets/my-ruleset`,

* @param name Name of the `Ruleset` to retrieve.
* @return A promise that fulfills with the specified `Ruleset`.
* @returns A promise that fulfills with the specified `Ruleset`.
*/
getRuleset(name: string): Promise<Ruleset>;
/**
* Gets the {@link securityRules.Ruleset `Ruleset`} currently applied to
* Gets the {@link Ruleset} currently applied to
* Cloud Firestore. Rejects with a `not-found` error if no ruleset is applied
* on Firestore.
*
* @return A promise that fulfills with the Firestore ruleset.
* @returns A promise that fulfills with the Firestore ruleset.
*/
getFirestoreRuleset(): Promise<Ruleset>;
/**
* Creates a new {@link securityRules.Ruleset `Ruleset`} from the given
* Creates a new {@link Ruleset} from the given
* source, and applies it to Cloud Firestore.
*
* @param source Rules source to apply.
* @return A promise that fulfills when the ruleset is created and released.
* @returns A promise that fulfills when the ruleset is created and released.
*/
releaseFirestoreRulesetFromSource(source: string | Buffer): Promise<Ruleset>;
/**
* Applies the specified {@link securityRules.Ruleset `Ruleset`} ruleset
* Applies the specified {@link Ruleset} ruleset
* to Cloud Firestore.

@@ -116,7 +114,7 @@ *

* containing the name.
* @return A promise that fulfills when the ruleset is released.
* @returns A promise that fulfills when the ruleset is released.
*/
releaseFirestoreRuleset(ruleset: string | RulesetMetadata): Promise<void>;
/**
* Gets the {@link securityRules.Ruleset `Ruleset`} currently applied to a
* Gets the {@link Ruleset} currently applied to a
* Cloud Storage bucket. Rejects with a `not-found` error if no ruleset is applied

@@ -128,7 +126,7 @@ * on the bucket.

* `AppOptions`.
* @return A promise that fulfills with the Cloud Storage ruleset.
* @returns A promise that fulfills with the Cloud Storage ruleset.
*/
getStorageRuleset(bucket?: string): Promise<Ruleset>;
/**
* Creates a new {@link securityRules.Ruleset `Ruleset`} from the given
* Creates a new {@link Ruleset} from the given
* source, and applies it to a Cloud Storage bucket.

@@ -139,8 +137,8 @@ *

* not specified, applies the ruleset on the default bucket configured via
* {@link AppOptions `AppOptions`}.
* @return A promise that fulfills when the ruleset is created and released.
* {@link firebase-admin.app#AppOptions}.
* @returns A promise that fulfills when the ruleset is created and released.
*/
releaseStorageRulesetFromSource(source: string | Buffer, bucket?: string): Promise<Ruleset>;
/**
* Applies the specified {@link securityRules.Ruleset `Ruleset`} ruleset
* Applies the specified {@link Ruleset} ruleset
* to a Cloud Storage bucket.

@@ -152,8 +150,8 @@ *

* not specified, applies the ruleset on the default bucket configured via
* {@link AppOptions `AppOptions`}.
* @return A promise that fulfills when the ruleset is released.
* {@link firebase-admin.app#AppOptions}.
* @returns A promise that fulfills when the ruleset is released.
*/
releaseStorageRuleset(ruleset: string | RulesetMetadata, bucket?: string): Promise<void>;
/**
* Creates a {@link securityRules.RulesFile `RuleFile`} with the given name
* Creates a {@link RulesFile} with the given name
* and source. Throws an error if any of the arguments are invalid. This is a local

@@ -172,8 +170,7 @@ * operation, and does not involve any network API calls.

* @param source Contents of the rules file.
* @return A new rules file instance.
* @returns A new rules file instance.
*/
createRulesFileFromSource(name: string, source: string | Buffer): RulesFile;
/**
* Creates a new {@link securityRules.Ruleset `Ruleset`} from the given
* {@link securityRules.RulesFile `RuleFile`}.
* Creates a new {@link Ruleset} from the given {@link RulesFile}.
*

@@ -185,3 +182,3 @@ * @param file Rules file to include in the new `Ruleset`.

/**
* Deletes the {@link securityRules.Ruleset `Ruleset`} identified by the given
* Deletes the {@link Ruleset} identified by the given
* name. The input name should be the short name string without the project ID

@@ -193,3 +190,3 @@ * prefix. For example, to delete the `projects/project-id/rulesets/my-ruleset`,

* @param name Name of the `Ruleset` to delete.
* @return A promise that fulfills when the `Ruleset` is deleted.
* @returns A promise that fulfills when the `Ruleset` is deleted.
*/

@@ -204,3 +201,3 @@ deleteRuleset(name: string): Promise<void>;

* starting without any offset.
* @return A promise that fulfills with a page of rulesets.
* @returns A promise that fulfills with a page of rulesets.
*/

@@ -207,0 +204,0 @@ listRulesetMetadata(pageSize?: number, nextPageToken?: string): Promise<RulesetMetadataList>;

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -82,3 +82,3 @@ /*!

/**
* Gets the {@link securityRules.Ruleset `Ruleset`} identified by the given
* Gets the {@link Ruleset} identified by the given
* name. The input name should be the short name string without the project ID

@@ -90,3 +90,3 @@ * prefix. For example, to retrieve the `projects/project-id/rulesets/my-ruleset`,

* @param name Name of the `Ruleset` to retrieve.
* @return A promise that fulfills with the specified `Ruleset`.
* @returns A promise that fulfills with the specified `Ruleset`.
*/

@@ -100,7 +100,7 @@ SecurityRules.prototype.getRuleset = function (name) {

/**
* Gets the {@link securityRules.Ruleset `Ruleset`} currently applied to
* Gets the {@link Ruleset} currently applied to
* Cloud Firestore. Rejects with a `not-found` error if no ruleset is applied
* on Firestore.
*
* @return A promise that fulfills with the Firestore ruleset.
* @returns A promise that fulfills with the Firestore ruleset.
*/

@@ -111,7 +111,7 @@ SecurityRules.prototype.getFirestoreRuleset = function () {

/**
* Creates a new {@link securityRules.Ruleset `Ruleset`} from the given
* Creates a new {@link Ruleset} from the given
* source, and applies it to Cloud Firestore.
*
* @param source Rules source to apply.
* @return A promise that fulfills when the ruleset is created and released.
* @returns A promise that fulfills when the ruleset is created and released.
*/

@@ -133,3 +133,3 @@ SecurityRules.prototype.releaseFirestoreRulesetFromSource = function (source) {

/**
* Applies the specified {@link securityRules.Ruleset `Ruleset`} ruleset
* Applies the specified {@link Ruleset} ruleset
* to Cloud Firestore.

@@ -139,3 +139,3 @@ *

* containing the name.
* @return A promise that fulfills when the ruleset is released.
* @returns A promise that fulfills when the ruleset is released.
*/

@@ -146,3 +146,3 @@ SecurityRules.prototype.releaseFirestoreRuleset = function (ruleset) {

/**
* Gets the {@link securityRules.Ruleset `Ruleset`} currently applied to a
* Gets the {@link Ruleset} currently applied to a
* Cloud Storage bucket. Rejects with a `not-found` error if no ruleset is applied

@@ -154,3 +154,3 @@ * on the bucket.

* `AppOptions`.
* @return A promise that fulfills with the Cloud Storage ruleset.
* @returns A promise that fulfills with the Cloud Storage ruleset.
*/

@@ -168,3 +168,3 @@ SecurityRules.prototype.getStorageRuleset = function (bucket) {

/**
* Creates a new {@link securityRules.Ruleset `Ruleset`} from the given
* Creates a new {@link Ruleset} from the given
* source, and applies it to a Cloud Storage bucket.

@@ -175,4 +175,4 @@ *

* not specified, applies the ruleset on the default bucket configured via
* {@link AppOptions `AppOptions`}.
* @return A promise that fulfills when the ruleset is created and released.
* {@link firebase-admin.app#AppOptions}.
* @returns A promise that fulfills when the ruleset is created and released.
*/

@@ -197,3 +197,3 @@ SecurityRules.prototype.releaseStorageRulesetFromSource = function (source, bucket) {

/**
* Applies the specified {@link securityRules.Ruleset `Ruleset`} ruleset
* Applies the specified {@link Ruleset} ruleset
* to a Cloud Storage bucket.

@@ -205,4 +205,4 @@ *

* not specified, applies the ruleset on the default bucket configured via
* {@link AppOptions `AppOptions`}.
* @return A promise that fulfills when the ruleset is released.
* {@link firebase-admin.app#AppOptions}.
* @returns A promise that fulfills when the ruleset is released.
*/

@@ -220,3 +220,3 @@ SecurityRules.prototype.releaseStorageRuleset = function (ruleset, bucket) {

/**
* Creates a {@link securityRules.RulesFile `RuleFile`} with the given name
* Creates a {@link RulesFile} with the given name
* and source. Throws an error if any of the arguments are invalid. This is a local

@@ -235,3 +235,3 @@ * operation, and does not involve any network API calls.

* @param source Contents of the rules file.
* @return A new rules file instance.
* @returns A new rules file instance.
*/

@@ -258,4 +258,3 @@ SecurityRules.prototype.createRulesFileFromSource = function (name, source) {

/**
* Creates a new {@link securityRules.Ruleset `Ruleset`} from the given
* {@link securityRules.RulesFile `RuleFile`}.
* Creates a new {@link Ruleset} from the given {@link RulesFile}.
*

@@ -277,3 +276,3 @@ * @param file Rules file to include in the new `Ruleset`.

/**
* Deletes the {@link securityRules.Ruleset `Ruleset`} identified by the given
* Deletes the {@link Ruleset} identified by the given
* name. The input name should be the short name string without the project ID

@@ -285,3 +284,3 @@ * prefix. For example, to delete the `projects/project-id/rulesets/my-ruleset`,

* @param name Name of the `Ruleset` to delete.
* @return A promise that fulfills when the `Ruleset` is deleted.
* @returns A promise that fulfills when the `Ruleset` is deleted.
*/

@@ -298,3 +297,3 @@ SecurityRules.prototype.deleteRuleset = function (name) {

* starting without any offset.
* @return A promise that fulfills with a page of rulesets.
* @returns A promise that fulfills with a page of rulesets.
*/

@@ -301,0 +300,0 @@ SecurityRules.prototype.listRulesetMetadata = function (pageSize, nextPageToken) {

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -17,2 +17,7 @@ * Copyright 2020 Google Inc.

*/
/**
* Cloud Storage for Firebase.
*
* @packageDocumentation
*/
import { App } from '../app';

@@ -22,10 +27,7 @@ import { Storage } from './storage';

/**
* Gets the {@link storage.Storage `Storage`} service for the
* default app or a given app.
* Gets the {@link Storage} service for the default app or a given app.
*
* `getStorage()` can be called with no arguments to access the default
* app's {@link storage.Storage `Storage`} service or as
* `getStorage(app)` to access the
* {@link storage.Storage `Storage`} service associated with a
* specific app.
* app's `Storage` service or as `getStorage(app)` to access the
* `Storage` service associated with a specific app.
*

@@ -32,0 +34,0 @@ * @example

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -20,2 +20,7 @@ /*!

exports.getStorage = void 0;
/**
* Cloud Storage for Firebase.
*
* @packageDocumentation
*/
var app_1 = require("../app");

@@ -26,10 +31,7 @@ var storage_1 = require("./storage");

/**
* Gets the {@link storage.Storage `Storage`} service for the
* default app or a given app.
* Gets the {@link Storage} service for the default app or a given app.
*
* `getStorage()` can be called with no arguments to access the default
* app's {@link storage.Storage `Storage`} service or as
* `getStorage(app)` to access the
* {@link storage.Storage `Storage`} service associated with a
* specific app.
* app's `Storage` service or as `getStorage(app)` to access the
* `Storage` service associated with a specific app.
*

@@ -36,0 +38,0 @@ * @example

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -20,10 +20,8 @@ * Copyright 2021 Google Inc.

/**
* Gets the {@link storage.Storage `Storage`} service for the
* Gets the {@link firebase-admin.storage#Storage} service for the
* default app or a given app.
*
* `admin.storage()` can be called with no arguments to access the default
* app's {@link storage.Storage `Storage`} service or as
* `admin.storage(app)` to access the
* {@link storage.Storage `Storage`} service associated with a
* specific app.
* app's `Storage` service or as `admin.storage(app)` to access the
* `Storage` service associated with a specific app.
*

@@ -44,3 +42,6 @@ * @example

export declare namespace storage {
/**
* Type alias to {@link firebase-admin.storage#Storage}.
*/
type Storage = TStorage;
}

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -33,3 +33,3 @@ * @license

* retrieves a reference to the default bucket.
* @returns A [Bucket](https://cloud.google.com/nodejs/docs/reference/storage/latest/Bucket)
* @returns A {@link https://cloud.google.com/nodejs/docs/reference/storage/latest/Bucket | Bucket}
* instance as defined in the `@google-cloud/storage` package.

@@ -36,0 +36,0 @@ */

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -43,2 +43,12 @@ /*!

}
if (!process.env.STORAGE_EMULATOR_HOST && process.env.FIREBASE_STORAGE_EMULATOR_HOST) {
var firebaseStorageEmulatorHost = process.env.FIREBASE_STORAGE_EMULATOR_HOST;
if (firebaseStorageEmulatorHost.match(/https?:\/\//)) {
throw new error_1.FirebaseError({
code: 'storage/invalid-emulator-host',
message: 'FIREBASE_STORAGE_EMULATOR_HOST should not contain a protocol (http or https).',
});
}
process.env.STORAGE_EMULATOR_HOST = "http://" + process.env.FIREBASE_STORAGE_EMULATOR_HOST;
}
var storage;

@@ -88,3 +98,3 @@ try {

* retrieves a reference to the default bucket.
* @returns A [Bucket](https://cloud.google.com/nodejs/docs/reference/storage/latest/Bucket)
* @returns A {@link https://cloud.google.com/nodejs/docs/reference/storage/latest/Bucket | Bucket}
* instance as defined in the `@google-cloud/storage` package.

@@ -91,0 +101,0 @@ */

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -102,4 +102,4 @@ * @license

*
* @param {HttpRequest} config HTTP request to be sent.
* @return {Promise<HttpResponse>} A promise that resolves with the response details.
* @param config HTTP request to be sent.
* @returns A promise that resolves with the response details.
*/

@@ -111,5 +111,5 @@ send(config: HttpRequestConfig): Promise<HttpResponse>;

*
* @param {HttpRequestConfig} config HTTP request to be sent.
* @param {number} retryAttempts Number of retries performed up to now.
* @return {Promise<HttpResponse>} A promise that resolves with the response details.
* @param config HTTP request to be sent.
* @param retryAttempts Number of retries performed up to now.
* @returns A promise that resolves with the response details.
*/

@@ -123,5 +123,5 @@ private sendWithRetry;

*
* @param {number} retryAttempts Number of retries completed up to now.
* @param {LowLevelError} err The last encountered error.
* @returns {[number, boolean]} A 2-tuple where the 1st element is the duration to wait before another retry, and the
* @param retryAttempts Number of retries completed up to now.
* @param err The last encountered error.
* @returns A 2-tuple where the 1st element is the duration to wait before another retry, and the
* 2nd element is a boolean indicating whether the request is eligible for a retry or not.

@@ -141,5 +141,5 @@ */

*
* @param {string|Buffer} response The HTTP response to be parsed.
* @param {HttpRequestConfig} config The request configuration that resulted in the HTTP response.
* @return {HttpResponse} An object containing the parsed HTTP status, headers and the body.
* @param response The HTTP response to be parsed.
* @param config The request configuration that resulted in the HTTP response.
* @returns An object containing the parsed HTTP status, headers and the body.
*/

@@ -156,4 +156,4 @@ export declare function parseHttpResponse(response: string | Buffer, config: HttpRequestConfig): HttpResponse;

*
* @param {string} endpoint The Firebase Auth backend endpoint.
* @param {HttpMethod} httpMethod The http method for that endpoint.
* @param endpoint The Firebase Auth backend endpoint.
* @param httpMethod The http method for that endpoint.
* @constructor

@@ -167,19 +167,19 @@ */

constructor(endpoint: string, httpMethod?: HttpMethod);
/** @return {string} The backend API endpoint. */
/** @returns The backend API endpoint. */
getEndpoint(): string;
/** @return {HttpMethod} The request HTTP method. */
/** @returns The request HTTP method. */
getHttpMethod(): HttpMethod;
/**
* @param {ApiCallbackFunction} requestValidator The request validator.
* @return {ApiSettings} The current API settings instance.
* @param requestValidator The request validator.
* @returns The current API settings instance.
*/
setRequestValidator(requestValidator: ApiCallbackFunction | null): ApiSettings;
/** @return {ApiCallbackFunction} The request validator. */
/** @returns The request validator. */
getRequestValidator(): ApiCallbackFunction;
/**
* @param {ApiCallbackFunction} responseValidator The response validator.
* @return {ApiSettings} The current API settings instance.
* @param responseValidator The response validator.
* @returns The current API settings instance.
*/
setResponseValidator(responseValidator: ApiCallbackFunction | null): ApiSettings;
/** @return {ApiCallbackFunction} The response validator. */
/** @returns The response validator. */
getResponseValidator(): ApiCallbackFunction;

@@ -226,6 +226,6 @@ }

*
* @param {() => Promise<T>} callback The callback to be called for each poll. If the
* @param callback The callback to be called for each poll. If the
* callback resolves to a falsey value, polling will continue. Otherwise, the truthy
* resolution will be used to resolve the promise returned by this method.
* @return {Promise<T>} A Promise which resolves to the truthy value returned by the provided
* @returns A Promise which resolves to the truthy value returned by the provided
* callback when polling is complete.

@@ -232,0 +232,0 @@ */

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -177,4 +177,4 @@ /*!

*
* @param {HttpRequest} config HTTP request to be sent.
* @return {Promise<HttpResponse>} A promise that resolves with the response details.
* @param config HTTP request to be sent.
* @returns A promise that resolves with the response details.
*/

@@ -188,5 +188,5 @@ HttpClient.prototype.send = function (config) {

*
* @param {HttpRequestConfig} config HTTP request to be sent.
* @param {number} retryAttempts Number of retries performed up to now.
* @return {Promise<HttpResponse>} A promise that resolves with the response details.
* @param config HTTP request to be sent.
* @param retryAttempts Number of retries performed up to now.
* @returns A promise that resolves with the response details.
*/

@@ -234,5 +234,5 @@ HttpClient.prototype.sendWithRetry = function (config, retryAttempts) {

*
* @param {number} retryAttempts Number of retries completed up to now.
* @param {LowLevelError} err The last encountered error.
* @returns {[number, boolean]} A 2-tuple where the 1st element is the duration to wait before another retry, and the
* @param retryAttempts Number of retries completed up to now.
* @param err The last encountered error.
* @returns A 2-tuple where the 1st element is the duration to wait before another retry, and the
* 2nd element is a boolean indicating whether the request is eligible for a retry or not.

@@ -302,5 +302,5 @@ */

*
* @param {string|Buffer} response The HTTP response to be parsed.
* @param {HttpRequestConfig} config The request configuration that resulted in the HTTP response.
* @return {HttpResponse} An object containing the parsed HTTP status, headers and the body.
* @param response The HTTP response to be parsed.
* @param config The request configuration that resulted in the HTTP response.
* @returns An object containing the parsed HTTP status, headers and the body.
*/

@@ -694,4 +694,4 @@ function parseHttpResponse(response, config) {

*
* @param {string} endpoint The Firebase Auth backend endpoint.
* @param {HttpMethod} httpMethod The http method for that endpoint.
* @param endpoint The Firebase Auth backend endpoint.
* @param httpMethod The http method for that endpoint.
* @constructor

@@ -707,7 +707,7 @@ */

}
/** @return {string} The backend API endpoint. */
/** @returns The backend API endpoint. */
ApiSettings.prototype.getEndpoint = function () {
return this.endpoint;
};
/** @return {HttpMethod} The request HTTP method. */
/** @returns The request HTTP method. */
ApiSettings.prototype.getHttpMethod = function () {

@@ -717,4 +717,4 @@ return this.httpMethod;

/**
* @param {ApiCallbackFunction} requestValidator The request validator.
* @return {ApiSettings} The current API settings instance.
* @param requestValidator The request validator.
* @returns The current API settings instance.
*/

@@ -726,3 +726,3 @@ ApiSettings.prototype.setRequestValidator = function (requestValidator) {

};
/** @return {ApiCallbackFunction} The request validator. */
/** @returns The request validator. */
ApiSettings.prototype.getRequestValidator = function () {

@@ -732,4 +732,4 @@ return this.requestValidator;

/**
* @param {ApiCallbackFunction} responseValidator The response validator.
* @return {ApiSettings} The current API settings instance.
* @param responseValidator The response validator.
* @returns The current API settings instance.
*/

@@ -741,3 +741,3 @@ ApiSettings.prototype.setResponseValidator = function (responseValidator) {

};
/** @return {ApiCallbackFunction} The response validator. */
/** @returns The response validator. */
ApiSettings.prototype.getResponseValidator = function () {

@@ -790,6 +790,6 @@ return this.responseValidator;

*
* @param {() => Promise<T>} callback The callback to be called for each poll. If the
* @param callback The callback to be called for each poll. If the
* callback resolves to a falsey value, polling will continue. Otherwise, the truthy
* resolution will be used to resolve the promise returned by this method.
* @return {Promise<T>} A Promise which resolves to the truthy value returned by the provided
* @returns A Promise which resolves to the truthy value returned by the provided
* callback when polling is complete.

@@ -796,0 +796,0 @@ */

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -21,4 +21,4 @@ * @license

*
* @param {object|array} value The object or array to deep copy.
* @return {object|array} A deep copy of the provided object or array.
* @param value The object or array to deep copy.
* @returns A deep copy of the provided object or array.
*/

@@ -37,6 +37,6 @@ export declare function deepCopy<T>(value: T): T;

*
* @param {any} target The value which is being extended.
* @param {any} source The value whose properties are extending the target.
* @return {any} The target value.
* @param target The value which is being extended.
* @param source The value whose properties are extending the target.
* @returns The target value.
*/
export declare function deepExtend(target: any, source: any): any;

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -24,4 +24,4 @@ /*!

*
* @param {object|array} value The object or array to deep copy.
* @return {object|array} A deep copy of the provided object or array.
* @param value The object or array to deep copy.
* @returns A deep copy of the provided object or array.
*/

@@ -43,5 +43,5 @@ function deepCopy(value) {

*
* @param {any} target The value which is being extended.
* @param {any} source The value whose properties are extending the target.
* @return {any} The target value.
* @param target The value which is being extended.
* @param source The value whose properties are extending the target.
* @returns The target value.
*/

@@ -48,0 +48,0 @@ function deepExtend(target, source) {

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -18,3 +18,3 @@ * @license

*/
import { FirebaseError as FireabseErrorInterface } from '../app';
import { FirebaseError as FirebaseErrorInterface } from '../app';
/**

@@ -30,13 +30,13 @@ * Defines error info type. This includes a code and message string.

*
* @param {ErrorInfo} errorInfo The error information (code and message).
* @param errorInfo The error information (code and message).
* @constructor
*/
export declare class FirebaseError extends Error implements FireabseErrorInterface {
export declare class FirebaseError extends Error implements FirebaseErrorInterface {
private errorInfo;
constructor(errorInfo: ErrorInfo);
/** @return {string} The error code. */
/** @returns The error code. */
get code(): string;
/** @return {string} The error message. */
/** @returns The error message. */
get message(): string;
/** @return {object} The object representation of the error. */
/** @returns The object representation of the error. */
toJSON(): object;

@@ -47,5 +47,5 @@ }

*
* @param {string} codePrefix The prefix to apply to the error code.
* @param {string} code The error code.
* @param {string} message The error message.
* @param codePrefix The prefix to apply to the error code.
* @param code The error code.
* @param message The error message.
* @constructor

@@ -60,4 +60,4 @@ */

*
* @param {string} code The non-prefixed error code to test against.
* @return {boolean} True if the code matches, false otherwise.
* @param code The non-prefixed error code to test against.
* @returns True if the code matches, false otherwise.
*/

@@ -69,4 +69,4 @@ hasCode(code: string): boolean;

*
* @param {string} code The error code.
* @param {string} message The error message.
* @param code The error code.
* @param message The error message.
* @constructor

@@ -80,4 +80,4 @@ */

*
* @param {ErrorInfo} info The error code info.
* @param {string} [message] The error message. This will override the default
* @param info The error code info.
* @param [message] The error message. This will override the default
* message if provided.

@@ -90,7 +90,7 @@ * @constructor

*
* @param {string} serverErrorCode The server error code.
* @param {string} [message] The error message. The default message is used
* @param serverErrorCode The server error code.
* @param [message] The error message. The default message is used
* if not provided.
* @param {object} [rawServerResponse] The error's raw server response.
* @return {FirebaseAuthError} The corresponding developer-facing error.
* @param [rawServerResponse] The error's raw server response.
* @returns The corresponding developer-facing error.
*/

@@ -103,4 +103,4 @@ static fromServerError(serverErrorCode: string, message?: string, rawServerResponse?: object): FirebaseAuthError;

*
* @param {ErrorInfo} info The error code info.
* @param {string} [message] The error message. This will override the default
* @param info The error code info.
* @param [message] The error message. This will override the default
* message if provided.

@@ -115,4 +115,4 @@ * @constructor

*
* @param {ErrorInfo} info The error code info.
* @param {string} [message] The error message. This will override the default
* @param info The error code info.
* @param [message] The error message. This will override the default
* message if provided.

@@ -127,4 +127,4 @@ * @constructor

*
* @param {ErrorInfo} info The error code info.
* @param {string} [message] The error message. This will override the default
* @param info The error code info.
* @param [message] The error message. This will override the default
* message if provided.

@@ -139,4 +139,4 @@ * @constructor

*
* @param {ErrorInfo} info The error code info.
* @param {string} [message] The error message. This will override the default message if provided.
* @param info The error code info.
* @param [message] The error message. This will override the default message if provided.
* @constructor

@@ -148,7 +148,7 @@ */

*
* @param {string} serverErrorCode The server error code.
* @param {string} [message] The error message. The default message is used
* @param serverErrorCode The server error code.
* @param [message] The error message. The default message is used
* if not provided.
* @param {object} [rawServerResponse] The error's raw server response.
* @return {FirebaseMessagingError} The corresponding developer-facing error.
* @param [rawServerResponse] The error's raw server response.
* @returns The corresponding developer-facing error.
*/

@@ -162,4 +162,4 @@ static fromServerError(serverErrorCode: string | null, message?: string | null, rawServerResponse?: object): FirebaseMessagingError;

*
* @param {ProjectManagementErrorCode} code The error code.
* @param {string} message The error message.
* @param code The error code.
* @param message The error message.
* @constructor

@@ -222,2 +222,6 @@ */

};
static EMAIL_NOT_FOUND: {
code: string;
message: string;
};
static FORBIDDEN_CLAIM: {

@@ -367,2 +371,6 @@ code: string;

};
static INVALID_OAUTH_RESPONSETYPE: {
code: string;
message: string;
};
static INVALID_SESSION_COOKIE_DURATION: {

@@ -436,2 +444,6 @@ code: string;

};
static MISSING_OAUTH_CLIENT_SECRET: {
code: string;
message: string;
};
static MISSING_PROVIDER_ID: {

@@ -438,0 +450,0 @@ code: string;

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -38,3 +38,3 @@ /*!

*
* @param {ErrorInfo} errorInfo The error information (code and message).
* @param errorInfo The error information (code and message).
* @constructor

@@ -55,3 +55,3 @@ */

Object.defineProperty(FirebaseError.prototype, "code", {
/** @return {string} The error code. */
/** @returns The error code. */
get: function () {

@@ -64,3 +64,3 @@ return this.errorInfo.code;

Object.defineProperty(FirebaseError.prototype, "message", {
/** @return {string} The error message. */
/** @returns The error message. */
get: function () {

@@ -72,3 +72,3 @@ return this.errorInfo.message;

});
/** @return {object} The object representation of the error. */
/** @returns The object representation of the error. */
FirebaseError.prototype.toJSON = function () {

@@ -86,5 +86,5 @@ return {

*
* @param {string} codePrefix The prefix to apply to the error code.
* @param {string} code The error code.
* @param {string} message The error message.
* @param codePrefix The prefix to apply to the error code.
* @param code The error code.
* @param message The error message.
* @constructor

@@ -111,4 +111,4 @@ */

*
* @param {string} code The non-prefixed error code to test against.
* @return {boolean} True if the code matches, false otherwise.
* @param code The non-prefixed error code to test against.
* @returns True if the code matches, false otherwise.
*/

@@ -124,4 +124,4 @@ PrefixedFirebaseError.prototype.hasCode = function (code) {

*
* @param {string} code The error code.
* @param {string} message The error message.
* @param code The error code.
* @param message The error message.
* @constructor

@@ -146,4 +146,4 @@ */

*
* @param {ErrorInfo} info The error code info.
* @param {string} [message] The error message. This will override the default
* @param info The error code info.
* @param [message] The error message. This will override the default
* message if provided.

@@ -168,7 +168,7 @@ * @constructor

*
* @param {string} serverErrorCode The server error code.
* @param {string} [message] The error message. The default message is used
* @param serverErrorCode The server error code.
* @param [message] The error message. The default message is used
* if not provided.
* @param {object} [rawServerResponse] The error's raw server response.
* @return {FirebaseAuthError} The corresponding developer-facing error.
* @param [rawServerResponse] The error's raw server response.
* @returns The corresponding developer-facing error.
*/

@@ -205,4 +205,4 @@ FirebaseAuthError.fromServerError = function (serverErrorCode, message, rawServerResponse) {

*
* @param {ErrorInfo} info The error code info.
* @param {string} [message] The error message. This will override the default
* @param info The error code info.
* @param [message] The error message. This will override the default
* message if provided.

@@ -223,4 +223,4 @@ * @constructor

*
* @param {ErrorInfo} info The error code info.
* @param {string} [message] The error message. This will override the default
* @param info The error code info.
* @param [message] The error message. This will override the default
* message if provided.

@@ -241,4 +241,4 @@ * @constructor

*
* @param {ErrorInfo} info The error code info.
* @param {string} [message] The error message. This will override the default
* @param info The error code info.
* @param [message] The error message. This will override the default
* message if provided.

@@ -259,4 +259,4 @@ * @constructor

*
* @param {ErrorInfo} info The error code info.
* @param {string} [message] The error message. This will override the default message if provided.
* @param info The error code info.
* @param [message] The error message. This will override the default message if provided.
* @constructor

@@ -280,7 +280,7 @@ */

*
* @param {string} serverErrorCode The server error code.
* @param {string} [message] The error message. The default message is used
* @param serverErrorCode The server error code.
* @param [message] The error message. The default message is used
* if not provided.
* @param {object} [rawServerResponse] The error's raw server response.
* @return {FirebaseMessagingError} The corresponding developer-facing error.
* @param [rawServerResponse] The error's raw server response.
* @returns The corresponding developer-facing error.
*/

@@ -326,4 +326,4 @@ FirebaseMessagingError.fromServerError = function (serverErrorCode, message, rawServerResponse) {

*
* @param {ProjectManagementErrorCode} code The error code.
* @param {string} message The error message.
* @param code The error code.
* @param message The error message.
* @constructor

@@ -403,2 +403,6 @@ */

};
AuthClientErrorCode.EMAIL_NOT_FOUND = {
code: 'email-not-found',
message: 'There is no user record corresponding to the provided email.',
};
AuthClientErrorCode.FORBIDDEN_CLAIM = {

@@ -551,2 +555,6 @@ code: 'reserved-claim',

};
AuthClientErrorCode.INVALID_OAUTH_RESPONSETYPE = {
code: 'invalid-oauth-responsetype',
message: 'Only exactly one OAuth responseType should be set to true.',
};
AuthClientErrorCode.INVALID_SESSION_COOKIE_DURATION = {

@@ -624,2 +632,6 @@ code: 'invalid-session-cookie-duration',

};
AuthClientErrorCode.MISSING_OAUTH_CLIENT_SECRET = {
code: 'missing-oauth-client-secret',
message: 'The OAuth configuration client secret is required to enable OIDC code flow.',
};
AuthClientErrorCode.MISSING_PROVIDER_ID = {

@@ -882,2 +894,4 @@ code: 'missing-provider-id',

EMAIL_EXISTS: 'EMAIL_ALREADY_EXISTS',
// /accounts:sendOobCode for password reset when user is not found.
EMAIL_NOT_FOUND: 'EMAIL_NOT_FOUND',
// Reserved claim name.

@@ -884,0 +898,0 @@ FORBIDDEN_CLAIM: 'FORBIDDEN_CLAIM',

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -26,4 +26,4 @@ * @license

*
* @param {object} obj The object whose properties to rename.
* @param {object} keyMap The mapping from old to new property names.
* @param obj The object whose properties to rename.
* @param keyMap The mapping from old to new property names.
*/

@@ -38,5 +38,5 @@ export declare function renameProperties(obj: {

*
* @param {object} obj The object on which to define the property.
* @param {string} prop The name of the property to be defined or modified.
* @param {any} value The value associated with the property.
* @param obj The object on which to define the property.
* @param prop The name of the property to be defined or modified.
* @param value The value associated with the property.
*/

@@ -51,3 +51,3 @@ export declare function addReadonlyGetter(obj: object, prop: string, value: any): void;

*
* @return A project ID string or null.
* @returns A project ID string or null.
*/

@@ -64,3 +64,3 @@ export declare function getExplicitProjectId(app: App): string | null;

*
* @return A project ID string or null.
* @returns A project ID string or null.
*/

@@ -71,4 +71,4 @@ export declare function findProjectId(app: App): Promise<string | null>;

*
* @param {Buffer} data The raw data byte input.
* @return {string} The base64-encoded result.
* @param data The raw data byte input.
* @returns The base64-encoded result.
*/

@@ -81,7 +81,7 @@ export declare function toWebSafeBase64(data: Buffer): string;

*
* @param {string} str The original string where the param need to be
* @param str The original string where the param need to be
* replaced.
* @param {object=} params The optional parameters to replace in the
* @param params The optional parameters to replace in the
* string.
* @return {string} The resulting formatted string.
* @returns The resulting formatted string.
*/

@@ -98,4 +98,4 @@ export declare function formatString(str: string, params?: object): string;

* @param root The path so far.
* @return The computed update mask list.
* @returns The computed update mask list.
*/
export declare function generateUpdateMask(obj: any, terminalPaths?: string[], root?: string): string[];

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -38,4 +38,4 @@ /*!

*
* @param {object} obj The object whose properties to rename.
* @param {object} keyMap The mapping from old to new property names.
* @param obj The object whose properties to rename.
* @param keyMap The mapping from old to new property names.
*/

@@ -56,5 +56,5 @@ function renameProperties(obj, keyMap) {

*
* @param {object} obj The object on which to define the property.
* @param {string} prop The name of the property to be defined or modified.
* @param {any} value The value associated with the property.
* @param obj The object on which to define the property.
* @param prop The name of the property to be defined or modified.
* @param value The value associated with the property.
*/

@@ -78,3 +78,3 @@ function addReadonlyGetter(obj, prop, value) {

*
* @return A project ID string or null.
* @returns A project ID string or null.
*/

@@ -106,3 +106,3 @@ function getExplicitProjectId(app) {

*
* @return A project ID string or null.
* @returns A project ID string or null.
*/

@@ -124,4 +124,4 @@ function findProjectId(app) {

*
* @param {Buffer} data The raw data byte input.
* @return {string} The base64-encoded result.
* @param data The raw data byte input.
* @returns The base64-encoded result.
*/

@@ -137,7 +137,7 @@ function toWebSafeBase64(data) {

*
* @param {string} str The original string where the param need to be
* @param str The original string where the param need to be
* replaced.
* @param {object=} params The optional parameters to replace in the
* @param params The optional parameters to replace in the
* string.
* @return {string} The resulting formatted string.
* @returns The resulting formatted string.
*/

@@ -161,3 +161,3 @@ function formatString(str, params) {

* @param root The path so far.
* @return The computed update mask list.
* @returns The computed update mask list.
*/

@@ -164,0 +164,0 @@ function generateUpdateMask(obj, terminalPaths, root) {

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
/*!

@@ -22,4 +22,4 @@ * @license

*
* @param {any} value The value to validate.
* @return {boolean} Whether the value is byte buffer or not.
* @param value The value to validate.
* @returns Whether the value is byte buffer or not.
*/

@@ -30,4 +30,4 @@ export declare function isBuffer(value: any): value is Buffer;

*
* @param {any} value The value to validate.
* @return {boolean} Whether the value is an array or not.
* @param value The value to validate.
* @returns Whether the value is an array or not.
*/

@@ -38,4 +38,4 @@ export declare function isArray<T>(value: any): value is T[];

*
* @param {any} value The value to validate.
* @return {boolean} Whether the value is a non-empty array or not.
* @param value The value to validate.
* @returns Whether the value is a non-empty array or not.
*/

@@ -46,4 +46,4 @@ export declare function isNonEmptyArray<T>(value: any): value is T[];

*
* @param {any} value The value to validate.
* @return {boolean} Whether the value is a boolean or not.
* @param value The value to validate.
* @returns Whether the value is a boolean or not.
*/

@@ -54,4 +54,4 @@ export declare function isBoolean(value: any): boolean;

*
* @param {any} value The value to validate.
* @return {boolean} Whether the value is a number or not.
* @param value The value to validate.
* @returns Whether the value is a number or not.
*/

@@ -62,4 +62,4 @@ export declare function isNumber(value: any): boolean;

*
* @param {any} value The value to validate.
* @return {boolean} Whether the value is a string or not.
* @param value The value to validate.
* @returns Whether the value is a string or not.
*/

@@ -70,4 +70,4 @@ export declare function isString(value: any): value is string;

*
* @param {any} value The value to validate.
* @return {boolean} Whether the value is a base64 string or not.
* @param value The value to validate.
* @returns Whether the value is a base64 string or not.
*/

@@ -78,4 +78,4 @@ export declare function isBase64String(value: any): boolean;

*
* @param {any} value The value to validate.
* @return {boolean} Whether the value is a non-empty string or not.
* @param value The value to validate.
* @returns Whether the value is a non-empty string or not.
*/

@@ -86,4 +86,4 @@ export declare function isNonEmptyString(value: any): value is string;

*
* @param {any} value The value to validate.
* @return {boolean} Whether the value is an object or not.
* @param value The value to validate.
* @returns Whether the value is an object or not.
*/

@@ -94,4 +94,4 @@ export declare function isObject(value: any): boolean;

*
* @param {any} value The value to validate.
* @return {boolean} Whether the value is a non-null object or not.
* @param value The value to validate.
* @returns Whether the value is a non-null object or not.
*/

@@ -102,4 +102,4 @@ export declare function isNonNullObject<T>(value: T | null | undefined): value is T;

*
* @param {any} uid The string to validate.
* @return {boolean} Whether the string is a valid Firebase Auth uid.
* @param uid The string to validate.
* @returns Whether the string is a valid Firebase Auth uid.
*/

@@ -110,4 +110,4 @@ export declare function isUid(uid: any): boolean;

*
* @param {any} password The password string to validate.
* @return {boolean} Whether the string is a valid Firebase Auth password.
* @param password The password string to validate.
* @returns Whether the string is a valid Firebase Auth password.
*/

@@ -118,4 +118,4 @@ export declare function isPassword(password: any): boolean;

*
* @param {any} email The string to validate.
* @return {boolean} Whether the string is valid email or not.
* @param email The string to validate.
* @returns Whether the string is valid email or not.
*/

@@ -126,4 +126,4 @@ export declare function isEmail(email: any): boolean;

*
* @param {any} phoneNumber The string to validate.
* @return {boolean} Whether the string is a valid phone number or not.
* @param phoneNumber The string to validate.
* @returns Whether the string is a valid phone number or not.
*/

@@ -135,3 +135,3 @@ export declare function isPhoneNumber(phoneNumber: any): boolean;

* @param dateString The string to validate.
* @return Whether the string is a valid ISO date string.
* @returns Whether the string is a valid ISO date string.
*/

@@ -143,3 +143,3 @@ export declare function isISODateString(dateString: any): boolean;

* @param dateString The string to validate.
* @return Whether the string is a valid UTC date string.
* @returns Whether the string is a valid UTC date string.
*/

@@ -150,4 +150,4 @@ export declare function isUTCDateString(dateString: any): boolean;

*
* @param {any} urlStr The string to validate.
* @return {boolean} Whether the string is valid web URL or not.
* @param urlStr The string to validate.
* @returns Whether the string is valid web URL or not.
*/

@@ -158,5 +158,5 @@ export declare function isURL(urlStr: any): boolean;

*
* @param {any} topic The topic to validate.
* @return {boolean} Whether the provided topic is a valid FCM topic name.
* @param topic The topic to validate.
* @returns Whether the provided topic is a valid FCM topic name.
*/
export declare function isTopic(topic: any): boolean;

@@ -1,2 +0,2 @@

/*! firebase-admin v9.100.0-alpha.0 */
/*! firebase-admin v9.100.0-alpha.1 */
"use strict";

@@ -25,4 +25,4 @@ /*!

*
* @param {any} value The value to validate.
* @return {boolean} Whether the value is byte buffer or not.
* @param value The value to validate.
* @returns Whether the value is byte buffer or not.
*/

@@ -36,4 +36,4 @@ function isBuffer(value) {

*
* @param {any} value The value to validate.
* @return {boolean} Whether the value is an array or not.
* @param value The value to validate.
* @returns Whether the value is an array or not.
*/

@@ -47,4 +47,4 @@ function isArray(value) {

*
* @param {any} value The value to validate.
* @return {boolean} Whether the value is a non-empty array or not.
* @param value The value to validate.
* @returns Whether the value is a non-empty array or not.
*/

@@ -58,4 +58,4 @@ function isNonEmptyArray(value) {

*
* @param {any} value The value to validate.
* @return {boolean} Whether the value is a boolean or not.
* @param value The value to validate.
* @returns Whether the value is a boolean or not.
*/

@@ -69,4 +69,4 @@ function isBoolean(value) {

*
* @param {any} value The value to validate.
* @return {boolean} Whether the value is a number or not.
* @param value The value to validate.
* @returns Whether the value is a number or not.
*/

@@ -80,4 +80,4 @@ function isNumber(value) {

*
* @param {any} value The value to validate.
* @return {boolean} Whether the value is a string or not.
* @param value The value to validate.
* @returns Whether the value is a string or not.
*/

@@ -91,4 +91,4 @@ function isString(value) {

*
* @param {any} value The value to validate.
* @return {boolean} Whether the value is a base64 string or not.
* @param value The value to validate.
* @returns Whether the value is a base64 string or not.
*/

@@ -105,4 +105,4 @@ function isBase64String(value) {

*
* @param {any} value The value to validate.
* @return {boolean} Whether the value is a non-empty string or not.
* @param value The value to validate.
* @returns Whether the value is a non-empty string or not.
*/

@@ -116,4 +116,4 @@ function isNonEmptyString(value) {

*
* @param {any} value The value to validate.
* @return {boolean} Whether the value is an object or not.
* @param value The value to validate.
* @returns Whether the value is an object or not.
*/

@@ -127,4 +127,4 @@ function isObject(value) {

*
* @param {any} value The value to validate.
* @return {boolean} Whether the value is a non-null object or not.
* @param value The value to validate.
* @returns Whether the value is a non-null object or not.
*/

@@ -138,4 +138,4 @@ function isNonNullObject(value) {

*
* @param {any} uid The string to validate.
* @return {boolean} Whether the string is a valid Firebase Auth uid.
* @param uid The string to validate.
* @returns Whether the string is a valid Firebase Auth uid.
*/

@@ -149,4 +149,4 @@ function isUid(uid) {

*
* @param {any} password The password string to validate.
* @return {boolean} Whether the string is a valid Firebase Auth password.
* @param password The password string to validate.
* @returns Whether the string is a valid Firebase Auth password.
*/

@@ -161,4 +161,4 @@ function isPassword(password) {

*
* @param {any} email The string to validate.
* @return {boolean} Whether the string is valid email or not.
* @param email The string to validate.
* @returns Whether the string is valid email or not.
*/

@@ -177,4 +177,4 @@ function isEmail(email) {

*
* @param {any} phoneNumber The string to validate.
* @return {boolean} Whether the string is a valid phone number or not.
* @param phoneNumber The string to validate.
* @returns Whether the string is a valid phone number or not.
*/

@@ -198,3 +198,3 @@ function isPhoneNumber(phoneNumber) {

* @param dateString The string to validate.
* @return Whether the string is a valid ISO date string.
* @returns Whether the string is a valid ISO date string.
*/

@@ -215,3 +215,3 @@ function isISODateString(dateString) {

* @param dateString The string to validate.
* @return Whether the string is a valid UTC date string.
* @returns Whether the string is a valid UTC date string.
*/

@@ -231,4 +231,4 @@ function isUTCDateString(dateString) {

*
* @param {any} urlStr The string to validate.
* @return {boolean} Whether the string is valid web URL or not.
* @param urlStr The string to validate.
* @returns Whether the string is valid web URL or not.
*/

@@ -278,4 +278,4 @@ function isURL(urlStr) {

*
* @param {any} topic The topic to validate.
* @return {boolean} Whether the provided topic is a valid FCM topic name.
* @param topic The topic to validate.
* @returns Whether the provided topic is a valid FCM topic name.
*/

@@ -282,0 +282,0 @@ function isTopic(topic) {

{
"name": "firebase-admin",
"version": "9.100.0-alpha.0",
"version": "9.100.0-alpha.1",
"description": "Firebase admin SDK for Node.js",

@@ -14,3 +14,3 @@ "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",

"build:tests": "gulp compile_test",
"prepare": "npm run build",
"prepare": "npm run build && npm run esm-wrap",
"lint": "run-p lint:src lint:test",

@@ -24,5 +24,10 @@ "test": "run-s lint test:unit",

"lint:test": "eslint test/ --ext .ts",
"apidocs": "node docgen/generate-docs.js --api node",
"apidocs": "run-s api-extractor:local api-documenter",
"api-extractor": "node generate-reports.js",
"api-extractor:local": "npm run build && node generate-reports.js --local"
"api-extractor:local": "npm run build && node generate-reports.js --local",
"esm-wrap": "node generate-esm-wrapper.js",
"api-documenter": "run-s api-documenter:markdown api-documenter:toc api-documenter:post",
"api-documenter:markdown": "api-documenter-fire markdown --input temp --output docgen/markdown -s",
"api-documenter:toc": "api-documenter-fire toc --input temp --output docgen/markdown -p /docs/reference/admin/node -s",
"api-documenter:post": "node docgen/post-process.js"
},

@@ -62,13 +67,38 @@ "nyc": {

"*": {
"app": ["lib/app"],
"auth": ["lib/auth"],
"database": ["lib/database"],
"firestore": ["lib/firestore"],
"instance-id": ["lib/instance-id"],
"machine-learning": ["lib/machine-learning"],
"messaging": ["lib/messaging"],
"project-management": ["lib/project-management"],
"remote-config": ["lib/remote-config"],
"security-rules": ["lib/security-rules"],
"storage": ["lib/storage"]
"app": [
"lib/app"
],
"app-check": [
"lib/app-check"
],
"auth": [
"lib/auth"
],
"database": [
"lib/database"
],
"firestore": [
"lib/firestore"
],
"instance-id": [
"lib/instance-id"
],
"machine-learning": [
"lib/machine-learning"
],
"messaging": [
"lib/messaging"
],
"project-management": [
"lib/project-management"
],
"remote-config": [
"lib/remote-config"
],
"security-rules": [
"lib/security-rules"
],
"storage": [
"lib/storage"
]
}

@@ -78,20 +108,58 @@ },

".": "./lib/index.js",
"./app": "./lib/app/index.js",
"./auth": "./lib/auth/index.js",
"./database": "./lib/database/index.js",
"./firestore": "./lib/firestore/index.js",
"./instance-id": "./lib/instance-id/index.js",
"./machine-learning": "./lib/machine-learning/index.js",
"./messaging": "./lib/messaging/index.js",
"./project-management": "./lib/project-management/index.js",
"./remote-config": "./lib/remote-config/index.js",
"./security-rules": "./lib/security-rules/index.js",
"./storage": "./lib/storage/index.js"
"./app": {
"require": "./lib/app/index.js",
"import": "./lib/esm/app/index.js"
},
"./app-check": {
"require": "./lib/app-check/index.js",
"import": "./lib/esm/app-check/index.js"
},
"./auth": {
"require": "./lib/auth/index.js",
"import": "./lib/esm/auth/index.js"
},
"./database": {
"require": "./lib/database/index.js",
"import": "./lib/esm/database/index.js"
},
"./firestore": {
"require": "./lib/firestore/index.js",
"import": "./lib/esm/firestore/index.js"
},
"./instance-id": {
"require": "./lib/instance-id/index.js",
"import": "./lib/esm/instance-id/index.js"
},
"./machine-learning": {
"require": "./lib/machine-learning/index.js",
"import": "./lib/esm/machine-learning/index.js"
},
"./messaging": {
"require": "./lib/messaging/index.js",
"import": "./lib/esm/messaging/index.js"
},
"./project-management": {
"require": "./lib/project-management/index.js",
"import": "./lib/esm/project-management/index.js"
},
"./remote-config": {
"require": "./lib/remote-config/index.js",
"import": "./lib/esm/remote-config/index.js"
},
"./security-rules": {
"require": "./lib/security-rules/index.js",
"import": "./lib/esm/security-rules/index.js"
},
"./storage": {
"require": "./lib/storage/index.js",
"import": "./lib/esm/storage/index.js"
}
},
"dependencies": {
"@firebase/database": "^0.8.1",
"@firebase/database-types": "^0.6.1",
"@types/node": "^10.10.0",
"@firebase/database": "^0.10.0",
"@firebase/database-types": "^0.7.2",
"@types/node": ">=12.12.47",
"dicer": "^0.3.0",
"jsonwebtoken": "^8.5.1",
"jwks-rsa": "^2.0.2",
"node-forge": "^0.10.0"

@@ -104,4 +172,5 @@ },

"devDependencies": {
"@firebase/api-documenter": "^0.1.2",
"@firebase/app": "^0.6.13",
"@firebase/auth": "^0.15.2",
"@firebase/auth": "^0.16.2",
"@firebase/auth-types": "^0.10.1",

@@ -127,3 +196,3 @@ "@microsoft/api-extractor": "^7.11.2",

"chai-as-promised": "^7.0.0",
"chalk": "^1.1.3",
"chalk": "^4.1.1",
"child-process-promise": "^2.2.1",

@@ -135,7 +204,5 @@ "del": "^2.2.1",

"gulp-filter": "^6.0.0",
"gulp-header": "^1.8.8",
"gulp-replace": "^0.5.4",
"gulp-header": "^2.0.9",
"gulp-typescript": "^5.0.1",
"http-message-parser": "^0.0.34",
"jsdom": "^15.0.0",
"lodash": "^4.17.15",

@@ -147,13 +214,12 @@ "minimist": "^1.2.0",

"npm-run-all": "^4.1.5",
"nyc": "^14.1.0",
"nyc": "^15.1.0",
"request": "^2.75.0",
"request-promise": "^4.1.1",
"run-sequence": "^1.1.5",
"run-sequence": "^2.2.1",
"sinon": "^9.0.0",
"sinon-chai": "^3.0.0",
"ts-node": "^9.0.0",
"typedoc": "^0.19.2",
"typescript": "^3.7.3",
"yargs": "^16.0.0"
"yargs": "^17.0.1"
}
}

@@ -58,3 +58,3 @@ [![Build Status](https://github.com/firebase/firebase-admin-node/workflows/Continuous%20Integration/badge.svg)](https://github.com/firebase/firebase-admin-node/actions)

We support Node.js 10.10.0 and higher.
We support Node.js 10.13.0 and higher.

@@ -61,0 +61,0 @@ Please also note that the Admin SDK should only

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc