@datapos/datapos-shared 0.3.120 → 0.3.122

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.
@@ -1,5 +1,5 @@
1
1
  import { promises as y } from "fs";
2
- const L = 0, O = (e) => e, _ = () => Date.now(), k = {
2
+ const L = 0, k = (e) => e, j = () => Date.now(), M = {
3
3
  cartesian_areaLine: { categoryId: "cartesian", typeId: "areaLine", label: { "en-gb": "Area Line" }, options: { highchartsType: "area" } },
4
4
  cartesian_areaSpline: { categoryId: "cartesian", typeId: "areaSpline", label: { "en-gb": "Area Spline" }, options: { highchartsType: "area" } },
5
5
  cartesian_bar: { categoryId: "cartesian", typeId: "bar", label: { "en-gb": "Bar" }, options: { highchartsType: "bar" } },
@@ -18,170 +18,170 @@ const L = 0, O = (e) => e, _ = () => Date.now(), k = {
18
18
  streamgraph: { categoryId: "streamgraph", label: { "en-gb": "Streamgraph" }, options: {} },
19
19
  values: { categoryId: "values", label: { "en-gb": "Values" }, options: {} }
20
20
  };
21
- function M() {
22
- function e(t, a, r) {
23
- r.textContent = "Cytoscape.js diagram goes here...";
21
+ function U() {
22
+ function e(r, a, t) {
23
+ t.textContent = "Cytoscape.js diagram goes here...";
24
24
  }
25
25
  return { render: e };
26
26
  }
27
- function U() {
28
- function e(t, a, r) {
29
- r.textContent = "values table goes here...";
27
+ function B() {
28
+ function e(r, a, t) {
29
+ t.textContent = "values table goes here...";
30
30
  }
31
31
  return { render: e };
32
32
  }
33
- const S = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", w = "highcharts";
33
+ const S = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", I = "highcharts";
34
34
  let b, T = !1;
35
- function j() {
36
- async function e(n, s, u, h) {
37
- await r();
38
- const l = [];
39
- for (const c of s.data.measures)
40
- l.push({ type: n.options.highchartsType, name: c.name, data: c.data });
41
- const m = {
42
- chart: { type: n.options.highchartsType },
35
+ function H() {
36
+ async function e(o, s, c, d) {
37
+ await t();
38
+ const i = [];
39
+ for (const u of s.data.measures)
40
+ i.push({ type: o.options.highchartsType, name: u.name, data: u.data });
41
+ const p = {
42
+ chart: { type: o.options.highchartsType },
43
43
  plotOptions: { series: { borderColor: "#333" } },
44
- series: l,
44
+ series: i,
45
45
  title: { text: s.title.text },
46
46
  xAxis: { categories: s.data.categoryLabels },
47
47
  yAxis: { title: { text: s.data.name } }
48
- }, g = b.chart(u, m, h);
49
- return { chart: g, resize: () => g.reflow(), vendorId: w };
48
+ }, m = b.chart(c, p, d);
49
+ return { chart: m, resize: () => m.reflow(), vendorId: I };
50
50
  }
51
- async function t(n, s, u, h) {
52
- await Promise.all([r(), o()]);
53
- const l = [];
54
- for (const c of s.data.measures)
55
- l.push({ type: n.options.highchartsType, name: c.name, data: c.data });
56
- const m = {
51
+ async function r(o, s, c, d) {
52
+ await Promise.all([t(), n()]);
53
+ const i = [];
54
+ for (const u of s.data.measures)
55
+ i.push({ type: o.options.highchartsType, name: u.name, data: u.data });
56
+ const p = {
57
57
  chart: { polar: !0 },
58
58
  plotOptions: { series: { borderColor: "#333" } },
59
- series: l,
59
+ series: i,
60
60
  title: { text: s.title.text },
61
61
  xAxis: { categories: s.data.categoryLabels },
62
62
  yAxis: { title: { text: s.data.name } }
63
- }, g = b.chart(u, m, h);
64
- return { chart: g, resize: () => g.reflow(), vendorId: w };
63
+ }, m = b.chart(c, p, d);
64
+ return { chart: m, resize: () => m.reflow(), vendorId: I };
65
65
  }
66
- async function a(n, s, u, h) {
67
- await Promise.all([r(), o()]);
68
- const l = [], m = [];
66
+ async function a(o, s, c, d) {
67
+ await Promise.all([t(), n()]);
68
+ const i = [], p = [];
69
69
  for (let f = 0; f < s.data.measures[0].data.length; f++)
70
- m.push([s.data.measures[0].data[f][0], s.data.measures[1].data[f][0]]);
71
- l.push({ type: n.options.highchartsType, name: "Unknown", data: m });
72
- const g = {
73
- chart: { type: n.options.highchartsType, inverted: n.options.inverted },
70
+ p.push([s.data.measures[0].data[f][0], s.data.measures[1].data[f][0]]);
71
+ i.push({ type: o.options.highchartsType, name: "Unknown", data: p });
72
+ const m = {
73
+ chart: { type: o.options.highchartsType, inverted: o.options.inverted },
74
74
  plotOptions: { series: { borderColor: "#333" } },
75
- series: l,
75
+ series: i,
76
76
  title: { text: s.title.text },
77
77
  xAxis: { categories: s.data.categoryLabels },
78
78
  yAxis: { title: { text: s.data.name } }
79
- }, c = b.chart(u, g, h);
80
- return { chart: c, resize: () => c.reflow(), vendorId: w };
79
+ }, u = b.chart(c, m, d);
80
+ return { chart: u, resize: () => u.reflow(), vendorId: I };
81
81
  }
82
- async function r() {
82
+ async function t() {
83
83
  if (b) return;
84
- const n = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", s = `${n}highcharts.src.js`, u = `${n}modules/accessibility.src.js`;
84
+ const o = "https://cdn.jsdelivr.net/npm/highcharts@11.4.3/es-modules/masters/", s = `${o}highcharts.src.js`, c = `${o}modules/accessibility.src.js`;
85
85
  b = (await import(
86
86
  /* @vite-ignore */
87
87
  s
88
88
  )).default, await import(
89
89
  /* @vite-ignore */
90
- u
90
+ c
91
91
  );
92
92
  }
93
- async function o() {
93
+ async function n() {
94
94
  if (T) return;
95
95
  await import(`${S}highcharts-more.src.js`), T = !0;
96
96
  }
97
- return { renderCartesianChart: e, renderPolarChart: t, renderRangeChart: a };
97
+ return { renderCartesianChart: e, renderPolarChart: r, renderRangeChart: a };
98
98
  }
99
- class I extends Error {
99
+ class w extends Error {
100
100
  locator;
101
- constructor(t, a, r) {
102
- super(t, r), this.name = "DataPosError", this.locator = a, Error.captureStackTrace?.(this, new.target);
101
+ constructor(r, a, t) {
102
+ super(r, t), this.name = "DataPosError", this.locator = a, Error.captureStackTrace?.(this, new.target);
103
103
  }
104
104
  }
105
- class p extends I {
106
- constructor(t, a, r) {
107
- super(t, a, r), this.name = "ApplicationError";
105
+ class h extends w {
106
+ constructor(r, a, t) {
107
+ super(r, a, t), this.name = "ApplicationError";
108
108
  }
109
109
  }
110
- class B extends p {
111
- constructor(t, a, r) {
112
- super(t, a, r), this.name = "APIError";
110
+ class J extends h {
111
+ constructor(r, a, t) {
112
+ super(r, a, t), this.name = "APIError";
113
113
  }
114
114
  }
115
- class H extends p {
116
- constructor(t, a, r) {
117
- super(t, a, r), this.name = "EngineError";
115
+ class P extends h {
116
+ constructor(r, a, t) {
117
+ super(r, a, t), this.name = "EngineError";
118
118
  }
119
119
  }
120
- class v extends p {
120
+ class v extends h {
121
121
  body;
122
- constructor(t, a, r, o) {
123
- super(t, a, o), this.name = "FetchError", this.body = r;
122
+ constructor(r, a, t, n) {
123
+ super(r, a, n), this.name = "FetchError", this.body = t;
124
124
  }
125
125
  }
126
- class N extends p {
126
+ class N extends h {
127
127
  componentName;
128
128
  info;
129
- constructor(t, a, r, o, n) {
130
- super(t, a, n), this.name = "VueHandledError", this.info = r, this.componentName = o;
129
+ constructor(r, a, t, n, o) {
130
+ super(r, a, o), this.name = "VueHandledError", this.info = t, this.componentName = n;
131
131
  }
132
132
  }
133
- class J extends p {
134
- constructor(t, a, r) {
135
- super(t, a, r), this.name = "WindowHandledRuntimeError";
133
+ class z extends h {
134
+ constructor(r, a, t) {
135
+ super(r, a, t), this.name = "WindowHandledRuntimeError";
136
136
  }
137
137
  }
138
- class z extends p {
139
- constructor(t, a, r) {
140
- super(t, a, r), this.name = "WindowHandledPromiseRejectionError";
138
+ class W extends h {
139
+ constructor(r, a, t) {
140
+ super(r, a, t), this.name = "WindowHandledPromiseRejectionError";
141
141
  }
142
142
  }
143
- class W extends I {
144
- constructor(t, a, r) {
145
- super(t, a, r), this.name = "OperationalError";
143
+ class V extends w {
144
+ constructor(r, a, t) {
145
+ super(r, a, t), this.name = "OperationalError";
146
146
  }
147
147
  }
148
- async function P(e, t, a) {
149
- const r = `${t} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, o = await e.text();
150
- return new v(r, a, o);
148
+ async function X(e, r, a) {
149
+ const t = `${r} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, n = await e.text();
150
+ return new v(t, a, n);
151
151
  }
152
- function V(e) {
153
- return e.map((t) => t.message).join(" ");
152
+ function G(e) {
153
+ return e.map((r) => r.message).join(" ");
154
154
  }
155
- function X(e, t = "Unknown error.") {
155
+ function K(e, r = "Unknown error.") {
156
156
  if (e instanceof Error) return e;
157
157
  if (typeof e == "string") return new Error(e);
158
158
  try {
159
- return new Error(JSON.stringify(e ?? t));
159
+ return new Error(JSON.stringify(e ?? r));
160
160
  } catch {
161
- return new Error(t);
161
+ return new Error(r);
162
162
  }
163
163
  }
164
- function G(e) {
165
- const t = /* @__PURE__ */ new Set(), a = [];
166
- let r = e;
167
- for (; r && !t.has(r); ) {
168
- t.add(r);
169
- let o;
170
- if (r instanceof v)
171
- o = { body: r.body, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
172
- else if (r instanceof N)
173
- o = { componentName: r.componentName, info: r.info, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
174
- else if (r instanceof I)
175
- o = { locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
176
- else if (r instanceof Error) {
177
- const n = r;
178
- o = { locator: "", message: n.message, name: n.name, stack: n.stack }, r = n.cause;
179
- } else r ? (o = { locator: "", message: String(r), name: "Error" }, r = void 0) : (o = { locator: "", message: "Unknown error.", name: "Error" }, r = void 0);
180
- /(?:\.{3}|[.!?])$/.test(o.message) || (o.message += "."), a.push(o);
164
+ function Z(e) {
165
+ const r = /* @__PURE__ */ new Set(), a = [];
166
+ let t = e;
167
+ for (; t && !r.has(t); ) {
168
+ r.add(t);
169
+ let n;
170
+ if (t instanceof v)
171
+ n = { body: t.body, locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
172
+ else if (t instanceof N)
173
+ n = { componentName: t.componentName, info: t.info, locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
174
+ else if (t instanceof w)
175
+ n = { locator: t.locator, message: t.message, name: t.name, stack: t.stack }, t = t.cause;
176
+ else if (t instanceof Error) {
177
+ const o = t;
178
+ n = { locator: "", message: o.message, name: o.name, stack: o.stack }, t = o.cause;
179
+ } else t ? (n = { locator: "", message: String(t), name: "Error" }, t = void 0) : (n = { locator: "", message: "Unknown error.", name: "Error" }, t = void 0);
180
+ /(?:\.{3}|[.!?])$/.test(n.message) || (n.message += "."), a.push(n);
181
181
  }
182
182
  return a;
183
183
  }
184
- const D = "en-US", x = {}, K = (e) => {
184
+ const D = "en-US", E = {}, q = (e) => {
185
185
  switch (e) {
186
186
  case "Edm.Binary":
187
187
  return "unknown";
@@ -220,41 +220,41 @@ const D = "en-US", x = {}, K = (e) => {
220
220
  default:
221
221
  return "unknown";
222
222
  }
223
- }, Z = (e) => {
223
+ }, Q = (e) => {
224
224
  if (e) {
225
- const t = e.lastIndexOf("/"), a = e.lastIndexOf(".", t > -1 ? t : e.length);
225
+ const r = e.lastIndexOf("/"), a = e.lastIndexOf(".", r > -1 ? r : e.length);
226
226
  return a > -1 ? e.substring(0, a) : e;
227
227
  }
228
- }, q = (e) => {
228
+ }, Y = (e) => {
229
229
  if (e) {
230
- const t = e.lastIndexOf(".");
231
- if (t > -1) return e.substring(t + 1);
230
+ const r = e.lastIndexOf(".");
231
+ if (r > -1) return e.substring(r + 1);
232
232
  }
233
- }, i = (e, t = 2, a = t, r = D) => {
233
+ }, l = (e, r = 2, a = r, t = D) => {
234
234
  if (e == null) return "";
235
- const o = `${r}decimal${t}.${a}`;
236
- let n = x[o];
237
- return n || (n = new Intl.NumberFormat(r, {
235
+ const n = `${t}decimal${r}.${a}`;
236
+ let o = E[n];
237
+ return o || (o = new Intl.NumberFormat(t, {
238
238
  localeMatcher: "best fit",
239
- maximumFractionDigits: t,
239
+ maximumFractionDigits: r,
240
240
  minimumFractionDigits: a,
241
241
  minimumIntegerDigits: 1,
242
242
  style: "decimal",
243
243
  useGrouping: !0
244
- }), x[o] = n), n.format(e);
245
- }, Q = (e) => e == null ? "" : e < 1e3 ? E(e) : e < 1e6 ? `${i(e / 1e3, 2, 0)}K` : e < 1e9 ? `${i(e / 1e6, 2, 0)}M` : e < 1e12 ? `${i(e / 1e9, 2, 0)}B` : `${i(e / 1e12, 2, 0)}T`, Y = (e) => e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${E(e)} bytes` : e < 1048576 ? `${i(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${i(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${i(e / 1073741824, 2, 0)} GB` : `${i(e / 1099511627776, 2, 0)} TB`, ee = (e) => e == null ? "" : e < 1e3 ? `${E(e)} ms` : e === 1e3 ? `${E(e)} sec` : e < 6e4 ? `${i(e / 1e3, 2, 0)} secs` : e === 6e4 ? "1 min" : e < 36e5 ? `${i(e / 6e4, 2, 0)} mins` : e === 36e5 ? "1 hr" : e < 864e5 ? `${i(e / 36e5, 2, 0)} hrs` : e === 864e5 ? "1 day" : `${i(e / 864e5, 2, 0)} days`, E = (e, t = D) => {
244
+ }), E[n] = o), o.format(e);
245
+ }, ee = (e) => e == null ? "" : e < 1e3 ? x(e) : e < 1e6 ? `${l(e / 1e3, 2, 0)}K` : e < 1e9 ? `${l(e / 1e6, 2, 0)}M` : e < 1e12 ? `${l(e / 1e9, 2, 0)}B` : `${l(e / 1e12, 2, 0)}T`, te = (e) => e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${x(e)} bytes` : e < 1048576 ? `${l(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${l(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${l(e / 1073741824, 2, 0)} GB` : `${l(e / 1099511627776, 2, 0)} TB`, re = (e) => e == null ? "" : e < 1e3 ? `${x(e)} ms` : e === 1e3 ? `${x(e)} sec` : e < 6e4 ? `${l(e / 1e3, 2, 0)} secs` : e === 6e4 ? "1 min" : e < 36e5 ? `${l(e / 6e4, 2, 0)} mins` : e === 36e5 ? "1 hr" : e < 864e5 ? `${l(e / 36e5, 2, 0)} hrs` : e === 864e5 ? "1 day" : `${l(e / 864e5, 2, 0)} days`, x = (e, r = D) => {
246
246
  if (e == null) return "";
247
- const a = `${t}decimal0.0`;
248
- let r = x[a];
249
- return r || (r = new Intl.NumberFormat(t, {
247
+ const a = `${r}decimal0.0`;
248
+ let t = E[a];
249
+ return t || (t = new Intl.NumberFormat(r, {
250
250
  localeMatcher: "best fit",
251
251
  maximumFractionDigits: 0,
252
252
  minimumFractionDigits: 0,
253
253
  minimumIntegerDigits: 1,
254
254
  style: "decimal",
255
255
  useGrouping: !0
256
- }), x[a] = r), r.format(e);
257
- }, re = (e) => {
256
+ }), E[a] = t), t.format(e);
257
+ }, ae = (e) => {
258
258
  switch (e) {
259
259
  case "csv":
260
260
  return "text/csv";
@@ -268,7 +268,7 @@ const D = "en-US", x = {}, K = (e) => {
268
268
  default:
269
269
  return "application/octet-stream";
270
270
  }
271
- }, A = [
271
+ }, O = [
272
272
  { id: "dtv", label: { "en-gb": "Delimited Text" } },
273
273
  { id: "e/e", label: { "en-gb": "Entity/Event" } },
274
274
  { id: "jsonArray", label: { "en-gb": "JSON Array" } },
@@ -276,22 +276,22 @@ const D = "en-US", x = {}, K = (e) => {
276
276
  { id: "xls", label: { "en-gb": "XLS" } },
277
277
  { id: "xlsx", label: { "en-gb": "XLSX" } },
278
278
  { id: "xml", label: { "en-gb": "XML" } }
279
- ], te = (e = d) => {
280
- const t = [];
281
- for (const a of A) t.push({ ...a, label: a.label[e] || a.label[d] || a.id });
282
- return t;
283
- }, C = [
279
+ ], ne = (e = g) => {
280
+ const r = [];
281
+ for (const a of O) r.push({ ...a, label: a.label[e] || a.label[g] || a.id });
282
+ return r;
283
+ }, R = [
284
284
  { id: `
285
285
  `, label: { "en-gb": "Newline" } },
286
286
  { id: "\r", label: { "en-gb": "Carriage Return" } },
287
287
  { id: `\r
288
288
  `, label: { "en-gb": "Carriage Return/Newline" } }
289
- ], ae = (e = d) => {
290
- const t = [];
291
- for (const a of C)
292
- t.push({ ...a, label: a.label[e] || a.label[d] || a.id });
293
- return t;
294
- }, $ = [
289
+ ], oe = (e = g) => {
290
+ const r = [];
291
+ for (const a of R)
292
+ r.push({ ...a, label: a.label[e] || a.label[g] || a.id });
293
+ return r;
294
+ }, A = [
295
295
  { id: ":", label: { "en-gb": "Colon" } },
296
296
  { id: ",", label: { "en-gb": "Comma" } },
297
297
  { id: "!", label: { "en-gb": "Exclamation Mark" } },
@@ -303,12 +303,12 @@ const D = "en-US", x = {}, K = (e) => {
303
303
  { id: "_", label: { "en-gb": "Underscore" } },
304
304
  { id: "0x1F", label: { "en-gb": "Unit Separator" } },
305
305
  { id: "|", label: { "en-gb": "Vertical Bar" } }
306
- ], ne = (e = d) => {
307
- const t = [];
308
- for (const a of $)
309
- t.push({ ...a, label: a.label[e] || a.label[d] || a.id });
310
- return t;
311
- }, R = [
306
+ ], se = (e = g) => {
307
+ const r = [];
308
+ for (const a of A)
309
+ r.push({ ...a, label: a.label[e] || a.label[g] || a.id });
310
+ return r;
311
+ }, C = [
312
312
  { id: "alpha", color: "red", label: { "en-gb": "alpha" } },
313
313
  { id: "beta", color: "amber", label: { "en-gb": "beta" } },
314
314
  { id: "generalAvailability", color: "green", label: { "en-gb": "" } },
@@ -318,52 +318,57 @@ const D = "en-US", x = {}, K = (e) => {
318
318
  { id: "releaseCandidate", color: "green", label: { "en-gb": "release-candidate" } },
319
319
  { id: "unavailable", color: "other", label: { "en-gb": "unavailable" } },
320
320
  { id: "underReview", color: "other", label: { "en-gb": "under-review" } }
321
- ], oe = (e, t = d) => {
322
- const a = R.find((r) => r.id === e);
323
- return a ? { ...a, label: a.label[t] || a.label[d] || e } : { id: e, color: "other", label: e };
324
- };
325
- async function se() {
321
+ ], ie = (e, r = g) => {
322
+ const a = C.find((t) => t.id === e);
323
+ return a ? { ...a, label: a.label[r] || a.label[g] || e } : { id: e, color: "other", label: e };
324
+ }, $ = ["createObject", "dropObject", "removeRecords", "upsertRecords"], _ = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
325
+ async function le() {
326
326
  try {
327
- const e = await JSON.parse(await y.readFile("package.json", "utf8")), t = await JSON.parse(await y.readFile("config.json", "utf8")), a = await y.readFile("src/index.ts", "utf8"), r = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, o = [...a.matchAll(r)].filter((n) => !n[1] && n[2] !== "constructor").map((n) => n[2]);
328
- e.name && (t.id = e.name), t.operations = o, e.version && (t.version = e.version), await y.writeFile("config.json", JSON.stringify(t, void 0, 4), "utf8");
327
+ const e = await JSON.parse(await y.readFile("package.json", "utf8")), r = await JSON.parse(await y.readFile("config.json", "utf8")), a = await y.readFile("src/index.ts", "utf8");
328
+ let t = !1, n = !1;
329
+ const o = /^\s{4}(?:async\s+)?(private\s+)?(?:public\s+|protected\s+)?([A-Za-z_]\w*)\s*\(/gm, s = [...a.matchAll(o)].filter((d) => !d[1] && d[2] !== "constructor").map((d) => {
330
+ const i = d[2];
331
+ return t = t || $.includes(i), n = n || _.includes(i), i;
332
+ }), c = n && t ? "bidirectional" : n ? "source" : t ? "destination" : void 0;
333
+ e.name && (r.id = e.name), r.operations = s, c && (r.usageId = c), e.version && (r.version = e.version), await y.writeFile("config.json", JSON.stringify(r, void 0, 4), "utf8");
329
334
  } catch (e) {
330
335
  console.warn("Error building connector configuration.", e);
331
336
  }
332
337
  }
333
- const d = "en-gb";
338
+ const g = "en-gb";
334
339
  export {
335
- B as APIError,
336
- p as ApplicationError,
337
- d as DEFAULT_LOCALE_CODE,
340
+ J as APIError,
341
+ h as ApplicationError,
342
+ g as DEFAULT_LOCALE_CODE,
338
343
  L as DefaultTimestamp,
339
- H as EngineError,
344
+ P as EngineError,
340
345
  v as FetchError,
341
- W as OperationalError,
346
+ V as OperationalError,
342
347
  N as VueError,
343
- z as WindowPromiseRejectionError,
344
- J as WindowRuntimeError,
345
- se as buildConnectorConfig,
346
- P as buildFetchError,
347
- V as concatenateSerialisedErrorMessages,
348
- O as convertMillisecondsToTimestamp,
349
- K as convertODataTypeIdToUsageTypeId,
350
- q as extractExtensionFromPath,
351
- Z as extractNameFromPath,
352
- i as formatNumberAsDecimalNumber,
353
- ee as formatNumberAsDuration,
354
- Q as formatNumberAsSize,
355
- Y as formatNumberAsStorageSize,
356
- E as formatNumberAsWholeNumber,
357
- oe as getComponentStatus,
358
- _ as getCurrentTimestamp,
359
- te as getDataFormats,
360
- ae as getRecordDelimiters,
361
- ne as getValueDelimiters,
362
- re as lookupMimeTypeForExtension,
363
- X as normalizeToError,
364
- k as presentationViewTypeMap,
365
- G as serialiseError,
366
- M as useCytoscapeJS,
367
- U as useDataTable,
368
- j as useHighcharts
348
+ W as WindowPromiseRejectionError,
349
+ z as WindowRuntimeError,
350
+ le as buildConnectorConfig,
351
+ X as buildFetchError,
352
+ G as concatenateSerialisedErrorMessages,
353
+ k as convertMillisecondsToTimestamp,
354
+ q as convertODataTypeIdToUsageTypeId,
355
+ Y as extractExtensionFromPath,
356
+ Q as extractNameFromPath,
357
+ l as formatNumberAsDecimalNumber,
358
+ re as formatNumberAsDuration,
359
+ ee as formatNumberAsSize,
360
+ te as formatNumberAsStorageSize,
361
+ x as formatNumberAsWholeNumber,
362
+ ie as getComponentStatus,
363
+ j as getCurrentTimestamp,
364
+ ne as getDataFormats,
365
+ oe as getRecordDelimiters,
366
+ se as getValueDelimiters,
367
+ ae as lookupMimeTypeForExtension,
368
+ K as normalizeToError,
369
+ M as presentationViewTypeMap,
370
+ Z as serialiseError,
371
+ U as useCytoscapeJS,
372
+ B as useDataTable,
373
+ H as useHighcharts
369
374
  };
@@ -1,3 +1,6 @@
1
+ /**
2
+ * Application utilities.
3
+ */
1
4
  export declare const convertODataTypeIdToUsageTypeId: (oDataTypeId: string) => string;
2
5
  export declare const extractNameFromPath: (itemPath: string) => string | undefined;
3
6
  export declare const extractExtensionFromPath: (itemPath: string) => string | undefined;
@@ -6,7 +6,7 @@ import { buildFetchError, OperationalError } from '../../errors';
6
6
  import { ConnectionConfig, ConnectionDescription, ConnectionNodeConfig } from './connection';
7
7
  import { convertMillisecondsToTimestamp, LocalisedString } from '../../index';
8
8
  import { DataViewContentAuditConfig, ValueDelimiterId } from '../dataView';
9
- import { extractExtensionFromPath, extractNameFromPath, lookupMimeTypeForExtension } from '../../utilities';
9
+ import { extractExtensionFromPath, extractNameFromPath, lookupMimeTypeForExtension } from '../../appUtilities';
10
10
  export interface Connector {
11
11
  abortController?: AbortController | undefined;
12
12
  readonly config: ConnectorConfig;
@@ -2,3 +2,4 @@
2
2
  * Development utilities.
3
3
  */
4
4
  export declare function buildConnectorConfig(): Promise<void>;
5
+ export declare function buildContextConfig(): Promise<void>;
@@ -51,10 +51,10 @@ export { type HighchartsView, useHighcharts } from './composables/useHighcharts'
51
51
  export { APIError, ApplicationError, EngineError, FetchError, OperationalError, VueError, WindowRuntimeError, WindowPromiseRejectionError } from './errors';
52
52
  export { buildFetchError, concatenateSerialisedErrorMessages, normalizeToError, serialiseError } from './errors';
53
53
  export { convertMillisecondsToTimestamp, getCurrentTimestamp } from './timestamp';
54
- export { convertODataTypeIdToUsageTypeId } from './utilities';
55
- export { extractExtensionFromPath, extractNameFromPath } from './utilities';
56
- export { formatNumberAsDecimalNumber, formatNumberAsDuration, formatNumberAsSize, formatNumberAsStorageSize, formatNumberAsWholeNumber } from './utilities';
54
+ export { convertODataTypeIdToUsageTypeId } from './appUtilities';
55
+ export { extractExtensionFromPath, extractNameFromPath } from './appUtilities';
56
+ export { formatNumberAsDecimalNumber, formatNumberAsDuration, formatNumberAsSize, formatNumberAsStorageSize, formatNumberAsWholeNumber } from './appUtilities';
57
57
  export { getDataFormats, getRecordDelimiters, getValueDelimiters } from './component/dataView';
58
58
  export { getComponentStatus } from './component';
59
- export { lookupMimeTypeForExtension } from './utilities';
59
+ export { lookupMimeTypeForExtension } from './appUtilities';
60
60
  export { buildConnectorConfig } from './devUtilities';
@@ -20,30 +20,32 @@ export interface ConnectorModuleConfig extends ModuleConfig {
20
20
  implementations: Record<string, unknown>;
21
21
  icon: string;
22
22
  iconDark: string;
23
- operations: ConnectorModuleInterface[];
23
+ operations: ConnectorModuleOperation[];
24
24
  typeId: 'connector';
25
- usageId: ConnectorModuleUsageId;
25
+ usageId?: ConnectorModuleUsageId;
26
26
  vendorAccountURL?: string;
27
27
  vendorDocumentationURL?: string;
28
28
  vendorHomeURL?: string;
29
29
  }
30
30
  type ConnectorModuleCategoryId = 'application' | 'curatedDataset' | 'database' | 'fileStore';
31
- export type ConnectorModuleInterface = 'abortOperation' | 'authenticateConnection' | 'createObject' | 'describeConnection' | 'dropObject' | 'findObject' | 'getRecord' | 'listNodes' | 'previewObject' | 'removeRecords' | 'retrieveRecords' | 'upsertRecords';
32
- type ConnectorModuleUsageId = 'bidirectional' | 'destination' | 'source';
31
+ export type ConnectorModuleOperation = 'abortOperation' | 'authenticateConnection' | 'createObject' | 'describeConnection' | 'dropObject' | 'findObject' | 'getRecord' | 'listNodes' | 'previewObject' | 'removeRecords' | 'retrieveRecords' | 'upsertRecords';
32
+ export type ConnectorModuleUsageId = 'bidirectional' | 'destination' | 'source';
33
+ export declare const CONNECTOR_DESTINATION_OPERATIONS: string[];
34
+ export declare const CONNECTOR_SOURCE_OPERATIONS: string[];
33
35
  export interface ContextModuleConfig extends ModuleConfig {
34
- interfaces: ContextModuleInterface[];
36
+ operations: ContextModuleOperation[];
35
37
  models: ContextModelGroupConfig[];
36
38
  typeId: 'context';
37
39
  }
38
- type ContextModuleInterface = 'list';
40
+ export type ContextModuleOperation = 'list';
39
41
  export interface InformerModuleConfig extends ModuleConfig {
40
- interfaces: InformerModuleInterface[];
42
+ operations: InformerModuleOperation[];
41
43
  typeId: 'informer';
42
44
  }
43
- type InformerModuleInterface = 'list' | 'render';
45
+ export type InformerModuleOperation = 'list' | 'render';
44
46
  export interface PresenterModuleConfig extends ModuleConfig {
45
- interfaces: PresenterModuleInterface[];
47
+ operations: PresenterModuleOperation[];
46
48
  typeId: 'presenter';
47
49
  }
48
- type PresenterModuleInterface = 'list' | 'render';
50
+ export type PresenterModuleOperation = 'list' | 'render';
49
51
  export {};
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@datapos/datapos-shared",
3
3
  "license": "MIT",
4
4
  "private": false,
5
- "version": "0.3.120",
5
+ "version": "0.3.122",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"