@datapos/datapos-shared 0.3.489 → 0.3.491
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -27,27 +27,31 @@ type DataViewLocalisedConfig = Omit<DataViewConfig, 'label' | 'description'> & {
|
|
|
27
27
|
*/
|
|
28
28
|
interface PreviewConfig {
|
|
29
29
|
asAt: number;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
commentMarkId?: string | undefined;
|
|
31
|
+
commentMarkOtherCharSeq?: string | undefined;
|
|
32
|
+
columnConfigs: ObjectColumnConfig[] | undefined;
|
|
33
|
+
dataFormatId: DataFormatId;
|
|
33
34
|
duration: number;
|
|
34
35
|
encodingConfidenceLevel: number | undefined;
|
|
35
36
|
encodingId: string | undefined;
|
|
36
37
|
errorMessage?: string | undefined;
|
|
37
38
|
fileType: FileTypeResult | undefined;
|
|
38
|
-
hasHeaders: boolean;
|
|
39
|
+
hasHeaders: boolean | undefined;
|
|
40
|
+
inferenceRecords: InferenceRecord[] | undefined;
|
|
39
41
|
linesToSkipAtStart?: number | undefined;
|
|
42
|
+
parsingRecords: ParsingRecord[] | undefined;
|
|
40
43
|
quoteEscapeChar?: string | undefined;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
size: number;
|
|
44
|
+
quoteMarkId?: string | undefined;
|
|
45
|
+
quoteMarkOtherCharSeq?: string | undefined;
|
|
46
|
+
recordDelimiterId: RecordDelimiterId | undefined;
|
|
47
|
+
recordDelimiterOtherCharSeq: RecordDelimiterId | undefined;
|
|
48
|
+
size: number | undefined;
|
|
46
49
|
skipEmptyLines?: boolean | undefined;
|
|
47
50
|
skipLinesWithEmptyValues?: boolean | undefined;
|
|
48
51
|
skipLinesWithErrors?: boolean | undefined;
|
|
49
|
-
text: string;
|
|
50
|
-
|
|
52
|
+
text: string | undefined;
|
|
53
|
+
valueDelimiterId: ValueDelimiterId | undefined;
|
|
54
|
+
valueDelimiterOtherCharSeq: string | undefined;
|
|
51
55
|
valueTrimMethodId?: string | undefined;
|
|
52
56
|
}
|
|
53
57
|
/**
|
|
@@ -69,10 +73,9 @@ interface ContentAuditConfig {
|
|
|
69
73
|
interface RelationshipsAuditConfig {
|
|
70
74
|
placeholder?: string;
|
|
71
75
|
}
|
|
72
|
-
type ObjectRecord = (NamedValueRecord | StringValueRecord
|
|
76
|
+
type ObjectRecord = (NamedValueRecord | StringValueRecord)[];
|
|
73
77
|
type NamedValueRecord = Record<string, bigint | boolean | number | string | null>;
|
|
74
78
|
type StringValueRecord = (string | null)[];
|
|
75
|
-
type ValueRecord = (bigint | boolean | number | string | null)[];
|
|
76
79
|
type DataTypeId = 'boolean' | 'numeric' | 'string' | 'temporal' | 'unknown';
|
|
77
80
|
type DataSubtypeId = NumericSubtypeId | StringSubtypeId | TemporalSubtypeId;
|
|
78
81
|
type NumericSubtypeId = 'bigint' | 'integer' | 'decimal';
|
|
@@ -145,7 +148,11 @@ interface UnknownInferenceResult {
|
|
|
145
148
|
inputValue: string | null | undefined;
|
|
146
149
|
inferredValue: null;
|
|
147
150
|
}
|
|
148
|
-
|
|
151
|
+
interface TypeResult {
|
|
152
|
+
columnConfigs: ObjectColumnConfig[];
|
|
153
|
+
typedRecords: InferenceRecord[];
|
|
154
|
+
}
|
|
155
|
+
type DataFormatId = 'dpe' | 'dtv' | 'json' | 'spss' | 'xlsx' | 'xml' | 'unknown';
|
|
149
156
|
type RecordDelimiterId = '\n' | '\r' | '\r\n';
|
|
150
157
|
type ValueDelimiterId = '' | ':' | ',' | '!' | '0x1E' | ';' | ' ' | '\t' | '_' | '0x1F' | '|';
|
|
151
158
|
/**
|
|
@@ -158,8 +165,9 @@ DataTypeId, // Data type.
|
|
|
158
165
|
DataSubtypeId, NumericSubtypeId, // Numeric subtype and characteristics.
|
|
159
166
|
NumericSignId, NumericUnitsId, StringSubtypeId, // String subtype.
|
|
160
167
|
TemporalSubtypeId, // Temporal subtype.
|
|
161
|
-
ObjectRecord, NamedValueRecord, StringValueRecord,
|
|
168
|
+
ObjectRecord, NamedValueRecord, StringValueRecord, RecordDelimiterId, ValueDelimiterId, ParsingRecord, ParsingResult, InferenceRecord, InferenceResult, BooleanInferenceResult, // Boolean.
|
|
162
169
|
NumericInferenceResult, // Numeric.
|
|
163
170
|
BigIntInferenceResult, NumberInferenceResult, StringInferenceResult, // String.
|
|
164
171
|
TemporalInferenceResult, // Temporal.
|
|
165
|
-
UnknownInferenceResult
|
|
172
|
+
UnknownInferenceResult, // Unknown.
|
|
173
|
+
TypeResult };
|
|
@@ -3,7 +3,7 @@ import { EncodingTypeConfig } from '../encoding';
|
|
|
3
3
|
import { ModuleConfig } from '../component/module';
|
|
4
4
|
import { ToolConfig } from '../component/tool';
|
|
5
5
|
import { ConnectorOperationOptions, ObjectColumnConfig } from '../component/connector';
|
|
6
|
-
import { ContentAuditConfig, InferenceRecord, ParsingRecord, ValueDelimiterId } from '../component/dataView';
|
|
6
|
+
import { ContentAuditConfig, InferenceRecord, ParsingRecord, StringValueRecord, ValueDelimiterId } from '../component/dataView';
|
|
7
7
|
import { ContextConfig, ContextOperationOptions } from '../component/context';
|
|
8
8
|
/**
|
|
9
9
|
* Engine runtime interface.
|
|
@@ -44,6 +44,7 @@ interface EngineCallbackData {
|
|
|
44
44
|
*/
|
|
45
45
|
interface EngineUtilities {
|
|
46
46
|
inferValues: (parsingRecord: ParsingRecord, columnConfigs: ObjectColumnConfig[]) => InferenceRecord;
|
|
47
|
+
typeStringValueRecords: (stringValueRecords: StringValueRecord[]) => unknown;
|
|
47
48
|
}
|
|
48
49
|
/**
|
|
49
50
|
* Audit object content options and result.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datapos/datapos-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.491",
|
|
4
4
|
"description": "A library containing common constants, types and utilities used across all Data Positioning projects.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Jonathan Terrell <terrell.jm@gmail.com>",
|