Skip to content

Commit ec50779

Browse files
committed
fix: add missing type defs
1 parent 433b43f commit ec50779

File tree

2 files changed

+31
-6
lines changed

2 files changed

+31
-6
lines changed

spBv1.0.d.ts

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ export type NumberDataType =
1212
| 'Float'
1313
| 'Double'
1414

15+
export type BigIntDataType = 'Int64' | 'UInt64'
16+
1517
export type StringDataType = 'String' | 'Text' | 'UUID'
1618

1719
export type MetaData = {
@@ -32,6 +34,11 @@ export type NumberPropertyValue = {
3234
value?: number | null
3335
}
3436

37+
export type BigIntPropertyValue = {
38+
type: BigIntDataType
39+
value?: bigint | null
40+
}
41+
3542
export type StringPropertyValue = {
3643
type: StringDataType
3744
value?: string | null
@@ -44,7 +51,7 @@ export type BooleanPropertyValue = {
4451

4552
export type DateTimePropertyValue = {
4653
type: 'DateTime'
47-
value?: Date | number | null
54+
value?: Date | number | bigint | null
4855
}
4956

5057
export type PropertySetValue = {
@@ -59,6 +66,7 @@ export type PropertySetListValue = {
5966

6067
export type PropertyValue =
6168
| NumberPropertyValue
69+
| BigIntPropertyValue
6270
| StringPropertyValue
6371
| BooleanPropertyValue
6472
| DateTimePropertyValue
@@ -81,9 +89,14 @@ export type NumberMetric = MetricBase & {
8189
value?: number | null
8290
}
8391

92+
export type BigIntMetric = MetricBase & {
93+
type: BigIntDataType
94+
value?: bigint | null
95+
}
96+
8497
export type DateTimeMetric = MetricBase & {
8598
type: 'DateTime'
86-
value?: Date | number | null
99+
value?: Date | number | bigint | null
87100
}
88101

89102
export type BooleanMetric = MetricBase & {
@@ -100,18 +113,20 @@ export type DataSetValueTypes = {
100113
Int8: number
101114
Int16: number
102115
Int32: number
103-
Int64: number
116+
Int64: number | bigint
104117
UInt8: number
105118
UInt16: number
106119
UInt32: number
107-
UInt64: number
120+
UInt64: number | bigint
108121
Float: number
109122
Double: number
110123
Boolean: boolean
111124
String: string
112-
DateTime: Date | number
125+
DateTime: Date | number | bigint
113126
Text: string
114127
UUID: string
128+
Bytes: Bytes
129+
File: Bytes
115130
}
116131

117132
export type DataSetValueType = keyof DataSetValueTypes
@@ -157,6 +172,7 @@ export type FileMetric = MetricBase & {
157172
}
158173

159174
export type Metric =
175+
| NumberMetric
160176
| NumberMetric
161177
| BooleanMetric
162178
| StringMetric
@@ -172,6 +188,12 @@ export type NumberParameter = {
172188
value?: number | null
173189
}
174190

191+
export type BigIntParameter = {
192+
name?: string
193+
type: BigIntDataType
194+
value?: bigint | null
195+
}
196+
175197
export type BooleanParameter = {
176198
name?: string
177199
type: 'Boolean'
@@ -187,11 +209,12 @@ export type StringParameter = {
187209
export type DateTimeParameter = {
188210
name?: string
189211
type: 'DateTime'
190-
value?: Date | number | null
212+
value?: Date | number | bigint | null
191213
}
192214

193215
export type Parameter =
194216
| NumberParameter
217+
| BigIntParameter
195218
| BooleanParameter
196219
| StringParameter
197220
| DateTimeParameter

spBv1.0.js.flow

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ export type DataSetValueTypes = {|
139139
DateTime: Date | number | bigint,
140140
Text: string,
141141
UUID: string,
142+
Bytes: Bytes,
143+
File: Bytes,
142144
|}
143145

144146
export type DataSetValueType = $Keys<DataSetValueTypes>

0 commit comments

Comments
 (0)