@dpuse/dpuse-shared 0.3.656 → 0.3.657
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,11 +1,11 @@
|
|
|
1
1
|
import { InferOutput } from 'valibot';
|
|
2
2
|
import { Component } from '../..';
|
|
3
|
+
import { EngineConnectorActionOptions } from '../../../engine';
|
|
3
4
|
import { ToolConfig } from '../tool';
|
|
4
|
-
import { ConnectionDescriptionConfig, ConnectionNodeConfig } from '../../connection';
|
|
5
|
+
import { ConnectionDescriptionConfig, ConnectionNodeConfig, ObjectColumnConfig } from '../../connection';
|
|
5
6
|
import { connectorCategoryConfigSchema, connectorConfigSchema, connectorOperationNameSchema, connectorUsageIdSchema } from './connectorConfig.schema';
|
|
6
|
-
import { ContentAuditConfig, ParsingRecord, PreviewConfig, ValueDelimiterId } from '../../dataView';
|
|
7
|
+
import { ContentAuditConfig, InferenceRecord, InferenceSummary, ParsingRecord, PreviewConfig, ValueDelimiterId } from '../../dataView';
|
|
7
8
|
import { LocalisedConfig } from '../../../locale';
|
|
8
|
-
import { EngineConnectorActionOptions, EngineUtilities } from '../../../engine';
|
|
9
9
|
export { connectorConfigSchema } from './connectorConfig.schema';
|
|
10
10
|
export interface ConnectorInterface extends Component {
|
|
11
11
|
abortController: AbortController | undefined;
|
|
@@ -26,7 +26,7 @@ export interface ConnectorInterface extends Component {
|
|
|
26
26
|
retrieveRecords?(options: RetrieveRecordsOptions, chunk: (typeId: RetrievalTypeId, records: Record<string, unknown>[] | ParsingRecord[]) => void, complete: (result: RetrieveRecordsSummary) => void): Promise<void>;
|
|
27
27
|
upsertRecords?(options: UpsertRecordsOptions): Promise<void>;
|
|
28
28
|
}
|
|
29
|
-
export type ConnectorConstructor = new (
|
|
29
|
+
export type ConnectorConstructor = new (connectorUtilities: ConnectorUtilities, toolConfigs: ToolConfig[]) => ConnectorInterface;
|
|
30
30
|
export type ConnectorConfig = InferOutput<typeof connectorConfigSchema>;
|
|
31
31
|
type ConnectorCategoryConfig = InferOutput<typeof connectorCategoryConfigSchema>;
|
|
32
32
|
export declare const constructConnectorCategoryConfig: (id: string, localeId?: import('../../../locale').LocaleId) => LocalisedConfig<ConnectorCategoryConfig>;
|
|
@@ -128,3 +128,8 @@ export interface UpsertRecordsOptions extends EngineConnectorActionOptions {
|
|
|
128
128
|
}
|
|
129
129
|
export type RetrievalTypeId = 'jsonRecordArray' | 'parsingRecordArray';
|
|
130
130
|
export type ConnectorUsageId = InferOutput<typeof connectorUsageIdSchema>;
|
|
131
|
+
export interface ConnectorUtilities {
|
|
132
|
+
hasReadableStreamTransferSupport(): boolean;
|
|
133
|
+
inferValues: (parsedRecord: ParsingRecord, columnConfigs: ObjectColumnConfig[], leadingRecord: boolean) => InferenceRecord;
|
|
134
|
+
inferDataTypes: (parsedRecords: ParsingRecord[]) => InferenceSummary;
|
|
135
|
+
}
|
|
@@ -2,9 +2,7 @@ import { ComponentConfig } from '../component';
|
|
|
2
2
|
import { EncodingTypeConfig } from '../encoding';
|
|
3
3
|
import { LocalisedConfig } from '../locale';
|
|
4
4
|
import { ModuleConfig } from '../component/module';
|
|
5
|
-
import { ObjectColumnConfig } from '../component/connection';
|
|
6
5
|
import { ToolConfig } from '../component/module/tool';
|
|
7
|
-
import { InferenceRecord, InferenceSummary, ParsingRecord } from '../component/dataView';
|
|
8
6
|
export interface EngineRuntime {
|
|
9
7
|
getEncodingTypeConfigs: (localeId: string) => EncodingTypeConfig[];
|
|
10
8
|
invokeWorker(errorEventCallback: (errorEvent: ErrorEvent) => void): EngineWorker;
|
|
@@ -13,9 +11,6 @@ export interface EngineWorker {
|
|
|
13
11
|
initialise: (options: EngineInitialiseOptions) => Promise<void>;
|
|
14
12
|
processRequest: (id: string, config: ComponentConfig | LocalisedConfig<ComponentConfig>, options: EngineAuthActionOptions | EngineConnectorActionOptions | EngineContextActionOptions, callback?: (callbackData: EngineCallbackData) => void) => Promise<unknown>;
|
|
15
13
|
}
|
|
16
|
-
export interface EngineConfig extends ModuleConfig {
|
|
17
|
-
typeId: 'engine';
|
|
18
|
-
}
|
|
19
14
|
export interface EngineInitialiseOptions {
|
|
20
15
|
connectorStorageURLPrefix: string;
|
|
21
16
|
toolConfigs: ToolConfig[];
|
|
@@ -39,8 +34,6 @@ export interface EngineCallbackData {
|
|
|
39
34
|
typeId: string;
|
|
40
35
|
properties: Record<string, unknown>;
|
|
41
36
|
}
|
|
42
|
-
export interface
|
|
43
|
-
|
|
44
|
-
inferValues: (parsedRecord: ParsingRecord, columnConfigs: ObjectColumnConfig[], leadingRecord: boolean) => InferenceRecord;
|
|
45
|
-
inferDataTypes: (parsedRecords: ParsingRecord[]) => InferenceSummary;
|
|
37
|
+
export interface EngineConfig extends ModuleConfig {
|
|
38
|
+
typeId: 'engine';
|
|
46
39
|
}
|
package/package.json
CHANGED