@datapos/datapos-shared 0.3.412 → 0.3.413
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.
|
@@ -25,18 +25,18 @@ interface ConnectorInterface extends Component {
|
|
|
25
25
|
readonly toolConfigs: ToolConfig[];
|
|
26
26
|
abortOperation?(connector: ConnectorInterface): void;
|
|
27
27
|
authenticateConnection?(accountId: string, windowCenterX: number, windowCenterY: number): Window;
|
|
28
|
-
createObject?(connector: ConnectorInterface, options:
|
|
29
|
-
describeConnection?(connector: ConnectorInterface, options:
|
|
30
|
-
dropObject?(connector: ConnectorInterface, options:
|
|
28
|
+
createObject?(connector: ConnectorInterface, options: CreateObjectOptions): Promise<void>;
|
|
29
|
+
describeConnection?(connector: ConnectorInterface, options: DescribeConnectionOptions): Promise<DescribeConnectionResult>;
|
|
30
|
+
dropObject?(connector: ConnectorInterface, options: DropObjectOptions): Promise<void>;
|
|
31
31
|
findObject?(connector: ConnectorInterface, options: FindObjectFolderPathOptions): Promise<string | null>;
|
|
32
32
|
getReadableStream?(connector: ConnectorInterface, options: GetReadableStreamOptions): Promise<ReadableStream<Uint8Array>>;
|
|
33
33
|
getRecord?(connector: ConnectorInterface, options: GetRecordOptions): Promise<GetRecordResult>;
|
|
34
34
|
listNodes?(connector: ConnectorInterface, options: ListNodesOptions): Promise<ListNodesResult>;
|
|
35
35
|
previewObject?(connector: ConnectorInterface, options: PreviewObjectOptions): Promise<PreviewObjectResult>;
|
|
36
|
-
removeRecords?(connector: ConnectorInterface, options:
|
|
37
|
-
retrieveChunks?(connector: ConnectorInterface, options: RetrieveChunksOptions, chunk: (records: (string[] | Record<string, unknown>)[]) => void, complete: (
|
|
38
|
-
retrieveRecords?(connector: ConnectorInterface, options: RetrieveRecordsOptions, chunk: (records: (string[] | Record<string, unknown>)[]) => void, complete: (result:
|
|
39
|
-
upsertRecords?(connector: ConnectorInterface, options:
|
|
36
|
+
removeRecords?(connector: ConnectorInterface, options: RemoveRecordsOptions): Promise<void>;
|
|
37
|
+
retrieveChunks?(connector: ConnectorInterface, options: RetrieveChunksOptions, chunk: (records: (string[] | Record<string, unknown>)[]) => void, complete: () => void): Promise<void>;
|
|
38
|
+
retrieveRecords?(connector: ConnectorInterface, options: RetrieveRecordsOptions, chunk: (records: (string[] | Record<string, unknown>)[]) => void, complete: (result: RetrieveRecordsSummary) => void): Promise<void>;
|
|
39
|
+
upsertRecords?(connector: ConnectorInterface, options: UpsertRecordsOptions): Promise<void>;
|
|
40
40
|
}
|
|
41
41
|
/** Connector operation options. */
|
|
42
42
|
interface ConnectorOperationOptions {
|
|
@@ -44,6 +44,20 @@ interface ConnectorOperationOptions {
|
|
|
44
44
|
appCheckToken?: string;
|
|
45
45
|
sessionAccessToken?: string;
|
|
46
46
|
}
|
|
47
|
+
/** Create object options. */
|
|
48
|
+
interface CreateObjectOptions extends ConnectorOperationOptions {
|
|
49
|
+
path: string;
|
|
50
|
+
structure: string;
|
|
51
|
+
}
|
|
52
|
+
/** Describe connection options and result. */
|
|
53
|
+
type DescribeConnectionOptions = ConnectorOperationOptions;
|
|
54
|
+
interface DescribeConnectionResult {
|
|
55
|
+
description: ConnectionDescription;
|
|
56
|
+
}
|
|
57
|
+
/** Drop object options. */
|
|
58
|
+
interface DropObjectOptions extends ConnectorOperationOptions {
|
|
59
|
+
path: string;
|
|
60
|
+
}
|
|
47
61
|
/** Find object folder path options. */
|
|
48
62
|
interface FindObjectFolderPathOptions extends ConnectorOperationOptions {
|
|
49
63
|
containerName: string | undefined;
|
|
@@ -54,6 +68,14 @@ interface GetReadableStreamOptions extends ConnectorOperationOptions {
|
|
|
54
68
|
id: string;
|
|
55
69
|
path: string;
|
|
56
70
|
}
|
|
71
|
+
/** Get record options and result. */
|
|
72
|
+
interface GetRecordOptions extends ConnectorOperationOptions {
|
|
73
|
+
id: string;
|
|
74
|
+
path: string;
|
|
75
|
+
}
|
|
76
|
+
interface GetRecordResult {
|
|
77
|
+
record?: string[] | Record<string, unknown>;
|
|
78
|
+
}
|
|
57
79
|
/** List nodes options and result. */
|
|
58
80
|
interface ListNodesOptions extends ConnectorOperationOptions {
|
|
59
81
|
folderPath: string;
|
|
@@ -77,59 +99,35 @@ interface PreviewObjectResult {
|
|
|
77
99
|
data: Record<string, unknown>[] | Uint8Array;
|
|
78
100
|
typeId: 'jsonArray' | 'uint8Array';
|
|
79
101
|
}
|
|
80
|
-
/**
|
|
81
|
-
interface
|
|
102
|
+
/** Remove records options. */
|
|
103
|
+
interface RemoveRecordsOptions extends ConnectorOperationOptions {
|
|
104
|
+
keys: string[];
|
|
105
|
+
path: string;
|
|
106
|
+
}
|
|
107
|
+
/** Retrieve chunks options. */
|
|
108
|
+
interface RetrieveChunksOptions extends ConnectorOperationOptions {
|
|
82
109
|
chunkSize?: number;
|
|
83
110
|
encodingId: string;
|
|
84
111
|
path: string;
|
|
85
112
|
valueDelimiterId: ValueDelimiterId;
|
|
86
113
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
commentLineCount: number;
|
|
90
|
-
emptyLineCount: number;
|
|
91
|
-
invalidFieldLengthCount: number;
|
|
92
|
-
lineCount: number;
|
|
93
|
-
recordCount: number;
|
|
94
|
-
}
|
|
95
|
-
interface CreateOptions extends ConnectorOperationOptions {
|
|
96
|
-
accountId?: string;
|
|
97
|
-
path: string;
|
|
98
|
-
structure: string;
|
|
99
|
-
}
|
|
100
|
-
type DescribeOptions = ConnectorOperationOptions;
|
|
101
|
-
interface DescribeResult {
|
|
102
|
-
description: ConnectionDescription;
|
|
103
|
-
}
|
|
104
|
-
interface DropOptions extends ConnectorOperationOptions {
|
|
105
|
-
path: string;
|
|
106
|
-
}
|
|
107
|
-
interface GetRecordOptions extends ConnectorOperationOptions {
|
|
108
|
-
id: string;
|
|
109
|
-
path: string;
|
|
110
|
-
}
|
|
111
|
-
interface GetRecordResult {
|
|
112
|
-
record?: string[] | Record<string, unknown>;
|
|
113
|
-
}
|
|
114
|
-
interface RemoveOptions extends ConnectorOperationOptions {
|
|
115
|
-
keys: string[];
|
|
116
|
-
path: string;
|
|
117
|
-
}
|
|
118
|
-
interface RetrieveChunksOptions extends ConnectorOperationOptions {
|
|
114
|
+
/** Retrieve records options and summary. */
|
|
115
|
+
interface RetrieveRecordsOptions extends ConnectorOperationOptions {
|
|
119
116
|
chunkSize?: number;
|
|
120
117
|
encodingId: string;
|
|
121
118
|
path: string;
|
|
122
119
|
valueDelimiterId: ValueDelimiterId;
|
|
123
120
|
}
|
|
124
|
-
interface
|
|
121
|
+
interface RetrieveRecordsSummary {
|
|
125
122
|
byteCount: number;
|
|
126
123
|
commentLineCount: number;
|
|
127
124
|
emptyLineCount: number;
|
|
128
|
-
invalidFieldLengthCount: number;
|
|
129
125
|
lineCount: number;
|
|
126
|
+
nonUniformRecordCount: number;
|
|
130
127
|
recordCount: number;
|
|
131
128
|
}
|
|
132
|
-
|
|
129
|
+
/** Upsert records options. */
|
|
130
|
+
interface UpsertRecordsOptions extends ConnectorOperationOptions {
|
|
133
131
|
records: Record<string, unknown>[];
|
|
134
132
|
path: string;
|
|
135
133
|
}
|
|
@@ -137,7 +135,7 @@ interface UpsertOptions extends ConnectorOperationOptions {
|
|
|
137
135
|
type ConnectorCategory = InferOutput<typeof connectorCategorySchema>;
|
|
138
136
|
declare const getConnectorCategory: (id: string, localeId?: import('../../index').LocaleCode) => ConnectorCategory;
|
|
139
137
|
/** Exports. */
|
|
138
|
+
export { connectorConfigSchema } from './connectorConfig.schema';
|
|
140
139
|
export { getConnectorCategory };
|
|
141
140
|
export type { ConnectionColumnConfig, ConnectionConfig, ConnectionNodeConfig, Encoding, UsageTypeId } from './connection';
|
|
142
|
-
export type { ConnectorConfig, ConnectorInterface, ConnectorLocalisedConfig, ConnectorOperationName, ConnectorOperationOptions, ConnectorUsageId,
|
|
143
|
-
export { connectorConfigSchema } from './connectorConfig.schema';
|
|
141
|
+
export type { ConnectorConfig, ConnectorInterface, ConnectorLocalisedConfig, ConnectorOperationName, ConnectorOperationOptions, ConnectorUsageId, CreateObjectOptions, DropObjectOptions, FindObjectFolderPathOptions, GetReadableStreamOptions, GetRecordResult, GetRecordOptions, ListNodesResult, ListNodesOptions, PreviewObjectResult, PreviewObjectOptions, RemoveRecordsOptions, RetrieveChunksOptions, RetrieveRecordsOptions, RetrieveRecordsSummary, UpsertRecordsOptions };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datapos/datapos-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.413",
|
|
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>",
|