@@ -12,6 +12,8 @@ export type NumberDataType =
12
12
| 'Float'
13
13
| 'Double'
14
14
15
+ export type BigIntDataType = 'Int64' | 'UInt64'
16
+
15
17
export type StringDataType = 'String' | 'Text' | 'UUID'
16
18
17
19
export type MetaData = {|
@@ -32,6 +34,12 @@ export type NumberPropertyValue = {|
32
34
value?: ?number,
33
35
|}
34
36
37
+ export type BigIntPropertyValue = {|
38
+ type: BigIntDataType,
39
+ // $FlowFixMe
40
+ value?: ?bigint,
41
+ |}
42
+
35
43
export type StringPropertyValue = {|
36
44
type: StringDataType,
37
45
value?: ?string,
@@ -44,7 +52,8 @@ export type BooleanPropertyValue = {|
44
52
45
53
export type DateTimePropertyValue = {|
46
54
type: 'DateTime',
47
- value?: ?(Date | number),
55
+ // $FlowFixMe
56
+ value?: ?(Date | number | bigint),
48
57
|}
49
58
50
59
export type PropertySetValue = {|
@@ -59,6 +68,7 @@ export type PropertySetListValue = {|
59
68
60
69
export type PropertyValue =
61
70
| NumberPropertyValue
71
+ | BigIntPropertyValue
62
72
| StringPropertyValue
63
73
| BooleanPropertyValue
64
74
| DateTimePropertyValue
@@ -70,6 +80,8 @@ export type PropertySet = { [key: string]: PropertyValue }
70
80
export type MetricBase = {|
71
81
name?: ?string,
72
82
alias?: ?number,
83
+ // $FlowFixMe
84
+ timestamp?: ?(number | bigint),
73
85
isHistorical?: ?boolean,
74
86
isTransient?: ?boolean,
75
87
metadata?: ?MetaData,
@@ -82,10 +94,18 @@ export type NumberMetric = {|
82
94
value?: ?number,
83
95
|}
84
96
97
+ export type BigIntMetric = {|
98
+ ...MetricBase,
99
+ type: BigIntDataType,
100
+ // $FlowFixMe
101
+ value?: ?bigint,
102
+ |}
103
+
85
104
export type DateTimeMetric = {|
86
105
...MetricBase,
87
106
type: 'DateTime',
88
- value?: ?(Date | number),
107
+ // $FlowFixMe
108
+ value?: ?(Date | number | bigint),
89
109
|}
90
110
91
111
export type BooleanMetric = {|
@@ -104,16 +124,19 @@ export type DataSetValueTypes = {|
104
124
Int8: number,
105
125
Int16: number,
106
126
Int32: number,
107
- Int64: number,
127
+ // $FlowFixMe
128
+ Int64: number | bigint,
108
129
UInt8: number,
109
130
UInt16: number,
110
131
UInt32: number,
111
- UInt64: number,
132
+ // $FlowFixMe
133
+ UInt64: number | bigint,
112
134
Float: number,
113
135
Double: number,
114
136
Boolean: boolean,
115
137
String: string,
116
- DateTime: Date | number,
138
+ // $FlowFixMe
139
+ DateTime: Date | number | bigint,
117
140
Text: string,
118
141
UUID: string,
119
142
|}
@@ -155,6 +178,7 @@ export type TemplateMetric = {|
155
178
156
179
export type Metric =
157
180
| NumberMetric
181
+ | BigIntMetric
158
182
| BooleanMetric
159
183
| StringMetric
160
184
| DateTimeMetric
@@ -167,6 +191,13 @@ export type NumberParameter = {|
167
191
value?: ?number,
168
192
|}
169
193
194
+ export type BigIntParameter = {|
195
+ name?: ?string,
196
+ type: BigIntDataType,
197
+ // $FlowFixMe
198
+ value?: ?bigint,
199
+ |}
200
+
170
201
export type BooleanParameter = {|
171
202
name?: ?string,
172
203
type: 'Boolean',
@@ -187,6 +218,7 @@ export type DateTimeParameter = {|
187
218
188
219
export type Parameter =
189
220
| NumberParameter
221
+ | BigIntParameter
190
222
| BooleanParameter
191
223
| StringParameter
192
224
| DateTimeParameter
@@ -209,3 +241,6 @@ declare export function encodePayload(
209
241
payload: $DeepReadOnly<Payload>
210
242
): Uint8Array
211
243
declare export function decodePayload(payload: Uint8Array): Payload
244
+
245
+ declare export function encodeType(typeString: string): number
246
+ declare export function decodeType(typeInt: number): ?string
0 commit comments