@dpuse/dpuse-shared 0.3.622 → 0.3.623
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/{componentConfig.schema-Bvr66FJf.js → componentConfig.schema-Cirbf_EB.js} +22 -22
- package/dist/context-BUNJif2t.js +17 -0
- package/dist/dpuse-shared-component.es.js +38 -11
- package/dist/{dpuse-shared-dataview.es.js → dpuse-shared-componentDataView.es.js} +1 -1
- package/dist/dpuse-shared-componentModuleConnector.es.js +88 -0
- package/dist/dpuse-shared-componentModuleContext.es.js +2 -0
- package/dist/dpuse-shared-componentModulePresenter.es.js +2 -0
- package/dist/{dpuse-shared-tools.es.js → dpuse-shared-componentModuleTool.es.js} +1 -1
- package/dist/dpuse-shared-locale.es.js +2 -2
- package/dist/dpuse-shared.es.js +3 -26
- package/dist/{locale-CrC0-wPd.js → locale-BjiFli1U.js} +9 -2
- package/dist/{moduleConfig.schema-Ct8Q53dE.js → moduleConfig.schema-DTqGQW05.js} +4 -4
- package/dist/presenter-DezPXk-i.js +16 -0
- package/dist/types/src/component/connection/index.d.ts +3 -3
- package/dist/types/src/component/index.d.ts +2 -2
- package/dist/types/src/component/module/connector/index.d.ts +32 -114
- package/dist/types/src/component/module/index.d.ts +2 -5
- package/dist/types/src/component/module/presenter/presenterConfig.schema.d.ts +0 -3
- package/dist/types/src/component/module/tool/index.d.ts +5 -0
- package/dist/types/src/engine/index.d.ts +1 -1
- package/dist/types/src/locale/index.d.ts +5 -0
- package/package.json +14 -6
- package/dist/dpuse-shared-connector.es.js +0 -76
- package/dist/types/src/component/tool/index.d.ts +0 -13
- /package/dist/{dpuse-shared-connection.es.js → dpuse-shared-componentConnection.es.js} +0 -0
- /package/dist/{dpuse-shared-module.es.js → dpuse-shared-componentModule.es.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as e, d as t, f as n, g as r, o as i, p as a, u as o } from "./locale-BjiFli1U.js";
|
|
2
2
|
//#region src/schema.ts
|
|
3
|
-
var s = (
|
|
3
|
+
var s = (t) => e(t.map((e) => o(e))), c = s([
|
|
4
4
|
"app",
|
|
5
5
|
"connector",
|
|
6
6
|
"connectorConnection",
|
|
@@ -39,28 +39,28 @@ var s = (e) => r(e.map((e) => a(e))), c = s([
|
|
|
39
39
|
"releaseCandidate",
|
|
40
40
|
"unavailable",
|
|
41
41
|
"underReview"
|
|
42
|
-
]), d =
|
|
42
|
+
]), d = a({
|
|
43
43
|
color: l,
|
|
44
|
-
label:
|
|
45
|
-
}), f =
|
|
46
|
-
id:
|
|
47
|
-
label:
|
|
48
|
-
description:
|
|
49
|
-
icon:
|
|
50
|
-
iconDark:
|
|
51
|
-
order:
|
|
52
|
-
path:
|
|
44
|
+
label: r()
|
|
45
|
+
}), f = a({
|
|
46
|
+
id: r(),
|
|
47
|
+
label: i,
|
|
48
|
+
description: i,
|
|
49
|
+
icon: t(r()),
|
|
50
|
+
iconDark: t(r()),
|
|
51
|
+
order: n(),
|
|
52
|
+
path: r()
|
|
53
53
|
}), p = {
|
|
54
|
-
id:
|
|
55
|
-
label:
|
|
56
|
-
description:
|
|
57
|
-
firstCreatedAt:
|
|
58
|
-
icon:
|
|
59
|
-
iconDark:
|
|
60
|
-
lastUpdatedAt:
|
|
61
|
-
status:
|
|
62
|
-
statusId:
|
|
63
|
-
}, m =
|
|
54
|
+
id: r(),
|
|
55
|
+
label: i,
|
|
56
|
+
description: i,
|
|
57
|
+
firstCreatedAt: t(n()),
|
|
58
|
+
icon: t(r()),
|
|
59
|
+
iconDark: t(r()),
|
|
60
|
+
lastUpdatedAt: t(n()),
|
|
61
|
+
status: t(d),
|
|
62
|
+
statusId: t(u)
|
|
63
|
+
}, m = a({
|
|
64
64
|
...p,
|
|
65
65
|
typeId: c
|
|
66
66
|
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { c as e, f as t, p as n, u as r } from "./locale-BjiFli1U.js";
|
|
2
|
+
import { i, r as a, t as o } from "./componentConfig.schema-Cirbf_EB.js";
|
|
3
|
+
import { t as s } from "./moduleConfig.schema-DTqGQW05.js";
|
|
4
|
+
//#region src/component/module/context/contextConfig.schema.ts
|
|
5
|
+
var c = i(["list"]), l = n({
|
|
6
|
+
...o,
|
|
7
|
+
typeId: r("contextModelGroup"),
|
|
8
|
+
modelRefs: e(a),
|
|
9
|
+
order: t()
|
|
10
|
+
}), u = n({
|
|
11
|
+
...s,
|
|
12
|
+
typeId: r("context"),
|
|
13
|
+
models: e(l),
|
|
14
|
+
operations: e(c)
|
|
15
|
+
});
|
|
16
|
+
//#endregion
|
|
17
|
+
export { u as t };
|
|
@@ -1,51 +1,78 @@
|
|
|
1
|
-
import "./locale-
|
|
2
|
-
import { n as e } from "./componentConfig.schema-
|
|
1
|
+
import "./locale-BjiFli1U.js";
|
|
2
|
+
import { n as e } from "./componentConfig.schema-Cirbf_EB.js";
|
|
3
3
|
//#region src/component/index.ts
|
|
4
4
|
var t = [
|
|
5
5
|
{
|
|
6
6
|
id: "alpha",
|
|
7
7
|
color: "red",
|
|
8
|
-
labels: {
|
|
8
|
+
labels: {
|
|
9
|
+
en: "alpha",
|
|
10
|
+
es: "alfa"
|
|
11
|
+
}
|
|
9
12
|
},
|
|
10
13
|
{
|
|
11
14
|
id: "beta",
|
|
12
15
|
color: "amber",
|
|
13
|
-
labels: {
|
|
16
|
+
labels: {
|
|
17
|
+
en: "beta",
|
|
18
|
+
es: "beta"
|
|
19
|
+
}
|
|
14
20
|
},
|
|
15
21
|
{
|
|
16
22
|
id: "generalAvailability",
|
|
17
23
|
color: "green",
|
|
18
|
-
labels: {
|
|
24
|
+
labels: {
|
|
25
|
+
en: "",
|
|
26
|
+
es: ""
|
|
27
|
+
}
|
|
19
28
|
},
|
|
20
29
|
{
|
|
21
30
|
id: "notApplicable",
|
|
22
31
|
color: "green",
|
|
23
|
-
labels: {
|
|
32
|
+
labels: {
|
|
33
|
+
en: "not-applicable",
|
|
34
|
+
es: "no-aplicable"
|
|
35
|
+
}
|
|
24
36
|
},
|
|
25
37
|
{
|
|
26
38
|
id: "preAlpha",
|
|
27
39
|
color: "red",
|
|
28
|
-
labels: {
|
|
40
|
+
labels: {
|
|
41
|
+
en: "pre-alpha",
|
|
42
|
+
es: "pre-alfa"
|
|
43
|
+
}
|
|
29
44
|
},
|
|
30
45
|
{
|
|
31
46
|
id: "proposed",
|
|
32
47
|
color: "other",
|
|
33
|
-
labels: {
|
|
48
|
+
labels: {
|
|
49
|
+
en: "proposed",
|
|
50
|
+
es: "propuesto"
|
|
51
|
+
}
|
|
34
52
|
},
|
|
35
53
|
{
|
|
36
54
|
id: "releaseCandidate",
|
|
37
55
|
color: "green",
|
|
38
|
-
labels: {
|
|
56
|
+
labels: {
|
|
57
|
+
en: "release-candidate",
|
|
58
|
+
es: "candidato-de-lanzamiento"
|
|
59
|
+
}
|
|
39
60
|
},
|
|
40
61
|
{
|
|
41
62
|
id: "unavailable",
|
|
42
63
|
color: "other",
|
|
43
|
-
labels: {
|
|
64
|
+
labels: {
|
|
65
|
+
en: "unavailable",
|
|
66
|
+
es: "no-disponible"
|
|
67
|
+
}
|
|
44
68
|
},
|
|
45
69
|
{
|
|
46
70
|
id: "underReview",
|
|
47
71
|
color: "other",
|
|
48
|
-
labels: {
|
|
72
|
+
labels: {
|
|
73
|
+
en: "under-review",
|
|
74
|
+
es: "en-revisión"
|
|
75
|
+
}
|
|
49
76
|
}
|
|
50
77
|
];
|
|
51
78
|
function n(e, n = "en") {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as e } from "./locale-
|
|
1
|
+
import { r as e } from "./locale-BjiFli1U.js";
|
|
2
2
|
e({ en: "Data Positioning Events" }), e({ en: "Delimited Text" }), e({ en: "JSON" }), e({ en: "SPSS" }), e({ en: "XLSX" }), e({ en: "XML" }), e({ en: "Newline" }), e({ en: "Carriage Return" }), e({ en: "Carriage Return/Newline" }), e({ en: "Colon" }), e({ en: "Comma" }), e({ en: "Exclamation Mark" }), e({ en: "Record Separator" }), e({ en: "Semicolon" }), e({ en: "Space" }), e({ en: "Tab" }), e({ en: "Underscore" }), e({ en: "Unit Separator" }), e({ en: "Vertical Bar" });
|
|
3
3
|
var t = [
|
|
4
4
|
",",
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { c as e, d as t, f as n, g as r, h as i, i as a, l as o, m as s, p as c, r as l, s as u, u as d } from "./locale-BjiFli1U.js";
|
|
2
|
+
import { i as f } from "./componentConfig.schema-Cirbf_EB.js";
|
|
3
|
+
import { t as p } from "./moduleConfig.schema-DTqGQW05.js";
|
|
4
|
+
//#region src/component/module/connector/connectorConfig.schema.ts
|
|
5
|
+
var m = f([
|
|
6
|
+
"application",
|
|
7
|
+
"curatedDataset",
|
|
8
|
+
"database",
|
|
9
|
+
"fileStore"
|
|
10
|
+
]), h = c({ label: a }), g = c({
|
|
11
|
+
authMethodId: f([
|
|
12
|
+
"apiKey",
|
|
13
|
+
"disabled",
|
|
14
|
+
"oAuth2",
|
|
15
|
+
"none"
|
|
16
|
+
]),
|
|
17
|
+
activeConnectionCount: s(n()),
|
|
18
|
+
canDescribe: s(o()),
|
|
19
|
+
id: s(r()),
|
|
20
|
+
label: s(a),
|
|
21
|
+
maxConnectionCount: t(n()),
|
|
22
|
+
params: s(e(i(r(), r())))
|
|
23
|
+
}), _ = f([
|
|
24
|
+
"abortOperation",
|
|
25
|
+
"auditObjectContent",
|
|
26
|
+
"createObject",
|
|
27
|
+
"describeConnection",
|
|
28
|
+
"dropObject",
|
|
29
|
+
"findObject",
|
|
30
|
+
"getReadableStream",
|
|
31
|
+
"getRecord",
|
|
32
|
+
"listNodes",
|
|
33
|
+
"previewObject",
|
|
34
|
+
"removeRecords",
|
|
35
|
+
"retrieveChunks",
|
|
36
|
+
"retrieveRecords",
|
|
37
|
+
"upsertRecords"
|
|
38
|
+
]), v = f([
|
|
39
|
+
"bidirectional",
|
|
40
|
+
"destination",
|
|
41
|
+
"source",
|
|
42
|
+
"unknown"
|
|
43
|
+
]), y = c({
|
|
44
|
+
...p,
|
|
45
|
+
typeId: d("connector"),
|
|
46
|
+
category: t(h),
|
|
47
|
+
categoryId: m,
|
|
48
|
+
implementations: i(r(), g),
|
|
49
|
+
operations: e(_),
|
|
50
|
+
usageId: v,
|
|
51
|
+
vendorAccountURL: t(r()),
|
|
52
|
+
vendorDocumentationURL: t(r()),
|
|
53
|
+
vendorHomeURL: t(r())
|
|
54
|
+
}), b = [
|
|
55
|
+
{
|
|
56
|
+
id: "application",
|
|
57
|
+
label: {
|
|
58
|
+
en: "Application",
|
|
59
|
+
es: "Aplicación"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
id: "curatedDataset",
|
|
64
|
+
label: {
|
|
65
|
+
en: "Curated Dataset",
|
|
66
|
+
es: "Conjunto de Datos Curado"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: "database",
|
|
71
|
+
label: {
|
|
72
|
+
en: "Database",
|
|
73
|
+
es: "Base de Datos"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: "fileStore",
|
|
78
|
+
label: {
|
|
79
|
+
en: "File Store",
|
|
80
|
+
es: "Almacén de Archivos"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
], x = (e, t = "en") => {
|
|
84
|
+
let n = b.find((t) => t.id === e);
|
|
85
|
+
return n ? { label: u(l(n.label), t) ?? n.id } : { label: e };
|
|
86
|
+
};
|
|
87
|
+
//#endregion
|
|
88
|
+
export { y as connectorConfigSchema, x as constructConnectorCategoryConfig };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i,
|
|
2
|
-
export {
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./locale-BjiFli1U.js";
|
|
2
|
+
export { o as DEFAULT_LOCALE_ID, n as SUPPORTED_LANGUAGES, i as createLabelMap, t as localeLabelSchema, e as localiseConfigs, r as partialLocalLabelSchema, a as resolveLabel };
|
package/dist/dpuse-shared.es.js
CHANGED
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
//#region src/component/module/context/contextConfig.schema.ts
|
|
5
|
-
var c = i(["list"]), l = t({
|
|
6
|
-
...o,
|
|
7
|
-
typeId: n("contextModelGroup"),
|
|
8
|
-
modelRefs: r(a),
|
|
9
|
-
order: e()
|
|
10
|
-
}), u = t({
|
|
11
|
-
...s,
|
|
12
|
-
typeId: n("context"),
|
|
13
|
-
models: r(l),
|
|
14
|
-
operations: r(c)
|
|
15
|
-
}), d = i([
|
|
16
|
-
"list",
|
|
17
|
-
"render",
|
|
18
|
-
"setColorMode"
|
|
19
|
-
]), f = t({
|
|
20
|
-
...s,
|
|
21
|
-
typeId: n("presenter"),
|
|
22
|
-
presentations: r(a),
|
|
23
|
-
operations: r(d)
|
|
24
|
-
});
|
|
25
|
-
//#endregion
|
|
26
|
-
export { u as contextConfigSchema, f as presenterConfigSchema };
|
|
1
|
+
import { t as e } from "./context-BUNJif2t.js";
|
|
2
|
+
import { t } from "./presenter-DezPXk-i.js";
|
|
3
|
+
export { e as contextConfigSchema, t as presenterConfigSchema };
|
|
@@ -388,10 +388,17 @@ var E = /* @__PURE__ */ b({
|
|
|
388
388
|
function A(e) {
|
|
389
389
|
return new Map(Object.entries(e));
|
|
390
390
|
}
|
|
391
|
-
function j(e, t
|
|
391
|
+
function j(e, t) {
|
|
392
|
+
return e.map((e) => ({
|
|
393
|
+
...e,
|
|
394
|
+
label: e.label[t] ?? e.id,
|
|
395
|
+
description: e.description[t] ?? e.id
|
|
396
|
+
}));
|
|
397
|
+
}
|
|
398
|
+
function M(e, t, n = "en") {
|
|
392
399
|
let r = e.get(t);
|
|
393
400
|
if (r !== void 0) return r;
|
|
394
401
|
if (n !== t) return e.get(n);
|
|
395
402
|
}
|
|
396
403
|
//#endregion
|
|
397
|
-
export {
|
|
404
|
+
export { T as _, j as a, h as c, v as d, y as f, C as g, S as h, E as i, g as l, x as m, k as n, D as o, b as p, A as r, M as s, O as t, _ as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as n, t as r } from "./componentConfig.schema-
|
|
1
|
+
import { g as e, p as t } from "./locale-BjiFli1U.js";
|
|
2
|
+
import { i as n, t as r } from "./componentConfig.schema-Cirbf_EB.js";
|
|
3
3
|
//#region src/component/module/moduleConfig.schema.ts
|
|
4
4
|
var i = n([
|
|
5
5
|
"app",
|
|
@@ -10,9 +10,9 @@ var i = n([
|
|
|
10
10
|
"tool"
|
|
11
11
|
]), a = {
|
|
12
12
|
...r,
|
|
13
|
-
version:
|
|
13
|
+
version: e()
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
t({
|
|
16
16
|
...a,
|
|
17
17
|
typeId: i
|
|
18
18
|
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { c as e, p as t, u as n } from "./locale-BjiFli1U.js";
|
|
2
|
+
import { i as r, r as i } from "./componentConfig.schema-Cirbf_EB.js";
|
|
3
|
+
import { t as a } from "./moduleConfig.schema-DTqGQW05.js";
|
|
4
|
+
//#region src/component/module/presenter/presenterConfig.schema.ts
|
|
5
|
+
var o = r([
|
|
6
|
+
"list",
|
|
7
|
+
"render",
|
|
8
|
+
"setColorMode"
|
|
9
|
+
]), s = t({
|
|
10
|
+
...a,
|
|
11
|
+
typeId: n("presenter"),
|
|
12
|
+
presentations: e(i),
|
|
13
|
+
operations: e(o)
|
|
14
|
+
});
|
|
15
|
+
//#endregion
|
|
16
|
+
export { s as t };
|
|
@@ -5,7 +5,7 @@ import { DataSubtypeId, DataTypeId } from '../dataView';
|
|
|
5
5
|
/**
|
|
6
6
|
* Connection configuration.
|
|
7
7
|
*/
|
|
8
|
-
interface ConnectionConfig extends ComponentConfig {
|
|
8
|
+
export interface ConnectionConfig extends ComponentConfig {
|
|
9
9
|
authorisation: Record<string, ConnectionAuthorisationConfig>;
|
|
10
10
|
connectorConfig: ConnectorConfig;
|
|
11
11
|
lastVerifiedAt: number;
|
|
@@ -18,7 +18,7 @@ export type ConnectionLocalisedConfig = Omit<ConnectionConfig, 'label' | 'descri
|
|
|
18
18
|
/**
|
|
19
19
|
* Connection authorisation configuration.
|
|
20
20
|
*/
|
|
21
|
-
interface ConnectionAuthorisationConfig {
|
|
21
|
+
export interface ConnectionAuthorisationConfig {
|
|
22
22
|
accessToken: string;
|
|
23
23
|
accountId: string;
|
|
24
24
|
expiresAt: number;
|
|
@@ -93,4 +93,4 @@ interface ObjectColumnConfig {
|
|
|
93
93
|
voidValueCount: number | undefined;
|
|
94
94
|
}
|
|
95
95
|
type StorageTypeId = 'binary' | 'boolean' | 'byte' | 'date' | 'dateTime' | 'dateTimeOffset' | 'decimal' | 'double' | 'int8' | 'int16' | 'int32' | 'int64' | 'object' | 'single' | 'string' | 'time' | 'unknown';
|
|
96
|
-
export type {
|
|
96
|
+
export type { ConnectionDescriptionConfig, ConnectionNodeConfig, ObjectColumnConfig };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { InferOutput } from 'valibot';
|
|
2
|
-
import { componentConfigSchema, componentReferenceSchema, componentStatusConfigSchema } from './componentConfig.schema';
|
|
2
|
+
import { componentConfigSchema, componentReferenceSchema, componentStatusColorIdSchema, componentStatusConfigSchema } from './componentConfig.schema';
|
|
3
3
|
import { LocaleId } from '../locale';
|
|
4
4
|
export { componentConfigSchema } from './componentConfig.schema';
|
|
5
|
-
export type { ModuleConfig, ModuleTypeId } from './module';
|
|
6
5
|
export interface Component {
|
|
7
6
|
readonly config: ComponentConfig;
|
|
8
7
|
}
|
|
@@ -13,4 +12,5 @@ export type ComponentLocalisedConfig = Omit<ComponentConfig, 'label' | 'descript
|
|
|
13
12
|
};
|
|
14
13
|
export type ComponentReference = InferOutput<typeof componentReferenceSchema>;
|
|
15
14
|
export type ComponentStatus = InferOutput<typeof componentStatusConfigSchema>;
|
|
15
|
+
export type ComponentStatusColorId = InferOutput<typeof componentStatusColorIdSchema>;
|
|
16
16
|
export declare function getComponentStatus(id: string, localeId?: LocaleId): ComponentStatus;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { InferOutput } from 'valibot';
|
|
2
2
|
import { Component } from '../..';
|
|
3
|
-
import { ToolConfig } from '
|
|
3
|
+
import { ToolConfig } from '../tool';
|
|
4
4
|
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 { EngineConnectorActionOptions, EngineUtilities } from '../../../engine';
|
|
8
|
+
export { connectorConfigSchema } from './connectorConfig.schema';
|
|
8
9
|
export interface ConnectorInterface extends Component {
|
|
9
10
|
abortController: AbortController | undefined;
|
|
10
11
|
readonly config: ConnectorConfig;
|
|
@@ -25,39 +26,27 @@ export interface ConnectorInterface extends Component {
|
|
|
25
26
|
upsertRecords?(options: UpsertRecordsOptions): Promise<void>;
|
|
26
27
|
}
|
|
27
28
|
export type ConnectorConstructor = new (engineUtilities: EngineUtilities, toolConfigs: ToolConfig[]) => ConnectorInterface;
|
|
28
|
-
export type
|
|
29
|
-
export type
|
|
30
|
-
/**
|
|
31
|
-
* Connector data pipeline usage identifiers.
|
|
32
|
-
*/
|
|
33
|
-
type ConnectorUsageId = InferOutput<typeof connectorUsageIdSchema>;
|
|
34
|
-
/**
|
|
35
|
-
* Connector configuration.
|
|
36
|
-
*/
|
|
37
|
-
type ConnectorConfig = InferOutput<typeof connectorConfigSchema>;
|
|
38
|
-
type ConnectorLocalisedConfig = Omit<ConnectorConfig, 'label' | 'description'> & {
|
|
29
|
+
export type ConnectorConfig = InferOutput<typeof connectorConfigSchema>;
|
|
30
|
+
export type ConnectorLocalisedConfig = Omit<ConnectorConfig, 'label' | 'description'> & {
|
|
39
31
|
label: string;
|
|
40
32
|
description: string;
|
|
41
33
|
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
34
|
+
type ConnectorCategoryConfig = InferOutput<typeof connectorCategoryConfigSchema>;
|
|
35
|
+
type ConnectorCategoryLocalisedConfig = Omit<ConnectorCategoryConfig, 'label'> & {
|
|
36
|
+
label: string;
|
|
37
|
+
};
|
|
38
|
+
export declare const constructConnectorCategoryConfig: (id: string, localeId?: import('../../../locale').LocaleId) => ConnectorCategoryLocalisedConfig;
|
|
39
|
+
export type ConnectorOperationName = InferOutput<typeof connectorOperationNameSchema>;
|
|
40
|
+
export interface AuditObjectContentOptions1 extends EngineConnectorActionOptions {
|
|
46
41
|
chunkSize: number | undefined;
|
|
47
42
|
encodingId: string;
|
|
48
43
|
path: string;
|
|
49
44
|
valueDelimiterId: ValueDelimiterId;
|
|
50
45
|
}
|
|
51
|
-
|
|
52
|
-
*
|
|
53
|
-
*/
|
|
54
|
-
interface AuditObjectContentResult1 {
|
|
46
|
+
export interface AuditObjectContentResult1 {
|
|
55
47
|
contentAuditConfig: ContentAuditConfig;
|
|
56
48
|
}
|
|
57
|
-
|
|
58
|
-
* Audit object content options.
|
|
59
|
-
*/
|
|
60
|
-
interface AuditObjectContentOptions extends EngineConnectorActionOptions {
|
|
49
|
+
export interface AuditObjectContentOptions extends EngineConnectorActionOptions {
|
|
61
50
|
chunkSize: number | undefined;
|
|
62
51
|
encodingId: string;
|
|
63
52
|
parsingToolName: string | undefined;
|
|
@@ -65,154 +54,83 @@ interface AuditObjectContentOptions extends EngineConnectorActionOptions {
|
|
|
65
54
|
supportsTransferableStreams: boolean;
|
|
66
55
|
valueDelimiterId: ValueDelimiterId;
|
|
67
56
|
}
|
|
68
|
-
|
|
69
|
-
* Audit object content result.
|
|
70
|
-
*/
|
|
71
|
-
interface AuditObjectContentResult {
|
|
57
|
+
export interface AuditObjectContentResult {
|
|
72
58
|
processedRowCount: number;
|
|
73
59
|
durationMs: number;
|
|
74
60
|
}
|
|
75
|
-
|
|
76
|
-
* Create object options.
|
|
77
|
-
*/
|
|
78
|
-
interface CreateObjectOptions extends EngineConnectorActionOptions {
|
|
61
|
+
export interface CreateObjectOptions extends EngineConnectorActionOptions {
|
|
79
62
|
path: string;
|
|
80
63
|
structure: string;
|
|
81
64
|
}
|
|
82
|
-
|
|
83
|
-
* Describe connection options and result.
|
|
84
|
-
*/
|
|
85
|
-
type DescribeConnectionOptions = EngineConnectorActionOptions;
|
|
65
|
+
export type DescribeConnectionOptions = EngineConnectorActionOptions;
|
|
86
66
|
interface DescribeConnectionResult {
|
|
87
67
|
descriptionConfig: ConnectionDescriptionConfig;
|
|
88
68
|
}
|
|
89
|
-
|
|
90
|
-
* Drop object options.
|
|
91
|
-
*/
|
|
92
|
-
interface DropObjectOptions extends EngineConnectorActionOptions {
|
|
69
|
+
export interface DropObjectOptions extends EngineConnectorActionOptions {
|
|
93
70
|
path: string;
|
|
94
71
|
}
|
|
95
|
-
|
|
96
|
-
* Find object options and result.
|
|
97
|
-
*/
|
|
98
|
-
interface FindObjectOptions extends EngineConnectorActionOptions {
|
|
72
|
+
export interface FindObjectOptions extends EngineConnectorActionOptions {
|
|
99
73
|
storeId: string | undefined;
|
|
100
74
|
nodeId: string;
|
|
101
75
|
}
|
|
102
|
-
interface FindObjectResult {
|
|
76
|
+
export interface FindObjectResult {
|
|
103
77
|
path: string | undefined;
|
|
104
78
|
}
|
|
105
|
-
|
|
106
|
-
* Get readable stream options.
|
|
107
|
-
*/
|
|
108
|
-
interface GetReadableStreamOptions extends EngineConnectorActionOptions {
|
|
79
|
+
export interface GetReadableStreamOptions extends EngineConnectorActionOptions {
|
|
109
80
|
id: string;
|
|
110
81
|
path: string;
|
|
111
82
|
}
|
|
112
|
-
|
|
113
|
-
* Get record options and result.
|
|
114
|
-
*/
|
|
115
|
-
interface GetRecordOptions extends EngineConnectorActionOptions {
|
|
83
|
+
export interface GetRecordOptions extends EngineConnectorActionOptions {
|
|
116
84
|
id: string;
|
|
117
85
|
path: string;
|
|
118
86
|
}
|
|
119
|
-
interface GetRecordResult {
|
|
87
|
+
export interface GetRecordResult {
|
|
120
88
|
record?: string[] | Record<string, unknown>;
|
|
121
89
|
}
|
|
122
|
-
|
|
123
|
-
* List nodes options and result.
|
|
124
|
-
*/
|
|
125
|
-
interface ListNodesOptions extends EngineConnectorActionOptions {
|
|
90
|
+
export interface ListNodesOptions extends EngineConnectorActionOptions {
|
|
126
91
|
folderPath: string;
|
|
127
92
|
limit?: number;
|
|
128
93
|
offset?: number;
|
|
129
94
|
totalCount?: number;
|
|
130
95
|
}
|
|
131
|
-
interface ListNodesResult {
|
|
96
|
+
export interface ListNodesResult {
|
|
132
97
|
cursor: string | number | undefined;
|
|
133
98
|
connectionNodeConfigs: ConnectionNodeConfig[];
|
|
134
99
|
isMore: boolean;
|
|
135
100
|
totalCount: number;
|
|
136
101
|
}
|
|
137
|
-
|
|
138
|
-
* Preview object options.
|
|
139
|
-
*/
|
|
140
|
-
interface PreviewObjectOptions extends EngineConnectorActionOptions {
|
|
102
|
+
export interface PreviewObjectOptions extends EngineConnectorActionOptions {
|
|
141
103
|
chunkSize: number | undefined;
|
|
142
104
|
extension: string | undefined;
|
|
143
105
|
path: string;
|
|
144
106
|
}
|
|
145
|
-
|
|
146
|
-
* Remove records options.
|
|
147
|
-
*/
|
|
148
|
-
interface RemoveRecordsOptions extends EngineConnectorActionOptions {
|
|
107
|
+
export interface RemoveRecordsOptions extends EngineConnectorActionOptions {
|
|
149
108
|
keys: string[];
|
|
150
109
|
path: string;
|
|
151
110
|
}
|
|
152
|
-
|
|
153
|
-
* Retrieve chunks options.
|
|
154
|
-
*/
|
|
155
|
-
interface RetrieveChunksOptions extends EngineConnectorActionOptions {
|
|
111
|
+
export interface RetrieveChunksOptions extends EngineConnectorActionOptions {
|
|
156
112
|
chunkSize: number | undefined;
|
|
157
113
|
encodingId: string;
|
|
158
114
|
path: string;
|
|
159
115
|
valueDelimiterId: ValueDelimiterId;
|
|
160
116
|
}
|
|
161
|
-
|
|
162
|
-
* Retrieve records options and summary.
|
|
163
|
-
*/
|
|
164
|
-
interface RetrieveRecordsOptions extends EngineConnectorActionOptions {
|
|
117
|
+
export interface RetrieveRecordsOptions extends EngineConnectorActionOptions {
|
|
165
118
|
chunkSize: number | undefined;
|
|
166
119
|
encodingId: string;
|
|
167
120
|
path: string;
|
|
168
121
|
valueDelimiterId: ValueDelimiterId;
|
|
169
122
|
}
|
|
170
|
-
interface RetrieveRecordsSummary {
|
|
171
|
-
/**
|
|
172
|
-
* Number of processed bytes.
|
|
173
|
-
*/
|
|
123
|
+
export interface RetrieveRecordsSummary {
|
|
174
124
|
byteCount: number;
|
|
175
|
-
/**
|
|
176
|
-
* Count the number of lines being fully commented.
|
|
177
|
-
*/
|
|
178
125
|
commentLineCount: number;
|
|
179
|
-
/**
|
|
180
|
-
* Count the number of processed empty lines; work only with the skip_empty_lines option or an error will be thrown
|
|
181
|
-
* if an empty line is found.
|
|
182
|
-
*/
|
|
183
126
|
emptyLineCount: number;
|
|
184
|
-
/**
|
|
185
|
-
* Number of lines encountered in the source dataset, start at 1 for the first line.
|
|
186
|
-
*/
|
|
187
127
|
lineCount: number;
|
|
188
|
-
/**
|
|
189
|
-
* Number of non uniform records when relax_column_count is true.
|
|
190
|
-
*/
|
|
191
128
|
nonUniformRecordCount: number;
|
|
192
|
-
/**
|
|
193
|
-
* Count the number of processed records.
|
|
194
|
-
*/
|
|
195
129
|
recordCount: number;
|
|
196
130
|
}
|
|
197
|
-
|
|
198
|
-
* Upsert records options.
|
|
199
|
-
*/
|
|
200
|
-
interface UpsertRecordsOptions extends EngineConnectorActionOptions {
|
|
131
|
+
export interface UpsertRecordsOptions extends EngineConnectorActionOptions {
|
|
201
132
|
records: Record<string, unknown>[];
|
|
202
133
|
path: string;
|
|
203
134
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
*/
|
|
207
|
-
type ConnectorCategoryConfig = InferOutput<typeof connectorCategoryConfigSchema>;
|
|
208
|
-
type ConnectorCategoryLocalisedConfig = Omit<ConnectorCategoryConfig, 'label'> & {
|
|
209
|
-
label: string;
|
|
210
|
-
};
|
|
211
|
-
/**
|
|
212
|
-
* Construct connector category configuration.
|
|
213
|
-
*/
|
|
214
|
-
declare const constructConnectorCategoryConfig: (id: string, localeId?: import('../../../locale').LocaleId) => ConnectorCategoryLocalisedConfig;
|
|
215
|
-
export { connectorConfigSchema } from './connectorConfig.schema';
|
|
216
|
-
export { constructConnectorCategoryConfig };
|
|
217
|
-
export type { ConnectionConfig, ConnectionLocalisedConfig, ConnectionNodeConfig, ObjectColumnConfig } from '../../connection';
|
|
218
|
-
export type { AuditObjectContentOptions1, AuditObjectContentResult1, AuditObjectContentOptions, AuditObjectContentResult, ConnectorConfig, ConnectorLocalisedConfig, ConnectorUsageId, CreateObjectOptions, DropObjectOptions, FindObjectOptions, FindObjectResult, GetReadableStreamOptions, GetRecordOptions, GetRecordResult, ListNodesOptions, ListNodesResult, PreviewObjectOptions, RemoveRecordsOptions, RetrieveChunksOptions, RetrieveRecordsOptions, RetrieveRecordsSummary, UpsertRecordsOptions };
|
|
135
|
+
export type RetrievalTypeId = 'jsonRecordArray' | 'parsingRecordArray';
|
|
136
|
+
export type ConnectorUsageId = InferOutput<typeof connectorUsageIdSchema>;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { InferOutput } from 'valibot';
|
|
2
2
|
import { moduleConfigSchema, moduleTypeIdSchema } from './moduleConfig.schema';
|
|
3
|
-
|
|
4
|
-
type
|
|
5
|
-
/** Module type identifier. */
|
|
6
|
-
type ModuleTypeId = InferOutput<typeof moduleTypeIdSchema>;
|
|
7
|
-
export type { ModuleConfig, ModuleTypeId };
|
|
3
|
+
export type ModuleConfig = InferOutput<typeof moduleConfigSchema>;
|
|
4
|
+
export type ModuleTypeId = InferOutput<typeof moduleTypeIdSchema>;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Presenter schema (drafted by Copilot).
|
|
3
|
-
*/
|
|
4
1
|
export declare const presenterConfigSchema: import('valibot').ObjectSchema<{
|
|
5
2
|
readonly typeId: import('valibot').LiteralSchema<"presenter", undefined>;
|
|
6
3
|
readonly presentations: import('valibot').ArraySchema<import('valibot').ObjectSchema<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EncodingTypeConfig } from '../encoding';
|
|
2
2
|
import { ModuleConfig } from '../component/module';
|
|
3
3
|
import { ObjectColumnConfig } from '../component/module/connector';
|
|
4
|
-
import { ToolConfig } from '../component/tool';
|
|
4
|
+
import { ToolConfig } from '../component/module/tool';
|
|
5
5
|
import { ComponentConfig, ComponentLocalisedConfig } from '../component';
|
|
6
6
|
import { InferenceRecord, InferenceSummary, ParsingRecord } from '../component/dataView';
|
|
7
7
|
export interface EngineRuntime {
|
|
@@ -17,4 +17,9 @@ export declare const SUPPORTED_LANGUAGES: {
|
|
|
17
17
|
label: string;
|
|
18
18
|
}[];
|
|
19
19
|
export declare function createLabelMap(labels: Record<string, string>): LocaleLabelMap;
|
|
20
|
+
export declare function localiseConfigs<T>(configs: {
|
|
21
|
+
id: string;
|
|
22
|
+
label: LocaleLabel;
|
|
23
|
+
description: LocaleLabel;
|
|
24
|
+
}[], localeId: LocaleId): T[];
|
|
20
25
|
export declare function resolveLabel(labels: LocaleLabelMap, localeId: string, fallbackLocaleId?: LocaleId): string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dpuse/dpuse-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.623",
|
|
4
4
|
"description": "Common constants, types and utilities used across all DPUse projects.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Jonathan Terrell <terrell.jm@gmail.com>",
|
|
@@ -34,16 +34,24 @@
|
|
|
34
34
|
"types": "./dist/types/src/component/dataView/index.d.ts"
|
|
35
35
|
},
|
|
36
36
|
"./component/module": {
|
|
37
|
-
"import": "./dist/dpuse-shared-
|
|
37
|
+
"import": "./dist/dpuse-shared-componentModule.es.js",
|
|
38
38
|
"types": "./dist/types/src/component/module/index.d.ts"
|
|
39
39
|
},
|
|
40
40
|
"./component/module/connector": {
|
|
41
|
-
"import": "./dist/dpuse-shared-
|
|
41
|
+
"import": "./dist/dpuse-shared-componentModuleConnector.es.js",
|
|
42
42
|
"types": "./dist/types/src/component/module/connector/index.d.ts"
|
|
43
43
|
},
|
|
44
|
-
"./component/
|
|
45
|
-
"import": "./dist/dpuse-shared-
|
|
46
|
-
"types": "./dist/types/src/component/
|
|
44
|
+
"./component/module/context": {
|
|
45
|
+
"import": "./dist/dpuse-shared-componentModuleContext.es.js",
|
|
46
|
+
"types": "./dist/types/src/component/module/context/index.d.ts"
|
|
47
|
+
},
|
|
48
|
+
"./component/module/presenter": {
|
|
49
|
+
"import": "./dist/dpuse-shared-componentModulePresenter.es.js",
|
|
50
|
+
"types": "./dist/types/src/component/module/presenter/index.d.ts"
|
|
51
|
+
},
|
|
52
|
+
"./component/module/tool": {
|
|
53
|
+
"import": "./dist/dpuse-shared-componentModuleTool.es.js",
|
|
54
|
+
"types": "./dist/types/src/component/module/tool/index.d.ts"
|
|
47
55
|
},
|
|
48
56
|
"./encoding": {
|
|
49
57
|
"import": "./dist/dpuse-shared-encoding.es.js",
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { c as e, d as t, f as n, h as r, i, l as a, m as o, o as s, p as c, r as l, s as u, u as d } from "./locale-CrC0-wPd.js";
|
|
2
|
-
import { i as f } from "./componentConfig.schema-Bvr66FJf.js";
|
|
3
|
-
import { t as p } from "./moduleConfig.schema-Ct8Q53dE.js";
|
|
4
|
-
//#region src/component/module/connector/connectorConfig.schema.ts
|
|
5
|
-
var m = f([
|
|
6
|
-
"application",
|
|
7
|
-
"curatedDataset",
|
|
8
|
-
"database",
|
|
9
|
-
"fileStore"
|
|
10
|
-
]), h = n({ label: i }), g = n({
|
|
11
|
-
authMethodId: f([
|
|
12
|
-
"apiKey",
|
|
13
|
-
"disabled",
|
|
14
|
-
"oAuth2",
|
|
15
|
-
"none"
|
|
16
|
-
]),
|
|
17
|
-
activeConnectionCount: c(t()),
|
|
18
|
-
canDescribe: c(e()),
|
|
19
|
-
id: c(r()),
|
|
20
|
-
label: c(i),
|
|
21
|
-
maxConnectionCount: d(t()),
|
|
22
|
-
params: c(u(o(r(), r())))
|
|
23
|
-
}), _ = f([
|
|
24
|
-
"abortOperation",
|
|
25
|
-
"auditObjectContent",
|
|
26
|
-
"createObject",
|
|
27
|
-
"describeConnection",
|
|
28
|
-
"dropObject",
|
|
29
|
-
"findObject",
|
|
30
|
-
"getReadableStream",
|
|
31
|
-
"getRecord",
|
|
32
|
-
"listNodes",
|
|
33
|
-
"previewObject",
|
|
34
|
-
"removeRecords",
|
|
35
|
-
"retrieveChunks",
|
|
36
|
-
"retrieveRecords",
|
|
37
|
-
"upsertRecords"
|
|
38
|
-
]), v = f([
|
|
39
|
-
"bidirectional",
|
|
40
|
-
"destination",
|
|
41
|
-
"source",
|
|
42
|
-
"unknown"
|
|
43
|
-
]), y = n({
|
|
44
|
-
...p,
|
|
45
|
-
typeId: a("connector"),
|
|
46
|
-
category: d(h),
|
|
47
|
-
categoryId: m,
|
|
48
|
-
implementations: o(r(), g),
|
|
49
|
-
operations: u(_),
|
|
50
|
-
usageId: v,
|
|
51
|
-
vendorAccountURL: d(r()),
|
|
52
|
-
vendorDocumentationURL: d(r()),
|
|
53
|
-
vendorHomeURL: d(r())
|
|
54
|
-
}), b = [
|
|
55
|
-
{
|
|
56
|
-
id: "application",
|
|
57
|
-
label: { en: "Application" }
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
id: "curatedDataset",
|
|
61
|
-
label: { en: "Curated Dataset" }
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
id: "database",
|
|
65
|
-
label: { en: "Database" }
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
id: "fileStore",
|
|
69
|
-
label: { en: "File Store" }
|
|
70
|
-
}
|
|
71
|
-
], x = (e, t = "en") => {
|
|
72
|
-
let n = b.find((t) => t.id === e);
|
|
73
|
-
return n ? { label: s(l(n.label), t) ?? n.id } : { label: e };
|
|
74
|
-
};
|
|
75
|
-
//#endregion
|
|
76
|
-
export { y as connectorConfigSchema, x as constructConnectorCategoryConfig };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ModuleConfig } from '../module';
|
|
2
|
-
/**
|
|
3
|
-
* Tool configuration.
|
|
4
|
-
*/
|
|
5
|
-
interface ToolConfig extends ModuleConfig {
|
|
6
|
-
typeId: 'tool';
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Load tool.
|
|
10
|
-
*/
|
|
11
|
-
declare function loadTool<T>(toolConfigs: ToolConfig[], toolId: string): Promise<T>;
|
|
12
|
-
export { loadTool };
|
|
13
|
-
export type { ToolConfig };
|
|
File without changes
|
|
File without changes
|