@datapos/datapos-shared 0.3.414 → 0.3.415
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.
|
@@ -7,7 +7,7 @@ export interface Context extends Component {
|
|
|
7
7
|
readonly config: ContextConfig;
|
|
8
8
|
list(settings?: ContextListSettings): Promise<ContextListResult>;
|
|
9
9
|
}
|
|
10
|
-
export type
|
|
10
|
+
export type ContextOperationOptions = object;
|
|
11
11
|
export type ContextListSettings = object;
|
|
12
12
|
export interface ContextListResult {
|
|
13
13
|
models: ContextModelGroupConfig[];
|
|
@@ -2,35 +2,44 @@ import { ConnectionConfig } from '../component/connector/connection';
|
|
|
2
2
|
import { ConnectorOperationOptions } from '../component/connector';
|
|
3
3
|
import { ModuleConfig } from '../component/module';
|
|
4
4
|
import { ToolConfig } from '../component/tool';
|
|
5
|
-
import { ContextCallbackData, ContextConfig,
|
|
5
|
+
import { ContextCallbackData, ContextConfig, ContextOperationOptions } from '../component/context';
|
|
6
6
|
import { DataViewContentAuditConfig, EncodingConfig, ValueDelimiterId } from '../component/dataView';
|
|
7
|
+
/** Engine runtime interface. */
|
|
8
|
+
interface EngineRuntimeInterface {
|
|
9
|
+
getEncodingConfigs: (localeId: string) => EncodingConfig[];
|
|
10
|
+
invokeWorker(errorEventCallback: (errorEvent: ErrorEvent) => void): EngineWorkerInterface;
|
|
11
|
+
}
|
|
12
|
+
/** Engine worker interface. */
|
|
13
|
+
interface EngineWorkerInterface {
|
|
14
|
+
initialise: (options: EngineWorkerInitialiseOptions) => Promise<void>;
|
|
15
|
+
processConnectorRequest: (id: string, connectionConfig: ConnectionConfig, options: ConnectorOperationOptions, callback?: (callbackData: ConnectorCallbackData) => void) => Promise<unknown>;
|
|
16
|
+
processContextRequest: (id: string, contextConfig: ContextConfig, options: ContextOperationOptions, callback?: (callbackData: ContextCallbackData) => void) => Promise<unknown>;
|
|
17
|
+
processTestRequest: (settings: TestSettings) => Promise<Record<string, unknown>>;
|
|
18
|
+
}
|
|
19
|
+
/** Engine worker initialise options. */
|
|
20
|
+
interface EngineWorkerInitialiseOptions {
|
|
21
|
+
connectorStorageURLPrefix: string;
|
|
22
|
+
toolConfigs: ToolConfig[];
|
|
23
|
+
}
|
|
7
24
|
/** Engine configuration. */
|
|
8
25
|
interface EngineConfig extends ModuleConfig {
|
|
9
26
|
typeId: 'engine';
|
|
10
27
|
}
|
|
11
|
-
/**
|
|
12
|
-
interface
|
|
13
|
-
|
|
14
|
-
|
|
28
|
+
/** Connector callback data. */
|
|
29
|
+
interface ConnectorCallbackData {
|
|
30
|
+
typeId: string;
|
|
31
|
+
properties: Record<string, unknown>;
|
|
15
32
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
interface AuditContentSettings extends ConnectorOperationOptions {
|
|
33
|
+
/** Audit object content options and result. */
|
|
34
|
+
interface AuditObjectContentOptions extends ConnectorOperationOptions {
|
|
19
35
|
chunkSize?: number;
|
|
20
36
|
encodingId: string;
|
|
21
37
|
path: string;
|
|
22
38
|
valueDelimiterId: ValueDelimiterId;
|
|
23
39
|
}
|
|
24
|
-
interface
|
|
40
|
+
interface AuditObjectContentResult {
|
|
25
41
|
contentAuditConfig: DataViewContentAuditConfig;
|
|
26
42
|
}
|
|
27
|
-
/** Connector callback data. */
|
|
28
|
-
interface ConnectorCallbackData {
|
|
29
|
-
typeId: string;
|
|
30
|
-
properties: Record<string, unknown>;
|
|
31
|
-
}
|
|
32
|
-
type ProcessContextRequest = (id: string, contextConfig: ContextConfig, settings: ContextOperationSettings, callback?: (callbackData: ConnectorCallbackData) => void) => Promise<unknown>;
|
|
33
|
-
type ProcessTestRequest = (settings: TestSettings) => Promise<Record<string, unknown>>;
|
|
34
43
|
interface TestSettings {
|
|
35
44
|
action?: string;
|
|
36
45
|
delimiter?: string;
|
|
@@ -38,15 +47,5 @@ interface TestSettings {
|
|
|
38
47
|
hasHeaders?: boolean;
|
|
39
48
|
readable: ReadableStream<Uint8Array>;
|
|
40
49
|
}
|
|
41
|
-
interface EngineInterface {
|
|
42
|
-
getEncodingConfigs: (localeId: string) => EncodingConfig[];
|
|
43
|
-
invokeWorker(errorEventCallback: (errorEvent: ErrorEvent) => void): EngineWorker;
|
|
44
|
-
}
|
|
45
|
-
interface EngineWorker {
|
|
46
|
-
initialise: InitialiseEngine;
|
|
47
|
-
processConnectorRequest: ProcessConnectorRequest;
|
|
48
|
-
processContextRequest: ProcessContextRequest;
|
|
49
|
-
processTestRequest: ProcessTestRequest;
|
|
50
|
-
}
|
|
51
50
|
/** Exports. */
|
|
52
|
-
export type {
|
|
51
|
+
export type { AuditObjectContentOptions, AuditObjectContentResult, ConnectorCallbackData, EngineConfig, EngineRuntimeInterface, EngineWorkerInitialiseOptions, EngineWorkerInterface, TestSettings };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datapos/datapos-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.415",
|
|
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>",
|