UNPKG

4.4 kBTypeScriptView Raw
1/*! firebase-admin v10.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 { App } from '../app';
18import { ExplicitParameterValue as TExplicitParameterValue, InAppDefaultValue as TInAppDefaultValue, ListVersionsOptions as TListVersionsOptions, ListVersionsResult as TListVersionsResult, ParameterValueType as TParameterValueType, RemoteConfigCondition as TRemoteConfigCondition, RemoteConfigParameter as TRemoteConfigParameter, RemoteConfigParameterGroup as TRemoteConfigParameterGroup, RemoteConfigParameterValue as TRemoteConfigParameterValue, RemoteConfigTemplate as TRemoteConfigTemplate, RemoteConfigUser as TRemoteConfigUser, TagColor as TTagColor, Version as TVersion } from './remote-config-api';
19import { RemoteConfig as TRemoteConfig } from './remote-config';
20/**
21 * Gets the {@link firebase-admin.remote-config#RemoteConfig} service for the
22 * default app or a given app.
23 *
24 * `admin.remoteConfig()` can be called with no arguments to access the default
25 * app's `RemoteConfig` service or as `admin.remoteConfig(app)` to access the
26 * `RemoteConfig` service associated with a specific app.
27 *
28 * @example
29 * ```javascript
30 * // Get the `RemoteConfig` service for the default app
31 * var defaultRemoteConfig = admin.remoteConfig();
32 * ```
33 *
34 * @example
35 * ```javascript
36 * // Get the `RemoteConfig` service for a given app
37 * var otherRemoteConfig = admin.remoteConfig(otherApp);
38 * ```
39 *
40 * @param app - Optional app for which to return the `RemoteConfig` service.
41 * If not provided, the default `RemoteConfig` service is returned.
42 *
43 * @returns The default `RemoteConfig` service if no
44 * app is provided, or the `RemoteConfig` service associated with the provided
45 * app.
46 */
47export declare function remoteConfig(app?: App): remoteConfig.RemoteConfig;
48export declare namespace remoteConfig {
49 /**
50 * Type alias to {@link firebase-admin.remote-config#ExplicitParameterValue}.
51 */
52 type ExplicitParameterValue = TExplicitParameterValue;
53 /**
54 * Type alias to {@link firebase-admin.remote-config#InAppDefaultValue}.
55 */
56 type InAppDefaultValue = TInAppDefaultValue;
57 /**
58 * Type alias to {@link firebase-admin.remote-config#ListVersionsOptions}.
59 */
60 type ListVersionsOptions = TListVersionsOptions;
61 /**
62 * Type alias to {@link firebase-admin.remote-config#ListVersionsResult}.
63 */
64 type ListVersionsResult = TListVersionsResult;
65 /**
66 * Type alias to {@link firebase-admin.remote-config#ParameterValueType}.
67 */
68 type ParameterValueType = TParameterValueType;
69 /**
70 * Type alias to {@link firebase-admin.remote-config#RemoteConfig}.
71 */
72 type RemoteConfig = TRemoteConfig;
73 /**
74 * Type alias to {@link firebase-admin.remote-config#RemoteConfigCondition}.
75 */
76 type RemoteConfigCondition = TRemoteConfigCondition;
77 /**
78 * Type alias to {@link firebase-admin.remote-config#RemoteConfigParameter}.
79 */
80 type RemoteConfigParameter = TRemoteConfigParameter;
81 /**
82 * Type alias to {@link firebase-admin.remote-config#RemoteConfigParameterGroup}.
83 */
84 type RemoteConfigParameterGroup = TRemoteConfigParameterGroup;
85 /**
86 * Type alias to {@link firebase-admin.remote-config#RemoteConfigParameterValue}.
87 */
88 type RemoteConfigParameterValue = TRemoteConfigParameterValue;
89 /**
90 * Type alias to {@link firebase-admin.remote-config#RemoteConfigTemplate}.
91 */
92 type RemoteConfigTemplate = TRemoteConfigTemplate;
93 /**
94 * Type alias to {@link firebase-admin.remote-config#RemoteConfigUser}.
95 */
96 type RemoteConfigUser = TRemoteConfigUser;
97 /**
98 * Type alias to {@link firebase-admin.remote-config#TagColor}.
99 */
100 type TagColor = TTagColor;
101 /**
102 * Type alias to {@link firebase-admin.remote-config#Version}.
103 */
104 type Version = TVersion;
105}