@dpuse/dpuse-shared 1.0.206 → 1.0.207
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/dist/dpuse-shared.es.js.map +1 -1
- package/dist/types/src/component/connection/index.d.ts +1 -1
- package/dist/types/src/component/module/connector/index.d.ts +1 -1
- package/dist/types/src/component/module/connector/objectParsing.d.ts +3 -13
- package/dist/types/src/component/module/tool/filePreviewer.d.ts +20 -0
- package/dist/types/src/component/module/tool/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BaseConfig } from '../../index';
|
|
2
|
+
import { ComponentInstanceConfig } from '..';
|
|
2
3
|
import { ConnectorConfig } from '../module/connector';
|
|
3
4
|
import { LocaleLabel } from '../../locale/label';
|
|
4
5
|
import { LocalisedConfig } from '../../locale';
|
|
5
|
-
import { ComponentInstanceConfig } from '..';
|
|
6
6
|
import { DataSubtypeId, DataTypeId } from '../dataView';
|
|
7
7
|
export interface ConnectionConfig extends ComponentInstanceConfig {
|
|
8
8
|
typeId: 'connectorConnection';
|
|
@@ -228,7 +228,7 @@ export interface UpsertRecordsOptions extends EngineConnectorActionOptions {
|
|
|
228
228
|
path: string;
|
|
229
229
|
}
|
|
230
230
|
export type ConnectorUsageId = InferOutput<typeof connectorUsageIdSchema>;
|
|
231
|
-
export { auditObjectContentWithParser, buildPreviewObjectResult,
|
|
231
|
+
export { auditObjectContentWithParser, buildPreviewObjectResult, retrieveRecordsWithParser } from './objectParsing';
|
|
232
232
|
export { readTableSchema } from './tableSchema';
|
|
233
233
|
export declare function determineConnectorUsageId(actionNames: ConnectorActionName[]): ConnectorUsageId;
|
|
234
234
|
export declare const constructConnectorCategoryConfig: (id: string, localeId?: import('../../../locale').LocaleId) => LocalisedConfig<ConnectorCategoryConfig>;
|
|
@@ -1,21 +1,11 @@
|
|
|
1
|
-
import { FileTypeResult } from 'file-type';
|
|
2
1
|
import { AuditObjectContentOptions, AuditObjectContentResult, ConnectorUtilities, PreviewObjectResult, RecordRetrievalTypeId, RetrieveRecordsOptions, RetrieveRecordsSummary } from '.';
|
|
3
|
-
import {
|
|
4
|
-
import { ToolConfig } from '../tool';
|
|
5
|
-
export interface ObjectFilePreview {
|
|
6
|
-
bytes: Uint8Array;
|
|
7
|
-
dataFormatId: DataFormatId | undefined;
|
|
8
|
-
encodingConfidenceLevel: number | undefined;
|
|
9
|
-
encodingId: string | undefined;
|
|
10
|
-
fileTypeConfig: FileTypeResult | undefined;
|
|
11
|
-
isComplete: boolean;
|
|
12
|
-
text: string | undefined;
|
|
13
|
-
}
|
|
2
|
+
import { DeclaredColumnConfig, DeclaredReadingConfig, ParsedRecord, ValueDelimiterId } from '../../dataView';
|
|
3
|
+
import { FilePreviewResult, ToolConfig } from '../tool';
|
|
14
4
|
export declare function buildPreviewObjectResult(input: {
|
|
15
5
|
asAt: number;
|
|
16
6
|
declaredColumnConfigs?: DeclaredColumnConfig[] | undefined;
|
|
17
7
|
declaredReadingConfig?: DeclaredReadingConfig | undefined;
|
|
18
|
-
filePreview:
|
|
8
|
+
filePreview: FilePreviewResult;
|
|
19
9
|
inferDataTypes: ConnectorUtilities['inferDataTypes'];
|
|
20
10
|
parserId: string | undefined;
|
|
21
11
|
startedAt: number;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FileTypeResult } from 'file-type';
|
|
2
|
+
import { DataFormatId } from '../../dataView';
|
|
3
|
+
import { EncodingDetectionConfig } from '../../../encoding';
|
|
4
|
+
export interface FilePreviewerInterface {
|
|
5
|
+
previewFile: (url: string, signal: AbortSignal, chunkSize?: number, mimeType?: string, minimumConfidenceLevel?: number, choices?: PreviewChoices) => Promise<FilePreviewResult>;
|
|
6
|
+
}
|
|
7
|
+
export interface PreviewChoices {
|
|
8
|
+
dataFormatId: DataFormatId | undefined;
|
|
9
|
+
encodingId: string | undefined;
|
|
10
|
+
}
|
|
11
|
+
export interface FilePreviewResult {
|
|
12
|
+
bytes: Uint8Array;
|
|
13
|
+
dataFormatId: DataFormatId | undefined;
|
|
14
|
+
encodingId: string | undefined;
|
|
15
|
+
encodingConfidenceLevel: number | undefined;
|
|
16
|
+
encodingCandidates: EncodingDetectionConfig[] | undefined;
|
|
17
|
+
fileTypeConfig: FileTypeResult | undefined;
|
|
18
|
+
isComplete: boolean;
|
|
19
|
+
text: string | undefined;
|
|
20
|
+
}
|
|
@@ -4,6 +4,7 @@ import { parserConfigSchema, toolConfigSchema } from './toolConfig.schema';
|
|
|
4
4
|
export { toolConfigSchema } from './toolConfig.schema';
|
|
5
5
|
export type ToolConfig = InferOutput<typeof toolConfigSchema>;
|
|
6
6
|
export type ParserConfig = InferOutput<typeof parserConfigSchema>;
|
|
7
|
+
export type { FilePreviewerInterface, FilePreviewResult, PreviewChoices } from './filePreviewer';
|
|
7
8
|
export type { ParserInterface, ParseStreamOptions, ParseTextOptions, ParseTextResult } from './parser';
|
|
8
9
|
export { parseDelimitedText, type ParseTextWithDelimiter } from './delimitedText';
|
|
9
10
|
export declare const TOOL_NAME_PREFIX = "dpuse-tool-";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dpuse/dpuse-shared",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.207",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Common constants, types and utilities used across DPUse projects.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"prettier": "^3.9.10",
|
|
77
77
|
"sonda": "^0.14.0",
|
|
78
78
|
"typescript": "^6.0.3",
|
|
79
|
-
"vite": "^8.3.
|
|
79
|
+
"vite": "^8.3.8",
|
|
80
80
|
"vite-plugin-dts": "^5.1.2",
|
|
81
81
|
"vitest": "^5.1.0"
|
|
82
82
|
}
|