-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathconstants.ts
More file actions
80 lines (63 loc) · 2.29 KB
/
constants.ts
File metadata and controls
80 lines (63 loc) · 2.29 KB
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
import { nbsp } from "./utils";
export const decimationMethods = [
{
value: 'NONE',
label: 'None',
description: nbsp`Data in full resolution without decimation`,
},
{
value: 'LOSSY',
label: 'Lossy',
description: nbsp`Completes faster but is less accurate`,
},
{
value: 'MAX_MIN',
label: 'Max/min',
description: nbsp`Preserves spikes and dips`,
},
{
value: 'ENTRY_EXIT',
label: 'Entry/exit',
description: nbsp`Maintains edges of data (includes max/min)`,
},
];
export const errorCodes: { [key: number]: string; } = {
[-255134]: 'Invalid table ID',
[-255130]: 'Table does not exist',
};
export const propertiesCacheTTL = 1000 * 60 * 5; // 5 minutes
export const TAKE_LIMIT = 1000;
export const UNDECIMATED_RECORDS_LIMIT = 1_000_000;
export const COLUMN_OPTIONS_LIMIT = 10000;
export const COLUMN_SELECTION_LIMIT = 20;
export const MAXIMUM_DATA_POINTS = 1000000;
export const RESULT_IDS_LIMIT = 1000;
export const DATA_TABLES_IDS_LIMIT = 1000;
export const CUSTOM_PROPERTY_COLUMNS_LIMIT = 100;
export const CUSTOM_PROPERTY_OPTIONS_LIMIT = 10_000;
export const CUSTOM_PROPERTY_SUFFIX = '-(custom-properties)';
export const REQUESTS_PER_SECOND = 6;
export const DELAY_BETWEEN_REQUESTS_MS = 1000;
export const PART_NUMBER_FIELD = 'partNumber';
export const INTEGER_DATA_TYPES = ['INT32', 'INT64'];
export const NUMERIC_DATA_TYPES = [
...INTEGER_DATA_TYPES,
'FLOAT32',
'FLOAT64'
];
export const COLUMNS_GROUP = 'Columns';
export const METADATA_GROUP = 'Metadata';
export const STANDARD_DATA_TABLE_PROPERTIES_GROUP = 'Data table properties';
export const STANDARD_COLUMN_PROPERTIES_GROUP = 'Column properties';
export const CUSTOM_DATA_TABLE_PROPERTIES_GROUP = 'Custom data table properties';
export const CUSTOM_COLUMN_PROPERTIES_GROUP = 'Custom column properties';
export const POSSIBLE_UNIT_CUSTOM_PROPERTY_KEYS = ['unit', 'units', 'Unit', 'Units'];
export const X_COLUMN_RANGE_DECIMAL_PRECISION = 6;
export const INT32_MIN = -2_147_483_648;
export const INT32_MAX = 2_147_483_647;
export const INT64_MIN = Number.MIN_SAFE_INTEGER;
export const INT64_MAX = Number.MAX_SAFE_INTEGER;
export const FLOAT32_MIN = -3.40282347e38;
export const FLOAT32_MAX = 3.40282347e38;
export const FLOAT64_MIN = -Number.MAX_VALUE;
export const FLOAT64_MAX = Number.MAX_VALUE;