Skip to content

Commit 978ae7d

Browse files
committed
add machine_id to cloud metadata method
1 parent 626e11d commit 978ae7d

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

buf.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ deps:
99
- remote: buf.build
1010
owner: googleapis
1111
repository: googleapis
12-
commit: 7a6bc1e3207144b38e9066861e1de0ff
13-
digest: shake256:d646836485c34192401253703c4e7ce899c826fceec060bf4b2a62c4749bd9976dc960833e134a1f814725e1ffd60b1bb3cf0335a7e99ef0e8cec34b070ffb66
12+
commit: 4ed3bc159a8b4ac68fe253218760d035
13+
digest: shake256:7149cf5e9955c692d381e557830555d4e93f205a0f1b8e2dfdae46d029369aa3fc1980e35df0d310f7cc3b622f93e19ad276769a283a967dd3065ddfd3a40e13
1414
- remote: buf.build
1515
owner: viamrobotics
1616
repository: api

src/robot/client.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,13 @@ export class RobotClient extends EventDispatcher implements Robot {
714714
proto.GetCloudMetadataRequest,
715715
proto.GetCloudMetadataResponse
716716
>(robotService.getCloudMetadata.bind(robotService), request);
717-
return response.toObject();
717+
const md = response.toObject();
718+
return {
719+
primaryOrgId: md.primaryOrgId,
720+
locationId: md.locationId,
721+
machineId: md.machineId,
722+
machinePartId: md.machinePartId,
723+
};
718724
}
719725

720726
// RESOURCES

src/robot/robot.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ import type proto from '../gen/robot/v1/robot_pb';
99
import type { ResponseStream } from '../gen/robot/v1/robot_pb_service';
1010

1111
export type RobotStatusStream = ResponseStream<proto.Status[]>;
12-
export type CloudMetadata = proto.GetCloudMetadataResponse.AsObject;
12+
export interface CloudMetadata {
13+
primaryOrgId: string;
14+
locationId: string;
15+
machineId: string;
16+
machinePartId: string;
17+
}
1318

1419
type Callback = (args: unknown) => void;
1520

0 commit comments

Comments
 (0)