@dpuse/dpuse-shared 0.3.740 → 0.3.742
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/README.md
CHANGED
|
@@ -144,9 +144,9 @@ _Note: Sonda's Vite reports currently exclude CSS files, since Vite does not gen
|
|
|
144
144
|
|:------ |:-----------|
|
|
145
145
|
| dist/componentConfig.schema-DzuoA1f0.js | 10.9 kB · brotli 2.3 kB |
|
|
146
146
|
| dist/dpuse-shared-encoding.es.js | 6.8 kB · brotli 953 B |
|
|
147
|
+
| dist/dpuse-shared-componentModuleConnector.es.js | 3.6 kB · brotli 1.2 kB |
|
|
147
148
|
| dist/dpuse-shared-utilities.es.js | 3.6 kB · brotli 1.2 kB |
|
|
148
149
|
| dist/dpuse-shared-errors.es.js | 3.5 kB · brotli 1.1 kB |
|
|
149
|
-
| dist/dpuse-shared-componentModuleConnector.es.js | 3.0 kB · brotli 1.1 kB |
|
|
150
150
|
| dist/dpuse-shared-component.es.js | 1.3 kB · brotli 458 B |
|
|
151
151
|
| dist/dpuse-shared-locale.es.js | 859 B · brotli 381 B |
|
|
152
152
|
| dist/dpuse-shared-componentDataView.es.js | 722 B · brotli 310 B |
|
|
@@ -23,7 +23,12 @@ var m = n([
|
|
|
23
23
|
"curatedDataset",
|
|
24
24
|
"database",
|
|
25
25
|
"fileStore"
|
|
26
|
-
]), g = i({ label: o }), _ =
|
|
26
|
+
]), g = i({ label: o }), _ = n([
|
|
27
|
+
"bidirectional",
|
|
28
|
+
"destination",
|
|
29
|
+
"source",
|
|
30
|
+
"unknown"
|
|
31
|
+
]), v = i({ label: o }), y = i({
|
|
27
32
|
authMethodId: n([
|
|
28
33
|
"apiKey",
|
|
29
34
|
"disabled",
|
|
@@ -36,17 +41,19 @@ var m = n([
|
|
|
36
41
|
label: a(o),
|
|
37
42
|
maxConnectionCount: s(f()),
|
|
38
43
|
params: a(l(u(c(), c())))
|
|
39
|
-
}),
|
|
44
|
+
}), b = i({
|
|
40
45
|
typeId: r("connector"),
|
|
41
46
|
...p,
|
|
42
47
|
actionNames: l(m),
|
|
43
48
|
category: s(g),
|
|
44
49
|
categoryId: h,
|
|
45
|
-
implementations: u(c(),
|
|
50
|
+
implementations: u(c(), y),
|
|
51
|
+
usage: s(v),
|
|
52
|
+
usageId: s(_),
|
|
46
53
|
vendorAccountURL: s(c()),
|
|
47
54
|
vendorDocumentationURL: s(c()),
|
|
48
55
|
vendorHomeURL: s(c())
|
|
49
|
-
}),
|
|
56
|
+
}), x = [
|
|
50
57
|
{
|
|
51
58
|
id: "application",
|
|
52
59
|
label: {
|
|
@@ -75,7 +82,7 @@ var m = n([
|
|
|
75
82
|
es: "Almacén de Archivos"
|
|
76
83
|
}
|
|
77
84
|
}
|
|
78
|
-
],
|
|
85
|
+
], S = {
|
|
79
86
|
abortOperation: "Abort Operation",
|
|
80
87
|
auditObjectContent: "Audit Object Content",
|
|
81
88
|
createObject: "Create Object",
|
|
@@ -91,12 +98,41 @@ var m = n([
|
|
|
91
98
|
retrieveChunks: "Retrieve Chunks",
|
|
92
99
|
retrieveRecords: "Retrieve Records",
|
|
93
100
|
upsertRecords: "Upsert Records"
|
|
94
|
-
},
|
|
101
|
+
}, C = [
|
|
102
|
+
{
|
|
103
|
+
id: "bidirectional",
|
|
104
|
+
label: {
|
|
105
|
+
en: "Bidirectional",
|
|
106
|
+
es: "Bidireccional"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
id: "destination",
|
|
111
|
+
label: {
|
|
112
|
+
en: "Destination",
|
|
113
|
+
es: "Destino"
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
id: "source",
|
|
118
|
+
label: {
|
|
119
|
+
en: "Source",
|
|
120
|
+
es: "Origen"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
id: "unknown",
|
|
125
|
+
label: {
|
|
126
|
+
en: "Unknown",
|
|
127
|
+
es: "Desconocido"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
], w = /* @__PURE__ */ new Set([
|
|
95
131
|
"createObject",
|
|
96
132
|
"dropObject",
|
|
97
133
|
"removeRecords",
|
|
98
134
|
"upsertRecords"
|
|
99
|
-
]),
|
|
135
|
+
]), T = /* @__PURE__ */ new Set([
|
|
100
136
|
"auditObjectContent",
|
|
101
137
|
"findObject",
|
|
102
138
|
"getInfo",
|
|
@@ -107,13 +143,22 @@ var m = n([
|
|
|
107
143
|
"retrieveChunks",
|
|
108
144
|
"retrieveRecords"
|
|
109
145
|
]);
|
|
110
|
-
function
|
|
146
|
+
function E(e) {
|
|
111
147
|
let t = !1, n = !1;
|
|
112
|
-
for (let r of e)
|
|
148
|
+
for (let r of e) T.has(r) && (t = !0), w.has(r) && (n = !0);
|
|
113
149
|
return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
|
|
114
150
|
}
|
|
115
|
-
var
|
|
116
|
-
let i =
|
|
151
|
+
var D = (n, r = "en") => {
|
|
152
|
+
let i = x.find((e) => e.id === n);
|
|
153
|
+
return i ? {
|
|
154
|
+
label: t(e(i.label), r) ?? i.id,
|
|
155
|
+
description: []
|
|
156
|
+
} : {
|
|
157
|
+
label: n,
|
|
158
|
+
description: []
|
|
159
|
+
};
|
|
160
|
+
}, O = (n, r = "en") => {
|
|
161
|
+
let i = C.find((e) => e.id === n);
|
|
117
162
|
return i ? {
|
|
118
163
|
label: t(e(i.label), r) ?? i.id,
|
|
119
164
|
description: []
|
|
@@ -122,11 +167,11 @@ var w = (n, r = "en") => {
|
|
|
122
167
|
description: []
|
|
123
168
|
};
|
|
124
169
|
};
|
|
125
|
-
function
|
|
170
|
+
function k(e) {
|
|
126
171
|
let t = new Set(e), n = "|Action|Supported|\n";
|
|
127
172
|
n += "|:----|:-------:|\n";
|
|
128
|
-
for (let e of Object.keys(
|
|
173
|
+
for (let e of Object.keys(S)) n += `| ${S[e]} | ${t.has(e) ? "✓" : ""} |\n`;
|
|
129
174
|
return n;
|
|
130
175
|
}
|
|
131
176
|
//#endregion
|
|
132
|
-
export {
|
|
177
|
+
export { S as CONNECTOR_ACTION_NAME_MAP, b as connectorConfigSchema, D as constructConnectorCategoryConfig, O as constructConnectorUsageConfig, E as determineConnectorUsageId, k as getConnectorActionsTable };
|
|
@@ -9,6 +9,13 @@ export declare const connectorCategoryConfigSchema: import('valibot').ObjectSche
|
|
|
9
9
|
readonly es: import('valibot').StringSchema<undefined>;
|
|
10
10
|
}, undefined>;
|
|
11
11
|
}, undefined>;
|
|
12
|
+
export 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>;
|
|
13
|
+
export declare const connectorUsageConfigSchema: import('valibot').ObjectSchema<{
|
|
14
|
+
readonly label: import('valibot').ObjectSchema<{
|
|
15
|
+
readonly en: import('valibot').StringSchema<undefined>;
|
|
16
|
+
readonly es: import('valibot').StringSchema<undefined>;
|
|
17
|
+
}, undefined>;
|
|
18
|
+
}, undefined>;
|
|
12
19
|
export declare const connectorConfigSchema: import('valibot').ObjectSchema<{
|
|
13
20
|
readonly actionNames: import('valibot').ArraySchema<import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"abortOperation", undefined>, import('valibot').LiteralSchema<"auditObjectContent", undefined>, import('valibot').LiteralSchema<"createObject", undefined>, import('valibot').LiteralSchema<"describeConnection", undefined>, import('valibot').LiteralSchema<"dropObject", undefined>, import('valibot').LiteralSchema<"findObject", undefined>, import('valibot').LiteralSchema<"getInfo", 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>;
|
|
14
21
|
readonly category: import('valibot').NullableSchema<import('valibot').ObjectSchema<{
|
|
@@ -30,6 +37,13 @@ export declare const connectorConfigSchema: import('valibot').ObjectSchema<{
|
|
|
30
37
|
readonly maxConnectionCount: import('valibot').NullableSchema<import('valibot').NumberSchema<undefined>, undefined>;
|
|
31
38
|
readonly params: import('valibot').OptionalSchema<import('valibot').ArraySchema<import('valibot').RecordSchema<import('valibot').StringSchema<undefined>, import('valibot').StringSchema<undefined>, undefined>, undefined>, undefined>;
|
|
32
39
|
}, undefined>, undefined>;
|
|
40
|
+
readonly usage: import('valibot').NullableSchema<import('valibot').ObjectSchema<{
|
|
41
|
+
readonly label: import('valibot').ObjectSchema<{
|
|
42
|
+
readonly en: import('valibot').StringSchema<undefined>;
|
|
43
|
+
readonly es: import('valibot').StringSchema<undefined>;
|
|
44
|
+
}, undefined>;
|
|
45
|
+
}, undefined>, undefined>;
|
|
46
|
+
readonly usageId: import('valibot').NullableSchema<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>, undefined>;
|
|
33
47
|
readonly vendorAccountURL: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
34
48
|
readonly vendorDocumentationURL: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
35
49
|
readonly vendorHomeURL: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
@@ -3,7 +3,7 @@ import { Component } from '../..';
|
|
|
3
3
|
import { EngineConnectorActionOptions } from '../engine';
|
|
4
4
|
import { ToolConfig } from '../tool';
|
|
5
5
|
import { ConnectionDescriptionConfig, ConnectionNodeConfig, ObjectColumnConfig } from '../../connection';
|
|
6
|
-
import { connectorActionNameSchema, connectorCategoryConfigSchema, connectorConfigSchema } from './connectorConfig.schema';
|
|
6
|
+
import { connectorActionNameSchema, connectorCategoryConfigSchema, connectorConfigSchema, connectorUsageConfigSchema, connectorUsageIdSchema } from './connectorConfig.schema';
|
|
7
7
|
import { ContentAuditConfig, InferenceRecord, InferenceSummary, ParsingRecord, PreviewConfig, ValueDelimiterId } from '../../dataView';
|
|
8
8
|
import { LocalisedConfig } from '../../../locale';
|
|
9
9
|
export { connectorConfigSchema } from './connectorConfig.schema';
|
|
@@ -36,6 +36,7 @@ export interface ConnectorUtilities {
|
|
|
36
36
|
}
|
|
37
37
|
export type ConnectorConfig = InferOutput<typeof connectorConfigSchema>;
|
|
38
38
|
type ConnectorCategoryConfig = InferOutput<typeof connectorCategoryConfigSchema>;
|
|
39
|
+
type ConnectorUsageConfig = InferOutput<typeof connectorUsageConfigSchema>;
|
|
39
40
|
export interface AuditObjectContentOptions1 extends EngineConnectorActionOptions {
|
|
40
41
|
chunkSize: number | undefined;
|
|
41
42
|
encodingId: string;
|
|
@@ -139,7 +140,8 @@ export interface UpsertRecordsOptions extends EngineConnectorActionOptions {
|
|
|
139
140
|
path: string;
|
|
140
141
|
}
|
|
141
142
|
export declare const CONNECTOR_ACTION_NAME_MAP: Record<ConnectorActionName, string>;
|
|
142
|
-
export type ConnectorUsageId =
|
|
143
|
+
export type ConnectorUsageId = InferOutput<typeof connectorUsageIdSchema>;
|
|
143
144
|
export declare function determineConnectorUsageId(actionNames: ConnectorActionName[]): ConnectorUsageId;
|
|
144
145
|
export declare const constructConnectorCategoryConfig: (id: string, localeId?: import('../../../locale').LocaleId) => LocalisedConfig<ConnectorCategoryConfig>;
|
|
146
|
+
export declare const constructConnectorUsageConfig: (id: string, localeId?: import('../../../locale').LocaleId) => LocalisedConfig<ConnectorUsageConfig>;
|
|
145
147
|
export declare function getConnectorActionsTable(supported: ConnectorActionName[]): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dpuse/dpuse-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.742",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Common constants, types and utilities used across all DPUse projects.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"test": "node -e \"import('@dpuse/dpuse-development').then(m => m.testProject())\""
|
|
140
140
|
},
|
|
141
141
|
"devDependencies": {
|
|
142
|
-
"@dpuse/dpuse-development": "^0.3.
|
|
142
|
+
"@dpuse/dpuse-development": "^0.3.688",
|
|
143
143
|
"@dpuse/eslint-config-dpuse": "^1.0.113",
|
|
144
144
|
"@types/node": "^26.1.1",
|
|
145
145
|
"eslint": "^10.7.0",
|