@datapos/datapos-shared 0.3.520 → 0.3.522

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.
@@ -445,11 +445,11 @@ const E = (n) => /* @__PURE__ */ D(n.map((t) => /* @__PURE__ */ j(t))), T = /* @
445
445
  path: /* @__PURE__ */ o()
446
446
  });
447
447
  export {
448
- q as a,
449
- j as b,
450
- Q as c,
451
- B as d,
452
- z as e,
448
+ Q as a,
449
+ q as b,
450
+ z as c,
451
+ j as d,
452
+ B as e,
453
453
  v as f,
454
454
  b as g,
455
455
  T as h,
@@ -1,5 +1,5 @@
1
1
  import { DEFAULT_LOCALE_CODE as a } from "./datapos-shared-locale.es.js";
2
- import { e as s } from "./componentConfig.schema-BhoHfdqq.js";
2
+ import { c as s } from "./componentConfig.schema-C0C6ceb5.js";
3
3
  const n = [
4
4
  { id: "alpha", color: "red", labels: { "en-gb": "alpha" } },
5
5
  { id: "beta", color: "amber", labels: { "en-gb": "beta" } },
@@ -1,6 +1,6 @@
1
1
  import { DEFAULT_LOCALE_CODE as p, createLabelMap as C, resolveLabel as u } from "./datapos-shared-locale.es.js";
2
- import { l as n, o as i, f as a, a as s, r as d, b as g, s as e, g as o, n as l, h, i as S, p as f } from "./componentConfig.schema-BhoHfdqq.js";
3
- import { m as O } from "./moduleConfig.schema-CzfX-j-V.js";
2
+ import { l as n, o as i, f as a, b as s, r as d, d as g, s as e, g as o, n as l, h, i as S, p as f } from "./componentConfig.schema-C0C6ceb5.js";
3
+ import { m as O } from "./moduleConfig.schema-DNq1iU4S.js";
4
4
  const L = n(["apiKey", "disabled", "oAuth2", "none"]), R = i({
5
5
  authMethodId: L,
6
6
  activeConnectionCount: o(l()),
@@ -1,19 +1 @@
1
- const e = [
2
- "abort",
3
- "initialise",
4
- "auditContent",
5
- "auditObjectContent",
6
- "createObject",
7
- "dropObject",
8
- "findObject",
9
- "getObject",
10
- "getReader",
11
- "listNodes",
12
- "previewObject",
13
- "removeRecords",
14
- "retrieveRecords",
15
- "upsertRecords"
16
- ];
17
- export {
18
- e as ENGINE_OPERATION_NAMES
19
- };
1
+
@@ -1,5 +1,5 @@
1
- import { l as n, o, a as e, b as t, n as a, c, d as r } from "./componentConfig.schema-BhoHfdqq.js";
2
- import { m as s } from "./moduleConfig.schema-CzfX-j-V.js";
1
+ import { l as n, o, b as e, d as t, n as a, a as c, e as r } from "./componentConfig.schema-C0C6ceb5.js";
2
+ import { m as s } from "./moduleConfig.schema-DNq1iU4S.js";
3
3
  const i = n(["list"]), p = o({
4
4
  ...c,
5
5
  typeId: t("contextModelGroup"),
@@ -1,4 +1,4 @@
1
- import { l as o, s as e, c as n } from "./componentConfig.schema-BhoHfdqq.js";
1
+ import { l as o, s as e, a as n } from "./componentConfig.schema-C0C6ceb5.js";
2
2
  o(["app", "engine", "connector", "context", "presenter", "tool"]);
3
3
  const s = {
4
4
  ...n,
@@ -1,10 +1,10 @@
1
1
  import { InferOutput } from 'valibot';
2
2
  import { Component } from '..';
3
- import { EngineUtilities } from '../../engine';
4
3
  import { ToolConfig } from '../tool';
5
4
  import { ConnectionDescriptionConfig, ConnectionNodeConfig } from './connection';
6
5
  import { connectorCategoryConfigSchema, connectorConfigSchema, connectorOperationNameSchema, connectorUsageIdSchema } from './connectorConfig.schema';
7
- import { ParsingRecord, PreviewConfig, ValueDelimiterId } from '../dataView';
6
+ import { ContentAuditConfig, ParsingRecord, PreviewConfig, ValueDelimiterId } from '../dataView';
7
+ import { EngineOperationOptions, EngineUtilities } from '../../engine';
8
8
  /**
9
9
  * Connector interface and constructor.
10
10
  */
@@ -23,6 +23,7 @@ interface ConnectorInterface extends Component {
23
23
  processedRowCount: number;
24
24
  durationMs?: number;
25
25
  }>;
26
+ auditObjectContent?(options: AuditObjectContentOptions2): Promise<AuditObjectContentResult2>;
26
27
  /**
27
28
  * Authenticate a specified connection.
28
29
  */
@@ -97,51 +98,73 @@ type ConnectorLocalisedConfig = Omit<ConnectorConfig, 'label' | 'description'> &
97
98
  description: string;
98
99
  };
99
100
  /**
100
- * Connector operation options.
101
+ * Audit object content options and result.
101
102
  */
102
- interface ConnectorOperationOptions {
103
- accountId?: string;
104
- appCheckToken?: string;
105
- sessionAccessToken?: string;
103
+ interface AuditObjectContentOptions extends EngineOperationOptions {
104
+ chunkSize: number | undefined;
105
+ encodingId: string;
106
+ path: string;
107
+ valueDelimiterId: ValueDelimiterId;
108
+ }
109
+ /**
110
+ *
111
+ */
112
+ interface AuditObjectContentResult {
113
+ contentAuditConfig: ContentAuditConfig;
114
+ }
115
+ /**
116
+ * Audit object content options.
117
+ */
118
+ interface AuditObjectContentOptions2 extends EngineOperationOptions {
119
+ chunkSize: number | undefined;
120
+ encodingId: string;
121
+ path: string;
122
+ valueDelimiterId: ValueDelimiterId;
123
+ }
124
+ /**
125
+ * Audit object content result.
126
+ */
127
+ interface AuditObjectContentResult2 {
128
+ contentAuditConfig: ContentAuditConfig;
106
129
  }
107
130
  /**
108
131
  * Create object options.
109
132
  */
110
- interface CreateObjectOptions extends ConnectorOperationOptions {
133
+ interface CreateObjectOptions extends EngineOperationOptions {
111
134
  path: string;
112
135
  structure: string;
113
136
  }
114
137
  /**
115
138
  * Describe connection options and result.
116
139
  */
117
- type DescribeConnectionOptions = ConnectorOperationOptions;
140
+ type DescribeConnectionOptions = EngineOperationOptions;
118
141
  interface DescribeConnectionResult {
119
142
  descriptionConfig: ConnectionDescriptionConfig;
120
143
  }
121
144
  /**
122
145
  * Drop object options.
123
146
  */
124
- interface DropObjectOptions extends ConnectorOperationOptions {
147
+ interface DropObjectOptions extends EngineOperationOptions {
125
148
  path: string;
126
149
  }
127
150
  /**
128
151
  * Find object folder path options.
129
152
  */
130
- interface FindObjectFolderPathOptions extends ConnectorOperationOptions {
153
+ interface FindObjectFolderPathOptions extends EngineOperationOptions {
131
154
  containerName: string | undefined;
132
155
  nodeId: string;
133
156
  }
134
157
  /**
135
158
  * Get readable stream options.
136
159
  */
137
- interface GetReadableStreamOptions extends ConnectorOperationOptions {
160
+ interface GetReadableStreamOptions extends EngineOperationOptions {
138
161
  id: string;
139
162
  path: string;
140
163
  }
141
164
  /**
142
165
  * Get record options and result.
143
166
  */
144
- interface GetRecordOptions extends ConnectorOperationOptions {
167
+ interface GetRecordOptions extends EngineOperationOptions {
145
168
  id: string;
146
169
  path: string;
147
170
  }
@@ -151,7 +174,7 @@ interface GetRecordResult {
151
174
  /**
152
175
  * List nodes options and result.
153
176
  */
154
- interface ListNodesOptions extends ConnectorOperationOptions {
177
+ interface ListNodesOptions extends EngineOperationOptions {
155
178
  folderPath: string;
156
179
  limit?: number;
157
180
  offset?: number;
@@ -166,7 +189,7 @@ interface ListNodesResult {
166
189
  /**
167
190
  * Preview object options.
168
191
  */
169
- interface PreviewObjectOptions extends ConnectorOperationOptions {
192
+ interface PreviewObjectOptions extends EngineOperationOptions {
170
193
  chunkSize?: number;
171
194
  extension?: string;
172
195
  path: string;
@@ -174,14 +197,14 @@ interface PreviewObjectOptions extends ConnectorOperationOptions {
174
197
  /**
175
198
  * Remove records options.
176
199
  */
177
- interface RemoveRecordsOptions extends ConnectorOperationOptions {
200
+ interface RemoveRecordsOptions extends EngineOperationOptions {
178
201
  keys: string[];
179
202
  path: string;
180
203
  }
181
204
  /**
182
205
  * Retrieve chunks options.
183
206
  */
184
- interface RetrieveChunksOptions extends ConnectorOperationOptions {
207
+ interface RetrieveChunksOptions extends EngineOperationOptions {
185
208
  chunkSize?: number;
186
209
  encodingId: string;
187
210
  path: string;
@@ -190,7 +213,7 @@ interface RetrieveChunksOptions extends ConnectorOperationOptions {
190
213
  /**
191
214
  * Retrieve records options and summary.
192
215
  */
193
- interface RetrieveRecordsOptions extends ConnectorOperationOptions {
216
+ interface RetrieveRecordsOptions extends EngineOperationOptions {
194
217
  chunkSize?: number;
195
218
  encodingId: string;
196
219
  path: string;
@@ -226,7 +249,7 @@ interface RetrieveRecordsSummary {
226
249
  /**
227
250
  * Upsert records options.
228
251
  */
229
- interface UpsertRecordsOptions extends ConnectorOperationOptions {
252
+ interface UpsertRecordsOptions extends EngineOperationOptions {
230
253
  records: Record<string, unknown>[];
231
254
  path: string;
232
255
  }
@@ -244,4 +267,4 @@ declare const constructConnectorCategoryConfig: (id: string, localeId?: import('
244
267
  export { connectorConfigSchema } from './connectorConfig.schema';
245
268
  export { constructConnectorCategoryConfig };
246
269
  export type { ConnectionConfig, ConnectionNodeConfig, ObjectColumnConfig } from './connection';
247
- export type { ConnectorConfig, ConnectorConstructor, ConnectorInterface, ConnectorLocalisedConfig, ConnectorOperationName, ConnectorOperationOptions, ConnectorUsageId, CreateObjectOptions, DropObjectOptions, FindObjectFolderPathOptions, GetReadableStreamOptions, GetRecordResult, GetRecordOptions, ListNodesResult, ListNodesOptions, PreviewObjectOptions, RemoveRecordsOptions, RetrieveChunksOptions, RetrieveRecordsOptions, RetrieveRecordsSummary, UpsertRecordsOptions };
270
+ export type { AuditObjectContentOptions, AuditObjectContentResult, AuditObjectContentOptions2, AuditObjectContentResult2, ConnectorConfig, ConnectorConstructor, ConnectorInterface, ConnectorLocalisedConfig, ConnectorOperationName, ConnectorUsageId, CreateObjectOptions, DropObjectOptions, FindObjectFolderPathOptions, GetReadableStreamOptions, GetRecordResult, GetRecordOptions, ListNodesResult, ListNodesOptions, PreviewObjectOptions, RemoveRecordsOptions, RetrieveChunksOptions, RetrieveRecordsOptions, RetrieveRecordsSummary, UpsertRecordsOptions };
@@ -1,10 +1,10 @@
1
1
  import { ConnectionConfig } from '../component/connector/connection';
2
2
  import { EncodingTypeConfig } from '../encoding';
3
3
  import { ModuleConfig } from '../component/module';
4
+ import { ObjectColumnConfig } from '../component/connector';
4
5
  import { ToolConfig } from '../component/tool';
5
- import { ConnectorOperationOptions, ObjectColumnConfig } from '../component/connector';
6
- import { ContentAuditConfig, InferenceRecord, InferenceSummary, ParsingRecord, ValueDelimiterId } from '../component/dataView';
7
6
  import { ContextConfig, ContextOperationOptions } from '../component/context';
7
+ import { InferenceRecord, InferenceSummary, ParsingRecord } from '../component/dataView';
8
8
  /**
9
9
  * Engine runtime interface.
10
10
  */
@@ -12,22 +12,28 @@ interface EngineRuntimeInterface {
12
12
  getEncodingTypeConfigs: (localeId: string) => EncodingTypeConfig[];
13
13
  invokeWorker(errorEventCallback: (errorEvent: ErrorEvent) => void): EngineWorkerInterface;
14
14
  }
15
+ /**
16
+ * Engine operation options.
17
+ */
18
+ interface EngineOperationOptions {
19
+ accountId?: string;
20
+ appCheckToken?: string;
21
+ sessionAccessToken?: string;
22
+ }
15
23
  /**
16
24
  * Engine worker interface.
17
25
  */
18
26
  interface EngineWorkerInterface {
19
27
  initialise: (options: EngineWorkerInitialiseOptions) => Promise<void>;
20
- processRequest: (id: string, config: ConnectionConfig | ContextConfig, options: ConnectorOperationOptions | ContextOperationOptions, callback?: (callbackData: EngineCallbackData) => void) => Promise<unknown>;
28
+ processRequest: (id: string, config: ConnectionConfig | ContextConfig, options: EngineOperationOptions | ContextOperationOptions, callback?: (callbackData: EngineCallbackData) => void) => Promise<unknown>;
21
29
  }
22
- /** Engine worker initialise options. */
30
+ /**
31
+ * Engine worker initialise options.
32
+ */
23
33
  interface EngineWorkerInitialiseOptions {
24
34
  connectorStorageURLPrefix: string;
25
35
  toolConfigs: ToolConfig[];
26
36
  }
27
- /**
28
- *
29
- */
30
- declare const ENGINE_OPERATION_NAMES: string[];
31
37
  /**
32
38
  * Engine configuration.
33
39
  */
@@ -46,23 +52,7 @@ interface EngineCallbackData {
46
52
  */
47
53
  interface EngineUtilities {
48
54
  hasReadableStreamTransferSupport(): boolean;
49
- inferValues: (parsingRecord: ParsingRecord, columnConfigs: ObjectColumnConfig[], leadingRecord: boolean) => InferenceRecord;
55
+ inferValues: (parsedRecord: ParsingRecord, columnConfigs: ObjectColumnConfig[], leadingRecord: boolean) => InferenceRecord;
50
56
  inferDataTypes: (parsedRecords: ParsingRecord[]) => InferenceSummary;
51
57
  }
52
- /**
53
- * Audit object content options and result.
54
- */
55
- interface AuditObjectContentOptions extends ConnectorOperationOptions {
56
- chunkSize: number | undefined;
57
- encodingId: string;
58
- path: string;
59
- valueDelimiterId: ValueDelimiterId;
60
- }
61
- /**
62
- *
63
- */
64
- interface AuditObjectContentResult {
65
- contentAuditConfig: ContentAuditConfig;
66
- }
67
- export { ENGINE_OPERATION_NAMES };
68
- export type { AuditObjectContentOptions, AuditObjectContentResult, EngineCallbackData, EngineConfig, EngineRuntimeInterface, EngineUtilities, EngineWorkerInitialiseOptions, EngineWorkerInterface };
58
+ export type { EngineCallbackData, EngineConfig, EngineOperationOptions, EngineRuntimeInterface, EngineUtilities, EngineWorkerInitialiseOptions, EngineWorkerInterface };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datapos/datapos-shared",
3
- "version": "0.3.520",
3
+ "version": "0.3.522",
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>",