@viamrobotics/sdk 0.20.0 → 0.22.0-b.0
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/api-version.d.ts +1 -0
- package/dist/app/viam-transport.d.ts +3 -7
- package/dist/gen/google/api/expr/v1alpha1/syntax_pb.d.ts +4 -0
- package/dist/gen/robot/v1/robot_pb.d.ts +49 -0
- package/dist/gen/robot/v1/robot_pb_service.d.ts +19 -0
- package/dist/main.d.ts +1 -1
- package/dist/main.es.js +253 -70
- package/dist/main.umd.js +3 -3
- package/dist/robot/client.d.ts +1 -0
- package/dist/robot/dial.d.ts +6 -0
- package/dist/robot/robot.d.ts +11 -0
- package/dist/utils.d.ts +9 -0
- package/package.json +3 -1
package/dist/main.es.js
CHANGED
|
@@ -10860,7 +10860,7 @@ var duration_pb$1 = {};
|
|
|
10860
10860
|
var o = struct_pb;
|
|
10861
10861
|
s.object.extend(proto, o);
|
|
10862
10862
|
var r = timestamp_pb$1;
|
|
10863
|
-
s.object.extend(proto, r), s.exportSymbol("proto.viam.robot.v1.BlockForOperationRequest", null, g), s.exportSymbol("proto.viam.robot.v1.BlockForOperationResponse", null, g), s.exportSymbol("proto.viam.robot.v1.CancelOperationRequest", null, g), s.exportSymbol("proto.viam.robot.v1.CancelOperationResponse", null, g), s.exportSymbol("proto.viam.robot.v1.ConfigStatus", null, g), s.exportSymbol("proto.viam.robot.v1.DiscoverComponentsRequest", null, g), s.exportSymbol("proto.viam.robot.v1.DiscoverComponentsResponse", null, g), s.exportSymbol("proto.viam.robot.v1.Discovery", null, g), s.exportSymbol("proto.viam.robot.v1.DiscoveryQuery", null, g), s.exportSymbol("proto.viam.robot.v1.FrameSystemConfig", null, g), s.exportSymbol("proto.viam.robot.v1.FrameSystemConfigRequest", null, g), s.exportSymbol("proto.viam.robot.v1.FrameSystemConfigResponse", null, g), s.exportSymbol("proto.viam.robot.v1.GetCloudMetadataRequest", null, g), s.exportSymbol("proto.viam.robot.v1.GetCloudMetadataResponse", null, g), s.exportSymbol("proto.viam.robot.v1.GetMachineStatusRequest", null, g), s.exportSymbol("proto.viam.robot.v1.GetMachineStatusResponse", null, g), s.exportSymbol("proto.viam.robot.v1.GetOperationsRequest", null, g), s.exportSymbol("proto.viam.robot.v1.GetOperationsResponse", null, g), s.exportSymbol("proto.viam.robot.v1.GetSessionsRequest", null, g), s.exportSymbol("proto.viam.robot.v1.GetSessionsResponse", null, g), s.exportSymbol("proto.viam.robot.v1.GetStatusRequest", null, g), s.exportSymbol("proto.viam.robot.v1.GetStatusResponse", null, g), s.exportSymbol("proto.viam.robot.v1.LogRequest", null, g), s.exportSymbol("proto.viam.robot.v1.LogResponse", null, g), s.exportSymbol("proto.viam.robot.v1.Operation", null, g), s.exportSymbol("proto.viam.robot.v1.PeerConnectionInfo", null, g), s.exportSymbol("proto.viam.robot.v1.PeerConnectionType", null, g), s.exportSymbol("proto.viam.robot.v1.ResourceNamesRequest", null, g), s.exportSymbol("proto.viam.robot.v1.ResourceNamesResponse", null, g), s.exportSymbol("proto.viam.robot.v1.ResourceRPCSubtype", null, g), s.exportSymbol("proto.viam.robot.v1.ResourceRPCSubtypesRequest", null, g), s.exportSymbol("proto.viam.robot.v1.ResourceRPCSubtypesResponse", null, g), s.exportSymbol("proto.viam.robot.v1.ResourceStatus", null, g), s.exportSymbol("proto.viam.robot.v1.ResourceStatus.State", null, g), s.exportSymbol("proto.viam.robot.v1.RestartModuleRequest", null, g), s.exportSymbol("proto.viam.robot.v1.RestartModuleRequest.IdOrNameCase", null, g), s.exportSymbol("proto.viam.robot.v1.RestartModuleResponse", null, g), s.exportSymbol("proto.viam.robot.v1.SendSessionHeartbeatRequest", null, g), s.exportSymbol("proto.viam.robot.v1.SendSessionHeartbeatResponse", null, g), s.exportSymbol("proto.viam.robot.v1.Session", null, g), s.exportSymbol("proto.viam.robot.v1.ShutdownRequest", null, g), s.exportSymbol("proto.viam.robot.v1.ShutdownResponse", null, g), s.exportSymbol("proto.viam.robot.v1.StartSessionRequest", null, g), s.exportSymbol("proto.viam.robot.v1.StartSessionResponse", null, g), s.exportSymbol("proto.viam.robot.v1.Status", null, g), s.exportSymbol("proto.viam.robot.v1.StopAllRequest", null, g), s.exportSymbol("proto.viam.robot.v1.StopAllResponse", null, g), s.exportSymbol("proto.viam.robot.v1.StopExtraParameters", null, g), s.exportSymbol("proto.viam.robot.v1.StreamStatusRequest", null, g), s.exportSymbol("proto.viam.robot.v1.StreamStatusResponse", null, g), s.exportSymbol("proto.viam.robot.v1.TransformPCDRequest", null, g), s.exportSymbol("proto.viam.robot.v1.TransformPCDResponse", null, g), s.exportSymbol("proto.viam.robot.v1.TransformPoseRequest", null, g), s.exportSymbol("proto.viam.robot.v1.TransformPoseResponse", null, g), proto.viam.robot.v1.FrameSystemConfig = function(i) {
|
|
10863
|
+
s.object.extend(proto, r), s.exportSymbol("proto.viam.robot.v1.BlockForOperationRequest", null, g), s.exportSymbol("proto.viam.robot.v1.BlockForOperationResponse", null, g), s.exportSymbol("proto.viam.robot.v1.CancelOperationRequest", null, g), s.exportSymbol("proto.viam.robot.v1.CancelOperationResponse", null, g), s.exportSymbol("proto.viam.robot.v1.ConfigStatus", null, g), s.exportSymbol("proto.viam.robot.v1.DiscoverComponentsRequest", null, g), s.exportSymbol("proto.viam.robot.v1.DiscoverComponentsResponse", null, g), s.exportSymbol("proto.viam.robot.v1.Discovery", null, g), s.exportSymbol("proto.viam.robot.v1.DiscoveryQuery", null, g), s.exportSymbol("proto.viam.robot.v1.FrameSystemConfig", null, g), s.exportSymbol("proto.viam.robot.v1.FrameSystemConfigRequest", null, g), s.exportSymbol("proto.viam.robot.v1.FrameSystemConfigResponse", null, g), s.exportSymbol("proto.viam.robot.v1.GetCloudMetadataRequest", null, g), s.exportSymbol("proto.viam.robot.v1.GetCloudMetadataResponse", null, g), s.exportSymbol("proto.viam.robot.v1.GetMachineStatusRequest", null, g), s.exportSymbol("proto.viam.robot.v1.GetMachineStatusResponse", null, g), s.exportSymbol("proto.viam.robot.v1.GetOperationsRequest", null, g), s.exportSymbol("proto.viam.robot.v1.GetOperationsResponse", null, g), s.exportSymbol("proto.viam.robot.v1.GetSessionsRequest", null, g), s.exportSymbol("proto.viam.robot.v1.GetSessionsResponse", null, g), s.exportSymbol("proto.viam.robot.v1.GetStatusRequest", null, g), s.exportSymbol("proto.viam.robot.v1.GetStatusResponse", null, g), s.exportSymbol("proto.viam.robot.v1.GetVersionRequest", null, g), s.exportSymbol("proto.viam.robot.v1.GetVersionResponse", null, g), s.exportSymbol("proto.viam.robot.v1.LogRequest", null, g), s.exportSymbol("proto.viam.robot.v1.LogResponse", null, g), s.exportSymbol("proto.viam.robot.v1.Operation", null, g), s.exportSymbol("proto.viam.robot.v1.PeerConnectionInfo", null, g), s.exportSymbol("proto.viam.robot.v1.PeerConnectionType", null, g), s.exportSymbol("proto.viam.robot.v1.ResourceNamesRequest", null, g), s.exportSymbol("proto.viam.robot.v1.ResourceNamesResponse", null, g), s.exportSymbol("proto.viam.robot.v1.ResourceRPCSubtype", null, g), s.exportSymbol("proto.viam.robot.v1.ResourceRPCSubtypesRequest", null, g), s.exportSymbol("proto.viam.robot.v1.ResourceRPCSubtypesResponse", null, g), s.exportSymbol("proto.viam.robot.v1.ResourceStatus", null, g), s.exportSymbol("proto.viam.robot.v1.ResourceStatus.State", null, g), s.exportSymbol("proto.viam.robot.v1.RestartModuleRequest", null, g), s.exportSymbol("proto.viam.robot.v1.RestartModuleRequest.IdOrNameCase", null, g), s.exportSymbol("proto.viam.robot.v1.RestartModuleResponse", null, g), s.exportSymbol("proto.viam.robot.v1.SendSessionHeartbeatRequest", null, g), s.exportSymbol("proto.viam.robot.v1.SendSessionHeartbeatResponse", null, g), s.exportSymbol("proto.viam.robot.v1.Session", null, g), s.exportSymbol("proto.viam.robot.v1.ShutdownRequest", null, g), s.exportSymbol("proto.viam.robot.v1.ShutdownResponse", null, g), s.exportSymbol("proto.viam.robot.v1.StartSessionRequest", null, g), s.exportSymbol("proto.viam.robot.v1.StartSessionResponse", null, g), s.exportSymbol("proto.viam.robot.v1.Status", null, g), s.exportSymbol("proto.viam.robot.v1.StopAllRequest", null, g), s.exportSymbol("proto.viam.robot.v1.StopAllResponse", null, g), s.exportSymbol("proto.viam.robot.v1.StopExtraParameters", null, g), s.exportSymbol("proto.viam.robot.v1.StreamStatusRequest", null, g), s.exportSymbol("proto.viam.robot.v1.StreamStatusResponse", null, g), s.exportSymbol("proto.viam.robot.v1.TransformPCDRequest", null, g), s.exportSymbol("proto.viam.robot.v1.TransformPCDResponse", null, g), s.exportSymbol("proto.viam.robot.v1.TransformPoseRequest", null, g), s.exportSymbol("proto.viam.robot.v1.TransformPoseResponse", null, g), proto.viam.robot.v1.FrameSystemConfig = function(i) {
|
|
10864
10864
|
e.Message.initialize(this, i, 0, -1, null, null);
|
|
10865
10865
|
}, s.inherits(proto.viam.robot.v1.FrameSystemConfig, e.Message), s.DEBUG && !COMPILED && (proto.viam.robot.v1.FrameSystemConfig.displayName = "proto.viam.robot.v1.FrameSystemConfig"), proto.viam.robot.v1.FrameSystemConfigRequest = function(i) {
|
|
10866
10866
|
e.Message.initialize(this, i, 0, -1, proto.viam.robot.v1.FrameSystemConfigRequest.repeatedFields_, null);
|
|
@@ -10962,7 +10962,11 @@ var duration_pb$1 = {};
|
|
|
10962
10962
|
e.Message.initialize(this, i, 0, -1, null, null);
|
|
10963
10963
|
}, s.inherits(proto.viam.robot.v1.ResourceStatus, e.Message), s.DEBUG && !COMPILED && (proto.viam.robot.v1.ResourceStatus.displayName = "proto.viam.robot.v1.ResourceStatus"), proto.viam.robot.v1.ConfigStatus = function(i) {
|
|
10964
10964
|
e.Message.initialize(this, i, 0, -1, null, null);
|
|
10965
|
-
}, s.inherits(proto.viam.robot.v1.ConfigStatus, e.Message), s.DEBUG && !COMPILED && (proto.viam.robot.v1.ConfigStatus.displayName = "proto.viam.robot.v1.ConfigStatus"),
|
|
10965
|
+
}, s.inherits(proto.viam.robot.v1.ConfigStatus, e.Message), s.DEBUG && !COMPILED && (proto.viam.robot.v1.ConfigStatus.displayName = "proto.viam.robot.v1.ConfigStatus"), proto.viam.robot.v1.GetVersionRequest = function(i) {
|
|
10966
|
+
e.Message.initialize(this, i, 0, -1, null, null);
|
|
10967
|
+
}, s.inherits(proto.viam.robot.v1.GetVersionRequest, e.Message), s.DEBUG && !COMPILED && (proto.viam.robot.v1.GetVersionRequest.displayName = "proto.viam.robot.v1.GetVersionRequest"), proto.viam.robot.v1.GetVersionResponse = function(i) {
|
|
10968
|
+
e.Message.initialize(this, i, 0, -1, null, null);
|
|
10969
|
+
}, s.inherits(proto.viam.robot.v1.GetVersionResponse, e.Message), s.DEBUG && !COMPILED && (proto.viam.robot.v1.GetVersionResponse.displayName = "proto.viam.robot.v1.GetVersionResponse"), e.Message.GENERATE_TO_OBJECT && (proto.viam.robot.v1.FrameSystemConfig.prototype.toObject = function(i) {
|
|
10966
10970
|
return proto.viam.robot.v1.FrameSystemConfig.toObject(i, this);
|
|
10967
10971
|
}, proto.viam.robot.v1.FrameSystemConfig.toObject = function(i, t) {
|
|
10968
10972
|
var c, v = {
|
|
@@ -13444,7 +13448,8 @@ var duration_pb$1 = {};
|
|
|
13444
13448
|
name: (c = t.getName()) && u.ResourceName.toObject(i, c),
|
|
13445
13449
|
state: e.Message.getFieldWithDefault(t, 2, 0),
|
|
13446
13450
|
lastUpdated: (c = t.getLastUpdated()) && r.Timestamp.toObject(i, c),
|
|
13447
|
-
revision: e.Message.getFieldWithDefault(t, 4, "")
|
|
13451
|
+
revision: e.Message.getFieldWithDefault(t, 4, ""),
|
|
13452
|
+
error: e.Message.getFieldWithDefault(t, 5, "")
|
|
13448
13453
|
};
|
|
13449
13454
|
return i && (v.$jspbMessageInstance = t), v;
|
|
13450
13455
|
}), proto.viam.robot.v1.ResourceStatus.deserializeBinary = function(i) {
|
|
@@ -13476,6 +13481,13 @@ var duration_pb$1 = {};
|
|
|
13476
13481
|
);
|
|
13477
13482
|
i.setRevision(v);
|
|
13478
13483
|
break;
|
|
13484
|
+
case 5:
|
|
13485
|
+
var v = (
|
|
13486
|
+
/** @type {string} */
|
|
13487
|
+
t.readString()
|
|
13488
|
+
);
|
|
13489
|
+
i.setError(v);
|
|
13490
|
+
break;
|
|
13479
13491
|
default:
|
|
13480
13492
|
t.skipField();
|
|
13481
13493
|
break;
|
|
@@ -13501,13 +13513,17 @@ var duration_pb$1 = {};
|
|
|
13501
13513
|
), c = i.getRevision(), c.length > 0 && t.writeString(
|
|
13502
13514
|
4,
|
|
13503
13515
|
c
|
|
13516
|
+
), c = i.getError(), c.length > 0 && t.writeString(
|
|
13517
|
+
5,
|
|
13518
|
+
c
|
|
13504
13519
|
);
|
|
13505
13520
|
}, proto.viam.robot.v1.ResourceStatus.State = {
|
|
13506
13521
|
STATE_UNSPECIFIED: 0,
|
|
13507
13522
|
STATE_UNCONFIGURED: 1,
|
|
13508
13523
|
STATE_CONFIGURING: 2,
|
|
13509
13524
|
STATE_READY: 3,
|
|
13510
|
-
STATE_REMOVING: 4
|
|
13525
|
+
STATE_REMOVING: 4,
|
|
13526
|
+
STATE_UNHEALTHY: 5
|
|
13511
13527
|
}, proto.viam.robot.v1.ResourceStatus.prototype.getName = function() {
|
|
13512
13528
|
return (
|
|
13513
13529
|
/** @type{?proto.viam.common.v1.ResourceName} */
|
|
@@ -13544,6 +13560,13 @@ var duration_pb$1 = {};
|
|
|
13544
13560
|
);
|
|
13545
13561
|
}, proto.viam.robot.v1.ResourceStatus.prototype.setRevision = function(i) {
|
|
13546
13562
|
return e.Message.setProto3StringField(this, 4, i);
|
|
13563
|
+
}, proto.viam.robot.v1.ResourceStatus.prototype.getError = function() {
|
|
13564
|
+
return (
|
|
13565
|
+
/** @type {string} */
|
|
13566
|
+
e.Message.getFieldWithDefault(this, 5, "")
|
|
13567
|
+
);
|
|
13568
|
+
}, proto.viam.robot.v1.ResourceStatus.prototype.setError = function(i) {
|
|
13569
|
+
return e.Message.setProto3StringField(this, 5, i);
|
|
13547
13570
|
}, e.Message.GENERATE_TO_OBJECT && (proto.viam.robot.v1.ConfigStatus.prototype.toObject = function(i) {
|
|
13548
13571
|
return proto.viam.robot.v1.ConfigStatus.toObject(i, this);
|
|
13549
13572
|
}, proto.viam.robot.v1.ConfigStatus.toObject = function(i, t) {
|
|
@@ -13607,6 +13630,107 @@ var duration_pb$1 = {};
|
|
|
13607
13630
|
return this.setLastUpdated(void 0);
|
|
13608
13631
|
}, proto.viam.robot.v1.ConfigStatus.prototype.hasLastUpdated = function() {
|
|
13609
13632
|
return e.Message.getField(this, 2) != null;
|
|
13633
|
+
}, e.Message.GENERATE_TO_OBJECT && (proto.viam.robot.v1.GetVersionRequest.prototype.toObject = function(i) {
|
|
13634
|
+
return proto.viam.robot.v1.GetVersionRequest.toObject(i, this);
|
|
13635
|
+
}, proto.viam.robot.v1.GetVersionRequest.toObject = function(i, t) {
|
|
13636
|
+
var c = {};
|
|
13637
|
+
return i && (c.$jspbMessageInstance = t), c;
|
|
13638
|
+
}), proto.viam.robot.v1.GetVersionRequest.deserializeBinary = function(i) {
|
|
13639
|
+
var t = new e.BinaryReader(i), c = new proto.viam.robot.v1.GetVersionRequest();
|
|
13640
|
+
return proto.viam.robot.v1.GetVersionRequest.deserializeBinaryFromReader(c, t);
|
|
13641
|
+
}, proto.viam.robot.v1.GetVersionRequest.deserializeBinaryFromReader = function(i, t) {
|
|
13642
|
+
for (; t.nextField() && !t.isEndGroup(); ) {
|
|
13643
|
+
var c = t.getFieldNumber();
|
|
13644
|
+
switch (c) {
|
|
13645
|
+
default:
|
|
13646
|
+
t.skipField();
|
|
13647
|
+
break;
|
|
13648
|
+
}
|
|
13649
|
+
}
|
|
13650
|
+
return i;
|
|
13651
|
+
}, proto.viam.robot.v1.GetVersionRequest.prototype.serializeBinary = function() {
|
|
13652
|
+
var i = new e.BinaryWriter();
|
|
13653
|
+
return proto.viam.robot.v1.GetVersionRequest.serializeBinaryToWriter(this, i), i.getResultBuffer();
|
|
13654
|
+
}, proto.viam.robot.v1.GetVersionRequest.serializeBinaryToWriter = function(i, t) {
|
|
13655
|
+
}, e.Message.GENERATE_TO_OBJECT && (proto.viam.robot.v1.GetVersionResponse.prototype.toObject = function(i) {
|
|
13656
|
+
return proto.viam.robot.v1.GetVersionResponse.toObject(i, this);
|
|
13657
|
+
}, proto.viam.robot.v1.GetVersionResponse.toObject = function(i, t) {
|
|
13658
|
+
var c = {
|
|
13659
|
+
platform: e.Message.getFieldWithDefault(t, 1, ""),
|
|
13660
|
+
version: e.Message.getFieldWithDefault(t, 2, ""),
|
|
13661
|
+
apiVersion: e.Message.getFieldWithDefault(t, 3, "")
|
|
13662
|
+
};
|
|
13663
|
+
return i && (c.$jspbMessageInstance = t), c;
|
|
13664
|
+
}), proto.viam.robot.v1.GetVersionResponse.deserializeBinary = function(i) {
|
|
13665
|
+
var t = new e.BinaryReader(i), c = new proto.viam.robot.v1.GetVersionResponse();
|
|
13666
|
+
return proto.viam.robot.v1.GetVersionResponse.deserializeBinaryFromReader(c, t);
|
|
13667
|
+
}, proto.viam.robot.v1.GetVersionResponse.deserializeBinaryFromReader = function(i, t) {
|
|
13668
|
+
for (; t.nextField() && !t.isEndGroup(); ) {
|
|
13669
|
+
var c = t.getFieldNumber();
|
|
13670
|
+
switch (c) {
|
|
13671
|
+
case 1:
|
|
13672
|
+
var v = (
|
|
13673
|
+
/** @type {string} */
|
|
13674
|
+
t.readString()
|
|
13675
|
+
);
|
|
13676
|
+
i.setPlatform(v);
|
|
13677
|
+
break;
|
|
13678
|
+
case 2:
|
|
13679
|
+
var v = (
|
|
13680
|
+
/** @type {string} */
|
|
13681
|
+
t.readString()
|
|
13682
|
+
);
|
|
13683
|
+
i.setVersion(v);
|
|
13684
|
+
break;
|
|
13685
|
+
case 3:
|
|
13686
|
+
var v = (
|
|
13687
|
+
/** @type {string} */
|
|
13688
|
+
t.readString()
|
|
13689
|
+
);
|
|
13690
|
+
i.setApiVersion(v);
|
|
13691
|
+
break;
|
|
13692
|
+
default:
|
|
13693
|
+
t.skipField();
|
|
13694
|
+
break;
|
|
13695
|
+
}
|
|
13696
|
+
}
|
|
13697
|
+
return i;
|
|
13698
|
+
}, proto.viam.robot.v1.GetVersionResponse.prototype.serializeBinary = function() {
|
|
13699
|
+
var i = new e.BinaryWriter();
|
|
13700
|
+
return proto.viam.robot.v1.GetVersionResponse.serializeBinaryToWriter(this, i), i.getResultBuffer();
|
|
13701
|
+
}, proto.viam.robot.v1.GetVersionResponse.serializeBinaryToWriter = function(i, t) {
|
|
13702
|
+
var c = void 0;
|
|
13703
|
+
c = i.getPlatform(), c.length > 0 && t.writeString(
|
|
13704
|
+
1,
|
|
13705
|
+
c
|
|
13706
|
+
), c = i.getVersion(), c.length > 0 && t.writeString(
|
|
13707
|
+
2,
|
|
13708
|
+
c
|
|
13709
|
+
), c = i.getApiVersion(), c.length > 0 && t.writeString(
|
|
13710
|
+
3,
|
|
13711
|
+
c
|
|
13712
|
+
);
|
|
13713
|
+
}, proto.viam.robot.v1.GetVersionResponse.prototype.getPlatform = function() {
|
|
13714
|
+
return (
|
|
13715
|
+
/** @type {string} */
|
|
13716
|
+
e.Message.getFieldWithDefault(this, 1, "")
|
|
13717
|
+
);
|
|
13718
|
+
}, proto.viam.robot.v1.GetVersionResponse.prototype.setPlatform = function(i) {
|
|
13719
|
+
return e.Message.setProto3StringField(this, 1, i);
|
|
13720
|
+
}, proto.viam.robot.v1.GetVersionResponse.prototype.getVersion = function() {
|
|
13721
|
+
return (
|
|
13722
|
+
/** @type {string} */
|
|
13723
|
+
e.Message.getFieldWithDefault(this, 2, "")
|
|
13724
|
+
);
|
|
13725
|
+
}, proto.viam.robot.v1.GetVersionResponse.prototype.setVersion = function(i) {
|
|
13726
|
+
return e.Message.setProto3StringField(this, 2, i);
|
|
13727
|
+
}, proto.viam.robot.v1.GetVersionResponse.prototype.getApiVersion = function() {
|
|
13728
|
+
return (
|
|
13729
|
+
/** @type {string} */
|
|
13730
|
+
e.Message.getFieldWithDefault(this, 3, "")
|
|
13731
|
+
);
|
|
13732
|
+
}, proto.viam.robot.v1.GetVersionResponse.prototype.setApiVersion = function(i) {
|
|
13733
|
+
return e.Message.setProto3StringField(this, 3, i);
|
|
13610
13734
|
}, proto.viam.robot.v1.PeerConnectionType = {
|
|
13611
13735
|
PEER_CONNECTION_TYPE_UNSPECIFIED: 0,
|
|
13612
13736
|
PEER_CONNECTION_TYPE_GRPC: 1,
|
|
@@ -40699,6 +40823,14 @@ RobotService.GetMachineStatus = {
|
|
|
40699
40823
|
requestType: robot_v1_robot_pb.GetMachineStatusRequest,
|
|
40700
40824
|
responseType: robot_v1_robot_pb.GetMachineStatusResponse
|
|
40701
40825
|
};
|
|
40826
|
+
RobotService.GetVersion = {
|
|
40827
|
+
methodName: "GetVersion",
|
|
40828
|
+
service: RobotService,
|
|
40829
|
+
requestStream: !1,
|
|
40830
|
+
responseStream: !1,
|
|
40831
|
+
requestType: robot_v1_robot_pb.GetVersionRequest,
|
|
40832
|
+
responseType: robot_v1_robot_pb.GetVersionResponse
|
|
40833
|
+
};
|
|
40702
40834
|
function RobotServiceClient(n, e) {
|
|
40703
40835
|
this.serviceHost = n, this.options = e || {};
|
|
40704
40836
|
}
|
|
@@ -41172,6 +41304,29 @@ RobotServiceClient.prototype.getMachineStatus = function n(e, s, g) {
|
|
|
41172
41304
|
}
|
|
41173
41305
|
};
|
|
41174
41306
|
};
|
|
41307
|
+
RobotServiceClient.prototype.getVersion = function n(e, s, g) {
|
|
41308
|
+
arguments.length === 2 && (g = arguments[1]);
|
|
41309
|
+
var u = grpc$i.unary(RobotService.GetVersion, {
|
|
41310
|
+
request: e,
|
|
41311
|
+
host: this.serviceHost,
|
|
41312
|
+
metadata: s,
|
|
41313
|
+
transport: this.options.transport,
|
|
41314
|
+
debug: this.options.debug,
|
|
41315
|
+
onEnd: function(p) {
|
|
41316
|
+
if (g)
|
|
41317
|
+
if (p.status !== grpc$i.Code.OK) {
|
|
41318
|
+
var l = new Error(p.statusMessage);
|
|
41319
|
+
l.code = p.status, l.metadata = p.trailers, g(l, null);
|
|
41320
|
+
} else
|
|
41321
|
+
g(null, p.message);
|
|
41322
|
+
}
|
|
41323
|
+
});
|
|
41324
|
+
return {
|
|
41325
|
+
cancel: function() {
|
|
41326
|
+
g = null, u.close();
|
|
41327
|
+
}
|
|
41328
|
+
};
|
|
41329
|
+
};
|
|
41175
41330
|
var RobotServiceClient_1 = RobotServiceClient, motion_pb = {};
|
|
41176
41331
|
(function(n) {
|
|
41177
41332
|
var e = googleProtobuf$1, s = e, g = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof g < "u" && g || typeof self < "u" && self || function() {
|
|
@@ -49705,7 +49860,7 @@ class ViamResponseStream extends EventDispatcher {
|
|
|
49705
49860
|
this.listeners = {}, this.stream.cancel();
|
|
49706
49861
|
}
|
|
49707
49862
|
}
|
|
49708
|
-
const promisify = async (n, e) => new Promise((s, g) => {
|
|
49863
|
+
const apiVersion = "v0.1.331", promisify = async (n, e) => new Promise((s, g) => {
|
|
49709
49864
|
n(e, new grpcWebClient_umdExports$1.grpc.Metadata(), (u, p) => {
|
|
49710
49865
|
if (u) {
|
|
49711
49866
|
g(u);
|
|
@@ -49768,7 +49923,32 @@ const promisify = async (n, e) => new Promise((s, g) => {
|
|
|
49768
49923
|
}, encodeGeoGeometry = (n) => {
|
|
49769
49924
|
const e = new common.GeoGeometry();
|
|
49770
49925
|
return n.location && e.setLocation(encodeGeoPoint(n.location)), e.setGeometriesList(n.geometriesList.map((s) => encodeGeometry(s))), e;
|
|
49771
|
-
}
|
|
49926
|
+
};
|
|
49927
|
+
class MetadataTransport {
|
|
49928
|
+
metadata;
|
|
49929
|
+
transport;
|
|
49930
|
+
constructor(e, s, g) {
|
|
49931
|
+
this.transport = e(s), this.metadata = g ?? new grpcWebClient_umdExports$1.grpc.Metadata(), this.metadata.set(
|
|
49932
|
+
"viam-client",
|
|
49933
|
+
`typescript;v0.22.0-b.0;${apiVersion}`
|
|
49934
|
+
);
|
|
49935
|
+
}
|
|
49936
|
+
start(e) {
|
|
49937
|
+
this.metadata.forEach((s, g) => {
|
|
49938
|
+
e.set(s, g);
|
|
49939
|
+
}), this.transport.start(e);
|
|
49940
|
+
}
|
|
49941
|
+
sendMessage(e) {
|
|
49942
|
+
this.transport.sendMessage(e);
|
|
49943
|
+
}
|
|
49944
|
+
finishSend() {
|
|
49945
|
+
this.transport.finishSend();
|
|
49946
|
+
}
|
|
49947
|
+
cancel() {
|
|
49948
|
+
this.transport.cancel();
|
|
49949
|
+
}
|
|
49950
|
+
}
|
|
49951
|
+
const timeoutBlob$1 = new Blob(
|
|
49772
49952
|
[
|
|
49773
49953
|
`self.onmessage = function(e) {
|
|
49774
49954
|
setTimeout(() => self.postMessage(""), e.data);
|
|
@@ -50208,81 +50388,84 @@ class RobotClient extends EventDispatcher {
|
|
|
50208
50388
|
};
|
|
50209
50389
|
if (g !== void 0 && p.webrtcOptions && (p.webrtcOptions.additionalSdpFields = { "x-priority": g }), this.savedAuthEntity = e, this.savedCreds = s, this.webrtcOptions?.enabled) {
|
|
50210
50390
|
p.webrtcOptions && (p.webrtcOptions.signalingAuthEntity = p.authEntity, p.webrtcOptions.signalingCredentials = p.credentials);
|
|
50211
|
-
const
|
|
50391
|
+
const i = await dialWebRTC$1(
|
|
50212
50392
|
this.webrtcOptions.signalingAddress || this.serviceHost,
|
|
50213
50393
|
this.webrtcOptions.host,
|
|
50214
50394
|
p
|
|
50215
50395
|
);
|
|
50216
|
-
this.peerConn =
|
|
50396
|
+
this.peerConn = i.peerConnection, this.peerConn.addEventListener("iceconnectionstatechange", () => {
|
|
50217
50397
|
this.peerConn?.iceConnectionState === "connected" ? this.emit(MachineConnectionEvent.CONNECTED, {}) : this.peerConn?.iceConnectionState === "closed" && this.onDisconnect();
|
|
50218
|
-
}),
|
|
50219
|
-
this.onDisconnect(
|
|
50220
|
-
}), this.transportFactory =
|
|
50221
|
-
const [
|
|
50222
|
-
if (!
|
|
50223
|
-
throw this.emit("track",
|
|
50224
|
-
const
|
|
50225
|
-
Object.defineProperty(
|
|
50226
|
-
value:
|
|
50227
|
-
}), this.emit("track",
|
|
50398
|
+
}), i.dataChannel.addEventListener("close", (t) => {
|
|
50399
|
+
this.onDisconnect(t);
|
|
50400
|
+
}), this.transportFactory = i.transportFactory, i.peerConnection.addEventListener("track", (t) => {
|
|
50401
|
+
const [c] = t.streams;
|
|
50402
|
+
if (!c)
|
|
50403
|
+
throw this.emit("track", t), new Error("expected event stream to exist");
|
|
50404
|
+
const v = c.id.replaceAll("+", ":");
|
|
50405
|
+
Object.defineProperty(c, "id", {
|
|
50406
|
+
value: v
|
|
50407
|
+
}), this.emit("track", t);
|
|
50228
50408
|
});
|
|
50229
50409
|
} else
|
|
50230
50410
|
this.transportFactory = await dialDirect$1(this.serviceHost, p), await this.gRPCConnectionManager.start();
|
|
50231
|
-
const
|
|
50411
|
+
const r = { transport: (i) => {
|
|
50412
|
+
const t = this.sessionOptions?.disabled ? this.transportFactory : this.sessionManager.transportFactory;
|
|
50413
|
+
return new MetadataTransport(t, i);
|
|
50414
|
+
} };
|
|
50232
50415
|
this.robotServiceClient = new RobotServiceClient_1(
|
|
50233
50416
|
this.serviceHost,
|
|
50234
|
-
|
|
50417
|
+
r
|
|
50235
50418
|
), this.armServiceClient = new ArmServiceClient_1(
|
|
50236
50419
|
this.serviceHost,
|
|
50237
|
-
|
|
50420
|
+
r
|
|
50238
50421
|
), this.baseServiceClient = new BaseServiceClient_1(
|
|
50239
50422
|
this.serviceHost,
|
|
50240
|
-
|
|
50423
|
+
r
|
|
50241
50424
|
), this.boardServiceClient = new BoardServiceClient_1(
|
|
50242
50425
|
this.serviceHost,
|
|
50243
|
-
|
|
50426
|
+
r
|
|
50244
50427
|
), this.encoderServiceClient = new EncoderServiceClient_1(
|
|
50245
50428
|
this.serviceHost,
|
|
50246
|
-
|
|
50429
|
+
r
|
|
50247
50430
|
), this.gantryServiceClient = new GantryServiceClient_1(
|
|
50248
50431
|
this.serviceHost,
|
|
50249
|
-
|
|
50432
|
+
r
|
|
50250
50433
|
), this.genericServiceClient = new GenericServiceClient_1$1(
|
|
50251
50434
|
this.serviceHost,
|
|
50252
|
-
|
|
50435
|
+
r
|
|
50253
50436
|
), this.gripperServiceClient = new GripperServiceClient_1(
|
|
50254
50437
|
this.serviceHost,
|
|
50255
|
-
|
|
50438
|
+
r
|
|
50256
50439
|
), this.movementSensorServiceClient = new MovementSensorServiceClient_1(
|
|
50257
50440
|
this.serviceHost,
|
|
50258
|
-
|
|
50441
|
+
r
|
|
50259
50442
|
), this.powerSensorServiceClient = new PowerSensorServiceClient_1(
|
|
50260
50443
|
this.serviceHost,
|
|
50261
|
-
|
|
50444
|
+
r
|
|
50262
50445
|
), this.inputControllerServiceClient = new InputControllerServiceClient_1(
|
|
50263
50446
|
this.serviceHost,
|
|
50264
|
-
|
|
50447
|
+
r
|
|
50265
50448
|
), this.motorServiceClient = new MotorServiceClient_1(
|
|
50266
50449
|
this.serviceHost,
|
|
50267
|
-
|
|
50450
|
+
r
|
|
50268
50451
|
), this.navigationServiceClient = new NavigationServiceClient_1(
|
|
50269
50452
|
this.serviceHost,
|
|
50270
|
-
|
|
50453
|
+
r
|
|
50271
50454
|
), this.motionServiceClient = new MotionServiceClient_1(
|
|
50272
50455
|
this.serviceHost,
|
|
50273
|
-
|
|
50456
|
+
r
|
|
50274
50457
|
), this.visionServiceClient = new VisionServiceClient_1(
|
|
50275
50458
|
this.serviceHost,
|
|
50276
|
-
|
|
50459
|
+
r
|
|
50277
50460
|
), this.sensorsServiceClient = new SensorsServiceClient_1(
|
|
50278
50461
|
this.serviceHost,
|
|
50279
|
-
|
|
50462
|
+
r
|
|
50280
50463
|
), this.servoServiceClient = new ServoServiceClient_1(
|
|
50281
50464
|
this.serviceHost,
|
|
50282
|
-
|
|
50465
|
+
r
|
|
50283
50466
|
), this.slamServiceClient = new SLAMServiceClient_1(
|
|
50284
50467
|
this.serviceHost,
|
|
50285
|
-
|
|
50468
|
+
r
|
|
50286
50469
|
), this.emit(MachineConnectionEvent.CONNECTED, {});
|
|
50287
50470
|
} catch (p) {
|
|
50288
50471
|
throw this.emit(MachineConnectionEvent.DISCONNECTED, {}), p;
|
|
@@ -50367,6 +50550,14 @@ class RobotClient extends EventDispatcher {
|
|
|
50367
50550
|
o.emit("end", r);
|
|
50368
50551
|
}), o;
|
|
50369
50552
|
}
|
|
50553
|
+
// MODULES
|
|
50554
|
+
async restartModule(e, s) {
|
|
50555
|
+
const { robotService: g } = this, u = new proto$1.RestartModuleRequest();
|
|
50556
|
+
e !== void 0 && u.setModuleId(e), s !== void 0 && u.setModuleName(s), await promisify(
|
|
50557
|
+
g.restartModule.bind(g),
|
|
50558
|
+
u
|
|
50559
|
+
);
|
|
50560
|
+
}
|
|
50370
50561
|
}
|
|
50371
50562
|
const isPosInt = (n) => !!(n > 0 && Number.isInteger(n)), isLocalConnection = (n) => n.includes("local"), dialDirect = async (n) => {
|
|
50372
50563
|
if (console.debug("dialing via gRPC..."), !isLocalConnection(n.host))
|
|
@@ -50416,19 +50607,20 @@ const isPosInt = (n) => !!(n > 0 && Number.isInteger(n)), isLocalConnection = (n
|
|
|
50416
50607
|
const e = {
|
|
50417
50608
|
maxDelay: n.reconnectMaxWait,
|
|
50418
50609
|
numOfAttempts: n.reconnectMaxAttempts,
|
|
50419
|
-
retry: (s, g) => (console.debug(`Failed to connect, attempt ${g} with backoff`), !
|
|
50610
|
+
retry: (s, g) => (console.debug(`Failed to connect, attempt ${g} with backoff`), !n.reconnectAbortSignal?.abort)
|
|
50420
50611
|
};
|
|
50421
|
-
if (isDialWebRTCConf(n))
|
|
50612
|
+
if (isDialWebRTCConf(n) && !n.reconnectAbortSignal?.abort)
|
|
50422
50613
|
try {
|
|
50423
50614
|
return n.noReconnect ? await dialWebRTC(n) : await backOff_1(async () => dialWebRTC(n), e);
|
|
50424
50615
|
} catch {
|
|
50425
50616
|
console.debug("Failed to connect via WebRTC");
|
|
50426
50617
|
}
|
|
50427
|
-
|
|
50428
|
-
|
|
50429
|
-
|
|
50430
|
-
|
|
50431
|
-
|
|
50618
|
+
if (!n.reconnectAbortSignal?.abort)
|
|
50619
|
+
try {
|
|
50620
|
+
return n.noReconnect ? await dialDirect(n) : await backOff_1(async () => dialDirect(n), e);
|
|
50621
|
+
} catch {
|
|
50622
|
+
console.debug("Failed to connect via gRPC");
|
|
50623
|
+
}
|
|
50432
50624
|
throw new Error("Failed to connect to robot");
|
|
50433
50625
|
}, validateDialConf = (n) => {
|
|
50434
50626
|
if (n.authEntity)
|
|
@@ -50798,10 +50990,7 @@ ExternalAuthServiceClient.prototype.authenticateTo = function n(e, s, g) {
|
|
|
50798
50990
|
const isCredential = (n) => "authEntity" in n, createViamTransportFactory = async (n, e) => e.type === "access-token" ? createWithAccessToken(n, e) : createWithCredential(n, e), createWithAccessToken = async (n, e) => {
|
|
50799
50991
|
const s = await dialDirect$1(n);
|
|
50800
50992
|
return (g) => new ViamTransport(s, g, e.payload);
|
|
50801
|
-
},
|
|
50802
|
-
const s = await dialDirect$1(n), g = new AuthServiceClient_1(n, {
|
|
50803
|
-
transport: s
|
|
50804
|
-
});
|
|
50993
|
+
}, getAccessTokenFromCredential = async (n, e) => {
|
|
50805
50994
|
if (e.type === "robot-secret")
|
|
50806
50995
|
throw new Error(
|
|
50807
50996
|
"credential type cannot be 'robot-secret'. Must be either 'robot-location-secret' or 'api-key'."
|
|
@@ -50810,11 +50999,12 @@ const isCredential = (n) => "authEntity" in n, createViamTransportFactory = asyn
|
|
|
50810
50999
|
throw new Error(
|
|
50811
51000
|
"auth entity cannot be null, undefined, or an empty value."
|
|
50812
51001
|
);
|
|
50813
|
-
const
|
|
51002
|
+
const s = await dialDirect$1(n), g = new AuthServiceClient_1(n, {
|
|
51003
|
+
transport: s
|
|
51004
|
+
}), u = e.authEntity, p = new auth_pb.Credentials();
|
|
50814
51005
|
p.setType(e.type), p.setPayload(e.payload);
|
|
50815
51006
|
const l = new auth_pb.AuthenticateRequest();
|
|
50816
|
-
l.setEntity(u), l.setCredentials(p)
|
|
50817
|
-
const o = await new Promise((r, i) => {
|
|
51007
|
+
return l.setEntity(u), l.setCredentials(p), { type: "access-token", payload: await new Promise((r, i) => {
|
|
50818
51008
|
g.authenticate(l, new grpcWebClient_umdExports$1.grpc.Metadata(), (t, c) => {
|
|
50819
51009
|
if (t) {
|
|
50820
51010
|
i(t);
|
|
@@ -50822,26 +51012,18 @@ const isCredential = (n) => "authEntity" in n, createViamTransportFactory = asyn
|
|
|
50822
51012
|
}
|
|
50823
51013
|
r(c?.getAccessToken().toString() ?? "");
|
|
50824
51014
|
});
|
|
50825
|
-
});
|
|
50826
|
-
|
|
51015
|
+
}) };
|
|
51016
|
+
}, createWithCredential = async (n, e) => {
|
|
51017
|
+
const s = await getAccessTokenFromCredential(
|
|
51018
|
+
n,
|
|
51019
|
+
e
|
|
51020
|
+
), g = await dialDirect$1(n);
|
|
51021
|
+
return (u) => new ViamTransport(g, u, s.payload);
|
|
50827
51022
|
};
|
|
50828
|
-
class ViamTransport {
|
|
50829
|
-
accessToken;
|
|
50830
|
-
transport;
|
|
51023
|
+
class ViamTransport extends MetadataTransport {
|
|
50831
51024
|
constructor(e, s, g) {
|
|
50832
|
-
|
|
50833
|
-
|
|
50834
|
-
start(e) {
|
|
50835
|
-
e.set("authorization", `Bearer ${this.accessToken}`), this.transport.start(e);
|
|
50836
|
-
}
|
|
50837
|
-
sendMessage(e) {
|
|
50838
|
-
this.transport.sendMessage(e);
|
|
50839
|
-
}
|
|
50840
|
-
finishSend() {
|
|
50841
|
-
this.transport.finishSend();
|
|
50842
|
-
}
|
|
50843
|
-
cancel() {
|
|
50844
|
-
this.transport.cancel();
|
|
51025
|
+
const u = new grpcWebClient_umdExports$1.grpc.Metadata({ authorization: `Bearer ${g}` });
|
|
51026
|
+
super(e, s, u);
|
|
50845
51027
|
}
|
|
50846
51028
|
}
|
|
50847
51029
|
var data_pb = {};
|
|
@@ -80006,7 +80188,7 @@ class GenericClient {
|
|
|
80006
80188
|
return doCommandFromClient(s, this.name, e, this.options);
|
|
80007
80189
|
}
|
|
80008
80190
|
}
|
|
80009
|
-
const version = "0.
|
|
80191
|
+
const version = "0.22.0-b.0";
|
|
80010
80192
|
export {
|
|
80011
80193
|
ArmClient,
|
|
80012
80194
|
BaseClient,
|
|
@@ -80052,6 +80234,7 @@ export {
|
|
|
80052
80234
|
generic_pb$1 as genericApi,
|
|
80053
80235
|
generic_pb$1 as genericComponentApi,
|
|
80054
80236
|
generic_pb as genericServiceApi,
|
|
80237
|
+
getAccessTokenFromCredential,
|
|
80055
80238
|
pb$d as gripperApi,
|
|
80056
80239
|
input_controller_pb as inputControllerApi,
|
|
80057
80240
|
isValidGeoPoint,
|