@synnaxlabs/client 0.38.0 → 0.38.1
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/.turbo/turbo-build.log +5 -5
- package/dist/channel/client.d.ts +2 -2
- package/dist/channel/client.d.ts.map +1 -1
- package/dist/client.cjs +11 -11
- package/dist/client.js +611 -576
- package/dist/ontology/client.d.ts.map +1 -1
- package/dist/ranger/client.d.ts.map +1 -1
- package/dist/workspace/client.d.ts.map +1 -1
- package/dist/workspace/lineplot/client.d.ts.map +1 -1
- package/dist/workspace/log/client.d.ts.map +1 -1
- package/dist/workspace/schematic/client.d.ts.map +1 -1
- package/dist/workspace/table/client.d.ts.map +1 -1
- package/eslint.config.js +1 -1
- package/examples/node/basicReadWrite.js +1 -1
- package/examples/node/liveStream.js +1 -1
- package/examples/node/seriesAndFrames.js +1 -1
- package/examples/node/streamWrite.js +1 -1
- package/package.json +5 -5
- package/src/access/client.ts +1 -1
- package/src/access/external.ts +1 -1
- package/src/access/index.ts +1 -1
- package/src/access/payload.ts +1 -1
- package/src/access/policy/client.ts +1 -1
- package/src/access/policy/external.ts +1 -1
- package/src/access/policy/index.ts +1 -1
- package/src/access/policy/payload.ts +1 -1
- package/src/access/policy/policy.spec.ts +1 -1
- package/src/access/policy/retriever.ts +1 -1
- package/src/access/policy/writer.ts +1 -1
- package/src/auth/auth.spec.ts +1 -1
- package/src/auth/auth.ts +1 -1
- package/src/auth/index.ts +1 -1
- package/src/channel/batchRetriever.spec.ts +1 -1
- package/src/channel/channel.spec.ts +1 -1
- package/src/channel/client.ts +5 -3
- package/src/channel/creator.ts +1 -1
- package/src/channel/external.ts +1 -1
- package/src/channel/index.ts +1 -1
- package/src/channel/payload.ts +1 -1
- package/src/channel/retriever.ts +1 -1
- package/src/channel/writer.ts +1 -1
- package/src/client.ts +1 -1
- package/src/connection/checker.ts +1 -1
- package/src/connection/connection.spec.ts +1 -1
- package/src/connection/index.ts +1 -1
- package/src/control/client.ts +1 -1
- package/src/control/external.ts +1 -1
- package/src/control/index.ts +1 -1
- package/src/control/state.spec.ts +1 -1
- package/src/control/state.ts +1 -1
- package/src/errors.spec.ts +1 -1
- package/src/errors.ts +1 -1
- package/src/framer/adapter.spec.ts +1 -1
- package/src/framer/adapter.ts +1 -1
- package/src/framer/client.spec.ts +1 -1
- package/src/framer/client.ts +1 -1
- package/src/framer/deleter.spec.ts +1 -1
- package/src/framer/deleter.ts +1 -1
- package/src/framer/external.ts +1 -1
- package/src/framer/frame.spec.ts +1 -1
- package/src/framer/frame.ts +1 -1
- package/src/framer/index.ts +1 -1
- package/src/framer/iterator.spec.ts +1 -1
- package/src/framer/iterator.ts +1 -1
- package/src/framer/streamProxy.ts +2 -2
- package/src/framer/streamer.spec.ts +1 -1
- package/src/framer/streamer.ts +1 -1
- package/src/framer/writer.spec.ts +1 -1
- package/src/framer/writer.ts +1 -1
- package/src/hardware/client.ts +1 -1
- package/src/hardware/device/client.ts +1 -1
- package/src/hardware/device/device.spec.ts +1 -1
- package/src/hardware/device/external.ts +1 -1
- package/src/hardware/device/index.ts +1 -1
- package/src/hardware/device/payload.ts +1 -1
- package/src/hardware/external.ts +1 -1
- package/src/hardware/index.ts +1 -1
- package/src/hardware/rack/client.ts +1 -1
- package/src/hardware/rack/external.ts +1 -1
- package/src/hardware/rack/index.ts +1 -1
- package/src/hardware/rack/payload.ts +1 -1
- package/src/hardware/rack/rack.spec.ts +1 -1
- package/src/hardware/task/client.ts +1 -1
- package/src/hardware/task/external.ts +1 -1
- package/src/hardware/task/index.ts +1 -1
- package/src/hardware/task/payload.ts +1 -1
- package/src/hardware/task/task.spec.ts +1 -1
- package/src/index.ts +1 -1
- package/src/label/client.ts +1 -1
- package/src/label/external.ts +1 -1
- package/src/label/index.ts +1 -1
- package/src/label/label.spec.ts +1 -1
- package/src/label/payload.ts +1 -1
- package/src/label/retriever.ts +1 -1
- package/src/label/writer.ts +1 -1
- package/src/ontology/client.ts +14 -7
- package/src/ontology/external.ts +1 -1
- package/src/ontology/group/client.ts +1 -1
- package/src/ontology/group/external.ts +1 -1
- package/src/ontology/group/group.spec.ts +1 -1
- package/src/ontology/group/group.ts +1 -1
- package/src/ontology/group/index.ts +1 -1
- package/src/ontology/group/payload.ts +1 -1
- package/src/ontology/group/writer.ts +1 -1
- package/src/ontology/index.ts +1 -1
- package/src/ontology/ontology.spec.ts +1 -1
- package/src/ontology/payload.ts +1 -1
- package/src/ontology/writer.ts +1 -1
- package/src/ranger/alias.ts +1 -1
- package/src/ranger/client.ts +5 -3
- package/src/ranger/external.ts +1 -1
- package/src/ranger/index.ts +1 -1
- package/src/ranger/kv.ts +1 -1
- package/src/ranger/payload.ts +1 -1
- package/src/ranger/ranger.spec.ts +1 -1
- package/src/ranger/writer.ts +1 -1
- package/src/setupspecs.ts +1 -1
- package/src/signals/external.ts +1 -1
- package/src/signals/index.ts +1 -1
- package/src/signals/observable.ts +1 -1
- package/src/transport.ts +1 -1
- package/src/user/client.ts +1 -1
- package/src/user/external.ts +1 -1
- package/src/user/index.ts +1 -1
- package/src/user/payload.ts +1 -1
- package/src/user/retriever.ts +1 -1
- package/src/user/user.spec.ts +1 -1
- package/src/user/writer.ts +1 -1
- package/src/util/retrieve.spec.ts +1 -1
- package/src/util/retrieve.ts +1 -1
- package/src/util/telem.ts +1 -1
- package/src/util/zod.ts +1 -1
- package/src/vite-env.d.ts +1 -1
- package/src/workspace/client.ts +11 -2
- package/src/workspace/index.ts +1 -1
- package/src/workspace/lineplot/client.ts +9 -0
- package/src/workspace/lineplot/index.ts +1 -1
- package/src/workspace/lineplot/linePlot.spec.ts +1 -1
- package/src/workspace/log/client.ts +9 -0
- package/src/workspace/log/index.ts +1 -1
- package/src/workspace/log/log.spec.ts +1 -1
- package/src/workspace/schematic/client.ts +9 -0
- package/src/workspace/schematic/index.ts +1 -1
- package/src/workspace/schematic/schematic.spec.ts +1 -1
- package/src/workspace/table/client.ts +9 -0
- package/src/workspace/table/index.ts +1 -1
- package/src/workspace/table/table.spec.ts +1 -1
- package/src/workspace/workspace.spec.ts +1 -1
- package/vite.config.ts +1 -1
package/dist/client.js
CHANGED
|
@@ -18,8 +18,8 @@ const po = (n) => {
|
|
|
18
18
|
let l = a[o];
|
|
19
19
|
const u = n(o);
|
|
20
20
|
r.recursive && (Yn(l) ? Fr(l, r.keepTypesOnRecursion) || (l = e(l, r)) : r.recursiveInArray && Gr(l) && (l = [...l].map((h) => {
|
|
21
|
-
let
|
|
22
|
-
return Yn(h) ? Fr(
|
|
21
|
+
let f = h;
|
|
22
|
+
return Yn(h) ? Fr(f, r.keepTypesOnRecursion) || (f = e(h, r)) : Gr(h) && (f = e({ key: h }, r).key), f;
|
|
23
23
|
}))), i[u] = l;
|
|
24
24
|
}), i;
|
|
25
25
|
};
|
|
@@ -27,7 +27,10 @@ const po = (n) => {
|
|
|
27
27
|
}, Ws = zs(po), mo = (n) => (
|
|
28
28
|
// Don't convert the first character and don't convert a character that is after a
|
|
29
29
|
// non-alphanumeric character
|
|
30
|
-
n.replace(
|
|
30
|
+
n.replace(
|
|
31
|
+
/([a-z0-9])([A-Z])/g,
|
|
32
|
+
(e, t, r) => `${t}_${r.toLowerCase()}`
|
|
33
|
+
)
|
|
31
34
|
), wo = zs(mo), dr = {
|
|
32
35
|
recursive: !0,
|
|
33
36
|
recursiveInArray: !0,
|
|
@@ -87,8 +90,8 @@ let Oo = class {
|
|
|
87
90
|
}), r.forEach((o) => {
|
|
88
91
|
const l = o.split(",").map((u) => u.trim());
|
|
89
92
|
i.forEach((u, h) => {
|
|
90
|
-
const
|
|
91
|
-
|
|
93
|
+
const f = this.parseValue(l[h]);
|
|
94
|
+
f != null && a[u].push(f);
|
|
92
95
|
});
|
|
93
96
|
}), e != null ? e.parse(a) : a;
|
|
94
97
|
}
|
|
@@ -248,8 +251,8 @@ const Ko = (n) => (e, t, r, i) => t === "dimension" ? [e, r] : [
|
|
|
248
251
|
if (e === null) return [n, r];
|
|
249
252
|
const { lower: i, upper: a } = e, { lower: o, upper: l } = n, u = a - i, h = l - o;
|
|
250
253
|
if (t === "dimension") return [n, r * (h / u)];
|
|
251
|
-
const
|
|
252
|
-
return [n,
|
|
254
|
+
const f = (r - i) * (h / u) + o;
|
|
255
|
+
return [n, f];
|
|
253
256
|
}, Qo = (n) => (e, t, r) => [n, r], ec = () => (n, e, t) => {
|
|
254
257
|
if (n === null) throw new Error("cannot invert without bounds");
|
|
255
258
|
if (e === "dimension") return [n, t];
|
|
@@ -882,9 +885,9 @@ const C = class E {
|
|
|
882
885
|
);
|
|
883
886
|
}
|
|
884
887
|
toString() {
|
|
885
|
-
const e = this.truncate(E.DAY), t = this.truncate(E.HOUR), r = this.truncate(E.MINUTE), i = this.truncate(E.SECOND), a = this.truncate(E.MILLISECOND), o = this.truncate(E.MICROSECOND), l = this.truncate(E.NANOSECOND), u = e, h = t.sub(e),
|
|
888
|
+
const e = this.truncate(E.DAY), t = this.truncate(E.HOUR), r = this.truncate(E.MINUTE), i = this.truncate(E.SECOND), a = this.truncate(E.MILLISECOND), o = this.truncate(E.MICROSECOND), l = this.truncate(E.NANOSECOND), u = e, h = t.sub(e), f = r.sub(t), d = i.sub(r), M = a.sub(i), A = o.sub(a), re = l.sub(o);
|
|
886
889
|
let q = "";
|
|
887
|
-
return u.isZero || (q += `${u.days}d `), h.isZero || (q += `${h.hours}h `),
|
|
890
|
+
return u.isZero || (q += `${u.days}d `), h.isZero || (q += `${h.hours}h `), f.isZero || (q += `${f.minutes}m `), d.isZero || (q += `${d.seconds}s `), M.isZero || (q += `${M.milliseconds}ms `), A.isZero || (q += `${A.microseconds}µs `), re.isZero || (q += `${re.nanoseconds}ns`), q.trim();
|
|
888
891
|
}
|
|
889
892
|
mult(e) {
|
|
890
893
|
return new E(this.valueOf() * BigInt(e));
|
|
@@ -1449,9 +1452,9 @@ const V = class Y extends Number {
|
|
|
1449
1452
|
return this.valueOf() / Y.TERABYTE.valueOf();
|
|
1450
1453
|
}
|
|
1451
1454
|
toString() {
|
|
1452
|
-
const e = this.truncate(Y.TERABYTE), t = this.truncate(Y.GIGABYTE), r = this.truncate(Y.MEGABYTE), i = this.truncate(Y.KILOBYTE), a = this.truncate(Y.BYTE), o = e, l = t.sub(e), u = r.sub(t), h = i.sub(r),
|
|
1455
|
+
const e = this.truncate(Y.TERABYTE), t = this.truncate(Y.GIGABYTE), r = this.truncate(Y.MEGABYTE), i = this.truncate(Y.KILOBYTE), a = this.truncate(Y.BYTE), o = e, l = t.sub(e), u = r.sub(t), h = i.sub(r), f = a.sub(i);
|
|
1453
1456
|
let d = "";
|
|
1454
|
-
return o.isZero || (d += `${o.terabytes}TB `), l.isZero || (d += `${l.gigabytes}GB `), u.isZero || (d += `${u.megabytes}MB `), h.isZero || (d += `${h.kilobytes}KB `), (!
|
|
1457
|
+
return o.isZero || (d += `${o.terabytes}TB `), l.isZero || (d += `${l.gigabytes}GB `), u.isZero || (d += `${u.megabytes}MB `), h.isZero || (d += `${h.kilobytes}KB `), (!f.isZero || d === "") && (d += `${f.valueOf()}B`), d.trim();
|
|
1455
1458
|
}
|
|
1456
1459
|
/**
|
|
1457
1460
|
* Creates a Size from the given number of bytes.
|
|
@@ -1548,14 +1551,14 @@ const ti = (n) => {
|
|
|
1548
1551
|
this.key = d.key, this.dataType = d.dataType, this.sampleOffset = d.sampleOffset, this.gl = d.gl, this._data = d._data, this._timeRange = d._timeRange, this.alignment = d.alignment, this._cachedMin = d._cachedMin, this._cachedMax = d._cachedMax, this.writePos = d.writePos, this._refCount = d._refCount, this._cachedLength = d._cachedLength;
|
|
1549
1552
|
return;
|
|
1550
1553
|
}
|
|
1551
|
-
const h = ti(u),
|
|
1554
|
+
const h = ti(u), f = Array.isArray(u);
|
|
1552
1555
|
if (t != null) this.dataType = new R(t);
|
|
1553
1556
|
else {
|
|
1554
1557
|
if (u instanceof ArrayBuffer)
|
|
1555
1558
|
throw new Error(
|
|
1556
1559
|
"cannot infer data type from an ArrayBuffer instance when constructing a Series. Please provide a data type."
|
|
1557
1560
|
);
|
|
1558
|
-
if (
|
|
1561
|
+
if (f || h) {
|
|
1559
1562
|
let d = u;
|
|
1560
1563
|
if (!h) {
|
|
1561
1564
|
if (u.length === 0)
|
|
@@ -1577,7 +1580,7 @@ const ti = (n) => {
|
|
|
1577
1580
|
);
|
|
1578
1581
|
} else this.dataType = new R(u);
|
|
1579
1582
|
}
|
|
1580
|
-
if (!
|
|
1583
|
+
if (!f && !h) this._data = u;
|
|
1581
1584
|
else {
|
|
1582
1585
|
let d = h ? [u] : u;
|
|
1583
1586
|
const M = d[0];
|
|
@@ -2085,22 +2088,21 @@ s.record(
|
|
|
2085
2088
|
s.union([s.number(), s.string(), s.symbol()]),
|
|
2086
2089
|
s.unknown()
|
|
2087
2090
|
);
|
|
2088
|
-
const ni = () => typeof process < "u" && process.versions != null && process.versions.node != null ? "node" : typeof window > "u" || window.document === void 0 ? "webworker" : "browser", mc = ni(), ri = ["
|
|
2089
|
-
macos: "
|
|
2091
|
+
const ni = () => typeof process < "u" && process.versions != null && process.versions.node != null ? "node" : typeof window > "u" || window.document === void 0 ? "webworker" : "browser", mc = ni(), ri = ["macOS", "Windows", "Linux"], wc = ["macos", "windows", "linux"], bc = {
|
|
2092
|
+
macos: "macOS",
|
|
2090
2093
|
windows: "Windows",
|
|
2091
|
-
linux: "Linux"
|
|
2092
|
-
docker: "Docker"
|
|
2094
|
+
linux: "Linux"
|
|
2093
2095
|
}, Tc = s.enum(ri).or(
|
|
2094
2096
|
s.enum(wc).transform((n) => bc[n])
|
|
2095
|
-
)
|
|
2096
|
-
let Wn;
|
|
2097
|
-
const vc = () => {
|
|
2097
|
+
), vc = () => {
|
|
2098
2098
|
if (typeof window > "u") return;
|
|
2099
2099
|
const n = window.navigator.userAgent.toLowerCase();
|
|
2100
|
-
if (n.includes("mac")) return "
|
|
2100
|
+
if (n.includes("mac")) return "macOS";
|
|
2101
2101
|
if (n.includes("win")) return "Windows";
|
|
2102
2102
|
if (n.includes("linux")) return "Linux";
|
|
2103
|
-
}
|
|
2103
|
+
};
|
|
2104
|
+
let Wn;
|
|
2105
|
+
const Oc = (n = {}) => {
|
|
2104
2106
|
const { force: e, default: t } = n;
|
|
2105
2107
|
return e ?? Wn ?? (Wn = vc(), Wn ?? t);
|
|
2106
2108
|
}, si = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -2350,7 +2352,7 @@ class qc extends di {
|
|
|
2350
2352
|
role: "client"
|
|
2351
2353
|
},
|
|
2352
2354
|
async (h) => {
|
|
2353
|
-
const
|
|
2355
|
+
const f = { ...h, params: {} };
|
|
2354
2356
|
l.headers = {
|
|
2355
2357
|
...this.headers,
|
|
2356
2358
|
...h.params
|
|
@@ -2360,18 +2362,18 @@ class qc extends di {
|
|
|
2360
2362
|
d = await hs(h.protocol)(h.target, l);
|
|
2361
2363
|
} catch (A) {
|
|
2362
2364
|
let re = A;
|
|
2363
|
-
return re.message === "Load failed" && (re = new Ne({ url: o })), [
|
|
2365
|
+
return re.message === "Load failed" && (re = new Ne({ url: o })), [f, re];
|
|
2364
2366
|
}
|
|
2365
2367
|
const M = await d.arrayBuffer();
|
|
2366
2368
|
if (d != null && d.ok)
|
|
2367
|
-
return i != null && (a = this.encoder.decode(M, i)), [
|
|
2369
|
+
return i != null && (a = this.encoder.decode(M, i)), [f, null];
|
|
2368
2370
|
try {
|
|
2369
|
-
if (d.status !== 400) return [
|
|
2371
|
+
if (d.status !== 400) return [f, new Error(d.statusText)];
|
|
2370
2372
|
const A = this.encoder.decode(M, Mt), re = gn(A);
|
|
2371
|
-
return [
|
|
2373
|
+
return [f, re];
|
|
2372
2374
|
} catch (A) {
|
|
2373
2375
|
return [
|
|
2374
|
-
|
|
2376
|
+
f,
|
|
2375
2377
|
new Error(
|
|
2376
2378
|
`[freighter] - failed to decode error: ${d.statusText}: ${A.message}`
|
|
2377
2379
|
)
|
|
@@ -2393,9 +2395,9 @@ const Yc = (n, e) => {
|
|
|
2393
2395
|
async send(i, a, o, l) {
|
|
2394
2396
|
const u = Dc.create(e);
|
|
2395
2397
|
do {
|
|
2396
|
-
const [h,
|
|
2397
|
-
if (
|
|
2398
|
-
if (!await u()) return [h,
|
|
2398
|
+
const [h, f] = await this.wrapped.send(i, a, o, l);
|
|
2399
|
+
if (f == null || !Ne.matches(f)) return [h, f];
|
|
2400
|
+
if (!await u()) return [h, f];
|
|
2399
2401
|
} while (!0);
|
|
2400
2402
|
}
|
|
2401
2403
|
}
|
|
@@ -2485,8 +2487,8 @@ const Gc = "freighterctx", Fc = 1e3, Vc = 1001, Jc = [Fc, Vc], Kc = (n) => Jc.in
|
|
|
2485
2487
|
async (l) => {
|
|
2486
2488
|
const u = i(this.buildURL(e, l)), h = { ...l, params: {} };
|
|
2487
2489
|
u.binaryType = gi.MESSAGE_TYPE;
|
|
2488
|
-
const
|
|
2489
|
-
return
|
|
2490
|
+
const f = await this.wrapSocket(u, t, r);
|
|
2491
|
+
return f instanceof Error ? [h, f] : (a = f, [h, null]);
|
|
2490
2492
|
}
|
|
2491
2493
|
);
|
|
2492
2494
|
if (o != null) throw o;
|
|
@@ -2538,8 +2540,8 @@ const pn = s.union([
|
|
|
2538
2540
|
let l = a[o];
|
|
2539
2541
|
const u = n(o);
|
|
2540
2542
|
r.recursive && (Gn(l) ? fs(l, r.keepTypesOnRecursion) || (l = e(l, r)) : r.recursiveInArray && ds(l) && (l = [...l].map((h) => {
|
|
2541
|
-
let
|
|
2542
|
-
return Gn(h) ? fs(
|
|
2543
|
+
let f = h;
|
|
2544
|
+
return Gn(h) ? fs(f, r.keepTypesOnRecursion) || (f = e(h, r)) : ds(h) && (f = e({ key: h }, r).key), f;
|
|
2543
2545
|
}))), i[u] = l;
|
|
2544
2546
|
}), i;
|
|
2545
2547
|
};
|
|
@@ -2547,7 +2549,10 @@ const pn = s.union([
|
|
|
2547
2549
|
}, mi = pi(rl), sl = (n) => (
|
|
2548
2550
|
// Don't convert the first character and don't convert a character that is after a
|
|
2549
2551
|
// non-alphanumeric character
|
|
2550
|
-
n.replace(
|
|
2552
|
+
n.replace(
|
|
2553
|
+
/([a-z0-9])([A-Z])/g,
|
|
2554
|
+
(e, t, r) => `${t}_${r.toLowerCase()}`
|
|
2555
|
+
)
|
|
2551
2556
|
), il = pi(sl), wr = {
|
|
2552
2557
|
recursive: !0,
|
|
2553
2558
|
recursiveInArray: !0,
|
|
@@ -2606,8 +2611,8 @@ let wi = class {
|
|
|
2606
2611
|
o[l] = [];
|
|
2607
2612
|
}), i.forEach((l) => {
|
|
2608
2613
|
const u = l.split(",").map((h) => h.trim());
|
|
2609
|
-
a.forEach((h,
|
|
2610
|
-
const d = this.parseValue(u[
|
|
2614
|
+
a.forEach((h, f) => {
|
|
2615
|
+
const d = this.parseValue(u[f]);
|
|
2611
2616
|
d != null && o[h].push(d);
|
|
2612
2617
|
});
|
|
2613
2618
|
}), t != null ? t.parse(o) : o;
|
|
@@ -2728,11 +2733,11 @@ const lt = (n) => typeof n == "bigint" || n instanceof BigInt, Jn = (n, e) => lt
|
|
|
2728
2733
|
const u = r[l];
|
|
2729
2734
|
let h;
|
|
2730
2735
|
if (i > 0 ? h = Jn(u.upper, o) : h = Jn(o, u.lower), h > 0) {
|
|
2731
|
-
const
|
|
2736
|
+
const f = Pl(Dl(a), h);
|
|
2732
2737
|
if (o = Cl(
|
|
2733
2738
|
o,
|
|
2734
|
-
i > 0 ?
|
|
2735
|
-
), a = Jn(a, i > 0 ?
|
|
2739
|
+
i > 0 ? f : -f
|
|
2740
|
+
), a = Jn(a, i > 0 ? f : -f), ps(a, 0)) return o;
|
|
2736
2741
|
continue;
|
|
2737
2742
|
}
|
|
2738
2743
|
}
|
|
@@ -2837,8 +2842,8 @@ const Gl = (n) => (e, t, r, i) => t === "dimension" ? [e, r] : [
|
|
|
2837
2842
|
if (e === null) return [n, r];
|
|
2838
2843
|
const { lower: i, upper: a } = e, { lower: o, upper: l } = n, u = a - i, h = l - o;
|
|
2839
2844
|
if (t === "dimension") return [n, r * (h / u)];
|
|
2840
|
-
const
|
|
2841
|
-
return [n,
|
|
2845
|
+
const f = (r - i) * (h / u) + o;
|
|
2846
|
+
return [n, f];
|
|
2842
2847
|
}, Jl = (n) => (e, t, r) => [n, r], Kl = () => (n, e, t) => {
|
|
2843
2848
|
if (n === null) throw new Error("cannot invert without bounds");
|
|
2844
2849
|
if (e === "dimension") return [n, t];
|
|
@@ -3033,7 +3038,7 @@ const Os = class ye {
|
|
|
3033
3038
|
};
|
|
3034
3039
|
pe(Os, "IDENTITY", new Os());
|
|
3035
3040
|
const Xl = s.bigint().or(s.string().transform(BigInt));
|
|
3036
|
-
var Ql = Object.defineProperty, eu = (n, e, t) => e in n ? Ql(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t,
|
|
3041
|
+
var Ql = Object.defineProperty, eu = (n, e, t) => e in n ? Ql(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, y = (n, e, t) => eu(n, typeof e != "symbol" ? e + "" : e, t);
|
|
3037
3042
|
let tu = (n, e = 21) => (t = e) => {
|
|
3038
3043
|
let r = "", i = t | 0;
|
|
3039
3044
|
for (; i--; )
|
|
@@ -3061,7 +3066,7 @@ const nu = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", $i
|
|
|
3061
3066
|
return n instanceof k ? new k(r) : new S(r);
|
|
3062
3067
|
}, P = class v {
|
|
3063
3068
|
constructor(e, t = "UTC") {
|
|
3064
|
-
if (
|
|
3069
|
+
if (y(this, "value"), y(this, "encodeValue", !0), e == null) this.value = v.now().valueOf();
|
|
3065
3070
|
else if (e instanceof Date)
|
|
3066
3071
|
this.value = BigInt(e.getTime()) * v.MILLISECOND.valueOf();
|
|
3067
3072
|
else if (typeof e == "string")
|
|
@@ -3419,17 +3424,17 @@ const nu = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", $i
|
|
|
3419
3424
|
return v.hours(e * 24);
|
|
3420
3425
|
}
|
|
3421
3426
|
};
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3427
|
+
y(P, "NANOSECOND", P.nanoseconds(1)), /** One microsecond after the unix epoch */
|
|
3428
|
+
y(P, "MICROSECOND", P.microseconds(1)), /** One millisecond after the unix epoch */
|
|
3429
|
+
y(P, "MILLISECOND", P.milliseconds(1)), /** One second after the unix epoch */
|
|
3430
|
+
y(P, "SECOND", P.seconds(1)), /** One minute after the unix epoch */
|
|
3431
|
+
y(P, "MINUTE", P.minutes(1)), /** One hour after the unix epoch */
|
|
3432
|
+
y(P, "HOUR", P.hours(1)), /** One day after the unix epoch */
|
|
3433
|
+
y(P, "DAY", P.days(1)), /** The maximum possible value for a timestamp */
|
|
3434
|
+
y(P, "MAX", new P((1n << 63n) - 1n)), /** The minimum possible value for a timestamp */
|
|
3435
|
+
y(P, "MIN", new P(0)), /** The unix epoch */
|
|
3436
|
+
y(P, "ZERO", new P(0)), /** A zod schema for validating timestamps */
|
|
3437
|
+
y(P, "z", s.union([
|
|
3433
3438
|
s.object({ value: s.bigint() }).transform((n) => new P(n.value)),
|
|
3434
3439
|
s.string().transform((n) => new P(BigInt(n))),
|
|
3435
3440
|
s.instanceof(Number).transform((n) => new P(n)),
|
|
@@ -3439,7 +3444,7 @@ f(P, "z", s.union([
|
|
|
3439
3444
|
let k = P;
|
|
3440
3445
|
const D = class N {
|
|
3441
3446
|
constructor(e) {
|
|
3442
|
-
|
|
3447
|
+
y(this, "value"), y(this, "encodeValue", !0), typeof e == "number" && (e = Math.trunc(e.valueOf())), this.value = BigInt(e.valueOf());
|
|
3443
3448
|
}
|
|
3444
3449
|
static fromSeconds(e) {
|
|
3445
3450
|
return e instanceof N ? e : e instanceof Rt ? e.period : e instanceof k ? new N(e) : ["number", "bigint"].includes(typeof e) ? N.seconds(e) : new N(e);
|
|
@@ -3474,9 +3479,9 @@ const D = class N {
|
|
|
3474
3479
|
);
|
|
3475
3480
|
}
|
|
3476
3481
|
toString() {
|
|
3477
|
-
const e = this.truncate(N.DAY), t = this.truncate(N.HOUR), r = this.truncate(N.MINUTE), i = this.truncate(N.SECOND), a = this.truncate(N.MILLISECOND), o = this.truncate(N.MICROSECOND), l = this.truncate(N.NANOSECOND), u = e, h = t.sub(e),
|
|
3482
|
+
const e = this.truncate(N.DAY), t = this.truncate(N.HOUR), r = this.truncate(N.MINUTE), i = this.truncate(N.SECOND), a = this.truncate(N.MILLISECOND), o = this.truncate(N.MICROSECOND), l = this.truncate(N.NANOSECOND), u = e, h = t.sub(e), f = r.sub(t), d = i.sub(r), M = a.sub(i), A = o.sub(a), re = l.sub(o);
|
|
3478
3483
|
let q = "";
|
|
3479
|
-
return u.isZero || (q += `${u.days}d `), h.isZero || (q += `${h.hours}h `),
|
|
3484
|
+
return u.isZero || (q += `${u.days}d `), h.isZero || (q += `${h.hours}h `), f.isZero || (q += `${f.minutes}m `), d.isZero || (q += `${d.seconds}s `), M.isZero || (q += `${M.milliseconds}ms `), A.isZero || (q += `${A.microseconds}µs `), re.isZero || (q += `${re.nanoseconds}ns`), q.trim();
|
|
3480
3485
|
}
|
|
3481
3486
|
mult(e) {
|
|
3482
3487
|
return new N(this.valueOf() * BigInt(e));
|
|
@@ -3603,17 +3608,17 @@ const D = class N {
|
|
|
3603
3608
|
return N.hours(Ue(e, 24));
|
|
3604
3609
|
}
|
|
3605
3610
|
};
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3611
|
+
y(D, "NANOSECOND", D.nanoseconds(1)), /** A microsecond. */
|
|
3612
|
+
y(D, "MICROSECOND", D.microseconds(1)), /** A millisecond. */
|
|
3613
|
+
y(D, "MILLISECOND", D.milliseconds(1)), /** A second. */
|
|
3614
|
+
y(D, "SECOND", D.seconds(1)), /** A minute. */
|
|
3615
|
+
y(D, "MINUTE", D.minutes(1)), /** Represents an hour. */
|
|
3616
|
+
y(D, "HOUR", D.hours(1)), /** Represents a day. */
|
|
3617
|
+
y(D, "DAY", D.days(1)), /** The maximum possible value for a TimeSpan. */
|
|
3618
|
+
y(D, "MAX", new D((1n << 63n) - 1n)), /** The minimum possible value for a TimeSpan. */
|
|
3619
|
+
y(D, "MIN", new D(0)), /** The zero value for a TimeSpan. */
|
|
3620
|
+
y(D, "ZERO", new D(0)), /** A zod schema for validating and transforming timespans */
|
|
3621
|
+
y(D, "z", s.union([
|
|
3617
3622
|
s.object({ value: s.bigint() }).transform((n) => new D(n.value)),
|
|
3618
3623
|
s.string().transform((n) => new D(BigInt(n))),
|
|
3619
3624
|
s.instanceof(Number).transform((n) => new D(n)),
|
|
@@ -3698,7 +3703,7 @@ const vt = class ln extends Number {
|
|
|
3698
3703
|
return ln.hz(e * 1e3);
|
|
3699
3704
|
}
|
|
3700
3705
|
};
|
|
3701
|
-
|
|
3706
|
+
y(vt, "z", s.union([
|
|
3702
3707
|
s.number().transform((n) => new vt(n)),
|
|
3703
3708
|
s.instanceof(Number).transform((n) => new vt(n)),
|
|
3704
3709
|
s.instanceof(vt)
|
|
@@ -3722,13 +3727,13 @@ const G = class extends Number {
|
|
|
3722
3727
|
return new rt(e * this.valueOf());
|
|
3723
3728
|
}
|
|
3724
3729
|
};
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3730
|
+
y(G, "UNKNOWN", new G(0)), /** 128 bits per value. */
|
|
3731
|
+
y(G, "BIT128", new G(16)), /** 64 bits per value. */
|
|
3732
|
+
y(G, "BIT64", new G(8)), /** 32 bits per value. */
|
|
3733
|
+
y(G, "BIT32", new G(4)), /** 16 bits per value. */
|
|
3734
|
+
y(G, "BIT16", new G(2)), /** 8 bits per value. */
|
|
3735
|
+
y(G, "BIT8", new G(1)), /** A zod schema for validating and transforming densities */
|
|
3736
|
+
y(G, "z", s.union([
|
|
3732
3737
|
s.number().transform((n) => new G(n)),
|
|
3733
3738
|
s.instanceof(Number).transform((n) => new G(n)),
|
|
3734
3739
|
s.instanceof(G)
|
|
@@ -3742,7 +3747,7 @@ const le = class un {
|
|
|
3742
3747
|
* @param end - A TimeStamp representing the end of the range.
|
|
3743
3748
|
*/
|
|
3744
3749
|
constructor(e, t) {
|
|
3745
|
-
|
|
3750
|
+
y(this, "start"), y(this, "end"), typeof e == "object" && "start" in e ? (this.start = new k(e.start), this.end = new k(e.end)) : (this.start = new k(e), this.end = new k(t));
|
|
3746
3751
|
}
|
|
3747
3752
|
/** @returns The TimeSpan occupied by the TimeRange. */
|
|
3748
3753
|
get span() {
|
|
@@ -3829,10 +3834,10 @@ const le = class un {
|
|
|
3829
3834
|
return e.start.after(this.start) && (t.start = e.start), e.start.after(this.end) && (t.end = e.start), e.end.before(this.end) && (t.end = e.end), e.end.before(this.start) && (t.start = e.end), t;
|
|
3830
3835
|
}
|
|
3831
3836
|
};
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3837
|
+
y(le, "MAX", new le(k.MIN, k.MAX)), /** The minimum possible time range. */
|
|
3838
|
+
y(le, "MIN", new le(k.MAX, k.MIN)), /** A zero time range. */
|
|
3839
|
+
y(le, "ZERO", new le(k.ZERO, k.ZERO)), /** A zod schema for validating and transforming time ranges */
|
|
3840
|
+
y(le, "z", s.union([
|
|
3836
3841
|
s.object({ start: k.z, end: k.z }).transform((n) => new le(n.start, n.end)),
|
|
3837
3842
|
s.instanceof(le)
|
|
3838
3843
|
]));
|
|
@@ -3923,24 +3928,24 @@ const iu = (n, e) => n.start.before(e.start) ? -1 : n.start.after(e.start) ? 1 :
|
|
|
3923
3928
|
return Z.BIG_INT_TYPES.some((e) => e.equals(this));
|
|
3924
3929
|
}
|
|
3925
3930
|
};
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3931
|
+
y(p, "UNKNOWN", new p("unknown")), /** Represents a 64-bit floating point value. */
|
|
3932
|
+
y(p, "FLOAT64", new p("float64")), /** Represents a 32-bit floating point value. */
|
|
3933
|
+
y(p, "FLOAT32", new p("float32")), /** Represents a 64-bit signed integer value. */
|
|
3934
|
+
y(p, "INT64", new p("int64")), /** Represents a 32-bit signed integer value. */
|
|
3935
|
+
y(p, "INT32", new p("int32")), /** Represents a 16-bit signed integer value. */
|
|
3936
|
+
y(p, "INT16", new p("int16")), /** Represents a 8-bit signed integer value. */
|
|
3937
|
+
y(p, "INT8", new p("int8")), /** Represents a 64-bit unsigned integer value. */
|
|
3938
|
+
y(p, "UINT64", new p("uint64")), /** Represents a 32-bit unsigned integer value. */
|
|
3939
|
+
y(p, "UINT32", new p("uint32")), /** Represents a 16-bit unsigned integer value. */
|
|
3940
|
+
y(p, "UINT16", new p("uint16")), /** Represents a 8-bit unsigned integer value. */
|
|
3941
|
+
y(p, "UINT8", new p("uint8")), /** Represents a boolean value. Alias for UINT8. */
|
|
3942
|
+
y(p, "BOOLEAN", p.UINT8), /** Represents a 64-bit unix epoch. */
|
|
3943
|
+
y(p, "TIMESTAMP", new p("timestamp")), /** Represents a UUID data type */
|
|
3944
|
+
y(p, "UUID", new p("uuid")), /** Represents a string data type. Strings have an unknown density, and are separate
|
|
3940
3945
|
* by a newline character. */
|
|
3941
|
-
|
|
3946
|
+
y(p, "STRING", new p("string")), /** Represents a JSON data type. JSON has an unknown density, and is separated by a
|
|
3942
3947
|
* newline character. */
|
|
3943
|
-
|
|
3948
|
+
y(p, "JSON", new p("json")), y(p, "ARRAY_CONSTRUCTORS", /* @__PURE__ */ new Map([
|
|
3944
3949
|
[p.UINT8.toString(), Uint8Array],
|
|
3945
3950
|
[p.UINT16.toString(), Uint16Array],
|
|
3946
3951
|
[p.UINT32.toString(), Uint32Array],
|
|
@@ -3955,7 +3960,7 @@ f(p, "JSON", new p("json")), f(p, "ARRAY_CONSTRUCTORS", /* @__PURE__ */ new Map(
|
|
|
3955
3960
|
[p.STRING.toString(), Uint8Array],
|
|
3956
3961
|
[p.JSON.toString(), Uint8Array],
|
|
3957
3962
|
[p.UUID.toString(), Uint8Array]
|
|
3958
|
-
])),
|
|
3963
|
+
])), y(p, "ARRAY_CONSTRUCTOR_DATA_TYPES", /* @__PURE__ */ new Map([
|
|
3959
3964
|
[Uint8Array.name, p.UINT8],
|
|
3960
3965
|
[Uint16Array.name, p.UINT16],
|
|
3961
3966
|
[Uint32Array.name, p.UINT32],
|
|
@@ -3966,7 +3971,7 @@ f(p, "JSON", new p("json")), f(p, "ARRAY_CONSTRUCTORS", /* @__PURE__ */ new Map(
|
|
|
3966
3971
|
[Int16Array.name, p.INT16],
|
|
3967
3972
|
[Int32Array.name, p.INT32],
|
|
3968
3973
|
[BigInt64Array.name, p.INT64]
|
|
3969
|
-
])),
|
|
3974
|
+
])), y(p, "DENSITIES", /* @__PURE__ */ new Map([
|
|
3970
3975
|
[p.UINT8.toString(), X.BIT8],
|
|
3971
3976
|
[p.UINT16.toString(), X.BIT16],
|
|
3972
3977
|
[p.UINT32.toString(), X.BIT32],
|
|
@@ -3982,7 +3987,7 @@ f(p, "JSON", new p("json")), f(p, "ARRAY_CONSTRUCTORS", /* @__PURE__ */ new Map(
|
|
|
3982
3987
|
[p.JSON.toString(), X.UNKNOWN],
|
|
3983
3988
|
[p.UUID.toString(), X.BIT128]
|
|
3984
3989
|
])), /** All the data types. */
|
|
3985
|
-
|
|
3990
|
+
y(p, "ALL", [
|
|
3986
3991
|
p.UNKNOWN,
|
|
3987
3992
|
p.FLOAT64,
|
|
3988
3993
|
p.FLOAT32,
|
|
@@ -3998,8 +4003,8 @@ f(p, "ALL", [
|
|
|
3998
4003
|
p.UUID,
|
|
3999
4004
|
p.STRING,
|
|
4000
4005
|
p.JSON
|
|
4001
|
-
]),
|
|
4002
|
-
|
|
4006
|
+
]), y(p, "BIG_INT_TYPES", [p.INT64, p.UINT64, p.TIMESTAMP]), /** A zod schema for a DataType. */
|
|
4007
|
+
y(p, "z", s.union([
|
|
4003
4008
|
s.string().transform((n) => new p(n)),
|
|
4004
4009
|
s.instanceof(p)
|
|
4005
4010
|
]));
|
|
@@ -4041,9 +4046,9 @@ const J = class _ extends Number {
|
|
|
4041
4046
|
return this.valueOf() / _.TERABYTE.valueOf();
|
|
4042
4047
|
}
|
|
4043
4048
|
toString() {
|
|
4044
|
-
const e = this.truncate(_.TERABYTE), t = this.truncate(_.GIGABYTE), r = this.truncate(_.MEGABYTE), i = this.truncate(_.KILOBYTE), a = this.truncate(_.BYTE), o = e, l = t.sub(e), u = r.sub(t), h = i.sub(r),
|
|
4049
|
+
const e = this.truncate(_.TERABYTE), t = this.truncate(_.GIGABYTE), r = this.truncate(_.MEGABYTE), i = this.truncate(_.KILOBYTE), a = this.truncate(_.BYTE), o = e, l = t.sub(e), u = r.sub(t), h = i.sub(r), f = a.sub(i);
|
|
4045
4050
|
let d = "";
|
|
4046
|
-
return o.isZero || (d += `${o.terabytes}TB `), l.isZero || (d += `${l.gigabytes}GB `), u.isZero || (d += `${u.megabytes}MB `), h.isZero || (d += `${h.kilobytes}KB `), (!
|
|
4051
|
+
return o.isZero || (d += `${o.terabytes}TB `), l.isZero || (d += `${l.gigabytes}GB `), u.isZero || (d += `${u.megabytes}MB `), h.isZero || (d += `${h.kilobytes}KB `), (!f.isZero || d === "") && (d += `${f.valueOf()}B`), d.trim();
|
|
4047
4052
|
}
|
|
4048
4053
|
/**
|
|
4049
4054
|
* Creates a Size from the given number of bytes.
|
|
@@ -4094,13 +4099,13 @@ const J = class _ extends Number {
|
|
|
4094
4099
|
return this.valueOf() === 0;
|
|
4095
4100
|
}
|
|
4096
4101
|
};
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4102
|
+
y(J, "BYTE", new J(1)), /** A kilobyte */
|
|
4103
|
+
y(J, "KILOBYTE", J.kilobytes(1)), /** A megabyte */
|
|
4104
|
+
y(J, "MEGABYTE", J.megabytes(1)), /** A gigabyte */
|
|
4105
|
+
y(J, "GIGABYTE", J.gigabytes(1)), /** A terabyte. */
|
|
4106
|
+
y(J, "TERABYTE", J.terabytes(1)), /** The zero value for Size */
|
|
4107
|
+
y(J, "ZERO", new J(0)), /** A zod schema for a Size. */
|
|
4108
|
+
y(J, "z", s.union([
|
|
4104
4109
|
s.number().transform((n) => new J(n)),
|
|
4105
4110
|
s.instanceof(J)
|
|
4106
4111
|
]));
|
|
@@ -4129,7 +4134,7 @@ const Ri = (n) => {
|
|
|
4129
4134
|
).buffer
|
|
4130
4135
|
), lu = s.union([s.null(), s.undefined()]).transform(() => new Uint8Array().buffer), vr = 10, Ot = class ue {
|
|
4131
4136
|
constructor(e) {
|
|
4132
|
-
|
|
4137
|
+
y(this, "key", ""), y(this, "isSynnaxSeries", !0), y(this, "dataType"), y(this, "sampleOffset"), y(this, "gl"), y(this, "_data"), y(this, "_timeRange"), y(this, "alignment", 0n), y(this, "_cachedMin"), y(this, "_cachedMax"), y(this, "writePos", be), y(this, "_refCount", 0), y(this, "_cachedLength"), y(this, "_cachedIndexes"), ou(e) && (e = { data: e });
|
|
4133
4138
|
const {
|
|
4134
4139
|
dataType: t,
|
|
4135
4140
|
timeRange: r,
|
|
@@ -4143,14 +4148,14 @@ const Ri = (n) => {
|
|
|
4143
4148
|
this.key = d.key, this.dataType = d.dataType, this.sampleOffset = d.sampleOffset, this.gl = d.gl, this._data = d._data, this._timeRange = d._timeRange, this.alignment = d.alignment, this._cachedMin = d._cachedMin, this._cachedMax = d._cachedMax, this.writePos = d.writePos, this._refCount = d._refCount, this._cachedLength = d._cachedLength;
|
|
4144
4149
|
return;
|
|
4145
4150
|
}
|
|
4146
|
-
const h = Ri(u),
|
|
4151
|
+
const h = Ri(u), f = Array.isArray(u);
|
|
4147
4152
|
if (t != null) this.dataType = new I(t);
|
|
4148
4153
|
else {
|
|
4149
4154
|
if (u instanceof ArrayBuffer)
|
|
4150
4155
|
throw new Error(
|
|
4151
4156
|
"cannot infer data type from an ArrayBuffer instance when constructing a Series. Please provide a data type."
|
|
4152
4157
|
);
|
|
4153
|
-
if (
|
|
4158
|
+
if (f || h) {
|
|
4154
4159
|
let d = u;
|
|
4155
4160
|
if (!h) {
|
|
4156
4161
|
if (u.length === 0)
|
|
@@ -4172,7 +4177,7 @@ const Ri = (n) => {
|
|
|
4172
4177
|
);
|
|
4173
4178
|
} else this.dataType = new I(u);
|
|
4174
4179
|
}
|
|
4175
|
-
if (!
|
|
4180
|
+
if (!f && !h) this._data = u;
|
|
4176
4181
|
else {
|
|
4177
4182
|
let d = h ? [u] : u;
|
|
4178
4183
|
const M = d[0];
|
|
@@ -4596,7 +4601,7 @@ const Ri = (n) => {
|
|
|
4596
4601
|
});
|
|
4597
4602
|
}
|
|
4598
4603
|
};
|
|
4599
|
-
|
|
4604
|
+
y(Ot, "crudeZ", s.object({
|
|
4600
4605
|
timeRange: K.z.optional(),
|
|
4601
4606
|
dataType: I.z,
|
|
4602
4607
|
alignment: Xl.optional(),
|
|
@@ -4607,10 +4612,10 @@ f(Ot, "crudeZ", s.object({
|
|
|
4607
4612
|
s.instanceof(Uint8Array)
|
|
4608
4613
|
]),
|
|
4609
4614
|
glBufferUsage: su.optional().default("static").optional()
|
|
4610
|
-
})),
|
|
4615
|
+
})), y(Ot, "z", Ot.crudeZ.transform((n) => new Ot(n)));
|
|
4611
4616
|
let Ae = Ot, Es = class {
|
|
4612
4617
|
constructor(e, t, r) {
|
|
4613
|
-
|
|
4618
|
+
y(this, "series"), y(this, "end"), y(this, "index"), this.series = e;
|
|
4614
4619
|
const i = Q(0, e.length);
|
|
4615
4620
|
this.end = ws(i, r), this.index = ws(i, t);
|
|
4616
4621
|
}
|
|
@@ -4623,7 +4628,7 @@ let Ae = Ot, Es = class {
|
|
|
4623
4628
|
};
|
|
4624
4629
|
class uu {
|
|
4625
4630
|
constructor(e) {
|
|
4626
|
-
if (
|
|
4631
|
+
if (y(this, "series"), y(this, "index"), y(this, "decoder"), !e.dataType.isVariable)
|
|
4627
4632
|
throw new Error(
|
|
4628
4633
|
"cannot create a variable series iterator for a non-variable series"
|
|
4629
4634
|
);
|
|
@@ -4642,7 +4647,7 @@ class uu {
|
|
|
4642
4647
|
var Ns, Ss;
|
|
4643
4648
|
class hu {
|
|
4644
4649
|
constructor(e) {
|
|
4645
|
-
|
|
4650
|
+
y(this, "wrapped"), y(this, Ns, "JSONSeriesIterator"), this.wrapped = e;
|
|
4646
4651
|
}
|
|
4647
4652
|
next() {
|
|
4648
4653
|
const e = this.wrapped.next();
|
|
@@ -4658,7 +4663,7 @@ class hu {
|
|
|
4658
4663
|
var Is, ks;
|
|
4659
4664
|
class du {
|
|
4660
4665
|
constructor(e) {
|
|
4661
|
-
|
|
4666
|
+
y(this, "series"), y(this, "index"), y(this, Is, "SeriesIterator"), this.series = e, this.index = 0;
|
|
4662
4667
|
}
|
|
4663
4668
|
next() {
|
|
4664
4669
|
return this.index >= this.series.length ? { done: !0, value: void 0 } : {
|
|
@@ -4673,7 +4678,7 @@ class du {
|
|
|
4673
4678
|
const Et = (n, e) => typeof n == "bigint" && typeof e == "bigint" || typeof n == "number" && typeof e == "number" ? n + e : e === 0 ? n : n === 0 ? e : Number(n) + Number(e);
|
|
4674
4679
|
class fu {
|
|
4675
4680
|
constructor(e) {
|
|
4676
|
-
if (
|
|
4681
|
+
if (y(this, "series"), e.length !== 0) {
|
|
4677
4682
|
const t = e[0].dataType;
|
|
4678
4683
|
for (let r = 1; r < e.length; r++)
|
|
4679
4684
|
if (!e[r].dataType.equals(t))
|
|
@@ -4806,7 +4811,7 @@ class fu {
|
|
|
4806
4811
|
var $s, As;
|
|
4807
4812
|
class yu {
|
|
4808
4813
|
constructor(e) {
|
|
4809
|
-
|
|
4814
|
+
y(this, "series"), y(this, "seriesIndex"), y(this, "internal"), y(this, $s, "MultiSeriesIterator"), this.series = e, this.seriesIndex = 0, this.internal = e[0][Symbol.iterator]();
|
|
4810
4815
|
}
|
|
4811
4816
|
next() {
|
|
4812
4817
|
const e = this.internal.next();
|
|
@@ -4818,7 +4823,7 @@ class yu {
|
|
|
4818
4823
|
}
|
|
4819
4824
|
class Xn {
|
|
4820
4825
|
constructor(e, t, r) {
|
|
4821
|
-
|
|
4826
|
+
y(this, "series"), y(this, "index"), y(this, "end"), this.series = e, this.end = r, this.index = t;
|
|
4822
4827
|
}
|
|
4823
4828
|
next() {
|
|
4824
4829
|
return this.index >= this.end ? { done: !0, value: void 0 } : { done: !1, value: this.series.at(this.index++, !0) };
|
|
@@ -4883,11 +4888,10 @@ const Ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4883
4888
|
s.unknown()
|
|
4884
4889
|
), Tu = () => typeof process < "u" && process.versions != null && process.versions.node != null ? "node" : typeof window > "u" || window.document === void 0 ? "webworker" : "browser";
|
|
4885
4890
|
Tu();
|
|
4886
|
-
const vu = ["
|
|
4887
|
-
macos: "
|
|
4891
|
+
const vu = ["macOS", "Windows", "Linux"], Ou = ["macos", "windows", "linux"], Eu = {
|
|
4892
|
+
macos: "macOS",
|
|
4888
4893
|
windows: "Windows",
|
|
4889
|
-
linux: "Linux"
|
|
4890
|
-
docker: "Docker"
|
|
4894
|
+
linux: "Linux"
|
|
4891
4895
|
};
|
|
4892
4896
|
s.enum(vu).or(
|
|
4893
4897
|
s.enum(Ou).transform((n) => Eu[n])
|
|
@@ -4989,7 +4993,7 @@ let Bu = Di;
|
|
|
4989
4993
|
new Bu();
|
|
4990
4994
|
const Nr = s.string().regex(/^\d+\.\d+\.\d+$/), Ut = (n, e, t = {}) => {
|
|
4991
4995
|
t.checkMajor ?? (t.checkMajor = !0), t.checkMinor ?? (t.checkMinor = !0), t.checkPatch ?? (t.checkPatch = !0);
|
|
4992
|
-
const r = Nr.parse(n), i = Nr.parse(e), [a, o, l] = r.split(".").map(Number), [u, h,
|
|
4996
|
+
const r = Nr.parse(n), i = Nr.parse(e), [a, o, l] = r.split(".").map(Number), [u, h, f] = i.split(".").map(Number);
|
|
4993
4997
|
if (t.checkMajor) {
|
|
4994
4998
|
if (a < u) return Fn;
|
|
4995
4999
|
if (a > u) return Vn;
|
|
@@ -4999,8 +5003,8 @@ const Nr = s.string().regex(/^\d+\.\d+\.\d+$/), Ut = (n, e, t = {}) => {
|
|
|
4999
5003
|
if (o > h) return Vn;
|
|
5000
5004
|
}
|
|
5001
5005
|
if (t.checkPatch) {
|
|
5002
|
-
if (l <
|
|
5003
|
-
if (l >
|
|
5006
|
+
if (l < f) return Fn;
|
|
5007
|
+
if (l > f) return Vn;
|
|
5004
5008
|
}
|
|
5005
5009
|
return $n;
|
|
5006
5010
|
}, Uu = (n, e, t = {}) => bl(Ut(n, e, t)), ji = (n, e, t = {}) => wl(Ut(n, e, t)), Zu = (n, e, t = {}) => ml(Ut(n, e, t)), Lu = ({
|
|
@@ -5031,8 +5035,8 @@ const Nr = s.string().regex(/^\d+\.\d+\.\d+$/), Ut = (n, e, t = {}) => {
|
|
|
5031
5035
|
), i;
|
|
5032
5036
|
try {
|
|
5033
5037
|
return t != null ? t.parse(h) : h;
|
|
5034
|
-
} catch (
|
|
5035
|
-
return console.log(`${n} failed to parse default. Exiting with default`), console.error(
|
|
5038
|
+
} catch (f) {
|
|
5039
|
+
return console.log(`${n} failed to parse default. Exiting with default`), console.error(f), i;
|
|
5036
5040
|
}
|
|
5037
5041
|
};
|
|
5038
5042
|
const o = Object.keys(e).length;
|
|
@@ -5041,12 +5045,12 @@ const Nr = s.string().regex(/^\d+\.\d+\.\d+$/), Ut = (n, e, t = {}) => {
|
|
|
5041
5045
|
try {
|
|
5042
5046
|
if (o === 0 || ji(h.version, a))
|
|
5043
5047
|
return console.log(l ? `${n} ${h.version} now up to date` : `${n} version ${h.version} is up to date with target version ${i.version}`), h;
|
|
5044
|
-
const
|
|
5048
|
+
const f = h.version, d = e[f], M = d(h);
|
|
5045
5049
|
return l = !0, u(M);
|
|
5046
|
-
} catch (
|
|
5050
|
+
} catch (f) {
|
|
5047
5051
|
return console.log(
|
|
5048
5052
|
`${n} failed to migrate from ${h.version} to ${a}`
|
|
5049
|
-
), console.error(
|
|
5053
|
+
), console.error(f), i;
|
|
5050
5054
|
}
|
|
5051
5055
|
};
|
|
5052
5056
|
return (h) => {
|
|
@@ -5061,8 +5065,8 @@ const Nr = s.string().regex(/^\d+\.\d+\.\d+$/), Ut = (n, e, t = {}) => {
|
|
|
5061
5065
|
`${n} version is null and no default version set. Exiting with default`
|
|
5062
5066
|
), i;
|
|
5063
5067
|
return u(h);
|
|
5064
|
-
} catch (
|
|
5065
|
-
return console.log(`${n} failed to parse final result. Exiting with default`), console.error(
|
|
5068
|
+
} catch (f) {
|
|
5069
|
+
return console.log(`${n} failed to parse final result. Exiting with default`), console.error(f), i;
|
|
5066
5070
|
}
|
|
5067
5071
|
};
|
|
5068
5072
|
}, xs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -5074,6 +5078,29 @@ const Nr = s.string().regex(/^\d+\.\d+\.\d+$/), Ut = (n, e, t = {}) => {
|
|
|
5074
5078
|
semVerOlder: Zu,
|
|
5075
5079
|
semVerZ: Nr,
|
|
5076
5080
|
versionsEqual: Uu
|
|
5081
|
+
}, Symbol.toStringTag, { value: "Module" })), Yu = (n, e = "") => {
|
|
5082
|
+
const t = n.length;
|
|
5083
|
+
return t === 0 ? e : t === 1 ? n[0] : t === 2 ? `${n[0]} and ${n[1]}` : `${n.slice(0, -1).join(", ")}, and ${n[t - 1]}`;
|
|
5084
|
+
}, _u = (n) => {
|
|
5085
|
+
const e = n.split(" "), t = /* @__PURE__ */ new Set(), r = e.map((o) => o.charAt(0).toLowerCase()).join("");
|
|
5086
|
+
t.add(r), t.add(r.replace(/(.)(.)/g, "$1_$2"));
|
|
5087
|
+
const i = /\d+/g;
|
|
5088
|
+
n.match(i) && e.forEach((o, l) => {
|
|
5089
|
+
if (i.test(o)) {
|
|
5090
|
+
const u = e.map((h, f) => f !== l ? h.charAt(0).toLowerCase() : h).join("");
|
|
5091
|
+
t.add(u), t.add(u.replace(/(.)(.)/g, "$1_$2"));
|
|
5092
|
+
}
|
|
5093
|
+
});
|
|
5094
|
+
const a = e.map(
|
|
5095
|
+
(o) => (o.length > 3 ? o.substring(0, 3) : o).toLowerCase()
|
|
5096
|
+
);
|
|
5097
|
+
return t.add(a.join("")), t.add(a.join("_")), Array.from(t).filter(
|
|
5098
|
+
(o) => o.length >= 2 && o.length <= 12
|
|
5099
|
+
);
|
|
5100
|
+
}, zu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5101
|
+
__proto__: null,
|
|
5102
|
+
generateShortIdentifiers: _u,
|
|
5103
|
+
naturalLanguageJoin: Yu
|
|
5077
5104
|
}, Symbol.toStringTag, { value: "Module" })), ke = "sy.", qe = class qe extends ae {
|
|
5078
5105
|
constructor() {
|
|
5079
5106
|
super(...arguments);
|
|
@@ -5181,7 +5208,7 @@ const Xe = class Xe extends ae {
|
|
|
5181
5208
|
};
|
|
5182
5209
|
c(Xe, "TYPE", `${ke}contiguity`), c(Xe, "matches", te(Xe.TYPE));
|
|
5183
5210
|
let Cs = Xe;
|
|
5184
|
-
const
|
|
5211
|
+
const Wu = (n) => {
|
|
5185
5212
|
if (!n.type.startsWith(ke)) return null;
|
|
5186
5213
|
if (n.type.startsWith(L.TYPE)) {
|
|
5187
5214
|
if (n.type === wn.TYPE) {
|
|
@@ -5191,11 +5218,11 @@ const Yu = (n) => {
|
|
|
5191
5218
|
return new L(n.data);
|
|
5192
5219
|
}
|
|
5193
5220
|
return n.type.startsWith(it.TYPE) ? n.type.startsWith(xt.TYPE) ? new xt(n.data) : new it(n.data) : n.type.startsWith(xe.TYPE) ? new xe(n.data) : n.type.startsWith(se.TYPE) ? n.type.startsWith(Se.TYPE) ? new Se(n.data) : n.type.startsWith(Ie.TYPE) ? new Ie(n.data) : new se(n.data) : n.type.startsWith(at.TYPE) ? n.type.startsWith(Tn.TYPE) ? new Tn(n.data) : new at(n.data) : n.type.startsWith(bn.TYPE) ? new bn(n.data, n.data) : new xe(n.data);
|
|
5194
|
-
},
|
|
5221
|
+
}, Gu = () => {
|
|
5195
5222
|
throw new Error("Not implemented");
|
|
5196
5223
|
};
|
|
5197
|
-
ci({ encode:
|
|
5198
|
-
const
|
|
5224
|
+
ci({ encode: Gu, decode: Wu });
|
|
5225
|
+
const Fu = async (n, e) => {
|
|
5199
5226
|
const [t, r] = await e(n);
|
|
5200
5227
|
return r == null ? [t, r] : r instanceof Ne ? [
|
|
5201
5228
|
t,
|
|
@@ -5204,7 +5231,7 @@ const zu = async (n, e) => {
|
|
|
5204
5231
|
url: r.url
|
|
5205
5232
|
})
|
|
5206
5233
|
] : [t, r];
|
|
5207
|
-
}, Cr = s.string().uuid(), Pr = s.object({ key: Cr, name: s.string() }),
|
|
5234
|
+
}, Cr = s.string().uuid(), Pr = s.object({ key: Cr, name: s.string() }), Vu = (n) => {
|
|
5208
5235
|
const e = b(n);
|
|
5209
5236
|
if (e.length === 0) throw new Error("No groups specified");
|
|
5210
5237
|
const t = Cr.safeParse(e[0]).success;
|
|
@@ -5246,7 +5273,7 @@ const Zt = s.union([
|
|
|
5246
5273
|
s.literal("task"),
|
|
5247
5274
|
s.literal("policy"),
|
|
5248
5275
|
s.literal("table")
|
|
5249
|
-
]), Ui = "builtin",
|
|
5276
|
+
]), Ui = "builtin", Ju = "cluster", Ku = "node", ee = s.object({ type: Zt, key: s.string() }), Zi = s.string().transform((n) => {
|
|
5250
5277
|
const [e, t] = n.split(":");
|
|
5251
5278
|
return { type: Zt.parse(e), key: t ?? "" };
|
|
5252
5279
|
}), Ze = s.union([Zi, ee]), Qe = class Qe {
|
|
@@ -5279,7 +5306,7 @@ const Zt = s.union([
|
|
|
5279
5306
|
};
|
|
5280
5307
|
c(Qe, "z", s.union([s.instanceof(Qe), Ze.transform((e) => new Qe(e))]));
|
|
5281
5308
|
let O = Qe;
|
|
5282
|
-
const
|
|
5309
|
+
const Hu = new O({ type: Ui, key: "root" }), Li = s.object({ type: s.number() }), qi = s.object({
|
|
5283
5310
|
type: Zt,
|
|
5284
5311
|
fields: s.record(Li)
|
|
5285
5312
|
}), Yi = s.object({
|
|
@@ -5287,23 +5314,23 @@ const Vu = new O({ type: Ui, key: "root" }), Li = s.object({ type: s.number() })
|
|
|
5287
5314
|
name: s.string(),
|
|
5288
5315
|
schema: qi.optional().nullable(),
|
|
5289
5316
|
data: s.record(s.unknown()).optional().nullable()
|
|
5290
|
-
}).transform((n) => ({ key: n.id.toString(), ...n })),
|
|
5317
|
+
}).transform((n) => ({ key: n.id.toString(), ...n })), Xu = s.object({ from: O.z, type: s.string(), to: O.z }), Sr = (n) => {
|
|
5291
5318
|
const [e, t, r] = n.split("->");
|
|
5292
5319
|
return { from: new O(e), type: t, to: new O(r) };
|
|
5293
|
-
},
|
|
5320
|
+
}, Qu = s.object({
|
|
5294
5321
|
group: Pr
|
|
5295
|
-
}),
|
|
5322
|
+
}), eh = s.object({
|
|
5296
5323
|
parent: ee,
|
|
5297
5324
|
key: s.string().uuid().optional(),
|
|
5298
5325
|
name: s.string()
|
|
5299
|
-
}),
|
|
5326
|
+
}), th = s.object({
|
|
5300
5327
|
key: s.string(),
|
|
5301
5328
|
name: s.string()
|
|
5302
|
-
}),
|
|
5329
|
+
}), nh = s.object({
|
|
5303
5330
|
keys: s.array(s.string())
|
|
5304
5331
|
});
|
|
5305
5332
|
var ie;
|
|
5306
|
-
let
|
|
5333
|
+
let rh = (ie = class {
|
|
5307
5334
|
constructor(e) {
|
|
5308
5335
|
c(this, "client");
|
|
5309
5336
|
this.client = e;
|
|
@@ -5313,8 +5340,8 @@ let eh = (ie = class {
|
|
|
5313
5340
|
this.client,
|
|
5314
5341
|
ie.ENDPOINT,
|
|
5315
5342
|
{ parent: e, name: t, key: r },
|
|
5316
|
-
|
|
5317
|
-
|
|
5343
|
+
eh,
|
|
5344
|
+
Qu
|
|
5318
5345
|
)).group;
|
|
5319
5346
|
}
|
|
5320
5347
|
async rename(e, t) {
|
|
@@ -5322,7 +5349,7 @@ let eh = (ie = class {
|
|
|
5322
5349
|
this.client,
|
|
5323
5350
|
ie.ENDPOINT_RENAME,
|
|
5324
5351
|
{ key: e, name: t },
|
|
5325
|
-
|
|
5352
|
+
th,
|
|
5326
5353
|
s.object({})
|
|
5327
5354
|
);
|
|
5328
5355
|
}
|
|
@@ -5331,14 +5358,14 @@ let eh = (ie = class {
|
|
|
5331
5358
|
this.client,
|
|
5332
5359
|
ie.ENDPOINT_DELETE,
|
|
5333
5360
|
{ keys: e },
|
|
5334
|
-
|
|
5361
|
+
nh,
|
|
5335
5362
|
s.object({})
|
|
5336
5363
|
);
|
|
5337
5364
|
}
|
|
5338
5365
|
}, c(ie, "ENDPOINT", "/ontology/create-group"), c(ie, "ENDPOINT_RENAME", "/ontology/rename-group"), c(ie, "ENDPOINT_DELETE", "/ontology/delete-group"), ie), _i = class {
|
|
5339
5366
|
constructor(e) {
|
|
5340
5367
|
c(this, "creator");
|
|
5341
|
-
this.creator = new
|
|
5368
|
+
this.creator = new rh(e);
|
|
5342
5369
|
}
|
|
5343
5370
|
async create(e, t, r) {
|
|
5344
5371
|
return this.sugar(await this.creator.create(e, t, r));
|
|
@@ -5353,12 +5380,12 @@ let eh = (ie = class {
|
|
|
5353
5380
|
return new Dr(e.name, e.key);
|
|
5354
5381
|
}
|
|
5355
5382
|
};
|
|
5356
|
-
const
|
|
5383
|
+
const jg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5357
5384
|
__proto__: null,
|
|
5358
5385
|
Client: _i,
|
|
5359
5386
|
Group: Dr,
|
|
5360
5387
|
ONTOLOGY_TYPE: Mi,
|
|
5361
|
-
analyzeParams:
|
|
5388
|
+
analyzeParams: Vu,
|
|
5362
5389
|
groupZ: Pr,
|
|
5363
5390
|
keyZ: Cr,
|
|
5364
5391
|
ontologyID: Bi
|
|
@@ -5369,12 +5396,12 @@ const Cg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5369
5396
|
}, Ps = s.object({
|
|
5370
5397
|
id: ee,
|
|
5371
5398
|
children: ee.array()
|
|
5372
|
-
}),
|
|
5399
|
+
}), sh = s.object({
|
|
5373
5400
|
from: ee,
|
|
5374
5401
|
to: ee,
|
|
5375
5402
|
children: ee.array()
|
|
5376
5403
|
});
|
|
5377
|
-
let
|
|
5404
|
+
let ih = class {
|
|
5378
5405
|
constructor(e) {
|
|
5379
5406
|
c(this, "client");
|
|
5380
5407
|
this.client = e;
|
|
@@ -5407,12 +5434,12 @@ let nh = class {
|
|
|
5407
5434
|
this.client,
|
|
5408
5435
|
Qn.MOVE_CHILDREN,
|
|
5409
5436
|
i,
|
|
5410
|
-
|
|
5437
|
+
sh,
|
|
5411
5438
|
s.object({})
|
|
5412
5439
|
);
|
|
5413
5440
|
}
|
|
5414
5441
|
};
|
|
5415
|
-
const
|
|
5442
|
+
const ah = "/ontology/retrieve", oh = s.object({
|
|
5416
5443
|
ids: ee.array().optional(),
|
|
5417
5444
|
children: s.boolean().optional(),
|
|
5418
5445
|
parents: s.boolean().optional(),
|
|
@@ -5422,7 +5449,7 @@ const rh = "/ontology/retrieve", sh = s.object({
|
|
|
5422
5449
|
limit: s.number().optional(),
|
|
5423
5450
|
offset: s.number().optional(),
|
|
5424
5451
|
types: Zt.array().optional()
|
|
5425
|
-
}),
|
|
5452
|
+
}), ch = s.object({
|
|
5426
5453
|
resources: Yi.array()
|
|
5427
5454
|
}), fn = (n) => b(n).map((e) => new O(e).payload);
|
|
5428
5455
|
let zi = class {
|
|
@@ -5432,7 +5459,7 @@ let zi = class {
|
|
|
5432
5459
|
c(this, "client");
|
|
5433
5460
|
c(this, "writer");
|
|
5434
5461
|
c(this, "framer");
|
|
5435
|
-
this.client = e, this.writer = new
|
|
5462
|
+
this.client = e, this.writer = new ih(e), this.groups = new _i(e), this.framer = t;
|
|
5436
5463
|
}
|
|
5437
5464
|
/**
|
|
5438
5465
|
* Executes a fuzzy search on the ontology for resources with names/fields similar to the
|
|
@@ -5453,7 +5480,11 @@ let zi = class {
|
|
|
5453
5480
|
const r = await this.execRetrieve({ ids: fn(e), ...t });
|
|
5454
5481
|
if (Array.isArray(e)) return r;
|
|
5455
5482
|
if (r.length === 0)
|
|
5456
|
-
throw new se(
|
|
5483
|
+
throw new se(
|
|
5484
|
+
`No resource found with ID ${zu.naturalLanguageJoin(
|
|
5485
|
+
b(e).map((i) => new O(i).toString())
|
|
5486
|
+
)}`
|
|
5487
|
+
);
|
|
5457
5488
|
return r[0];
|
|
5458
5489
|
}
|
|
5459
5490
|
/**
|
|
@@ -5543,10 +5574,10 @@ let zi = class {
|
|
|
5543
5574
|
async execRetrieve(e) {
|
|
5544
5575
|
const { resources: t } = await w(
|
|
5545
5576
|
this.client,
|
|
5546
|
-
|
|
5577
|
+
ah,
|
|
5547
5578
|
e,
|
|
5548
|
-
|
|
5549
|
-
|
|
5579
|
+
oh,
|
|
5580
|
+
ch
|
|
5550
5581
|
);
|
|
5551
5582
|
return t;
|
|
5552
5583
|
}
|
|
@@ -5666,7 +5697,7 @@ class Rn extends Ce.Observer {
|
|
|
5666
5697
|
if (i.length === 0) return this.notify(this.dependents);
|
|
5667
5698
|
this.client.retrieve(i.map((a) => a.key.to)).then((a) => {
|
|
5668
5699
|
this.dependents = this.dependents.concat(a), this.notify(this.dependents);
|
|
5669
|
-
});
|
|
5700
|
+
}).catch(console.error);
|
|
5670
5701
|
});
|
|
5671
5702
|
this.resourceType = o, this.internal = l, this.target = t, this.dependents = r, this.resourceType != null && (this.dependents = this.dependents.filter((h) => h.id.type === this.resourceType)), this.client = u, this.relType = i, this.relDir = a, this.internal.resources.onChange(this.handleResourceChange), this.internal.relationships.onChange(this.handleRelationshipChange);
|
|
5672
5703
|
}
|
|
@@ -5678,21 +5709,21 @@ class Rn extends Ce.Observer {
|
|
|
5678
5709
|
await this.internal.close();
|
|
5679
5710
|
}
|
|
5680
5711
|
}
|
|
5681
|
-
const
|
|
5712
|
+
const Ug = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5682
5713
|
__proto__: null,
|
|
5683
5714
|
BUILTIN_TYPE: Ui,
|
|
5684
|
-
CLUSTER_TYPE:
|
|
5715
|
+
CLUSTER_TYPE: Ju,
|
|
5685
5716
|
ChangeTracker: Lt,
|
|
5686
5717
|
Client: zi,
|
|
5687
5718
|
DependentTracker: Rn,
|
|
5688
5719
|
ID: O,
|
|
5689
|
-
NODE_TYPE:
|
|
5690
|
-
Root:
|
|
5720
|
+
NODE_TYPE: Ku,
|
|
5721
|
+
Root: Hu,
|
|
5691
5722
|
crudeIDZ: Ze,
|
|
5692
5723
|
idZ: ee,
|
|
5693
5724
|
parseIDs: fn,
|
|
5694
5725
|
parseRelationship: Sr,
|
|
5695
|
-
relationshipSchemaZ:
|
|
5726
|
+
relationshipSchemaZ: Xu,
|
|
5696
5727
|
resourceSchemaZ: Yi,
|
|
5697
5728
|
resourceTypeZ: Zt,
|
|
5698
5729
|
schemaFieldZ: Li,
|
|
@@ -5711,14 +5742,14 @@ const jg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5711
5742
|
subjects: F(ee),
|
|
5712
5743
|
objects: F(ee),
|
|
5713
5744
|
actions: F(pn)
|
|
5714
|
-
}), Gi = "policy",
|
|
5745
|
+
}), Gi = "policy", lh = (n) => new O({ type: Gi, key: n }), Fi = "allow_all", uh = new O({
|
|
5715
5746
|
type: Fi,
|
|
5716
5747
|
key: ""
|
|
5717
|
-
}),
|
|
5748
|
+
}), hh = s.object({
|
|
5718
5749
|
keys: qt.array().optional(),
|
|
5719
5750
|
subjects: ee.array().optional()
|
|
5720
|
-
}),
|
|
5721
|
-
let
|
|
5751
|
+
}), dh = s.object({ policies: F(xn) }), fh = "/access/policy/retrieve";
|
|
5752
|
+
let yh = class {
|
|
5722
5753
|
constructor(e) {
|
|
5723
5754
|
c(this, "client");
|
|
5724
5755
|
this.client = e;
|
|
@@ -5726,15 +5757,15 @@ let hh = class {
|
|
|
5726
5757
|
async retrieve(e) {
|
|
5727
5758
|
return (await w(
|
|
5728
5759
|
this.client,
|
|
5729
|
-
|
|
5760
|
+
fh,
|
|
5730
5761
|
e,
|
|
5731
|
-
|
|
5732
|
-
|
|
5762
|
+
hh,
|
|
5763
|
+
dh
|
|
5733
5764
|
)).policies;
|
|
5734
5765
|
}
|
|
5735
5766
|
};
|
|
5736
|
-
const
|
|
5737
|
-
let
|
|
5767
|
+
const gh = s.object({ policies: xn.partial({ key: !0 }).array() }), ph = s.object({ policies: xn.array() }), mh = s.object({ keys: qt.array() }), wh = s.object({}), bh = "/access/policy/create", Th = "/access/policy/delete";
|
|
5768
|
+
let vh = class {
|
|
5738
5769
|
constructor(e) {
|
|
5739
5770
|
c(this, "client");
|
|
5740
5771
|
this.client = e;
|
|
@@ -5747,26 +5778,26 @@ let wh = class {
|
|
|
5747
5778
|
}));
|
|
5748
5779
|
return (await w(
|
|
5749
5780
|
this.client,
|
|
5750
|
-
|
|
5781
|
+
bh,
|
|
5751
5782
|
{ policies: r },
|
|
5752
|
-
|
|
5753
|
-
|
|
5783
|
+
gh,
|
|
5784
|
+
ph
|
|
5754
5785
|
)).policies;
|
|
5755
5786
|
}
|
|
5756
5787
|
async delete(e) {
|
|
5757
5788
|
await w(
|
|
5758
5789
|
this.client,
|
|
5759
|
-
|
|
5790
|
+
Th,
|
|
5760
5791
|
{ keys: b(e) },
|
|
5761
|
-
|
|
5762
|
-
|
|
5792
|
+
mh,
|
|
5793
|
+
wh
|
|
5763
5794
|
);
|
|
5764
5795
|
}
|
|
5765
5796
|
}, Vi = class {
|
|
5766
5797
|
constructor(e) {
|
|
5767
5798
|
c(this, "retriever");
|
|
5768
5799
|
c(this, "writer");
|
|
5769
|
-
this.retriever = new
|
|
5800
|
+
this.retriever = new yh(e), this.writer = new vh(e);
|
|
5770
5801
|
}
|
|
5771
5802
|
async create(e) {
|
|
5772
5803
|
const t = Array.isArray(e), r = await this.writer.create(e);
|
|
@@ -5784,15 +5815,15 @@ let wh = class {
|
|
|
5784
5815
|
await this.writer.delete(e);
|
|
5785
5816
|
}
|
|
5786
5817
|
};
|
|
5787
|
-
const
|
|
5818
|
+
const Yg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5788
5819
|
__proto__: null,
|
|
5789
|
-
ALLOW_ALL_ONTOLOGY_ID:
|
|
5820
|
+
ALLOW_ALL_ONTOLOGY_ID: uh,
|
|
5790
5821
|
ALLOW_ALL_ONTOLOGY_TYPE: Fi,
|
|
5791
5822
|
Client: Vi,
|
|
5792
5823
|
ONTOLOGY_TYPE: Gi,
|
|
5793
5824
|
keyZ: qt,
|
|
5794
5825
|
newPolicyZ: Wi,
|
|
5795
|
-
ontologyID:
|
|
5826
|
+
ontologyID: lh,
|
|
5796
5827
|
policyZ: xn
|
|
5797
5828
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5798
5829
|
let Ji = class {
|
|
@@ -5801,7 +5832,7 @@ let Ji = class {
|
|
|
5801
5832
|
this.policy = new Vi(e);
|
|
5802
5833
|
}
|
|
5803
5834
|
};
|
|
5804
|
-
const
|
|
5835
|
+
const zg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5805
5836
|
__proto__: null,
|
|
5806
5837
|
ALL_ACTION: Xc,
|
|
5807
5838
|
CREATE_ACTION: Qc,
|
|
@@ -5833,36 +5864,36 @@ const qg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5833
5864
|
virtual: s.boolean().optional().default(!1),
|
|
5834
5865
|
expression: s.string().optional().default(""),
|
|
5835
5866
|
requires: F(de).optional().default([])
|
|
5836
|
-
}), Hi = "channel", Xi = (n) => new O({ type: Hi, key: n.toString() }),
|
|
5837
|
-
var
|
|
5867
|
+
}), Hi = "channel", Xi = (n) => new O({ type: Hi, key: n.toString() }), Oh = new Error("request for lock canceled");
|
|
5868
|
+
var Eh = function(n, e, t, r) {
|
|
5838
5869
|
function i(a) {
|
|
5839
5870
|
return a instanceof t ? a : new t(function(o) {
|
|
5840
5871
|
o(a);
|
|
5841
5872
|
});
|
|
5842
5873
|
}
|
|
5843
5874
|
return new (t || (t = Promise))(function(a, o) {
|
|
5844
|
-
function l(
|
|
5875
|
+
function l(f) {
|
|
5845
5876
|
try {
|
|
5846
|
-
h(r.next(
|
|
5877
|
+
h(r.next(f));
|
|
5847
5878
|
} catch (d) {
|
|
5848
5879
|
o(d);
|
|
5849
5880
|
}
|
|
5850
5881
|
}
|
|
5851
|
-
function u(
|
|
5882
|
+
function u(f) {
|
|
5852
5883
|
try {
|
|
5853
|
-
h(r.throw(
|
|
5884
|
+
h(r.throw(f));
|
|
5854
5885
|
} catch (d) {
|
|
5855
5886
|
o(d);
|
|
5856
5887
|
}
|
|
5857
5888
|
}
|
|
5858
|
-
function h(
|
|
5859
|
-
|
|
5889
|
+
function h(f) {
|
|
5890
|
+
f.done ? a(f.value) : i(f.value).then(l, u);
|
|
5860
5891
|
}
|
|
5861
5892
|
h((r = r.apply(n, e || [])).next());
|
|
5862
5893
|
});
|
|
5863
5894
|
};
|
|
5864
|
-
class
|
|
5865
|
-
constructor(e, t =
|
|
5895
|
+
class Nh {
|
|
5896
|
+
constructor(e, t = Oh) {
|
|
5866
5897
|
this._value = e, this._cancelError = t, this._queue = [], this._weightedWaiters = [];
|
|
5867
5898
|
}
|
|
5868
5899
|
acquire(e = 1, t = 0) {
|
|
@@ -5874,7 +5905,7 @@ class vh {
|
|
|
5874
5905
|
});
|
|
5875
5906
|
}
|
|
5876
5907
|
runExclusive(e) {
|
|
5877
|
-
return
|
|
5908
|
+
return Eh(this, arguments, void 0, function* (t, r = 1, i = 0) {
|
|
5878
5909
|
const [a, o] = yield this.acquire(r, i);
|
|
5879
5910
|
try {
|
|
5880
5911
|
return yield t(a);
|
|
@@ -5887,7 +5918,7 @@ class vh {
|
|
|
5887
5918
|
if (e <= 0)
|
|
5888
5919
|
throw new Error(`invalid weight ${e}: must be positive`);
|
|
5889
5920
|
return this._couldLockImmediately(e, t) ? Promise.resolve() : new Promise((r) => {
|
|
5890
|
-
this._weightedWaiters[e - 1] || (this._weightedWaiters[e - 1] = []),
|
|
5921
|
+
this._weightedWaiters[e - 1] || (this._weightedWaiters[e - 1] = []), Sh(this._weightedWaiters[e - 1], { resolve: r, priority: t });
|
|
5891
5922
|
});
|
|
5892
5923
|
}
|
|
5893
5924
|
isLocked() {
|
|
@@ -5942,7 +5973,7 @@ class vh {
|
|
|
5942
5973
|
return (this._queue.length === 0 || this._queue[0].priority < t) && e <= this._value;
|
|
5943
5974
|
}
|
|
5944
5975
|
}
|
|
5945
|
-
function
|
|
5976
|
+
function Sh(n, e) {
|
|
5946
5977
|
const t = Qi(n, (r) => e.priority <= r.priority);
|
|
5947
5978
|
n.splice(t + 1, 0, e);
|
|
5948
5979
|
}
|
|
@@ -5952,39 +5983,39 @@ function Qi(n, e) {
|
|
|
5952
5983
|
return t;
|
|
5953
5984
|
return -1;
|
|
5954
5985
|
}
|
|
5955
|
-
var
|
|
5986
|
+
var Ih = function(n, e, t, r) {
|
|
5956
5987
|
function i(a) {
|
|
5957
5988
|
return a instanceof t ? a : new t(function(o) {
|
|
5958
5989
|
o(a);
|
|
5959
5990
|
});
|
|
5960
5991
|
}
|
|
5961
5992
|
return new (t || (t = Promise))(function(a, o) {
|
|
5962
|
-
function l(
|
|
5993
|
+
function l(f) {
|
|
5963
5994
|
try {
|
|
5964
|
-
h(r.next(
|
|
5995
|
+
h(r.next(f));
|
|
5965
5996
|
} catch (d) {
|
|
5966
5997
|
o(d);
|
|
5967
5998
|
}
|
|
5968
5999
|
}
|
|
5969
|
-
function u(
|
|
6000
|
+
function u(f) {
|
|
5970
6001
|
try {
|
|
5971
|
-
h(r.throw(
|
|
6002
|
+
h(r.throw(f));
|
|
5972
6003
|
} catch (d) {
|
|
5973
6004
|
o(d);
|
|
5974
6005
|
}
|
|
5975
6006
|
}
|
|
5976
|
-
function h(
|
|
5977
|
-
|
|
6007
|
+
function h(f) {
|
|
6008
|
+
f.done ? a(f.value) : i(f.value).then(l, u);
|
|
5978
6009
|
}
|
|
5979
6010
|
h((r = r.apply(n, e || [])).next());
|
|
5980
6011
|
});
|
|
5981
6012
|
};
|
|
5982
|
-
class
|
|
6013
|
+
class kh {
|
|
5983
6014
|
constructor(e) {
|
|
5984
|
-
this._semaphore = new
|
|
6015
|
+
this._semaphore = new Nh(1, e);
|
|
5985
6016
|
}
|
|
5986
6017
|
acquire() {
|
|
5987
|
-
return
|
|
6018
|
+
return Ih(this, arguments, void 0, function* (e = 0) {
|
|
5988
6019
|
const [, t] = yield this._semaphore.acquire(1, e);
|
|
5989
6020
|
return t;
|
|
5990
6021
|
});
|
|
@@ -6025,7 +6056,7 @@ const Cn = (n, e, { convertNumericStrings: t = !0 } = {}) => {
|
|
|
6025
6056
|
`Expected one ${n} matching ${JSON.stringify(e)}, but found ${t.length}`
|
|
6026
6057
|
);
|
|
6027
6058
|
}
|
|
6028
|
-
},
|
|
6059
|
+
}, $h = s.object({
|
|
6029
6060
|
leaseholder: s.number().optional(),
|
|
6030
6061
|
keys: s.number().array().optional(),
|
|
6031
6062
|
names: s.string().array().optional(),
|
|
@@ -6038,7 +6069,7 @@ const Cn = (n, e, { convertNumericStrings: t = !0 } = {}) => {
|
|
|
6038
6069
|
virtual: s.boolean().optional(),
|
|
6039
6070
|
isIndex: s.boolean().optional(),
|
|
6040
6071
|
internal: s.boolean().optional()
|
|
6041
|
-
}),
|
|
6072
|
+
}), Ah = s.object({
|
|
6042
6073
|
channels: F(Yt)
|
|
6043
6074
|
}), me = (n) => Cn(n, {
|
|
6044
6075
|
number: "keys",
|
|
@@ -6063,8 +6094,8 @@ const Cn = (n, e, { convertNumericStrings: t = !0 } = {}) => {
|
|
|
6063
6094
|
const [t, r] = await this.client.send(
|
|
6064
6095
|
Nn.ENDPOINT,
|
|
6065
6096
|
e,
|
|
6066
|
-
|
|
6067
|
-
|
|
6097
|
+
$h,
|
|
6098
|
+
Ah
|
|
6068
6099
|
);
|
|
6069
6100
|
if (r != null) throw r;
|
|
6070
6101
|
return t.channels;
|
|
@@ -6142,7 +6173,7 @@ class jr {
|
|
|
6142
6173
|
}
|
|
6143
6174
|
class ea {
|
|
6144
6175
|
constructor(e, t) {
|
|
6145
|
-
c(this, "mu", new
|
|
6176
|
+
c(this, "mu", new kh());
|
|
6146
6177
|
c(this, "requests", /* @__PURE__ */ new Map());
|
|
6147
6178
|
c(this, "wrapped");
|
|
6148
6179
|
c(this, "debouncedRun");
|
|
@@ -6200,7 +6231,7 @@ class na {
|
|
|
6200
6231
|
index: l = 0,
|
|
6201
6232
|
internal: u = !1,
|
|
6202
6233
|
virtual: h = !1,
|
|
6203
|
-
frameClient:
|
|
6234
|
+
frameClient: f,
|
|
6204
6235
|
alias: d,
|
|
6205
6236
|
expression: M = "",
|
|
6206
6237
|
requires: A = []
|
|
@@ -6255,7 +6286,7 @@ class na {
|
|
|
6255
6286
|
*/
|
|
6256
6287
|
c(this, "virtual");
|
|
6257
6288
|
/**
|
|
6258
|
-
* Only used for calculated channels. Specifies the
|
|
6289
|
+
* Only used for calculated channels. Specifies the Lua expression used to evaluate
|
|
6259
6290
|
* the calculated value
|
|
6260
6291
|
*/
|
|
6261
6292
|
c(this, "expression");
|
|
@@ -6263,7 +6294,7 @@ class na {
|
|
|
6263
6294
|
* Only used for calculated channels. Specifies the channels required for calculation
|
|
6264
6295
|
*/
|
|
6265
6296
|
c(this, "requires");
|
|
6266
|
-
this.key = a, this.name = r, this.rate = new Rt(t ?? 0), this.dataType = new I(e), this.leaseholder = i, this.index = l, this.isIndex = o, this.internal = u, this.alias = d, this.virtual = h, this.expression = M, this.requires = A ?? [], this._frameClient =
|
|
6297
|
+
this.key = a, this.name = r, this.rate = new Rt(t ?? 0), this.dataType = new I(e), this.leaseholder = i, this.index = l, this.isIndex = o, this.internal = u, this.alias = d, this.virtual = h, this.expression = M, this.requires = A ?? [], this._frameClient = f ?? null;
|
|
6267
6298
|
}
|
|
6268
6299
|
get framer() {
|
|
6269
6300
|
if (this._frameClient == null)
|
|
@@ -6319,7 +6350,7 @@ class na {
|
|
|
6319
6350
|
return await this.framer.write(e, this.key, t);
|
|
6320
6351
|
}
|
|
6321
6352
|
}
|
|
6322
|
-
const
|
|
6353
|
+
const Rh = "/channel/retrieve-group", xh = s.object({}), Ch = s.object({
|
|
6323
6354
|
group: Pr
|
|
6324
6355
|
});
|
|
6325
6356
|
let ra = class {
|
|
@@ -6388,10 +6419,10 @@ let ra = class {
|
|
|
6388
6419
|
async retrieveGroup() {
|
|
6389
6420
|
const e = await w(
|
|
6390
6421
|
this.client,
|
|
6391
|
-
|
|
6422
|
+
Rh,
|
|
6392
6423
|
{},
|
|
6393
|
-
|
|
6394
|
-
|
|
6424
|
+
xh,
|
|
6425
|
+
Ch
|
|
6395
6426
|
);
|
|
6396
6427
|
return new Dr(e.group.name, e.group.key);
|
|
6397
6428
|
}
|
|
@@ -6400,23 +6431,25 @@ const vn = ({ virtual: n, expression: e }) => n && e !== "", sa = async (n, e) =
|
|
|
6400
6431
|
if (!vn(e)) return e.index;
|
|
6401
6432
|
for (const t of e.requires) {
|
|
6402
6433
|
const r = await n(t);
|
|
6434
|
+
if (r == null) return null;
|
|
6403
6435
|
if (!r.virtual) return r.index;
|
|
6404
6436
|
}
|
|
6405
6437
|
for (const t of e.requires) {
|
|
6406
6438
|
const r = await n(t);
|
|
6439
|
+
if (r == null) return null;
|
|
6407
6440
|
if (vn(r)) {
|
|
6408
6441
|
const i = await sa(n, r);
|
|
6409
6442
|
if (i != null) return i;
|
|
6410
6443
|
}
|
|
6411
6444
|
}
|
|
6412
6445
|
return null;
|
|
6413
|
-
},
|
|
6446
|
+
}, Ph = s.object({ channels: Ki.array() }), Dh = s.object({ channels: Yt.array() }), jh = s.object({
|
|
6414
6447
|
keys: de.array().optional(),
|
|
6415
6448
|
names: s.string().array().optional()
|
|
6416
|
-
}),
|
|
6449
|
+
}), Mh = s.object({}), Bh = s.object({
|
|
6417
6450
|
keys: de.array(),
|
|
6418
6451
|
names: s.string().array()
|
|
6419
|
-
}),
|
|
6452
|
+
}), Uh = s.object({}), Zh = "/channel/create", Lh = "/channel/delete", qh = "/channel/rename";
|
|
6420
6453
|
let ia = class {
|
|
6421
6454
|
constructor(e, t) {
|
|
6422
6455
|
c(this, "client");
|
|
@@ -6424,29 +6457,29 @@ let ia = class {
|
|
|
6424
6457
|
this.client = e, this.cache = t;
|
|
6425
6458
|
}
|
|
6426
6459
|
async create(e) {
|
|
6427
|
-
const { channels: t } = await w(this.client,
|
|
6460
|
+
const { channels: t } = await w(this.client, Zh, { channels: e }, Ph, Dh);
|
|
6428
6461
|
return this.cache.set(t), t;
|
|
6429
6462
|
}
|
|
6430
6463
|
async delete(e) {
|
|
6431
6464
|
await w(
|
|
6432
6465
|
this.client,
|
|
6433
|
-
|
|
6466
|
+
Lh,
|
|
6434
6467
|
e,
|
|
6435
|
-
|
|
6436
|
-
|
|
6468
|
+
jh,
|
|
6469
|
+
Mh
|
|
6437
6470
|
), e.keys != null && this.cache.delete(e.keys), e.names != null && this.cache.delete(e.names);
|
|
6438
6471
|
}
|
|
6439
6472
|
async rename(e, t) {
|
|
6440
6473
|
await w(
|
|
6441
6474
|
this.client,
|
|
6442
|
-
|
|
6475
|
+
qh,
|
|
6443
6476
|
{ keys: e, names: t },
|
|
6444
|
-
|
|
6445
|
-
|
|
6477
|
+
Bh,
|
|
6478
|
+
Uh
|
|
6446
6479
|
), this.cache.rename(e, t);
|
|
6447
6480
|
}
|
|
6448
6481
|
};
|
|
6449
|
-
const
|
|
6482
|
+
const Fg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6450
6483
|
__proto__: null,
|
|
6451
6484
|
CacheRetriever: jr,
|
|
6452
6485
|
Channel: na,
|
|
@@ -6472,11 +6505,11 @@ const zg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
6472
6505
|
firstName: s.string().default(""),
|
|
6473
6506
|
lastName: s.string().default(""),
|
|
6474
6507
|
rootUser: s.boolean().default(!0)
|
|
6475
|
-
}), aa = _t.partial({ key: !0, firstName: !0, lastName: !0 }).omit({ rootUser: !0 }).extend({ password: s.string().min(1) }), oa = "user",
|
|
6508
|
+
}), aa = _t.partial({ key: !0, firstName: !0, lastName: !0 }).omit({ rootUser: !0 }).extend({ password: s.string().min(1) }), oa = "user", Yh = (n) => new O({ type: oa, key: n }), _h = s.object({
|
|
6476
6509
|
keys: ut.array().optional(),
|
|
6477
6510
|
usernames: s.string().array().optional()
|
|
6478
|
-
}),
|
|
6479
|
-
let
|
|
6511
|
+
}), zh = s.object({ users: F(_t) }), Wh = "/user/retrieve";
|
|
6512
|
+
let Gh = class {
|
|
6480
6513
|
constructor(e) {
|
|
6481
6514
|
c(this, "client");
|
|
6482
6515
|
this.client = e;
|
|
@@ -6484,19 +6517,19 @@ let _h = class {
|
|
|
6484
6517
|
async retrieve(e) {
|
|
6485
6518
|
return (await w(
|
|
6486
6519
|
this.client,
|
|
6487
|
-
|
|
6520
|
+
Wh,
|
|
6488
6521
|
e,
|
|
6489
|
-
|
|
6490
|
-
|
|
6522
|
+
_h,
|
|
6523
|
+
zh
|
|
6491
6524
|
)).users;
|
|
6492
6525
|
}
|
|
6493
6526
|
};
|
|
6494
|
-
const
|
|
6527
|
+
const Fh = s.object({ users: aa.array() }), Vh = s.object({ users: _t.array() }), Jh = s.object({ key: ut, username: s.string().min(1) }), Kh = s.object({}), Hh = s.object({
|
|
6495
6528
|
key: ut,
|
|
6496
6529
|
firstName: s.string().optional(),
|
|
6497
6530
|
lastName: s.string().optional()
|
|
6498
|
-
}),
|
|
6499
|
-
let
|
|
6531
|
+
}), Xh = s.object({}), Qh = s.object({ keys: ut.array() }), ed = s.object({}), td = "/user/create", nd = "/user/change-username", rd = "/user/rename", sd = "/user/delete";
|
|
6532
|
+
let id = class {
|
|
6500
6533
|
constructor(e) {
|
|
6501
6534
|
c(this, "client");
|
|
6502
6535
|
this.client = e;
|
|
@@ -6504,44 +6537,44 @@ let nd = class {
|
|
|
6504
6537
|
async create(e) {
|
|
6505
6538
|
return (await w(
|
|
6506
6539
|
this.client,
|
|
6507
|
-
|
|
6540
|
+
td,
|
|
6508
6541
|
{ users: b(e) },
|
|
6509
|
-
|
|
6510
|
-
|
|
6542
|
+
Fh,
|
|
6543
|
+
Vh
|
|
6511
6544
|
)).users;
|
|
6512
6545
|
}
|
|
6513
6546
|
async changeUsername(e, t) {
|
|
6514
6547
|
await w(
|
|
6515
6548
|
this.client,
|
|
6516
|
-
|
|
6549
|
+
nd,
|
|
6517
6550
|
{ key: e, username: t },
|
|
6518
|
-
|
|
6519
|
-
|
|
6551
|
+
Jh,
|
|
6552
|
+
Kh
|
|
6520
6553
|
);
|
|
6521
6554
|
}
|
|
6522
6555
|
async rename(e, t, r) {
|
|
6523
6556
|
await w(
|
|
6524
6557
|
this.client,
|
|
6525
|
-
|
|
6558
|
+
rd,
|
|
6526
6559
|
{ key: e, firstName: t, lastName: r },
|
|
6527
|
-
|
|
6528
|
-
|
|
6560
|
+
Hh,
|
|
6561
|
+
Xh
|
|
6529
6562
|
);
|
|
6530
6563
|
}
|
|
6531
6564
|
async delete(e) {
|
|
6532
6565
|
await w(
|
|
6533
6566
|
this.client,
|
|
6534
|
-
|
|
6567
|
+
sd,
|
|
6535
6568
|
{ keys: b(e) },
|
|
6536
|
-
|
|
6537
|
-
|
|
6569
|
+
Qh,
|
|
6570
|
+
ed
|
|
6538
6571
|
);
|
|
6539
6572
|
}
|
|
6540
6573
|
}, ca = class {
|
|
6541
6574
|
constructor(e) {
|
|
6542
6575
|
c(this, "reader");
|
|
6543
6576
|
c(this, "writer");
|
|
6544
|
-
this.writer = new
|
|
6577
|
+
this.writer = new id(e), this.reader = new Gh(e);
|
|
6545
6578
|
}
|
|
6546
6579
|
async create(e) {
|
|
6547
6580
|
const t = Array.isArray(e), r = await this.writer.create(e);
|
|
@@ -6574,26 +6607,26 @@ let nd = class {
|
|
|
6574
6607
|
await this.writer.delete(e);
|
|
6575
6608
|
}
|
|
6576
6609
|
};
|
|
6577
|
-
const
|
|
6610
|
+
const Hg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6578
6611
|
__proto__: null,
|
|
6579
6612
|
Client: ca,
|
|
6580
6613
|
ONTOLOGY_TYPE: oa,
|
|
6581
6614
|
keyZ: ut,
|
|
6582
6615
|
newUserZ: aa,
|
|
6583
|
-
ontologyID:
|
|
6616
|
+
ontologyID: Yh,
|
|
6584
6617
|
userZ: _t
|
|
6585
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
6618
|
+
}, Symbol.toStringTag, { value: "Module" })), ad = s.object({
|
|
6586
6619
|
username: s.string(),
|
|
6587
6620
|
password: s.string()
|
|
6588
|
-
}),
|
|
6621
|
+
}), od = s.object({
|
|
6589
6622
|
token: s.string(),
|
|
6590
6623
|
user: _t
|
|
6591
|
-
}), Zs = "/auth/login",
|
|
6624
|
+
}), Zs = "/auth/login", cd = 3, ld = "/auth/change-password", ud = s.object({
|
|
6592
6625
|
username: s.string(),
|
|
6593
6626
|
password: s.string(),
|
|
6594
6627
|
newPassword: s.string().min(1)
|
|
6595
|
-
}),
|
|
6596
|
-
let
|
|
6628
|
+
}), hd = s.object({});
|
|
6629
|
+
let dd = class {
|
|
6597
6630
|
constructor(e, t) {
|
|
6598
6631
|
c(this, "token");
|
|
6599
6632
|
c(this, "client");
|
|
@@ -6608,14 +6641,14 @@ let ld = class {
|
|
|
6608
6641
|
if (!this.authenticated) throw new Error("Not authenticated");
|
|
6609
6642
|
await w(
|
|
6610
6643
|
this.client,
|
|
6611
|
-
|
|
6644
|
+
ld,
|
|
6612
6645
|
{
|
|
6613
6646
|
username: this.credentials.username,
|
|
6614
6647
|
password: this.credentials.password,
|
|
6615
6648
|
newPassword: e
|
|
6616
6649
|
},
|
|
6617
|
-
|
|
6618
|
-
|
|
6650
|
+
ud,
|
|
6651
|
+
hd
|
|
6619
6652
|
), this.credentials.password = e;
|
|
6620
6653
|
}
|
|
6621
6654
|
middleware() {
|
|
@@ -6625,10 +6658,10 @@ let ld = class {
|
|
|
6625
6658
|
this.client.send(
|
|
6626
6659
|
Zs,
|
|
6627
6660
|
this.credentials,
|
|
6628
|
-
|
|
6629
|
-
|
|
6630
|
-
).then(([h,
|
|
6631
|
-
if (
|
|
6661
|
+
ad,
|
|
6662
|
+
od
|
|
6663
|
+
).then(([h, f]) => {
|
|
6664
|
+
if (f != null) return l(f);
|
|
6632
6665
|
this.token = h == null ? void 0 : h.token, this.user = h == null ? void 0 : h.user, this.authenticated = !0, l(null);
|
|
6633
6666
|
}).catch(u);
|
|
6634
6667
|
}));
|
|
@@ -6637,12 +6670,12 @@ let ld = class {
|
|
|
6637
6670
|
}
|
|
6638
6671
|
t.params.Authorization = `Bearer ${this.token}`;
|
|
6639
6672
|
const [i, a] = await r(t);
|
|
6640
|
-
return xt.matches(a) && this.retryCount <
|
|
6673
|
+
return xt.matches(a) && this.retryCount < cd ? (this.authenticated = !1, this.authenticating = void 0, this.retryCount += 1, e(t, r)) : (this.retryCount = 0, [i, a]);
|
|
6641
6674
|
};
|
|
6642
6675
|
return e;
|
|
6643
6676
|
}
|
|
6644
6677
|
};
|
|
6645
|
-
const
|
|
6678
|
+
const fd = ["disconnected", "connecting", "connected", "failed"], la = s.enum(fd), ua = s.object({
|
|
6646
6679
|
status: la,
|
|
6647
6680
|
error: s.instanceof(Error).optional(),
|
|
6648
6681
|
message: s.string().optional(),
|
|
@@ -6650,7 +6683,7 @@ const ud = ["disconnected", "connecting", "connected", "failed"], la = s.enum(ud
|
|
|
6650
6683
|
clientVersion: s.string(),
|
|
6651
6684
|
clientServerCompatible: s.boolean(),
|
|
6652
6685
|
nodeVersion: s.string().optional()
|
|
6653
|
-
}),
|
|
6686
|
+
}), yd = s.object({
|
|
6654
6687
|
clusterKey: s.string(),
|
|
6655
6688
|
nodeVersion: s.string().optional()
|
|
6656
6689
|
}), Ls = {
|
|
@@ -6659,7 +6692,7 @@ const ud = ["disconnected", "connecting", "connected", "failed"], la = s.enum(ud
|
|
|
6659
6692
|
error: void 0,
|
|
6660
6693
|
message: "Disconnected",
|
|
6661
6694
|
clientServerCompatible: !1,
|
|
6662
|
-
clientVersion: "0.38.
|
|
6695
|
+
clientVersion: "0.38.1"
|
|
6663
6696
|
}, qs = (n, e, t) => {
|
|
6664
6697
|
const r = t ? "cluster" : "client";
|
|
6665
6698
|
return `Synnax cluster node version ${n != null ? `${n} ` : ""}is too ${t ? "old" : "new"} for client version ${e}.
|
|
@@ -6698,7 +6731,7 @@ const ud = ["disconnected", "connecting", "connected", "failed"], la = s.enum(ud
|
|
|
6698
6731
|
et.ENDPOINT,
|
|
6699
6732
|
{},
|
|
6700
6733
|
s.object({}),
|
|
6701
|
-
|
|
6734
|
+
yd
|
|
6702
6735
|
);
|
|
6703
6736
|
if (i != null) throw i;
|
|
6704
6737
|
const a = r.nodeVersion, o = this.clientVersion, l = this.versionWarned;
|
|
@@ -6734,17 +6767,17 @@ const ud = ["disconnected", "connecting", "connected", "failed"], la = s.enum(ud
|
|
|
6734
6767
|
};
|
|
6735
6768
|
c(et, "ENDPOINT", "/connectivity/check"), c(et, "DEFAULT", Ls), c(et, "connectionStateZ", ua);
|
|
6736
6769
|
let Pt = et;
|
|
6737
|
-
const
|
|
6770
|
+
const Qg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6738
6771
|
__proto__: null,
|
|
6739
6772
|
Checker: Pt,
|
|
6740
6773
|
state: ua,
|
|
6741
6774
|
status: la
|
|
6742
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
6775
|
+
}, Symbol.toStringTag, { value: "Module" })), gd = s.object({
|
|
6743
6776
|
keys: de.array().optional(),
|
|
6744
6777
|
bounds: K.z,
|
|
6745
6778
|
names: s.string().array().optional()
|
|
6746
|
-
}),
|
|
6747
|
-
class
|
|
6779
|
+
}), pd = s.object({}), md = "/frame/delete";
|
|
6780
|
+
class wd {
|
|
6748
6781
|
constructor(e) {
|
|
6749
6782
|
/*
|
|
6750
6783
|
Deleter is used to delete a time range of telemetry from the data engine.
|
|
@@ -6755,10 +6788,10 @@ class gd {
|
|
|
6755
6788
|
async delete(e) {
|
|
6756
6789
|
await w(
|
|
6757
6790
|
this.client,
|
|
6758
|
-
|
|
6791
|
+
md,
|
|
6759
6792
|
e,
|
|
6760
|
-
|
|
6761
|
-
|
|
6793
|
+
gd,
|
|
6794
|
+
pd
|
|
6762
6795
|
);
|
|
6763
6796
|
}
|
|
6764
6797
|
}
|
|
@@ -7120,11 +7153,11 @@ class Mr {
|
|
|
7120
7153
|
throw new L(`
|
|
7121
7154
|
Received an array of channel names or keys but not enough series.
|
|
7122
7155
|
`);
|
|
7123
|
-
const
|
|
7156
|
+
const f = new Ae({
|
|
7124
7157
|
data: t[u],
|
|
7125
7158
|
dataType: h.dataType
|
|
7126
7159
|
});
|
|
7127
|
-
o.push(h.key), l.push(
|
|
7160
|
+
o.push(h.key), l.push(f);
|
|
7128
7161
|
}
|
|
7129
7162
|
return new z(o, l);
|
|
7130
7163
|
}
|
|
@@ -7132,8 +7165,8 @@ class Mr {
|
|
|
7132
7165
|
const o = new z(e);
|
|
7133
7166
|
if (this.adapter == null) return o;
|
|
7134
7167
|
const l = o.columns.map((u) => {
|
|
7135
|
-
var
|
|
7136
|
-
const h = typeof u == "string" ? (
|
|
7168
|
+
var f;
|
|
7169
|
+
const h = typeof u == "string" ? (f = this.adapter) == null ? void 0 : f.get(u) : u;
|
|
7137
7170
|
if (h == null)
|
|
7138
7171
|
throw new L(`
|
|
7139
7172
|
Channel ${u} was not provided in the list of channels when opening the writer
|
|
@@ -7144,8 +7177,8 @@ class Mr {
|
|
|
7144
7177
|
}
|
|
7145
7178
|
const r = [], i = [], a = Object.entries(e);
|
|
7146
7179
|
for (let o = 0; o < a.length; o++) {
|
|
7147
|
-
const [l, u] = a[o], h = await this.fetchChannel(l),
|
|
7148
|
-
r.push(h.key), i.push(
|
|
7180
|
+
const [l, u] = a[o], h = await this.fetchChannel(l), f = new Ae({ data: u, dataType: h.dataType });
|
|
7181
|
+
r.push(h.key), i.push(f);
|
|
7149
7182
|
}
|
|
7150
7183
|
return new z(r, i);
|
|
7151
7184
|
}
|
|
@@ -7168,7 +7201,7 @@ class Br {
|
|
|
7168
7201
|
for (this.stream.closeSend(); ; ) {
|
|
7169
7202
|
const [e, t] = await this.stream.receive();
|
|
7170
7203
|
if (e != null && console.warn(
|
|
7171
|
-
`${this.name} received unexpected response on closure.
|
|
7204
|
+
`${this.name} received unexpected response on closure.
|
|
7172
7205
|
Please report this error to the Synnax team. ${JSON.stringify(e)}`
|
|
7173
7206
|
), t != null) {
|
|
7174
7207
|
if (Ee.matches(t)) return;
|
|
@@ -7186,14 +7219,14 @@ class Br {
|
|
|
7186
7219
|
}
|
|
7187
7220
|
const Ir = new S(-1);
|
|
7188
7221
|
var Ur = /* @__PURE__ */ ((n) => (n[n.Open = 0] = "Open", n[n.Next = 1] = "Next", n[n.Prev = 2] = "Prev", n[n.SeekFirst = 3] = "SeekFirst", n[n.SeekLast = 4] = "SeekLast", n[n.SeekLE = 5] = "SeekLE", n[n.SeekGE = 6] = "SeekGE", n[n.Valid = 7] = "Valid", n[n.Error = 8] = "Error", n))(Ur || {}), fa = /* @__PURE__ */ ((n) => (n[n.None = 0] = "None", n[n.Ack = 1] = "Ack", n[n.Data = 2] = "Data", n))(fa || {});
|
|
7189
|
-
const
|
|
7222
|
+
const bd = s.object({
|
|
7190
7223
|
command: s.nativeEnum(Ur),
|
|
7191
7224
|
span: S.z.optional(),
|
|
7192
7225
|
bounds: K.z.optional(),
|
|
7193
7226
|
stamp: k.z.optional(),
|
|
7194
7227
|
keys: s.number().array().optional(),
|
|
7195
7228
|
chunkSize: s.number().optional()
|
|
7196
|
-
}),
|
|
7229
|
+
}), Td = s.object({
|
|
7197
7230
|
variant: s.nativeEnum(fa),
|
|
7198
7231
|
ack: s.boolean(),
|
|
7199
7232
|
command: s.nativeEnum(Ur),
|
|
@@ -7218,7 +7251,7 @@ const pd = s.object({
|
|
|
7218
7251
|
* @param opts - See {@link IteratorConfig}.
|
|
7219
7252
|
*/
|
|
7220
7253
|
static async _open(e, t, r, i, a = {}) {
|
|
7221
|
-
const o = await jn.open(r, t), l = await i.stream(At.ENDPOINT,
|
|
7254
|
+
const o = await jn.open(r, t), l = await i.stream(At.ENDPOINT, bd, Td), u = new At(l, o);
|
|
7222
7255
|
return await u.execute({
|
|
7223
7256
|
command: 0,
|
|
7224
7257
|
keys: o.keys,
|
|
@@ -7323,7 +7356,7 @@ const pd = s.object({
|
|
|
7323
7356
|
await this.stream.closeAndAck();
|
|
7324
7357
|
}
|
|
7325
7358
|
[Symbol.asyncIterator]() {
|
|
7326
|
-
return new
|
|
7359
|
+
return new vd(this);
|
|
7327
7360
|
}
|
|
7328
7361
|
async execute(e) {
|
|
7329
7362
|
for (this.stream.send(e), this.value = new z(); ; ) {
|
|
@@ -7335,7 +7368,7 @@ const pd = s.object({
|
|
|
7335
7368
|
};
|
|
7336
7369
|
c(At, "ENDPOINT", "/frame/iterate");
|
|
7337
7370
|
let On = At;
|
|
7338
|
-
class
|
|
7371
|
+
class vd {
|
|
7339
7372
|
constructor(e) {
|
|
7340
7373
|
c(this, "iter");
|
|
7341
7374
|
c(this, "open", !1);
|
|
@@ -7350,10 +7383,10 @@ class wd {
|
|
|
7350
7383
|
}
|
|
7351
7384
|
}
|
|
7352
7385
|
}
|
|
7353
|
-
const
|
|
7386
|
+
const Od = s.object({ keys: s.number().array(), downsampleFactor: s.number() }), Ed = s.object({
|
|
7354
7387
|
frame: Dn,
|
|
7355
7388
|
error: Mt.optional().nullable()
|
|
7356
|
-
}),
|
|
7389
|
+
}), Nd = "/frame/stream";
|
|
7357
7390
|
class Mn {
|
|
7358
7391
|
constructor(e, t) {
|
|
7359
7392
|
c(this, "stream");
|
|
@@ -7365,7 +7398,7 @@ class Mn {
|
|
|
7365
7398
|
return this.adapter.keys;
|
|
7366
7399
|
}
|
|
7367
7400
|
static async _open(e, t, { channels: r, downsampleFactor: i }) {
|
|
7368
|
-
const a = await jn.open(e, r), o = await t.stream(
|
|
7401
|
+
const a = await jn.open(e, r), o = await t.stream(Nd, Od, Ed), l = new Mn(o, a);
|
|
7369
7402
|
o.send({ keys: a.keys, downsampleFactor: i ?? 1 });
|
|
7370
7403
|
const [, u] = await o.receive();
|
|
7371
7404
|
if (u != null) throw u;
|
|
@@ -7407,7 +7440,7 @@ class Pe extends Ce.Observer {
|
|
|
7407
7440
|
}
|
|
7408
7441
|
}
|
|
7409
7442
|
var Zr = /* @__PURE__ */ ((n) => (n[n.Open = 0] = "Open", n[n.Write = 1] = "Write", n[n.Commit = 2] = "Commit", n[n.Error = 3] = "Error", n[n.SetAuthority = 4] = "SetAuthority", n))(Zr || {}), ot = /* @__PURE__ */ ((n) => (n[n.PersistStream = 1] = "PersistStream", n[n.Persist = 2] = "Persist", n[n.Stream = 3] = "Stream", n))(ot || {});
|
|
7410
|
-
const
|
|
7443
|
+
const Sd = (n) => {
|
|
7411
7444
|
switch (n) {
|
|
7412
7445
|
case "persist":
|
|
7413
7446
|
return 2;
|
|
@@ -7419,7 +7452,7 @@ const Od = (n) => {
|
|
|
7419
7452
|
if (typeof n == "number" && n in ot) return n;
|
|
7420
7453
|
throw new Error(`invalid writer mode: ${n}`);
|
|
7421
7454
|
}
|
|
7422
|
-
},
|
|
7455
|
+
}, Id = new S(-1), kd = s.object({
|
|
7423
7456
|
start: k.z.optional(),
|
|
7424
7457
|
controlSubject: st.subjectZ.optional(),
|
|
7425
7458
|
keys: s.number().array().optional(),
|
|
@@ -7428,11 +7461,11 @@ const Od = (n) => {
|
|
|
7428
7461
|
errOnUnauthorized: s.boolean().optional(),
|
|
7429
7462
|
enableAutoCommit: s.boolean().optional(),
|
|
7430
7463
|
autoIndexPersistInterval: S.z.optional()
|
|
7431
|
-
}),
|
|
7464
|
+
}), $d = s.object({
|
|
7432
7465
|
command: s.nativeEnum(Zr),
|
|
7433
|
-
config:
|
|
7466
|
+
config: kd.optional(),
|
|
7434
7467
|
frame: Dn.optional()
|
|
7435
|
-
}),
|
|
7468
|
+
}), Ad = s.object({
|
|
7436
7469
|
ack: s.boolean(),
|
|
7437
7470
|
command: s.nativeEnum(Zr),
|
|
7438
7471
|
error: Mt.optional().nullable()
|
|
@@ -7452,9 +7485,9 @@ let ya = (Oe = class {
|
|
|
7452
7485
|
mode: l = 1,
|
|
7453
7486
|
errOnUnauthorized: u = !1,
|
|
7454
7487
|
enableAutoCommit: h = !1,
|
|
7455
|
-
autoIndexPersistInterval:
|
|
7488
|
+
autoIndexPersistInterval: f = S.SECOND
|
|
7456
7489
|
}) {
|
|
7457
|
-
const d = await Mr.open(e, r), M = await t.stream(Oe.ENDPOINT,
|
|
7490
|
+
const d = await Mr.open(e, r), M = await t.stream(Oe.ENDPOINT, $d, Ad), A = new Oe(M, d);
|
|
7458
7491
|
return await A.execute({
|
|
7459
7492
|
command: 0,
|
|
7460
7493
|
config: {
|
|
@@ -7462,10 +7495,10 @@ let ya = (Oe = class {
|
|
|
7462
7495
|
keys: d.keys,
|
|
7463
7496
|
controlSubject: o,
|
|
7464
7497
|
authorities: b(a),
|
|
7465
|
-
mode:
|
|
7498
|
+
mode: Sd(l),
|
|
7466
7499
|
errOnUnauthorized: u,
|
|
7467
7500
|
enableAutoCommit: h,
|
|
7468
|
-
autoIndexPersistInterval:
|
|
7501
|
+
autoIndexPersistInterval: f
|
|
7469
7502
|
}
|
|
7470
7503
|
}), A;
|
|
7471
7504
|
}
|
|
@@ -7548,14 +7581,14 @@ let ya = (Oe = class {
|
|
|
7548
7581
|
return this.stream.received();
|
|
7549
7582
|
}
|
|
7550
7583
|
}, c(Oe, "ENDPOINT", "/frame/write"), Oe);
|
|
7551
|
-
const ga = "framer",
|
|
7584
|
+
const ga = "framer", Rd = (n) => new O({ type: ga, key: n.toString() });
|
|
7552
7585
|
let pa = class {
|
|
7553
7586
|
constructor(e, t, r) {
|
|
7554
7587
|
c(this, "streamClient");
|
|
7555
7588
|
// private readonly unaryClient: UnaryClient;
|
|
7556
7589
|
c(this, "retriever");
|
|
7557
7590
|
c(this, "deleter");
|
|
7558
|
-
this.streamClient = e, this.retriever = r, this.deleter = new
|
|
7591
|
+
this.streamClient = e, this.retriever = r, this.deleter = new wd(t);
|
|
7559
7592
|
}
|
|
7560
7593
|
/**
|
|
7561
7594
|
* Opens a new iterator over the given channels within the provided time range.
|
|
@@ -7642,9 +7675,9 @@ let pa = class {
|
|
|
7642
7675
|
});
|
|
7643
7676
|
}
|
|
7644
7677
|
};
|
|
7645
|
-
const
|
|
7678
|
+
const tp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
7646
7679
|
__proto__: null,
|
|
7647
|
-
ALWAYS_INDEX_PERSIST_ON_AUTO_COMMIT:
|
|
7680
|
+
ALWAYS_INDEX_PERSIST_ON_AUTO_COMMIT: Id,
|
|
7648
7681
|
AUTO_SPAN: Ir,
|
|
7649
7682
|
Client: pa,
|
|
7650
7683
|
Frame: z,
|
|
@@ -7655,10 +7688,10 @@ const Xg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7655
7688
|
Writer: ya,
|
|
7656
7689
|
WriterMode: ot,
|
|
7657
7690
|
frameZ: Dn,
|
|
7658
|
-
ontologyID:
|
|
7691
|
+
ontologyID: Rd,
|
|
7659
7692
|
seriesFromPayload: ha,
|
|
7660
7693
|
seriesToPayload: da
|
|
7661
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
7694
|
+
}, Symbol.toStringTag, { value: "Module" })), xd = st.Authority, Cd = st.stateZ(s.number()), Pd = (n) => {
|
|
7662
7695
|
var e, t;
|
|
7663
7696
|
return n.to == null ? `${(e = n.from) == null ? void 0 : e.resource} - ${(t = n.from) == null ? void 0 : t.subject.name} -> released` : n.from == null ? `${n.to.resource} - released -> ${n.to.subject.name} (${n.to.authority.toString()})` : `${n.to.resource} - ${n.from.subject.name} -> ${n.to.subject.name} (${n.to.authority.toString()})`;
|
|
7664
7697
|
};
|
|
@@ -7682,24 +7715,24 @@ class ma extends Pe {
|
|
|
7682
7715
|
});
|
|
7683
7716
|
}
|
|
7684
7717
|
}
|
|
7685
|
-
const
|
|
7718
|
+
const Dd = "sy_node_1_control";
|
|
7686
7719
|
let wa = class {
|
|
7687
7720
|
constructor(e) {
|
|
7688
7721
|
c(this, "framer");
|
|
7689
7722
|
this.framer = e;
|
|
7690
7723
|
}
|
|
7691
7724
|
async openStateTracker() {
|
|
7692
|
-
const e = await this.framer.openStreamer(
|
|
7725
|
+
const e = await this.framer.openStreamer(Dd);
|
|
7693
7726
|
return new ma(e);
|
|
7694
7727
|
}
|
|
7695
7728
|
};
|
|
7696
|
-
const
|
|
7729
|
+
const rp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
7697
7730
|
__proto__: null,
|
|
7698
|
-
Authority:
|
|
7731
|
+
Authority: xd,
|
|
7699
7732
|
Client: wa,
|
|
7700
7733
|
StateTracker: ma,
|
|
7701
|
-
stateZ:
|
|
7702
|
-
transferString:
|
|
7734
|
+
stateZ: Cd,
|
|
7735
|
+
transferString: Pd
|
|
7703
7736
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
7704
7737
|
let ba = class {
|
|
7705
7738
|
constructor(e, t, r) {
|
|
@@ -7709,13 +7742,13 @@ let ba = class {
|
|
|
7709
7742
|
this.tasks = e, this.racks = t, this.devices = r;
|
|
7710
7743
|
}
|
|
7711
7744
|
};
|
|
7712
|
-
const
|
|
7745
|
+
const ip = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
7713
7746
|
__proto__: null,
|
|
7714
7747
|
Client: ba
|
|
7715
7748
|
}, Symbol.toStringTag, { value: "Module" })), ht = s.number(), Bn = s.object({
|
|
7716
7749
|
key: ht,
|
|
7717
7750
|
name: s.string()
|
|
7718
|
-
}), Ta = Bn.partial({ key: !0 }), va = "rack",
|
|
7751
|
+
}), Ta = Bn.partial({ key: !0 }), va = "rack", jd = (n) => new O({ type: va, key: n.toString() }), Un = s.string(), zt = s.object({
|
|
7719
7752
|
key: Un,
|
|
7720
7753
|
rack: ht,
|
|
7721
7754
|
name: s.string(),
|
|
@@ -7728,7 +7761,7 @@ const np = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7728
7761
|
)
|
|
7729
7762
|
}), Oa = zt.extend({
|
|
7730
7763
|
properties: s.unknown().transform((n) => ct.JSON_CODEC.encodeString(n))
|
|
7731
|
-
}), Ea = "device",
|
|
7764
|
+
}), Ea = "device", Md = (n) => new O({ type: Ea, key: n.toString() }), De = async (n, e, t, r) => {
|
|
7732
7765
|
const i = await n.openStreamer([e, t]), a = (o) => {
|
|
7733
7766
|
const l = [];
|
|
7734
7767
|
return t != null && l.push(
|
|
@@ -7736,10 +7769,10 @@ const np = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7736
7769
|
), e != null && l.push(...o.get(e).series.flatMap((u) => r("set", u))), [l, l.length > 0];
|
|
7737
7770
|
};
|
|
7738
7771
|
return new Pe(i, a);
|
|
7739
|
-
},
|
|
7772
|
+
}, ap = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
7740
7773
|
__proto__: null,
|
|
7741
7774
|
openObservable: De
|
|
7742
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
7775
|
+
}, Symbol.toStringTag, { value: "Module" })), Bd = "sy_device_set", Ud = "sy_device_delete", er = "/hardware/device/retrieve", Zd = "/hardware/device/create", Ld = "/hardware/device/delete", qd = s.object({ devices: Oa.array() }), Yd = s.object({ devices: zt.array() }), _d = s.object({ keys: Un.array() }), zd = s.object({}), tr = s.object({
|
|
7743
7776
|
search: s.string().optional(),
|
|
7744
7777
|
limit: s.number().optional(),
|
|
7745
7778
|
offset: s.number().optional(),
|
|
@@ -7785,28 +7818,28 @@ let Na = class {
|
|
|
7785
7818
|
async create(e) {
|
|
7786
7819
|
const t = !Array.isArray(e), r = await w(
|
|
7787
7820
|
this.client,
|
|
7788
|
-
|
|
7821
|
+
Zd,
|
|
7789
7822
|
{ devices: b(e) },
|
|
7790
|
-
|
|
7791
|
-
|
|
7823
|
+
qd,
|
|
7824
|
+
Yd
|
|
7792
7825
|
);
|
|
7793
7826
|
return t ? r.devices[0] : r.devices;
|
|
7794
7827
|
}
|
|
7795
7828
|
async delete(e) {
|
|
7796
7829
|
await w(
|
|
7797
7830
|
this.client,
|
|
7798
|
-
Bd,
|
|
7799
|
-
{ keys: b(e) },
|
|
7800
7831
|
Ld,
|
|
7801
|
-
|
|
7832
|
+
{ keys: b(e) },
|
|
7833
|
+
_d,
|
|
7834
|
+
zd
|
|
7802
7835
|
);
|
|
7803
7836
|
}
|
|
7804
7837
|
async openDeviceTracker() {
|
|
7805
7838
|
return await De(
|
|
7806
7839
|
this.frameClient,
|
|
7807
|
-
|
|
7808
|
-
|
|
7809
|
-
|
|
7840
|
+
Bd,
|
|
7841
|
+
Ud,
|
|
7842
|
+
Wd
|
|
7810
7843
|
);
|
|
7811
7844
|
}
|
|
7812
7845
|
newSearcherWithOptions(e) {
|
|
@@ -7818,15 +7851,15 @@ let Na = class {
|
|
|
7818
7851
|
};
|
|
7819
7852
|
}
|
|
7820
7853
|
};
|
|
7821
|
-
const
|
|
7854
|
+
const Wd = (n, e) => n === "delete" ? e.toStrings().map((t) => ({ variant: n, key: t, value: void 0 })) : e.parseJSON(zt).map((t) => ({ variant: n, key: t.key, value: t })), cp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
7822
7855
|
__proto__: null,
|
|
7823
7856
|
Client: Na,
|
|
7824
7857
|
ONTOLOGY_TYPE: Ea,
|
|
7825
7858
|
deviceKeyZ: Un,
|
|
7826
7859
|
deviceZ: zt,
|
|
7827
7860
|
newDeviceZ: Oa,
|
|
7828
|
-
ontologyID:
|
|
7829
|
-
}, Symbol.toStringTag, { value: "Module" })), rr = "/hardware/rack/retrieve",
|
|
7861
|
+
ontologyID: Md
|
|
7862
|
+
}, Symbol.toStringTag, { value: "Module" })), rr = "/hardware/rack/retrieve", Gd = "/hardware/rack/create", Fd = "/hardware/rack/delete", sr = s.object({
|
|
7830
7863
|
keys: ht.array().optional(),
|
|
7831
7864
|
names: s.string().array().optional(),
|
|
7832
7865
|
search: s.string().optional(),
|
|
@@ -7834,13 +7867,13 @@ const Yd = (n, e) => n === "delete" ? e.toStrings().map((t) => ({ variant: n, ke
|
|
|
7834
7867
|
limit: s.number().optional()
|
|
7835
7868
|
}), ir = s.object({
|
|
7836
7869
|
racks: F(Bn)
|
|
7837
|
-
}),
|
|
7870
|
+
}), Vd = s.object({
|
|
7838
7871
|
racks: Ta.array()
|
|
7839
|
-
}),
|
|
7872
|
+
}), Jd = s.object({
|
|
7840
7873
|
racks: Bn.array()
|
|
7841
|
-
}),
|
|
7874
|
+
}), Kd = s.object({
|
|
7842
7875
|
keys: ht.array()
|
|
7843
|
-
}),
|
|
7876
|
+
}), Hd = s.object({});
|
|
7844
7877
|
let Sa = class {
|
|
7845
7878
|
constructor(e, t, r) {
|
|
7846
7879
|
c(this, "type", "rack");
|
|
@@ -7852,19 +7885,19 @@ let Sa = class {
|
|
|
7852
7885
|
async delete(e) {
|
|
7853
7886
|
await w(
|
|
7854
7887
|
this.client,
|
|
7855
|
-
zd,
|
|
7856
|
-
{ keys: b(e) },
|
|
7857
7888
|
Fd,
|
|
7858
|
-
|
|
7889
|
+
{ keys: b(e) },
|
|
7890
|
+
Kd,
|
|
7891
|
+
Hd
|
|
7859
7892
|
);
|
|
7860
7893
|
}
|
|
7861
7894
|
async create(e) {
|
|
7862
7895
|
const t = !Array.isArray(e), r = await w(
|
|
7863
7896
|
this.client,
|
|
7864
|
-
|
|
7897
|
+
Gd,
|
|
7865
7898
|
{ racks: b(e) },
|
|
7866
|
-
|
|
7867
|
-
|
|
7899
|
+
Vd,
|
|
7900
|
+
Jd
|
|
7868
7901
|
), i = this.sugar(r.racks);
|
|
7869
7902
|
return t ? i[0] : i;
|
|
7870
7903
|
}
|
|
@@ -7925,13 +7958,13 @@ class Ia {
|
|
|
7925
7958
|
await this.tasks.delete([e]);
|
|
7926
7959
|
}
|
|
7927
7960
|
}
|
|
7928
|
-
const
|
|
7961
|
+
const up = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
7929
7962
|
__proto__: null,
|
|
7930
7963
|
Client: Sa,
|
|
7931
7964
|
ONTOLOGY_TYPE: va,
|
|
7932
7965
|
Rack: Ia,
|
|
7933
7966
|
newRackZ: Ta,
|
|
7934
|
-
ontologyID:
|
|
7967
|
+
ontologyID: jd,
|
|
7935
7968
|
rackKeyZ: ht,
|
|
7936
7969
|
rackZ: Bn
|
|
7937
7970
|
}, Symbol.toStringTag, { value: "Module" })), je = s.union([
|
|
@@ -7967,7 +8000,7 @@ const op = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
7967
8000
|
).or(s.array(s.unknown())).or(s.null()).optional()
|
|
7968
8001
|
}), $a = "task", Aa = (n) => new O({ type: $a, key: n.toString() }), $t = "sy_task_state", Le = "sy_task_cmd", ft = new Error("Task not created");
|
|
7969
8002
|
class Ra {
|
|
7970
|
-
constructor(e, t, r, i, a = !1, o = !1, l, u = null, h = null,
|
|
8003
|
+
constructor(e, t, r, i, a = !1, o = !1, l, u = null, h = null, f = null) {
|
|
7971
8004
|
c(this, "key");
|
|
7972
8005
|
c(this, "name");
|
|
7973
8006
|
c(this, "internal");
|
|
@@ -7978,7 +8011,7 @@ class Ra {
|
|
|
7978
8011
|
c(this, "frameClient");
|
|
7979
8012
|
c(this, "ontologyClient");
|
|
7980
8013
|
c(this, "rangeClient");
|
|
7981
|
-
this.key = e, this.name = t, this.type = r, this.config = i, this.internal = a, this.snapshot = o, l !== null && (this.state = l), this.frameClient = u, this.ontologyClient = h, this.rangeClient =
|
|
8014
|
+
this.key = e, this.name = t, this.type = r, this.config = i, this.internal = a, this.snapshot = o, l !== null && (this.state = l), this.frameClient = u, this.ontologyClient = h, this.rangeClient = f;
|
|
7982
8015
|
}
|
|
7983
8016
|
get payload() {
|
|
7984
8017
|
return {
|
|
@@ -8052,20 +8085,20 @@ class Ra {
|
|
|
8052
8085
|
return e.length == 0 ? null : e[0];
|
|
8053
8086
|
}
|
|
8054
8087
|
}
|
|
8055
|
-
const
|
|
8088
|
+
const Xd = s.object({
|
|
8056
8089
|
rack: ht.optional(),
|
|
8057
8090
|
keys: s.string().array().optional(),
|
|
8058
8091
|
names: s.string().array().optional(),
|
|
8059
8092
|
offset: s.number().optional(),
|
|
8060
8093
|
limit: s.number().optional(),
|
|
8061
8094
|
includeState: s.boolean().optional()
|
|
8062
|
-
}),
|
|
8095
|
+
}), Qd = s.object({
|
|
8063
8096
|
tasks: F(Wt)
|
|
8064
|
-
}),
|
|
8097
|
+
}), ef = "/hardware/task/retrieve", tf = "/hardware/task/create", nf = "/hardware/task/delete", rf = "/hardware/task/copy", sf = s.object({ tasks: ka.array() }), af = s.object({ tasks: Wt.array() }), of = s.object({ keys: je.array() }), cf = s.object({}), lf = s.object({
|
|
8065
8098
|
key: je,
|
|
8066
8099
|
name: s.string(),
|
|
8067
8100
|
snapshot: s.boolean()
|
|
8068
|
-
}),
|
|
8101
|
+
}), uf = s.object({ task: Wt });
|
|
8069
8102
|
let xa = class {
|
|
8070
8103
|
constructor(e, t, r, i) {
|
|
8071
8104
|
c(this, "type", "task");
|
|
@@ -8078,20 +8111,20 @@ let xa = class {
|
|
|
8078
8111
|
async create(e) {
|
|
8079
8112
|
const t = !Array.isArray(e), r = await w(
|
|
8080
8113
|
this.client,
|
|
8081
|
-
Xd,
|
|
8082
|
-
{ tasks: b(e) },
|
|
8083
8114
|
tf,
|
|
8084
|
-
|
|
8115
|
+
{ tasks: b(e) },
|
|
8116
|
+
sf,
|
|
8117
|
+
af
|
|
8085
8118
|
), i = this.sugar(r.tasks);
|
|
8086
8119
|
return t ? i[0] : i;
|
|
8087
8120
|
}
|
|
8088
8121
|
async delete(e) {
|
|
8089
8122
|
await w(
|
|
8090
8123
|
this.client,
|
|
8091
|
-
|
|
8124
|
+
nf,
|
|
8092
8125
|
{ keys: b(e) },
|
|
8093
|
-
|
|
8094
|
-
|
|
8126
|
+
of,
|
|
8127
|
+
cf
|
|
8095
8128
|
);
|
|
8096
8129
|
}
|
|
8097
8130
|
async search(e) {
|
|
@@ -8116,10 +8149,10 @@ let xa = class {
|
|
|
8116
8149
|
async copy(e, t, r) {
|
|
8117
8150
|
const i = await w(
|
|
8118
8151
|
this.client,
|
|
8119
|
-
|
|
8152
|
+
rf,
|
|
8120
8153
|
{ key: e, name: t, snapshot: r },
|
|
8121
|
-
|
|
8122
|
-
|
|
8154
|
+
lf,
|
|
8155
|
+
uf
|
|
8123
8156
|
);
|
|
8124
8157
|
return this.sugar([i.task])[0];
|
|
8125
8158
|
}
|
|
@@ -8130,10 +8163,10 @@ let xa = class {
|
|
|
8130
8163
|
async execRetrieve(e) {
|
|
8131
8164
|
return (await w(
|
|
8132
8165
|
this.client,
|
|
8133
|
-
|
|
8166
|
+
ef,
|
|
8134
8167
|
e,
|
|
8135
|
-
|
|
8136
|
-
|
|
8168
|
+
Xd,
|
|
8169
|
+
Qd
|
|
8137
8170
|
)).tasks;
|
|
8138
8171
|
}
|
|
8139
8172
|
sugar(e) {
|
|
@@ -8187,7 +8220,7 @@ let xa = class {
|
|
|
8187
8220
|
);
|
|
8188
8221
|
}
|
|
8189
8222
|
};
|
|
8190
|
-
const
|
|
8223
|
+
const dp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
8191
8224
|
__proto__: null,
|
|
8192
8225
|
Client: xa,
|
|
8193
8226
|
ONTOLOGY_TYPE: $a,
|
|
@@ -8202,13 +8235,13 @@ const lp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8202
8235
|
key: dt,
|
|
8203
8236
|
name: s.string().min(1),
|
|
8204
8237
|
color: s.string()
|
|
8205
|
-
}), Ca = "label", Pa = (n) => new O({ type: Ca, key: n }),
|
|
8238
|
+
}), Ca = "label", Pa = (n) => new O({ type: Ca, key: n }), hf = s.object({
|
|
8206
8239
|
keys: dt.array().optional(),
|
|
8207
8240
|
for: ee.optional(),
|
|
8208
8241
|
search: s.string().optional(),
|
|
8209
8242
|
offset: s.number().optional(),
|
|
8210
8243
|
limit: s.number().optional()
|
|
8211
|
-
}),
|
|
8244
|
+
}), df = s.object({
|
|
8212
8245
|
labels: F(Gt)
|
|
8213
8246
|
}), Sn = class Sn {
|
|
8214
8247
|
constructor(e) {
|
|
@@ -8232,8 +8265,8 @@ const lp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8232
8265
|
const [t, r] = await this.client.send(
|
|
8233
8266
|
Sn.ENDPOINT,
|
|
8234
8267
|
e,
|
|
8235
|
-
|
|
8236
|
-
|
|
8268
|
+
hf,
|
|
8269
|
+
df
|
|
8237
8270
|
);
|
|
8238
8271
|
if (r != null) throw r;
|
|
8239
8272
|
return t.labels;
|
|
@@ -8241,17 +8274,17 @@ const lp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8241
8274
|
};
|
|
8242
8275
|
c(Sn, "ENDPOINT", "/label/retrieve");
|
|
8243
8276
|
let En = Sn;
|
|
8244
|
-
const Da = Gt.extend({ key: dt.optional() }),
|
|
8277
|
+
const Da = Gt.extend({ key: dt.optional() }), ff = s.object({
|
|
8245
8278
|
labels: Da.array()
|
|
8246
|
-
}),
|
|
8279
|
+
}), yf = s.object({
|
|
8247
8280
|
labels: Gt.array()
|
|
8248
|
-
}),
|
|
8281
|
+
}), gf = s.object({
|
|
8249
8282
|
keys: dt.array()
|
|
8250
8283
|
}), ja = s.object({
|
|
8251
8284
|
id: ee,
|
|
8252
8285
|
labels: dt.array(),
|
|
8253
8286
|
replace: s.boolean().optional()
|
|
8254
|
-
}),
|
|
8287
|
+
}), pf = ja.omit({ replace: !0 }), ar = s.object({}), mf = "/label/create", wf = "/label/delete", bf = "/label/set", Tf = "/label/remove";
|
|
8255
8288
|
let Ma = class {
|
|
8256
8289
|
constructor(e) {
|
|
8257
8290
|
c(this, "client");
|
|
@@ -8260,25 +8293,25 @@ let Ma = class {
|
|
|
8260
8293
|
async create(e) {
|
|
8261
8294
|
return (await w(
|
|
8262
8295
|
this.client,
|
|
8263
|
-
|
|
8296
|
+
mf,
|
|
8264
8297
|
{ labels: b(e) },
|
|
8265
|
-
|
|
8266
|
-
|
|
8298
|
+
ff,
|
|
8299
|
+
yf
|
|
8267
8300
|
)).labels;
|
|
8268
8301
|
}
|
|
8269
8302
|
async delete(e) {
|
|
8270
8303
|
await w(
|
|
8271
8304
|
this.client,
|
|
8272
|
-
|
|
8305
|
+
wf,
|
|
8273
8306
|
{ keys: b(e) },
|
|
8274
|
-
|
|
8307
|
+
gf,
|
|
8275
8308
|
ar
|
|
8276
8309
|
);
|
|
8277
8310
|
}
|
|
8278
8311
|
async set(e, t, { replace: r } = {}) {
|
|
8279
8312
|
await w(
|
|
8280
8313
|
this.client,
|
|
8281
|
-
|
|
8314
|
+
bf,
|
|
8282
8315
|
{ id: e, labels: t, replace: r },
|
|
8283
8316
|
ja,
|
|
8284
8317
|
ar
|
|
@@ -8287,14 +8320,14 @@ let Ma = class {
|
|
|
8287
8320
|
async remove(e, t) {
|
|
8288
8321
|
await w(
|
|
8289
8322
|
this.client,
|
|
8290
|
-
|
|
8323
|
+
Tf,
|
|
8291
8324
|
{ id: e, labels: t },
|
|
8292
|
-
|
|
8325
|
+
pf,
|
|
8293
8326
|
ar
|
|
8294
8327
|
);
|
|
8295
8328
|
}
|
|
8296
8329
|
};
|
|
8297
|
-
const
|
|
8330
|
+
const vf = "sy_label_set", Of = "sy_label_delete";
|
|
8298
8331
|
let Ba = class {
|
|
8299
8332
|
constructor(e, t, r) {
|
|
8300
8333
|
c(this, "type", "label");
|
|
@@ -8333,9 +8366,9 @@ let Ba = class {
|
|
|
8333
8366
|
async openChangeTracker() {
|
|
8334
8367
|
return await De(
|
|
8335
8368
|
this.frameClient,
|
|
8336
|
-
|
|
8337
|
-
|
|
8338
|
-
|
|
8369
|
+
vf,
|
|
8370
|
+
Of,
|
|
8371
|
+
Ef
|
|
8339
8372
|
);
|
|
8340
8373
|
}
|
|
8341
8374
|
async trackLabelsOf(e) {
|
|
@@ -8363,7 +8396,7 @@ let Ba = class {
|
|
|
8363
8396
|
), t;
|
|
8364
8397
|
}
|
|
8365
8398
|
};
|
|
8366
|
-
const
|
|
8399
|
+
const Ef = (n, e) => n === "delete" ? e.toUUIDs().map((t) => ({ variant: n, key: t })) : e.parseJSON(Gt).map((t) => ({ variant: n, key: t.key, value: t })), gp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
8367
8400
|
__proto__: null,
|
|
8368
8401
|
Client: Ba,
|
|
8369
8402
|
ONTOLOGY_TYPE: Ca,
|
|
@@ -8388,20 +8421,20 @@ const Tf = (n, e) => n === "delete" ? e.toUUIDs().map((t) => ({ variant: n, key:
|
|
|
8388
8421
|
actual: n,
|
|
8389
8422
|
empty: t
|
|
8390
8423
|
};
|
|
8391
|
-
}, La = "range", qa = "range-alias", Te = (n) => new O({ type: La, key: n }),
|
|
8424
|
+
}, La = "range", qa = "range-alias", Te = (n) => new O({ type: La, key: n }), Nf = (n) => new O({ type: qa, key: n }), Sf = "sy_range_alias_set", If = "sy_range_alias_delete", kf = s.object({
|
|
8392
8425
|
range: ne,
|
|
8393
8426
|
aliases: s.string().array()
|
|
8394
|
-
}),
|
|
8427
|
+
}), $f = s.object({
|
|
8395
8428
|
aliases: s.record(s.string(), de)
|
|
8396
|
-
}),
|
|
8429
|
+
}), Af = s.object({
|
|
8397
8430
|
range: ne,
|
|
8398
8431
|
aliases: s.record(de.or(s.string()), s.string())
|
|
8399
|
-
}),
|
|
8432
|
+
}), Rf = s.unknown(), xf = s.object({
|
|
8400
8433
|
range: ne,
|
|
8401
8434
|
channels: de.array()
|
|
8402
|
-
}),
|
|
8435
|
+
}), Cf = s.unknown(), Pf = s.object({
|
|
8403
8436
|
range: ne
|
|
8404
|
-
}),
|
|
8437
|
+
}), Df = s.object({
|
|
8405
8438
|
aliases: s.record(s.string(), s.string())
|
|
8406
8439
|
}), he = class he {
|
|
8407
8440
|
constructor(e, t, r) {
|
|
@@ -8427,8 +8460,8 @@ const Tf = (n, e) => n === "delete" ? e.toUUIDs().map((t) => ({ variant: n, key:
|
|
|
8427
8460
|
this.client,
|
|
8428
8461
|
he.RESOLVE_ENDPOINT,
|
|
8429
8462
|
{ range: this.rangeKey, aliases: t },
|
|
8430
|
-
|
|
8431
|
-
|
|
8463
|
+
kf,
|
|
8464
|
+
$f
|
|
8432
8465
|
);
|
|
8433
8466
|
return Object.entries(a.aliases).forEach(([o, l]) => this.cache.set(o, l)), r ? a.aliases[t[0]] : { ...i, ...a.aliases };
|
|
8434
8467
|
}
|
|
@@ -8437,8 +8470,8 @@ const Tf = (n, e) => n === "delete" ? e.toUUIDs().map((t) => ({ variant: n, key:
|
|
|
8437
8470
|
this.client,
|
|
8438
8471
|
he.SET_ENDPOINT,
|
|
8439
8472
|
{ range: this.rangeKey, aliases: e },
|
|
8440
|
-
|
|
8441
|
-
|
|
8473
|
+
Af,
|
|
8474
|
+
Rf
|
|
8442
8475
|
);
|
|
8443
8476
|
}
|
|
8444
8477
|
async list() {
|
|
@@ -8446,8 +8479,8 @@ const Tf = (n, e) => n === "delete" ? e.toUUIDs().map((t) => ({ variant: n, key:
|
|
|
8446
8479
|
this.client,
|
|
8447
8480
|
he.LIST_ENDPOINT,
|
|
8448
8481
|
{ range: this.rangeKey },
|
|
8449
|
-
|
|
8450
|
-
|
|
8482
|
+
Pf,
|
|
8483
|
+
Df
|
|
8451
8484
|
)).aliases;
|
|
8452
8485
|
}
|
|
8453
8486
|
async delete(e) {
|
|
@@ -8455,46 +8488,46 @@ const Tf = (n, e) => n === "delete" ? e.toUUIDs().map((t) => ({ variant: n, key:
|
|
|
8455
8488
|
this.client,
|
|
8456
8489
|
he.DELETE_ENDPOINT,
|
|
8457
8490
|
{ range: this.rangeKey, channels: e },
|
|
8458
|
-
|
|
8459
|
-
|
|
8491
|
+
xf,
|
|
8492
|
+
Cf
|
|
8460
8493
|
);
|
|
8461
8494
|
}
|
|
8462
8495
|
async openChangeTracker() {
|
|
8463
8496
|
return await De(
|
|
8464
8497
|
this.frameClient,
|
|
8465
|
-
|
|
8466
|
-
|
|
8467
|
-
|
|
8498
|
+
Sf,
|
|
8499
|
+
If,
|
|
8500
|
+
Bf(this.rangeKey)
|
|
8468
8501
|
);
|
|
8469
8502
|
}
|
|
8470
8503
|
};
|
|
8471
8504
|
c(he, "SET_ENDPOINT", "/range/alias/set"), c(he, "RESOLVE_ENDPOINT", "/range/alias/resolve"), c(he, "LIST_ENDPOINT", "/range/alias/list"), c(he, "DELETE_ENDPOINT", "/range/alias/delete");
|
|
8472
8505
|
let kr = he;
|
|
8473
|
-
const
|
|
8506
|
+
const jf = s.object({
|
|
8474
8507
|
range: ne,
|
|
8475
8508
|
channel: de,
|
|
8476
8509
|
alias: s.string()
|
|
8477
|
-
}),
|
|
8510
|
+
}), Mf = "---", Bf = (n) => (e, t) => e === "delete" ? t.toStrings().filter((r) => r.split(Mf)[0] === n).map((r) => ({
|
|
8478
8511
|
variant: e,
|
|
8479
8512
|
key: r,
|
|
8480
8513
|
value: void 0
|
|
8481
|
-
})) : t.parseJSON(
|
|
8514
|
+
})) : t.parseJSON(jf).map((r) => ({
|
|
8482
8515
|
variant: e,
|
|
8483
8516
|
key: r.alias,
|
|
8484
8517
|
value: r
|
|
8485
|
-
})),
|
|
8518
|
+
})), Uf = s.object({
|
|
8486
8519
|
range: ne,
|
|
8487
8520
|
keys: s.string().array()
|
|
8488
8521
|
}), qr = s.object({
|
|
8489
8522
|
range: ne,
|
|
8490
8523
|
key: s.string(),
|
|
8491
8524
|
value: s.string()
|
|
8492
|
-
}),
|
|
8525
|
+
}), Zf = s.object({
|
|
8493
8526
|
pairs: F(qr)
|
|
8494
|
-
}),
|
|
8527
|
+
}), Lf = s.object({
|
|
8495
8528
|
range: ne,
|
|
8496
8529
|
pairs: qr.array()
|
|
8497
|
-
}),
|
|
8530
|
+
}), qf = s.object({
|
|
8498
8531
|
range: ne,
|
|
8499
8532
|
keys: s.string().array()
|
|
8500
8533
|
}), ve = class ve {
|
|
@@ -8509,8 +8542,8 @@ const Cf = s.object({
|
|
|
8509
8542
|
this.client,
|
|
8510
8543
|
ve.GET_ENDPOINT,
|
|
8511
8544
|
{ range: this.rangeKey, keys: b(e) },
|
|
8512
|
-
|
|
8513
|
-
|
|
8545
|
+
Uf,
|
|
8546
|
+
Zf
|
|
8514
8547
|
);
|
|
8515
8548
|
return typeof e == "string" ? t.pairs[0].value : Object.fromEntries(t.pairs.map((r) => [r.key, r.value]));
|
|
8516
8549
|
}
|
|
@@ -8527,7 +8560,7 @@ const Cf = s.object({
|
|
|
8527
8560
|
this.client,
|
|
8528
8561
|
ve.SET_ENDPOINT,
|
|
8529
8562
|
{ range: this.rangeKey, pairs: r },
|
|
8530
|
-
|
|
8563
|
+
Lf,
|
|
8531
8564
|
s.unknown()
|
|
8532
8565
|
);
|
|
8533
8566
|
}
|
|
@@ -8536,7 +8569,7 @@ const Cf = s.object({
|
|
|
8536
8569
|
this.client,
|
|
8537
8570
|
ve.DELETE_ENDPOINT,
|
|
8538
8571
|
{ range: this.rangeKey, keys: b(e) },
|
|
8539
|
-
|
|
8572
|
+
qf,
|
|
8540
8573
|
s.unknown()
|
|
8541
8574
|
);
|
|
8542
8575
|
}
|
|
@@ -8559,7 +8592,7 @@ const Cf = s.object({
|
|
|
8559
8592
|
c(ve, "GET_ENDPOINT", "/range/kv/get"), c(ve, "SET_ENDPOINT", "/range/kv/set"), c(ve, "DELETE_ENDPOINT", "/range/kv/delete");
|
|
8560
8593
|
let jt = ve;
|
|
8561
8594
|
class Ya {
|
|
8562
|
-
constructor(e, t = K.ZERO, r, i, a, o, l, u, h,
|
|
8595
|
+
constructor(e, t = K.ZERO, r, i, a, o, l, u, h, f, d) {
|
|
8563
8596
|
c(this, "key");
|
|
8564
8597
|
c(this, "name");
|
|
8565
8598
|
c(this, "kv");
|
|
@@ -8571,7 +8604,7 @@ class Ya {
|
|
|
8571
8604
|
c(this, "labelClient");
|
|
8572
8605
|
c(this, "ontologyClient");
|
|
8573
8606
|
c(this, "rangeClient");
|
|
8574
|
-
this.key = r, this.name = e, this.timeRange = t, this.frameClient = a, this.color = i, this.kv = o, this.aliaser = l, this.channels = u, this.labelClient = h, this.ontologyClient =
|
|
8607
|
+
this.key = r, this.name = e, this.timeRange = t, this.frameClient = a, this.color = i, this.kv = o, this.aliaser = l, this.channels = u, this.labelClient = h, this.ontologyClient = f, this.rangeClient = d;
|
|
8575
8608
|
}
|
|
8576
8609
|
get ontologyID() {
|
|
8577
8610
|
return Te(this.key);
|
|
@@ -8652,14 +8685,14 @@ class Ya {
|
|
|
8652
8685
|
}), e.setCloser(async () => await a.close()), e;
|
|
8653
8686
|
}
|
|
8654
8687
|
}
|
|
8655
|
-
const
|
|
8688
|
+
const Yf = (n, e) => iu(n.timeRange, e.timeRange), _f = s.object({
|
|
8656
8689
|
keys: ne.array().optional(),
|
|
8657
8690
|
names: s.array(s.string()).optional(),
|
|
8658
8691
|
term: s.string().optional(),
|
|
8659
8692
|
overlapsWith: K.z.optional(),
|
|
8660
8693
|
limit: s.number().int().optional(),
|
|
8661
8694
|
offset: s.number().int().optional()
|
|
8662
|
-
}),
|
|
8695
|
+
}), zf = "/range/retrieve", Wf = s.object({
|
|
8663
8696
|
ranges: F(Ft)
|
|
8664
8697
|
});
|
|
8665
8698
|
let _a = class {
|
|
@@ -8699,7 +8732,9 @@ let _a = class {
|
|
|
8699
8732
|
if (l.length === 0)
|
|
8700
8733
|
throw new Se(`range matching ${r} not found`);
|
|
8701
8734
|
if (l.length > 1)
|
|
8702
|
-
throw new Ie(
|
|
8735
|
+
throw new Ie(
|
|
8736
|
+
`multiple ranges matching ${r} found`
|
|
8737
|
+
);
|
|
8703
8738
|
return l[0];
|
|
8704
8739
|
}
|
|
8705
8740
|
getKV(e) {
|
|
@@ -8708,10 +8743,10 @@ let _a = class {
|
|
|
8708
8743
|
async execRetrieve(e) {
|
|
8709
8744
|
const { ranges: t } = await w(
|
|
8710
8745
|
this.unaryClient,
|
|
8711
|
-
|
|
8746
|
+
zf,
|
|
8712
8747
|
e,
|
|
8713
|
-
|
|
8714
|
-
|
|
8748
|
+
_f,
|
|
8749
|
+
Wf
|
|
8715
8750
|
);
|
|
8716
8751
|
return this.sugarMany(t);
|
|
8717
8752
|
}
|
|
@@ -8760,17 +8795,17 @@ let _a = class {
|
|
|
8760
8795
|
});
|
|
8761
8796
|
}
|
|
8762
8797
|
};
|
|
8763
|
-
const
|
|
8798
|
+
const Gf = s.object({
|
|
8764
8799
|
ranges: Ft.array()
|
|
8765
|
-
}),
|
|
8800
|
+
}), Ff = s.object({
|
|
8766
8801
|
parent: ee.optional(),
|
|
8767
8802
|
ranges: Ua.array()
|
|
8768
|
-
}),
|
|
8803
|
+
}), Vf = s.object({
|
|
8769
8804
|
keys: ne.array()
|
|
8770
|
-
}),
|
|
8805
|
+
}), Jf = s.object({}), Kf = s.object({
|
|
8771
8806
|
key: ne,
|
|
8772
8807
|
name: s.string()
|
|
8773
|
-
}),
|
|
8808
|
+
}), Hf = s.object({}), Xf = "/range/create", Qf = "/range/delete", ey = "/range/rename";
|
|
8774
8809
|
class za {
|
|
8775
8810
|
constructor(e) {
|
|
8776
8811
|
c(this, "client");
|
|
@@ -8779,32 +8814,32 @@ class za {
|
|
|
8779
8814
|
async rename(e, t) {
|
|
8780
8815
|
await w(
|
|
8781
8816
|
this.client,
|
|
8782
|
-
|
|
8817
|
+
ey,
|
|
8783
8818
|
{ key: e, name: t },
|
|
8784
|
-
|
|
8785
|
-
|
|
8819
|
+
Kf,
|
|
8820
|
+
Hf
|
|
8786
8821
|
);
|
|
8787
8822
|
}
|
|
8788
8823
|
async create(e, t) {
|
|
8789
8824
|
return (await w(
|
|
8790
8825
|
this.client,
|
|
8791
|
-
|
|
8826
|
+
Xf,
|
|
8792
8827
|
{ ranges: e, ...t },
|
|
8793
|
-
|
|
8794
|
-
|
|
8828
|
+
Ff,
|
|
8829
|
+
Gf
|
|
8795
8830
|
)).ranges;
|
|
8796
8831
|
}
|
|
8797
8832
|
async delete(e) {
|
|
8798
8833
|
await w(
|
|
8799
8834
|
this.client,
|
|
8800
|
-
|
|
8835
|
+
Qf,
|
|
8801
8836
|
{ keys: e },
|
|
8802
|
-
|
|
8803
|
-
|
|
8837
|
+
Vf,
|
|
8838
|
+
Jf
|
|
8804
8839
|
);
|
|
8805
8840
|
}
|
|
8806
8841
|
}
|
|
8807
|
-
const
|
|
8842
|
+
const mp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
8808
8843
|
__proto__: null,
|
|
8809
8844
|
ALIAS_ONTOLOGY_TYPE: qa,
|
|
8810
8845
|
Client: _a,
|
|
@@ -8812,21 +8847,21 @@ const yp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8812
8847
|
ONTOLOGY_TYPE: La,
|
|
8813
8848
|
Range: Ya,
|
|
8814
8849
|
Writer: za,
|
|
8815
|
-
aliasOntologyID:
|
|
8850
|
+
aliasOntologyID: Nf,
|
|
8816
8851
|
analyzeParams: Za,
|
|
8817
8852
|
keyZ: ne,
|
|
8818
8853
|
newPayloadZ: Ua,
|
|
8819
8854
|
ontologyID: Te,
|
|
8820
8855
|
payloadZ: Ft,
|
|
8821
|
-
sort:
|
|
8822
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
8823
|
-
class
|
|
8856
|
+
sort: Yf
|
|
8857
|
+
}, Symbol.toStringTag, { value: "Module" })), ty = "/api/v1/";
|
|
8858
|
+
class ny {
|
|
8824
8859
|
constructor(e, t = {}, r = !1) {
|
|
8825
8860
|
c(this, "url");
|
|
8826
8861
|
c(this, "unary");
|
|
8827
8862
|
c(this, "stream");
|
|
8828
8863
|
c(this, "secure");
|
|
8829
|
-
this.secure = r, this.url = e.child(
|
|
8864
|
+
this.secure = r, this.url = e.child(ty);
|
|
8830
8865
|
const i = new ct.JSONCodec();
|
|
8831
8866
|
this.unary = Yc(
|
|
8832
8867
|
new qc(this.url, i, this.secure),
|
|
@@ -8841,10 +8876,10 @@ const Vt = s.string().uuid(), Zn = s.object({
|
|
|
8841
8876
|
key: s.string(),
|
|
8842
8877
|
name: s.string(),
|
|
8843
8878
|
data: Bt.or(s.string().transform((n) => JSON.parse(n)))
|
|
8844
|
-
}), Wa = "lineplot",
|
|
8879
|
+
}), Wa = "lineplot", ry = (n) => new O({ type: Wa, key: n }), sy = "/workspace/lineplot/retrieve", iy = "/workspace/lineplot/create", ay = "/workspace/lineplot/rename", oy = "/workspace/lineplot/set-data", cy = "/workspace/lineplot/delete", Ga = Zn.partial({ key: !0 }).transform((n) => ({
|
|
8845
8880
|
...n,
|
|
8846
8881
|
data: JSON.stringify(n.data)
|
|
8847
|
-
})),
|
|
8882
|
+
})), ly = s.object({ keys: Vt.array() }), uy = s.object({ workspace: s.string(), linePlots: Ga.array() }), hy = s.object({ key: Vt, name: s.string() }), dy = s.object({ key: Vt, data: s.string() }), fy = s.object({ keys: Vt.array() }), yy = s.object({ linePlots: F(Zn) }), gy = s.object({ linePlots: Zn.array() }), or = s.object({});
|
|
8848
8883
|
let Fa = class {
|
|
8849
8884
|
constructor(e) {
|
|
8850
8885
|
c(this, "client");
|
|
@@ -8853,38 +8888,38 @@ let Fa = class {
|
|
|
8853
8888
|
async create(e, t) {
|
|
8854
8889
|
const r = Array.isArray(t), i = b(t), a = await w(
|
|
8855
8890
|
this.client,
|
|
8856
|
-
|
|
8891
|
+
iy,
|
|
8857
8892
|
{ workspace: e, linePlots: i },
|
|
8858
|
-
|
|
8859
|
-
|
|
8893
|
+
uy,
|
|
8894
|
+
gy
|
|
8860
8895
|
);
|
|
8861
8896
|
return r ? a.linePlots : a.linePlots[0];
|
|
8862
8897
|
}
|
|
8863
8898
|
async rename(e, t) {
|
|
8864
8899
|
await w(
|
|
8865
8900
|
this.client,
|
|
8866
|
-
|
|
8901
|
+
ay,
|
|
8867
8902
|
{ key: e, name: t },
|
|
8868
|
-
|
|
8903
|
+
hy,
|
|
8869
8904
|
or
|
|
8870
8905
|
);
|
|
8871
8906
|
}
|
|
8872
8907
|
async setData(e, t) {
|
|
8873
8908
|
await w(
|
|
8874
8909
|
this.client,
|
|
8875
|
-
|
|
8910
|
+
oy,
|
|
8876
8911
|
{ key: e, data: JSON.stringify(t) },
|
|
8877
|
-
|
|
8912
|
+
dy,
|
|
8878
8913
|
or
|
|
8879
8914
|
);
|
|
8880
8915
|
}
|
|
8881
8916
|
async retrieve(e) {
|
|
8882
8917
|
const t = Array.isArray(e), r = b(e), i = await w(
|
|
8883
8918
|
this.client,
|
|
8884
|
-
|
|
8919
|
+
sy,
|
|
8885
8920
|
{ keys: r },
|
|
8886
|
-
|
|
8887
|
-
|
|
8921
|
+
ly,
|
|
8922
|
+
yy
|
|
8888
8923
|
);
|
|
8889
8924
|
return t ? i.linePlots : i.linePlots[0];
|
|
8890
8925
|
}
|
|
@@ -8892,29 +8927,29 @@ let Fa = class {
|
|
|
8892
8927
|
const t = b(e);
|
|
8893
8928
|
await w(
|
|
8894
8929
|
this.client,
|
|
8895
|
-
|
|
8930
|
+
cy,
|
|
8896
8931
|
{ keys: t },
|
|
8897
|
-
|
|
8932
|
+
fy,
|
|
8898
8933
|
or
|
|
8899
8934
|
);
|
|
8900
8935
|
}
|
|
8901
8936
|
};
|
|
8902
|
-
const
|
|
8937
|
+
const bp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
8903
8938
|
__proto__: null,
|
|
8904
8939
|
Client: Fa,
|
|
8905
8940
|
ONTOLOGY_TYPE: Wa,
|
|
8906
8941
|
keyZ: Vt,
|
|
8907
8942
|
linePlotZ: Zn,
|
|
8908
8943
|
newLinePlotZ: Ga,
|
|
8909
|
-
ontologyID:
|
|
8910
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
8944
|
+
ontologyID: ry
|
|
8945
|
+
}, Symbol.toStringTag, { value: "Module" })), py = s.string().uuid(), Ln = s.object({
|
|
8911
8946
|
key: s.string(),
|
|
8912
8947
|
name: s.string(),
|
|
8913
8948
|
data: Bt.or(s.string().transform((n) => JSON.parse(n)))
|
|
8914
|
-
}), Va = "log",
|
|
8949
|
+
}), Va = "log", my = (n) => new O({ type: Va, key: n }), wy = "/workspace/log/retrieve", by = "/workspace/log/create", Ty = "/workspace/log/rename", vy = "/workspace/log/set-data", Oy = "/workspace/log/delete", Ja = Ln.partial({ key: !0 }).transform((n) => ({
|
|
8915
8950
|
...n,
|
|
8916
8951
|
data: JSON.stringify(n.data)
|
|
8917
|
-
})),
|
|
8952
|
+
})), Ey = s.object({ keys: s.string().array() }), Ny = s.object({ workspace: s.string(), logs: Ja.array() }), Sy = s.object({ key: s.string(), name: s.string() }), Iy = s.object({ key: s.string(), data: s.string() }), ky = s.object({ keys: s.string().array() }), $y = s.object({ logs: Ln.array() }), Ay = s.object({ logs: Ln.array() }), cr = s.object({});
|
|
8918
8953
|
let Ka = class {
|
|
8919
8954
|
constructor(e) {
|
|
8920
8955
|
c(this, "client");
|
|
@@ -8923,38 +8958,38 @@ let Ka = class {
|
|
|
8923
8958
|
async create(e, t) {
|
|
8924
8959
|
const r = Array.isArray(t), i = b(t), a = await w(
|
|
8925
8960
|
this.client,
|
|
8926
|
-
|
|
8961
|
+
by,
|
|
8927
8962
|
{ workspace: e, logs: i },
|
|
8928
|
-
|
|
8929
|
-
|
|
8963
|
+
Ny,
|
|
8964
|
+
Ay
|
|
8930
8965
|
);
|
|
8931
8966
|
return r ? a.logs : a.logs[0];
|
|
8932
8967
|
}
|
|
8933
8968
|
async rename(e, t) {
|
|
8934
8969
|
await w(
|
|
8935
8970
|
this.client,
|
|
8936
|
-
|
|
8971
|
+
Ty,
|
|
8937
8972
|
{ key: e, name: t },
|
|
8938
|
-
|
|
8973
|
+
Sy,
|
|
8939
8974
|
cr
|
|
8940
8975
|
);
|
|
8941
8976
|
}
|
|
8942
8977
|
async setData(e, t) {
|
|
8943
8978
|
await w(
|
|
8944
8979
|
this.client,
|
|
8945
|
-
|
|
8980
|
+
vy,
|
|
8946
8981
|
{ key: e, data: JSON.stringify(t) },
|
|
8947
|
-
|
|
8982
|
+
Iy,
|
|
8948
8983
|
cr
|
|
8949
8984
|
);
|
|
8950
8985
|
}
|
|
8951
8986
|
async retrieve(e) {
|
|
8952
8987
|
const t = Array.isArray(e), r = b(e), i = await w(
|
|
8953
8988
|
this.client,
|
|
8954
|
-
|
|
8989
|
+
wy,
|
|
8955
8990
|
{ keys: r },
|
|
8956
|
-
|
|
8957
|
-
|
|
8991
|
+
Ey,
|
|
8992
|
+
$y
|
|
8958
8993
|
);
|
|
8959
8994
|
return t ? i.logs : i.logs[0];
|
|
8960
8995
|
}
|
|
@@ -8962,22 +8997,22 @@ let Ka = class {
|
|
|
8962
8997
|
const t = b(e);
|
|
8963
8998
|
await w(
|
|
8964
8999
|
this.client,
|
|
8965
|
-
|
|
9000
|
+
Oy,
|
|
8966
9001
|
{ keys: t },
|
|
8967
|
-
|
|
9002
|
+
ky,
|
|
8968
9003
|
cr
|
|
8969
9004
|
);
|
|
8970
9005
|
}
|
|
8971
9006
|
};
|
|
8972
|
-
const
|
|
9007
|
+
const vp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
8973
9008
|
__proto__: null,
|
|
8974
9009
|
Client: Ka,
|
|
8975
9010
|
ONTOLOGY_TYPE: Va,
|
|
8976
|
-
keyZ:
|
|
9011
|
+
keyZ: py,
|
|
8977
9012
|
logZ: Ln,
|
|
8978
9013
|
newLogZ: Ja,
|
|
8979
|
-
ontologyID:
|
|
8980
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
9014
|
+
ontologyID: my
|
|
9015
|
+
}, Symbol.toStringTag, { value: "Module" })), Ry = s.string().uuid(), Yr = s.object({
|
|
8981
9016
|
key: s.string(),
|
|
8982
9017
|
name: s.string(),
|
|
8983
9018
|
data: Bt.or(s.string().transform((n) => JSON.parse(n))),
|
|
@@ -8987,13 +9022,13 @@ const wp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
8987
9022
|
name: s.string(),
|
|
8988
9023
|
snapshot: s.boolean(),
|
|
8989
9024
|
data: s.string().transform((n) => JSON.parse(n))
|
|
8990
|
-
}), Ha = "schematic",
|
|
9025
|
+
}), Ha = "schematic", xy = (n) => new O({ type: Ha, key: n }), Cy = "/workspace/schematic/retrieve", Py = "/workspace/schematic/create", Dy = "/workspace/schematic/rename", jy = "/workspace/schematic/set-data", My = "/workspace/schematic/delete", By = "/workspace/schematic/copy", Xa = Yr.partial({ key: !0, snapshot: !0 }).transform((n) => ({
|
|
8991
9026
|
...n,
|
|
8992
9027
|
data: JSON.stringify(n.data)
|
|
8993
|
-
})),
|
|
9028
|
+
})), Uy = s.object({ keys: s.string().array() }), Zy = s.object({
|
|
8994
9029
|
workspace: s.string(),
|
|
8995
9030
|
schematics: Xa.array()
|
|
8996
|
-
}),
|
|
9031
|
+
}), Ly = s.object({ key: s.string(), name: s.string() }), qy = s.object({ key: s.string(), data: s.string() }), Yy = s.object({ keys: s.string().array() }), _y = s.object({ key: s.string(), name: s.string(), snapshot: s.boolean() }), zy = s.object({ schematics: F(_r) }), Wy = s.object({ schematics: _r.array() }), Gy = s.object({ schematic: Yr }), lr = s.object({});
|
|
8997
9032
|
let Qa = class {
|
|
8998
9033
|
constructor(e) {
|
|
8999
9034
|
c(this, "client");
|
|
@@ -9002,38 +9037,38 @@ let Qa = class {
|
|
|
9002
9037
|
async create(e, t) {
|
|
9003
9038
|
const r = Array.isArray(t), i = b(t), a = await w(
|
|
9004
9039
|
this.client,
|
|
9005
|
-
|
|
9040
|
+
Py,
|
|
9006
9041
|
{ workspace: e, schematics: i },
|
|
9007
|
-
|
|
9008
|
-
|
|
9042
|
+
Zy,
|
|
9043
|
+
Wy
|
|
9009
9044
|
);
|
|
9010
9045
|
return r ? a.schematics : a.schematics[0];
|
|
9011
9046
|
}
|
|
9012
9047
|
async rename(e, t) {
|
|
9013
9048
|
await w(
|
|
9014
9049
|
this.client,
|
|
9015
|
-
|
|
9050
|
+
Dy,
|
|
9016
9051
|
{ key: e, name: t },
|
|
9017
|
-
|
|
9052
|
+
Ly,
|
|
9018
9053
|
lr
|
|
9019
9054
|
);
|
|
9020
9055
|
}
|
|
9021
9056
|
async setData(e, t) {
|
|
9022
9057
|
await w(
|
|
9023
9058
|
this.client,
|
|
9024
|
-
|
|
9059
|
+
jy,
|
|
9025
9060
|
{ key: e, data: JSON.stringify(t) },
|
|
9026
|
-
|
|
9061
|
+
qy,
|
|
9027
9062
|
lr
|
|
9028
9063
|
);
|
|
9029
9064
|
}
|
|
9030
9065
|
async retrieve(e) {
|
|
9031
9066
|
const t = Array.isArray(e), r = b(e), i = await w(
|
|
9032
9067
|
this.client,
|
|
9033
|
-
|
|
9068
|
+
Cy,
|
|
9034
9069
|
{ keys: r },
|
|
9035
|
-
|
|
9036
|
-
|
|
9070
|
+
Uy,
|
|
9071
|
+
zy
|
|
9037
9072
|
);
|
|
9038
9073
|
return t ? i.schematics : i.schematics[0];
|
|
9039
9074
|
}
|
|
@@ -9041,43 +9076,43 @@ let Qa = class {
|
|
|
9041
9076
|
const t = b(e);
|
|
9042
9077
|
await w(
|
|
9043
9078
|
this.client,
|
|
9044
|
-
|
|
9079
|
+
My,
|
|
9045
9080
|
{ keys: t },
|
|
9046
|
-
|
|
9081
|
+
Yy,
|
|
9047
9082
|
lr
|
|
9048
9083
|
);
|
|
9049
9084
|
}
|
|
9050
9085
|
async copy(e, t, r) {
|
|
9051
9086
|
return (await w(
|
|
9052
9087
|
this.client,
|
|
9053
|
-
|
|
9088
|
+
By,
|
|
9054
9089
|
{ key: e, name: t, snapshot: r },
|
|
9055
|
-
|
|
9056
|
-
|
|
9090
|
+
_y,
|
|
9091
|
+
Gy
|
|
9057
9092
|
)).schematic;
|
|
9058
9093
|
}
|
|
9059
9094
|
};
|
|
9060
|
-
const
|
|
9095
|
+
const Ep = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9061
9096
|
__proto__: null,
|
|
9062
9097
|
Client: Qa,
|
|
9063
9098
|
ONTOLOGY_TYPE: Ha,
|
|
9064
|
-
keyZ:
|
|
9099
|
+
keyZ: Ry,
|
|
9065
9100
|
newSchematicZ: Xa,
|
|
9066
|
-
ontologyID:
|
|
9101
|
+
ontologyID: xy,
|
|
9067
9102
|
schematicRemoteZ: _r,
|
|
9068
9103
|
schematicZ: Yr
|
|
9069
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
9104
|
+
}, Symbol.toStringTag, { value: "Module" })), Fy = s.string().uuid(), eo = s.object({
|
|
9070
9105
|
key: s.string(),
|
|
9071
9106
|
name: s.string(),
|
|
9072
9107
|
data: Bt.or(s.string().transform((n) => JSON.parse(n)))
|
|
9073
|
-
}), to = "table",
|
|
9108
|
+
}), to = "table", Vy = (n) => new O({ type: to, key: n }), Jy = "/workspace/table/retrieve", Ky = "/workspace/table/create", Hy = "/workspace/table/rename", Xy = "/workspace/table/set-data", Qy = "/workspace/table/delete", no = eo.partial({ key: !0 }).transform((n) => ({
|
|
9074
9109
|
...n,
|
|
9075
9110
|
data: JSON.stringify(n.data)
|
|
9076
9111
|
})), zr = s.object({
|
|
9077
9112
|
key: s.string(),
|
|
9078
9113
|
name: s.string(),
|
|
9079
9114
|
data: s.string().transform((n) => JSON.parse(n))
|
|
9080
|
-
}),
|
|
9115
|
+
}), eg = s.object({ keys: s.string().array() }), tg = s.object({ workspace: s.string(), tables: no.array() }), ng = s.object({ key: s.string(), name: s.string() }), rg = s.object({ key: s.string(), data: s.string() }), sg = s.object({ keys: s.string().array() }), ig = s.object({ tables: zr.array() }), ag = s.object({ tables: zr.array() }), ur = s.object({});
|
|
9081
9116
|
let ro = class {
|
|
9082
9117
|
constructor(e) {
|
|
9083
9118
|
c(this, "client");
|
|
@@ -9086,38 +9121,38 @@ let ro = class {
|
|
|
9086
9121
|
async create(e, t) {
|
|
9087
9122
|
const r = Array.isArray(t), i = b(t), a = await w(
|
|
9088
9123
|
this.client,
|
|
9089
|
-
|
|
9124
|
+
Ky,
|
|
9090
9125
|
{ workspace: e, tables: i },
|
|
9091
|
-
|
|
9092
|
-
|
|
9126
|
+
tg,
|
|
9127
|
+
ag
|
|
9093
9128
|
);
|
|
9094
9129
|
return r ? a.tables : a.tables[0];
|
|
9095
9130
|
}
|
|
9096
9131
|
async rename(e, t) {
|
|
9097
9132
|
await w(
|
|
9098
9133
|
this.client,
|
|
9099
|
-
|
|
9134
|
+
Hy,
|
|
9100
9135
|
{ key: e, name: t },
|
|
9101
|
-
|
|
9136
|
+
ng,
|
|
9102
9137
|
ur
|
|
9103
9138
|
);
|
|
9104
9139
|
}
|
|
9105
9140
|
async setData(e, t) {
|
|
9106
9141
|
await w(
|
|
9107
9142
|
this.client,
|
|
9108
|
-
|
|
9143
|
+
Xy,
|
|
9109
9144
|
{ key: e, data: JSON.stringify(t) },
|
|
9110
|
-
|
|
9145
|
+
rg,
|
|
9111
9146
|
ur
|
|
9112
9147
|
);
|
|
9113
9148
|
}
|
|
9114
9149
|
async retrieve(e) {
|
|
9115
9150
|
const t = Array.isArray(e), r = b(e), i = await w(
|
|
9116
9151
|
this.client,
|
|
9117
|
-
|
|
9152
|
+
Jy,
|
|
9118
9153
|
{ keys: r },
|
|
9119
|
-
|
|
9120
|
-
|
|
9154
|
+
eg,
|
|
9155
|
+
ig
|
|
9121
9156
|
);
|
|
9122
9157
|
return t ? i.tables : i.tables[0];
|
|
9123
9158
|
}
|
|
@@ -9125,27 +9160,27 @@ let ro = class {
|
|
|
9125
9160
|
const t = b(e);
|
|
9126
9161
|
await w(
|
|
9127
9162
|
this.client,
|
|
9128
|
-
|
|
9163
|
+
Qy,
|
|
9129
9164
|
{ keys: t },
|
|
9130
|
-
|
|
9165
|
+
sg,
|
|
9131
9166
|
ur
|
|
9132
9167
|
);
|
|
9133
9168
|
}
|
|
9134
9169
|
};
|
|
9135
|
-
const
|
|
9170
|
+
const Sp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9136
9171
|
__proto__: null,
|
|
9137
9172
|
Client: ro,
|
|
9138
9173
|
ONTOLOGY_TYPE: to,
|
|
9139
|
-
keyZ:
|
|
9174
|
+
keyZ: Fy,
|
|
9140
9175
|
newTableZ: no,
|
|
9141
|
-
ontologyID:
|
|
9176
|
+
ontologyID: Vy,
|
|
9142
9177
|
tableRemoteZ: zr,
|
|
9143
9178
|
tableZ: eo
|
|
9144
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
9179
|
+
}, Symbol.toStringTag, { value: "Module" })), og = s.string().uuid(), so = (n) => JSON.parse(n), qn = s.object({
|
|
9145
9180
|
key: s.string(),
|
|
9146
9181
|
name: s.string(),
|
|
9147
9182
|
layout: Bt.or(s.string().transform((n) => so(n)))
|
|
9148
|
-
}), io = "workspace",
|
|
9183
|
+
}), io = "workspace", cg = (n) => new O({ type: io, key: n }), Xt = "/workspace/retrieve", lg = "/workspace/create", ug = "/workspace/rename", hg = "/workspace/set-layout", dg = "/workspace/delete", ao = qn.partial({ key: !0 }).transform((n) => ({
|
|
9149
9184
|
...n,
|
|
9150
9185
|
layout: JSON.stringify(n.layout)
|
|
9151
9186
|
})), oo = qn.omit({ layout: !0 }).extend({
|
|
@@ -9156,7 +9191,7 @@ const Op = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
9156
9191
|
author: s.string().uuid().optional(),
|
|
9157
9192
|
offset: s.number().optional(),
|
|
9158
9193
|
limit: s.number().optional()
|
|
9159
|
-
}),
|
|
9194
|
+
}), fg = s.object({ workspaces: ao.array() }), yg = s.object({ key: s.string(), name: s.string() }), gg = s.object({ key: s.string(), layout: s.string() }), pg = s.object({ keys: s.string().array() }), en = s.object({ workspaces: F(qn) }), mg = s.object({ workspaces: oo.array() }), hr = s.object({});
|
|
9160
9195
|
class co {
|
|
9161
9196
|
constructor(e) {
|
|
9162
9197
|
c(this, "type", "workspace");
|
|
@@ -9170,28 +9205,28 @@ class co {
|
|
|
9170
9205
|
async create(e) {
|
|
9171
9206
|
const t = Array.isArray(e), r = b(e), i = await w(
|
|
9172
9207
|
this.client,
|
|
9173
|
-
|
|
9208
|
+
lg,
|
|
9174
9209
|
{ workspaces: r },
|
|
9175
|
-
|
|
9176
|
-
|
|
9210
|
+
fg,
|
|
9211
|
+
mg
|
|
9177
9212
|
);
|
|
9178
9213
|
return t ? i.workspaces : i.workspaces[0];
|
|
9179
9214
|
}
|
|
9180
9215
|
async rename(e, t) {
|
|
9181
9216
|
await w(
|
|
9182
9217
|
this.client,
|
|
9183
|
-
|
|
9218
|
+
ug,
|
|
9184
9219
|
{ key: e, name: t },
|
|
9185
|
-
|
|
9220
|
+
yg,
|
|
9186
9221
|
hr
|
|
9187
9222
|
);
|
|
9188
9223
|
}
|
|
9189
9224
|
async setLayout(e, t) {
|
|
9190
9225
|
await w(
|
|
9191
9226
|
this.client,
|
|
9192
|
-
|
|
9227
|
+
hg,
|
|
9193
9228
|
{ key: e, layout: JSON.stringify(t) },
|
|
9194
|
-
|
|
9229
|
+
gg,
|
|
9195
9230
|
hr
|
|
9196
9231
|
);
|
|
9197
9232
|
}
|
|
@@ -9236,23 +9271,23 @@ class co {
|
|
|
9236
9271
|
const t = b(e);
|
|
9237
9272
|
await w(
|
|
9238
9273
|
this.client,
|
|
9239
|
-
|
|
9274
|
+
dg,
|
|
9240
9275
|
{ keys: t },
|
|
9241
|
-
|
|
9276
|
+
pg,
|
|
9242
9277
|
hr
|
|
9243
9278
|
);
|
|
9244
9279
|
}
|
|
9245
9280
|
}
|
|
9246
|
-
const
|
|
9281
|
+
const Ip = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
9247
9282
|
__proto__: null,
|
|
9248
9283
|
Client: co,
|
|
9249
9284
|
ONTOLOGY_TYPE: io,
|
|
9250
|
-
keyZ:
|
|
9285
|
+
keyZ: og,
|
|
9251
9286
|
newWorkspaceZ: ao,
|
|
9252
|
-
ontologyID:
|
|
9287
|
+
ontologyID: cg,
|
|
9253
9288
|
workspaceRemoteZ: oo,
|
|
9254
9289
|
workspaceZ: qn
|
|
9255
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
9290
|
+
}, Symbol.toStringTag, { value: "Module" })), wg = s.object({
|
|
9256
9291
|
host: s.string({
|
|
9257
9292
|
required_error: "Host is required"
|
|
9258
9293
|
}).min(1, "Host is required"),
|
|
@@ -9270,7 +9305,7 @@ const Ep = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
9270
9305
|
name: s.string().optional(),
|
|
9271
9306
|
retry: Du.breakerConfig.optional()
|
|
9272
9307
|
});
|
|
9273
|
-
class
|
|
9308
|
+
class bg extends pa {
|
|
9274
9309
|
/**
|
|
9275
9310
|
* @param props.host - Hostname of a node in the cluster.
|
|
9276
9311
|
* @param props.port - Port of the node in the cluster.
|
|
@@ -9287,22 +9322,22 @@ class pg extends pa {
|
|
|
9287
9322
|
* the client from polling the cluster for connectivity information.
|
|
9288
9323
|
*/
|
|
9289
9324
|
constructor(t) {
|
|
9290
|
-
const r =
|
|
9325
|
+
const r = wg.parse(t), {
|
|
9291
9326
|
host: i,
|
|
9292
9327
|
port: a,
|
|
9293
9328
|
username: o,
|
|
9294
9329
|
password: l,
|
|
9295
9330
|
connectivityPollFrequency: u,
|
|
9296
9331
|
secure: h,
|
|
9297
|
-
retry:
|
|
9298
|
-
} = r, d = new
|
|
9332
|
+
retry: f
|
|
9333
|
+
} = r, d = new ny(
|
|
9299
9334
|
new $u({ host: i, port: Number(a) }),
|
|
9300
|
-
|
|
9335
|
+
f,
|
|
9301
9336
|
h
|
|
9302
9337
|
);
|
|
9303
|
-
d.use(
|
|
9338
|
+
d.use(Fu);
|
|
9304
9339
|
let M;
|
|
9305
|
-
o != null && l != null && (M = new
|
|
9340
|
+
o != null && l != null && (M = new dd(d.unary, { username: o, password: l }), d.use(M.middleware()));
|
|
9306
9341
|
const A = new jr(
|
|
9307
9342
|
new Ct(d.unary)
|
|
9308
9343
|
), re = new ia(d.unary, A);
|
|
@@ -9324,7 +9359,7 @@ class pg extends pa {
|
|
|
9324
9359
|
/**
|
|
9325
9360
|
* The version of the client.
|
|
9326
9361
|
*/
|
|
9327
|
-
c(this, "clientVersion", "0.38.
|
|
9362
|
+
c(this, "clientVersion", "0.38.1");
|
|
9328
9363
|
this.createdAt = k.now(), this.props = r, this.auth = M, this.transport = d, this.channels = new ra(this, A, d.unary, re), this.connectivity = new Pt(
|
|
9329
9364
|
d.unary,
|
|
9330
9365
|
u,
|
|
@@ -9355,11 +9390,11 @@ class pg extends pa {
|
|
|
9355
9390
|
this.connectivity.stopChecking();
|
|
9356
9391
|
}
|
|
9357
9392
|
}
|
|
9358
|
-
c(
|
|
9359
|
-
const
|
|
9393
|
+
c(bg, "connectivity", Pt);
|
|
9394
|
+
const kp = st.Authority;
|
|
9360
9395
|
export {
|
|
9361
9396
|
it as AuthError,
|
|
9362
|
-
|
|
9397
|
+
kp as Authority,
|
|
9363
9398
|
na as Channel,
|
|
9364
9399
|
Cs as ContiguityError,
|
|
9365
9400
|
I as DataType,
|
|
@@ -9372,33 +9407,33 @@ export {
|
|
|
9372
9407
|
Rt as Rate,
|
|
9373
9408
|
bn as RouteError,
|
|
9374
9409
|
Ae as Series,
|
|
9375
|
-
|
|
9410
|
+
bg as Synnax,
|
|
9376
9411
|
K as TimeRange,
|
|
9377
9412
|
S as TimeSpan,
|
|
9378
9413
|
k as TimeStamp,
|
|
9379
9414
|
xe as UnexpectedError,
|
|
9380
9415
|
L as ValidationError,
|
|
9381
|
-
|
|
9382
|
-
|
|
9383
|
-
|
|
9384
|
-
|
|
9385
|
-
|
|
9386
|
-
|
|
9387
|
-
|
|
9388
|
-
|
|
9416
|
+
zg as access,
|
|
9417
|
+
Fg as channel,
|
|
9418
|
+
Qg as connection,
|
|
9419
|
+
rp as control,
|
|
9420
|
+
cp as device,
|
|
9421
|
+
tp as framer,
|
|
9422
|
+
jg as group,
|
|
9423
|
+
ip as hardware,
|
|
9389
9424
|
vn as isCalculated,
|
|
9390
|
-
|
|
9391
|
-
|
|
9392
|
-
|
|
9393
|
-
|
|
9394
|
-
|
|
9395
|
-
|
|
9396
|
-
|
|
9397
|
-
|
|
9398
|
-
|
|
9399
|
-
|
|
9400
|
-
|
|
9401
|
-
|
|
9402
|
-
|
|
9403
|
-
|
|
9425
|
+
gp as label,
|
|
9426
|
+
bp as linePlot,
|
|
9427
|
+
vp as log,
|
|
9428
|
+
Ug as ontology,
|
|
9429
|
+
Yg as policy,
|
|
9430
|
+
up as rack,
|
|
9431
|
+
mp as ranger,
|
|
9432
|
+
Ep as schematic,
|
|
9433
|
+
ap as signals,
|
|
9434
|
+
wg as synnaxPropsZ,
|
|
9435
|
+
Sp as table,
|
|
9436
|
+
dp as task,
|
|
9437
|
+
Hg as user,
|
|
9438
|
+
Ip as workspace
|
|
9404
9439
|
};
|