@dpuse/dpuse-shared 1.0.185 → 1.0.186
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.
|
@@ -36,13 +36,6 @@ export interface ReadingConfig {
|
|
|
36
36
|
export type DataFormatId = 'arrow' | 'avro' | 'dtv' | 'json' | 'jsonl' | 'markdown' | 'ods' | 'parquet' | 'sav' | 'sqlite' | 'xlsx' | 'xml' | 'unknown';
|
|
37
37
|
export type RecordDelimiterId = '\n' | '\r' | '\r\n';
|
|
38
38
|
export type ValueDelimiterId = '' | ':' | ',' | '!' | '0x1E' | ';' | ' ' | '\t' | '_' | '0x1F' | '|';
|
|
39
|
-
export type ColumnChoiceConfigs = Partial<Record<string, ColumnChoiceConfig>>;
|
|
40
|
-
export interface ColumnChoiceConfig {
|
|
41
|
-
dataSubtypeId?: DataSubtypeId | undefined;
|
|
42
|
-
dataTypeId?: DataTypeId | undefined;
|
|
43
|
-
decimalSeparatorId?: DecimalSeparatorId | undefined;
|
|
44
|
-
nullWordsAreEmpty?: boolean | undefined;
|
|
45
|
-
}
|
|
46
39
|
export interface SampleConfig {
|
|
47
40
|
issues?: SampleIssue[];
|
|
48
41
|
parsedRecords: ParsedRecord[];
|
|
@@ -60,11 +53,10 @@ export interface SampleIssue {
|
|
|
60
53
|
value?: string | undefined;
|
|
61
54
|
}
|
|
62
55
|
export type SampleIssueSeverityId = 'error' | 'info' | 'warning';
|
|
63
|
-
export type ParsedRecord =
|
|
64
|
-
interface ParsedValue {
|
|
56
|
+
export type ParsedRecord = {
|
|
65
57
|
value: string | null;
|
|
66
58
|
valueWasQuoted: boolean;
|
|
67
|
-
}
|
|
59
|
+
}[];
|
|
68
60
|
export interface ContentAuditConfig {
|
|
69
61
|
asAt: number;
|
|
70
62
|
byteCount: number;
|
|
@@ -78,73 +70,21 @@ export interface ContentAuditConfig {
|
|
|
78
70
|
recordCount: number;
|
|
79
71
|
sourceWaitDuration: number | undefined;
|
|
80
72
|
}
|
|
73
|
+
export type ColumnChoiceConfigs = Partial<Record<string, ColumnChoiceConfig>>;
|
|
74
|
+
export interface ColumnChoiceConfig {
|
|
75
|
+
dataSubtypeId?: DataSubtypeId | undefined;
|
|
76
|
+
dataTypeId?: DataTypeId | undefined;
|
|
77
|
+
decimalSeparatorId?: DecimalSeparatorId | undefined;
|
|
78
|
+
nullWordsAreEmpty?: boolean | undefined;
|
|
79
|
+
}
|
|
81
80
|
export type DataTypeId = 'boolean' | 'numeric' | 'string' | 'temporal' | 'unknown';
|
|
82
81
|
export type DataSubtypeId = NumericSubtypeId | StringSubtypeId | TemporalSubtypeId;
|
|
83
82
|
export type NumericSubtypeId = 'bigint' | 'integer' | 'decimal';
|
|
84
|
-
type StringSubtypeId = 'email' | 'ipv4' | 'ipv6' | 'ulid' | 'uuid' | 'url' | 'plain';
|
|
83
|
+
export type StringSubtypeId = 'email' | 'ipv4' | 'ipv6' | 'ulid' | 'uuid' | 'url' | 'plain';
|
|
85
84
|
export type TemporalSubtypeId = 'date' | 'dateTime' | 'time';
|
|
86
85
|
export interface InferenceSummary {
|
|
87
86
|
columnConfigs: ObjectColumnConfig[];
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
export type InferenceRecord = InferenceResult[];
|
|
91
|
-
export type InferenceResult = BooleanInferenceResult | NumericInferenceResult | StringInferenceResult | TemporalInferenceResult | UnknownInferenceResult;
|
|
92
|
-
export interface BooleanInferenceResult {
|
|
93
|
-
dataTypeId: 'boolean';
|
|
94
|
-
dataSubtypeId: undefined;
|
|
95
|
-
inputValue: string;
|
|
96
|
-
inputValueWasQuoted: boolean;
|
|
97
|
-
inferredValue: boolean;
|
|
98
|
-
}
|
|
99
|
-
export type NumericInferenceResult = BigIntInferenceResult | NumberInferenceResult;
|
|
100
|
-
interface BigIntInferenceResult {
|
|
101
|
-
dataTypeId: 'numeric';
|
|
102
|
-
dataSubtypeId: 'bigint';
|
|
103
|
-
format: string;
|
|
104
|
-
inputValue: string;
|
|
105
|
-
inputValueWasQuoted: boolean;
|
|
106
|
-
inferredValue: bigint;
|
|
107
|
-
currencySymbolId: string | undefined;
|
|
108
|
-
decimalPlaces: number;
|
|
109
|
-
signId: NumericSignId;
|
|
110
|
-
unitsId: NumericUnitsId;
|
|
111
|
-
}
|
|
112
|
-
interface NumberInferenceResult {
|
|
113
|
-
dataTypeId: 'numeric';
|
|
114
|
-
dataSubtypeId: 'integer' | 'decimal';
|
|
115
|
-
format: string;
|
|
116
|
-
inputValue: string;
|
|
117
|
-
inputValueWasQuoted: boolean;
|
|
118
|
-
inferredValue: number;
|
|
119
|
-
currencySymbolId: string | undefined;
|
|
120
|
-
decimalPlaces: number;
|
|
121
|
-
signId: NumericSignId;
|
|
122
|
-
unitsId: NumericUnitsId;
|
|
123
|
-
}
|
|
124
|
-
export type NumericSignId = 'negative' | 'zero' | 'positive';
|
|
125
|
-
export type NumericUnitsId = 'currency' | 'percentage' | 'plain';
|
|
126
|
-
export interface StringInferenceResult {
|
|
127
|
-
dataTypeId: 'string';
|
|
128
|
-
dataSubtypeId: StringSubtypeId;
|
|
129
|
-
format: string | undefined;
|
|
130
|
-
inputValue: string;
|
|
131
|
-
inputValueWasQuoted: boolean;
|
|
132
|
-
inferredValue: string;
|
|
133
|
-
}
|
|
134
|
-
export interface TemporalInferenceResult {
|
|
135
|
-
dataTypeId: 'temporal';
|
|
136
|
-
dataSubtypeId: TemporalSubtypeId;
|
|
137
|
-
format: string;
|
|
138
|
-
inputValue: string;
|
|
139
|
-
inputValueWasQuoted: boolean;
|
|
140
|
-
inferredValue: Date;
|
|
141
|
-
}
|
|
142
|
-
interface UnknownInferenceResult {
|
|
143
|
-
dataTypeId: 'unknown';
|
|
144
|
-
dataSubtypeId: undefined;
|
|
145
|
-
inputValue: string | null;
|
|
146
|
-
inputValueWasQuoted: boolean;
|
|
147
|
-
inferredValue: null;
|
|
87
|
+
hasHeaders: boolean;
|
|
148
88
|
}
|
|
149
89
|
export { DATA_FORMAT_ICON_CONFIGS, type DataFormatIconConfig } from './dataFormatIcons';
|
|
150
90
|
export declare const ORDERED_VALUE_DELIMITER_IDS: ValueDelimiterId[];
|
|
@@ -5,7 +5,7 @@ import { LocalisedConfig } from '../../../locale';
|
|
|
5
5
|
import { ToolConfig } from '../tool';
|
|
6
6
|
import { ConnectionConfig, ConnectionDescriptionConfig, ConnectionNodeConfig, ObjectColumnConfig } from '../../connection';
|
|
7
7
|
import { connectorActionNameSchema, connectorCategoryConfigSchema, connectorConfigSchema, connectorItemTypeConfigSchema, connectorItemTypeIdSchema, connectorUsageConfigSchema, connectorUsageIdSchema } from './connectorConfig.schema';
|
|
8
|
-
import { ContentAuditConfig, DataFormatId,
|
|
8
|
+
import { ContentAuditConfig, DataFormatId, InferenceSummary, ParsedRecord, ReadingConfig, SampleConfig, ValueDelimiterId } from '../../dataView';
|
|
9
9
|
export { connectorConfigSchema } from './connectorConfig.schema';
|
|
10
10
|
export { auditObjectContentWithParser, buildPreviewObjectResult, type ObjectFilePreview, retrieveRecordsWithParser } from './objectParsing';
|
|
11
11
|
export interface ConnectorInterface extends Component {
|
|
@@ -38,7 +38,6 @@ export type ConnectorConstructor = new (connectorUtilities: ConnectorUtilities,
|
|
|
38
38
|
export interface ConnectorUtilities {
|
|
39
39
|
constructColumnAuditor: (hasHeaders: boolean | undefined) => ColumnAuditor;
|
|
40
40
|
hasReadableStreamTransferSupport(): boolean;
|
|
41
|
-
inferValues: (parsedRecord: ParsedRecord, columnConfigs: ObjectColumnConfig[], hasLeadingRecord: boolean) => InferenceRecord;
|
|
42
41
|
inferDataTypes: (parsedRecords: ParsedRecord[], hasHeaders?: boolean) => InferenceSummary;
|
|
43
42
|
}
|
|
44
43
|
export interface ColumnAuditor {
|