@firebase/remote-config 0.3.8 → 0.3.9-canary.8e952e2ee
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/esm/index.esm.js +29 -23
- package/dist/esm/index.esm.js.map +1 -1
- package/dist/esm/index.esm2017.js +15 -9
- package/dist/esm/index.esm2017.js.map +1 -1
- package/dist/index.cjs.js +29 -23
- package/dist/index.cjs.js.map +1 -1
- package/dist/remote-config-public.d.ts +253 -253
- package/dist/remote-config.d.ts +253 -253
- package/dist/src/tsdoc-metadata.json +11 -11
- package/package.json +10 -9
package/dist/remote-config.d.ts
CHANGED
|
@@ -1,253 +1,253 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Firebase Remote Config
|
|
3
|
-
*
|
|
4
|
-
* @packageDocumentation
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { FirebaseApp } from '@firebase/app';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Makes the last fetched config available to the getters.
|
|
11
|
-
* @param remoteConfig - The {@link RemoteConfig} instance.
|
|
12
|
-
* @returns A `Promise` which resolves to true if the current call activated the fetched configs.
|
|
13
|
-
* If the fetched configs were already activated, the `Promise` will resolve to false.
|
|
14
|
-
*
|
|
15
|
-
* @public
|
|
16
|
-
*/
|
|
17
|
-
export declare function activate(remoteConfig: RemoteConfig): Promise<boolean>;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Ensures the last activated config are available to the getters.
|
|
21
|
-
* @param remoteConfig - The {@link RemoteConfig} instance.
|
|
22
|
-
*
|
|
23
|
-
* @returns A `Promise` that resolves when the last activated config is available to the getters.
|
|
24
|
-
* @public
|
|
25
|
-
*/
|
|
26
|
-
export declare function ensureInitialized(remoteConfig: RemoteConfig): Promise<void>;
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
* Performs fetch and activate operations, as a convenience.
|
|
31
|
-
*
|
|
32
|
-
* @param remoteConfig - The {@link RemoteConfig} instance.
|
|
33
|
-
*
|
|
34
|
-
* @returns A `Promise` which resolves to true if the current call activated the fetched configs.
|
|
35
|
-
* If the fetched configs were already activated, the `Promise` will resolve to false.
|
|
36
|
-
*
|
|
37
|
-
* @public
|
|
38
|
-
*/
|
|
39
|
-
export declare function fetchAndActivate(remoteConfig: RemoteConfig): Promise<boolean>;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Fetches and caches configuration from the Remote Config service.
|
|
43
|
-
* @param remoteConfig - The {@link RemoteConfig} instance.
|
|
44
|
-
* @public
|
|
45
|
-
*/
|
|
46
|
-
export declare function fetchConfig(remoteConfig: RemoteConfig): Promise<void>;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Summarizes the outcome of the last attempt to fetch config from the Firebase Remote Config server.
|
|
50
|
-
*
|
|
51
|
-
* <ul>
|
|
52
|
-
* <li>"no-fetch-yet" indicates the {@link RemoteConfig} instance has not yet attempted
|
|
53
|
-
* to fetch config, or that SDK initialization is incomplete.</li>
|
|
54
|
-
* <li>"success" indicates the last attempt succeeded.</li>
|
|
55
|
-
* <li>"failure" indicates the last attempt failed.</li>
|
|
56
|
-
* <li>"throttle" indicates the last attempt was rate-limited.</li>
|
|
57
|
-
* </ul>
|
|
58
|
-
*
|
|
59
|
-
* @public
|
|
60
|
-
*/
|
|
61
|
-
export declare type FetchStatus = 'no-fetch-yet' | 'success' | 'failure' | 'throttle';
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Gets all config.
|
|
65
|
-
*
|
|
66
|
-
* @param remoteConfig - The {@link RemoteConfig} instance.
|
|
67
|
-
* @returns All config.
|
|
68
|
-
*
|
|
69
|
-
* @public
|
|
70
|
-
*/
|
|
71
|
-
export declare function getAll(remoteConfig: RemoteConfig): Record<string, Value>;
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* Gets the value for the given key as a boolean.
|
|
75
|
-
*
|
|
76
|
-
* Convenience method for calling <code>remoteConfig.getValue(key).asBoolean()</code>.
|
|
77
|
-
*
|
|
78
|
-
* @param remoteConfig - The {@link RemoteConfig} instance.
|
|
79
|
-
* @param key - The name of the parameter.
|
|
80
|
-
*
|
|
81
|
-
* @returns The value for the given key as a boolean.
|
|
82
|
-
* @public
|
|
83
|
-
*/
|
|
84
|
-
export declare function getBoolean(remoteConfig: RemoteConfig, key: string): boolean;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Gets the value for the given key as a number.
|
|
88
|
-
*
|
|
89
|
-
* Convenience method for calling <code>remoteConfig.getValue(key).asNumber()</code>.
|
|
90
|
-
*
|
|
91
|
-
* @param remoteConfig - The {@link RemoteConfig} instance.
|
|
92
|
-
* @param key - The name of the parameter.
|
|
93
|
-
*
|
|
94
|
-
* @returns The value for the given key as a number.
|
|
95
|
-
*
|
|
96
|
-
* @public
|
|
97
|
-
*/
|
|
98
|
-
export declare function getNumber(remoteConfig: RemoteConfig, key: string): number;
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
*
|
|
102
|
-
* @param app - The {@link @firebase/app#FirebaseApp} instance.
|
|
103
|
-
* @returns A {@link RemoteConfig} instance.
|
|
104
|
-
*
|
|
105
|
-
* @public
|
|
106
|
-
*/
|
|
107
|
-
export declare function getRemoteConfig(app?: FirebaseApp): RemoteConfig;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Gets the value for the given key as a string.
|
|
111
|
-
* Convenience method for calling <code>remoteConfig.getValue(key).asString()</code>.
|
|
112
|
-
*
|
|
113
|
-
* @param remoteConfig - The {@link RemoteConfig} instance.
|
|
114
|
-
* @param key - The name of the parameter.
|
|
115
|
-
*
|
|
116
|
-
* @returns The value for the given key as a string.
|
|
117
|
-
*
|
|
118
|
-
* @public
|
|
119
|
-
*/
|
|
120
|
-
export declare function getString(remoteConfig: RemoteConfig, key: string): string;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Gets the {@link Value} for the given key.
|
|
124
|
-
*
|
|
125
|
-
* @param remoteConfig - The {@link RemoteConfig} instance.
|
|
126
|
-
* @param key - The name of the parameter.
|
|
127
|
-
*
|
|
128
|
-
* @returns The value for the given key.
|
|
129
|
-
*
|
|
130
|
-
* @public
|
|
131
|
-
*/
|
|
132
|
-
export declare function getValue(remoteConfig: RemoteConfig, key: string): Value;
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* This method provides two different checks:
|
|
136
|
-
*
|
|
137
|
-
* 1. Check if IndexedDB exists in the browser environment.
|
|
138
|
-
* 2. Check if the current browser context allows IndexedDB `open()` calls.
|
|
139
|
-
*
|
|
140
|
-
* @returns A `Promise` which resolves to true if a {@link RemoteConfig} instance
|
|
141
|
-
* can be initialized in this environment, or false if it cannot.
|
|
142
|
-
* @public
|
|
143
|
-
*/
|
|
144
|
-
export declare function isSupported(): Promise<boolean>;
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Defines levels of Remote Config logging.
|
|
148
|
-
*
|
|
149
|
-
* @public
|
|
150
|
-
*/
|
|
151
|
-
export declare type LogLevel = 'debug' | 'error' | 'silent';
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* The Firebase Remote Config service interface.
|
|
155
|
-
*
|
|
156
|
-
* @public
|
|
157
|
-
*/
|
|
158
|
-
export declare interface RemoteConfig {
|
|
159
|
-
/**
|
|
160
|
-
* The {@link @firebase/app#FirebaseApp} this `RemoteConfig` instance is associated with.
|
|
161
|
-
*/
|
|
162
|
-
app: FirebaseApp;
|
|
163
|
-
/**
|
|
164
|
-
* Defines configuration for the Remote Config SDK.
|
|
165
|
-
*/
|
|
166
|
-
settings: RemoteConfigSettings;
|
|
167
|
-
/**
|
|
168
|
-
* Object containing default values for configs.
|
|
169
|
-
*/
|
|
170
|
-
defaultConfig: {
|
|
171
|
-
[key: string]: string | number | boolean;
|
|
172
|
-
};
|
|
173
|
-
/**
|
|
174
|
-
* The Unix timestamp in milliseconds of the last <i>successful</i> fetch, or negative one if
|
|
175
|
-
* the {@link RemoteConfig} instance either hasn't fetched or initialization
|
|
176
|
-
* is incomplete.
|
|
177
|
-
*/
|
|
178
|
-
fetchTimeMillis: number;
|
|
179
|
-
/**
|
|
180
|
-
* The status of the last fetch <i>attempt</i>.
|
|
181
|
-
*/
|
|
182
|
-
lastFetchStatus: FetchStatus;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* Defines configuration options for the Remote Config SDK.
|
|
187
|
-
*
|
|
188
|
-
* @public
|
|
189
|
-
*/
|
|
190
|
-
export declare interface RemoteConfigSettings {
|
|
191
|
-
/**
|
|
192
|
-
* Defines the maximum age in milliseconds of an entry in the config cache before
|
|
193
|
-
* it is considered stale. Defaults to 43200000 (Twelve hours).
|
|
194
|
-
*/
|
|
195
|
-
minimumFetchIntervalMillis: number;
|
|
196
|
-
/**
|
|
197
|
-
* Defines the maximum amount of milliseconds to wait for a response when fetching
|
|
198
|
-
* configuration from the Remote Config server. Defaults to 60000 (One minute).
|
|
199
|
-
*/
|
|
200
|
-
fetchTimeoutMillis: number;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* Defines the log level to use.
|
|
205
|
-
*
|
|
206
|
-
* @param remoteConfig - The {@link RemoteConfig} instance.
|
|
207
|
-
* @param logLevel - The log level to set.
|
|
208
|
-
*
|
|
209
|
-
* @public
|
|
210
|
-
*/
|
|
211
|
-
export declare function setLogLevel(remoteConfig: RemoteConfig, logLevel: LogLevel): void;
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Wraps a value with metadata and type-safe getters.
|
|
215
|
-
*
|
|
216
|
-
* @public
|
|
217
|
-
*/
|
|
218
|
-
export declare interface Value {
|
|
219
|
-
/**
|
|
220
|
-
* Gets the value as a boolean.
|
|
221
|
-
*
|
|
222
|
-
* The following values (case insensitive) are interpreted as true:
|
|
223
|
-
* "1", "true", "t", "yes", "y", "on". Other values are interpreted as false.
|
|
224
|
-
*/
|
|
225
|
-
asBoolean(): boolean;
|
|
226
|
-
/**
|
|
227
|
-
* Gets the value as a number. Comparable to calling <code>Number(value) || 0</code>.
|
|
228
|
-
*/
|
|
229
|
-
asNumber(): number;
|
|
230
|
-
/**
|
|
231
|
-
* Gets the value as a string.
|
|
232
|
-
*/
|
|
233
|
-
asString(): string;
|
|
234
|
-
/**
|
|
235
|
-
* Gets the {@link ValueSource} for the given key.
|
|
236
|
-
*/
|
|
237
|
-
getSource(): ValueSource;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* Indicates the source of a value.
|
|
242
|
-
*
|
|
243
|
-
* <ul>
|
|
244
|
-
* <li>"static" indicates the value was defined by a static constant.</li>
|
|
245
|
-
* <li>"default" indicates the value was defined by default config.</li>
|
|
246
|
-
* <li>"remote" indicates the value was defined by fetched config.</li>
|
|
247
|
-
* </ul>
|
|
248
|
-
*
|
|
249
|
-
* @public
|
|
250
|
-
*/
|
|
251
|
-
export declare type ValueSource = 'static' | 'default' | 'remote';
|
|
252
|
-
|
|
253
|
-
export { }
|
|
1
|
+
/**
|
|
2
|
+
* Firebase Remote Config
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { FirebaseApp } from '@firebase/app';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Makes the last fetched config available to the getters.
|
|
11
|
+
* @param remoteConfig - The {@link RemoteConfig} instance.
|
|
12
|
+
* @returns A `Promise` which resolves to true if the current call activated the fetched configs.
|
|
13
|
+
* If the fetched configs were already activated, the `Promise` will resolve to false.
|
|
14
|
+
*
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
export declare function activate(remoteConfig: RemoteConfig): Promise<boolean>;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Ensures the last activated config are available to the getters.
|
|
21
|
+
* @param remoteConfig - The {@link RemoteConfig} instance.
|
|
22
|
+
*
|
|
23
|
+
* @returns A `Promise` that resolves when the last activated config is available to the getters.
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export declare function ensureInitialized(remoteConfig: RemoteConfig): Promise<void>;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* Performs fetch and activate operations, as a convenience.
|
|
31
|
+
*
|
|
32
|
+
* @param remoteConfig - The {@link RemoteConfig} instance.
|
|
33
|
+
*
|
|
34
|
+
* @returns A `Promise` which resolves to true if the current call activated the fetched configs.
|
|
35
|
+
* If the fetched configs were already activated, the `Promise` will resolve to false.
|
|
36
|
+
*
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
export declare function fetchAndActivate(remoteConfig: RemoteConfig): Promise<boolean>;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Fetches and caches configuration from the Remote Config service.
|
|
43
|
+
* @param remoteConfig - The {@link RemoteConfig} instance.
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
export declare function fetchConfig(remoteConfig: RemoteConfig): Promise<void>;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Summarizes the outcome of the last attempt to fetch config from the Firebase Remote Config server.
|
|
50
|
+
*
|
|
51
|
+
* <ul>
|
|
52
|
+
* <li>"no-fetch-yet" indicates the {@link RemoteConfig} instance has not yet attempted
|
|
53
|
+
* to fetch config, or that SDK initialization is incomplete.</li>
|
|
54
|
+
* <li>"success" indicates the last attempt succeeded.</li>
|
|
55
|
+
* <li>"failure" indicates the last attempt failed.</li>
|
|
56
|
+
* <li>"throttle" indicates the last attempt was rate-limited.</li>
|
|
57
|
+
* </ul>
|
|
58
|
+
*
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
61
|
+
export declare type FetchStatus = 'no-fetch-yet' | 'success' | 'failure' | 'throttle';
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Gets all config.
|
|
65
|
+
*
|
|
66
|
+
* @param remoteConfig - The {@link RemoteConfig} instance.
|
|
67
|
+
* @returns All config.
|
|
68
|
+
*
|
|
69
|
+
* @public
|
|
70
|
+
*/
|
|
71
|
+
export declare function getAll(remoteConfig: RemoteConfig): Record<string, Value>;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Gets the value for the given key as a boolean.
|
|
75
|
+
*
|
|
76
|
+
* Convenience method for calling <code>remoteConfig.getValue(key).asBoolean()</code>.
|
|
77
|
+
*
|
|
78
|
+
* @param remoteConfig - The {@link RemoteConfig} instance.
|
|
79
|
+
* @param key - The name of the parameter.
|
|
80
|
+
*
|
|
81
|
+
* @returns The value for the given key as a boolean.
|
|
82
|
+
* @public
|
|
83
|
+
*/
|
|
84
|
+
export declare function getBoolean(remoteConfig: RemoteConfig, key: string): boolean;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Gets the value for the given key as a number.
|
|
88
|
+
*
|
|
89
|
+
* Convenience method for calling <code>remoteConfig.getValue(key).asNumber()</code>.
|
|
90
|
+
*
|
|
91
|
+
* @param remoteConfig - The {@link RemoteConfig} instance.
|
|
92
|
+
* @param key - The name of the parameter.
|
|
93
|
+
*
|
|
94
|
+
* @returns The value for the given key as a number.
|
|
95
|
+
*
|
|
96
|
+
* @public
|
|
97
|
+
*/
|
|
98
|
+
export declare function getNumber(remoteConfig: RemoteConfig, key: string): number;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* @param app - The {@link @firebase/app#FirebaseApp} instance.
|
|
103
|
+
* @returns A {@link RemoteConfig} instance.
|
|
104
|
+
*
|
|
105
|
+
* @public
|
|
106
|
+
*/
|
|
107
|
+
export declare function getRemoteConfig(app?: FirebaseApp): RemoteConfig;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Gets the value for the given key as a string.
|
|
111
|
+
* Convenience method for calling <code>remoteConfig.getValue(key).asString()</code>.
|
|
112
|
+
*
|
|
113
|
+
* @param remoteConfig - The {@link RemoteConfig} instance.
|
|
114
|
+
* @param key - The name of the parameter.
|
|
115
|
+
*
|
|
116
|
+
* @returns The value for the given key as a string.
|
|
117
|
+
*
|
|
118
|
+
* @public
|
|
119
|
+
*/
|
|
120
|
+
export declare function getString(remoteConfig: RemoteConfig, key: string): string;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Gets the {@link Value} for the given key.
|
|
124
|
+
*
|
|
125
|
+
* @param remoteConfig - The {@link RemoteConfig} instance.
|
|
126
|
+
* @param key - The name of the parameter.
|
|
127
|
+
*
|
|
128
|
+
* @returns The value for the given key.
|
|
129
|
+
*
|
|
130
|
+
* @public
|
|
131
|
+
*/
|
|
132
|
+
export declare function getValue(remoteConfig: RemoteConfig, key: string): Value;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* This method provides two different checks:
|
|
136
|
+
*
|
|
137
|
+
* 1. Check if IndexedDB exists in the browser environment.
|
|
138
|
+
* 2. Check if the current browser context allows IndexedDB `open()` calls.
|
|
139
|
+
*
|
|
140
|
+
* @returns A `Promise` which resolves to true if a {@link RemoteConfig} instance
|
|
141
|
+
* can be initialized in this environment, or false if it cannot.
|
|
142
|
+
* @public
|
|
143
|
+
*/
|
|
144
|
+
export declare function isSupported(): Promise<boolean>;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Defines levels of Remote Config logging.
|
|
148
|
+
*
|
|
149
|
+
* @public
|
|
150
|
+
*/
|
|
151
|
+
export declare type LogLevel = 'debug' | 'error' | 'silent';
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* The Firebase Remote Config service interface.
|
|
155
|
+
*
|
|
156
|
+
* @public
|
|
157
|
+
*/
|
|
158
|
+
export declare interface RemoteConfig {
|
|
159
|
+
/**
|
|
160
|
+
* The {@link @firebase/app#FirebaseApp} this `RemoteConfig` instance is associated with.
|
|
161
|
+
*/
|
|
162
|
+
app: FirebaseApp;
|
|
163
|
+
/**
|
|
164
|
+
* Defines configuration for the Remote Config SDK.
|
|
165
|
+
*/
|
|
166
|
+
settings: RemoteConfigSettings;
|
|
167
|
+
/**
|
|
168
|
+
* Object containing default values for configs.
|
|
169
|
+
*/
|
|
170
|
+
defaultConfig: {
|
|
171
|
+
[key: string]: string | number | boolean;
|
|
172
|
+
};
|
|
173
|
+
/**
|
|
174
|
+
* The Unix timestamp in milliseconds of the last <i>successful</i> fetch, or negative one if
|
|
175
|
+
* the {@link RemoteConfig} instance either hasn't fetched or initialization
|
|
176
|
+
* is incomplete.
|
|
177
|
+
*/
|
|
178
|
+
fetchTimeMillis: number;
|
|
179
|
+
/**
|
|
180
|
+
* The status of the last fetch <i>attempt</i>.
|
|
181
|
+
*/
|
|
182
|
+
lastFetchStatus: FetchStatus;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Defines configuration options for the Remote Config SDK.
|
|
187
|
+
*
|
|
188
|
+
* @public
|
|
189
|
+
*/
|
|
190
|
+
export declare interface RemoteConfigSettings {
|
|
191
|
+
/**
|
|
192
|
+
* Defines the maximum age in milliseconds of an entry in the config cache before
|
|
193
|
+
* it is considered stale. Defaults to 43200000 (Twelve hours).
|
|
194
|
+
*/
|
|
195
|
+
minimumFetchIntervalMillis: number;
|
|
196
|
+
/**
|
|
197
|
+
* Defines the maximum amount of milliseconds to wait for a response when fetching
|
|
198
|
+
* configuration from the Remote Config server. Defaults to 60000 (One minute).
|
|
199
|
+
*/
|
|
200
|
+
fetchTimeoutMillis: number;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Defines the log level to use.
|
|
205
|
+
*
|
|
206
|
+
* @param remoteConfig - The {@link RemoteConfig} instance.
|
|
207
|
+
* @param logLevel - The log level to set.
|
|
208
|
+
*
|
|
209
|
+
* @public
|
|
210
|
+
*/
|
|
211
|
+
export declare function setLogLevel(remoteConfig: RemoteConfig, logLevel: LogLevel): void;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Wraps a value with metadata and type-safe getters.
|
|
215
|
+
*
|
|
216
|
+
* @public
|
|
217
|
+
*/
|
|
218
|
+
export declare interface Value {
|
|
219
|
+
/**
|
|
220
|
+
* Gets the value as a boolean.
|
|
221
|
+
*
|
|
222
|
+
* The following values (case insensitive) are interpreted as true:
|
|
223
|
+
* "1", "true", "t", "yes", "y", "on". Other values are interpreted as false.
|
|
224
|
+
*/
|
|
225
|
+
asBoolean(): boolean;
|
|
226
|
+
/**
|
|
227
|
+
* Gets the value as a number. Comparable to calling <code>Number(value) || 0</code>.
|
|
228
|
+
*/
|
|
229
|
+
asNumber(): number;
|
|
230
|
+
/**
|
|
231
|
+
* Gets the value as a string.
|
|
232
|
+
*/
|
|
233
|
+
asString(): string;
|
|
234
|
+
/**
|
|
235
|
+
* Gets the {@link ValueSource} for the given key.
|
|
236
|
+
*/
|
|
237
|
+
getSource(): ValueSource;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Indicates the source of a value.
|
|
242
|
+
*
|
|
243
|
+
* <ul>
|
|
244
|
+
* <li>"static" indicates the value was defined by a static constant.</li>
|
|
245
|
+
* <li>"default" indicates the value was defined by default config.</li>
|
|
246
|
+
* <li>"remote" indicates the value was defined by fetched config.</li>
|
|
247
|
+
* </ul>
|
|
248
|
+
*
|
|
249
|
+
* @public
|
|
250
|
+
*/
|
|
251
|
+
export declare type ValueSource = 'static' | 'default' | 'remote';
|
|
252
|
+
|
|
253
|
+
export { }
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
-
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
-
{
|
|
4
|
-
"tsdocVersion": "0.12",
|
|
5
|
-
"toolPackages": [
|
|
6
|
-
{
|
|
7
|
-
"packageName": "@microsoft/api-extractor",
|
|
8
|
-
"packageVersion": "0.1.2"
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
}
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "0.1.2"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase/remote-config",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9-canary.8e952e2ee",
|
|
4
4
|
"description": "The Remote Config package of the Firebase JS SDK",
|
|
5
5
|
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"esm5": "dist/esm/index.esm.js",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
+
"types": "./dist/remote-config-public.d.ts",
|
|
12
13
|
"require": "./dist/index.cjs.js",
|
|
13
14
|
"esm5": "./dist/esm/index.esm.js",
|
|
14
15
|
"default": "./dist/esm/index.esm2017.js"
|
|
@@ -37,20 +38,20 @@
|
|
|
37
38
|
"typings:internal": "node ../../scripts/build/use_typings.js ./dist/src/index.d.ts"
|
|
38
39
|
},
|
|
39
40
|
"peerDependencies": {
|
|
40
|
-
"@firebase/app": "0.
|
|
41
|
+
"@firebase/app": "0.7.26-canary.8e952e2ee"
|
|
41
42
|
},
|
|
42
43
|
"dependencies": {
|
|
43
|
-
"@firebase/installations": "0.5.
|
|
44
|
-
"@firebase/logger": "0.3.
|
|
45
|
-
"@firebase/util": "1.6.
|
|
46
|
-
"@firebase/component": "0.5.
|
|
44
|
+
"@firebase/installations": "0.5.10-canary.8e952e2ee",
|
|
45
|
+
"@firebase/logger": "0.3.3-canary.8e952e2ee",
|
|
46
|
+
"@firebase/util": "1.6.1-canary.8e952e2ee",
|
|
47
|
+
"@firebase/component": "0.5.15-canary.8e952e2ee",
|
|
47
48
|
"tslib": "^2.1.0"
|
|
48
49
|
},
|
|
49
50
|
"license": "Apache-2.0",
|
|
50
51
|
"devDependencies": {
|
|
51
|
-
"@firebase/app": "0.7.
|
|
52
|
-
"rollup": "2.
|
|
53
|
-
"rollup-plugin-typescript2": "0.
|
|
52
|
+
"@firebase/app": "0.7.26-canary.8e952e2ee",
|
|
53
|
+
"rollup": "2.72.1",
|
|
54
|
+
"rollup-plugin-typescript2": "0.31.2",
|
|
54
55
|
"typescript": "4.2.2"
|
|
55
56
|
},
|
|
56
57
|
"repository": {
|