@datapos/datapos-shared 0.3.572 → 0.3.574
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.
|
@@ -91,12 +91,6 @@ function h(e) {
|
|
|
91
91
|
t = { body: n.body, locator: n.locator, message: r.message, name: "FetchError", stack: r.stack }, r = r.cause == null ? null : a(r.cause);
|
|
92
92
|
break;
|
|
93
93
|
}
|
|
94
|
-
// case 'DPUError': {
|
|
95
|
-
// const typedCause = cause as DPUError;
|
|
96
|
-
// serialisedError = { body: undefined, locator: typedCause.locator, message: cause.message, name: 'DPUError', stack: cause.stack };
|
|
97
|
-
// cause = cause.cause == null ? null : normalizeToError(cause.cause);
|
|
98
|
-
// break;
|
|
99
|
-
// }
|
|
100
94
|
default:
|
|
101
95
|
r.name ? (t = { body: void 0, locator: "", message: r.message, name: r.name, stack: r.stack }, r = r.cause == null ? null : a(r.cause)) : (t = { body: void 0, locator: "", message: f(r), name: "Error", stack: void 0 }, r = null);
|
|
102
96
|
}
|
|
@@ -122,9 +116,6 @@ function w(e) {
|
|
|
122
116
|
case "FetchError":
|
|
123
117
|
r = new i(o.message, o.locator, o.body, { cause: s });
|
|
124
118
|
break;
|
|
125
|
-
// case 'DPUError':
|
|
126
|
-
// error = new DPUError(serialised.message, serialised.locator, { cause: rebuiltError });
|
|
127
|
-
// break;
|
|
128
119
|
default:
|
|
129
120
|
r = new Error(o.message, { cause: s }), r.name = o.name;
|
|
130
121
|
break;
|
|
@@ -5,82 +5,29 @@ import { ConnectionDescriptionConfig, ConnectionNodeConfig } from './connection'
|
|
|
5
5
|
import { connectorCategoryConfigSchema, connectorConfigSchema, connectorOperationNameSchema, connectorUsageIdSchema } from './connectorConfig.schema';
|
|
6
6
|
import { ContentAuditConfig, ParsingRecord, PreviewConfig, ValueDelimiterId } from '../dataView';
|
|
7
7
|
import { EngineOperationOptions, EngineUtilities } from '../../engine';
|
|
8
|
-
|
|
9
|
-
* Connector interface and constructor.
|
|
10
|
-
*/
|
|
11
|
-
interface ConnectorInterface extends Component {
|
|
8
|
+
export interface ConnectorInterface extends Component {
|
|
12
9
|
abortController: AbortController | undefined;
|
|
13
10
|
readonly config: ConnectorConfig;
|
|
14
11
|
readonly toolConfigs: ToolConfig[];
|
|
15
|
-
/**
|
|
16
|
-
* Abort the active long running operation.
|
|
17
|
-
*/
|
|
18
12
|
abortOperation?(): void;
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
13
|
auditObjectContent?(options: AuditObjectContentOptions, chunk: (rowCount: number) => void): Promise<AuditObjectContentResult>;
|
|
23
|
-
/**
|
|
24
|
-
* Authenticate a specified connection.
|
|
25
|
-
*/
|
|
26
14
|
authenticateConnection?(accountId: string, windowCenterX: number, windowCenterY: number): Window;
|
|
27
|
-
/**
|
|
28
|
-
* Create an object for a specified connection.
|
|
29
|
-
*/
|
|
30
15
|
createObject?(options: CreateObjectOptions): Promise<void>;
|
|
31
|
-
/**
|
|
32
|
-
* Describe a specified connection.
|
|
33
|
-
*/
|
|
34
16
|
describeConnection?(options: DescribeConnectionOptions): Promise<DescribeConnectionResult>;
|
|
35
|
-
/**
|
|
36
|
-
* Drop (delete) an object for a specified connection.
|
|
37
|
-
*/
|
|
38
17
|
dropObject?(options: DropObjectOptions): Promise<void>;
|
|
39
|
-
/**
|
|
40
|
-
* Find an object for a specified connection.
|
|
41
|
-
*/
|
|
42
18
|
findObject?(options: FindObjectOptions): Promise<FindObjectResult>;
|
|
43
|
-
/**
|
|
44
|
-
* Get a reader that can retrieve all records from an object for a specified connection.
|
|
45
|
-
*/
|
|
46
19
|
getReadableStream?(options: GetReadableStreamOptions): Promise<ReadableStream<Uint8Array>>;
|
|
47
|
-
/**
|
|
48
|
-
* Get a record for an object for a specified connection.
|
|
49
|
-
*/
|
|
50
20
|
getRecord?(options: GetRecordOptions): Promise<GetRecordResult>;
|
|
51
|
-
/**
|
|
52
|
-
* List nodes in a folder for a specified connection.
|
|
53
|
-
*/
|
|
54
21
|
listNodes?(options: ListNodesOptions): Promise<ListNodesResult>;
|
|
55
|
-
/**
|
|
56
|
-
* Preview an object for a specified connection.
|
|
57
|
-
*/
|
|
58
22
|
previewObject?(options: PreviewObjectOptions): Promise<PreviewConfig>;
|
|
59
|
-
/**
|
|
60
|
-
* Remove one or more records from an object for a specified connection.
|
|
61
|
-
*/
|
|
62
23
|
removeRecords?(options: RemoveRecordsOptions): Promise<void>;
|
|
63
|
-
/**
|
|
64
|
-
* Retrieve all chunks from an object for a specified connection.
|
|
65
|
-
*/
|
|
66
24
|
retrieveChunks?(options: RetrieveChunksOptions, chunk: (data: Uint8Array) => void, complete: () => void): Promise<void>;
|
|
67
|
-
|
|
68
|
-
* Retrieve all records from an object for a specified connection.
|
|
69
|
-
*/
|
|
70
|
-
retrieveRecords?(options: RetrieveRecordsOptions, chunk: (records: ParsingRecord[]) => void, complete: (result: RetrieveRecordsSummary) => void): Promise<void>;
|
|
71
|
-
/**
|
|
72
|
-
* Upsert one or more records into an object for a specified connection.
|
|
73
|
-
*/
|
|
25
|
+
retrieveRecords?(options: RetrieveRecordsOptions, chunk: (typeId: RetrievalTypeId, records: Record<string, unknown>[] | ParsingRecord[]) => void, complete: (result: RetrieveRecordsSummary) => void): Promise<void>;
|
|
74
26
|
upsertRecords?(options: UpsertRecordsOptions): Promise<void>;
|
|
75
27
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
type ConnectorConstructor = new (engineUtilities: EngineUtilities, toolConfigs: ToolConfig[]) => ConnectorInterface;
|
|
80
|
-
/**
|
|
81
|
-
* Operation names a connector may support.
|
|
82
|
-
*/
|
|
83
|
-
type ConnectorOperationName = InferOutput<typeof connectorOperationNameSchema>;
|
|
28
|
+
export type ConnectorConstructor = new (engineUtilities: EngineUtilities, toolConfigs: ToolConfig[]) => ConnectorInterface;
|
|
29
|
+
type RetrievalTypeId = 'jsonRecordArray' | 'parsingRecordArray';
|
|
30
|
+
export type ConnectorOperationName = InferOutput<typeof connectorOperationNameSchema>;
|
|
84
31
|
/**
|
|
85
32
|
* Connector data pipeline usage identifiers.
|
|
86
33
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datapos/datapos-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.574",
|
|
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>",
|