@datapos/datapos-shared 0.3.396 → 0.3.398
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.
|
@@ -16,39 +16,38 @@ type ConnectorLocalisedConfig = Omit<ConnectorConfig, 'label' | 'description'> &
|
|
|
16
16
|
description: string;
|
|
17
17
|
};
|
|
18
18
|
/** Connector runtime interface. */
|
|
19
|
-
interface
|
|
19
|
+
interface ConnectorInterface extends Component {
|
|
20
20
|
abortController: AbortController | undefined;
|
|
21
21
|
readonly config: ConnectorConfig;
|
|
22
22
|
readonly connectionConfig: ConnectionConfig;
|
|
23
23
|
readonly toolConfigs: ToolConfig[];
|
|
24
|
-
abortOperation?(connector:
|
|
24
|
+
abortOperation?(connector: ConnectorInterface): void;
|
|
25
25
|
authenticateConnection?(accountId: string, windowCenterX: number, windowCenterY: number): Window;
|
|
26
|
-
createObject?(connector:
|
|
27
|
-
describeConnection?(connector:
|
|
28
|
-
dropObject?(connector:
|
|
29
|
-
findObject?(connector:
|
|
30
|
-
getReadableStream?(connector:
|
|
31
|
-
getRecord?(connector:
|
|
32
|
-
listNodes?(connector:
|
|
33
|
-
previewObject?(connector:
|
|
34
|
-
removeRecords?(connector:
|
|
35
|
-
retrieveChunks?(connector:
|
|
36
|
-
retrieveRecords?(connector:
|
|
37
|
-
upsertRecords?(connector:
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
typeId: string;
|
|
41
|
-
properties: Record<string, unknown>;
|
|
42
|
-
}
|
|
26
|
+
createObject?(connector: ConnectorInterface, settings: CreateSettings): Promise<void>;
|
|
27
|
+
describeConnection?(connector: ConnectorInterface, settings: DescribeSettings): Promise<DescribeResult>;
|
|
28
|
+
dropObject?(connector: ConnectorInterface, settings: DropSettings): Promise<void>;
|
|
29
|
+
findObject?(connector: ConnectorInterface, settings: FindObjectSettings): Promise<string | undefined>;
|
|
30
|
+
getReadableStream?(connector: ConnectorInterface, settings: GetReadableStreamSettings): Promise<ReadableStream<Uint8Array<ArrayBuffer>>>;
|
|
31
|
+
getRecord?(connector: ConnectorInterface, settings: GetRecordSettings): Promise<GetRecordResult>;
|
|
32
|
+
listNodes?(connector: ConnectorInterface, settings: ListSettings): Promise<ListResult>;
|
|
33
|
+
previewObject?(connector: ConnectorInterface, settings: PreviewSettings): Promise<PreviewResult>;
|
|
34
|
+
removeRecords?(connector: ConnectorInterface, settings: RemoveSettings): Promise<void>;
|
|
35
|
+
retrieveChunks?(connector: ConnectorInterface, settings: RetrieveChunksSettings, chunk: (records: (string[] | Record<string, unknown>)[]) => void, complete: (result: RetrieveChunksSummary) => void): Promise<void>;
|
|
36
|
+
retrieveRecords?(connector: ConnectorInterface, settings: RetrieveRecordsSettings, chunk: (records: (string[] | Record<string, unknown>)[]) => void, complete: (result: RetrieveRecordsSummary) => void): Promise<void>;
|
|
37
|
+
upsertRecords?(connector: ConnectorInterface, settings: UpsertSettings): Promise<void>;
|
|
38
|
+
}
|
|
39
|
+
/** Connector operation settings. */
|
|
43
40
|
interface ConnectorOperationSettings {
|
|
44
41
|
accountId?: string;
|
|
45
42
|
appCheckToken?: string;
|
|
46
43
|
sessionAccessToken?: string;
|
|
47
44
|
}
|
|
48
|
-
/** Get
|
|
49
|
-
interface
|
|
50
|
-
|
|
45
|
+
/** Get find object settings. */
|
|
46
|
+
interface FindObjectSettings extends ConnectorOperationSettings {
|
|
47
|
+
containerName?: string;
|
|
48
|
+
objectName: string;
|
|
51
49
|
}
|
|
50
|
+
/** Get readable stream settings. */
|
|
52
51
|
interface GetReadableStreamSettings extends ConnectorOperationSettings {
|
|
53
52
|
id: string;
|
|
54
53
|
path: string;
|
|
@@ -65,13 +64,6 @@ interface DescribeResult {
|
|
|
65
64
|
interface DropSettings extends ConnectorOperationSettings {
|
|
66
65
|
path: string;
|
|
67
66
|
}
|
|
68
|
-
interface FindSettings extends ConnectorOperationSettings {
|
|
69
|
-
containerName?: string;
|
|
70
|
-
objectName: string;
|
|
71
|
-
}
|
|
72
|
-
interface FindResult {
|
|
73
|
-
folderPath?: string;
|
|
74
|
-
}
|
|
75
67
|
interface GetRecordSettings extends ConnectorOperationSettings {
|
|
76
68
|
id: string;
|
|
77
69
|
path: string;
|
|
@@ -151,6 +143,6 @@ declare const getConnectorCategory: (id: string, localeId?: import('../../index'
|
|
|
151
143
|
/** Exports. */
|
|
152
144
|
export { getConnectorCategory };
|
|
153
145
|
export type { ConnectionColumnConfig, ConnectionConfig, ConnectionNodeConfig, Encoding, UsageTypeId } from './connection';
|
|
154
|
-
export type {
|
|
155
|
-
export type { CreateSettings, DropSettings,
|
|
146
|
+
export type { ConnectorConfig, ConnectorInterface, ConnectorLocalisedConfig, ConnectorOperationSettings };
|
|
147
|
+
export type { CreateSettings, DropSettings, FindObjectSettings, GetReadableStreamSettings, GetRecordResult, GetRecordSettings, ListResult, ListSettings, PreviewResult, PreviewSettings, RemoveSettings, RetrieveChunksResult, RetrieveChunksSettings, RetrieveChunksSummary, RetrieveRecordsResult, RetrieveRecordsSettings, RetrieveRecordsSummary, UpsertSettings };
|
|
156
148
|
export { connectorConfigSchema } from './connectorConfig.schema';
|
|
@@ -5,7 +5,6 @@ import { LocaleCode } from '../index';
|
|
|
5
5
|
interface Component {
|
|
6
6
|
readonly config: ComponentConfig;
|
|
7
7
|
}
|
|
8
|
-
/** */
|
|
9
8
|
type ComponentConfig = InferOutput<typeof componentConfigSchema>;
|
|
10
9
|
type ComponentStatus = InferOutput<typeof componentStatusSchema>;
|
|
11
10
|
declare function getComponentStatus(id: string, localeId?: LocaleCode): ComponentStatus;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ConnectionConfig } from '../component/connector/connection';
|
|
2
2
|
import { ToolConfig } from '../component/tool';
|
|
3
|
-
import {
|
|
3
|
+
import { ConnectorOperationSettings, ListResult, RetrieveRecordsResult } from '../component/connector';
|
|
4
4
|
import { ContextCallbackData, ContextConfig, ContextOperationSettings } from '../component/context';
|
|
5
5
|
import { DataViewContentAuditConfig, DataViewPreviewConfig, EncodingConfig, ValueDelimiterId } from '../component/dataView';
|
|
6
6
|
interface EngineInitialiseSettings {
|
|
@@ -19,6 +19,11 @@ interface AuditContentResult {
|
|
|
19
19
|
contentAuditConfig: DataViewContentAuditConfig;
|
|
20
20
|
}
|
|
21
21
|
type ConnectorInterfaceResult = AuditContentResult | DataViewPreviewConfig | ListResult | RetrieveRecordsResult;
|
|
22
|
+
/** Connector callback data. */
|
|
23
|
+
interface ConnectorCallbackData {
|
|
24
|
+
typeId: string;
|
|
25
|
+
properties: Record<string, unknown>;
|
|
26
|
+
}
|
|
22
27
|
type ProcessContextRequest = (id: string, contextConfig: ContextConfig, settings: ContextOperationSettings, callback?: (callbackData: ConnectorCallbackData) => void) => Promise<ContextInterfaceResult>;
|
|
23
28
|
type ContextInterfaceResult = AuditContentResult | DataViewPreviewConfig | ListResult | RetrieveRecordsResult;
|
|
24
29
|
type ProcessTestRequest = (settings: TestSettings) => Promise<Record<string, unknown>>;
|
|
@@ -40,4 +45,4 @@ interface EngineWorker {
|
|
|
40
45
|
processTestRequest: ProcessTestRequest;
|
|
41
46
|
}
|
|
42
47
|
/** Exports. */
|
|
43
|
-
export type { AuditContentSettings, AuditContentResult, ConnectorInterfaceResult, ContextInterfaceResult, EngineInterface, EngineWorker, EngineInitialiseSettings, TestSettings };
|
|
48
|
+
export type { AuditContentSettings, AuditContentResult, ConnectorCallbackData, ConnectorInterfaceResult, ContextInterfaceResult, EngineInterface, EngineWorker, EngineInitialiseSettings, 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.398",
|
|
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>",
|
|
@@ -51,11 +51,6 @@
|
|
|
51
51
|
"dist"
|
|
52
52
|
],
|
|
53
53
|
"prettier": "@datapos/datapos-development/prettierrc",
|
|
54
|
-
"peerDependencies": {
|
|
55
|
-
"csv-parse": "^6.1.0",
|
|
56
|
-
"date-fns": "^4.1.0",
|
|
57
|
-
"nanoid": "^5.1.6"
|
|
58
|
-
},
|
|
59
54
|
"devDependencies": {
|
|
60
55
|
"@datapos/datapos-development": "^0.3.424",
|
|
61
56
|
"@datapos/eslint-config-datapos": "^1.0.28",
|
|
@@ -74,7 +69,6 @@
|
|
|
74
69
|
"license-report-check": "^0.1.2",
|
|
75
70
|
"license-report-recursive": "^6.8.2",
|
|
76
71
|
"md-to-pdf": "^5.2.5",
|
|
77
|
-
"nanoid": "^5.1.6",
|
|
78
72
|
"npm-check-updates": "^19.2.0",
|
|
79
73
|
"owasp-dependency-check": "^1.0.0",
|
|
80
74
|
"prettier": "^3.7.4",
|