1 | /*! firebase-admin v10.0.0 */
|
2 | ;
|
3 | /*!
|
4 | * Copyright 2020 Google Inc.
|
5 | *
|
6 | * Licensed under the Apache License, Version 2.0 (the "License");
|
7 | * you may not use this file except in compliance with the License.
|
8 | * You may obtain a copy of the License at
|
9 | *
|
10 | * http://www.apache.org/licenses/LICENSE-2.0
|
11 | *
|
12 | * Unless required by applicable law or agreed to in writing, software
|
13 | * distributed under the License is distributed on an "AS IS" BASIS,
|
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15 | * See the License for the specific language governing permissions and
|
16 | * limitations under the License.
|
17 | */
|
18 | Object.defineProperty(exports, "__esModule", { value: true });
|
19 | exports.getProjectManagement = void 0;
|
20 | /**
|
21 | * Firebase project management.
|
22 | *
|
23 | * @packageDocumentation
|
24 | */
|
25 | var app_1 = require("../app");
|
26 | var project_management_1 = require("./project-management");
|
27 | var app_metadata_1 = require("./app-metadata");
|
28 | Object.defineProperty(exports, "AppPlatform", { enumerable: true, get: function () { return app_metadata_1.AppPlatform; } });
|
29 | var project_management_2 = require("./project-management");
|
30 | Object.defineProperty(exports, "ProjectManagement", { enumerable: true, get: function () { return project_management_2.ProjectManagement; } });
|
31 | var android_app_1 = require("./android-app");
|
32 | Object.defineProperty(exports, "AndroidApp", { enumerable: true, get: function () { return android_app_1.AndroidApp; } });
|
33 | Object.defineProperty(exports, "ShaCertificate", { enumerable: true, get: function () { return android_app_1.ShaCertificate; } });
|
34 | var ios_app_1 = require("./ios-app");
|
35 | Object.defineProperty(exports, "IosApp", { enumerable: true, get: function () { return ios_app_1.IosApp; } });
|
36 | /**
|
37 | * Gets the {@link ProjectManagement} service for the default app or a given app.
|
38 | *
|
39 | * `getProjectManagement()` can be called with no arguments to access the
|
40 | * default app's `ProjectManagement` service, or as `getProjectManagement(app)` to access
|
41 | * the `ProjectManagement` service associated with a specific app.
|
42 | *
|
43 | * @example
|
44 | * ```javascript
|
45 | * // Get the ProjectManagement service for the default app
|
46 | * const defaultProjectManagement = getProjectManagement();
|
47 | * ```
|
48 | *
|
49 | * @example
|
50 | * ```javascript
|
51 | * // Get the ProjectManagement service for a given app
|
52 | * const otherProjectManagement = getProjectManagement(otherApp);
|
53 | * ```
|
54 | *
|
55 | * @param app - Optional app whose `ProjectManagement` service
|
56 | * to return. If not provided, the default `ProjectManagement` service will
|
57 | * be returned. *
|
58 | * @returns The default `ProjectManagement` service if no app is provided or the
|
59 | * `ProjectManagement` service associated with the provided app.
|
60 | */
|
61 | function getProjectManagement(app) {
|
62 | if (typeof app === 'undefined') {
|
63 | app = app_1.getApp();
|
64 | }
|
65 | var firebaseApp = app;
|
66 | return firebaseApp.getOrInitService('projectManagement', function (app) { return new project_management_1.ProjectManagement(app); });
|
67 | }
|
68 | exports.getProjectManagement = getProjectManagement;
|