@datapos/datapos-shared 0.3.527 → 0.3.529
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.
- package/dist/datapos-shared-connector.es.js +1 -1
- package/dist/datapos-shared-tools.es.js +6 -6
- package/dist/types/src/component/connector/connectorConfig.schema.d.ts +2 -2
- package/dist/types/src/component/module.d.ts +0 -1
- package/dist/types/src/component/tool/index.d.ts +7 -4
- package/dist/types/src/errors/index.d.ts +0 -1
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@ const L = n(["apiKey", "disabled", "oAuth2", "none"]), R = i({
|
|
|
11
11
|
params: o(s(d(e(), e())))
|
|
12
12
|
}), v = n(["application", "curatedDataset", "database", "fileStore"]), y = n([
|
|
13
13
|
"abortOperation",
|
|
14
|
-
"
|
|
14
|
+
"auditObjectContent",
|
|
15
15
|
"authenticateConnection",
|
|
16
16
|
"createObject",
|
|
17
17
|
"describeConnection",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
async function
|
|
2
|
-
const n =
|
|
3
|
-
if (!
|
|
4
|
-
const
|
|
5
|
-
return new
|
|
1
|
+
async function e(t, o) {
|
|
2
|
+
const n = t.find((l) => l.id === o);
|
|
3
|
+
if (!n) throw new Error(`Connector could not load unknown tool '${o}'.`);
|
|
4
|
+
const r = await import(`https://engine-eu.datapos.app/tools/${o}_v${n.version}/${o}.es.js`);
|
|
5
|
+
return new r.Tool();
|
|
6
6
|
}
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
e as loadTool
|
|
9
9
|
};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* of connector manifests and capability discovery at runtime.
|
|
6
6
|
*/
|
|
7
7
|
/** Operation names a connector may support. */
|
|
8
|
-
declare const connectorOperationNameSchema: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"abortOperation", undefined>, import('valibot').LiteralSchema<"
|
|
8
|
+
declare const connectorOperationNameSchema: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"abortOperation", undefined>, import('valibot').LiteralSchema<"auditObjectContent", undefined>, import('valibot').LiteralSchema<"authenticateConnection", undefined>, import('valibot').LiteralSchema<"createObject", undefined>, import('valibot').LiteralSchema<"describeConnection", undefined>, import('valibot').LiteralSchema<"dropObject", undefined>, import('valibot').LiteralSchema<"findObjectFolderPath", undefined>, import('valibot').LiteralSchema<"getReadableStream", undefined>, import('valibot').LiteralSchema<"getRecord", undefined>, import('valibot').LiteralSchema<"listNodes", undefined>, import('valibot').LiteralSchema<"previewObject", undefined>, import('valibot').LiteralSchema<"removeRecords", undefined>, import('valibot').LiteralSchema<"retrieveChunks", undefined>, import('valibot').LiteralSchema<"retrieveRecords", undefined>, import('valibot').LiteralSchema<"upsertRecords", undefined>], undefined>;
|
|
9
9
|
/** Connector data pipeline usage identifiers. */
|
|
10
10
|
declare const connectorUsageIdSchema: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"bidirectional", undefined>, import('valibot').LiteralSchema<"destination", undefined>, import('valibot').LiteralSchema<"source", undefined>, import('valibot').LiteralSchema<"unknown", undefined>], undefined>;
|
|
11
11
|
/**
|
|
@@ -47,7 +47,7 @@ declare const connectorConfigSchema: import('valibot').ObjectSchema<{
|
|
|
47
47
|
readonly maxConnectionCount: import('valibot').OptionalSchema<import('valibot').NumberSchema<undefined>, undefined>;
|
|
48
48
|
readonly params: import('valibot').OptionalSchema<import('valibot').ArraySchema<import('valibot').RecordSchema<import('valibot').StringSchema<undefined>, import('valibot').StringSchema<undefined>, undefined>, undefined>, undefined>;
|
|
49
49
|
}, undefined>, undefined>;
|
|
50
|
-
readonly operations: import('valibot').ArraySchema<import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"abortOperation", undefined>, import('valibot').LiteralSchema<"
|
|
50
|
+
readonly operations: import('valibot').ArraySchema<import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"abortOperation", undefined>, import('valibot').LiteralSchema<"auditObjectContent", undefined>, import('valibot').LiteralSchema<"authenticateConnection", undefined>, import('valibot').LiteralSchema<"createObject", undefined>, import('valibot').LiteralSchema<"describeConnection", undefined>, import('valibot').LiteralSchema<"dropObject", undefined>, import('valibot').LiteralSchema<"findObjectFolderPath", undefined>, import('valibot').LiteralSchema<"getReadableStream", undefined>, import('valibot').LiteralSchema<"getRecord", undefined>, import('valibot').LiteralSchema<"listNodes", undefined>, import('valibot').LiteralSchema<"previewObject", undefined>, import('valibot').LiteralSchema<"removeRecords", undefined>, import('valibot').LiteralSchema<"retrieveChunks", undefined>, import('valibot').LiteralSchema<"retrieveRecords", undefined>, import('valibot').LiteralSchema<"upsertRecords", undefined>], undefined>, undefined>;
|
|
51
51
|
readonly usageId: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"bidirectional", undefined>, import('valibot').LiteralSchema<"destination", undefined>, import('valibot').LiteralSchema<"source", undefined>, import('valibot').LiteralSchema<"unknown", undefined>], undefined>;
|
|
52
52
|
readonly vendorAccountURL: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
53
53
|
readonly vendorDocumentationURL: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
@@ -4,5 +4,4 @@ import { moduleConfigSchema, moduleTypeIdSchema } from './moduleConfig.schema';
|
|
|
4
4
|
type ModuleConfig = InferOutput<typeof moduleConfigSchema>;
|
|
5
5
|
/** Module type identifier. */
|
|
6
6
|
type ModuleTypeId = InferOutput<typeof moduleTypeIdSchema>;
|
|
7
|
-
/** Exports. */
|
|
8
7
|
export type { ModuleConfig, ModuleTypeId };
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { ModuleConfig } from '../module';
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Tool configuration.
|
|
4
|
+
*/
|
|
3
5
|
interface ToolConfig extends ModuleConfig {
|
|
4
6
|
typeId: 'tool';
|
|
5
7
|
}
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Load tool.
|
|
10
|
+
*/
|
|
11
|
+
declare function loadTool<T>(toolConfigs: ToolConfig[], toolName: string): Promise<T>;
|
|
9
12
|
export { loadTool };
|
|
10
13
|
export type { ToolConfig };
|
|
@@ -85,7 +85,6 @@ declare function serialiseError(error?: unknown): SerialisedError[];
|
|
|
85
85
|
* - Returns `undefined` if the input array is empty.
|
|
86
86
|
*/
|
|
87
87
|
declare function unserialiseError(serialisedErrors: SerialisedError[]): Error | undefined;
|
|
88
|
-
/** Exports. */
|
|
89
88
|
export type { SerialisedError };
|
|
90
89
|
export { ApplicationError, APIError, EngineError, FetchError, OperationalError, VueHandledError, WindowHandledRuntimeError, WindowHandledPromiseRejectionError };
|
|
91
90
|
export { buildFetchError, concatenateSerialisedErrorMessages, ignoreErrors, normalizeToError, serialiseError, unserialiseError };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datapos/datapos-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.529",
|
|
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>",
|