@viamrobotics/sdk 0.52.1 → 0.52.2

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/main.es.js CHANGED
@@ -1004,7 +1004,7 @@ function Lh() {
1004
1004
  return t;
1005
1005
  },
1006
1006
  readScalar(a, e, n) {
1007
- return Rn(a, e, n ?? ze.BIGINT, !0);
1007
+ return _n(a, e, n ?? ze.BIGINT, !0);
1008
1008
  },
1009
1009
  writeScalar(a, e, n) {
1010
1010
  if (e !== void 0 && (n || $i(a, e)))
@@ -1046,7 +1046,7 @@ function pi(a, e, n, t, o) {
1046
1046
  break;
1047
1047
  case "scalar":
1048
1048
  try {
1049
- r.push(Rn(n.T, c, n.L, !0));
1049
+ r.push(_n(n.T, c, n.L, !0));
1050
1050
  } catch (d) {
1051
1051
  let g = `cannot decode field ${o.typeName}.${n.name} from JSON: ${ae(c)}`;
1052
1052
  throw d instanceof Error && d.message.length > 0 && (g += `: ${d.message}`), new Error(g);
@@ -1080,7 +1080,7 @@ function pi(a, e, n, t, o) {
1080
1080
  break;
1081
1081
  case "scalar":
1082
1082
  try {
1083
- r[d] = Rn(n.V.T, l, ze.BIGINT, !0);
1083
+ r[d] = _n(n.V.T, l, ze.BIGINT, !0);
1084
1084
  } catch (R) {
1085
1085
  let S = `cannot decode map value for field ${o.typeName}.${n.name} from JSON: ${ae(e)}`;
1086
1086
  throw R instanceof Error && R.message.length > 0 && (S += `: ${R.message}`), new Error(S);
@@ -1112,7 +1112,7 @@ function pi(a, e, n, t, o) {
1112
1112
  break;
1113
1113
  case "scalar":
1114
1114
  try {
1115
- const d = Rn(n.T, e, n.L, !1);
1115
+ const d = _n(n.T, e, n.L, !1);
1116
1116
  switch (d) {
1117
1117
  case Xn:
1118
1118
  ci(n, a);
@@ -1138,9 +1138,9 @@ function Gh(a, e) {
1138
1138
  e = !1;
1139
1139
  break;
1140
1140
  }
1141
- return Rn(a, e, ze.BIGINT, !0).toString();
1141
+ return _n(a, e, ze.BIGINT, !0).toString();
1142
1142
  }
1143
- function Rn(a, e, n, t) {
1143
+ function _n(a, e, n, t) {
1144
1144
  if (e === null)
1145
1145
  return t ? dn(a, n) : Xn;
1146
1146
  switch (a) {
@@ -1502,9 +1502,9 @@ function yi(a, e, n, t) {
1502
1502
  Vh(n, i, a.no, e);
1503
1503
  else
1504
1504
  for (const r of e)
1505
- _n(n, i, a.no, r);
1505
+ Sn(n, i, a.no, r);
1506
1506
  else
1507
- _n(n, i, a.no, e);
1507
+ Sn(n, i, a.no, e);
1508
1508
  break;
1509
1509
  case "message":
1510
1510
  if (o) {
@@ -1536,12 +1536,12 @@ function Yh(a, e, n, t, o) {
1536
1536
  q(t == "true" || t == "false"), i = t == "true";
1537
1537
  break;
1538
1538
  }
1539
- switch (_n(a, n.K, 1, i), n.V.kind) {
1539
+ switch (Sn(a, n.K, 1, i), n.V.kind) {
1540
1540
  case "scalar":
1541
- _n(a, n.V.T, 2, o);
1541
+ Sn(a, n.V.T, 2, o);
1542
1542
  break;
1543
1543
  case "enum":
1544
- _n(a, f.INT32, 2, o);
1544
+ Sn(a, f.INT32, 2, o);
1545
1545
  break;
1546
1546
  case "message":
1547
1547
  q(o !== void 0), a.tag(2, G.LengthDelimited).bytes(o.toBinary(e));
@@ -1553,7 +1553,7 @@ function vi(a, e, n, t) {
1553
1553
  const o = Ki(n.T, t);
1554
1554
  n.delimited ? a.tag(n.no, G.StartGroup).raw(o.toBinary(e)).tag(n.no, G.EndGroup) : a.tag(n.no, G.LengthDelimited).bytes(o.toBinary(e));
1555
1555
  }
1556
- function _n(a, e, n, t) {
1556
+ function Sn(a, e, n, t) {
1557
1557
  q(t !== void 0);
1558
1558
  let [o, i] = Xi(e);
1559
1559
  a.tag(n, o)[i](t);
@@ -1705,12 +1705,12 @@ function Wh() {
1705
1705
  const i = a[o.localName];
1706
1706
  let r;
1707
1707
  if (o.repeated)
1708
- r = i.map(Jn);
1708
+ r = i.map(zn);
1709
1709
  else if (o.kind == "map") {
1710
1710
  r = t[o.localName];
1711
1711
  for (const [c, l] of Object.entries(i))
1712
- r[c] = Jn(l);
1713
- } else o.kind == "oneof" ? r = o.findField(i.case) ? { case: i.case, value: Jn(i.value) } : { case: void 0 } : r = Jn(i);
1712
+ r[c] = zn(l);
1713
+ } else o.kind == "oneof" ? r = o.findField(i.case) ? { case: i.case, value: zn(i.value) } : { case: void 0 } : r = zn(i);
1714
1714
  t[o.localName] = r;
1715
1715
  }
1716
1716
  for (const o of e.runtime.bin.listUnknownFields(a))
@@ -1719,7 +1719,7 @@ function Wh() {
1719
1719
  }
1720
1720
  };
1721
1721
  }
1722
- function Jn(a) {
1722
+ function zn(a) {
1723
1723
  if (a === void 0)
1724
1724
  return a;
1725
1725
  if (Ke(a))
@@ -2112,13 +2112,13 @@ ue.fields = u.util.newFieldList(() => [
2112
2112
  { no: 999, name: "uninterpreted_option", kind: "message", T: Y, repeated: !0 },
2113
2113
  { no: 2, name: "declaration", kind: "message", T: ge, repeated: !0 },
2114
2114
  { no: 50, name: "features", kind: "message", T: z, opt: !0 },
2115
- { no: 3, name: "verification", kind: "enum", T: u.getEnumType(In), opt: !0, default: In.UNVERIFIED }
2115
+ { no: 3, name: "verification", kind: "enum", T: u.getEnumType(bn), opt: !0, default: bn.UNVERIFIED }
2116
2116
  ]);
2117
- var In;
2117
+ var bn;
2118
2118
  (function(a) {
2119
2119
  a[a.DECLARATION = 0] = "DECLARATION", a[a.UNVERIFIED = 1] = "UNVERIFIED";
2120
- })(In || (In = {}));
2121
- u.util.setEnumType(In, "google.protobuf.ExtensionRangeOptions.VerificationState", [
2120
+ })(bn || (bn = {}));
2121
+ u.util.setEnumType(bn, "google.protobuf.ExtensionRangeOptions.VerificationState", [
2122
2122
  { no: 0, name: "DECLARATION" },
2123
2123
  { no: 1, name: "UNVERIFIED" }
2124
2124
  ]);
@@ -2385,7 +2385,7 @@ fe.fields = u.util.newFieldList(() => [
2385
2385
  { no: 10, name: "java_multiple_files", kind: "scalar", T: 8, opt: !0, default: !1 },
2386
2386
  { no: 20, name: "java_generate_equals_and_hash", kind: "scalar", T: 8, opt: !0 },
2387
2387
  { no: 27, name: "java_string_check_utf8", kind: "scalar", T: 8, opt: !0, default: !1 },
2388
- { no: 9, name: "optimize_for", kind: "enum", T: u.getEnumType(bn), opt: !0, default: bn.SPEED },
2388
+ { no: 9, name: "optimize_for", kind: "enum", T: u.getEnumType(Mn), opt: !0, default: Mn.SPEED },
2389
2389
  { no: 11, name: "go_package", kind: "scalar", T: 9, opt: !0 },
2390
2390
  { no: 16, name: "cc_generic_services", kind: "scalar", T: 8, opt: !0, default: !1 },
2391
2391
  { no: 17, name: "java_generic_services", kind: "scalar", T: 8, opt: !0, default: !1 },
@@ -2402,11 +2402,11 @@ fe.fields = u.util.newFieldList(() => [
2402
2402
  { no: 50, name: "features", kind: "message", T: z, opt: !0 },
2403
2403
  { no: 999, name: "uninterpreted_option", kind: "message", T: Y, repeated: !0 }
2404
2404
  ]);
2405
- var bn;
2405
+ var Mn;
2406
2406
  (function(a) {
2407
2407
  a[a.SPEED = 1] = "SPEED", a[a.CODE_SIZE = 2] = "CODE_SIZE", a[a.LITE_RUNTIME = 3] = "LITE_RUNTIME";
2408
- })(bn || (bn = {}));
2409
- u.util.setEnumType(bn, "google.protobuf.FileOptions.OptimizeMode", [
2408
+ })(Mn || (Mn = {}));
2409
+ u.util.setEnumType(Mn, "google.protobuf.FileOptions.OptimizeMode", [
2410
2410
  { no: 1, name: "SPEED" },
2411
2411
  { no: 2, name: "CODE_SIZE" },
2412
2412
  { no: 3, name: "LITE_RUNTIME" }
@@ -2459,9 +2459,9 @@ class _e extends E {
2459
2459
  _e.runtime = u;
2460
2460
  _e.typeName = "google.protobuf.FieldOptions";
2461
2461
  _e.fields = u.util.newFieldList(() => [
2462
- { no: 1, name: "ctype", kind: "enum", T: u.getEnumType(Mn), opt: !0, default: Mn.STRING },
2462
+ { no: 1, name: "ctype", kind: "enum", T: u.getEnumType(En), opt: !0, default: En.STRING },
2463
2463
  { no: 2, name: "packed", kind: "scalar", T: 8, opt: !0 },
2464
- { no: 6, name: "jstype", kind: "enum", T: u.getEnumType(En), opt: !0, default: En.JS_NORMAL },
2464
+ { no: 6, name: "jstype", kind: "enum", T: u.getEnumType(On), opt: !0, default: On.JS_NORMAL },
2465
2465
  { no: 5, name: "lazy", kind: "scalar", T: 8, opt: !0, default: !1 },
2466
2466
  { no: 15, name: "unverified_lazy", kind: "scalar", T: 8, opt: !0, default: !1 },
2467
2467
  { no: 3, name: "deprecated", kind: "scalar", T: 8, opt: !0, default: !1 },
@@ -2474,20 +2474,20 @@ _e.fields = u.util.newFieldList(() => [
2474
2474
  { no: 22, name: "feature_support", kind: "message", T: ie, opt: !0 },
2475
2475
  { no: 999, name: "uninterpreted_option", kind: "message", T: Y, repeated: !0 }
2476
2476
  ]);
2477
- var Mn;
2477
+ var En;
2478
2478
  (function(a) {
2479
2479
  a[a.STRING = 0] = "STRING", a[a.CORD = 1] = "CORD", a[a.STRING_PIECE = 2] = "STRING_PIECE";
2480
- })(Mn || (Mn = {}));
2481
- u.util.setEnumType(Mn, "google.protobuf.FieldOptions.CType", [
2480
+ })(En || (En = {}));
2481
+ u.util.setEnumType(En, "google.protobuf.FieldOptions.CType", [
2482
2482
  { no: 0, name: "STRING" },
2483
2483
  { no: 1, name: "CORD" },
2484
2484
  { no: 2, name: "STRING_PIECE" }
2485
2485
  ]);
2486
- var En;
2486
+ var On;
2487
2487
  (function(a) {
2488
2488
  a[a.JS_NORMAL = 0] = "JS_NORMAL", a[a.JS_STRING = 1] = "JS_STRING", a[a.JS_NUMBER = 2] = "JS_NUMBER";
2489
- })(En || (En = {}));
2490
- u.util.setEnumType(En, "google.protobuf.FieldOptions.JSType", [
2489
+ })(On || (On = {}));
2490
+ u.util.setEnumType(On, "google.protobuf.FieldOptions.JSType", [
2491
2491
  { no: 0, name: "JS_NORMAL" },
2492
2492
  { no: 1, name: "JS_STRING" },
2493
2493
  { no: 2, name: "JS_NUMBER" }
@@ -2685,15 +2685,15 @@ re.runtime = u;
2685
2685
  re.typeName = "google.protobuf.MethodOptions";
2686
2686
  re.fields = u.util.newFieldList(() => [
2687
2687
  { no: 33, name: "deprecated", kind: "scalar", T: 8, opt: !0, default: !1 },
2688
- { no: 34, name: "idempotency_level", kind: "enum", T: u.getEnumType(On), opt: !0, default: On.IDEMPOTENCY_UNKNOWN },
2688
+ { no: 34, name: "idempotency_level", kind: "enum", T: u.getEnumType(wn), opt: !0, default: wn.IDEMPOTENCY_UNKNOWN },
2689
2689
  { no: 35, name: "features", kind: "message", T: z, opt: !0 },
2690
2690
  { no: 999, name: "uninterpreted_option", kind: "message", T: Y, repeated: !0 }
2691
2691
  ]);
2692
- var On;
2692
+ var wn;
2693
2693
  (function(a) {
2694
2694
  a[a.IDEMPOTENCY_UNKNOWN = 0] = "IDEMPOTENCY_UNKNOWN", a[a.NO_SIDE_EFFECTS = 1] = "NO_SIDE_EFFECTS", a[a.IDEMPOTENT = 2] = "IDEMPOTENT";
2695
- })(On || (On = {}));
2696
- u.util.setEnumType(On, "google.protobuf.MethodOptions.IdempotencyLevel", [
2695
+ })(wn || (wn = {}));
2696
+ u.util.setEnumType(wn, "google.protobuf.MethodOptions.IdempotencyLevel", [
2697
2697
  { no: 0, name: "IDEMPOTENCY_UNKNOWN" },
2698
2698
  { no: 1, name: "NO_SIDE_EFFECTS" },
2699
2699
  { no: 2, name: "IDEMPOTENT" }
@@ -3289,11 +3289,11 @@ De.typeName = "google.protobuf.FieldMask";
3289
3289
  De.fields = s.util.newFieldList(() => [
3290
3290
  { no: 1, name: "paths", kind: "scalar", T: 9, repeated: !0 }
3291
3291
  ]);
3292
- var wn;
3292
+ var Cn;
3293
3293
  (function(a) {
3294
3294
  a[a.NULL_VALUE = 0] = "NULL_VALUE";
3295
- })(wn || (wn = {}));
3296
- s.util.setEnumType(wn, "google.protobuf.NullValue", [
3295
+ })(Cn || (Cn = {}));
3296
+ s.util.setEnumType(Cn, "google.protobuf.NullValue", [
3297
3297
  { no: 0, name: "NULL_VALUE" }
3298
3298
  ]);
3299
3299
  class p extends E {
@@ -3365,7 +3365,7 @@ class K extends E {
3365
3365
  this.kind = { case: "boolValue", value: e };
3366
3366
  break;
3367
3367
  case "object":
3368
- e === null ? this.kind = { case: "nullValue", value: wn.NULL_VALUE } : Array.isArray(e) ? this.kind = { case: "listValue", value: me.fromJson(e) } : this.kind = { case: "structValue", value: p.fromJson(e) };
3368
+ e === null ? this.kind = { case: "nullValue", value: Cn.NULL_VALUE } : Array.isArray(e) ? this.kind = { case: "listValue", value: me.fromJson(e) } : this.kind = { case: "structValue", value: p.fromJson(e) };
3369
3369
  break;
3370
3370
  default:
3371
3371
  throw new Error("cannot decode google.protobuf.Value from JSON " + s.json.debug(e));
@@ -3388,7 +3388,7 @@ class K extends E {
3388
3388
  K.runtime = s;
3389
3389
  K.typeName = "google.protobuf.Value";
3390
3390
  K.fields = s.util.newFieldList(() => [
3391
- { no: 1, name: "null_value", kind: "enum", T: s.getEnumType(wn), oneof: "kind" },
3391
+ { no: 1, name: "null_value", kind: "enum", T: s.getEnumType(Cn), oneof: "kind" },
3392
3392
  { no: 2, name: "number_value", kind: "scalar", T: 1, oneof: "kind" },
3393
3393
  { no: 3, name: "string_value", kind: "scalar", T: 9, oneof: "kind" },
3394
3394
  { no: 4, name: "bool_value", kind: "scalar", T: 8, oneof: "kind" },
@@ -3572,8 +3572,8 @@ var sf = function(a) {
3572
3572
  i({ value: d, done: c });
3573
3573
  }, r);
3574
3574
  }
3575
- }, Cn = function(a) {
3576
- return this instanceof Cn ? (this.v = a, this) : new Cn(a);
3575
+ }, Nn = function(a) {
3576
+ return this instanceof Nn ? (this.v = a, this) : new Nn(a);
3577
3577
  }, of = function(a, e, n) {
3578
3578
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
3579
3579
  var t = n.apply(a, e || []), o, i = [];
@@ -3600,7 +3600,7 @@ var sf = function(a) {
3600
3600
  }
3601
3601
  }
3602
3602
  function d(h) {
3603
- h.value instanceof Cn ? Promise.resolve(h.value.v).then(g, R) : S(i[0][2], h);
3603
+ h.value instanceof Nn ? Promise.resolve(h.value.v).then(g, R) : S(i[0][2], h);
3604
3604
  }
3605
3605
  function g(h) {
3606
3606
  l("next", h);
@@ -3620,7 +3620,7 @@ var sf = function(a) {
3620
3620
  }, e;
3621
3621
  function t(o, i) {
3622
3622
  e[o] = a[o] ? function(r) {
3623
- return (n = !n) ? { value: Cn(a[o](r)), done: !1 } : i ? i(r) : r;
3623
+ return (n = !n) ? { value: Nn(a[o](r)), done: !1 } : i ? i(r) : r;
3624
3624
  } : i;
3625
3625
  }
3626
3626
  };
@@ -3678,7 +3678,7 @@ function mf() {
3678
3678
  }
3679
3679
  function ja(a) {
3680
3680
  return of(this, arguments, function* () {
3681
- yield Cn(yield* rf(sf(a)));
3681
+ yield Nn(yield* rf(sf(a)));
3682
3682
  });
3683
3683
  }
3684
3684
  var sr = function(a) {
@@ -3886,21 +3886,21 @@ function Ii(a) {
3886
3886
  return e;
3887
3887
  }
3888
3888
  const yf = "Content-Type", vf = "Grpc-Timeout", pn = "Grpc-Status", rr = "Grpc-Message", hf = "Grpc-Status-Details-Bin", ff = "X-User-Agent", Rf = "X-Grpc-Web", _f = "application/grpc-web+proto", Sf = "application/grpc-web+json";
3889
- let fa = class fn extends E {
3889
+ let fa = class Rn extends E {
3890
3890
  constructor(e) {
3891
3891
  super(), this.code = 0, this.message = "", this.details = [], s.util.initPartial(e, this);
3892
3892
  }
3893
3893
  static fromBinary(e, n) {
3894
- return new fn().fromBinary(e, n);
3894
+ return new Rn().fromBinary(e, n);
3895
3895
  }
3896
3896
  static fromJson(e, n) {
3897
- return new fn().fromJson(e, n);
3897
+ return new Rn().fromJson(e, n);
3898
3898
  }
3899
3899
  static fromJsonString(e, n) {
3900
- return new fn().fromJsonString(e, n);
3900
+ return new Rn().fromJsonString(e, n);
3901
3901
  }
3902
3902
  static equals(e, n) {
3903
- return s.util.equals(fn, e, n);
3903
+ return s.util.equals(Rn, e, n);
3904
3904
  }
3905
3905
  };
3906
3906
  fa.runtime = s;
@@ -4602,7 +4602,7 @@ const Tr = /* @__PURE__ */ s.makeMessageType(
4602
4602
  },
4603
4603
  { no: 3, name: "details", kind: "message", T: H, repeated: !0 }
4604
4604
  ]
4605
- ), An = /* @__PURE__ */ s.makeMessageType(
4605
+ ), Un = /* @__PURE__ */ s.makeMessageType(
4606
4606
  "proto.rpc.webrtc.v1.ICECandidate",
4607
4607
  () => [
4608
4608
  {
@@ -4648,7 +4648,7 @@ const Tr = /* @__PURE__ */ s.makeMessageType(
4648
4648
  ), sR = /* @__PURE__ */ s.makeMessageType(
4649
4649
  "proto.rpc.webrtc.v1.CallResponseUpdateStage",
4650
4650
  () => [
4651
- { no: 1, name: "candidate", kind: "message", T: An }
4651
+ { no: 1, name: "candidate", kind: "message", T: Un }
4652
4652
  ]
4653
4653
  ), oR = /* @__PURE__ */ s.makeMessageType(
4654
4654
  "proto.rpc.webrtc.v1.CallResponse",
@@ -4673,7 +4673,7 @@ const Tr = /* @__PURE__ */ s.makeMessageType(
4673
4673
  T: 9
4674
4674
  /* ScalarType.STRING */
4675
4675
  },
4676
- { no: 2, name: "candidate", kind: "message", T: An, oneof: "update" },
4676
+ { no: 2, name: "candidate", kind: "message", T: Un, oneof: "update" },
4677
4677
  { no: 3, name: "done", kind: "scalar", T: 8, oneof: "update" },
4678
4678
  { no: 4, name: "error", kind: "message", T: un, oneof: "update" }
4679
4679
  ]
@@ -4727,7 +4727,7 @@ const Tr = /* @__PURE__ */ s.makeMessageType(
4727
4727
  ), cR = /* @__PURE__ */ s.makeMessageType(
4728
4728
  "proto.rpc.webrtc.v1.AnswerRequestUpdateStage",
4729
4729
  () => [
4730
- { no: 1, name: "candidate", kind: "message", T: An }
4730
+ { no: 1, name: "candidate", kind: "message", T: Un }
4731
4731
  ]
4732
4732
  ), dR = /* @__PURE__ */ s.makeMessageType(
4733
4733
  "proto.rpc.webrtc.v1.AnswerRequestDoneStage",
@@ -4770,7 +4770,7 @@ const Tr = /* @__PURE__ */ s.makeMessageType(
4770
4770
  ), TR = /* @__PURE__ */ s.makeMessageType(
4771
4771
  "proto.rpc.webrtc.v1.AnswerResponseUpdateStage",
4772
4772
  () => [
4773
- { no: 1, name: "candidate", kind: "message", T: An }
4773
+ { no: 1, name: "candidate", kind: "message", T: Un }
4774
4774
  ]
4775
4775
  ), kR = /* @__PURE__ */ s.makeMessageType(
4776
4776
  "proto.rpc.webrtc.v1.AnswerResponseDoneStage",
@@ -5399,7 +5399,7 @@ class _r extends NR {
5399
5399
  this.requestHeaders = new fr({
5400
5400
  method: l
5401
5401
  });
5402
- const d = DR(Pn(r));
5402
+ const d = DR(Dn(r));
5403
5403
  d && (this.requestHeaders.metadata = d);
5404
5404
  }
5405
5405
  startRequest(e) {
@@ -5826,8 +5826,8 @@ class GR {
5826
5826
  ), n = Za(JSON.stringify(e)), t = new kr({
5827
5827
  sdp: n
5828
5828
  });
5829
- this.dialOpts && this.dialOpts.disableTrickleICE && (t.disableTrickle = this.dialOpts.disableTrickleICE), this.clientChannel.ready.then(() => {
5830
- this.exchangeDone = !0;
5829
+ this.dialOpts && this.dialOpts.disableTrickleICE && (t.disableTrickle = this.dialOpts.disableTrickleICE), this.clientChannel.ready.then(async () => {
5830
+ this.exchangeDone = !0, await this.sendDone();
5831
5831
  }).catch(console.error);
5832
5832
  const o = this.signalingClient.call(t, this.callOpts), i = this.processCallResponses(o);
5833
5833
  return await Promise.all([this.clientChannel.ready, i]), this.clientChannel;
@@ -6007,9 +6007,9 @@ const BR = (a) => {
6007
6007
  };
6008
6008
  return a.sdpMid !== void 0 && (e.sdpMid = a.sdpMid), a.sdpmLineIndex !== void 0 && (e.sdpMLineIndex = a.sdpmLineIndex), a.usernameFragment !== void 0 && (e.usernameFragment = a.usernameFragment), e;
6009
6009
  }, xR = (a) => {
6010
- const e = new An();
6010
+ const e = new Un();
6011
6011
  return a.candidate !== void 0 && (e.candidate = a.candidate), a.sdpMid !== void 0 && a.sdpMid !== null && (e.sdpMid = a.sdpMid), a.sdpMLineIndex !== void 0 && a.sdpMLineIndex !== null && (e.sdpmLineIndex = a.sdpMLineIndex), a.usernameFragment !== void 0 && a.usernameFragment !== null && (e.usernameFragment = a.usernameFragment), e;
6012
- }, Nn = async (a, e, n = !1) => {
6012
+ }, Pn = async (a, e, n = !1) => {
6013
6013
  Ir(e);
6014
6014
  const t = globalThis.VIAM?.GRPC_TRANSPORT_FACTORY ?? bR, o = {
6015
6015
  baseUrl: a,
@@ -6031,7 +6031,7 @@ const BR = (a) => {
6031
6031
  let i;
6032
6032
  if (n.accessToken === void 0 || n.accessToken === "") {
6033
6033
  const r = new Qa({
6034
- entity: qn(n.credentials) && n.credentials.authEntity ? n.credentials.authEntity : a.replace(tt, "")
6034
+ entity: Ln(n.credentials) && n.credentials.authEntity ? n.credentials.authEntity : a.replace(tt, "")
6035
6035
  });
6036
6036
  n.credentials && (r.credentials = new Tr({
6037
6037
  type: n.credentials.type,
@@ -6062,7 +6062,7 @@ class Sr {
6062
6062
  this.extraHeaders = t, this.transport = n(e);
6063
6063
  }
6064
6064
  async unary(e, n, t, o, i, r, c) {
6065
- const l = Pn(i);
6065
+ const l = Dn(i);
6066
6066
  for (const [d, g] of this.extraHeaders)
6067
6067
  l.set(d, g);
6068
6068
  return this.transport.unary(
@@ -6076,7 +6076,7 @@ class Sr {
6076
6076
  );
6077
6077
  }
6078
6078
  async stream(e, n, t, o, i, r, c) {
6079
- const l = Pn(i);
6079
+ const l = Dn(i);
6080
6080
  for (const [d, g] of this.extraHeaders)
6081
6081
  l.set(d, g);
6082
6082
  return this.transport.stream(
@@ -6090,7 +6090,7 @@ class Sr {
6090
6090
  );
6091
6091
  }
6092
6092
  }
6093
- const Pn = (a) => {
6093
+ const Dn = (a) => {
6094
6094
  const e = new Headers();
6095
6095
  if (a !== void 0)
6096
6096
  if (Array.isArray(a))
@@ -6105,7 +6105,7 @@ const Pn = (a) => {
6105
6105
  e.append(n, t);
6106
6106
  return e;
6107
6107
  }, JR = async (a, e, n, t = !1) => {
6108
- const o = { ...n }, i = await Nn(
6108
+ const o = { ...n }, i = await Pn(
6109
6109
  a,
6110
6110
  o,
6111
6111
  t
@@ -6139,7 +6139,7 @@ const Pn = (a) => {
6139
6139
  );
6140
6140
  let g = !1, R;
6141
6141
  try {
6142
- R = await Nn(
6142
+ R = await Pn(
6143
6143
  o,
6144
6144
  c,
6145
6145
  t
@@ -6201,7 +6201,7 @@ const Pn = (a) => {
6201
6201
  ]), c;
6202
6202
  }, YR = (a, e) => {
6203
6203
  let n = e;
6204
- return n = { ...e }, e.accessToken === void 0 && (qn(n.credentials) && !n.credentials.authEntity && (n.credentials.authEntity = n.externalAuthAddress !== void 0 && n.externalAuthAddress !== "" ? n.externalAuthAddress.replace(tt, "") : a.replace(tt, "")), n.credentials = e.webrtcOptions?.signalingCredentials, n.accessToken = e.webrtcOptions?.signalingAccessToken), n.externalAuthAddress = e.webrtcOptions?.signalingExternalAuthAddress, n.externalAuthToEntity = e.webrtcOptions?.signalingExternalAuthToEntity, n;
6204
+ return n = { ...e }, e.accessToken === void 0 && (Ln(n.credentials) && !n.credentials.authEntity && (n.credentials.authEntity = n.externalAuthAddress !== void 0 && n.externalAuthAddress !== "" ? n.externalAuthAddress.replace(tt, "") : a.replace(tt, "")), n.credentials = e.webrtcOptions?.signalingCredentials, n.accessToken = e.webrtcOptions?.signalingAccessToken), n.externalAuthAddress = e.webrtcOptions?.signalingExternalAuthAddress, n.externalAuthToEntity = e.webrtcOptions?.signalingExternalAuthToEntity, n;
6205
6205
  }, Ir = (a) => {
6206
6206
  if (a) {
6207
6207
  if (a.accessToken !== void 0 && a.accessToken.length > 0) {
@@ -6638,7 +6638,7 @@ const Pn = (a) => {
6638
6638
  () => [
6639
6639
  { no: 1, name: "readings", kind: "map", K: 9, V: { kind: "message", T: K } }
6640
6640
  ]
6641
- ), Un = /* @__PURE__ */ s.makeMessageType(
6641
+ ), qn = /* @__PURE__ */ s.makeMessageType(
6642
6642
  "viam.common.v1.LogEntry",
6643
6643
  () => [
6644
6644
  {
@@ -6701,7 +6701,7 @@ const Pn = (a) => {
6701
6701
  GetReadingsRequest: en,
6702
6702
  GetReadingsResponse: Sa,
6703
6703
  KinematicsFileFormat: br,
6704
- LogEntry: Un,
6704
+ LogEntry: qn,
6705
6705
  Mesh: Cr,
6706
6706
  Orientation: Mr,
6707
6707
  PointCloud: Nr,
@@ -6717,7 +6717,7 @@ const Pn = (a) => {
6717
6717
  WorldState: Pr,
6718
6718
  safety_heartbeat_monitored: Ar
6719
6719
  }, Symbol.toStringTag, { value: "Module" })), st = new Headers({
6720
- "viam-client": `typescript;v0.52.1;${VR}`
6720
+ "viam-client": `typescript;v0.52.2;${VR}`
6721
6721
  }), U = async function(e, n, t, o = {}, i = {}) {
6722
6722
  const r = new P({
6723
6723
  name: n,
@@ -6747,10 +6747,10 @@ const Pn = (a) => {
6747
6747
  }, TS = (a, e) => {
6748
6748
  const { [e]: n, ...t } = a.headers;
6749
6749
  a.headers = t;
6750
- }, qn = (a) => a !== void 0 && "authEntity" in a, jR = async (a, e) => e.type === "access-token" ? Nn(a, {
6750
+ }, Ln = (a) => a !== void 0 && "authEntity" in a, jR = async (a, e) => e.type === "access-token" ? Pn(a, {
6751
6751
  accessToken: e.payload,
6752
6752
  extraHeaders: st
6753
- }) : Nn(a, {
6753
+ }) : Pn(a, {
6754
6754
  credentials: e,
6755
6755
  extraHeaders: st
6756
6756
  }), Va = 1e4;
@@ -8522,7 +8522,7 @@ const St = /* @__PURE__ */ s.makeMessageType(
8522
8522
  ), Am = /* @__PURE__ */ s.makeMessageType(
8523
8523
  "viam.component.inputcontroller.v1.GetEventsResponse",
8524
8524
  () => [
8525
- { no: 1, name: "events", kind: "message", T: Ln, repeated: !0 }
8525
+ { no: 1, name: "events", kind: "message", T: Gn, repeated: !0 }
8526
8526
  ]
8527
8527
  ), ms = /* @__PURE__ */ s.makeMessageType(
8528
8528
  "viam.component.inputcontroller.v1.TriggerEventRequest",
@@ -8534,13 +8534,13 @@ const St = /* @__PURE__ */ s.makeMessageType(
8534
8534
  T: 9
8535
8535
  /* ScalarType.STRING */
8536
8536
  },
8537
- { no: 2, name: "event", kind: "message", T: Ln },
8537
+ { no: 2, name: "event", kind: "message", T: Gn },
8538
8538
  { no: 99, name: "extra", kind: "message", T: p }
8539
8539
  ]
8540
8540
  ), Um = /* @__PURE__ */ s.makeMessageType(
8541
8541
  "viam.component.inputcontroller.v1.TriggerEventResponse",
8542
8542
  []
8543
- ), Ln = /* @__PURE__ */ s.makeMessageType(
8543
+ ), Gn = /* @__PURE__ */ s.makeMessageType(
8544
8544
  "viam.component.inputcontroller.v1.Event",
8545
8545
  () => [
8546
8546
  { no: 1, name: "time", kind: "message", T: _ },
@@ -8596,16 +8596,16 @@ const St = /* @__PURE__ */ s.makeMessageType(
8596
8596
  ), Gm = /* @__PURE__ */ s.makeMessageType(
8597
8597
  "viam.component.inputcontroller.v1.StreamEventsResponse",
8598
8598
  () => [
8599
- { no: 1, name: "event", kind: "message", T: Ln }
8599
+ { no: 1, name: "event", kind: "message", T: Gn }
8600
8600
  ]
8601
8601
  ), a1 = /* @__PURE__ */ s.makeMessageType(
8602
8602
  "viam.component.inputcontroller.v1.Status",
8603
8603
  () => [
8604
- { no: 1, name: "events", kind: "message", T: Ln, repeated: !0 }
8604
+ { no: 1, name: "events", kind: "message", T: Gn, repeated: !0 }
8605
8605
  ]
8606
8606
  ), t1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8607
8607
  __proto__: null,
8608
- Event: Ln,
8608
+ Event: Gn,
8609
8609
  GetControlsRequest: Pm,
8610
8610
  GetControlsResponse: Dm,
8611
8611
  GetEventsRequest: rs,
@@ -10133,7 +10133,7 @@ const St = /* @__PURE__ */ s.makeMessageType(
10133
10133
  ), Zc = /* @__PURE__ */ s.makeMessageType(
10134
10134
  "viam.robot.v1.LogRequest",
10135
10135
  () => [
10136
- { no: 1, name: "logs", kind: "message", T: Un, repeated: !0 }
10136
+ { no: 1, name: "logs", kind: "message", T: qn, repeated: !0 }
10137
10137
  ]
10138
10138
  ), ed = /* @__PURE__ */ s.makeMessageType(
10139
10139
  "viam.robot.v1.LogResponse",
@@ -11483,7 +11483,7 @@ const St = /* @__PURE__ */ s.makeMessageType(
11483
11483
  T: 9
11484
11484
  /* ScalarType.STRING */
11485
11485
  },
11486
- { no: 2, name: "logs", kind: "message", T: Un, repeated: !0 }
11486
+ { no: 2, name: "logs", kind: "message", T: qn, repeated: !0 }
11487
11487
  ]
11488
11488
  ), p1 = /* @__PURE__ */ s.makeMessageType(
11489
11489
  "viam.app.v1.LogResponse",
@@ -13697,7 +13697,7 @@ class C1 {
13697
13697
  }
13698
13698
  }
13699
13699
  async unary(e, n, t, o, i, r, c) {
13700
- const l = Pn(i), d = `/${e.typeName}/${n.name}`;
13700
+ const l = Dn(i), d = `/${e.typeName}/${n.name}`;
13701
13701
  if (Xe.heartbeatMonitoredMethods[d] ?? !1) {
13702
13702
  const g = await this.getSessionMetadata();
13703
13703
  for (const [R, S] of g)
@@ -13714,7 +13714,7 @@ class C1 {
13714
13714
  );
13715
13715
  }
13716
13716
  async stream(e, n, t, o, i, r, c) {
13717
- const l = Pn(i), d = `/${e.typeName}/${n.name}`;
13717
+ const l = Dn(i), d = `/${e.typeName}/${n.name}`;
13718
13718
  if (Xe.heartbeatMonitoredMethods[d] ?? !1) {
13719
13719
  const g = await this.getSessionMetadata();
13720
13720
  for (const [R, S] of g)
@@ -14238,7 +14238,7 @@ const P1 = /* @__PURE__ */ s.makeEnum(
14238
14238
  const e = a;
14239
14239
  return typeof e.signalingAddress != "string" ? !1 : !e.iceServers || Array.isArray(e.iceServers);
14240
14240
  }, Di = (a) => a > 0 && Number.isInteger(a), e_ = (a) => {
14241
- if (a.credentials && qn(a.credentials))
14241
+ if (a.credentials && Ln(a.credentials))
14242
14242
  try {
14243
14243
  a.credentials.authEntity = new URL(a.credentials.authEntity).host;
14244
14244
  } catch (e) {
@@ -14500,7 +14500,7 @@ class mn extends qr {
14500
14500
  dialTimeout: t ?? Va,
14501
14501
  extraHeaders: st
14502
14502
  };
14503
- if (e && (qn(e) ? o.credentials = e : o.accessToken = e.payload), n !== void 0 && o.webrtcOptions && (o.webrtcOptions.additionalSdpFields = { "x-priority": n }), this.savedCreds = e, this.webrtcOptions.enabled) {
14503
+ if (e && (Ln(e) ? o.credentials = e : o.accessToken = e.payload), n !== void 0 && o.webrtcOptions && (o.webrtcOptions.additionalSdpFields = { "x-priority": n }), this.savedCreds = e, this.webrtcOptions.enabled) {
14504
14504
  o.webrtcOptions && (o.webrtcOptions.signalingCredentials = o.credentials);
14505
14505
  const r = this.webrtcOptions.signalingAddress || this.serviceHost, c = await zR(
14506
14506
  r,
@@ -14522,7 +14522,7 @@ class mn extends qr {
14522
14522
  }), this.emit("track", l);
14523
14523
  });
14524
14524
  } else
14525
- this.transport = await Nn(this.serviceHost, o), await this.gRPCConnectionManager.start();
14525
+ this.transport = await Pn(this.serviceHost, o), await this.gRPCConnectionManager.start();
14526
14526
  const i = this.sessionOptions.disabled ? this.transport : this.sessionManager.transport;
14527
14527
  this.robotServiceClient = V(Js, i), this.emit(ne.CONNECTED, {});
14528
14528
  } catch (o) {
@@ -14968,7 +14968,7 @@ const n_ = async (a) => {
14968
14968
  { no: 3, name: "AUTHENTICATION_TYPE_ROBOT_PART_SECRET", localName: "ROBOT_PART_SECRET" },
14969
14969
  { no: 4, name: "AUTHENTICATION_TYPE_LOCATION_SECRET", localName: "LOCATION_SECRET" }
14970
14970
  ]
14971
- ), Gn = /* @__PURE__ */ s.makeEnum(
14971
+ ), Bn = /* @__PURE__ */ s.makeEnum(
14972
14972
  "viam.app.v1.FragmentVisibility",
14973
14973
  [
14974
14974
  { no: 0, name: "FRAGMENT_VISIBILITY_UNSPECIFIED", localName: "UNSPECIFIED" },
@@ -15237,7 +15237,7 @@ const n_ = async (a) => {
15237
15237
  () => [
15238
15238
  { no: 1, name: "organizations", kind: "message", T: yn, repeated: !0 }
15239
15239
  ]
15240
- ), Bn = /* @__PURE__ */ s.makeMessageType(
15240
+ ), xn = /* @__PURE__ */ s.makeMessageType(
15241
15241
  "viam.app.v1.OrganizationInvite",
15242
15242
  () => [
15243
15243
  {
@@ -15428,7 +15428,7 @@ const n_ = async (a) => {
15428
15428
  /* ScalarType.STRING */
15429
15429
  },
15430
15430
  { no: 2, name: "members", kind: "message", T: wp, repeated: !0 },
15431
- { no: 3, name: "invites", kind: "message", T: Bn, repeated: !0 }
15431
+ { no: 3, name: "invites", kind: "message", T: xn, repeated: !0 }
15432
15432
  ]
15433
15433
  ), Hp = /* @__PURE__ */ s.makeMessageType(
15434
15434
  "viam.app.v1.CreateOrganizationInviteRequest",
@@ -15453,7 +15453,7 @@ const n_ = async (a) => {
15453
15453
  ), Kp = /* @__PURE__ */ s.makeMessageType(
15454
15454
  "viam.app.v1.CreateOrganizationInviteResponse",
15455
15455
  () => [
15456
- { no: 1, name: "invite", kind: "message", T: Bn }
15456
+ { no: 1, name: "invite", kind: "message", T: xn }
15457
15457
  ]
15458
15458
  ), Xp = /* @__PURE__ */ s.makeMessageType(
15459
15459
  "viam.app.v1.UpdateOrganizationInviteAuthorizationsRequest",
@@ -15478,7 +15478,7 @@ const n_ = async (a) => {
15478
15478
  ), Qp = /* @__PURE__ */ s.makeMessageType(
15479
15479
  "viam.app.v1.UpdateOrganizationInviteAuthorizationsResponse",
15480
15480
  () => [
15481
- { no: 1, name: "invite", kind: "message", T: Bn }
15481
+ { no: 1, name: "invite", kind: "message", T: xn }
15482
15482
  ]
15483
15483
  ), Zp = /* @__PURE__ */ s.makeMessageType(
15484
15484
  "viam.app.v1.DeleteOrganizationInviteRequest",
@@ -15523,7 +15523,7 @@ const n_ = async (a) => {
15523
15523
  ), au = /* @__PURE__ */ s.makeMessageType(
15524
15524
  "viam.app.v1.ResendOrganizationInviteResponse",
15525
15525
  () => [
15526
- { no: 1, name: "invite", kind: "message", T: Bn }
15526
+ { no: 1, name: "invite", kind: "message", T: xn }
15527
15527
  ]
15528
15528
  ), tu = /* @__PURE__ */ s.makeMessageType(
15529
15529
  "viam.app.v1.DeleteOrganizationMemberRequest",
@@ -15776,7 +15776,7 @@ const n_ = async (a) => {
15776
15776
  /* ScalarType.STRING */
15777
15777
  }
15778
15778
  ]
15779
- ), xn = /* @__PURE__ */ s.makeMessageType(
15779
+ ), Fn = /* @__PURE__ */ s.makeMessageType(
15780
15780
  "viam.app.v1.Location",
15781
15781
  () => [
15782
15782
  {
@@ -15862,7 +15862,7 @@ const n_ = async (a) => {
15862
15862
  ), fu = /* @__PURE__ */ s.makeMessageType(
15863
15863
  "viam.app.v1.CreateLocationResponse",
15864
15864
  () => [
15865
- { no: 1, name: "location", kind: "message", T: xn }
15865
+ { no: 1, name: "location", kind: "message", T: Fn }
15866
15866
  ]
15867
15867
  ), Ru = /* @__PURE__ */ s.makeMessageType(
15868
15868
  "viam.app.v1.GetLocationRequest",
@@ -15878,7 +15878,7 @@ const n_ = async (a) => {
15878
15878
  ), _u = /* @__PURE__ */ s.makeMessageType(
15879
15879
  "viam.app.v1.GetLocationResponse",
15880
15880
  () => [
15881
- { no: 1, name: "location", kind: "message", T: xn }
15881
+ { no: 1, name: "location", kind: "message", T: Fn }
15882
15882
  ]
15883
15883
  ), Su = /* @__PURE__ */ s.makeMessageType(
15884
15884
  "viam.app.v1.UpdateLocationRequest",
@@ -15897,7 +15897,7 @@ const n_ = async (a) => {
15897
15897
  ), Iu = /* @__PURE__ */ s.makeMessageType(
15898
15898
  "viam.app.v1.UpdateLocationResponse",
15899
15899
  () => [
15900
- { no: 1, name: "location", kind: "message", T: xn }
15900
+ { no: 1, name: "location", kind: "message", T: Fn }
15901
15901
  ]
15902
15902
  ), bu = /* @__PURE__ */ s.makeMessageType(
15903
15903
  "viam.app.v1.DeleteLocationRequest",
@@ -16016,7 +16016,7 @@ const n_ = async (a) => {
16016
16016
  ), Gu = /* @__PURE__ */ s.makeMessageType(
16017
16017
  "viam.app.v1.ListLocationsResponse",
16018
16018
  () => [
16019
- { no: 1, name: "locations", kind: "message", T: xn, repeated: !0 }
16019
+ { no: 1, name: "locations", kind: "message", T: Fn, repeated: !0 }
16020
16020
  ]
16021
16021
  ), Bu = /* @__PURE__ */ s.makeMessageType(
16022
16022
  "viam.app.v1.CreateLocationSecretRequest",
@@ -16225,7 +16225,7 @@ const n_ = async (a) => {
16225
16225
  ), tg = /* @__PURE__ */ s.makeMessageType(
16226
16226
  "viam.app.v1.GetRobotPartLogsResponse",
16227
16227
  () => [
16228
- { no: 1, name: "logs", kind: "message", T: Un, repeated: !0 },
16228
+ { no: 1, name: "logs", kind: "message", T: qn, repeated: !0 },
16229
16229
  {
16230
16230
  no: 2,
16231
16231
  name: "next_page_token",
@@ -16256,7 +16256,7 @@ const n_ = async (a) => {
16256
16256
  ), og = /* @__PURE__ */ s.makeMessageType(
16257
16257
  "viam.app.v1.TailRobotPartLogsResponse",
16258
16258
  () => [
16259
- { no: 1, name: "logs", kind: "message", T: Un, repeated: !0 }
16259
+ { no: 1, name: "logs", kind: "message", T: qn, repeated: !0 }
16260
16260
  ]
16261
16261
  ), ig = /* @__PURE__ */ s.makeMessageType(
16262
16262
  "viam.app.v1.GetRobotPartHistoryRequest",
@@ -16476,7 +16476,7 @@ const n_ = async (a) => {
16476
16476
  T: 8
16477
16477
  /* ScalarType.BOOL */
16478
16478
  },
16479
- { no: 12, name: "visibility", kind: "enum", T: s.getEnumType(Gn) },
16479
+ { no: 12, name: "visibility", kind: "enum", T: s.getEnumType(Bn) },
16480
16480
  { no: 13, name: "last_updated", kind: "message", T: _ },
16481
16481
  {
16482
16482
  no: 14,
@@ -16627,7 +16627,7 @@ const n_ = async (a) => {
16627
16627
  T: 8
16628
16628
  /* ScalarType.BOOL */
16629
16629
  },
16630
- { no: 3, name: "fragment_visibility", kind: "enum", T: s.getEnumType(Gn), repeated: !0 }
16630
+ { no: 3, name: "fragment_visibility", kind: "enum", T: s.getEnumType(Bn), repeated: !0 }
16631
16631
  ]
16632
16632
  ), bg = /* @__PURE__ */ s.makeMessageType(
16633
16633
  "viam.app.v1.ListFragmentsResponse",
@@ -16680,7 +16680,7 @@ const n_ = async (a) => {
16680
16680
  T: 9
16681
16681
  /* ScalarType.STRING */
16682
16682
  },
16683
- { no: 4, name: "visibility", kind: "enum", T: s.getEnumType(Gn), opt: !0 }
16683
+ { no: 4, name: "visibility", kind: "enum", T: s.getEnumType(Bn), opt: !0 }
16684
16684
  ]
16685
16685
  ), wg = /* @__PURE__ */ s.makeMessageType(
16686
16686
  "viam.app.v1.CreateFragmentResponse",
@@ -16706,7 +16706,7 @@ const n_ = async (a) => {
16706
16706
  },
16707
16707
  { no: 3, name: "config", kind: "message", T: p },
16708
16708
  { no: 4, name: "public", kind: "scalar", T: 8, opt: !0 },
16709
- { no: 5, name: "visibility", kind: "enum", T: s.getEnumType(Gn), opt: !0 },
16709
+ { no: 5, name: "visibility", kind: "enum", T: s.getEnumType(Bn), opt: !0 },
16710
16710
  { no: 6, name: "last_known_update", kind: "message", T: _, opt: !0 }
16711
16711
  ]
16712
16712
  ), Ng = /* @__PURE__ */ s.makeMessageType(
@@ -18627,7 +18627,7 @@ const n_ = async (a) => {
18627
18627
  FragmentSummary: Qg,
18628
18628
  FragmentTag: Pa,
18629
18629
  FragmentUsage: Da,
18630
- FragmentVisibility: Gn,
18630
+ FragmentVisibility: Bn,
18631
18631
  GetAppBrandingRequest: Qk,
18632
18632
  GetAppBrandingResponse: ey,
18633
18633
  GetAppContentRequest: Pk,
@@ -18710,7 +18710,7 @@ const n_ = async (a) => {
18710
18710
  ListRobotsForOrgResponse: sT,
18711
18711
  ListRobotsRequest: Jg,
18712
18712
  ListRobotsResponse: aT,
18713
- Location: xn,
18713
+ Location: Fn,
18714
18714
  LocationAuth: Na,
18715
18715
  LocationAuthRequest: zu,
18716
18716
  LocationAuthResponse: $u,
@@ -18742,7 +18742,7 @@ const n_ = async (a) => {
18742
18742
  OrganizationGetSupportEmailRequest: Tu,
18743
18743
  OrganizationGetSupportEmailResponse: ku,
18744
18744
  OrganizationIdentity: Po,
18745
- OrganizationInvite: Bn,
18745
+ OrganizationInvite: xn,
18746
18746
  OrganizationMember: wp,
18747
18747
  OrganizationSetLogoRequest: Ak,
18748
18748
  OrganizationSetLogoResponse: Uk,
@@ -22764,7 +22764,7 @@ var wy = {}, Cy = {};
22764
22764
  }(a.BSON || (a.BSON = {}));
22765
22765
  })(Cy);
22766
22766
  Object.defineProperty(wy, "__esModule", { value: !0 });
22767
- var r_ = Cy, zn = wy.BSON = r_.BSON;
22767
+ var r_ = Cy, hn = wy.BSON = r_.BSON;
22768
22768
  const Ny = /* @__PURE__ */ s.makeEnum(
22769
22769
  "viam.app.data.v1.Order",
22770
22770
  [
@@ -22788,7 +22788,7 @@ const Ny = /* @__PURE__ */ s.makeEnum(
22788
22788
  { no: 2, name: "TABULAR_DATA_SOURCE_TYPE_HOT_STORAGE", localName: "HOT_STORAGE" },
22789
22789
  { no: 3, name: "TABULAR_DATA_SOURCE_TYPE_PIPELINE_SINK", localName: "PIPELINE_SINK" }
22790
22790
  ]
22791
- ), Fn = /* @__PURE__ */ s.makeEnum(
22791
+ ), Jn = /* @__PURE__ */ s.makeEnum(
22792
22792
  "viam.app.data.v1.IndexableCollection",
22793
22793
  [
22794
22794
  { no: 0, name: "INDEXABLE_COLLECTION_UNSPECIFIED", localName: "UNSPECIFIED" },
@@ -22877,7 +22877,7 @@ const Ny = /* @__PURE__ */ s.makeEnum(
22877
22877
  { no: 10, name: "location_ids", kind: "scalar", T: 9, repeated: !0 },
22878
22878
  { no: 11, name: "organization_ids", kind: "scalar", T: 9, repeated: !0 },
22879
22879
  { no: 12, name: "mime_type", kind: "scalar", T: 9, repeated: !0 },
22880
- { no: 13, name: "interval", kind: "message", T: Dn },
22880
+ { no: 13, name: "interval", kind: "message", T: An },
22881
22881
  { no: 14, name: "tags_filter", kind: "message", T: $o },
22882
22882
  { no: 15, name: "bbox_labels", kind: "scalar", T: 9, repeated: !0 },
22883
22883
  {
@@ -22970,7 +22970,7 @@ const Ny = /* @__PURE__ */ s.makeEnum(
22970
22970
  /* ScalarType.STRING */
22971
22971
  }
22972
22972
  ]
22973
- ), Dn = /* @__PURE__ */ s.makeMessageType(
22973
+ ), An = /* @__PURE__ */ s.makeMessageType(
22974
22974
  "viam.app.data.v1.CaptureInterval",
22975
22975
  () => [
22976
22976
  { no: 1, name: "start", kind: "message", T: _ },
@@ -23116,7 +23116,7 @@ const Ny = /* @__PURE__ */ s.makeEnum(
23116
23116
  T: 9
23117
23117
  /* ScalarType.STRING */
23118
23118
  },
23119
- { no: 5, name: "interval", kind: "message", T: Dn },
23119
+ { no: 5, name: "interval", kind: "message", T: An },
23120
23120
  { no: 6, name: "additional_parameters", kind: "message", T: p, opt: !0 }
23121
23121
  ]
23122
23122
  ), Jy = /* @__PURE__ */ s.makeMessageType(
@@ -23809,7 +23809,7 @@ const Ny = /* @__PURE__ */ s.makeEnum(
23809
23809
  T: 9
23810
23810
  /* ScalarType.STRING */
23811
23811
  },
23812
- { no: 2, name: "collection_type", kind: "enum", T: s.getEnumType(Fn) },
23812
+ { no: 2, name: "collection_type", kind: "enum", T: s.getEnumType(Jn) },
23813
23813
  { no: 3, name: "pipeline_name", kind: "scalar", T: 9, opt: !0 },
23814
23814
  { no: 4, name: "index_spec", kind: "scalar", T: 12, repeated: !0 }
23815
23815
  ]
@@ -23826,7 +23826,7 @@ const Ny = /* @__PURE__ */ s.makeEnum(
23826
23826
  T: 9
23827
23827
  /* ScalarType.STRING */
23828
23828
  },
23829
- { no: 2, name: "collection_type", kind: "enum", T: s.getEnumType(Fn) },
23829
+ { no: 2, name: "collection_type", kind: "enum", T: s.getEnumType(Jn) },
23830
23830
  { no: 3, name: "pipeline_name", kind: "scalar", T: 9, opt: !0 },
23831
23831
  {
23832
23832
  no: 4,
@@ -23849,7 +23849,7 @@ const Ny = /* @__PURE__ */ s.makeEnum(
23849
23849
  T: 9
23850
23850
  /* ScalarType.STRING */
23851
23851
  },
23852
- { no: 2, name: "collection_type", kind: "enum", T: s.getEnumType(Fn) },
23852
+ { no: 2, name: "collection_type", kind: "enum", T: s.getEnumType(Jn) },
23853
23853
  { no: 3, name: "pipeline_name", kind: "scalar", T: 9, opt: !0 }
23854
23854
  ]
23855
23855
  ), Uv = /* @__PURE__ */ s.makeMessageType(
@@ -23860,7 +23860,7 @@ const Ny = /* @__PURE__ */ s.makeEnum(
23860
23860
  ), qv = /* @__PURE__ */ s.makeMessageType(
23861
23861
  "viam.app.data.v1.Index",
23862
23862
  () => [
23863
- { no: 1, name: "collection_type", kind: "enum", T: s.getEnumType(Fn) },
23863
+ { no: 1, name: "collection_type", kind: "enum", T: s.getEnumType(Jn) },
23864
23864
  { no: 2, name: "pipeline_name", kind: "scalar", T: 9, opt: !0 },
23865
23865
  {
23866
23866
  no: 3,
@@ -23893,7 +23893,7 @@ const Ny = /* @__PURE__ */ s.makeEnum(
23893
23893
  BoundingBox: Hy,
23894
23894
  BoundingBoxLabelsByFilterRequest: fv,
23895
23895
  BoundingBoxLabelsByFilterResponse: Rv,
23896
- CaptureInterval: Dn,
23896
+ CaptureInterval: An,
23897
23897
  CaptureMetadata: qa,
23898
23898
  Classification: Ky,
23899
23899
  ConfigureDatabaseUserRequest: _v,
@@ -23918,7 +23918,7 @@ const Ny = /* @__PURE__ */ s.makeEnum(
23918
23918
  GetLatestTabularDataResponse: $y,
23919
23919
  Index: qv,
23920
23920
  IndexCreator: Dy,
23921
- IndexableCollection: Fn,
23921
+ IndexableCollection: Jn,
23922
23922
  ListIndexesRequest: Av,
23923
23923
  ListIndexesResponse: Uv,
23924
23924
  Order: Ny,
@@ -25017,12 +25017,12 @@ const Ny = /* @__PURE__ */ s.makeEnum(
25017
25017
  "The BinaryID type is deprecated and will be removed in a future release. Please migrate to the BinaryDataId field instead."
25018
25018
  );
25019
25019
  };
25020
- class Sn {
25020
+ class In {
25021
25021
  dataClient;
25022
25022
  datasetClient;
25023
25023
  dataSyncClient;
25024
25024
  dataPipelinesClient;
25025
- static UPLOAD_CHUNK_SIZE = 8;
25025
+ static UPLOAD_CHUNK_SIZE = 1024 * 64;
25026
25026
  constructor(e) {
25027
25027
  this.dataClient = V(m_, e), this.datasetClient = V(x_, e), this.dataSyncClient = V(V_, e), this.dataPipelinesClient = V(E_, e);
25028
25028
  }
@@ -25058,7 +25058,7 @@ class Sn {
25058
25058
  * @returns An array of unified tabular data and metadata.
25059
25059
  */
25060
25060
  async exportTabularData(e, n, t, o, i, r, c) {
25061
- const l = new Dn();
25061
+ const l = new An();
25062
25062
  i && (l.start = _.fromDate(i)), r && (l.end = _.fromDate(r));
25063
25063
  let d;
25064
25064
  c && (d = p.fromJson(c));
@@ -25114,7 +25114,7 @@ class Sn {
25114
25114
  return (await this.dataClient.tabularDataBySQL({
25115
25115
  organizationId: e,
25116
25116
  sqlQuery: n
25117
- })).rawData.map((o) => zn.deserialize(o));
25117
+ })).rawData.map((o) => hn.deserialize(o));
25118
25118
  }
25119
25119
  /**
25120
25120
  * Obtain unified tabular data and metadata, queried with MQL.
@@ -25149,18 +25149,20 @@ class Sn {
25149
25149
  * store. Defaults to false. Deprecated - use dataSource instead.
25150
25150
  * @param dataSource The data source to query. Defaults to the standard data
25151
25151
  * source.
25152
+ * @param queryPrefixName Optional name of the query prefix.
25152
25153
  * @returns An array of data objects
25153
25154
  */
25154
- async tabularDataByMQL(e, n, t, o) {
25155
- const i = n[0] instanceof Uint8Array ? n : n.map((l) => zn.serialize(l));
25156
- let r = o;
25157
- return t && (!r || r.type === Qe.UNSPECIFIED) && (r = new Yo({
25155
+ async tabularDataByMQL(e, n, t, o, i) {
25156
+ const r = n[0] instanceof Uint8Array ? n : n.map((d) => hn.serialize(d));
25157
+ let c = o;
25158
+ return t && (!c || c.type === Qe.UNSPECIFIED) && (c = new Yo({
25158
25159
  type: Qe.HOT_STORAGE
25159
25160
  })), (await this.dataClient.tabularDataByMQL({
25160
25161
  organizationId: e,
25161
- mqlBinary: i,
25162
- dataSource: r
25163
- })).rawData.map((l) => zn.deserialize(l));
25162
+ mqlBinary: r,
25163
+ dataSource: c,
25164
+ queryPrefixName: i
25165
+ })).rawData.map((d) => hn.deserialize(d));
25164
25166
  }
25165
25167
  /**
25166
25168
  * Filter and get a page of tabular data. The returned metadata might be empty
@@ -26047,7 +26049,7 @@ class Sn {
26047
26049
  ...t
26048
26050
  });
26049
26051
  return (await this.dataSyncClient.fileUpload(
26050
- Sn.fileUploadRequests(o, e)
26052
+ In.fileUploadRequests(o, e)
26051
26053
  )).binaryDataId;
26052
26054
  }
26053
26055
  /**
@@ -26065,8 +26067,8 @@ class Sn {
26065
26067
  value: e
26066
26068
  }
26067
26069
  });
26068
- for (let t = 0; t < n.length; t += Sn.UPLOAD_CHUNK_SIZE) {
26069
- let o = t + Sn.UPLOAD_CHUNK_SIZE;
26070
+ for (let t = 0; t < n.length; t += In.UPLOAD_CHUNK_SIZE) {
26071
+ let o = t + In.UPLOAD_CHUNK_SIZE;
26070
26072
  o > n.length && (o = n.length), yield new rt({
26071
26073
  uploadPacket: {
26072
26074
  case: "fileContents",
@@ -26078,7 +26080,7 @@ class Sn {
26078
26080
  static createFilter(e) {
26079
26081
  const n = new We(e);
26080
26082
  if (e.startTime ?? e.endTime) {
26081
- const o = new Dn();
26083
+ const o = new An();
26082
26084
  e.startTime && (o.start = _.fromDate(e.startTime)), e.endTime && (o.end = _.fromDate(e.endTime)), n.interval = o;
26083
26085
  }
26084
26086
  const t = new $o();
@@ -26199,10 +26201,11 @@ class Sn {
26199
26201
  * @param query The MQL query to run as a list of BSON documents
26200
26202
  * @param schedule The schedule to run the query on (cron expression)
26201
26203
  * @param dataSourceType The type of data source to use for the data pipeline
26204
+ * @param enableBackfill Whether to enable backfill for the data pipeline
26202
26205
  * @returns The ID of the created data pipeline
26203
26206
  */
26204
26207
  async createDataPipeline(e, n, t, o, i, r) {
26205
- const c = t[0] instanceof Uint8Array ? t : t.map((g) => zn.serialize(g)), l = r ?? Qe.STANDARD;
26208
+ const c = t[0] instanceof Uint8Array ? t : t.map((g) => hn.serialize(g)), l = r ?? Qe.STANDARD;
26206
26209
  return (await this.dataPipelinesClient.createDataPipeline({
26207
26210
  organizationId: e,
26208
26211
  name: n,
@@ -26265,6 +26268,86 @@ class Sn {
26265
26268
  t.nextPageToken
26266
26269
  );
26267
26270
  }
26271
+ /**
26272
+ * CreateIndex starts a custom index build
26273
+ *
26274
+ * @example
26275
+ *
26276
+ * ```ts
26277
+ * await dataClient.createIndex(
26278
+ * '123abc45-1234-5678-90ab-cdef12345678',
26279
+ * IndexableCollection.HOT_STORE,
26280
+ * [new TextEncoder().encode(JSON.stringify({ field: 1 }))]
26281
+ * );
26282
+ * ```
26283
+ *
26284
+ * @param organizationId The ID of the organization
26285
+ * @param collectionType The type of collection to create the index on
26286
+ * @param indexSpec The MongoDB index specification in JSON format, as a
26287
+ * Uint8Array
26288
+ * @param pipelineName Optional name of the pipeline if collectionType is
26289
+ * PIPELINE_SINK
26290
+ */
26291
+ async createIndex(e, n, t, o) {
26292
+ await this.dataClient.createIndex({
26293
+ organizationId: e,
26294
+ collectionType: n,
26295
+ indexSpec: [hn.serialize(t)],
26296
+ pipelineName: o
26297
+ });
26298
+ }
26299
+ /**
26300
+ * ListIndexes returns all the indexes for a given collection
26301
+ *
26302
+ * @example
26303
+ *
26304
+ * ```ts
26305
+ * const indexes = await dataClient.listIndexes(
26306
+ * '123abc45-1234-5678-90ab-cdef12345678',
26307
+ * IndexableCollection.HOT_STORE
26308
+ * );
26309
+ * ```
26310
+ *
26311
+ * @param organizationId The ID of the organization
26312
+ * @param collectionType The type of collection to list indexes for
26313
+ * @param pipelineName Optional name of the pipeline if collectionType is
26314
+ * PIPELINE_SINK
26315
+ * @returns An array of indexes
26316
+ */
26317
+ async listIndexes(e, n, t) {
26318
+ return (await this.dataClient.listIndexes({
26319
+ organizationId: e,
26320
+ collectionType: n,
26321
+ pipelineName: t
26322
+ })).indexes;
26323
+ }
26324
+ /**
26325
+ * DeleteIndex drops the specified custom index from a collection
26326
+ *
26327
+ * @example
26328
+ *
26329
+ * ```ts
26330
+ * await dataClient.deleteIndex(
26331
+ * '123abc45-1234-5678-90ab-cdef12345678',
26332
+ * IndexableCollection.HOT_STORE,
26333
+ * 'my_index'
26334
+ * );
26335
+ * ```
26336
+ *
26337
+ * @param organizationId The ID of the organization
26338
+ * @param collectionType The type of collection to delete the index from
26339
+ * @param indexName The name of the index to delete
26340
+ * @param pipelineName Optional name of the pipeline if collectionType is
26341
+ * PIPELINE_SINK
26342
+ */
26343
+ async deleteIndex(e, n, t, o) {
26344
+ await this.dataClient.deleteIndex({
26345
+ organizationId: e,
26346
+ collectionType: n,
26347
+ indexName: t,
26348
+ pipelineName: o
26349
+ });
26350
+ }
26268
26351
  }
26269
26352
  class ya {
26270
26353
  constructor(e, n, t = [], o, i) {
@@ -26854,7 +26937,7 @@ class X_ {
26854
26937
  provisioningClient;
26855
26938
  billingClient;
26856
26939
  constructor(e, n) {
26857
- this.transport = e, this.credentials = n, this.dataClient = new Sn(this.transport), this.appClient = new t_(this.transport), this.mlTrainingClient = new j_(this.transport), this.provisioningClient = new K_(this.transport), this.billingClient = new o_(this.transport);
26940
+ this.transport = e, this.credentials = n, this.dataClient = new In(this.transport), this.appClient = new t_(this.transport), this.mlTrainingClient = new j_(this.transport), this.provisioningClient = new K_(this.transport), this.billingClient = new o_(this.transport);
26858
26941
  }
26859
26942
  async connectToMachine({
26860
26943
  host: e = void 0,
@@ -26876,7 +26959,7 @@ class X_ {
26876
26959
  "Host was not provided and could not be obtained from the machine ID"
26877
26960
  );
26878
26961
  let i = this.credentials;
26879
- if (!qn(i)) {
26962
+ if (!Ln(i)) {
26880
26963
  if (o === void 0) {
26881
26964
  const c = t.split(".viam.")[0]?.split(".");
26882
26965
  c !== void 0 && (o = c.at(-1));
@@ -28123,7 +28206,7 @@ const nh = /* @__PURE__ */ s.makeMessageType(
28123
28206
  kind: m.Unary
28124
28207
  }
28125
28208
  }
28126
- }, hn = (a) => a.replaceAll(":", "+");
28209
+ }, fn = (a) => a.replaceAll(":", "+");
28127
28210
  class yI extends qr {
28128
28211
  client;
28129
28212
  options;
@@ -28138,7 +28221,7 @@ class yI extends qr {
28138
28221
  }
28139
28222
  async add(e) {
28140
28223
  const n = new Xo({
28141
- name: hn(e)
28224
+ name: fn(e)
28142
28225
  });
28143
28226
  this.options.requestLogger?.(n);
28144
28227
  try {
@@ -28149,7 +28232,7 @@ class yI extends qr {
28149
28232
  }
28150
28233
  async remove(e) {
28151
28234
  const n = new Qo({
28152
- name: hn(e)
28235
+ name: fn(e)
28153
28236
  });
28154
28237
  this.options.requestLogger?.(n);
28155
28238
  try {
@@ -28175,7 +28258,7 @@ class yI extends qr {
28175
28258
  } catch {
28176
28259
  return [];
28177
28260
  }
28178
- }, t = hn(e);
28261
+ }, t = fn(e);
28179
28262
  let o = await n(t);
28180
28263
  return o.length > 0 || (o = await n(e)), o;
28181
28264
  }
@@ -28189,7 +28272,7 @@ class yI extends qr {
28189
28272
  */
28190
28273
  async setOptions(e, n, t) {
28191
28274
  const o = new va({
28192
- name: hn(e),
28275
+ name: fn(e),
28193
28276
  resolution: {
28194
28277
  width: n,
28195
28278
  height: t
@@ -28210,7 +28293,7 @@ class yI extends qr {
28210
28293
  */
28211
28294
  async resetOptions(e) {
28212
28295
  const n = new va({
28213
- name: hn(e)
28296
+ name: fn(e)
28214
28297
  });
28215
28298
  this.options.requestLogger?.(n);
28216
28299
  try {
@@ -29397,7 +29480,7 @@ class nb {
29397
29480
  );
29398
29481
  }
29399
29482
  }
29400
- const ab = "0.52.1";
29483
+ const ab = "0.52.2";
29401
29484
  export {
29402
29485
  qS as AnalogValue,
29403
29486
  DS as ArmClient,