@dpuse/dpuse-shared 1.0.199 → 1.0.200
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.
- package/README.md +1 -1
- package/dist/dpuse-shared.es.js +7 -5
- package/dist/dpuse-shared.es.js.map +1 -1
- package/dist/types/src/component/connection/index.d.ts +0 -7
- package/dist/types/src/component/dataView/index.d.ts +11 -2
- package/dist/types/src/component/module/connector/index.d.ts +4 -5
- package/package.json +1 -1
|
@@ -45,16 +45,9 @@ export interface ConnectionNodeConfig extends LocalisedConfig<BaseConfig> {
|
|
|
45
45
|
}
|
|
46
46
|
export interface ObjectColumnConfig {
|
|
47
47
|
label: LocaleLabel;
|
|
48
|
-
derivedFromColumnIndex?: number | undefined;
|
|
49
48
|
dataTypeId: DataTypeId;
|
|
50
49
|
dataSubtypeId: DataSubtypeId | undefined;
|
|
51
50
|
storageTypeId: StorageTypeId | undefined;
|
|
52
|
-
decimalSeparatorId: DecimalSeparatorId | undefined;
|
|
53
|
-
dateOrderId: DateOrderId | undefined;
|
|
54
|
-
nullWordsAreEmpty?: boolean | undefined;
|
|
55
51
|
}
|
|
56
|
-
export type DateOrderId = 'dayFirst' | 'monthFirst';
|
|
57
|
-
export type DecimalSeparatorId = (typeof DECIMAL_SEPARATOR_IDS)[number];
|
|
58
52
|
export type StorageTypeId = 'binary' | 'boolean' | 'byte' | 'date' | 'dateTime' | 'dateTimeOffset' | 'decimal' | 'double' | 'int8' | 'int16' | 'int32' | 'int64' | 'object' | 'single' | 'string' | 'time' | 'unknown';
|
|
59
|
-
export declare const DECIMAL_SEPARATOR_IDS: readonly [",", "."];
|
|
60
53
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FileTypeResult } from 'file-type';
|
|
2
2
|
import { ComponentInstanceConfig } from '..';
|
|
3
|
-
import { ConnectionNodeConfig,
|
|
3
|
+
import { ConnectionNodeConfig, ObjectColumnConfig } from '../connection';
|
|
4
4
|
export interface DataViewConfig extends ComponentInstanceConfig {
|
|
5
5
|
typeId: 'dataView';
|
|
6
6
|
connectionId: string;
|
|
@@ -58,7 +58,15 @@ export interface ContentAuditConfig {
|
|
|
58
58
|
recordCount: number;
|
|
59
59
|
sourceWaitDuration: number | undefined;
|
|
60
60
|
}
|
|
61
|
-
export interface
|
|
61
|
+
export interface ColumnReadingConfig extends ObjectColumnConfig {
|
|
62
|
+
derivedFromColumnIndex?: number | undefined;
|
|
63
|
+
decimalSeparatorId: DecimalSeparatorId | undefined;
|
|
64
|
+
dateOrderId: DateOrderId | undefined;
|
|
65
|
+
nullWordsAreEmpty?: boolean | undefined;
|
|
66
|
+
}
|
|
67
|
+
export type DateOrderId = 'dayFirst' | 'monthFirst';
|
|
68
|
+
export type DecimalSeparatorId = (typeof DECIMAL_SEPARATOR_IDS)[number];
|
|
69
|
+
export interface ColumnAuditConfig extends ColumnReadingConfig {
|
|
62
70
|
inferenceCounts: Record<string, number>;
|
|
63
71
|
leadingInferenceCounts: Record<string, number>;
|
|
64
72
|
numericReadings?: Partial<Record<DecimalSeparatorId, NumericReadingConfig>> | undefined;
|
|
@@ -248,5 +256,6 @@ export declare const DATA_TYPE_CONFIGS: readonly [{
|
|
|
248
256
|
readonly isChoosable: false;
|
|
249
257
|
readonly subtypeIds: readonly [];
|
|
250
258
|
}];
|
|
259
|
+
export declare const DECIMAL_SEPARATOR_IDS: readonly [",", "."];
|
|
251
260
|
export declare function getValueDelimiterCharacter(valueDelimiterId: ValueDelimiterId): string;
|
|
252
261
|
export {};
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { InferOutput } from 'valibot';
|
|
2
|
-
import { Component } from '../..';
|
|
3
2
|
import { EngineConnectorActionOptions } from '../engine';
|
|
4
3
|
import { LocalisedConfig } from '../../../locale';
|
|
5
4
|
import { ToolConfig } from '../tool';
|
|
6
|
-
import { ColumnAuditConfig, ContentAuditConfig, DataFormatId, ParsedRecord, ReadingConfig, SampleConfig, ValueDelimiterId } from '../../dataView';
|
|
5
|
+
import { ColumnAuditConfig, ColumnReadingConfig, ContentAuditConfig, DataFormatId, ParsedRecord, ReadingConfig, SampleConfig, ValueDelimiterId } from '../../dataView';
|
|
7
6
|
import { ConnectionConfig, ConnectionDescriptionConfig, ConnectionNodeConfig, ObjectColumnConfig } from '../../connection';
|
|
8
7
|
import { connectorActionNameSchema, connectorCategoryConfigSchema, connectorConfigSchema, connectorItemTypeConfigSchema, connectorItemTypeIdSchema, connectorUsageConfigSchema, connectorUsageIdSchema } from './connectorConfig.schema';
|
|
9
8
|
export { connectorConfigSchema } from './connectorConfig.schema';
|
|
10
9
|
export { auditObjectContentWithParser, buildPreviewObjectResult, type ObjectFilePreview, retrieveRecordsWithParser } from './objectParsing';
|
|
11
|
-
export interface ConnectorInterface
|
|
12
|
-
readonly config: ConnectorConfig;
|
|
10
|
+
export interface ConnectorInterface {
|
|
13
11
|
abortOperation?(): void;
|
|
14
12
|
auditObjectContent?(options: AuditObjectContentOptions, chunk: (recordCount: number, byteCount: number) => void): Promise<AuditObjectContentResult>;
|
|
15
13
|
closeStore?(options: CloseStoreOptions): Promise<void>;
|
|
@@ -123,6 +121,7 @@ export interface LoadObjectRecordsResult {
|
|
|
123
121
|
recordCount: number;
|
|
124
122
|
}
|
|
125
123
|
export interface EngineLoadObjectRecordsOptions extends LoadObjectRecordsOptions {
|
|
124
|
+
columnConfigs: ColumnReadingConfig[];
|
|
126
125
|
hasHeaders: boolean;
|
|
127
126
|
ignoredColumnIndexes: number[];
|
|
128
127
|
headerValues: (string | null)[] | undefined;
|
|
@@ -188,7 +187,7 @@ export interface RecountPreviewColumnsOptions extends EngineConnectorActionOptio
|
|
|
188
187
|
parsedRecords: ParsedRecord[];
|
|
189
188
|
}
|
|
190
189
|
export interface ClassifyPreviewValuesOptions extends EngineConnectorActionOptions {
|
|
191
|
-
columnConfigs:
|
|
190
|
+
columnConfigs: ColumnReadingConfig[];
|
|
192
191
|
parsedRecords: ParsedRecord[];
|
|
193
192
|
}
|
|
194
193
|
export type PreviewValueStateId = 'blank' | 'invalid' | 'missing' | 'valid';
|