@dpuse/dpuse-shared 1.0.207 → 1.0.209

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.
@@ -13,16 +13,21 @@ export interface DataViewConfig extends ComponentInstanceConfig {
13
13
  }
14
14
  export interface ReadingConfig {
15
15
  dataFormatId: DataFormatId;
16
+ dataFormatSourceId?: DataFormatSourceId | undefined;
16
17
  encodingConfidenceLevel: number | undefined;
17
18
  encodingId: string | undefined;
19
+ encodingSourceId?: EncodingSourceId | undefined;
18
20
  fileType: FileTypeResult | undefined;
19
21
  hasHeaders: boolean | undefined;
20
22
  isDeclared?: boolean | undefined;
21
23
  parserId: string | undefined;
22
24
  recordDelimiterId: RecordDelimiterId | undefined;
25
+ replacementCharacterCount?: number | undefined;
23
26
  valueDelimiterId: ValueDelimiterId | undefined;
24
27
  }
25
28
  export type DataFormatId = (typeof DATA_FORMAT_CONFIGS)[number]['id'];
29
+ export type DataFormatSourceId = 'choice' | 'fileContent' | 'jsonSyntax' | 'mimeType' | 'extension' | 'default';
30
+ export type EncodingSourceId = 'choice' | 'byteOrderMark' | 'xmlDeclaration' | 'xmlDefault' | 'utf8Validation' | 'detection' | 'asciiAssumption' | 'fallback';
26
31
  export type RecordDelimiterId = '\n' | '\r' | '\r\n';
27
32
  export type ValueDelimiterId = (typeof VALUE_DELIMITER_CONFIGS)[number]['id'] | '';
28
33
  export interface SampleConfig {
@@ -1,4 +1,5 @@
1
1
  import { InferOutput } from 'valibot';
2
+ import { EncodingDetectionConfig } from '../../../encoding';
2
3
  import { EngineConnectorActionOptions } from '../engine';
3
4
  import { LocalisedConfig } from '../../../locale';
4
5
  import { ToolConfig } from '../tool';
@@ -152,6 +153,7 @@ export interface PreviewObjectResult {
152
153
  contentAuditConfig: ContentAuditConfig;
153
154
  sampleConfig: SampleConfig;
154
155
  readingConfig: ReadingConfig;
156
+ encodingCandidates?: EncodingDetectionConfig[] | undefined;
155
157
  }
156
158
  export interface QueryRecordsOptions extends EngineConnectorActionOptions {
157
159
  aggregates: QueryAggregate[];
@@ -1,8 +1,8 @@
1
1
  import { FileTypeResult } from 'file-type';
2
- import { DataFormatId } from '../../dataView';
3
2
  import { EncodingDetectionConfig } from '../../../encoding';
3
+ import { DataFormatId, DataFormatSourceId, EncodingSourceId } from '../../dataView';
4
4
  export interface FilePreviewerInterface {
5
- previewFile: (url: string, signal: AbortSignal, chunkSize?: number, mimeType?: string, minimumConfidenceLevel?: number, choices?: PreviewChoices) => Promise<FilePreviewResult>;
5
+ previewFile: (url: string, signal: AbortSignal, chunkSize?: number, mimeType?: string, choices?: PreviewChoices) => Promise<FilePreviewResult>;
6
6
  }
7
7
  export interface PreviewChoices {
8
8
  dataFormatId: DataFormatId | undefined;
@@ -11,9 +11,12 @@ export interface PreviewChoices {
11
11
  export interface FilePreviewResult {
12
12
  bytes: Uint8Array;
13
13
  dataFormatId: DataFormatId | undefined;
14
+ dataFormatSourceId: DataFormatSourceId | undefined;
14
15
  encodingId: string | undefined;
15
16
  encodingConfidenceLevel: number | undefined;
17
+ encodingSourceId: EncodingSourceId | undefined;
16
18
  encodingCandidates: EncodingDetectionConfig[] | undefined;
19
+ replacementCharacterCount: number | undefined;
17
20
  fileTypeConfig: FileTypeResult | undefined;
18
21
  isComplete: boolean;
19
22
  text: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dpuse/dpuse-shared",
3
- "version": "1.0.207",
3
+ "version": "1.0.209",
4
4
  "private": false,
5
5
  "description": "Common constants, types and utilities used across DPUse projects.",
6
6
  "license": "MIT",