@viamrobotics/sdk 0.23.0 → 0.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- export declare const apiVersion = "v0.1.337";
1
+ export declare const apiVersion = "v0.1.338";
@@ -9,6 +9,7 @@ export declare class MlTrainingClient {
9
9
  private service;
10
10
  constructor(serviceHost: string, grpcOptions: RpcOptions);
11
11
  submitTrainingJob(orgId: string, datasetId: string, modelName: string, modelVersion: string, modelType: ModelType, tagsList: string[]): Promise<string>;
12
+ submitCustomTrainingJob(orgId: string, datasetId: string, registryItemId: string, registryItemVersion: string, modelName: string, modelVersion: string): Promise<string>;
12
13
  getTrainingJob(id: string): Promise<pb.TrainingJobMetadata | undefined>;
13
14
  listTrainingJobs(orgId: string, status: TrainingStatus): Promise<pb.TrainingJobMetadata.AsObject[]>;
14
15
  cancelTrainingJob(id: string): Promise<null>;
@@ -87,6 +87,8 @@ export class SubmitCustomTrainingJobRequest extends jspb.Message {
87
87
  getModelVersion(): string;
88
88
  setModelVersion(value: string): void;
89
89
 
90
+ getArgumentsMap(): jspb.Map<string, string>;
91
+ clearArgumentsMap(): void;
90
92
  serializeBinary(): Uint8Array;
91
93
  toObject(includeInstance?: boolean): SubmitCustomTrainingJobRequest.AsObject;
92
94
  static toObject(includeInstance: boolean, msg: SubmitCustomTrainingJobRequest): SubmitCustomTrainingJobRequest.AsObject;
@@ -105,6 +107,7 @@ export namespace SubmitCustomTrainingJobRequest {
105
107
  organizationId: string,
106
108
  modelName: string,
107
109
  modelVersion: string,
110
+ argumentsMap: Array<[string, string]>,
108
111
  }
109
112
  }
110
113
 
package/dist/main.es.js CHANGED
@@ -13955,21 +13955,21 @@ var grpcWebClient_umd$1 = { exports: {} };
13955
13955
  else if (this.position === this.buffer.byteLength)
13956
13956
  this.buffer = h, this.position = 0;
13957
13957
  else {
13958
- var S = this.buffer.byteLength - this.position, T = new Uint8Array(S + h.byteLength), z = y(this.buffer, this.position);
13959
- T.set(z, 0);
13960
- var C = new Uint8Array(h);
13961
- T.set(C, S), this.buffer = T, this.position = 0;
13958
+ var S = this.buffer.byteLength - this.position, T = new Uint8Array(S + h.byteLength), W = y(this.buffer, this.position);
13959
+ T.set(W, 0);
13960
+ var P = new Uint8Array(h);
13961
+ T.set(P, S), this.buffer = T, this.position = 0;
13962
13962
  }
13963
13963
  for (; ; ) {
13964
13964
  if (!d(this.buffer, this.position, 5))
13965
13965
  return M;
13966
- var I = y(this.buffer, this.position, this.position + 5), D = new DataView(I.buffer, I.byteOffset, I.byteLength), O = v(D);
13966
+ var C = y(this.buffer, this.position, this.position + 5), _ = new DataView(C.buffer, C.byteOffset, C.byteLength), O = v(_);
13967
13967
  if (!d(this.buffer, this.position, 5 + O))
13968
13968
  return M;
13969
- var W = y(this.buffer, this.position + 5, this.position + 5 + O);
13970
- if (this.position += 5 + O, c(D))
13971
- return M.push({ chunkType: o.TRAILERS, trailers: (R = W, new r.Metadata(t(R))) }), M;
13972
- M.push({ chunkType: o.MESSAGE, data: W });
13969
+ var G = y(this.buffer, this.position + 5, this.position + 5 + O);
13970
+ if (this.position += 5 + O, c(_))
13971
+ return M.push({ chunkType: o.TRAILERS, trailers: (R = G, new r.Metadata(t(R))) }), M;
13972
+ M.push({ chunkType: o.MESSAGE, data: G });
13973
13973
  }
13974
13974
  }, f;
13975
13975
  }();
@@ -14490,7 +14490,7 @@ var grpcWebClient_umd$1 = { exports: {} };
14490
14490
  var s, g;
14491
14491
  });
14492
14492
  })(grpcWebClient_umd$1);
