@datapos/datapos-shared 0.3.331 → 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.
@@ -131,11 +131,11 @@ function B(e) {
131
131
  };
132
132
  }
133
133
  // @__NO_SIDE_EFFECTS__
134
- function k(e, r) {
134
+ function D(e, r) {
135
135
  return {
136
136
  kind: "schema",
137
137
  type: "literal",
138
- reference: k,
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 D(e) {
170
+ function k(e) {
171
171
  return {
172
172
  kind: "schema",
173
173
  type: "number",
174
- reference: D,
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__ */ k(r))), te = /* @__PURE__ */ b({
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
- }), O = /* @__PURE__ */ b({
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: O,
430
- description: O,
431
- firstCreatedAt: /* @__PURE__ */ f(/* @__PURE__ */ D()),
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__ */ D()),
434
+ lastUpdatedAt: /* @__PURE__ */ y(/* @__PURE__ */ k()),
435
435
  status: /* @__PURE__ */ y(oe),
436
436
  statusId: ne
437
- }, De = /* @__PURE__ */ b({
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: O,
446
- description: O,
445
+ label: C,
446
+ description: C,
447
447
  icon: /* @__PURE__ */ y(/* @__PURE__ */ l()),
448
448
  iconDark: /* @__PURE__ */ y(/* @__PURE__ */ l()),
449
- order: /* @__PURE__ */ D(),
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,7 +473,7 @@ 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"]), ce = v([
476
+ }, le = v(["apiKey", "disabled", "oAuth2", "none"]), ce = v(["application", "curatedDataset", "database", "fileStore"]), ue = v([
477
477
  "abortOperation",
478
478
  "authenticateConnection",
479
479
  "createObject",
@@ -485,45 +485,43 @@ const oe = /* @__PURE__ */ b({
485
485
  "listNodes",
486
486
  "previewObject",
487
487
  "removeRecords",
488
+ "retrieveChunks",
488
489
  "retrieveRecords",
489
490
  "upsertRecords"
490
- ]), ue = v(["bidirectional", "destination", "source", "unknown"]), pe = v(["apiKey", "disabled", "oAuth2", "none"]), de = /* @__PURE__ */ b({
491
- id: /* @__PURE__ */ l(),
492
- label: /* @__PURE__ */ l()
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__ */ D()),
497
+ maxConnectionCount: /* @__PURE__ */ f(/* @__PURE__ */ k()),
500
498
  params: /* @__PURE__ */ f(/* @__PURE__ */ x(/* @__PURE__ */ R(/* @__PURE__ */ l(), /* @__PURE__ */ l())))
501
- }), we = /* @__PURE__ */ b({
499
+ }), De = /* @__PURE__ */ b({
502
500
  ...$,
503
- typeId: /* @__PURE__ */ k("connector"),
504
- category: /* @__PURE__ */ y(de),
505
- categoryId: le,
506
- implementations: /* @__PURE__ */ R(/* @__PURE__ */ l(), fe),
507
- operations: /* @__PURE__ */ x(ce),
508
- usageId: ue,
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
- }), Ie = ["createObject", "dropObject", "removeRecords", "upsertRecords"], Me = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"], M = (e) => {
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
- M({ "en-gb": "Application" }), M({ "en-gb": "Curated Dataset" }), M({ "en-gb": "Database" }), M({ "en-gb": "File Store" });
517
- const me = v(["list"]), be = /* @__PURE__ */ b({
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__ */ k("contextModelGroup"),
517
+ typeId: /* @__PURE__ */ D("contextModelGroup"),
520
518
  modelRefs: /* @__PURE__ */ x(P),
521
- order: /* @__PURE__ */ D()
519
+ order: /* @__PURE__ */ k()
522
520
  }), Oe = /* @__PURE__ */ b({
523
521
  ...$,
524
- typeId: /* @__PURE__ */ k("context"),
525
- models: /* @__PURE__ */ x(be),
526
- operations: /* @__PURE__ */ x(me)
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 Ne extends w {
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 ye extends w {
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 je extends w {
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 Ae extends w {
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 Re extends F {
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 Te(e, r, t) {
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 $e(e) {
579
+ function Te(e) {
582
580
  return e.map((r) => r.message).join(" ");
583
581
  }
584
- function Fe(e) {
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 Le(e) {
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 ye)
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 ge = v(["list", "render", "setColorMode"]), _e = /* @__PURE__ */ b({
616
+ const ye = v(["list", "render", "setColorMode"]), Le = /* @__PURE__ */ b({
619
617
  ...$,
620
- typeId: /* @__PURE__ */ k("presenter"),
618
+ typeId: /* @__PURE__ */ D("presenter"),
621
619
  presentations: /* @__PURE__ */ x(P),
622
- operations: /* @__PURE__ */ x(ge)
620
+ operations: /* @__PURE__ */ x(ye)
623
621
  });
624
- function Ue() {
625
- return { render: he };
622
+ function _e() {
623
+ return { render: ge };
626
624
  }
627
- function he(e, r, t) {
625
+ function ge(e, r, t) {
628
626
  t.textContent = "Cytoscape.js diagram goes here...";
629
627
  }
630
- function Be() {
631
- return { render: ve };
628
+ function Ue() {
629
+ return { render: he };
632
630
  }
633
- function ve(e, r) {
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", C = /* @__PURE__ */ new Map();
637
- function Ge(e) {
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 Pe(e) {
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 ze(e) {
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 = C.get(s);
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
- }), C.set(s, o)), o.format(e);
698
+ }), M.set(s, o)), o.format(e);
701
699
  }
702
- function Ve(e) {
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 He(e) {
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 Ke(e) {
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 = C.get(t);
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
- }), C.set(t, n)), n.format(e);
720
+ }), M.set(t, n)), n.format(e);
723
721
  }
724
- function We(e) {
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
- }, Ee = [
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
- ], Xe = (e = I) => {
750
+ ], We = (e = I) => {
753
751
  const r = [];
754
- for (const t of Ee) {
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
- }, xe = [
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
- ], Je = (e = I) => {
763
+ ], Xe = (e = I) => {
766
764
  const r = [];
767
- for (const t of xe) {
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
- }, Se = [
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
- ], qe = (e = I) => {
782
+ ], Je = (e = I) => {
785
783
  const r = [];
786
- for (const t of Se) {
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
- Ie as CONNECTOR_DESTINATION_OPERATIONS,
796
- Me as CONNECTOR_SOURCE_OPERATIONS,
793
+ we as CONNECTOR_DESTINATION_OPERATIONS,
794
+ Ie as CONNECTOR_SOURCE_OPERATIONS,
797
795
  I as DEFAULT_LOCALE_CODE,
798
- Ne as EngineError,
796
+ Me as EngineError,
799
797
  z as FetchError,
800
- Re as OperationalError,
801
- ye as VueError,
802
- Ae as WindowPromiseRejectionError,
803
- je as WindowRuntimeError,
804
- Te as buildFetchError,
805
- De as componentConfigSchema,
806
- $e as concatenateSerialisedErrorMessages,
807
- we as connectorConfigSchema,
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
- Ge as convertODataTypeIdToUsageTypeId,
810
- ze as extractExtensionFromPath,
811
- Pe as extractNameFromPath,
807
+ Be as convertODataTypeIdToUsageTypeId,
808
+ Pe as extractExtensionFromPath,
809
+ Ge as extractNameFromPath,
812
810
  m as formatNumberAsDecimalNumber,
813
- Ke as formatNumberAsDuration,
814
- Ve as formatNumberAsSize,
815
- He as formatNumberAsStorageSize,
811
+ He as formatNumberAsDuration,
812
+ ze as formatNumberAsSize,
813
+ Ve as formatNumberAsStorageSize,
816
814
  N as formatNumberAsWholeNumber,
817
815
  ke as getComponentStatus,
818
- Xe as getDataFormats,
819
- Je as getRecordDelimiters,
820
- qe as getValueDelimiters,
821
- We as lookupMimeTypeForExtension,
822
- Fe as normalizeToError,
823
- _e as presenterConfigSchema,
824
- Le as serialiseError,
825
- Ue as useCytoscapeJS,
826
- Be as useDataTable
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,12 +1,13 @@
1
1
  /**
2
2
  * Connector schema (drafted by Copilot).
3
3
  */
4
- /** Schemas - */
5
- export declare const connectorModuleCategoryIdSchema: 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
- /** Schemas - Connector operations. */
7
- export declare const connectorOperationSchema: 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<"retrieveRecords", undefined>, import('valibot').LiteralSchema<"upsertRecords", undefined>], undefined>;
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. */
8
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>;
9
- /** Schemas - Connector implementation. */
10
+ /** Schema Objects - Connector implementation. */
10
11
  export declare const connectorImplementationSchema: import('valibot').ObjectSchema<{
11
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>;
12
13
  readonly activeConnectionCount: import('valibot').OptionalSchema<import('valibot').NumberSchema<undefined>, undefined>;
@@ -21,7 +22,7 @@ export declare const connectorImplementationSchema: import('valibot').ObjectSche
21
22
  readonly maxConnectionCount: import('valibot').OptionalSchema<import('valibot').NumberSchema<undefined>, undefined>;
22
23
  readonly params: import('valibot').OptionalSchema<import('valibot').ArraySchema<import('valibot').RecordSchema<import('valibot').StringSchema<undefined>, import('valibot').StringSchema<undefined>, undefined>, undefined>, undefined>;
23
24
  }, undefined>;
24
- /** Schemas - Connector configuration. */
25
+ /** Schema Objects - Connector configuration. */
25
26
  export declare const connectorConfigSchema: import('valibot').ObjectSchema<{
26
27
  readonly typeId: import('valibot').LiteralSchema<"connector", undefined>;
27
28
  readonly category: import('valibot').NullableSchema<import('valibot').ObjectSchema<{
@@ -43,7 +44,7 @@ export declare const connectorConfigSchema: import('valibot').ObjectSchema<{
43
44
  readonly maxConnectionCount: import('valibot').OptionalSchema<import('valibot').NumberSchema<undefined>, undefined>;
44
45
  readonly params: import('valibot').OptionalSchema<import('valibot').ArraySchema<import('valibot').RecordSchema<import('valibot').StringSchema<undefined>, import('valibot').StringSchema<undefined>, undefined>, undefined>, undefined>;
45
46
  }, undefined>, undefined>;
46
- 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<"retrieveRecords", undefined>, import('valibot').LiteralSchema<"upsertRecords", undefined>], undefined>, undefined>;
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>;
47
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>;
48
49
  readonly vendorAccountURL: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
49
50
  readonly vendorDocumentationURL: import('valibot').NullableSchema<import('valibot').StringSchema<undefined>, undefined>;
@@ -5,15 +5,23 @@ import { nanoid } from 'nanoid';
5
5
  import { Component } from '..';
6
6
  import { buildFetchError, OperationalError } from '../../errors';
7
7
  import { ConnectionConfig, ConnectionDescription, ConnectionNodeConfig } from './connection';
8
- import { connectorConfigSchema, connectorImplementationSchema, connectorModuleCategoryIdSchema, connectorOperationSchema, connectorUsageIdSchema } from './connectorConfig.schema';
8
+ import { connectorCategoryIdSchema, connectorConfigSchema, connectorImplementationSchema, connectorOperationNameSchema, connectorUsageIdSchema } from './connectorConfig.schema';
9
9
  import { DataViewContentAuditConfig, ValueDelimiterId } from '../dataView';
10
10
  import { extractExtensionFromPath, extractNameFromPath, lookupMimeTypeForExtension } from '../../utilities';
11
- export type ConnectorModuleCategoryId = InferOutput<typeof connectorModuleCategoryIdSchema>;
12
- export type ConnectorOperation = InferOutput<typeof connectorOperationSchema>;
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. */
13
16
  export type ConnectorUsageId = InferOutput<typeof connectorUsageIdSchema>;
14
- /** Constants */
15
- export declare const CONNECTOR_DESTINATION_OPERATIONS: string[];
16
- export declare const CONNECTOR_SOURCE_OPERATIONS: string[];
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
+ };
17
25
  /** Interfaces/Types - Connector. */
18
26
  export interface Connector extends Component {
19
27
  abortController?: AbortController;
@@ -26,20 +34,15 @@ export interface Connector extends Component {
26
34
  describeConnection?(connector: Connector, settings: DescribeSettings): Promise<DescribeResult>;
27
35
  dropObject?(connector: Connector, settings: DropSettings): Promise<void>;
28
36
  findObject?(connector: Connector, findSettings: FindSettings): Promise<FindResult>;
29
- getReadableStream?(connector: Connector, getSettings: GetReaderSettings): Promise<GetReaderResult>;
37
+ getReadableStream?(connector: Connector, getSettings: GetReadableStreamSettings): Promise<GetReadableStreamResult>;
30
38
  getRecord?(connector: Connector, getSettings: GetRecordSettings): Promise<GetRecordResult>;
31
39
  listNodes?(connector: Connector, settings: ListSettings): Promise<ListResult>;
32
40
  previewObject?(connector: Connector, settings: PreviewSettings): Promise<PreviewResult>;
33
41
  removeRecords?(connector: Connector, settings: RemoveSettings): Promise<void>;
34
- retrieveRecords?(connector: Connector, settings: RetrieveSettings, chunk: (records: (string[] | Record<string, unknown>)[]) => void, complete: (result: RetrieveSummary) => void): Promise<void>;
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>;
35
44
  upsertRecords?(connector: Connector, settings: UpsertSettings): Promise<void>;
36
45
  }
37
- export type ConnectorConfig = InferOutput<typeof connectorConfigSchema>;
38
- export type ConnectorLocalisedConfig = Omit<ConnectorConfig, 'label' | 'description'> & {
39
- label: string;
40
- description: string;
41
- };
42
- export type ConnectorImplementation = InferOutput<typeof connectorImplementationSchema>;
43
46
  export interface ConnectorTools {
44
47
  csvParse: typeof csvParse;
45
48
  dataPos: {
@@ -54,6 +57,9 @@ export interface ConnectorTools {
54
57
  };
55
58
  nanoid: typeof nanoid;
56
59
  }
60
+ /** Constants */
61
+ export declare const CONNECTOR_DESTINATION_OPERATIONS: string[];
62
+ export declare const CONNECTOR_SOURCE_OPERATIONS: string[];
57
63
  export interface InitialiseSettings {
58
64
  connectorStorageURLPrefix: string;
59
65
  }
@@ -90,11 +96,11 @@ export interface FindSettings extends ConnectorOperationSettings {
90
96
  export interface FindResult {
91
97
  folderPath?: string;
92
98
  }
93
- export interface GetReaderSettings extends ConnectorOperationSettings {
99
+ export interface GetReadableStreamSettings extends ConnectorOperationSettings {
94
100
  id: string;
95
101
  path: string;
96
102
  }
97
- export interface GetReaderResult {
103
+ export interface GetReadableStreamResult {
98
104
  readable?: ReadableStream<unknown>;
99
105
  }
100
106
  export interface GetRecordSettings extends ConnectorOperationSettings {
@@ -129,16 +135,30 @@ export interface RemoveSettings extends ConnectorOperationSettings {
129
135
  keys: string[];
130
136
  path: string;
131
137
  }
132
- export interface RetrieveSettings extends ConnectorOperationSettings {
138
+ export interface RetrieveChunksSettings extends ConnectorOperationSettings {
139
+ chunkSize?: number;
140
+ encodingId: string;
141
+ path: string;
142
+ valueDelimiterId: ValueDelimiterId;
143
+ }
144
+ export interface RetrieveRecordsSettings extends ConnectorOperationSettings {
133
145
  chunkSize?: number;
134
146
  encodingId: string;
135
147
  path: string;
136
148
  valueDelimiterId: ValueDelimiterId;
137
149
  }
138
- export interface RetrieveResult {
150
+ export interface RetrieveRecordsResult {
139
151
  records: (string[] | Record<string, unknown>)[];
140
152
  }
141
- export interface RetrieveSummary {
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 {
142
162
  byteCount: number;
143
163
  commentLineCount: number;
144
164
  emptyLineCount: number;
@@ -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, ConnectorOperation, ConnectorOperationSettings, ConnectorTools, ConnectorUsageId, CreateSettings, DropSettings, FindResult, FindSettings, GetReaderResult, GetReaderSettings, GetRecordResult, GetRecordSettings, InitialiseSettings, ListResult, ListSettings, PreviewResult, PreviewSettings, RemoveSettings, RetrieveResult, RetrieveSettings, RetrieveSummary, UpsertSettings } from './component/connector';
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.331",
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>",