@synnaxlabs/client 0.26.0 → 0.26.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.js CHANGED
@@ -4222,7 +4222,7 @@ class Gt {
4222
4222
  return new Gt(n, t);
4223
4223
  }
4224
4224
  }
4225
- const jy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4225
+ const Py = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4226
4226
  __proto__: null,
4227
4227
  BuiltinOntologyType: mc,
4228
4228
  ChangeTracker: Gt,
@@ -4833,7 +4833,7 @@ let _s = class {
4833
4833
  ), this.cache.rename(e, t);
4834
4834
  }
4835
4835
  };
4836
- const My = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4836
+ const Zy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4837
4837
  __proto__: null,
4838
4838
  CacheRetriever: qr,
4839
4839
  Channel: zs,
@@ -5011,7 +5011,7 @@ const gl = ["disconnected", "connecting", "connected", "failed"], Ks = s.enum(gl
5011
5011
  };
5012
5012
  o(Le, "ENDPOINT", "/connectivity/check"), o(Le, "DEFAULT", Dn), o(Le, "connectionStateZ", Vs);
5013
5013
  let mt = Le;
5014
- const Ly = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5014
+ const qy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5015
5015
  __proto__: null,
5016
5016
  Checker: mt,
5017
5017
  state: Vs,
@@ -5344,6 +5344,11 @@ class Wr {
5344
5344
  const n = new Wr(e);
5345
5345
  return await n.update(t), n;
5346
5346
  }