14493
- var grpcWebClient_umdExports$1 = grpcWebClient_umd$1.exports, q = Object.defineProperty, Y = (n, e, s) => e in n ? q(n, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : n[e] = s, E = (n, e, s) => (Y(n, typeof e != "symbol" ? e + "" : e, s), s), commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, grpcWebClient_umd = { exports: {} };
14493
+ var grpcWebClient_umdExports$1 = grpcWebClient_umd$1.exports, X = Object.defineProperty, Z = (n, e, s) => e in n ? X(n, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : n[e] = s, E = (n, e, s) => (Z(n, typeof e != "symbol" ? e + "" : e, s), s), commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, grpcWebClient_umd = { exports: {} };
14494
14494
  (function(n, e) {
14495
14495
  (function(s, g) {
14496
14496
  n.exports = g();
@@ -15082,17 +15082,17 @@ var grpcWebClient_umdExports$1 = grpcWebClient_umd$1.exports, q = Object.defineP
15082
15082
  else {
15083
15083
  var M = this.buffer.byteLength - this.position, S = new Uint8Array(M + f.byteLength), T = d(this.buffer, this.position);
15084
15084
  S.set(T, 0);
15085
- var z = new Uint8Array(f);
15086
- S.set(z, M), this.buffer = S, this.position = 0;
15085
+ var W = new Uint8Array(f);
15086
+ S.set(W, M), this.buffer = S, this.position = 0;
15087
15087
  }
15088
15088
  for (; ; ) {
15089
15089
  if (!v(this.buffer, this.position, 5))
15090
15090
  return R;
15091
- var C = d(this.buffer, this.position, this.position + 5), I = new DataView(C.buffer, C.byteOffset, C.byteLength), D = c(I);
15092
- if (!v(this.buffer, this.position, 5 + D))
15091
+ var P = d(this.buffer, this.position, this.position + 5), C = new DataView(P.buffer, P.byteOffset, P.byteLength), _ = c(C);
15092
+ if (!v(this.buffer, this.position, 5 + _))
15093
15093
  return R;
15094
- var O = d(this.buffer, this.position + 5, this.position + 5 + D);
15095
- if (this.position += 5 + D, t(I))
15094
+ var O = d(this.buffer, this.position + 5, this.position + 5 + _);
15095
+ if (this.position += 5 + _, t(C))
15096
15096
  return R.push({ chunkType: p.TRAILERS, trailers: (b = O, new l.Metadata(i(b))) }), R;
15097
15097
  R.push({ chunkType: p.MESSAGE, data: O });
15098
15098
  }
@@ -21001,9 +21001,9 @@ var status_pb$1 = {}, any_pb$1 = {};
21001
21001
  };
21002
21002
  })(any_pb$1);
21003
21003
  (function(n) {
21004
- var e = googleProtobuf, s = e, g = function() {
21005
- return this || window || g || self || Function("return this")();
21006
- }.call(null), u = any_pb$1;
21004
+ var e = googleProtobuf, s = e, g = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof g < "u" && g || typeof self < "u" && self || function() {
21005
+ return this;
21006
+ }.call(null) || Function("return this")(), u = any_pb$1;
21007
21007
  s.object.extend(proto, u), s.exportSymbol("proto.google.rpc.Status", null, g), proto.google.rpc.Status = function(p) {
21008
21008
  e.Message.initialize(this, p, 0, -1, proto.google.rpc.Status.repeatedFields_, null);
21009
21009
  }, s.inherits(proto.google.rpc.Status, e.Message), s.DEBUG && !COMPILED && (proto.google.rpc.Status.displayName = "proto.google.rpc.Status"), proto.google.rpc.Status.repeatedFields_ = [3], e.Message.GENERATE_TO_OBJECT && (proto.google.rpc.Status.prototype.toObject = function(p) {
@@ -21094,9 +21094,9 @@ var status_pb$1 = {}, any_pb$1 = {};
21094
21094
  }, s.object.extend(n, proto.google.rpc);
21095
21095
  })(status_pb$1);
21096
21096
  (function(n) {
21097
- var e = googleProtobuf, s = e, g = function() {
21098
- return this || window || g || self || Function("return this")();
21099
- }.call(null), u = duration_pb;
21097
+ var e = googleProtobuf, s = e, g = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof g < "u" && g || typeof self < "u" && self || function() {
21098
+ return this;
21099
+ }.call(null) || Function("return this")(), u = duration_pb;
21100
21100
  s.object.extend(proto, u);
21101
21101
  var p = status_pb$1;
21102
21102
  s.object.extend(proto, p), s.exportSymbol("proto.proto.rpc.webrtc.v1.Metadata", null, g), s.exportSymbol("proto.proto.rpc.webrtc.v1.PacketMessage", null, g), s.exportSymbol("proto.proto.rpc.webrtc.v1.Request", null, g), s.exportSymbol("proto.proto.rpc.webrtc.v1.Request.TypeCase", null, g), s.exportSymbol("proto.proto.rpc.webrtc.v1.RequestHeaders", null, g), s.exportSymbol("proto.proto.rpc.webrtc.v1.RequestMessage", null, g), s.exportSymbol("proto.proto.rpc.webrtc.v1.Response", null, g), s.exportSymbol("proto.proto.rpc.webrtc.v1.Response.TypeCase", null, g), s.exportSymbol("proto.proto.rpc.webrtc.v1.ResponseHeaders", null, g), s.exportSymbol("proto.proto.rpc.webrtc.v1.ResponseMessage", null, g), s.exportSymbol("proto.proto.rpc.webrtc.v1.ResponseTrailers", null, g), s.exportSymbol("proto.proto.rpc.webrtc.v1.Stream", null, g), s.exportSymbol("proto.proto.rpc.webrtc.v1.Strings", null, g), proto.proto.rpc.webrtc.v1.PacketMessage = function(l) {
@@ -21256,7 +21256,7 @@ var status_pb$1 = {}, any_pb$1 = {};
21256
21256
  stream: (r = o.getStream()) && proto.proto.rpc.webrtc.v1.Stream.toObject(l, r),
21257
21257
  headers: (r = o.getHeaders()) && proto.proto.rpc.webrtc.v1.RequestHeaders.toObject(l, r),
21258
21258
  message: (r = o.getMessage()) && proto.proto.rpc.webrtc.v1.RequestMessage.toObject(l, r),
21259
- rstStream: e.Message.getBooleanFieldWithDefault(o, 4, !1)
21259
+ rstStream: (r = e.Message.getBooleanField(o, 4)) == null ? void 0 : r
21260
21260
  };
21261
21261
  return l && (i.$jspbMessageInstance = o), i;
21262
21262
  }), proto.proto.rpc.webrtc.v1.Request.deserializeBinary = function(l) {
@@ -22128,9 +22128,9 @@ class FailingClientStream {
22128
22128
  }
22129
22129
  var code_pb = {};
22130
22130
  (function(n) {
22131
- var e = googleProtobuf, s = e, g = function() {
22132
- return this || window || g || self || Function("return this")();
22133
- }.call(null);
22131
+ var e = googleProtobuf, s = e, g = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof g < "u" && g || typeof self < "u" && self || function() {
22132
+ return this;
22133
+ }.call(null) || Function("return this")();
22134
22134
  s.exportSymbol("proto.google.rpc.Code", null, g), proto.google.rpc.Code = {
22135
22135
  OK: 0,
22136
22136
  CANCELLED: 1,
@@ -22153,9 +22153,9 @@ var code_pb = {};
22153
22153
  })(code_pb);
22154
22154
  var auth_pb$1 = {}, annotations_pb = {}, http_pb = {};
22155
22155
  (function(n) {
22156
- var e = googleProtobuf, s = e, g = function() {
22157
- return this || window || g || self || Function("return this")();
22158
- }.call(null);
22156
+ var e = googleProtobuf, s = e, g = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof g < "u" && g || typeof self < "u" && self || function() {
22157
+ return this;
22158
+ }.call(null) || Function("return this")();
22159
22159
  s.exportSymbol("proto.google.api.CustomHttpPattern", null, g), s.exportSymbol("proto.google.api.Http", null, g), s.exportSymbol("proto.google.api.HttpRule", null, g), s.exportSymbol("proto.google.api.HttpRule.PatternCase", null, g), proto.google.api.Http = function(u) {
22160
22160
  e.Message.initialize(this, u, 0, -1, proto.google.api.Http.repeatedFields_, null);
22161
22161
  }, s.inherits(proto.google.api.Http, e.Message), s.DEBUG && !COMPILED && (proto.google.api.Http.displayName = "proto.google.api.Http"), proto.google.api.HttpRule = function(u) {
@@ -22247,11 +22247,11 @@ var auth_pb$1 = {}, annotations_pb = {}, http_pb = {};
22247
22247
  }, proto.google.api.HttpRule.toObject = function(u, p) {
22248
22248
  var l, o = {
22249
22249
  selector: e.Message.getFieldWithDefault(p, 1, ""),
22250
- get: e.Message.getFieldWithDefault(p, 2, ""),
22251
- put: e.Message.getFieldWithDefault(p, 3, ""),
22252
- post: e.Message.getFieldWithDefault(p, 4, ""),
22253
- pb_delete: e.Message.getFieldWithDefault(p, 5, ""),
22254
- patch: e.Message.getFieldWithDefault(p, 6, ""),
22250
+ get: (l = e.Message.getField(p, 2)) == null ? void 0 : l,
22251
+ put: (l = e.Message.getField(p, 3)) == null ? void 0 : l,
22252
+ post: (l = e.Message.getField(p, 4)) == null ? void 0 : l,
22253
+ pb_delete: (l = e.Message.getField(p, 5)) == null ? void 0 : l,
22254
+ patch: (l = e.Message.getField(p, 6)) == null ? void 0 : l,
22255
22255
  custom: (l = p.getCustom()) && proto.google.api.CustomHttpPattern.toObject(u, l),
22256
22256
  body: e.Message.getFieldWithDefault(p, 7, ""),
22257
22257
  responseBody: e.Message.getFieldWithDefault(p, 12, ""),
@@ -26356,9 +26356,9 @@ var descriptor_pb = {};
26356
26356
  }, s.object.extend(n, proto.google.protobuf);
26357
26357
  })(descriptor_pb);
26358
26358
  (function(n) {
26359
- var e = googleProtobuf, s = e, g = function() {
26360
- return this || window || g || self || Function("return this")();
26361
- }.call(null), u = http_pb;
26359
+ var e = googleProtobuf, s = e, g = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof g < "u" && g || typeof self < "u" && self || function() {
26360
+ return this;
26361
+ }.call(null) || Function("return this")(), u = http_pb;
26362
26362
  s.object.extend(proto, u);
26363
26363
  var p = descriptor_pb;
26364
26364
  s.object.extend(proto, p), s.exportSymbol("proto.google.api.http", null, g), proto.google.api.http = new e.ExtensionFieldInfo(
@@ -26378,9 +26378,9 @@ var descriptor_pb = {};
26378
26378
  ), p.MethodOptions.extensions[72295728] = proto.google.api.http, s.object.extend(n, proto.google.api);
26379
26379
  })(annotations_pb);
26380
26380
  (function(n) {
26381
- var e = googleProtobuf, s = e, g = function() {
26382
- return this || window || g || self || Function("return this")();
26383
- }.call(null), u = annotations_pb;
26381
+ var e = googleProtobuf, s = e, g = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof g < "u" && g || typeof self < "u" && self || function() {
26382
+ return this;
26383
+ }.call(null) || Function("return this")(), u = annotations_pb;
26384
26384
  s.object.extend(proto, u), s.exportSymbol("proto.proto.rpc.v1.AuthenticateRequest", null, g), s.exportSymbol("proto.proto.rpc.v1.AuthenticateResponse", null, g), s.exportSymbol("proto.proto.rpc.v1.AuthenticateToRequest", null, g), s.exportSymbol("proto.proto.rpc.v1.AuthenticateToResponse", null, g), s.exportSymbol("proto.proto.rpc.v1.Credentials", null, g), proto.proto.rpc.v1.Credentials = function(p) {
26385
26385
  e.Message.initialize(this, p, 0, -1, null, null);
26386
26386
  }, s.inherits(proto.proto.rpc.v1.Credentials, e.Message), s.DEBUG && !COMPILED && (proto.proto.rpc.v1.Credentials.displayName = "proto.proto.rpc.v1.Credentials"), proto.proto.rpc.v1.AuthenticateRequest = function(p) {
@@ -26751,9 +26751,9 @@ var ExternalAuthService_1 = ExternalAuthService$1, signaling_pb = {}, timestamp_
26751
26751
  };
26752
26752
  })(timestamp_pb);
26753
26753
  (function(n) {
26754
- var e = googleProtobuf, s = e, g = function() {
26755
- return this || window || g || self || Function("return this")();
26756
- }.call(null), u = annotations_pb;
26754
+ var e = googleProtobuf, s = e, g = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof g < "u" && g || typeof self < "u" && self || function() {
26755
+ return this;
26756
+ }.call(null) || Function("return this")(), u = annotations_pb;
26757
26757
  s.object.extend(proto, u);
26758
26758
  var p = timestamp_pb;
26759
26759
  s.object.extend(proto, p);
@@ -26803,13 +26803,13 @@ var ExternalAuthService_1 = ExternalAuthService$1, signaling_pb = {}, timestamp_
26803
26803
  }, s.inherits(proto.proto.rpc.webrtc.v1.OptionalWebRTCConfigResponse, e.Message), s.DEBUG && !COMPILED && (proto.proto.rpc.webrtc.v1.OptionalWebRTCConfigResponse.displayName = "proto.proto.rpc.webrtc.v1.OptionalWebRTCConfigResponse"), e.Message.GENERATE_TO_OBJECT && (proto.proto.rpc.webrtc.v1.ICECandidate.prototype.toObject = function(o) {
26804
26804
  return proto.proto.rpc.webrtc.v1.ICECandidate.toObject(o, this);
26805
26805
  }, proto.proto.rpc.webrtc.v1.ICECandidate.toObject = function(o, r) {
26806
- var i = {
26806
+ var i, t = {
26807
26807
  candidate: e.Message.getFieldWithDefault(r, 1, ""),
26808
- sdpMid: e.Message.getFieldWithDefault(r, 2, ""),
26809
- sdpmLineIndex: e.Message.getFieldWithDefault(r, 3, 0),
26810
- usernameFragment: e.Message.getFieldWithDefault(r, 4, "")
26808
+ sdpMid: (i = e.Message.getField(r, 2)) == null ? void 0 : i,
26809
+ sdpmLineIndex: (i = e.Message.getField(r, 3)) == null ? void 0 : i,
26810
+ usernameFragment: (i = e.Message.getField(r, 4)) == null ? void 0 : i
26811
26811
  };
26812
- return o && (i.$jspbMessageInstance = r), i;
26812
+ return o && (t.$jspbMessageInstance = r), t;
26813
26813
  }), proto.proto.rpc.webrtc.v1.ICECandidate.deserializeBinary = function(o) {
26814
26814
  var r = new e.BinaryReader(o), i = new proto.proto.rpc.webrtc.v1.ICECandidate();
26815
26815
  return proto.proto.rpc.webrtc.v1.ICECandidate.deserializeBinaryFromReader(i, r);
@@ -27169,7 +27169,7 @@ var ExternalAuthService_1 = ExternalAuthService$1, signaling_pb = {}, timestamp_
27169
27169
  var i, t = {
27170
27170
  uuid: e.Message.getFieldWithDefault(r, 1, ""),
27171
27171
  candidate: (i = r.getCandidate()) && proto.proto.rpc.webrtc.v1.ICECandidate.toObject(o, i),
27172
- done: e.Message.getBooleanFieldWithDefault(r, 3, !1),
27172
+ done: (i = e.Message.getBooleanField(r, 3)) == null ? void 0 : i,
27173
27173
  error: (i = r.getError()) && l.Status.toObject(o, i)
27174
27174
  };
27175
27175
  return o && (t.$jspbMessageInstance = r), t;
@@ -28392,6 +28392,9 @@ async function getOptionalWebRTCConfig(n, e, s) {
28392
28392
  return;
28393
28393
  }
28394
28394
  p(o);
28395
+ } else if (t === grpcWebClient_umdExports.grpc.Code.Unimplemented) {
28396
+ p(new signaling_pb.WebRTCConfig());
28397
+ return;
28395
28398
  } else
28396
28399
  l(c);
28397
28400
  }
@@ -28409,7 +28412,7 @@ async function dialWebRTC$1(n, e, s) {
28409
28412
  }));
28410
28413
  s || (s = {});
28411
28414
  let d;
28412
- s.webrtcOptions ? (d = s.webrtcOptions, d.rtcConfig ? d.rtcConfig.iceServers = [
28415
+ s.webrtcOptions ? (d = JSON.parse(JSON.stringify(s.webrtcOptions)), d.rtcConfig ? d.rtcConfig.iceServers = [
28413
28416
  ...d.rtcConfig.iceServers || [],
28414
28417
  ...v
28415
28418
  ] : d.rtcConfig = { iceServers: v }) : d = {
@@ -28449,12 +28452,12 @@ async function dialWebRTC$1(n, e, s) {
28449
28452
  },
28450
28453
  host: n,
28451
28454
  transport: b,
28452
- onEnd: (_) => {
28453
- const { status: P, statusMessage: L, message: N } = _;
28454
- P === grpcWebClient_umdExports.grpc.Code.OK && N || console.error(L);
28455
+ onEnd: (D) => {
28456
+ const { status: I, statusMessage: z, message: L } = D;
28457
+ I === grpcWebClient_umdExports.grpc.Code.OK && L || console.error(z);
28455
28458
  }
28456
28459
  });
28457
- }, z = () => {
28460
+ }, W = () => {
28458
28461
  if (S)
28459
28462
  return;
28460
28463
  S = !0;
@@ -28467,65 +28470,83 @@ async function dialWebRTC$1(n, e, s) {
28467
28470
  host: n,
28468
28471
  transport: b,
28469
28472
  onEnd: (F) => {
28470
- const { status: w, statusMessage: _, message: P } = F;
28471
- w === grpcWebClient_umdExports.grpc.Code.OK && P || console.error(_);
28473
+ const { status: w, statusMessage: D, message: I } = F;
28474
+ w === grpcWebClient_umdExports.grpc.Code.OK && I || console.error(D);
28472
28475
  }
28473
28476
  });
28474
28477
  };
28475
- let C, I = new Promise((B) => {
28476
- C = B;
28477
- }), D = !1;
28478
+ let P, C = new Promise((B) => {
28479
+ P = B;
28480
+ }), _ = !1;
28478
28481
  if (!(d != null && d.disableTrickleICE)) {
28479
28482
  const B = await y.createOffer({});
28480
- let F = !1;
28481
- y.addEventListener(
28483
+ let F = !1, w = 0, D = 0, I = 0;
28484
+ y.addEventListener("iceconnectionstatechange", () => {
28485
+ if (y.iceConnectionState !== "completed" || w === 0)
28486
+ return;
28487
+ let z = I / w;
28488
+ console.groupCollapsed("Caller update statistics"), console.table({
28489
+ num_updates: w,
28490
+ average_duration: `${z}ms`,
28491
+ max_duration: `${D}ms`
28492
+ }), console.groupEnd();
28493
+ }), y.addEventListener(
28482
28494
  "icecandidate",
28483
- async (w) => {
28484
- if (await I, D)
28495
+ async (z) => {
28496
+ if (await C, _)
28485
28497
  return;
28486
- if (w.candidate === null) {
28487
- F = !0, z();
28498
+ if (z.candidate === null) {
28499
+ F = !0, W();
28488
28500
  return;
28489
28501
  }
28490
- const _ = iceCandidateToProto(w.candidate), P = new signaling_pb.CallUpdateRequest();
28491
- P.setUuid(M), P.setCandidate(_), grpcWebClient_umdExports.grpc.unary(SignalingService_1.CallUpdate, {
28492
- request: P,
28502
+ z.candidate.candidate !== null && console.debug(`gathered local ICE ${z.candidate.candidate}`);
28503
+ const L = iceCandidateToProto(z.candidate), N = new signaling_pb.CallUpdateRequest();
28504
+ N.setUuid(M), N.setCandidate(L);
28505
+ const H = /* @__PURE__ */ new Date();
28506
+ grpcWebClient_umdExports.grpc.unary(SignalingService_1.CallUpdate, {
28507
+ request: N,
28493
28508
  metadata: {
28494
28509
  "rpc-host": e
28495
28510
  },
28496
28511
  host: n,
28497
28512
  transport: b,
28498
- onEnd: (L) => {
28499
- const { status: N, statusMessage: k, message: H } = L;
28500
- N === grpcWebClient_umdExports.grpc.Code.OK && H || D || F || console.error("error sending candidate", k);
28513
+ onEnd: (V) => {
28514
+ const { status: J, statusMessage: K, message: Y } = V;
28515
+ if (J === grpcWebClient_umdExports.grpc.Code.OK && Y) {
28516
+ w++;
28517
+ let $ = (/* @__PURE__ */ new Date()).getTime() - H.getTime();
28518
+ $ > D && (D = $), I += $;
28519
+ return;
28520
+ }
28521
+ _ || F || console.error("error sending candidate", K);
28501
28522
  }
28502
28523
  });
28503
28524
  }
28504
28525
  ), await y.setLocalDescription(B);
28505
28526
  }
28506
- let O, W = !1;
28527
+ let O, G = !1;
28507
28528
  R.onMessage(async (B) => {
28508
28529
  const F = B;
28509
28530
  if (F.hasInit()) {
28510
- if (W) {
28531
+ if (G) {
28511
28532
  T("got init stage more than once");
28512
28533
  return;
28513
28534
  }
28514
28535
  const w = F.getInit();
28515
- W = !0, M = F.getUuid();
28516
- const _ = new RTCSessionDescription(
28536
+ G = !0, M = F.getUuid();
28537
+ const D = new RTCSessionDescription(
28517
28538
  JSON.parse(atob(w.getSdp()))
28518
28539
  );
28519
28540
  if (O != null && O.isClosed()) {
28520
28541
  T("client channel is closed");
28521
28542
  return;
28522
28543
  }
28523
- if (await y.setRemoteDescription(_), C(!0), d != null && d.disableTrickleICE) {
28524
- D = !0, z();
28544
+ if (await y.setRemoteDescription(D), P(!0), d != null && d.disableTrickleICE) {
28545
+ _ = !0, W();
28525
28546
  return;
28526
28547
  }
28527
28548
  } else if (F.hasUpdate()) {
28528
- if (!W) {
28549
+ if (!G) {
28529
28550
  T("got update stage before init stage");
28530
28551
  return;
28531
28552
  }
@@ -28533,11 +28554,12 @@ async function dialWebRTC$1(n, e, s) {
28533
28554
  T(`uuid mismatch; have=${F.getUuid()} want=${M}`);
28534
28555
  return;
28535
28556
  }
28536
- const w = F.getUpdate(), _ = iceCandidateFromProto(w.getCandidate());
28557
+ const w = F.getUpdate(), D = iceCandidateFromProto(w.getCandidate());
28558
+ D.candidate !== null && console.debug(`received remote ICE ${D.candidate}`);
28537
28559
  try {
28538
- await y.addIceCandidate(_);
28539
- } catch (P) {
28540
- T(JSON.stringify(P));
28560
+ await y.addIceCandidate(D);
28561
+ } catch (I) {
28562
+ T(JSON.stringify(I));
28541
28563
  return;
28542
28564
  }
28543
28565
  } else {
@@ -28545,8 +28567,8 @@ async function dialWebRTC$1(n, e, s) {
28545
28567
  return;
28546
28568
  }
28547
28569
  });
28548
- let j, G, $ = new Promise((B, F) => {
28549
- j = B, G = F;
28570
+ let j, q, x = new Promise((B, F) => {
28571
+ j = B, q = F;
28550
28572
  });
28551
28573
  R.onEnd(
28552
28574
  (B, F, w) => {
@@ -28555,25 +28577,25 @@ async function dialWebRTC$1(n, e, s) {
28555
28577
  return;
28556
28578
  }
28557
28579
  if (F === "Response closed without headers") {
28558
- G(new ConnectionClosedError("failed to dial"));
28580
+ q(new ConnectionClosedError("failed to dial"));
28559
28581
  return;
28560
28582
  }
28561
28583
  if (O != null && O.isClosed()) {
28562
- G(
28584
+ q(
28563
28585
  new ConnectionClosedError("client channel is closed")
28564
28586
  );
28565
28587
  return;
28566
28588
  }
28567
- console.error(F), G(F);
28589
+ console.error(F), q(F);
28568
28590
  }
28569
28591
  ), R.start({ "rpc-host": e });
28570
- const A = new signaling_pb.CallRequest(), x = addSdpFields(
28592
+ const A = new signaling_pb.CallRequest(), U = addSdpFields(
28571
28593
  y.localDescription,
28572
28594
  (i = s.webrtcOptions) == null ? void 0 : i.additionalSdpFields
28573
- ), U = btoa(JSON.stringify(x));
28574
- return A.setSdp(U), d && d.disableTrickleICE && A.setDisableTrickle(d.disableTrickleICE), R.send(A), O = new ClientChannel(y, m), s.dialTimeout && setTimeout(() => {
28595
+ ), k = btoa(JSON.stringify(U));
28596
+ return A.setSdp(k), d && d.disableTrickleICE && A.setDisableTrickle(d.disableTrickleICE), R.send(A), O = new ClientChannel(y, m), s.dialTimeout && setTimeout(() => {
28575
28597
  f || O.close();
28576
- }, s.dialTimeout), O.ready.then(() => j()).catch((B) => G(B)), await $, await O.ready, D = !0, z(), s != null && s.externalAuthAddress || (t = s?.credentials) != null && t.type, f = !0, {
28598
+ }, s.dialTimeout), O.ready.then(() => j()).catch((B) => q(B)), await x, await O.ready, _ = !0, W(), s != null && s.externalAuthAddress || (t = s?.credentials) != null && t.type, f = !0, {
28577
28599
  transportFactory: O.transportFactory(),
28578
28600
  peerConnection: y,
28579
28601
  dataChannel: m
@@ -49860,7 +49882,7 @@ class ViamResponseStream extends EventDispatcher {
49860
49882
  this.listeners = {}, this.stream.cancel();
49861
49883
  }
49862
49884
  }
49863
- const apiVersion = "v0.1.337", promisify = async (n, e) => new Promise((s, g) => {
49885
+ const apiVersion = "v0.1.338", promisify = async (n, e) => new Promise((s, g) => {
49864
49886
  n(e, new grpcWebClient_umdExports$1.grpc.Metadata(), (u, p) => {
49865
49887
  if (u) {
49866
49888
  g(u);
@@ -49930,7 +49952,7 @@ class MetadataTransport {
49930
49952
  constructor(e, s, g) {
49931
49953
  this.transport = e(s), this.metadata = g ?? new grpcWebClient_umdExports$1.grpc.Metadata(), this.metadata.set(
49932
49954
  "viam-client",
49933
- `typescript;v0.23.0;${apiVersion}`
49955
+ `typescript;v0.23.1;${apiVersion}`
49934
49956
  );
49935
49957
  }
49936
49958
  start(e) {
@@ -58538,15 +58560,16 @@ var tagger_pb = {};
58538
58560
  }, e.Message.GENERATE_TO_OBJECT && (proto.viam.app.mltraining.v1.SubmitCustomTrainingJobRequest.prototype.toObject = function(o) {
58539
58561
  return proto.viam.app.mltraining.v1.SubmitCustomTrainingJobRequest.toObject(o, this);
58540
58562
  }, proto.viam.app.mltraining.v1.SubmitCustomTrainingJobRequest.toObject = function(o, r) {
58541
- var i = {
58563
+ var i, t = {
58542
58564
  datasetId: e.Message.getFieldWithDefault(r, 1, ""),
58543
58565
  registryItemId: e.Message.getFieldWithDefault(r, 2, ""),
58544
58566
  registryItemVersion: e.Message.getFieldWithDefault(r, 6, ""),
58545
58567
  organizationId: e.Message.getFieldWithDefault(r, 3, ""),
58546
58568
  modelName: e.Message.getFieldWithDefault(r, 4, ""),
58547
- modelVersion: e.Message.getFieldWithDefault(r, 5, "")
58569
+ modelVersion: e.Message.getFieldWithDefault(r, 5, ""),
58570
+ argumentsMap: (i = r.getArgumentsMap()) ? i.toObject(o, void 0) : []
58548
58571
  };
58549
- return o && (i.$jspbMessageInstance = r), i;
58572
+ return o && (t.$jspbMessageInstance = r), t;
58550
58573
  }), proto.viam.app.mltraining.v1.SubmitCustomTrainingJobRequest.deserializeBinary = function(o) {
58551
58574
  var r = new e.BinaryReader(o), i = new proto.viam.app.mltraining.v1.SubmitCustomTrainingJobRequest();
58552
58575
  return proto.viam.app.mltraining.v1.SubmitCustomTrainingJobRequest.deserializeBinaryFromReader(i, r);
@@ -58596,6 +58619,12 @@ var tagger_pb = {};
58596
58619
  );
58597
58620
  o.setModelVersion(t);
58598
58621
  break;
58622
+ case 7:
58623
+ var t = o.getArgumentsMap();
58624
+ r.readMessage(t, function(c, v) {
58625
+ e.Map.deserializeBinary(c, v, e.BinaryReader.prototype.readString, e.BinaryReader.prototype.readString, null, "", "");
58626
+ });
58627
+ break;
58599
58628
  default:
58600
58629
  r.skipField();
58601
58630
  break;
@@ -58625,7 +58654,7 @@ var tagger_pb = {};
58625
58654
  ), i = o.getModelVersion(), i.length > 0 && r.writeString(
58626
58655
  5,
58627
58656
  i
58628
- );
58657
+ ), i = o.getArgumentsMap(!0), i && i.getLength() > 0 && i.serializeBinary(7, r, e.BinaryWriter.prototype.writeString, e.BinaryWriter.prototype.writeString);
58629
58658
  }, proto.viam.app.mltraining.v1.SubmitCustomTrainingJobRequest.prototype.getDatasetId = function() {
58630
58659
  return (
58631
58660
  /** @type {string} */
@@ -58668,6 +58697,18 @@ var tagger_pb = {};
58668
58697
  );
58669
58698
  }, proto.viam.app.mltraining.v1.SubmitCustomTrainingJobRequest.prototype.setModelVersion = function(o) {
58670
58699
  return e.Message.setProto3StringField(this, 5, o);
58700
+ }, proto.viam.app.mltraining.v1.SubmitCustomTrainingJobRequest.prototype.getArgumentsMap = function(o) {
58701
+ return (
58702
+ /** @type {!jspb.Map<string,string>} */
58703
+ e.Message.getMapField(
58704
+ this,
58705
+ 7,
58706
+ o,
58707
+ null
58708
+ )
58709
+ );
58710
+ }, proto.viam.app.mltraining.v1.SubmitCustomTrainingJobRequest.prototype.clearArgumentsMap = function() {
58711
+ return this.getArgumentsMap().clear(), this;
58671
58712
  }, e.Message.GENERATE_TO_OBJECT && (proto.viam.app.mltraining.v1.SubmitCustomTrainingJobResponse.prototype.toObject = function(o) {
58672
58713
  return proto.viam.app.mltraining.v1.SubmitCustomTrainingJobResponse.toObject(o, this);
58673
58714
  }, proto.viam.app.mltraining.v1.SubmitCustomTrainingJobResponse.toObject = function(o, r) {
@@ -77536,6 +77577,10 @@ class MlTrainingClient {
77536
77577
  const { service: o } = this, r = new pb$4.SubmitTrainingJobRequest();
77537
77578
  return r.setOrganizationId(e), r.setDatasetId(s), r.setModelName(g), r.setModelVersion(u), r.setModelType(p), r.setTagsList(l), (await promisify(o.submitTrainingJob.bind(o), r)).getId();
77538
77579
  }
77580
+ async submitCustomTrainingJob(e, s, g, u, p, l) {
77581
+ const { service: o } = this, r = new pb$4.SubmitCustomTrainingJobRequest();
77582
+ return r.setOrganizationId(e), r.setDatasetId(s), r.setRegistryItemId(g), r.setRegistryItemVersion(u), r.setModelName(p), r.setModelVersion(l), (await promisify(o.submitCustomTrainingJob.bind(o), r)).getId();
77583
+ }
77539
77584
  async getTrainingJob(e) {
77540
77585
  const { service: s } = this, g = new pb$4.GetTrainingJobRequest();
77541
77586
  return g.setId(e), (await promisify(s.getTrainingJob.bind(s), g)).getMetadata();
@@ -80581,7 +80626,7 @@ class GenericClient {
80581
80626
  return doCommandFromClient(s, this.name, e, this.options);
80582
80627
  }
80583
80628
  }
80584
- const version = "0.23.0";
80629
+ const version = "0.23.1";
80585
80630
  export {
80586
80631
  ArmClient,
80587
80632
  BaseClient,