@viamrobotics/sdk 0.10.1 → 0.10.2-next.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/README.md +1 -0
- package/dist/gen/app/v1/robot_pb.d.ts +8 -0
- package/dist/gen/robot/v1/robot_pb.d.ts +44 -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 +155 -14
- package/dist/main.umd.js +3 -3
- package/dist/robot/client.d.ts +1 -0
- package/dist/robot/robot.d.ts +8 -0
- package/dist/robot.d.ts +1 -1
- package/dist/services/motion/client.d.ts +2 -2
- package/dist/services/motion/motion.d.ts +3 -2
- package/dist/services/motion/types.d.ts +2 -2
- package/dist/utils.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,6 +10,7 @@ Build and connect to robots with TypeScript
|
|
|
10
10
|
|
|
11
11
|
> **Warning**
|
|
12
12
|
> This is a beta release of the Viam TypeScript SDK. Stability is not guaranteed. Breaking changes are likely to occur, and occur often.
|
|
13
|
+
> TS SDK only works in a browser environment.
|
|
13
14
|
|
|
14
15
|
## Usage
|
|
15
16
|
|
|
@@ -163,6 +163,12 @@ export class CloudConfig extends jspb.Message {
|
|
|
163
163
|
setLocationSecretsList(value: Array<LocationSecret>): void;
|
|
164
164
|
addLocationSecrets(value?: LocationSecret, index?: number): LocationSecret;
|
|
165
165
|
|
|
166
|
+
getPrimaryOrgId(): string;
|
|
167
|
+
setPrimaryOrgId(value: string): void;
|
|
168
|
+
|
|
169
|
+
getLocationId(): string;
|
|
170
|
+
setLocationId(value: string): void;
|
|
171
|
+
|
|
166
172
|
serializeBinary(): Uint8Array;
|
|
167
173
|
toObject(includeInstance?: boolean): CloudConfig.AsObject;
|
|
168
174
|
static toObject(includeInstance: boolean, msg: CloudConfig): CloudConfig.AsObject;
|
|
@@ -184,6 +190,8 @@ export namespace CloudConfig {
|
|
|
184
190
|
locationSecret: string,
|
|
185
191
|
secret: string,
|
|
186
192
|
locationSecretsList: Array<LocationSecret.AsObject>,
|
|
193
|
+
primaryOrgId: string,
|
|
194
|
+
locationId: string,
|
|
187
195
|
}
|
|
188
196
|
}
|
|
189
197
|
|
|
@@ -946,6 +946,50 @@ export namespace LogResponse {
|
|
|
946
946
|
}
|
|
947
947
|
}
|
|
948
948
|
|
|
949
|
+
export class GetCloudMetadataRequest extends jspb.Message {
|
|
950
|
+
serializeBinary(): Uint8Array;
|
|
951
|
+
toObject(includeInstance?: boolean): GetCloudMetadataRequest.AsObject;
|
|
952
|
+
static toObject(includeInstance: boolean, msg: GetCloudMetadataRequest): GetCloudMetadataRequest.AsObject;
|
|
953
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
954
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
955
|
+
static serializeBinaryToWriter(message: GetCloudMetadataRequest, writer: jspb.BinaryWriter): void;
|
|
956
|
+
static deserializeBinary(bytes: Uint8Array): GetCloudMetadataRequest;
|
|
957
|
+
static deserializeBinaryFromReader(message: GetCloudMetadataRequest, reader: jspb.BinaryReader): GetCloudMetadataRequest;
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
export namespace GetCloudMetadataRequest {
|
|
961
|
+
export type AsObject = {
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
export class GetCloudMetadataResponse extends jspb.Message {
|
|
966
|
+
getRobotPartId(): string;
|
|
967
|
+
setRobotPartId(value: string): void;
|
|
968
|
+
|
|
969
|
+
getPrimaryOrgId(): string;
|
|
970
|
+
setPrimaryOrgId(value: string): void;
|
|
971
|
+
|
|
972
|
+
getLocationId(): string;
|
|
973
|
+
setLocationId(value: string): void;
|
|
974
|
+
|
|
975
|
+
serializeBinary(): Uint8Array;
|
|
976
|
+
toObject(includeInstance?: boolean): GetCloudMetadataResponse.AsObject;
|
|
977
|
+
static toObject(includeInstance: boolean, msg: GetCloudMetadataResponse): GetCloudMetadataResponse.AsObject;
|
|
978
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
979
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
980
|
+
static serializeBinaryToWriter(message: GetCloudMetadataResponse, writer: jspb.BinaryWriter): void;
|
|
981
|
+
static deserializeBinary(bytes: Uint8Array): GetCloudMetadataResponse;
|
|
982
|
+
static deserializeBinaryFromReader(message: GetCloudMetadataResponse, reader: jspb.BinaryReader): GetCloudMetadataResponse;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
export namespace GetCloudMetadataResponse {
|
|
986
|
+
export type AsObject = {
|
|
987
|
+
robotPartId: string,
|
|
988
|
+
primaryOrgId: string,
|
|
989
|
+
locationId: string,
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
|
|
949
993
|
export interface PeerConnectionTypeMap {
|
|
950
994
|
PEER_CONNECTION_TYPE_UNSPECIFIED: 0;
|
|
951
995
|
PEER_CONNECTION_TYPE_GRPC: 1;
|
|
@@ -148,6 +148,15 @@ type RobotServiceLog = {
|
|
|
148
148
|
readonly responseType: typeof robot_v1_robot_pb.LogResponse;
|
|
149
149
|
};
|
|
150
150
|
|
|
151
|
+
type RobotServiceGetCloudMetadata = {
|
|
152
|
+
readonly methodName: string;
|
|
153
|
+
readonly service: typeof RobotService;
|
|
154
|
+
readonly requestStream: false;
|
|
155
|
+
readonly responseStream: false;
|
|
156
|
+
readonly requestType: typeof robot_v1_robot_pb.GetCloudMetadataRequest;
|
|
157
|
+
readonly responseType: typeof robot_v1_robot_pb.GetCloudMetadataResponse;
|
|
158
|
+
};
|
|
159
|
+
|
|
151
160
|
export class RobotService {
|
|
152
161
|
static readonly serviceName: string;
|
|
153
162
|
static readonly GetOperations: RobotServiceGetOperations;
|
|
@@ -166,6 +175,7 @@ export class RobotService {
|
|
|
166
175
|
static readonly StartSession: RobotServiceStartSession;
|
|
167
176
|
static readonly SendSessionHeartbeat: RobotServiceSendSessionHeartbeat;
|
|
168
177
|
static readonly Log: RobotServiceLog;
|
|
178
|
+
static readonly GetCloudMetadata: RobotServiceGetCloudMetadata;
|
|
169
179
|
}
|
|
170
180
|
|
|
171
181
|
export type ServiceError = { message: string, code: number; metadata: grpc.Metadata }
|
|
@@ -336,5 +346,14 @@ export class RobotServiceClient {
|
|
|
336
346
|
requestMessage: robot_v1_robot_pb.LogRequest,
|
|
337
347
|
callback: (error: ServiceError|null, responseMessage: robot_v1_robot_pb.LogResponse|null) => void
|
|
338
348
|
): UnaryResponse;
|
|
349
|
+
getCloudMetadata(
|
|
350
|
+
requestMessage: robot_v1_robot_pb.GetCloudMetadataRequest,
|
|
351
|
+
metadata: grpc.Metadata,
|
|
352
|
+
callback: (error: ServiceError|null, responseMessage: robot_v1_robot_pb.GetCloudMetadataResponse|null) => void
|
|
353
|
+
): UnaryResponse;
|
|
354
|
+
getCloudMetadata(
|
|
355
|
+
requestMessage: robot_v1_robot_pb.GetCloudMetadataRequest,
|
|
356
|
+
callback: (error: ServiceError|null, responseMessage: robot_v1_robot_pb.GetCloudMetadataResponse|null) => void
|
|
357
|
+
): UnaryResponse;
|
|
339
358
|
}
|
|
340
359
|
|
package/dist/main.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare const version: string;
|
|
|
9
9
|
* @group Raw Protobufs
|
|
10
10
|
*/
|
|
11
11
|
export { default as robotApi } from './gen/robot/v1/robot_pb';
|
|
12
|
-
export { type Robot, type DialConf, type DialDirectConf, type DialWebRTCConf, type RobotStatusStream, RobotClient, createRobotClient, } from './robot';
|
|
12
|
+
export { type Robot, type DialConf, type DialDirectConf, type DialWebRTCConf, type RobotStatusStream, type CloudMetadata, RobotClient, createRobotClient, } from './robot';
|
|
13
13
|
/**
|
|
14
14
|
* @deprecated Use {@link RobotClient} instead.
|
|
15
15
|
* @group Clients
|
package/dist/main.es.js
CHANGED
|
@@ -11015,7 +11015,7 @@ var duration_pb$1 = {};
|
|
|
11015
11015
|
var t = struct_pb;
|
|
11016
11016
|
n.object.extend(proto, t);
|
|
11017
11017
|
var r = timestamp_pb$1;
|
|
11018
|
-
n.object.extend(proto, r), n.exportSymbol("proto.viam.robot.v1.BlockForOperationRequest", null, g), n.exportSymbol("proto.viam.robot.v1.BlockForOperationResponse", null, g), n.exportSymbol("proto.viam.robot.v1.CancelOperationRequest", null, g), n.exportSymbol("proto.viam.robot.v1.CancelOperationResponse", null, g), n.exportSymbol("proto.viam.robot.v1.DiscoverComponentsRequest", null, g), n.exportSymbol("proto.viam.robot.v1.DiscoverComponentsResponse", null, g), n.exportSymbol("proto.viam.robot.v1.Discovery", null, g), n.exportSymbol("proto.viam.robot.v1.DiscoveryQuery", null, g), n.exportSymbol("proto.viam.robot.v1.FrameSystemConfig", null, g), n.exportSymbol("proto.viam.robot.v1.FrameSystemConfigRequest", null, g), n.exportSymbol("proto.viam.robot.v1.FrameSystemConfigResponse", null, g), n.exportSymbol("proto.viam.robot.v1.GetOperationsRequest", null, g), n.exportSymbol("proto.viam.robot.v1.GetOperationsResponse", null, g), n.exportSymbol("proto.viam.robot.v1.GetSessionsRequest", null, g), n.exportSymbol("proto.viam.robot.v1.GetSessionsResponse", null, g), n.exportSymbol("proto.viam.robot.v1.GetStatusRequest", null, g), n.exportSymbol("proto.viam.robot.v1.GetStatusResponse", null, g), n.exportSymbol("proto.viam.robot.v1.LogRequest", null, g), n.exportSymbol("proto.viam.robot.v1.LogResponse", null, g), n.exportSymbol("proto.viam.robot.v1.Operation", null, g), n.exportSymbol("proto.viam.robot.v1.PeerConnectionInfo", null, g), n.exportSymbol("proto.viam.robot.v1.PeerConnectionType", null, g), n.exportSymbol("proto.viam.robot.v1.ResourceNamesRequest", null, g), n.exportSymbol("proto.viam.robot.v1.ResourceNamesResponse", null, g), n.exportSymbol("proto.viam.robot.v1.ResourceRPCSubtype", null, g), n.exportSymbol("proto.viam.robot.v1.ResourceRPCSubtypesRequest", null, g), n.exportSymbol("proto.viam.robot.v1.ResourceRPCSubtypesResponse", null, g), n.exportSymbol("proto.viam.robot.v1.SendSessionHeartbeatRequest", null, g), n.exportSymbol("proto.viam.robot.v1.SendSessionHeartbeatResponse", null, g), n.exportSymbol("proto.viam.robot.v1.Session", null, g), n.exportSymbol("proto.viam.robot.v1.StartSessionRequest", null, g), n.exportSymbol("proto.viam.robot.v1.StartSessionResponse", null, g), n.exportSymbol("proto.viam.robot.v1.Status", null, g), n.exportSymbol("proto.viam.robot.v1.StopAllRequest", null, g), n.exportSymbol("proto.viam.robot.v1.StopAllResponse", null, g), n.exportSymbol("proto.viam.robot.v1.StopExtraParameters", null, g), n.exportSymbol("proto.viam.robot.v1.StreamStatusRequest", null, g), n.exportSymbol("proto.viam.robot.v1.StreamStatusResponse", null, g), n.exportSymbol("proto.viam.robot.v1.TransformPCDRequest", null, g), n.exportSymbol("proto.viam.robot.v1.TransformPCDResponse", null, g), n.exportSymbol("proto.viam.robot.v1.TransformPoseRequest", null, g), n.exportSymbol("proto.viam.robot.v1.TransformPoseResponse", null, g), proto.viam.robot.v1.FrameSystemConfig = function(i) {
|
|
11018
|
+
n.object.extend(proto, r), n.exportSymbol("proto.viam.robot.v1.BlockForOperationRequest", null, g), n.exportSymbol("proto.viam.robot.v1.BlockForOperationResponse", null, g), n.exportSymbol("proto.viam.robot.v1.CancelOperationRequest", null, g), n.exportSymbol("proto.viam.robot.v1.CancelOperationResponse", null, g), n.exportSymbol("proto.viam.robot.v1.DiscoverComponentsRequest", null, g), n.exportSymbol("proto.viam.robot.v1.DiscoverComponentsResponse", null, g), n.exportSymbol("proto.viam.robot.v1.Discovery", null, g), n.exportSymbol("proto.viam.robot.v1.DiscoveryQuery", null, g), n.exportSymbol("proto.viam.robot.v1.FrameSystemConfig", null, g), n.exportSymbol("proto.viam.robot.v1.FrameSystemConfigRequest", null, g), n.exportSymbol("proto.viam.robot.v1.FrameSystemConfigResponse", null, g), n.exportSymbol("proto.viam.robot.v1.GetCloudMetadataRequest", null, g), n.exportSymbol("proto.viam.robot.v1.GetCloudMetadataResponse", null, g), n.exportSymbol("proto.viam.robot.v1.GetOperationsRequest", null, g), n.exportSymbol("proto.viam.robot.v1.GetOperationsResponse", null, g), n.exportSymbol("proto.viam.robot.v1.GetSessionsRequest", null, g), n.exportSymbol("proto.viam.robot.v1.GetSessionsResponse", null, g), n.exportSymbol("proto.viam.robot.v1.GetStatusRequest", null, g), n.exportSymbol("proto.viam.robot.v1.GetStatusResponse", null, g), n.exportSymbol("proto.viam.robot.v1.LogRequest", null, g), n.exportSymbol("proto.viam.robot.v1.LogResponse", null, g), n.exportSymbol("proto.viam.robot.v1.Operation", null, g), n.exportSymbol("proto.viam.robot.v1.PeerConnectionInfo", null, g), n.exportSymbol("proto.viam.robot.v1.PeerConnectionType", null, g), n.exportSymbol("proto.viam.robot.v1.ResourceNamesRequest", null, g), n.exportSymbol("proto.viam.robot.v1.ResourceNamesResponse", null, g), n.exportSymbol("proto.viam.robot.v1.ResourceRPCSubtype", null, g), n.exportSymbol("proto.viam.robot.v1.ResourceRPCSubtypesRequest", null, g), n.exportSymbol("proto.viam.robot.v1.ResourceRPCSubtypesResponse", null, g), n.exportSymbol("proto.viam.robot.v1.SendSessionHeartbeatRequest", null, g), n.exportSymbol("proto.viam.robot.v1.SendSessionHeartbeatResponse", null, g), n.exportSymbol("proto.viam.robot.v1.Session", null, g), n.exportSymbol("proto.viam.robot.v1.StartSessionRequest", null, g), n.exportSymbol("proto.viam.robot.v1.StartSessionResponse", null, g), n.exportSymbol("proto.viam.robot.v1.Status", null, g), n.exportSymbol("proto.viam.robot.v1.StopAllRequest", null, g), n.exportSymbol("proto.viam.robot.v1.StopAllResponse", null, g), n.exportSymbol("proto.viam.robot.v1.StopExtraParameters", null, g), n.exportSymbol("proto.viam.robot.v1.StreamStatusRequest", null, g), n.exportSymbol("proto.viam.robot.v1.StreamStatusResponse", null, g), n.exportSymbol("proto.viam.robot.v1.TransformPCDRequest", null, g), n.exportSymbol("proto.viam.robot.v1.TransformPCDResponse", null, g), n.exportSymbol("proto.viam.robot.v1.TransformPoseRequest", null, g), n.exportSymbol("proto.viam.robot.v1.TransformPoseResponse", null, g), proto.viam.robot.v1.FrameSystemConfig = function(i) {
|
|
11019
11019
|
e.Message.initialize(this, i, 0, -1, null, null);
|
|
11020
11020
|
}, n.inherits(proto.viam.robot.v1.FrameSystemConfig, e.Message), n.DEBUG && !COMPILED && (proto.viam.robot.v1.FrameSystemConfig.displayName = "proto.viam.robot.v1.FrameSystemConfig"), proto.viam.robot.v1.FrameSystemConfigRequest = function(i) {
|
|
11021
11021
|
e.Message.initialize(this, i, 0, -1, proto.viam.robot.v1.FrameSystemConfigRequest.repeatedFields_, null);
|
|
@@ -11097,7 +11097,11 @@ var duration_pb$1 = {};
|
|
|
11097
11097
|
e.Message.initialize(this, i, 0, -1, proto.viam.robot.v1.LogRequest.repeatedFields_, null);
|
|
11098
11098
|
}, n.inherits(proto.viam.robot.v1.LogRequest, e.Message), n.DEBUG && !COMPILED && (proto.viam.robot.v1.LogRequest.displayName = "proto.viam.robot.v1.LogRequest"), proto.viam.robot.v1.LogResponse = function(i) {
|
|
11099
11099
|
e.Message.initialize(this, i, 0, -1, null, null);
|
|
11100
|
-
}, n.inherits(proto.viam.robot.v1.LogResponse, e.Message), n.DEBUG && !COMPILED && (proto.viam.robot.v1.LogResponse.displayName = "proto.viam.robot.v1.LogResponse"),
|
|
11100
|
+
}, n.inherits(proto.viam.robot.v1.LogResponse, e.Message), n.DEBUG && !COMPILED && (proto.viam.robot.v1.LogResponse.displayName = "proto.viam.robot.v1.LogResponse"), proto.viam.robot.v1.GetCloudMetadataRequest = function(i) {
|
|
11101
|
+
e.Message.initialize(this, i, 0, -1, null, null);
|
|
11102
|
+
}, n.inherits(proto.viam.robot.v1.GetCloudMetadataRequest, e.Message), n.DEBUG && !COMPILED && (proto.viam.robot.v1.GetCloudMetadataRequest.displayName = "proto.viam.robot.v1.GetCloudMetadataRequest"), proto.viam.robot.v1.GetCloudMetadataResponse = function(i) {
|
|
11103
|
+
e.Message.initialize(this, i, 0, -1, null, null);
|
|
11104
|
+
}, n.inherits(proto.viam.robot.v1.GetCloudMetadataResponse, e.Message), n.DEBUG && !COMPILED && (proto.viam.robot.v1.GetCloudMetadataResponse.displayName = "proto.viam.robot.v1.GetCloudMetadataResponse"), e.Message.GENERATE_TO_OBJECT && (proto.viam.robot.v1.FrameSystemConfig.prototype.toObject = function(i) {
|
|
11101
11105
|
return proto.viam.robot.v1.FrameSystemConfig.toObject(i, this);
|
|
11102
11106
|
}, proto.viam.robot.v1.FrameSystemConfig.toObject = function(i, l) {
|
|
11103
11107
|
var c, d = {
|
|
@@ -13198,6 +13202,107 @@ var duration_pb$1 = {};
|
|
|
13198
13202
|
var i = new e.BinaryWriter();
|
|
13199
13203
|
return proto.viam.robot.v1.LogResponse.serializeBinaryToWriter(this, i), i.getResultBuffer();
|
|
13200
13204
|
}, proto.viam.robot.v1.LogResponse.serializeBinaryToWriter = function(i, l) {
|
|
13205
|
+
}, e.Message.GENERATE_TO_OBJECT && (proto.viam.robot.v1.GetCloudMetadataRequest.prototype.toObject = function(i) {
|
|
13206
|
+
return proto.viam.robot.v1.GetCloudMetadataRequest.toObject(i, this);
|
|
13207
|
+
}, proto.viam.robot.v1.GetCloudMetadataRequest.toObject = function(i, l) {
|
|
13208
|
+
var c = {};
|
|
13209
|
+
return i && (c.$jspbMessageInstance = l), c;
|
|
13210
|
+
}), proto.viam.robot.v1.GetCloudMetadataRequest.deserializeBinary = function(i) {
|
|
13211
|
+
var l = new e.BinaryReader(i), c = new proto.viam.robot.v1.GetCloudMetadataRequest();
|
|
13212
|
+
return proto.viam.robot.v1.GetCloudMetadataRequest.deserializeBinaryFromReader(c, l);
|
|
13213
|
+
}, proto.viam.robot.v1.GetCloudMetadataRequest.deserializeBinaryFromReader = function(i, l) {
|
|
13214
|
+
for (; l.nextField() && !l.isEndGroup(); ) {
|
|
13215
|
+
var c = l.getFieldNumber();
|
|
13216
|
+
switch (c) {
|
|
13217
|
+
default:
|
|
13218
|
+
l.skipField();
|
|
13219
|
+
break;
|
|
13220
|
+
}
|
|
13221
|
+
}
|
|
13222
|
+
return i;
|
|
13223
|
+
}, proto.viam.robot.v1.GetCloudMetadataRequest.prototype.serializeBinary = function() {
|
|
13224
|
+
var i = new e.BinaryWriter();
|
|
13225
|
+
return proto.viam.robot.v1.GetCloudMetadataRequest.serializeBinaryToWriter(this, i), i.getResultBuffer();
|
|
13226
|
+
}, proto.viam.robot.v1.GetCloudMetadataRequest.serializeBinaryToWriter = function(i, l) {
|
|
13227
|
+
}, e.Message.GENERATE_TO_OBJECT && (proto.viam.robot.v1.GetCloudMetadataResponse.prototype.toObject = function(i) {
|
|
13228
|
+
return proto.viam.robot.v1.GetCloudMetadataResponse.toObject(i, this);
|
|
13229
|
+
}, proto.viam.robot.v1.GetCloudMetadataResponse.toObject = function(i, l) {
|
|
13230
|
+
var c = {
|
|
13231
|
+
robotPartId: e.Message.getFieldWithDefault(l, 1, ""),
|
|
13232
|
+
primaryOrgId: e.Message.getFieldWithDefault(l, 2, ""),
|
|
13233
|
+
locationId: e.Message.getFieldWithDefault(l, 3, "")
|
|
13234
|
+
};
|
|
13235
|
+
return i && (c.$jspbMessageInstance = l), c;
|
|
13236
|
+
}), proto.viam.robot.v1.GetCloudMetadataResponse.deserializeBinary = function(i) {
|
|
13237
|
+
var l = new e.BinaryReader(i), c = new proto.viam.robot.v1.GetCloudMetadataResponse();
|
|
13238
|
+
return proto.viam.robot.v1.GetCloudMetadataResponse.deserializeBinaryFromReader(c, l);
|
|
13239
|
+
}, proto.viam.robot.v1.GetCloudMetadataResponse.deserializeBinaryFromReader = function(i, l) {
|
|
13240
|
+
for (; l.nextField() && !l.isEndGroup(); ) {
|
|
13241
|
+
var c = l.getFieldNumber();
|
|
13242
|
+
switch (c) {
|
|
13243
|
+
case 1:
|
|
13244
|
+
var d = (
|
|
13245
|
+
/** @type {string} */
|
|
13246
|
+
l.readString()
|
|
13247
|
+
);
|
|
13248
|
+
i.setRobotPartId(d);
|
|
13249
|
+
break;
|
|
13250
|
+
case 2:
|
|
13251
|
+
var d = (
|
|
13252
|
+
/** @type {string} */
|
|
13253
|
+
l.readString()
|
|
13254
|
+
);
|
|
13255
|
+
i.setPrimaryOrgId(d);
|
|
13256
|
+
break;
|
|
13257
|
+
case 3:
|
|
13258
|
+
var d = (
|
|
13259
|
+
/** @type {string} */
|
|
13260
|
+
l.readString()
|
|
13261
|
+
);
|
|
13262
|
+
i.setLocationId(d);
|
|
13263
|
+
break;
|
|
13264
|
+
default:
|
|
13265
|
+
l.skipField();
|
|
13266
|
+
break;
|
|
13267
|
+
}
|
|
13268
|
+
}
|
|
13269
|
+
return i;
|
|
13270
|
+
}, proto.viam.robot.v1.GetCloudMetadataResponse.prototype.serializeBinary = function() {
|
|
13271
|
+
var i = new e.BinaryWriter();
|
|
13272
|
+
return proto.viam.robot.v1.GetCloudMetadataResponse.serializeBinaryToWriter(this, i), i.getResultBuffer();
|
|
13273
|
+
}, proto.viam.robot.v1.GetCloudMetadataResponse.serializeBinaryToWriter = function(i, l) {
|
|
13274
|
+
var c = void 0;
|
|
13275
|
+
c = i.getRobotPartId(), c.length > 0 && l.writeString(
|
|
13276
|
+
1,
|
|
13277
|
+
c
|
|
13278
|
+
), c = i.getPrimaryOrgId(), c.length > 0 && l.writeString(
|
|
13279
|
+
2,
|
|
13280
|
+
c
|
|
13281
|
+
), c = i.getLocationId(), c.length > 0 && l.writeString(
|
|
13282
|
+
3,
|
|
13283
|
+
c
|
|
13284
|
+
);
|
|
13285
|
+
}, proto.viam.robot.v1.GetCloudMetadataResponse.prototype.getRobotPartId = function() {
|
|
13286
|
+
return (
|
|
13287
|
+
/** @type {string} */
|
|
13288
|
+
e.Message.getFieldWithDefault(this, 1, "")
|
|
13289
|
+
);
|
|
13290
|
+
}, proto.viam.robot.v1.GetCloudMetadataResponse.prototype.setRobotPartId = function(i) {
|
|
13291
|
+
return e.Message.setProto3StringField(this, 1, i);
|
|
13292
|
+
}, proto.viam.robot.v1.GetCloudMetadataResponse.prototype.getPrimaryOrgId = function() {
|
|
13293
|
+
return (
|
|
13294
|
+
/** @type {string} */
|
|
13295
|
+
e.Message.getFieldWithDefault(this, 2, "")
|
|
13296
|
+
);
|
|
13297
|
+
}, proto.viam.robot.v1.GetCloudMetadataResponse.prototype.setPrimaryOrgId = function(i) {
|
|
13298
|
+
return e.Message.setProto3StringField(this, 2, i);
|
|
13299
|
+
}, proto.viam.robot.v1.GetCloudMetadataResponse.prototype.getLocationId = function() {
|
|
13300
|
+
return (
|
|
13301
|
+
/** @type {string} */
|
|
13302
|
+
e.Message.getFieldWithDefault(this, 3, "")
|
|
13303
|
+
);
|
|
13304
|
+
}, proto.viam.robot.v1.GetCloudMetadataResponse.prototype.setLocationId = function(i) {
|
|
13305
|
+
return e.Message.setProto3StringField(this, 3, i);
|
|
13201
13306
|
}, proto.viam.robot.v1.PeerConnectionType = {
|
|
13202
13307
|
PEER_CONNECTION_TYPE_UNSPECIFIED: 0,
|
|
13203
13308
|
PEER_CONNECTION_TYPE_GRPC: 1,
|
|
@@ -43340,6 +43445,14 @@ RobotService.Log = {
|
|
|
43340
43445
|
requestType: robot_v1_robot_pb.LogRequest,
|
|
43341
43446
|
responseType: robot_v1_robot_pb.LogResponse
|
|
43342
43447
|
};
|
|
43448
|
+
RobotService.GetCloudMetadata = {
|
|
43449
|
+
methodName: "GetCloudMetadata",
|
|
43450
|
+
service: RobotService,
|
|
43451
|
+
requestStream: !1,
|
|
43452
|
+
responseStream: !1,
|
|
43453
|
+
requestType: robot_v1_robot_pb.GetCloudMetadataRequest,
|
|
43454
|
+
responseType: robot_v1_robot_pb.GetCloudMetadataResponse
|
|
43455
|
+
};
|
|
43343
43456
|
function RobotServiceClient(o, e) {
|
|
43344
43457
|
this.serviceHost = o, this.options = e || {};
|
|
43345
43458
|
}
|
|
@@ -43721,6 +43834,29 @@ RobotServiceClient.prototype.log = function o(e, n, g) {
|
|
|
43721
43834
|
}
|
|
43722
43835
|
};
|
|
43723
43836
|
};
|
|
43837
|
+
RobotServiceClient.prototype.getCloudMetadata = function o(e, n, g) {
|
|
43838
|
+
arguments.length === 2 && (g = arguments[1]);
|
|
43839
|
+
var s = grpc$a.unary(RobotService.GetCloudMetadata, {
|
|
43840
|
+
request: e,
|
|
43841
|
+
host: this.serviceHost,
|
|
43842
|
+
metadata: n,
|
|
43843
|
+
transport: this.options.transport,
|
|
43844
|
+
debug: this.options.debug,
|
|
43845
|
+
onEnd: function(p) {
|
|
43846
|
+
if (g)
|
|
43847
|
+
if (p.status !== grpc$a.Code.OK) {
|
|
43848
|
+
var u = new Error(p.statusMessage);
|
|
43849
|
+
u.code = p.status, u.metadata = p.trailers, g(u, null);
|
|
43850
|
+
} else
|
|
43851
|
+
g(null, p.message);
|
|
43852
|
+
}
|
|
43853
|
+
});
|
|
43854
|
+
return {
|
|
43855
|
+
cancel: function() {
|
|
43856
|
+
g = null, s.close();
|
|
43857
|
+
}
|
|
43858
|
+
};
|
|
43859
|
+
};
|
|
43724
43860
|
var RobotServiceClient_1 = RobotServiceClient, slam_pb = {};
|
|
43725
43861
|
(function(o) {
|
|
43726
43862
|
var e = googleProtobuf$1, n = e, g = typeof globalThis < "u" && globalThis || typeof window < "u" && window || typeof g < "u" && g || typeof self < "u" && self || function() {
|
|
@@ -47342,6 +47478,11 @@ class RobotClient extends EventDispatcher {
|
|
|
47342
47478
|
const { robotService: n } = this, g = new proto$1.DiscoverComponentsRequest();
|
|
47343
47479
|
return g.setQueriesList(e), (await promisify(n.discoverComponents.bind(n), g)).getDiscoveryList();
|
|
47344
47480
|
}
|
|
47481
|
+
// GET CLOUD METADATA
|
|
47482
|
+
async getCloudMetadata() {
|
|
47483
|
+
const { robotService: e } = this, n = new proto$1.GetCloudMetadataRequest();
|
|
47484
|
+
return (await promisify(e.getCloudMetadata.bind(e), n)).toObject();
|
|
47485
|
+
}
|
|
47345
47486
|
// RESOURCES
|
|
47346
47487
|
async resourceNames() {
|
|
47347
47488
|
const { robotService: e } = this, n = new proto$1.ResourceNamesRequest();
|
|
@@ -55282,14 +55423,14 @@ const encodeLinearConstraint = (o) => {
|
|
|
55282
55423
|
), e.setCollisionSpecificationList(
|
|
55283
55424
|
o.collisionSpecificationList.map((n) => encodeCollisionSpecification(n))
|
|
55284
55425
|
), e;
|
|
55285
|
-
}, encodeMotionConfiguration = (o) => {
|
|
55286
|
-
const e = new pb$a.MotionConfiguration();
|
|
55426
|
+
}, encodeMotionConfiguration = (o = {}) => {
|
|
55427
|
+
const e = new pb$a.MotionConfiguration(), { obstacleDetectorsList: n = [] } = o;
|
|
55287
55428
|
return e.setObstacleDetectorsList(
|
|
55288
|
-
|
|
55289
|
-
const
|
|
55290
|
-
return
|
|
55429
|
+
n.map((g) => {
|
|
55430
|
+
const s = new pb$a.ObstacleDetector();
|
|
55431
|
+
return g.visionService && s.setVisionService(encodeResourceName(g.visionService)), g.camera && s.setCamera(encodeResourceName(g.camera)), s;
|
|
55291
55432
|
})
|
|
55292
|
-
), e.setPositionPollingFrequencyHz(o.positionPollingFrequencyHz), e.setObstaclePollingFrequencyHz(o.obstaclePollingFrequencyHz), e.setPlanDeviationM(o.planDeviationM), e.setLinearMPerSec(o.linearMPerSec), e.setAngularDegsPerSec(o.angularDegsPerSec), e;
|
|
55433
|
+
), o.positionPollingFrequencyHz !== void 0 && e.setPositionPollingFrequencyHz(o.positionPollingFrequencyHz), o.obstaclePollingFrequencyHz !== void 0 && e.setObstaclePollingFrequencyHz(o.obstaclePollingFrequencyHz), o.planDeviationM !== void 0 && e.setPlanDeviationM(o.planDeviationM), o.linearMPerSec !== void 0 && e.setLinearMPerSec(o.linearMPerSec), o.angularDegsPerSec !== void 0 && e.setAngularDegsPerSec(o.angularDegsPerSec), e;
|
|
55293
55434
|
};
|
|
55294
55435
|
class MotionClient {
|
|
55295
55436
|
client;
|
|
@@ -55308,11 +55449,11 @@ class MotionClient {
|
|
|
55308
55449
|
t
|
|
55309
55450
|
)).getSuccess();
|
|
55310
55451
|
}
|
|
55311
|
-
async moveOnMap(e, n, g, s, p = {}) {
|
|
55312
|
-
const { service:
|
|
55313
|
-
return
|
|
55314
|
-
|
|
55315
|
-
|
|
55452
|
+
async moveOnMap(e, n, g, s, p, u = {}) {
|
|
55453
|
+
const { service: t } = this, r = new pb$a.MoveOnMapRequest();
|
|
55454
|
+
return r.setName(this.name), r.setDestination(encodePose(e)), r.setComponentName(encodeResourceName(n)), r.setSlamServiceName(encodeResourceName(g)), s && r.setMotionConfiguration(encodeMotionConfiguration(s)), p && r.setObstaclesList(p.map((l) => encodeGeometry(l))), r.setExtra(struct_pb.Struct.fromJavaScript(u)), this.options.requestLogger?.(r), (await promisify(
|
|
55455
|
+
t.moveOnMap.bind(t),
|
|
55456
|
+
r
|
|
55316
55457
|
)).toObject().executionId;
|
|
55317
55458
|
}
|
|
55318
55459
|
async moveOnGlobe(e, n, g, s, p, u, t = {}) {
|
|
@@ -55801,7 +55942,7 @@ class VisionClient {
|
|
|
55801
55942
|
return doCommandFromClient(n, this.name, e, this.options);
|
|
55802
55943
|
}
|
|
55803
55944
|
}
|
|
55804
|
-
const version = "0.10.
|
|
55945
|
+
const version = "0.10.2-next.0";
|
|
55805
55946
|
export {
|
|
55806
55947
|
ArmClient,
|
|
55807
55948
|
BaseClient,
|