5347
+ async adaptObjectKeys(e) {
5348
+ const t = {};
5349
+ for (const [n, i] of Object.entries(e)) t[await this.adaptToKey(n)] = i;
5350
+ return t;
5351
+ }
5347
5352
  async update(e) {
5348
5353
  const t = await Ys(this.retriever, e);
5349
5354
  this.adapter = new Map(t.map((n) => [n.name, n.key])), this.keys = t.map((n) => n.key);
@@ -5353,6 +5358,9 @@ class Wr {
5353
5358
  if (t.length === 0) throw new Error(`Channel ${e} not found`);
5354
5359
  return t[0];
5355
5360
  }
5361
+ async adaptToKey(e) {
5362
+ return typeof e == "number" ? e : (await this.fetchChannel(e)).key;
5363
+ }
5356
5364
  async adapt(e, t) {
5357
5365
  if (typeof e == "string" || typeof e == "number") {
5358
5366
  if (t == null)
@@ -5670,8 +5678,19 @@ class Ot extends Ar.Observer {
5670
5678
  for await (const t of this.streamer) this.notify(t);
5671
5679
  }
5672
5680
  }
5673
- var Gr = /* @__PURE__ */ ((r) => (r[r.Open = 0] = "Open", r[r.Write = 1] = "Write", r[r.Commit = 2] = "Commit", r[r.Error = 3] = "Error", r[r.SetAuthority = 4] = "SetAuthority", r))(Gr || {}), wt = /* @__PURE__ */ ((r) => (r[r.PersistStream = 1] = "PersistStream", r[r.PersistOnly = 2] = "PersistOnly", r[r.StreamOnly = 3] = "StreamOnly", r))(wt || {});
5674
- const Al = new S(-1), $l = s.object({
5681
+ var Gr = /* @__PURE__ */ ((r) => (r[r.Open = 0] = "Open", r[r.Write = 1] = "Write", r[r.Commit = 2] = "Commit", r[r.Error = 3] = "Error", r[r.SetAuthority = 4] = "SetAuthority", r))(Gr || {}), wt = /* @__PURE__ */ ((r) => (r[r.PersistStream = 1] = "PersistStream", r[r.Persist = 2] = "Persist", r[r.Stream = 3] = "Stream", r))(wt || {});
5682
+ const Al = (r) => {
5683
+ switch (r) {
5684
+ case "persist":
5685
+ return 2;
5686
+ case "stream":
5687
+ return 3;
5688
+ case "persistStream":
5689
+ return 1;
5690
+ default:
5691
+ return r;
5692
+ }
5693
+ }, $l = new S(-1), Rl = s.object({
5675
5694
  start: O.z.optional(),
5676
5695
  controlSubject: ze.subjectZ.optional(),
5677
5696
  keys: s.number().array().optional(),
@@ -5680,11 +5699,11 @@ const Al = new S(-1), $l = s.object({
5680
5699
  errOnUnauthorized: s.boolean().optional(),
5681
5700
  enableAutoCommit: s.boolean().optional(),
5682
5701
  autoIndexPersistInterval: S.z.optional()
5683
- }), Rl = s.object({
5702
+ }), xl = s.object({
5684
5703
  command: s.nativeEnum(Gr),
5685
- config: $l.optional(),
5704
+ config: Rl.optional(),
5686
5705
  frame: Jt.optional()
5687
- }), xl = s.object({
5706
+ }), Cl = s.object({
5688
5707
  ack: s.boolean(),
5689
5708
  command: s.nativeEnum(Gr),
5690
5709
  error: vt.optional().nullable()
@@ -5706,7 +5725,7 @@ let ei = (fe = class {
5706
5725
  enableAutoCommit: f = !1,
5707
5726
  autoIndexPersistInterval: p = S.SECOND
5708
5727
  }) {
5709
- const g = await Wr.open(e, n), D = await t.stream(fe.ENDPOINT, Rl, xl), j = new fe(D, g);
5728
+ const g = await Wr.open(e, n), D = await t.stream(fe.ENDPOINT, xl, Cl), j = new fe(D, g);
5710
5729
  return await j.execute({
5711
5730
  command: 0,
5712
5731
  config: {
@@ -5714,7 +5733,7 @@ let ei = (fe = class {
5714
5733
  keys: g.keys,
5715
5734
  controlSubject: c,
5716
5735
  authorities: T(a),
5717
- mode: l,
5736
+ mode: Al(l),
5718
5737
  errOnUnauthorized: u,
5719
5738
  enableAutoCommit: f,
5720
5739
  autoIndexPersistInterval: p
@@ -5739,18 +5758,22 @@ let ei = (fe = class {
5739
5758
  const n = await this.adapter.adapt(e, t);
5740
5759
  return this.stream.send({ command: 1, frame: n.toPayload() }), !0;
5741
5760
  }
5742
- async setAuthority(e) {
5743
- return (await this.execute({
5744
- command: 4,
5745
- config: {
5746
- keys: Object.keys(e).map((n) => Number(n)),
5747
- authorities: Object.values(e)
5748
- }
5749
- })).ack;
5761
+ async setAuthority(e, t) {
5762
+ let n = { keys: [], authorities: [] };
5763
+ if (typeof e == "number" && t == null)
5764
+ n = { keys: [], authorities: [e] };
5765
+ else {
5766
+ let a;
5767
+ typeof e == "string" || typeof e == "number" ? a = { [e]: t } : a = e, a = await this.adapter.adaptObjectKeys(a), n = {
5768
+ keys: Object.keys(a).map((c) => Number(c)),
5769
+ authorities: Object.values(a)
5770
+ };
5771
+ }
5772
+ return (await this.execute({ command: 4, config: n })).ack;
5750
5773
  }
5751
5774
  /**
5752
5775
  * Commits the written frames to the database. Commit is synchronous, meaning that it
5753
- * will not return until all frames have been commited to the database.
5776
+ * will not return until all frames have been committed to the database.
5754
5777
  *
5755
5778
  * @returns false if the commit failed due to an error. In this case, the caller
5756
5779
  * should acknowledge the error by calling the error method or closing the writer.
@@ -5841,7 +5864,7 @@ let ei = (fe = class {
5841
5864
  const a = t, c = await this.openWriter({
5842
5865
  start: e,
5843
5866
  channels: Object.keys(a),
5844
- mode: wt.PersistOnly
5867
+ mode: wt.Persist
5845
5868
  });
5846
5869
  try {
5847
5870
  await c.write(a), await c.commit();
@@ -5853,7 +5876,7 @@ let ei = (fe = class {
5853
5876
  const i = await this.openWriter({
5854
5877
  start: e,
5855
5878
  channels: t,
5856
- mode: wt.PersistOnly,
5879
+ mode: wt.Persist,
5857
5880
  errOnUnauthorized: !0,
5858
5881
  enableAutoCommit: !0,
5859
5882
  autoIndexPersistInterval: S.MAX
@@ -5888,9 +5911,9 @@ let ei = (fe = class {
5888
5911
  });
5889
5912
  }
5890
5913
  };
5891
- const Yy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5914
+ const zy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5892
5915
  __proto__: null,
5893
- ALWAYS_INDEX_PERSIST_ON_AUTO_COMMIT: Al,
5916
+ ALWAYS_INDEX_PERSIST_ON_AUTO_COMMIT: $l,
5894
5917
  AUTO_SPAN: Cr,
5895
5918
  Client: ti,
5896
5919
  Frame: B,
@@ -5903,7 +5926,7 @@ const Yy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5903
5926
  series: Js,
5904
5927
  seriesFromPayload: Hs,
5905
5928
  seriesToPayload: Xs
5906
- }, Symbol.toStringTag, { value: "Module" })), Cl = ze.Authority, jl = ze.stateZ(s.number()), Pl = (r) => {
5929
+ }, Symbol.toStringTag, { value: "Module" })), jl = ze.Authority, Pl = ze.stateZ(s.number()), Dl = (r) => {
5907
5930
  var e, t;
5908
5931
  return r.to == null ? `${(e = r.from) == null ? void 0 : e.resource} - ${(t = r.from) == null ? void 0 : t.subject.name} -> released` : r.from == null ? `${r.to.resource} - released -> ${r.to.subject.name} (${r.to.authority.toString()})` : `${r.to.resource} - ${r.from.subject.name} -> ${r.to.subject.name} (${r.to.authority.toString()})`;
5909
5932
  };
@@ -5927,24 +5950,24 @@ class ri extends Ot {
5927
5950
  });
5928
5951
  }
5929
5952
  }
5930
- const Dl = "sy_node_1_control";
5953
+ const Ml = "sy_node_1_control";
5931
5954
  let ni = class {
5932
5955
  constructor(e) {
5933
5956
  o(this, "framer");
5934
5957
  this.framer = e;
5935
5958
  }
5936
5959
  async openStateTracker() {
5937
- const e = await this.framer.openStreamer(Dl);
5960
+ const e = await this.framer.openStreamer(Ml);
5938
5961
  return new ri(e);
5939
5962
  }
5940
5963
  };
5941
- const Wy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5964
+ const _y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5942
5965
  __proto__: null,
5943
- Authority: Cl,
5966
+ Authority: jl,
5944
5967
  Client: ni,
5945
5968
  StateTracker: ri,
5946
- stateZ: jl,
5947
- transferString: Pl
5969
+ stateZ: Pl,
5970
+ transferString: Dl
5948
5971
  }, Symbol.toStringTag, { value: "Module" }));
5949
5972
  let si = class {
5950
5973
  constructor(e, t, n) {
@@ -5954,13 +5977,13 @@ let si = class {
5954
5977
  this.tasks = e, this.racks = t, this.devices = n;
5955
5978
  }
5956
5979
  };
5957
- const Fy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5980
+ const Gy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5958
5981
  __proto__: null,
5959
5982
  Client: si
5960
5983
  }, Symbol.toStringTag, { value: "Module" })), Je = s.number(), Qt = s.object({
5961
5984
  key: Je,
5962
5985
  name: s.string()
5963
- }), ii = Qt.partial({ key: !0 }), ai = "rack", Ml = (r) => new C({ type: ai, key: r.toString() }), er = s.string(), Et = s.object({
5986
+ }), ii = Qt.partial({ key: !0 }), ai = "rack", Zl = (r) => new C({ type: ai, key: r.toString() }), er = s.string(), Et = s.object({
5964
5987
  key: er,
5965
5988
  rack: Je,
5966
5989
  name: s.string(),
@@ -5973,7 +5996,7 @@ const Fy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5973
5996
  )
5974
5997
  }), oi = Et.extend({
5975
5998
  properties: s.unknown().transform((r) => Ke.JSON_CODEC.encodeString(r))
5976
- }), ci = "device", Zl = (r) => new C({ type: ci, key: r.toString() }), He = async (r, e, t, n) => {
5999
+ }), ci = "device", Ul = (r) => new C({ type: ci, key: r.toString() }), He = async (r, e, t, n) => {
5977
6000
  const i = await r.openStreamer([e, t]), a = (c) => {
5978
6001
  const l = [];
5979
6002
  return t != null && l.push(
@@ -5981,10 +6004,10 @@ const Fy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5981
6004
  ), e != null && l.push(...c.get(e).series.flatMap((u) => n("set", u))), [l, l.length > 0];
5982
6005
  };
5983
6006
  return new Ot(i, a);
5984
- }, Gy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6007
+ }, Ky = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5985
6008
  __proto__: null,
5986
6009
  openObservable: He
5987
- }, Symbol.toStringTag, { value: "Module" })), Ul = "sy_device_set", Bl = "sy_device_delete", dr = "/hardware/device/retrieve", Ll = "/hardware/device/create", ql = "/hardware/device/delete", Yl = s.object({ devices: oi.array() }), zl = s.object({ devices: Et.array() }), Wl = s.object({ keys: er.array() }), _l = s.object({}), fr = s.object({
6010
+ }, Symbol.toStringTag, { value: "Module" })), Bl = "sy_device_set", Ll = "sy_device_delete", dr = "/hardware/device/retrieve", ql = "/hardware/device/create", Yl = "/hardware/device/delete", zl = s.object({ devices: oi.array() }), Wl = s.object({ devices: Et.array() }), _l = s.object({ keys: er.array() }), Fl = s.object({}), fr = s.object({
5988
6011
  search: s.string().optional(),
5989
6012
  limit: s.number().optional(),
5990
6013
  offset: s.number().optional(),
@@ -6030,28 +6053,28 @@ let li = class {
6030
6053
  async create(e) {
6031
6054
  const t = !Array.isArray(e), n = await w(
6032
6055
  this.client,
6033
- Ll,
6056
+ ql,
6034
6057
  { devices: T(e) },
6035
- Yl,
6036
- zl
6058
+ zl,
6059
+ Wl
6037
6060
  );
6038
6061
  return t ? n.devices[0] : n.devices;
6039
6062
  }
6040
6063
  async delete(e) {
6041
6064
  await w(
6042
6065
  this.client,
6043
- ql,
6066
+ Yl,
6044
6067
  { keys: T(e) },
6045
- Wl,
6046
- _l
6068
+ _l,
6069
+ Fl
6047
6070
  );
6048
6071
  }
6049
6072
  async openDeviceTracker() {
6050
6073
  return await He(
6051
6074
  this.frameClient,
6052
- Ul,
6053
6075
  Bl,
6054
- Fl
6076
+ Ll,
6077
+ Gl
6055
6078
  );
6056
6079
  }
6057
6080
  newSearcherWithOptions(e) {
@@ -6063,15 +6086,15 @@ let li = class {
6063
6086
  };
6064
6087
  }
6065
6088
  };
6066
- const Fl = (r, e) => r === "delete" ? e.toStrings().map((t) => ({ variant: r, key: t, value: void 0 })) : e.parseJSON(Et).map((t) => ({ variant: r, key: t.key, value: t })), Vy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6089
+ const Gl = (r, e) => r === "delete" ? e.toStrings().map((t) => ({ variant: r, key: t, value: void 0 })) : e.parseJSON(Et).map((t) => ({ variant: r, key: t.key, value: t })), Jy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6067
6090
  __proto__: null,
6068
6091
  Client: li,
6069
6092
  DeviceOntologyType: ci,
6070
6093
  deviceKeyZ: er,
6071
6094
  deviceZ: Et,
6072
6095
  newDeviceZ: oi,
6073
- ontologyID: Zl
6074
- }, Symbol.toStringTag, { value: "Module" })), gr = "/hardware/rack/retrieve", Gl = "/hardware/rack/create", Kl = "/hardware/rack/delete", mr = s.object({
6096
+ ontologyID: Ul
6097
+ }, Symbol.toStringTag, { value: "Module" })), gr = "/hardware/rack/retrieve", Kl = "/hardware/rack/create", Vl = "/hardware/rack/delete", mr = s.object({
6075
6098
  keys: Je.array().optional(),
6076
6099
  names: s.string().array().optional(),
6077
6100
  search: s.string().optional(),
@@ -6079,13 +6102,13 @@ const Fl = (r, e) => r === "delete" ? e.toStrings().map((t) => ({ variant: r, ke
6079
6102
  limit: s.number().optional()
6080
6103
  }), wr = s.object({
6081
6104
  racks: Ve(Qt)
6082
- }), Vl = s.object({
6083
- racks: ii.array()
6084
6105
  }), Jl = s.object({
6085
- racks: Qt.array()
6106
+ racks: ii.array()
6086
6107
  }), Hl = s.object({
6108
+ racks: Qt.array()
6109
+ }), Xl = s.object({
6087
6110
  keys: Je.array()
6088
- }), Xl = s.object({});
6111
+ }), Ql = s.object({});
6089
6112
  let ui = class {
6090
6113
  constructor(e, t, n) {
6091
6114
  o(this, "type", "rack");
@@ -6097,19 +6120,19 @@ let ui = class {
6097
6120
  async delete(e) {
6098
6121
  await w(
6099
6122
  this.client,
6100
- Kl,
6123
+ Vl,
6101
6124
  { keys: T(e) },
6102
- Hl,
6103
- Xl
6125
+ Xl,
6126
+ Ql
6104
6127
  );
6105
6128
  }
6106
6129
  async create(e) {
6107
6130
  const t = !Array.isArray(e), n = await w(
6108
6131
  this.client,
6109
- Gl,
6132
+ Kl,
6110
6133
  { racks: T(e) },
6111
- Vl,
6112
- Jl
6134
+ Jl,
6135
+ Hl
6113
6136
  ), i = this.sugar(n.racks);
6114
6137
  return t ? i[0] : i;
6115
6138
  }
@@ -6170,13 +6193,13 @@ class hi {
6170
6193
  await this.tasks.delete([e]);
6171
6194
  }
6172
6195
  }
6173
- const Hy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6196
+ const Xy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6174
6197
  __proto__: null,
6175
6198
  Client: ui,
6176
6199
  Rack: hi,
6177
6200
  RackOntologyType: ai,
6178
6201
  newRackZ: ii,
6179
- ontologyID: Ml,
6202
+ ontologyID: Zl,
6180
6203
  rackKeyZ: Je,
6181
6204
  rackZ: Qt
6182
6205
  }, Symbol.toStringTag, { value: "Module" })), Xe = s.union([
@@ -6202,14 +6225,14 @@ const Hy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6202
6225
  }), yi = tr.omit({ key: !0 }).extend({
6203
6226
  key: Xe.transform((r) => r.toString()).optional(),
6204
6227
  config: s.unknown().transform((r) => Ke.JSON_CODEC.encodeString(r))
6205
- }), Ql = s.object({
6228
+ }), eu = s.object({
6206
6229
  task: Xe,
6207
6230
  type: s.string(),
6208
6231
  key: s.string(),
6209
6232
  args: s.record(s.unknown()).or(
6210
6233
  s.string().transform((r) => r === "" ? {} : JSON.parse(r))
6211
6234
  )
6212
- }), di = "task", eu = (r) => new C({ type: di, key: r.toString() }), yt = "sy_task_state", Un = "sy_task_cmd";
6235
+ }), di = "task", tu = (r) => new C({ type: di, key: r.toString() }), yt = "sy_task_state", Un = "sy_task_cmd";
6213
6236
  class fi {
6214
6237
  constructor(e, t, n, i, a, c = !1, l) {
6215
6238
  o(this, "key");
@@ -6266,16 +6289,16 @@ class fi {
6266
6289
  );
6267
6290
  }
6268
6291
  }
6269
- const tu = s.object({
6292
+ const ru = s.object({
6270
6293
  rack: Je.optional(),
6271
6294
  keys: s.string().array().optional(),
6272
6295
  names: s.string().array().optional(),
6273
6296
  offset: s.number().optional(),
6274
6297
  limit: s.number().optional(),
6275
6298
  includeState: s.boolean().optional()
6276
- }), ru = s.object({
6299
+ }), nu = s.object({
6277
6300
  tasks: Ve(tr)
6278
- }), nu = "/hardware/task/retrieve", su = "/hardware/task/create", iu = "/hardware/task/delete", au = s.object({ tasks: yi.array() }), ou = s.object({ tasks: tr.array() }), cu = s.object({ keys: Xe.array() }), lu = s.object({});
6301
+ }), su = "/hardware/task/retrieve", iu = "/hardware/task/create", au = "/hardware/task/delete", ou = s.object({ tasks: yi.array() }), cu = s.object({ tasks: tr.array() }), lu = s.object({ keys: Xe.array() }), uu = s.object({});
6279
6302
  let pi = class {
6280
6303
  constructor(e, t) {
6281
6304
  o(this, "type", "task");
@@ -6286,20 +6309,20 @@ let pi = class {
6286
6309
  async create(e) {
6287
6310
  const t = !Array.isArray(e), n = await w(
6288
6311
  this.client,
6289
- su,
6312
+ iu,
6290
6313
  { tasks: T(e) },
6291
- au,
6292
- ou
6314
+ ou,
6315
+ cu
6293
6316
  ), i = this.sugar(n.tasks);
6294
6317
  return t ? i[0] : i;
6295
6318
  }
6296
6319
  async delete(e) {
6297
6320
  await w(
6298
6321
  this.client,
6299
- iu,
6322
+ au,
6300
6323
  { keys: T(e) },
6301
- cu,
6302
- lu
6324
+ lu,
6325
+ uu
6303
6326
  );
6304
6327
  }
6305
6328
  async search(e) {
@@ -6328,10 +6351,10 @@ let pi = class {
6328
6351
  async execRetrieve(e) {
6329
6352
  return (await w(
6330
6353
  this.client,
6331
- nu,
6354
+ su,
6332
6355
  e,
6333
- tu,
6334
- ru
6356
+ ru,
6357
+ nu
6335
6358
  )).tasks;
6336
6359
  }
6337
6360
  sugar(e) {
@@ -6363,14 +6386,14 @@ let pi = class {
6363
6386
  );
6364
6387
  }
6365
6388
  };
6366
- const Qy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6389
+ const ed = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6367
6390
  __proto__: null,
6368
6391
  Client: pi,
6369
6392
  DeviceOntologyType: di,
6370
6393
  Task: fi,
6371
- commandZ: Ql,
6394
+ commandZ: eu,
6372
6395
  newTaskZ: yi,
6373
- ontologyID: eu,
6396
+ ontologyID: tu,
6374
6397
  stateZ: bt,
6375
6398
  taskKeyZ: Xe,
6376
6399
  taskZ: tr
@@ -6378,13 +6401,13 @@ const Qy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6378
6401
  key: Qe,
6379
6402
  name: s.string().min(1),
6380
6403
  color: s.string()
6381
- }), gi = "label", uu = (r) => new C({ type: gi, key: r }), hu = s.object({
6404
+ }), gi = "label", hu = (r) => new C({ type: gi, key: r }), yu = s.object({
6382
6405
  keys: Qe.array().optional(),
6383
6406
  for: H.optional(),
6384
6407
  search: s.string().optional(),
6385
6408
  offset: s.number().optional(),
6386
6409
  limit: s.number().optional()
6387
- }), yu = s.object({
6410
+ }), du = s.object({
6388
6411
  labels: St.array().optional().default([])
6389
6412
  });
6390
6413
  var Te;
@@ -6410,23 +6433,23 @@ let mi = (Te = class {
6410
6433
  const [t, n] = await this.client.send(
6411
6434
  Te.ENDPOINT,
6412
6435
  e,
6413
- hu,
6414
- yu
6436
+ yu,
6437
+ du
6415
6438
  );
6416
6439
  if (n != null) throw n;
6417
6440
  return t.labels;
6418
6441
  }
6419
6442
  }, o(Te, "ENDPOINT", "/label/retrieve"), Te);
6420
- const wi = St.extend({ key: Qe.optional() }), du = s.object({
6443
+ const wi = St.extend({ key: Qe.optional() }), fu = s.object({
6421
6444
  labels: wi.array()
6422
- }), fu = s.object({
6423
- labels: St.array()
6424
6445
  }), pu = s.object({
6446
+ labels: St.array()
6447
+ }), gu = s.object({
6425
6448
  keys: Qe.array()
6426
6449
  }), bi = s.object({
6427
6450
  id: H,
6428
6451
  labels: Qe.array()
6429
- }), gu = bi, br = s.object({}), mu = "/label/create", wu = "/label/delete", bu = "/label/set", vu = "/label/remove";
6452
+ }), mu = bi, br = s.object({}), wu = "/label/create", bu = "/label/delete", vu = "/label/set", Tu = "/label/remove";
6430
6453
  let vi = class {
6431
6454
  constructor(e) {
6432
6455
  o(this, "client");
@@ -6435,25 +6458,25 @@ let vi = class {
6435
6458
  async create(e) {
6436
6459
  return (await w(
6437
6460
  this.client,
6438
- mu,
6461
+ wu,
6439
6462
  { labels: T(e) },
6440
- du,
6441
- fu
6463
+ fu,
6464
+ pu
6442
6465
  )).labels;
6443
6466
  }
6444
6467
  async delete(e) {
6445
6468
  await w(
6446
6469
  this.client,
6447
- wu,
6470
+ bu,
6448
6471
  { keys: T(e) },
6449
- pu,
6472
+ gu,
6450
6473
  br
6451
6474
  );
6452
6475
  }
6453
6476
  async set(e, t) {
6454
6477
  await w(
6455
6478
  this.client,
6456
- bu,
6479
+ vu,
6457
6480
  { id: e, labels: t },
6458
6481
  bi,
6459
6482
  br
@@ -6462,14 +6485,14 @@ let vi = class {
6462
6485
  async remove(e, t) {
6463
6486
  await w(
6464
6487
  this.client,
6465
- vu,
6488
+ Tu,
6466
6489
  { id: e, labels: t },
6467
- gu,
6490
+ mu,
6468
6491
  br
6469
6492
  );
6470
6493
  }
6471
6494
  };
6472
- const Tu = "sy_label_set", Ou = "sy_label_delete";
6495
+ const Ou = "sy_label_set", Eu = "sy_label_delete";
6473
6496
  let Ti = class {
6474
6497
  constructor(e, t) {
6475
6498
  o(this, "type", "label");
@@ -6507,20 +6530,20 @@ let Ti = class {
6507
6530
  async openChangeTracker() {
6508
6531
  return await He(
6509
6532
  this.frameClient,
6510
- Tu,
6511
6533
  Ou,
6512
- Eu
6534
+ Eu,
6535
+ Su
6513
6536
  );
6514
6537
  }
6515
6538
  };
6516
- const Eu = (r, e) => r === "delete" ? e.toUUIDs().map((t) => ({
6539
+ const Su = (r, e) => r === "delete" ? e.toUUIDs().map((t) => ({
6517
6540
  variant: r,
6518
6541
  key: t
6519
6542
  })) : e.parseJSON(St).map((t) => ({
6520
6543
  variant: r,
6521
6544
  key: t.key,
6522
6545
  value: t
6523
- })), rd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6546
+ })), nd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6524
6547
  __proto__: null,
6525
6548
  Client: Ti,
6526
6549
  LabelOntologyType: gi,
@@ -6529,7 +6552,7 @@ const Eu = (r, e) => r === "delete" ? e.toUUIDs().map((t) => ({
6529
6552
  keyZ: Qe,
6530
6553
  labelZ: St,
6531
6554
  newLabelPayloadZ: wi,
6532
- ontologyID: uu
6555
+ ontologyID: hu
6533
6556
  }, Symbol.toStringTag, { value: "Module" })), F = s.string().uuid(), et = s.object({
6534
6557
  key: F,
6535
6558
  name: s.string().min(1),
@@ -6548,14 +6571,14 @@ const Eu = (r, e) => r === "delete" ? e.toUUIDs().map((t) => ({
6548
6571
  normalized: e,
6549
6572
  actual: r
6550
6573
  };
6551
- }, Si = "range", Ni = "range-alias", Su = (r) => new C({ type: Si, key: r }), Nu = (r) => new C({ type: Ni, key: r }), Iu = s.object({}), ku = s.object({
6574
+ }, Si = "range", Ni = "range-alias", Nu = (r) => new C({ type: Si, key: r }), Iu = (r) => new C({ type: Ni, key: r }), ku = s.object({}), Au = s.object({
6552
6575
  range: et
6553
- }), Au = s.object({
6554
- range: F
6555
6576
  }), $u = s.object({
6556
6577
  range: F
6557
- }), Ru = s.object({}), xu = "/range/set-active", Cu = "/range/retrieve-active", ju = "/range/clear-active";
6558
- class Pu {
6578
+ }), Ru = s.object({
6579
+ range: F
6580
+ }), xu = s.object({}), Cu = "/range/set-active", ju = "/range/retrieve-active", Pu = "/range/clear-active";
6581
+ class Du {
6559
6582
  constructor(e) {
6560
6583
  o(this, "client");
6561
6584
  this.client = e;
@@ -6563,18 +6586,18 @@ class Pu {
6563
6586
  async setActive(e) {
6564
6587
  await w(
6565
6588
  this.client,
6566
- xu,
6589
+ Cu,
6567
6590
  { range: e },
6568
- Au,
6569
- Iu
6591
+ $u,
6592
+ ku
6570
6593
  );
6571
6594
  }
6572
6595
  async retrieveActive() {
6573
6596
  const [e, t] = await this.client.send(
6574
- Cu,
6597
+ ju,
6575
6598
  {},
6576
6599
  s.object({}),
6577
- ku
6600
+ Au
6578
6601
  );
6579
6602
  if (Q.matches(t)) return null;
6580
6603
  if (t != null) throw t;
@@ -6583,27 +6606,27 @@ class Pu {
6583
6606
  async clearActive(e) {
6584
6607
  await w(
6585
6608
  this.client,
6586
- ju,
6609
+ Pu,
6587
6610
  { range: e },
6588
- $u,
6589
- Ru
6611
+ Ru,
6612
+ xu
6590
6613
  );
6591
6614
  }
6592
6615
  }
6593
- const Du = "sy_range_alias_set", Mu = "sy_range_alias_delete", Zu = s.object({
6616
+ const Mu = "sy_range_alias_set", Zu = "sy_range_alias_delete", Uu = s.object({
6594
6617
  range: F,
6595
6618
  aliases: s.string().array()
6596
- }), Uu = s.object({
6597
- aliases: s.record(s.string(), me)
6598
6619
  }), Bu = s.object({
6620
+ aliases: s.record(s.string(), me)
6621
+ }), Lu = s.object({
6599
6622
  range: F,
6600
6623
  aliases: s.record(me.or(s.string()), s.string())
6601
- }), Lu = s.unknown(), qu = s.object({
6624
+ }), qu = s.unknown(), Yu = s.object({
6602
6625
  range: F,
6603
6626
  channels: me.array()
6604
- }), Yu = s.unknown(), zu = s.object({
6627
+ }), zu = s.unknown(), Wu = s.object({
6605
6628
  range: F
6606
- }), Wu = s.object({
6629
+ }), _u = s.object({
6607
6630
  aliases: s.record(s.string(), s.string())
6608
6631
  }), ae = class ae {
6609
6632
  constructor(e, t, n) {
@@ -6629,8 +6652,8 @@ const Du = "sy_range_alias_set", Mu = "sy_range_alias_delete", Zu = s.object({
6629
6652
  this.client,
6630
6653
  ae.RESOLVE_ENDPOINT,
6631
6654
  { range: this.rangeKey, aliases: t },
6632
- Zu,
6633
- Uu
6655
+ Uu,
6656
+ Bu
6634
6657
  );
6635
6658
  return Object.entries(a.aliases).forEach(([c, l]) => this.cache.set(c, l)), n ? a.aliases[t[0]] : { ...i, ...a.aliases };
6636
6659
  }
@@ -6639,8 +6662,8 @@ const Du = "sy_range_alias_set", Mu = "sy_range_alias_delete", Zu = s.object({
6639
6662
  this.client,
6640
6663
  ae.SET_ENDPOINT,
6641
6664
  { range: this.rangeKey, aliases: e },
6642
- Bu,
6643
- Lu
6665
+ Lu,
6666
+ qu
6644
6667
  );
6645
6668
  }
6646
6669
  async list() {
@@ -6648,8 +6671,8 @@ const Du = "sy_range_alias_set", Mu = "sy_range_alias_delete", Zu = s.object({
6648
6671
  this.client,
6649
6672
  ae.LIST_ENDPOINT,
6650
6673
  { range: this.rangeKey },
6651
- zu,
6652
- Wu
6674
+ Wu,
6675
+ _u
6653
6676
  )).aliases;
6654
6677
  }
6655
6678
  async delete(e) {
@@ -6657,42 +6680,42 @@ const Du = "sy_range_alias_set", Mu = "sy_range_alias_delete", Zu = s.object({
6657
6680
  this.client,
6658
6681
  ae.DELETE_ENDPOINT,
6659
6682
  { range: this.rangeKey, channels: e },
6660
- qu,
6661
- Yu
6683
+ Yu,
6684
+ zu
6662
6685
  );
6663
6686
  }
6664
6687
  async openChangeTracker() {
6665
6688
  return await He(
6666
6689
  this.frameClient,
6667
- Du,
6668
6690
  Mu,
6669
- Gu(this.rangeKey)
6691
+ Zu,
6692
+ Ku(this.rangeKey)
6670
6693
  );
6671
6694
  }
6672
6695
  };
6673
6696
  o(ae, "SET_ENDPOINT", "/range/alias/set"), o(ae, "RESOLVE_ENDPOINT", "/range/alias/resolve"), o(ae, "LIST_ENDPOINT", "/range/alias/list"), o(ae, "DELETE_ENDPOINT", "/range/alias/delete");
6674
6697
  let jr = ae;
6675
- const _u = s.object({
6698
+ const Fu = s.object({
6676
6699
  range: F,
6677
6700
  channel: me,
6678
6701
  alias: s.string()
6679
- }), Fu = "---", Gu = (r) => (e, t) => e === "delete" ? t.toStrings().filter((n) => n.split(Fu)[0] === r).map((n) => ({
6702
+ }), Gu = "---", Ku = (r) => (e, t) => e === "delete" ? t.toStrings().filter((n) => n.split(Gu)[0] === r).map((n) => ({
6680
6703
  variant: e,
6681
6704
  key: n,
6682
6705
  value: void 0
6683
- })) : t.parseJSON(_u).map((n) => ({
6706
+ })) : t.parseJSON(Fu).map((n) => ({
6684
6707
  variant: e,
6685
6708
  key: n.alias,
6686
6709
  value: n
6687
- })), Ku = s.object({
6710
+ })), Vu = s.object({
6688
6711
  range: F,
6689
6712
  keys: s.string().array()
6690
- }), Vu = s.object({
6691
- pairs: s.record(s.string(), s.string())
6692
6713
  }), Ju = s.object({
6693
- range: F,
6694
6714
  pairs: s.record(s.string(), s.string())
6695
6715
  }), Hu = s.object({
6716
+ range: F,
6717
+ pairs: s.record(s.string(), s.string())
6718
+ }), Xu = s.object({
6696
6719
  range: F,
6697
6720
  keys: s.string().array()
6698
6721
  }), de = class de {
@@ -6705,8 +6728,8 @@ const _u = s.object({
6705
6728
  const [t, n] = await this.client.send(
6706
6729
  de.GET_ENDPOINT,
6707
6730
  { range: this.rangeKey, keys: T(e) },
6708
- Ku,
6709
- Vu
6731
+ Vu,
6732
+ Ju
6710
6733
  );
6711
6734
  if (n != null) throw n;
6712
6735
  return Array.isArray(e) ? t.pairs : t.pairs[e];
@@ -6722,7 +6745,7 @@ const _u = s.object({
6722
6745
  range: this.rangeKey,
6723
6746
  pairs: Zr(e) ? e : { [e]: t }
6724
6747
  },
6725
- Ju,
6748
+ Hu,
6726
6749
  s.unknown()
6727
6750
  );
6728
6751
  }
@@ -6731,7 +6754,7 @@ const _u = s.object({
6731
6754
  this.client,
6732
6755
  de.DELETE_ENDPOINT,
6733
6756
  { range: this.rangeKey, keys: T(e) },
6734
- Hu,
6757
+ Xu,
6735
6758
  s.unknown()
6736
6759
  );
6737
6760
  }
@@ -6780,12 +6803,12 @@ class Ii {
6780
6803
  await this.labelClient.removeLabels(vr(this.key), e);
6781
6804
  }
6782
6805
  }
6783
- const Xu = s.object({
6806
+ const Qu = s.object({
6784
6807
  keys: F.array().optional(),
6785
6808
  names: s.array(s.string()).optional(),
6786
6809
  term: s.string().optional(),
6787
6810
  overlapsWith: V.z.optional()
6788
- }), Qu = "/range/retrieve", eh = s.object({
6811
+ }), eh = "/range/retrieve", th = s.object({
6789
6812
  ranges: Ve(et)
6790
6813
  });
6791
6814
  let ki = class {
@@ -6797,7 +6820,7 @@ let ki = class {
6797
6820
  o(this, "channels");
6798
6821
  o(this, "active");
6799
6822
  o(this, "labelClient");
6800
- this.frameClient = e, this.writer = t, this.unaryClient = n, this.channels = i, this.active = new Pu(n), this.labelClient = a;
6823
+ this.frameClient = e, this.writer = t, this.unaryClient = n, this.channels = i, this.active = new Du(n), this.labelClient = a;
6801
6824
  }
6802
6825
  async create(e) {
6803
6826
  const t = !Array.isArray(e), n = this.sugar(await this.writer.create(T(e)));
@@ -6829,10 +6852,10 @@ let ki = class {
6829
6852
  async execRetrieve(e) {
6830
6853
  const { ranges: t } = await w(
6831
6854
  this.unaryClient,
6832
- Qu,
6855
+ eh,
6833
6856
  e,
6834
- Xu,
6835
- eh
6857
+ Qu,
6858
+ th
6836
6859
  );
6837
6860
  return this.sugar(t);
6838
6861
  }
@@ -6868,16 +6891,16 @@ let ki = class {
6868
6891
  );
6869
6892
  }
6870
6893
  };
6871
- const th = s.object({
6894
+ const rh = s.object({
6872
6895
  ranges: et.array()
6873
- }), rh = s.object({
6874
- ranges: Oi.array()
6875
6896
  }), nh = s.object({
6897
+ ranges: Oi.array()
6898
+ }), sh = s.object({
6876
6899
  keys: F.array()
6877
- }), sh = s.object({}), ih = s.object({
6900
+ }), ih = s.object({}), ah = s.object({
6878
6901
  key: F,
6879
6902
  name: s.string()
6880
- }), ah = s.object({}), oh = "/range/create", ch = "/range/delete", lh = "/range/rename";
6903
+ }), oh = s.object({}), ch = "/range/create", lh = "/range/delete", uh = "/range/rename";
6881
6904
  let Ai = class {
6882
6905
  constructor(e) {
6883
6906
  o(this, "client");
@@ -6886,32 +6909,32 @@ let Ai = class {
6886
6909
  async rename(e, t) {
6887
6910
  await w(
6888
6911
  this.client,
6889
- lh,
6912
+ uh,
6890
6913
  { key: e, name: t },
6891
- ih,
6892
- ah
6914
+ ah,
6915
+ oh
6893
6916
  );
6894
6917
  }
6895
6918
  async create(e) {
6896
6919
  return (await w(
6897
6920
  this.client,
6898
- oh,
6921
+ ch,
6899
6922
  { ranges: e },
6900
- rh,
6901
- th
6923
+ nh,
6924
+ rh
6902
6925
  )).ranges;
6903
6926
  }
6904
6927
  async delete(e) {
6905
6928
  await w(
6906
6929
  this.client,
6907
- ch,
6930
+ lh,
6908
6931
  { keys: e },
6909
- nh,
6910
- sh
6932
+ sh,
6933
+ ih
6911
6934
  );
6912
6935
  }
6913
6936
  };
6914
- const id = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6937
+ const ad = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6915
6938
  __proto__: null,
6916
6939
  Client: ki,
6917
6940
  Range: Ii,
@@ -6922,16 +6945,16 @@ const id = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6922
6945
  keyZ: F,
6923
6946
  newPayloadZ: Oi,
6924
6947
  payloadZ: et,
6925
- rangeAliasOntologyID: Nu,
6926
- rangeOntologyID: Su
6927
- }, Symbol.toStringTag, { value: "Module" })), uh = "/api/v1/";
6928
- class hh {
6948
+ rangeAliasOntologyID: Iu,
6949
+ rangeOntologyID: Nu
6950
+ }, Symbol.toStringTag, { value: "Module" })), hh = "/api/v1/";
6951
+ class yh {
6929
6952
  constructor(e, t = !1) {
6930
6953
  o(this, "url");
6931
6954
  o(this, "unary");
6932
6955
  o(this, "stream");
6933
6956
  o(this, "secure");
6934
- this.secure = t, this.url = e.child(uh);
6957
+ this.secure = t, this.url = e.child(hh);
6935
6958
  const n = new Ke.JSONCodec();
6936
6959
  this.unary = new Ya(this.url, n, this.secure), this.stream = new Ha(this.url, n, this.secure);
6937
6960
  }
@@ -6943,8 +6966,8 @@ const Kr = s.string().uuid(), Vr = s.object({
6943
6966
  key: s.string(),
6944
6967
  name: s.string(),
6945
6968
  data: Lr.or(s.string().transform((r) => JSON.parse(r)))
6946
- }), yh = s.object({ keys: s.string().array() }), dh = s.object({ linePlots: Vr.array() });
6947
- let fh = class {
6969
+ }), dh = s.object({ keys: s.string().array() }), fh = s.object({ linePlots: Vr.array() });
6970
+ let ph = class {
6948
6971
  constructor(e) {
6949
6972
  o(this, "ENDPOINT", "/workspace/lineplot/retrieve");
6950
6973
  o(this, "client");
@@ -6952,7 +6975,7 @@ let fh = class {
6952
6975
  }
6953
6976
  async retrieve(e) {
6954
6977
  const t = T(e);
6955
- return (await w(this.client, this.ENDPOINT, { keys: t }, yh, dh)).linePlots;
6978
+ return (await w(this.client, this.ENDPOINT, { keys: t }, dh, fh)).linePlots;
6956
6979
  }
6957
6980
  };
6958
6981
  const we = s.string().uuid(), $i = (r) => JSON.parse(r), Jr = s.object({
@@ -6961,24 +6984,24 @@ const we = s.string().uuid(), $i = (r) => JSON.parse(r), Jr = s.object({
6961
6984
  layout: Lr.or(s.string().transform((r) => $i(r)))
6962
6985
  }), Hr = Jr.omit({ layout: !0 }).extend({
6963
6986
  layout: s.string().transform((r) => $i(r))
6964
- }), Ri = "workspace", ph = (r) => new C({ type: Ri, key: r }), gh = Vr.partial({ key: !0 }).transform((r) => ({
6987
+ }), Ri = "workspace", gh = (r) => new C({ type: Ri, key: r }), mh = Vr.partial({ key: !0 }).transform((r) => ({
6965
6988
  ...r,
6966
6989
  data: JSON.stringify(r.data)
6967
- })), mh = s.object({
6990
+ })), wh = s.object({
6968
6991
  workspace: we,
6969
- linePlots: gh.array()
6970
- }), wh = s.object({
6971
- linePlots: Vr.array()
6992
+ linePlots: mh.array()
6972
6993
  }), bh = s.object({
6994
+ linePlots: Vr.array()
6995
+ }), vh = s.object({
6973
6996
  keys: Kr.array()
6974
- }), vh = s.object({}), Th = s.object({
6997
+ }), Th = s.object({}), Oh = s.object({
6975
6998
  key: Kr,
6976
6999
  name: s.string()
6977
- }), Oh = s.object({}), Eh = s.object({
7000
+ }), Eh = s.object({}), Sh = s.object({
6978
7001
  key: Kr,
6979
7002
  data: s.string()
6980
- }), Sh = s.object({}), Nh = "/workspace/lineplot/create", Ih = "/workspace/lineplot/delete", kh = "/workspace/lineplot/rename", Ah = "/workspace/lineplot/set-data";
6981
- let $h = class {
7003
+ }), Nh = s.object({}), Ih = "/workspace/lineplot/create", kh = "/workspace/lineplot/delete", Ah = "/workspace/lineplot/rename", $h = "/workspace/lineplot/set-data";
7004
+ let Rh = class {
6982
7005
  constructor(e) {
6983
7006
  o(this, "client");
6984
7007
  this.client = e;
@@ -6987,45 +7010,45 @@ let $h = class {
6987
7010
  const n = { ...t, data: JSON.stringify(t.data) };
6988
7011
  return (await w(
6989
7012
  this.client,
6990
- Nh,
7013
+ Ih,
6991
7014
  { workspace: e, linePlots: [n] },
6992
- mh,
6993
- wh
7015
+ wh,
7016
+ bh
6994
7017
  )).linePlots[0];
6995
7018
  }
6996
7019
  async delete(e) {
6997
7020
  const t = T(e);
6998
7021
  await w(
6999
7022
  this.client,
7000
- Ih,
7023
+ kh,
7001
7024
  { keys: t },
7002
- bh,
7003
- vh
7025
+ vh,
7026
+ Th
7004
7027
  );
7005
7028
  }
7006
7029
  async rename(e, t) {
7007
7030
  await w(
7008
7031
  this.client,
7009
- kh,
7032
+ Ah,
7010
7033
  { key: e, name: t },
7011
- Th,
7012
- Oh
7034
+ Oh,
7035
+ Eh
7013
7036
  );
7014
7037
  }
7015
7038
  async setData(e, t) {
7016
7039
  await w(
7017
7040
  this.client,
7018
- Ah,
7041
+ $h,
7019
7042
  { key: e, data: JSON.stringify(t) },
7020
- Eh,
7021
- Sh
7043
+ Sh,
7044
+ Nh
7022
7045
  );
7023
7046
  }
7024
- }, Rh = class {
7047
+ }, xh = class {
7025
7048
  constructor(e) {
7026
7049
  o(this, "writer");
7027
7050
  o(this, "retriever");
7028
- this.writer = new $h(e), this.retriever = new fh(e);
7051
+ this.writer = new Rh(e), this.retriever = new ph(e);
7029
7052
  }
7030
7053
  async create(e, t) {
7031
7054
  return await this.writer.create(e, t);
@@ -7044,15 +7067,15 @@ let $h = class {
7044
7067
  await this.writer.delete(e);
7045
7068
  }
7046
7069
  };
7047
- const xh = s.object({
7070
+ const Ch = s.object({
7048
7071
  keys: we.array().optional(),
7049
7072
  search: s.string().optional(),
7050
7073
  author: s.string().uuid().optional(),
7051
7074
  offset: s.number().optional(),
7052
7075
  limit: s.number().optional()
7053
- }), Ch = s.object({ workspaces: Ve(Hr) });
7076
+ }), jh = s.object({ workspaces: Ve(Hr) });
7054
7077
  var Oe;
7055
- let jh = (Oe = class {
7078
+ let Ph = (Oe = class {
7056
7079
  constructor(e) {
7057
7080
  o(this, "client");
7058
7081
  this.client = e;
@@ -7075,12 +7098,12 @@ let jh = (Oe = class {
7075
7098
  this.client,
7076
7099
  Oe.ENDPOINT,
7077
7100
  e,
7078
- xh,
7079
- Ch
7101
+ Ch,
7102
+ jh
7080
7103
  )).workspaces;
7081
7104
  }
7082
7105
  }, o(Oe, "ENDPOINT", "/workspace/retrieve"), Oe);
7083
- const rr = s.string().uuid(), Ph = s.object({
7106
+ const rr = s.string().uuid(), Dh = s.object({
7084
7107
  key: s.string(),
7085
7108
  name: s.string(),
7086
7109
  data: Lr.or(s.string().transform((r) => JSON.parse(r))),
@@ -7090,8 +7113,8 @@ const rr = s.string().uuid(), Ph = s.object({
7090
7113
  name: s.string(),
7091
7114
  snapshot: s.boolean(),
7092
7115
  data: s.string().transform((r) => JSON.parse(r))
7093
- }), Dh = s.object({ keys: s.string().array() }), Mh = s.object({ schematics: Xr.array() });
7094
- class Zh {
7116
+ }), Mh = s.object({ keys: s.string().array() }), Zh = s.object({ schematics: Xr.array() });
7117
+ class Uh {
7095
7118
  constructor(e) {
7096
7119
  o(this, "ENDPOINT", "/workspace/schematic/retrieve");
7097
7120
  o(this, "client");
@@ -7102,37 +7125,37 @@ class Zh {
7102
7125
  this.client,
7103
7126
  this.ENDPOINT,
7104
7127
  { keys: T(e) },
7105
- Dh,
7106
- Mh
7128
+ Mh,
7129
+ Zh
7107
7130
  )).schematics;
7108
7131
  }
7109
7132
  }
7110
- const Uh = Ph.partial({ key: !0, snapshot: !0 }).transform((r) => ({
7133
+ const Bh = Dh.partial({ key: !0, snapshot: !0 }).transform((r) => ({
7111
7134
  ...r,
7112
7135
  data: JSON.stringify(r.data)
7113
- })), Bh = s.object({
7136
+ })), Lh = s.object({
7114
7137
  workspace: we,
7115
- schematics: Uh.array()
7116
- }), Lh = s.object({
7117
- schematics: Xr.array()
7138
+ schematics: Bh.array()
7118
7139
  }), qh = s.object({
7140
+ schematics: Xr.array()
7141
+ }), Yh = s.object({
7119
7142
  keys: rr.array()
7120
- }), Yh = s.object({}), zh = s.object({
7143
+ }), zh = s.object({}), Wh = s.object({
7121
7144
  key: rr,
7122
7145
  name: s.string()
7123
- }), Bn = s.object({}), Wh = s.object({
7146
+ }), Bn = s.object({}), _h = s.object({
7124
7147
  key: rr,
7125
7148
  data: s.string()
7126
7149
  });
7127
7150
  s.object({});
7128
- const _h = s.object({
7151
+ const Fh = s.object({
7129
7152
  key: rr,
7130
7153
  name: s.string(),
7131
7154
  snapshot: s.boolean()
7132
- }), Fh = s.object({
7155
+ }), Gh = s.object({
7133
7156
  schematic: Xr
7134
- }), Gh = "/workspace/schematic/create", Kh = "/workspace/schematic/delete", Vh = "/workspace/schematic/rename", Jh = "/workspace/schematic/set-data", Hh = "/workspace/schematic/copy";
7135
- let Xh = class {
7157
+ }), Kh = "/workspace/schematic/create", Vh = "/workspace/schematic/delete", Jh = "/workspace/schematic/rename", Hh = "/workspace/schematic/set-data", Xh = "/workspace/schematic/copy";
7158
+ let Qh = class {
7136
7159
  constructor(e) {
7137
7160
  o(this, "client");
7138
7161
  this.client = e;
@@ -7141,54 +7164,54 @@ let Xh = class {
7141
7164
  const n = { ...t, data: JSON.stringify(t.data) };
7142
7165
  return (await w(
7143
7166
  this.client,
7144
- Gh,
7167
+ Kh,
7145
7168
  { workspace: e, schematics: [n] },
7146
- Bh,
7147
- Lh
7169
+ Lh,
7170
+ qh
7148
7171
  )).schematics[0];
7149
7172
  }
7150
7173
  async copy(e, t, n) {
7151
7174
  return (await w(
7152
7175
  this.client,
7153
- Hh,
7176
+ Xh,
7154
7177
  { key: e, name: t, snapshot: n },
7155
- _h,
7156
- Fh
7178
+ Fh,
7179
+ Gh
7157
7180
  )).schematic;
7158
7181
  }
7159
7182
  async delete(e) {
7160
7183
  const t = T(e);
7161
7184
  await w(
7162
7185
  this.client,
7163
- Kh,
7186
+ Vh,
7164
7187
  { keys: t },
7165
- qh,
7166
- Yh
7188
+ Yh,
7189
+ zh
7167
7190
  );
7168
7191
  }
7169
7192
  async rename(e, t) {
7170
7193
  await w(
7171
7194
  this.client,
7172
- Vh,
7195
+ Jh,
7173
7196
  { key: e, name: t },
7174
- zh,
7197
+ Wh,
7175
7198
  Bn
7176
7199
  );
7177
7200
  }
7178
7201
  async setData(e, t) {
7179
7202
  await w(
7180
7203
  this.client,
7181
- Jh,
7204
+ Hh,
7182
7205
  { key: e, data: JSON.stringify(t) },
7183
- Wh,
7206
+ _h,
7184
7207
  Bn
7185
7208
  );
7186
7209
  }
7187
- }, Qh = class {
7210
+ }, ey = class {
7188
7211
  constructor(e) {
7189
7212
  o(this, "writer");
7190
7213
  o(this, "retriever");
7191
- this.writer = new Xh(e), this.retriever = new Zh(e);
7214
+ this.writer = new Qh(e), this.retriever = new Uh(e);
7192
7215
  }
7193
7216
  async create(e, t) {
7194
7217
  return await this.writer.create(e, t);
@@ -7210,23 +7233,23 @@ let Xh = class {
7210
7233
  return await this.writer.copy(e, t, n);
7211
7234
  }
7212
7235
  };
7213
- const ey = Jr.partial({ key: !0 }).transform((r) => ({
7236
+ const ty = Jr.partial({ key: !0 }).transform((r) => ({
7214
7237
  ...r,
7215
7238
  layout: JSON.stringify(r.layout)
7216
- })), ty = s.object({
7217
- workspaces: ey.array()
7218
- }), ry = s.object({
7219
- workspaces: Hr.array()
7239
+ })), ry = s.object({
7240
+ workspaces: ty.array()
7220
7241
  }), ny = s.object({
7242
+ workspaces: Hr.array()
7243
+ }), sy = s.object({
7221
7244
  keys: we.array()
7222
- }), sy = s.object({}), iy = s.object({
7245
+ }), iy = s.object({}), ay = s.object({
7223
7246
  key: we,
7224
7247
  name: s.string()
7225
- }), ay = s.object({}), oy = s.object({
7248
+ }), oy = s.object({}), cy = s.object({
7226
7249
  key: we,
7227
7250
  layout: s.string()
7228
- }), cy = s.object({}), ly = "/workspace/create", uy = "/workspace/delete", hy = "/workspace/rename", yy = "/workspace/set-layout";
7229
- class dy {
7251
+ }), ly = s.object({}), uy = "/workspace/create", hy = "/workspace/delete", yy = "/workspace/rename", dy = "/workspace/set-layout";
7252
+ class fy {
7230
7253
  constructor(e) {
7231
7254
  o(this, "client");
7232
7255
  this.client = e;
@@ -7234,37 +7257,37 @@ class dy {
7234
7257
  async create(e) {
7235
7258
  return (await w(
7236
7259
  this.client,
7237
- ly,
7260
+ uy,
7238
7261
  { workspaces: T(e) },
7239
- ty,
7240
- ry
7262
+ ry,
7263
+ ny
7241
7264
  )).workspaces;
7242
7265
  }
7243
7266
  async delete(e) {
7244
7267
  await w(
7245
7268
  this.client,
7246
- uy,
7269
+ hy,
7247
7270
  { keys: T(e) },
7248
- ny,
7249
- sy
7271
+ sy,
7272
+ iy
7250
7273
  );
7251
7274
  }
7252
7275
  async rename(e, t) {
7253
7276
  await w(
7254
7277
  this.client,
7255
- hy,
7278
+ yy,
7256
7279
  { key: e, name: t },
7257
- iy,
7258
- ay
7280
+ ay,
7281
+ oy
7259
7282
  );
7260
7283
  }
7261
7284
  async setLayout(e, t) {
7262
7285
  await w(
7263
7286
  this.client,
7264
- yy,
7287
+ dy,
7265
7288
  { key: e, layout: JSON.stringify(t) },
7266
- oy,
7267
- cy
7289
+ cy,
7290
+ ly
7268
7291
  );
7269
7292
  }
7270
7293
  }
@@ -7275,7 +7298,7 @@ class xi {
7275
7298
  o(this, "linePlot");
7276
7299
  o(this, "retriever");
7277
7300
  o(this, "writer");
7278
- this.schematic = new Qh(e), this.linePlot = new Rh(e), this.retriever = new jh(e), this.writer = new dy(e);
7301
+ this.schematic = new ey(e), this.linePlot = new xh(e), this.retriever = new Ph(e), this.writer = new fy(e);
7279
7302
  }
7280
7303
  async search(e) {
7281
7304
  return await this.retriever.search(e);
@@ -7304,15 +7327,15 @@ class xi {
7304
7327
  await this.writer.delete(e);
7305
7328
  }
7306
7329
  }
7307
- const hd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7330
+ const yd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7308
7331
  __proto__: null,
7309
7332
  Client: xi,
7310
7333
  WorkspaceOntologyType: Ri,
7311
7334
  keyZ: we,
7312
- ontologyID: ph,
7335
+ ontologyID: gh,
7313
7336
  workspaceRemoteZ: Hr,
7314
7337
  workspaceZ: Jr
7315
- }, Symbol.toStringTag, { value: "Module" })), fy = s.object({
7338
+ }, Symbol.toStringTag, { value: "Module" })), py = s.object({
7316
7339
  host: s.string({
7317
7340
  required_error: "Host is required"
7318
7341
  }).min(1, "Host is required"),
@@ -7329,7 +7352,7 @@ const hd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7329
7352
  secure: s.boolean().optional().default(!1),
7330
7353
  name: s.string().optional()
7331
7354
  });
7332
- class py extends ti {
7355
+ class gy extends ti {
7333
7356
  /**
7334
7357
  * @param props.host - Hostname of a node in the cluster.
7335
7358
  * @param props.port - Port of the node in the cluster.
@@ -7346,7 +7369,7 @@ class py extends ti {
7346
7369
  * the client from polling the cluster for connectivity information.
7347
7370
  */
7348
7371
  constructor(t) {
7349
- const n = fy.parse(t), { host: i, port: a, username: c, password: l, connectivityPollFrequency: u, secure: f } = n, p = new hh(new oc({ host: i, port: Number(a) }), f);
7372
+ const n = py.parse(t), { host: i, port: a, username: c, password: l, connectivityPollFrequency: u, secure: f } = n, p = new yh(new oc({ host: i, port: Number(a) }), f);
7350
7373
  p.use(pc);
7351
7374
  let g;
7352
7375
  c != null && l != null && (g = new pl(p.unary, {
@@ -7394,11 +7417,11 @@ class py extends ti {
7394
7417
  this.connectivity.stopChecking();
7395
7418
  }
7396
7419
  }
7397
- o(py, "connectivity", mt);
7398
- const yd = ze.Authority;
7420
+ o(gy, "connectivity", mt);
7421
+ const dd = ze.Authority;
7399
7422
  export {
7400
7423
  We as AuthError,
7401
- yd as Authority,
7424
+ dd as Authority,
7402
7425
  zs as Channel,
7403
7426
  An as ContiguityError,
7404
7427
  E as DataType,
@@ -7411,24 +7434,24 @@ export {
7411
7434
  Br as Rate,
7412
7435
  Lt as RouteError,
7413
7436
  Ie as Series,
7414
- py as Synnax,
7437
+ gy as Synnax,
7415
7438
  V as TimeRange,
7416
7439
  S as TimeSpan,
7417
7440
  O as TimeStamp,
7418
7441
  Ee as UnexpectedError,
7419
7442
  P as ValidationError,
7420
- My as channel,
7421
- Ly as connection,
7422
- Wy as control,
7423
- Vy as device,
7424
- Yy as framer,
7425
- Fy as hardware,
7426
- rd as label,
7427
- jy as ontology,
7428
- Hy as rack,
7429
- id as ranger,
7430
- Gy as signals,
7431
- fy as synnaxPropsZ,
7432
- Qy as task,
7433
- hd as workspace
7443
+ Zy as channel,
7444
+ qy as connection,
7445
+ _y as control,
7446
+ Jy as device,
7447
+ zy as framer,
7448
+ Gy as hardware,
7449
+ nd as label,
7450
+ Py as ontology,
7451
+ Xy as rack,
7452
+ ad as ranger,
7453
+ Ky as signals,
7454
+ py as synnaxPropsZ,
7455
+ ed as task,
7456
+ yd as workspace
7434
7457
  };