@datapos/datapos-shared 0.3.485 → 0.3.487

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.
@@ -1,6 +1,6 @@
1
1
  import { ComponentConfig } from '..';
2
2
  import { ConnectorConfig } from '.';
3
- import { DataTypeId } from '../dataView';
3
+ import { DataSubtypeId, DataTypeId } from '../dataView';
4
4
  /**
5
5
  * Connection configuration.
6
6
  */
@@ -64,7 +64,9 @@ interface ConnectionDescriptionConfig {
64
64
  * Object column configuration.
65
65
  */
66
66
  interface ObjectColumnConfig {
67
- inferenceCountsByType: Record<string, number>;
67
+ dataTypeId: DataTypeId;
68
+ dataSubtypeId: DataSubtypeId | undefined;
69
+ inferenceCounts: Record<string, number>;
68
70
  invalidValueCount?: number;
69
71
  invalidValues?: string[];
70
72
  isIgnored?: boolean;
@@ -79,7 +81,6 @@ interface ObjectColumnConfig {
79
81
  minValue?: string;
80
82
  patterns?: Record<string, string>;
81
83
  storageTypeId?: StorageTypeId;
82
- dataTypeId?: DataTypeId;
83
84
  validValueCount?: number;
84
85
  validValues?: Record<string, string>;
85
86
  voidValueCount?: number;
@@ -27,7 +27,7 @@ type DataViewLocalisedConfig = Omit<DataViewConfig, 'label' | 'description'> & {
27
27
  */
28
28
  interface PreviewConfig {
29
29
  asAt: number;
30
- commentMarkCharSeq: string | undefined;
30
+ commentMarkCharSeq?: string | undefined;
31
31
  columnConfigs: ObjectColumnConfig[];
32
32
  dataFormatId: DataFormatId | undefined;
33
33
  duration: number;
@@ -36,19 +36,19 @@ interface PreviewConfig {
36
36
  errorMessage: string | undefined;
37
37
  fileType: FileTypeResult | undefined;
38
38
  hasHeaders: boolean;
39
- linesToSkipAtStart: number;
40
- quoteEscapeChar: string;
41
- quoteMarkCharSeq: string;
39
+ linesToSkipAtStart?: number;
40
+ quoteEscapeChar?: string;
41
+ quoteMarkCharSeq?: string;
42
42
  recordDelimiterCharSeq: RecordDelimiterId;
43
43
  parsingRecords: ParsingRecord[];
44
44
  inferenceRecords: InferenceRecord[];
45
45
  size: number;
46
- skipEmptyLines: boolean;
47
- skipLinesWithEmptyValues: boolean;
48
- skipLinesWithErrors: boolean;
46
+ skipEmptyLines?: boolean;
47
+ skipLinesWithEmptyValues?: boolean;
48
+ skipLinesWithErrors?: boolean;
49
49
  text: string;
50
50
  valueDelimiterCharSeq: ValueDelimiterId;
51
- valueTrimMethodId: string;
51
+ valueTrimMethodId?: string;
52
52
  }
53
53
  /**
54
54
  * Data view content audit configuration.
@@ -74,6 +74,7 @@ type NamedValueRecord = Record<string, bigint | boolean | number | string | null
74
74
  type StringValueRecord = (string | null)[];
75
75
  type ValueRecord = (bigint | boolean | number | string | null)[];
76
76
  type DataTypeId = 'boolean' | 'numeric' | 'string' | 'temporal' | 'unknown';
77
+ type DataSubtypeId = NumericSubtypeId | StringSubtypeId | TemporalSubtypeId;
77
78
  type NumericSubtypeId = 'bigint' | 'integer' | 'decimal';
78
79
  type NumericSignId = 'negative' | 'zero' | 'positive';
79
80
  type NumericUnitsId = 'currency' | 'percentage' | 'plain';
@@ -154,7 +155,7 @@ declare const ORDERED_VALUE_DELIMITER_IDS: ValueDelimiterId[];
154
155
  export { ORDERED_VALUE_DELIMITER_IDS };
155
156
  export type { DataViewInterface, DataViewConfig, DataViewLocalisedConfig, PreviewConfig, ContentAuditConfig, RelationshipsAuditConfig, DataFormatId, // Data format.
156
157
  DataTypeId, // Data type.
157
- NumericSubtypeId, // Numeric subtype and characteristics.
158
+ DataSubtypeId, NumericSubtypeId, // Numeric subtype and characteristics.
158
159
  NumericSignId, NumericUnitsId, StringSubtypeId, // String subtype.
159
160
  TemporalSubtypeId, // Temporal subtype.
160
161
  ObjectRecord, NamedValueRecord, StringValueRecord, ValueRecord, RecordDelimiterId, ValueDelimiterId, ParsingRecord, ParsingResult, InferenceRecord, InferenceResult, BooleanInferenceResult, // Boolean.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datapos/datapos-shared",
3
- "version": "0.3.485",
3
+ "version": "0.3.487",
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>",