forked from NativeScript/firebase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
73 lines (46 loc) · 1.5 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import { FirebaseApp } from '@nativescript/firebase-core';
import { IConfigSettings, IConfigValue, IRemoteConfig } from './common';
declare class ConfigValue implements IConfigValue {
readonly native;
readonly ios;
readonly android;
asBoolean(): boolean;
asNumber(): number;
asString(): string;
getSource(): 'default' | 'static' | 'remote';
}
declare class ConfigSettings implements IConfigSettings {
readonly native;
readonly ios;
readonly android;
fetchTimeMillis: number;
minimumFetchIntervalMillis: number;
}
export class RemoteConfig implements IRemoteConfig {
constructor(app?: FirebaseApp);
readonly native;
readonly ios;
readonly android;
readonly app: FirebaseApp;
readonly fetchTimeMillis: number;
readonly lastFetchStatus: 'success' | 'failure' | 'no_fetch_yet' | 'throttled';
settings: ConfigSettings;
activate(): Promise<boolean>;
ensureInitialized(): Promise<void>;
fetch(expirationDurationSeconds?: number): Promise<void>;
fetchAndActivate(): Promise<boolean>;
getAll(): Record<string, ConfigValue>;
getBoolean(key: string): boolean;
getNumber(key: string): number;
getString(key: string): string;
getValue(key: string): ConfigValue;
reset(): Promise<void>;
setDefaults(defaults: ConfigDefaults): Promise<void>;
setDefaultsFromResource(resourceName: string): Promise<void>;
}
declare module '@nativescript/firebase-core' {
export interface Firebase extends FirebaseRemoteConfig {}
}
export interface FirebaseRemoteConfig {
static remoteConfig(): RemoteConfig;
}