UNPKG

4.28 kBTypeScriptView Raw
1/*! firebase-admin v13.0.2 */
2/*!
3 * Copyright 2021 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17import { appCheck } from './app-check/app-check-namespace';
18import { auth } from './auth/auth-namespace';
19import { database } from './database/database-namespace';
20import { firestore } from './firestore/firestore-namespace';
21import { instanceId } from './instance-id/instance-id-namespace';
22import { installations } from './installations/installations-namespace';
23import { machineLearning } from './machine-learning/machine-learning-namespace';
24import { messaging } from './messaging/messaging-namespace';
25import { projectManagement } from './project-management/project-management-namespace';
26import { remoteConfig } from './remote-config/remote-config-namespace';
27import { securityRules } from './security-rules/security-rules-namespace';
28import { storage } from './storage/storage-namespace';
29import { App as AppCore, AppOptions } from './app/index';
30export { AppOptions, FirebaseError, FirebaseArrayIndexError } from './app/index';
31export declare namespace app {
32 /**
33 * A Firebase app holds the initialization information for a collection of
34 * services.
35 *
36 * Do not call this constructor directly. Instead, use
37 * {@link firebase-admin.app#initializeApp} to create an app.
38 */
39 interface App extends AppCore {
40 appCheck(): appCheck.AppCheck;
41 auth(): auth.Auth;
42 database(url?: string): database.Database;
43 firestore(): firestore.Firestore;
44 installations(): installations.Installations;
45 /**
46 * @deprecated Use {@link firebase-admin.installations#Installations} instead.
47 */
48 instanceId(): instanceId.InstanceId;
49 machineLearning(): machineLearning.MachineLearning;
50 messaging(): messaging.Messaging;
51 projectManagement(): projectManagement.ProjectManagement;
52 remoteConfig(): remoteConfig.RemoteConfig;
53 securityRules(): securityRules.SecurityRules;
54 storage(): storage.Storage;
55 /**
56 * Renders this local `FirebaseApp` unusable and frees the resources of
57 * all associated services (though it does *not* clean up any backend
58 * resources). When running the SDK locally, this method
59 * must be called to ensure graceful termination of the process.
60 *
61 * @example
62 * ```javascript
63 * app.delete()
64 * .then(function() {
65 * console.log("App deleted successfully");
66 * })
67 * .catch(function(error) {
68 * console.log("Error deleting app:", error);
69 * });
70 * ```
71 */
72 delete(): Promise<void>;
73 }
74}
75export * from './credential/index';
76export { appCheck } from './app-check/app-check-namespace';
77export { auth } from './auth/auth-namespace';
78export { database } from './database/database-namespace';
79export { firestore } from './firestore/firestore-namespace';
80export { instanceId } from './instance-id/instance-id-namespace';
81export { installations } from './installations/installations-namespace';
82export { machineLearning } from './machine-learning/machine-learning-namespace';
83export { messaging } from './messaging/messaging-namespace';
84export { projectManagement } from './project-management/project-management-namespace';
85export { remoteConfig } from './remote-config/remote-config-namespace';
86export { securityRules } from './security-rules/security-rules-namespace';
87export { storage } from './storage/storage-namespace';
88export declare const SDK_VERSION: string;
89export declare const apps: (app.App | null)[];
90export declare function app(name?: string): app.App;
91export declare function initializeApp(options?: AppOptions, name?: string): app.App;