File tree Expand file tree Collapse file tree 4 files changed +23
-1
lines changed Expand file tree Collapse file tree 4 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ export {
16
16
type DialDirectConf ,
17
17
type DialWebRTCConf ,
18
18
type RobotStatusStream ,
19
+ type CloudMetadata ,
19
20
RobotClient ,
20
21
createRobotClient ,
21
22
} from './robot' ;
Original file line number Diff line number Diff line change 1
- export type { Robot , RobotStatusStream } from './robot/robot' ;
1
+ export type { Robot , RobotStatusStream , CloudMetadata } from './robot/robot' ;
2
2
export { RobotClient } from './robot/client' ;
3
3
export {
4
4
type DialConf ,
Original file line number Diff line number Diff line change @@ -704,6 +704,18 @@ export class RobotClient extends EventDispatcher implements Robot {
704
704
return response . getDiscoveryList ( ) ;
705
705
}
706
706
707
+ // GET CLOUD METADATA
708
+
709
+ async getCloudMetadata ( ) {
710
+ const { robotService } = this ;
711
+ const request = new proto . GetCloudMetadataRequest ( ) ;
712
+ const response = await promisify <
713
+ proto . GetCloudMetadataRequest ,
714
+ proto . GetCloudMetadataResponse
715
+ > ( robotService . getCloudMetadata . bind ( robotService ) , request ) ;
716
+ return response . toObject ( ) ;
717
+ }
718
+
707
719
// RESOURCES
708
720
709
721
async resourceNames ( ) {
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import type proto from '../gen/robot/v1/robot_pb';
9
9
import type { ResponseStream } from '../gen/robot/v1/robot_pb_service' ;
10
10
11
11
export type RobotStatusStream = ResponseStream < proto . Status [ ] > ;
12
+ export type CloudMetadata = proto . GetCloudMetadataResponse . AsObject ;
12
13
13
14
type Callback = ( args : unknown ) => void ;
14
15
@@ -164,4 +165,12 @@ export interface Robot {
164
165
type : typeof RECONNECTED | typeof DISCONNECTED ,
165
166
listener : Callback
166
167
) => void ;
168
+
169
+ /**
170
+ * Get app-related information about the robot.
171
+ *
172
+ * @group App/Cloud
173
+ * @alpha
174
+ */
175
+ getCloudMetadata ( ) : Promise < CloudMetadata > ;
167
176
}
You can’t perform that action at this time.
0 commit comments