1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | import { FirebaseApp } from '@firebase/app-types';
|
18 | import { RemoteConfig as RemoteConfigType, FetchStatus, Settings, Value as ValueType, LogLevel as RemoteConfigLogLevel } from '@firebase/remote-config-types';
|
19 | import { StorageCache } from './storage/storage_cache';
|
20 | import { RemoteConfigFetchClient } from './client/remote_config_fetch_client';
|
21 | import { Storage } from './storage/storage';
|
22 | import { Logger } from '@firebase/logger';
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 | export declare class RemoteConfig implements RemoteConfigType {
|
29 | readonly app: FirebaseApp;
|
30 | private readonly _client;
|
31 | private readonly _storageCache;
|
32 | private readonly _storage;
|
33 | private readonly _logger;
|
34 | private _isInitializationComplete;
|
35 | private _initializePromise?;
|
36 | settings: Settings;
|
37 | defaultConfig: {
|
38 | [key: string]: string | number | boolean;
|
39 | };
|
40 | setLogLevel(logLevel: RemoteConfigLogLevel): void;
|
41 | get fetchTimeMillis(): number;
|
42 | get lastFetchStatus(): FetchStatus;
|
43 | constructor(app: FirebaseApp, _client: RemoteConfigFetchClient, _storageCache: StorageCache, _storage: Storage, _logger: Logger);
|
44 | activate(): Promise<boolean>;
|
45 | ensureInitialized(): Promise<void>;
|
46 | /**
|
47 | * @throws a {@link ErrorCode.FETCH_CLIENT_TIMEOUT} if the request takes longer than
|
48 | * {@link Settings.fetchTimeoutInSeconds} or
|
49 | * {@link DEFAULT_FETCH_TIMEOUT_SECONDS}.
|
50 | */
|
51 | fetch(): Promise<void>;
|
52 | fetchAndActivate(): Promise<boolean>;
|
53 | getAll(): {
|
54 | [key: string]: ValueType;
|
55 | };
|
56 | getBoolean(key: string): boolean;
|
57 | getNumber(key: string): number;
|
58 | getString(key: string): string;
|
59 | getValue(key: string): ValueType;
|
60 | }
|