-
Notifications
You must be signed in to change notification settings - Fork 990
/
Copy pathinterfaces.ts
96 lines (85 loc) · 2.59 KB
/
interfaces.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
export enum TagColor {
BLUE = "Blue",
BROWN = "Brown",
CYAN = "Cyan",
DEEP_ORANGE = "Red Orange",
GREEN = "Green",
INDIGO = "Indigo",
LIME = "Lime",
ORANGE = "Orange",
PINK = "Pink",
PURPLE = "Purple",
TEAL = "Teal",
}
/** Interface representing a Remote Config parameter `value` in value options. */
export interface ExplicitParameterValue {
value: string;
}
/** Interface representing a Remote Config parameter `useInAppDefault` in value options. */
export interface InAppDefaultValue {
useInAppDefault: boolean;
}
export type RemoteConfigParameterValue = ExplicitParameterValue | InAppDefaultValue;
/** Interface representing a Remote Config parameter. */
export interface RemoteConfigParameter {
defaultValue?: RemoteConfigParameterValue;
conditionalValues?: { [key: string]: RemoteConfigParameterValue };
description?: string;
}
/** Interface representing a Remote Config parameter group. */
export interface RemoteConfigParameterGroup {
description?: string;
parameters: { [key: string]: RemoteConfigParameter };
}
/** Interface representing a Remote Config condition. */
export interface RemoteConfigCondition {
name: string;
expression: string;
tagColor?: TagColor;
}
// Interface representing Remote Config Template with conditions, parameters, parameterGroups, version
export interface RemoteConfigTemplate {
conditions: RemoteConfigCondition[];
parameters: { [key: string]: RemoteConfigParameter };
parameterGroups: { [key: string]: RemoteConfigParameterGroup };
readonly etag: string;
version?: Version;
}
/** Interface representing a Remote Config version. */
export interface Version {
versionNumber?: string; // int64 format
updateTime?: string; // in UTC
updateOrigin?:
| "REMOTE_CONFIG_UPDATE_ORIGIN_UNSPECIFIED"
| "CONSOLE"
| "REST_API"
| "ADMIN_SDK_NOD";
updateType?:
| "REMOTE_CONFIG_UPDATE_TYPE_UNSPECIFIED"
| "INCREMENTAL_UPDATE"
| "FORCED_UPDATE"
| "ROLLBACK";
updateUser?: RemoteConfigUser;
description?: string;
rollbackSource?: string;
isLegacy?: boolean;
}
/** Interface representing a list of Remote Config template versions. */
export interface ListVersionsResult {
versions: Version[];
nextPageToken?: string;
}
/** Interface representing a Remote Config list version options. */
export interface ListVersionsOptions {
pageSize?: number;
pageToken?: string;
endVersionNumber?: string | number;
startTime?: Date | string;
endTime?: Date | string;
}
/** Interface representing a Remote Config user. */
export interface RemoteConfigUser {
email: string;
name?: string;
imageUrl?: string;
}