@datapos/datapos-shared 0.3.330 → 0.3.332
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.es.js +102 -104
- package/dist/types/src/component/connector/connectorConfig.schema.d.ts +24 -3
- package/dist/types/src/component/connector/index.d.ts +42 -44
- package/dist/types/src/component/context/contextConfig.schema.d.ts +1 -2
- package/dist/types/src/component/presenter/presenterConfig.schema.d.ts +1 -2
- package/dist/types/src/index.d.ts +1 -1
- package/package.json +3 -3
|
@@ -131,11 +131,11 @@ function B(e) {
|
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
133
|
// @__NO_SIDE_EFFECTS__
|
|
134
|
-
function
|
|
134
|
+
function D(e, r) {
|
|
135
135
|
return {
|
|
136
136
|
kind: "schema",
|
|
137
137
|
type: "literal",
|
|
138
|
-
reference:
|
|
138
|
+
reference: D,
|
|
139
139
|
expects: /* @__PURE__ */ U(e),
|
|
140
140
|
async: !1,
|
|
141
141
|
literal: e,
|
|
@@ -167,11 +167,11 @@ function y(e, r) {
|
|
|
167
167
|
};
|
|
168
168
|
}
|
|
169
169
|
// @__NO_SIDE_EFFECTS__
|
|
170
|
-
function
|
|
170
|
+
function k(e) {
|
|
171
171
|
return {
|
|
172
172
|
kind: "schema",
|
|
173
173
|
type: "number",
|
|
174
|
-
reference:
|
|
174
|
+
reference: k,
|
|
175
175
|
expects: "number",
|
|
176
176
|
async: !1,
|
|
177
177
|
message: e,
|
|
@@ -374,12 +374,12 @@ function G(e, r) {
|
|
|
374
374
|
}
|
|
375
375
|
};
|
|
376
376
|
}
|
|
377
|
-
const v = (e) => /* @__PURE__ */ G(e.map((r) => /* @__PURE__ */
|
|
377
|
+
const v = (e) => /* @__PURE__ */ G(e.map((r) => /* @__PURE__ */ D(r))), te = /* @__PURE__ */ b({
|
|
378
378
|
"en-au": /* @__PURE__ */ l(),
|
|
379
379
|
"en-gb": /* @__PURE__ */ l(),
|
|
380
380
|
"en-us": /* @__PURE__ */ l(),
|
|
381
381
|
"es-es": /* @__PURE__ */ l()
|
|
382
|
-
}),
|
|
382
|
+
}), C = /* @__PURE__ */ b({
|
|
383
383
|
"en-au": /* @__PURE__ */ f(/* @__PURE__ */ l()),
|
|
384
384
|
"en-gb": /* @__PURE__ */ f(/* @__PURE__ */ l()),
|
|
385
385
|
"en-us": /* @__PURE__ */ f(/* @__PURE__ */ l()),
|
|
@@ -426,15 +426,15 @@ const oe = /* @__PURE__ */ b({
|
|
|
426
426
|
label: /* @__PURE__ */ l()
|
|
427
427
|
}), T = {
|
|
428
428
|
id: /* @__PURE__ */ l(),
|
|
429
|
-
label:
|
|
430
|
-
description:
|
|
431
|
-
firstCreatedAt: /* @__PURE__ */ f(/* @__PURE__ */
|
|
429
|
+
label: C,
|
|
430
|
+
description: C,
|
|
431
|
+
firstCreatedAt: /* @__PURE__ */ f(/* @__PURE__ */ k()),
|
|
432
432
|
icon: /* @__PURE__ */ y(/* @__PURE__ */ l()),
|
|
433
433
|
iconDark: /* @__PURE__ */ y(/* @__PURE__ */ l()),
|
|
434
|
-
lastUpdatedAt: /* @__PURE__ */ y(/* @__PURE__ */
|
|
434
|
+
lastUpdatedAt: /* @__PURE__ */ y(/* @__PURE__ */ k()),
|
|
435
435
|
status: /* @__PURE__ */ y(oe),
|
|
436
436
|
statusId: ne
|
|
437
|
-
},
|
|
437
|
+
}, Se = /* @__PURE__ */ b({
|
|
438
438
|
...T,
|
|
439
439
|
typeId: se
|
|
440
440
|
}), $ = {
|
|
@@ -442,11 +442,11 @@ const oe = /* @__PURE__ */ b({
|
|
|
442
442
|
version: /* @__PURE__ */ l()
|
|
443
443
|
}, P = /* @__PURE__ */ b({
|
|
444
444
|
id: /* @__PURE__ */ l(),
|
|
445
|
-
label:
|
|
446
|
-
description:
|
|
445
|
+
label: C,
|
|
446
|
+
description: C,
|
|
447
447
|
icon: /* @__PURE__ */ y(/* @__PURE__ */ l()),
|
|
448
448
|
iconDark: /* @__PURE__ */ y(/* @__PURE__ */ l()),
|
|
449
|
-
order: /* @__PURE__ */
|
|
449
|
+
order: /* @__PURE__ */ k(),
|
|
450
450
|
path: /* @__PURE__ */ l()
|
|
451
451
|
}), E = (e) => {
|
|
452
452
|
const r = Object.entries(e).filter((t) => typeof t[1] == "string");
|
|
@@ -473,57 +473,55 @@ const oe = /* @__PURE__ */ b({
|
|
|
473
473
|
return { id: t.id, color: t.color, label: n ?? t.id };
|
|
474
474
|
}
|
|
475
475
|
return { id: e, color: "other", label: e };
|
|
476
|
-
}, le = v(["application", "curatedDataset", "database", "fileStore"]),
|
|
476
|
+
}, le = v(["apiKey", "disabled", "oAuth2", "none"]), ce = v(["application", "curatedDataset", "database", "fileStore"]), ue = v([
|
|
477
477
|
"abortOperation",
|
|
478
478
|
"authenticateConnection",
|
|
479
479
|
"createObject",
|
|
480
480
|
"describeConnection",
|
|
481
481
|
"dropObject",
|
|
482
482
|
"findObject",
|
|
483
|
-
"
|
|
483
|
+
"getReadableStream",
|
|
484
484
|
"getRecord",
|
|
485
485
|
"listNodes",
|
|
486
486
|
"previewObject",
|
|
487
487
|
"removeRecords",
|
|
488
|
+
"retrieveChunks",
|
|
488
489
|
"retrieveRecords",
|
|
489
490
|
"upsertRecords"
|
|
490
|
-
]),
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
}), fe = /* @__PURE__ */ b({
|
|
494
|
-
authMethodId: pe,
|
|
495
|
-
activeConnectionCount: /* @__PURE__ */ f(/* @__PURE__ */ D()),
|
|
491
|
+
]), pe = v(["bidirectional", "destination", "source", "unknown"]), de = /* @__PURE__ */ b({
|
|
492
|
+
authMethodId: le,
|
|
493
|
+
activeConnectionCount: /* @__PURE__ */ f(/* @__PURE__ */ k()),
|
|
496
494
|
canDescribe: /* @__PURE__ */ f(/* @__PURE__ */ B()),
|
|
497
495
|
id: /* @__PURE__ */ f(/* @__PURE__ */ l()),
|
|
498
496
|
label: /* @__PURE__ */ f(te),
|
|
499
|
-
maxConnectionCount: /* @__PURE__ */ f(/* @__PURE__ */
|
|
497
|
+
maxConnectionCount: /* @__PURE__ */ f(/* @__PURE__ */ k()),
|
|
500
498
|
params: /* @__PURE__ */ f(/* @__PURE__ */ x(/* @__PURE__ */ R(/* @__PURE__ */ l(), /* @__PURE__ */ l())))
|
|
501
|
-
}),
|
|
499
|
+
}), De = /* @__PURE__ */ b({
|
|
502
500
|
...$,
|
|
503
|
-
typeId: /* @__PURE__ */
|
|
504
|
-
category: /* @__PURE__ */ y(
|
|
505
|
-
categoryId:
|
|
506
|
-
implementations: /* @__PURE__ */ R(/* @__PURE__ */ l(),
|
|
507
|
-
operations: /* @__PURE__ */ x(
|
|
508
|
-
usageId:
|
|
501
|
+
typeId: /* @__PURE__ */ D("connector"),
|
|
502
|
+
category: /* @__PURE__ */ y(/* @__PURE__ */ b({ id: /* @__PURE__ */ l(), label: /* @__PURE__ */ l() })),
|
|
503
|
+
categoryId: ce,
|
|
504
|
+
implementations: /* @__PURE__ */ R(/* @__PURE__ */ l(), de),
|
|
505
|
+
operations: /* @__PURE__ */ x(ue),
|
|
506
|
+
usageId: pe,
|
|
509
507
|
vendorAccountURL: /* @__PURE__ */ y(/* @__PURE__ */ l()),
|
|
510
508
|
vendorDocumentationURL: /* @__PURE__ */ y(/* @__PURE__ */ l()),
|
|
511
509
|
vendorHomeURL: /* @__PURE__ */ y(/* @__PURE__ */ l())
|
|
512
|
-
}),
|
|
510
|
+
}), we = ["createObject", "dropObject", "removeRecords", "upsertRecords"], Ie = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"], O = (e) => {
|
|
513
511
|
const r = Object.entries(e).filter((t) => typeof t[1] == "string");
|
|
514
512
|
return new Map(r);
|
|
515
513
|
};
|
|
516
|
-
|
|
517
|
-
const
|
|
514
|
+
O({ "en-gb": "Application" }), O({ "en-gb": "Curated Dataset" }), O({ "en-gb": "Database" }), O({ "en-gb": "File Store" });
|
|
515
|
+
const fe = v(["list"]), me = /* @__PURE__ */ b({
|
|
518
516
|
...T,
|
|
519
|
-
typeId: /* @__PURE__ */
|
|
517
|
+
typeId: /* @__PURE__ */ D("contextModelGroup"),
|
|
520
518
|
modelRefs: /* @__PURE__ */ x(P),
|
|
521
|
-
order: /* @__PURE__ */
|
|
519
|
+
order: /* @__PURE__ */ k()
|
|
522
520
|
}), Oe = /* @__PURE__ */ b({
|
|
523
521
|
...$,
|
|
524
|
-
typeId: /* @__PURE__ */
|
|
525
|
-
models: /* @__PURE__ */ x(
|
|
526
|
-
operations: /* @__PURE__ */ x(
|
|
522
|
+
typeId: /* @__PURE__ */ D("context"),
|
|
523
|
+
models: /* @__PURE__ */ x(me),
|
|
524
|
+
operations: /* @__PURE__ */ x(fe)
|
|
527
525
|
});
|
|
528
526
|
class F extends Error {
|
|
529
527
|
locator;
|
|
@@ -541,7 +539,7 @@ class Ce extends w {
|
|
|
541
539
|
super(r, t, n), this.name = "APIError";
|
|
542
540
|
}
|
|
543
541
|
}
|
|
544
|
-
class
|
|
542
|
+
class Me extends w {
|
|
545
543
|
constructor(r, t, n) {
|
|
546
544
|
super(r, t, n), this.name = "EngineError";
|
|
547
545
|
}
|
|
@@ -552,36 +550,36 @@ class z extends w {
|
|
|
552
550
|
super(r, t, s), this.name = "FetchError", this.body = n;
|
|
553
551
|
}
|
|
554
552
|
}
|
|
555
|
-
class
|
|
553
|
+
class be extends w {
|
|
556
554
|
componentName;
|
|
557
555
|
info;
|
|
558
556
|
constructor(r, t, n, s, o) {
|
|
559
557
|
super(r, t, o), this.name = "VueHandledError", this.info = n, this.componentName = s;
|
|
560
558
|
}
|
|
561
559
|
}
|
|
562
|
-
class
|
|
560
|
+
class Ne extends w {
|
|
563
561
|
constructor(r, t, n) {
|
|
564
562
|
super(r, t, n), this.name = "WindowHandledRuntimeError";
|
|
565
563
|
}
|
|
566
564
|
}
|
|
567
|
-
class
|
|
565
|
+
class je extends w {
|
|
568
566
|
constructor(r, t, n) {
|
|
569
567
|
super(r, t, n), this.name = "WindowHandledPromiseRejectionError";
|
|
570
568
|
}
|
|
571
569
|
}
|
|
572
|
-
class
|
|
570
|
+
class Ae extends F {
|
|
573
571
|
constructor(r, t, n) {
|
|
574
572
|
super(r, t, n), this.name = "OperationalError";
|
|
575
573
|
}
|
|
576
574
|
}
|
|
577
|
-
async function
|
|
575
|
+
async function Re(e, r, t) {
|
|
578
576
|
const n = ` - ${e.statusText}`, s = `${r} Response status '${e.status}${e.statusText ? n : ""}' received.`, o = await e.text();
|
|
579
577
|
return new z(s, t, o);
|
|
580
578
|
}
|
|
581
|
-
function
|
|
579
|
+
function Te(e) {
|
|
582
580
|
return e.map((r) => r.message).join(" ");
|
|
583
581
|
}
|
|
584
|
-
function
|
|
582
|
+
function $e(e) {
|
|
585
583
|
if (e instanceof Error) return e;
|
|
586
584
|
if (typeof e == "string") return new Error(e);
|
|
587
585
|
if (typeof e == "number" || typeof e == "boolean" || typeof e == "bigint") return new Error(String(e));
|
|
@@ -594,7 +592,7 @@ function Fe(e) {
|
|
|
594
592
|
}
|
|
595
593
|
return new Error("Unknown error");
|
|
596
594
|
}
|
|
597
|
-
function
|
|
595
|
+
function Fe(e) {
|
|
598
596
|
const r = /* @__PURE__ */ new Set(), t = [];
|
|
599
597
|
let n = e;
|
|
600
598
|
for (; n && !r.has(n); ) {
|
|
@@ -602,7 +600,7 @@ function Le(e) {
|
|
|
602
600
|
let s;
|
|
603
601
|
if (n instanceof z)
|
|
604
602
|
s = { body: n.body, locator: n.locator, message: n.message, name: n.name, stack: n.stack }, n = n.cause;
|
|
605
|
-
else if (n instanceof
|
|
603
|
+
else if (n instanceof be)
|
|
606
604
|
s = { componentName: n.componentName, info: n.info, locator: n.locator, message: n.message, name: n.name, stack: n.stack }, n = n.cause;
|
|
607
605
|
else if (n instanceof F)
|
|
608
606
|
s = { locator: n.locator, message: n.message, name: n.name, stack: n.stack }, n = n.cause;
|
|
@@ -615,26 +613,26 @@ function Le(e) {
|
|
|
615
613
|
}
|
|
616
614
|
return t;
|
|
617
615
|
}
|
|
618
|
-
const
|
|
616
|
+
const ye = v(["list", "render", "setColorMode"]), Le = /* @__PURE__ */ b({
|
|
619
617
|
...$,
|
|
620
|
-
typeId: /* @__PURE__ */
|
|
618
|
+
typeId: /* @__PURE__ */ D("presenter"),
|
|
621
619
|
presentations: /* @__PURE__ */ x(P),
|
|
622
|
-
operations: /* @__PURE__ */ x(
|
|
620
|
+
operations: /* @__PURE__ */ x(ye)
|
|
623
621
|
});
|
|
624
|
-
function
|
|
625
|
-
return { render:
|
|
622
|
+
function _e() {
|
|
623
|
+
return { render: ge };
|
|
626
624
|
}
|
|
627
|
-
function
|
|
625
|
+
function ge(e, r, t) {
|
|
628
626
|
t.textContent = "Cytoscape.js diagram goes here...";
|
|
629
627
|
}
|
|
630
|
-
function
|
|
631
|
-
return { render:
|
|
628
|
+
function Ue() {
|
|
629
|
+
return { render: he };
|
|
632
630
|
}
|
|
633
|
-
function
|
|
631
|
+
function he(e, r) {
|
|
634
632
|
console.log(1111, e), console.log(2222, r), console.log(3333, r.childNodes), console.log(4444, r.children);
|
|
635
633
|
}
|
|
636
|
-
const V = "en-US",
|
|
637
|
-
function
|
|
634
|
+
const V = "en-US", M = /* @__PURE__ */ new Map();
|
|
635
|
+
function Be(e) {
|
|
638
636
|
switch (e) {
|
|
639
637
|
case "Edm.Binary":
|
|
640
638
|
return "unknown";
|
|
@@ -674,13 +672,13 @@ function Ge(e) {
|
|
|
674
672
|
return "unknown";
|
|
675
673
|
}
|
|
676
674
|
}
|
|
677
|
-
function
|
|
675
|
+
function Ge(e) {
|
|
678
676
|
if (e) {
|
|
679
677
|
const r = e.lastIndexOf("/"), t = e.lastIndexOf(".", r === -1 ? e.length : r);
|
|
680
678
|
return t === -1 ? e : e.slice(0, Math.max(0, t));
|
|
681
679
|
}
|
|
682
680
|
}
|
|
683
|
-
function
|
|
681
|
+
function Pe(e) {
|
|
684
682
|
if (e) {
|
|
685
683
|
const r = e.lastIndexOf(".");
|
|
686
684
|
if (r !== -1) return e.slice(Math.max(0, r + 1));
|
|
@@ -689,7 +687,7 @@ function ze(e) {
|
|
|
689
687
|
function m(e, r = 2, t = r, n = V) {
|
|
690
688
|
if (e == null) return "";
|
|
691
689
|
const s = `${n}decimal${r}.${t}`;
|
|
692
|
-
let o =
|
|
690
|
+
let o = M.get(s);
|
|
693
691
|
return o || (o = new Intl.NumberFormat(n, {
|
|
694
692
|
localeMatcher: "best fit",
|
|
695
693
|
maximumFractionDigits: r,
|
|
@@ -697,21 +695,21 @@ function m(e, r = 2, t = r, n = V) {
|
|
|
697
695
|
minimumIntegerDigits: 1,
|
|
698
696
|
style: "decimal",
|
|
699
697
|
useGrouping: !0
|
|
700
|
-
}),
|
|
698
|
+
}), M.set(s, o)), o.format(e);
|
|
701
699
|
}
|
|
702
|
-
function
|
|
700
|
+
function ze(e) {
|
|
703
701
|
return e == null ? "" : e < 1e3 ? N(e) : e < 1e6 ? `${m(e / 1e3, 2, 0)}K` : e < 1e9 ? `${m(e / 1e6, 2, 0)}M` : e < 1e12 ? `${m(e / 1e9, 2, 0)}B` : `${m(e / 1e12, 2, 0)}T`;
|
|
704
702
|
}
|
|
705
|
-
function
|
|
703
|
+
function Ve(e) {
|
|
706
704
|
return e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${N(e)} bytes` : e < 1048576 ? `${m(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${m(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${m(e / 1073741824, 2, 0)} GB` : `${m(e / 1099511627776, 2, 0)} TB`;
|
|
707
705
|
}
|
|
708
|
-
function
|
|
706
|
+
function He(e) {
|
|
709
707
|
return e == null ? "" : e < 1e3 ? `${N(e)} ms` : e === 1e3 ? `${N(e)} sec` : e < 6e4 ? `${m(e / 1e3, 2, 0)} secs` : e === 6e4 ? "1 min" : e < 36e5 ? `${m(e / 6e4, 2, 0)} mins` : e === 36e5 ? "1 hr" : e < 864e5 ? `${m(e / 36e5, 2, 0)} hrs` : e === 864e5 ? "1 day" : `${m(e / 864e5, 2, 0)} days`;
|
|
710
708
|
}
|
|
711
709
|
function N(e, r = V) {
|
|
712
710
|
if (e == null) return "";
|
|
713
711
|
const t = `${r}decimal0.0`;
|
|
714
|
-
let n =
|
|
712
|
+
let n = M.get(t);
|
|
715
713
|
return n || (n = new Intl.NumberFormat(r, {
|
|
716
714
|
localeMatcher: "best fit",
|
|
717
715
|
maximumFractionDigits: 0,
|
|
@@ -719,9 +717,9 @@ function N(e, r = V) {
|
|
|
719
717
|
minimumIntegerDigits: 1,
|
|
720
718
|
style: "decimal",
|
|
721
719
|
useGrouping: !0
|
|
722
|
-
}),
|
|
720
|
+
}), M.set(t, n)), n.format(e);
|
|
723
721
|
}
|
|
724
|
-
function
|
|
722
|
+
function Ke(e) {
|
|
725
723
|
switch (e) {
|
|
726
724
|
case "csv":
|
|
727
725
|
return "text/csv";
|
|
@@ -741,7 +739,7 @@ const c = (e) => new Map(Object.entries(e)), L = (e, r, t = I) => {
|
|
|
741
739
|
if (n !== void 0) return n;
|
|
742
740
|
if (t !== r)
|
|
743
741
|
return e.get(t);
|
|
744
|
-
},
|
|
742
|
+
}, ve = [
|
|
745
743
|
{ id: "dtv", labels: c({ "en-gb": "Delimited Text" }) },
|
|
746
744
|
{ id: "e/e", labels: c({ "en-gb": "Entity/Event" }) },
|
|
747
745
|
{ id: "jsonArray", labels: c({ "en-gb": "JSON Array" }) },
|
|
@@ -749,27 +747,27 @@ const c = (e) => new Map(Object.entries(e)), L = (e, r, t = I) => {
|
|
|
749
747
|
{ id: "xls", labels: c({ "en-gb": "XLS" }) },
|
|
750
748
|
{ id: "xlsx", labels: c({ "en-gb": "XLSX" }) },
|
|
751
749
|
{ id: "xml", labels: c({ "en-gb": "XML" }) }
|
|
752
|
-
],
|
|
750
|
+
], We = (e = I) => {
|
|
753
751
|
const r = [];
|
|
754
|
-
for (const t of
|
|
752
|
+
for (const t of ve) {
|
|
755
753
|
const n = L(t.labels, e);
|
|
756
754
|
r.push({ id: t.id, label: n ?? t.id });
|
|
757
755
|
}
|
|
758
756
|
return r;
|
|
759
|
-
},
|
|
757
|
+
}, Ee = [
|
|
760
758
|
{ id: `
|
|
761
759
|
`, labels: c({ "en-gb": "Newline" }) },
|
|
762
760
|
{ id: "\r", labels: c({ "en-gb": "Carriage Return" }) },
|
|
763
761
|
{ id: `\r
|
|
764
762
|
`, labels: c({ "en-gb": "Carriage Return/Newline" }) }
|
|
765
|
-
],
|
|
763
|
+
], Xe = (e = I) => {
|
|
766
764
|
const r = [];
|
|
767
|
-
for (const t of
|
|
765
|
+
for (const t of Ee) {
|
|
768
766
|
const n = L(t.labels, e);
|
|
769
767
|
r.push({ id: t.id, label: n ?? t.id });
|
|
770
768
|
}
|
|
771
769
|
return r;
|
|
772
|
-
},
|
|
770
|
+
}, xe = [
|
|
773
771
|
{ id: ":", labels: c({ "en-gb": "Colon" }) },
|
|
774
772
|
{ id: ",", labels: c({ "en-gb": "Comma" }) },
|
|
775
773
|
{ id: "!", labels: c({ "en-gb": "Exclamation Mark" }) },
|
|
@@ -781,9 +779,9 @@ const c = (e) => new Map(Object.entries(e)), L = (e, r, t = I) => {
|
|
|
781
779
|
{ id: "_", labels: c({ "en-gb": "Underscore" }) },
|
|
782
780
|
{ id: "0x1F", labels: c({ "en-gb": "Unit Separator" }) },
|
|
783
781
|
{ id: "|", labels: c({ "en-gb": "Vertical Bar" }) }
|
|
784
|
-
],
|
|
782
|
+
], Je = (e = I) => {
|
|
785
783
|
const r = [];
|
|
786
|
-
for (const t of
|
|
784
|
+
for (const t of xe) {
|
|
787
785
|
const n = L(t.labels, e);
|
|
788
786
|
r.push({ id: t.id, label: n ?? t.id });
|
|
789
787
|
}
|
|
@@ -792,36 +790,36 @@ const c = (e) => new Map(Object.entries(e)), L = (e, r, t = I) => {
|
|
|
792
790
|
export {
|
|
793
791
|
Ce as APIError,
|
|
794
792
|
w as ApplicationError,
|
|
795
|
-
|
|
796
|
-
|
|
793
|
+
we as CONNECTOR_DESTINATION_OPERATIONS,
|
|
794
|
+
Ie as CONNECTOR_SOURCE_OPERATIONS,
|
|
797
795
|
I as DEFAULT_LOCALE_CODE,
|
|
798
|
-
|
|
796
|
+
Me as EngineError,
|
|
799
797
|
z as FetchError,
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
798
|
+
Ae as OperationalError,
|
|
799
|
+
be as VueError,
|
|
800
|
+
je as WindowPromiseRejectionError,
|
|
801
|
+
Ne as WindowRuntimeError,
|
|
802
|
+
Re as buildFetchError,
|
|
803
|
+
Se as componentConfigSchema,
|
|
804
|
+
Te as concatenateSerialisedErrorMessages,
|
|
805
|
+
De as connectorConfigSchema,
|
|
808
806
|
Oe as contextConfigSchema,
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
807
|
+
Be as convertODataTypeIdToUsageTypeId,
|
|
808
|
+
Pe as extractExtensionFromPath,
|
|
809
|
+
Ge as extractNameFromPath,
|
|
812
810
|
m as formatNumberAsDecimalNumber,
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
811
|
+
He as formatNumberAsDuration,
|
|
812
|
+
ze as formatNumberAsSize,
|
|
813
|
+
Ve as formatNumberAsStorageSize,
|
|
816
814
|
N as formatNumberAsWholeNumber,
|
|
817
815
|
ke as getComponentStatus,
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
816
|
+
We as getDataFormats,
|
|
817
|
+
Xe as getRecordDelimiters,
|
|
818
|
+
Je as getValueDelimiters,
|
|
819
|
+
Ke as lookupMimeTypeForExtension,
|
|
820
|
+
$e as normalizeToError,
|
|
821
|
+
Le as presenterConfigSchema,
|
|
822
|
+
Fe as serialiseError,
|
|
823
|
+
_e as useCytoscapeJS,
|
|
824
|
+
Ue as useDataTable
|
|
827
825
|
};
|
|
@@ -1,7 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Connector schema.
|
|
3
|
-
* Drafted by Copilot.
|
|
2
|
+
* Connector schema (drafted by Copilot).
|
|
4
3
|
*/
|
|
4
|
+
/** Schema Literal Unions - Connector category identifier. */
|
|
5
|
+
export declare const connectorCategoryIdSchema: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"application", undefined>, import('valibot').LiteralSchema<"curatedDataset", undefined>, import('valibot').LiteralSchema<"database", undefined>, import('valibot').LiteralSchema<"fileStore", undefined>], undefined>;
|
|
6
|
+
/** Schema Literal Unions - Connector operation name. */
|
|
7
|
+
export declare const connectorOperationNameSchema: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"abortOperation", undefined>, import('valibot').LiteralSchema<"authenticateConnection", undefined>, import('valibot').LiteralSchema<"createObject", undefined>, import('valibot').LiteralSchema<"describeConnection", undefined>, import('valibot').LiteralSchema<"dropObject", undefined>, import('valibot').LiteralSchema<"findObject", 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>;
|
|
8
|
+
/** Schema Literal Unions - Connector usage identifier. */
|
|
9
|
+
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>;
|
|
10
|
+
/** Schema Objects - Connector implementation. */
|
|
11
|
+
export declare const connectorImplementationSchema: import('valibot').ObjectSchema<{
|
|
12
|
+
readonly authMethodId: import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"apiKey", undefined>, import('valibot').LiteralSchema<"disabled", undefined>, import('valibot').LiteralSchema<"oAuth2", undefined>, import('valibot').LiteralSchema<"none", undefined>], undefined>;
|
|
13
|
+
readonly activeConnectionCount: import('valibot').OptionalSchema<import('valibot').NumberSchema<undefined>, undefined>;
|
|
14
|
+
readonly canDescribe: import('valibot').OptionalSchema<import('valibot').BooleanSchema<undefined>, undefined>;
|
|
15
|
+
readonly id: import('valibot').OptionalSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
16
|
+
readonly label: import('valibot').OptionalSchema<import('valibot').ObjectSchema<{
|
|
17
|
+
readonly 'en-au': import('valibot').StringSchema<undefined>;
|
|
18
|
+
readonly 'en-gb': import('valibot').StringSchema<undefined>;
|
|
19
|
+
readonly 'en-us': import('valibot').StringSchema<undefined>;
|
|
20
|
+
readonly 'es-es': import('valibot').StringSchema<undefined>;
|
|
21
|
+
}, undefined>, undefined>;
|
|
22
|
+
readonly maxConnectionCount: import('valibot').OptionalSchema<import('valibot').NumberSchema<undefined>, undefined>;
|
|
23
|
+
readonly params: import('valibot').OptionalSchema<import('valibot').ArraySchema<import('valibot').RecordSchema<import('valibot').StringSchema<undefined>, import('valibot').StringSchema<undefined>, undefined>, undefined>, undefined>;
|
|
24
|
+
}, undefined>;
|
|
25
|
+
/** Schema Objects - Connector configuration. */
|
|
5
26
|
export declare const connectorConfigSchema: import('valibot').ObjectSchema<{
|
|
6
27
|
readonly typeId: import('valibot').LiteralSchema<"connector", undefined>;
|
|
7
28
|
readonly category: import('valibot').NullableSchema<import('valibot').ObjectSchema<{
|
|
@@ -23,7 +44,7 @@ export declare const connectorConfigSchema: import('valibot').ObjectSchema<{
|
|
|
23
44
|
readonly maxConnectionCount: import('valibot').OptionalSchema<import('valibot').NumberSchema<undefined>, undefined>;
|
|
24
45
|
readonly params: import('valibot').OptionalSchema<import('valibot').ArraySchema<import('valibot').RecordSchema<import('valibot').StringSchema<undefined>, import('valibot').StringSchema<undefined>, undefined>, undefined>, undefined>;
|
|
25
46
|
}, undefined>, undefined>;
|
|
26
|
-
readonly operations: import('valibot').ArraySchema<import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"abortOperation", undefined>, import('valibot').LiteralSchema<"authenticateConnection", undefined>, import('valibot').LiteralSchema<"createObject", undefined>, import('valibot').LiteralSchema<"describeConnection", undefined>, import('valibot').LiteralSchema<"dropObject", undefined>, import('valibot').LiteralSchema<"findObject", undefined>, import('valibot').LiteralSchema<"
|
|
47
|
+
readonly operations: import('valibot').ArraySchema<import('valibot').UnionSchema<readonly [import('valibot').LiteralSchema<"abortOperation", undefined>, import('valibot').LiteralSchema<"authenticateConnection", undefined>, import('valibot').LiteralSchema<"createObject", undefined>, import('valibot').LiteralSchema<"describeConnection", undefined>, import('valibot').LiteralSchema<"dropObject", undefined>, import('valibot').LiteralSchema<"findObject", 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>;
|
|
27
48
|
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>;
|
|
28
49
|
readonly vendorAccountURL: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
29
50
|
readonly vendorDocumentationURL: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
|
|
@@ -2,18 +2,27 @@ import { parse as csvParse } from 'csv-parse/browser/esm';
|
|
|
2
2
|
import { parse as dateFnsParse } from 'date-fns';
|
|
3
3
|
import { InferOutput } from 'valibot';
|
|
4
4
|
import { nanoid } from 'nanoid';
|
|
5
|
-
import {
|
|
6
|
-
import { LocalisedString } from '../../index';
|
|
5
|
+
import { Component } from '..';
|
|
7
6
|
import { buildFetchError, OperationalError } from '../../errors';
|
|
8
|
-
import { Component, ModuleConfig } from '..';
|
|
9
7
|
import { ConnectionConfig, ConnectionDescription, ConnectionNodeConfig } from './connection';
|
|
8
|
+
import { connectorCategoryIdSchema, connectorConfigSchema, connectorImplementationSchema, connectorOperationNameSchema, connectorUsageIdSchema } from './connectorConfig.schema';
|
|
10
9
|
import { DataViewContentAuditConfig, ValueDelimiterId } from '../dataView';
|
|
11
10
|
import { extractExtensionFromPath, extractNameFromPath, lookupMimeTypeForExtension } from '../../utilities';
|
|
12
|
-
|
|
13
|
-
export type
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
|
|
11
|
+
/** Interfaces/Types - Connector category identifier. */
|
|
12
|
+
export type ConnectorCategoryId = InferOutput<typeof connectorCategoryIdSchema>;
|
|
13
|
+
/** Interfaces/Types - Connector operation name. */
|
|
14
|
+
export type ConnectorOperationName = InferOutput<typeof connectorOperationNameSchema>;
|
|
15
|
+
/** Interfaces/Types - Connector usage identifier. */
|
|
16
|
+
export type ConnectorUsageId = InferOutput<typeof connectorUsageIdSchema>;
|
|
17
|
+
/** Interfaces/Types - Connector implementation. */
|
|
18
|
+
export type ConnectorImplementation = InferOutput<typeof connectorImplementationSchema>;
|
|
19
|
+
/** Interfaces/Types - Connector configuration. */
|
|
20
|
+
export type ConnectorConfig = InferOutput<typeof connectorConfigSchema>;
|
|
21
|
+
export type ConnectorLocalisedConfig = Omit<ConnectorConfig, 'label' | 'description'> & {
|
|
22
|
+
label: string;
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
/** Interfaces/Types - Connector. */
|
|
17
26
|
export interface Connector extends Component {
|
|
18
27
|
abortController?: AbortController;
|
|
19
28
|
readonly config: ConnectorConfig;
|
|
@@ -25,39 +34,15 @@ export interface Connector extends Component {
|
|
|
25
34
|
describeConnection?(connector: Connector, settings: DescribeSettings): Promise<DescribeResult>;
|
|
26
35
|
dropObject?(connector: Connector, settings: DropSettings): Promise<void>;
|
|
27
36
|
findObject?(connector: Connector, findSettings: FindSettings): Promise<FindResult>;
|
|
28
|
-
|
|
37
|
+
getReadableStream?(connector: Connector, getSettings: GetReadableStreamSettings): Promise<GetReadableStreamResult>;
|
|
29
38
|
getRecord?(connector: Connector, getSettings: GetRecordSettings): Promise<GetRecordResult>;
|
|
30
39
|
listNodes?(connector: Connector, settings: ListSettings): Promise<ListResult>;
|
|
31
40
|
previewObject?(connector: Connector, settings: PreviewSettings): Promise<PreviewResult>;
|
|
32
41
|
removeRecords?(connector: Connector, settings: RemoveSettings): Promise<void>;
|
|
33
|
-
|
|
42
|
+
retrieveChunks?(connector: Connector, settings: RetrieveChunksSettings, chunk: (records: (string[] | Record<string, unknown>)[]) => void, complete: (result: RetrieveChunksSummary) => void): Promise<void>;
|
|
43
|
+
retrieveRecords?(connector: Connector, settings: RetrieveRecordsSettings, chunk: (records: (string[] | Record<string, unknown>)[]) => void, complete: (result: RetrieveRecordsSummary) => void): Promise<void>;
|
|
34
44
|
upsertRecords?(connector: Connector, settings: UpsertSettings): Promise<void>;
|
|
35
45
|
}
|
|
36
|
-
export type ConnectorConfig = InferOutput<typeof connectorConfigSchema>;
|
|
37
|
-
export interface ConnectorConfig1 extends ModuleConfig {
|
|
38
|
-
category: ConnectorCategory | null;
|
|
39
|
-
categoryId: ConnectorModuleCategoryId;
|
|
40
|
-
implementations: Record<string, ConnectorImplementation>;
|
|
41
|
-
operations: ConnectorOperation[];
|
|
42
|
-
typeId: 'connector';
|
|
43
|
-
usageId: ConnectorUsageId;
|
|
44
|
-
vendorAccountURL: string | null;
|
|
45
|
-
vendorDocumentationURL: string | null;
|
|
46
|
-
vendorHomeURL: string | null;
|
|
47
|
-
}
|
|
48
|
-
export type ConnectorLocalisedConfig = Omit<ConnectorConfig, 'label' | 'description'> & {
|
|
49
|
-
label: string;
|
|
50
|
-
description: string;
|
|
51
|
-
};
|
|
52
|
-
export interface ConnectorImplementation {
|
|
53
|
-
activeConnectionCount?: number;
|
|
54
|
-
canDescribe?: boolean;
|
|
55
|
-
id?: string;
|
|
56
|
-
authMethodId: 'apiKey' | 'disabled' | 'oAuth2' | 'none';
|
|
57
|
-
label?: LocalisedString;
|
|
58
|
-
maxConnectionCount?: number;
|
|
59
|
-
params?: Record<string, string>[];
|
|
60
|
-
}
|
|
61
46
|
export interface ConnectorTools {
|
|
62
47
|
csvParse: typeof csvParse;
|
|
63
48
|
dataPos: {
|
|
@@ -72,6 +57,9 @@ export interface ConnectorTools {
|
|
|
72
57
|
};
|
|
73
58
|
nanoid: typeof nanoid;
|
|
74
59
|
}
|
|
60
|
+
/** Constants */
|
|
61
|
+
export declare const CONNECTOR_DESTINATION_OPERATIONS: string[];
|
|
62
|
+
export declare const CONNECTOR_SOURCE_OPERATIONS: string[];
|
|
75
63
|
export interface InitialiseSettings {
|
|
76
64
|
connectorStorageURLPrefix: string;
|
|
77
65
|
}
|
|
@@ -108,11 +96,11 @@ export interface FindSettings extends ConnectorOperationSettings {
|
|
|
108
96
|
export interface FindResult {
|
|
109
97
|
folderPath?: string;
|
|
110
98
|
}
|
|
111
|
-
export interface
|
|
99
|
+
export interface GetReadableStreamSettings extends ConnectorOperationSettings {
|
|
112
100
|
id: string;
|
|
113
101
|
path: string;
|
|
114
102
|
}
|
|
115
|
-
export interface
|
|
103
|
+
export interface GetReadableStreamResult {
|
|
116
104
|
readable?: ReadableStream<unknown>;
|
|
117
105
|
}
|
|
118
106
|
export interface GetRecordSettings extends ConnectorOperationSettings {
|
|
@@ -147,16 +135,30 @@ export interface RemoveSettings extends ConnectorOperationSettings {
|
|
|
147
135
|
keys: string[];
|
|
148
136
|
path: string;
|
|
149
137
|
}
|
|
150
|
-
export interface
|
|
138
|
+
export interface RetrieveChunksSettings extends ConnectorOperationSettings {
|
|
151
139
|
chunkSize?: number;
|
|
152
140
|
encodingId: string;
|
|
153
141
|
path: string;
|
|
154
142
|
valueDelimiterId: ValueDelimiterId;
|
|
155
143
|
}
|
|
156
|
-
export interface
|
|
144
|
+
export interface RetrieveRecordsSettings extends ConnectorOperationSettings {
|
|
145
|
+
chunkSize?: number;
|
|
146
|
+
encodingId: string;
|
|
147
|
+
path: string;
|
|
148
|
+
valueDelimiterId: ValueDelimiterId;
|
|
149
|
+
}
|
|
150
|
+
export interface RetrieveRecordsResult {
|
|
157
151
|
records: (string[] | Record<string, unknown>)[];
|
|
158
152
|
}
|
|
159
|
-
export interface
|
|
153
|
+
export interface RetrieveChunksSummary {
|
|
154
|
+
byteCount: number;
|
|
155
|
+
commentLineCount: number;
|
|
156
|
+
emptyLineCount: number;
|
|
157
|
+
invalidFieldLengthCount: number;
|
|
158
|
+
lineCount: number;
|
|
159
|
+
recordCount: number;
|
|
160
|
+
}
|
|
161
|
+
export interface RetrieveRecordsSummary {
|
|
160
162
|
byteCount: number;
|
|
161
163
|
commentLineCount: number;
|
|
162
164
|
emptyLineCount: number;
|
|
@@ -172,9 +174,5 @@ export interface ConnectorCallbackData {
|
|
|
172
174
|
typeId: string;
|
|
173
175
|
properties: Record<string, unknown>;
|
|
174
176
|
}
|
|
175
|
-
interface ConnectorCategory {
|
|
176
|
-
id: string;
|
|
177
|
-
label: string;
|
|
178
|
-
}
|
|
179
177
|
/** Exposures */
|
|
180
178
|
export { connectorConfigSchema } from './connectorConfig.schema';
|
|
@@ -11,7 +11,7 @@ export { componentConfigSchema } from './component';
|
|
|
11
11
|
/** Constants - Connector */
|
|
12
12
|
export { CONNECTOR_DESTINATION_OPERATIONS, CONNECTOR_SOURCE_OPERATIONS } from './component/connector';
|
|
13
13
|
/** Interfaces/Types Component - Connector */
|
|
14
|
-
export type { AuditContentResult, AuditContentSettings, Connector, ConnectorCallbackData, ConnectorConfig, ConnectorImplementation, ConnectorLocalisedConfig,
|
|
14
|
+
export type { AuditContentResult, AuditContentSettings, Connector, ConnectorCallbackData, ConnectorConfig, ConnectorImplementation, ConnectorLocalisedConfig, ConnectorOperationName, ConnectorOperationSettings, ConnectorTools, ConnectorUsageId, CreateSettings, DropSettings, FindResult, FindSettings, GetReadableStreamResult, GetReadableStreamSettings, GetRecordResult, GetRecordSettings, InitialiseSettings, ListResult, ListSettings, PreviewResult, PreviewSettings, RemoveSettings, RetrieveChunksSettings, RetrieveChunksSummary, RetrieveRecordsResult, RetrieveRecordsSettings, RetrieveRecordsSummary, UpsertSettings } from './component/connector';
|
|
15
15
|
/** Interfaces/Types - Connection */
|
|
16
16
|
export type { ConnectionAuthorizationConfig, ConnectionColumnConfig, ConnectionConfig, ConnectionNodeConfig, DPAFileSystemFileHandle, Encoding, StorageTypeId, UsageTypeId } from './component/connector/connection';
|
|
17
17
|
/** Schemas - Connector */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datapos/datapos-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.332",
|
|
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>",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"nanoid": "^5.1.6"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@datapos/datapos-development": "^0.3.
|
|
37
|
-
"@datapos/eslint-config-datapos": "^1.0.
|
|
36
|
+
"@datapos/datapos-development": "^0.3.424",
|
|
37
|
+
"@datapos/eslint-config-datapos": "^1.0.28",
|
|
38
38
|
"@types/node": "^25.0.3",
|
|
39
39
|
"@typescript-eslint/eslint-plugin": "^8.50.0",
|
|
40
40
|
"@typescript-eslint/parser": "^8.50.0",
|