@viamrobotics/sdk 0.1.1-0 → 0.2.0-rc.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/main.d.ts +1 -1
- package/dist/main.es.js +27 -4
- package/dist/main.umd.js +3 -3
- package/dist/responses.d.ts +8 -0
- package/dist/robot/client.d.ts +2 -2
- package/dist/robot/robot.d.ts +3 -1
- package/dist/robot.d.ts +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EventDispatcher } from './events';
|
|
2
|
+
import type { ResponseStream } from './gen/robot/v1/robot_pb_service';
|
|
3
|
+
export declare class ViamResponseStream<T> extends EventDispatcher {
|
|
4
|
+
private stream;
|
|
5
|
+
constructor(stream: ResponseStream<any>);
|
|
6
|
+
on(type: string, handler: (message: any) => void): ResponseStream<T>;
|
|
7
|
+
cancel(): void;
|
|
8
|
+
}
|
package/dist/robot/client.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ import { SLAMServiceClient } from '../gen/service/slam/v1/slam_pb_service';
|
|
|
20
20
|
import { SensorsServiceClient } from '../gen/service/sensors/v1/sensors_pb_service';
|
|
21
21
|
import { ServoServiceClient } from '../gen/component/servo/v1/servo_pb_service';
|
|
22
22
|
import { VisionServiceClient } from '../gen/service/vision/v1/vision_pb_service';
|
|
23
|
-
import type { Robot } from './robot';
|
|
23
|
+
import type { Robot, RobotStatusStream } from './robot';
|
|
24
24
|
interface WebRTCOptions {
|
|
25
25
|
enabled: boolean;
|
|
26
26
|
host: string;
|
|
@@ -104,6 +104,6 @@ export declare class RobotClient implements Robot {
|
|
|
104
104
|
resourceNames(): Promise<ResourceName.AsObject[]>;
|
|
105
105
|
resourceRPCSubtypes(): Promise<proto.ResourceRPCSubtype[]>;
|
|
106
106
|
getStatus(resourceNames: ResourceName[]): Promise<proto.Status[]>;
|
|
107
|
-
streamStatus(resourceNames: ResourceName[], duration: Duration):
|
|
107
|
+
streamStatus(resourceNames: ResourceName[], duration: Duration): RobotStatusStream;
|
|
108
108
|
}
|
|
109
109
|
export {};
|
package/dist/robot/robot.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import type { Duration } from 'google-protobuf/google/protobuf/duration_pb';
|
|
|
2
2
|
import type { PoseInFrame, ResourceName, Transform } from '../gen/common/v1/common_pb';
|
|
3
3
|
import type { StructType } from '../types';
|
|
4
4
|
import type proto from '../gen/robot/v1/robot_pb';
|
|
5
|
+
import type { ResponseStream } from '../gen/robot/v1/robot_pb_service';
|
|
6
|
+
export type RobotStatusStream = ResponseStream<proto.Status[]>;
|
|
5
7
|
export interface Robot {
|
|
6
8
|
/**
|
|
7
9
|
* Get the list of operations currently running on the robot.
|
|
@@ -113,5 +115,5 @@ export interface Robot {
|
|
|
113
115
|
* @group Status
|
|
114
116
|
* @alpha
|
|
115
117
|
*/
|
|
116
|
-
streamStatus(resourceNames: ResourceName[], duration: Duration):
|
|
118
|
+
streamStatus(resourceNames: ResourceName[], duration: Duration): RobotStatusStream;
|
|
117
119
|
}
|
package/dist/robot.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viamrobotics/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0-rc.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/main.umd.js",
|
|
6
6
|
"module": "./dist/main.es.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"homepage": "https://github.com/viamrobotics/viam-typescript-sdk#readme",
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@viamrobotics/rpc": "^0.1.
|
|
47
|
+
"@viamrobotics/rpc": "^0.1.37",
|
|
48
48
|
"exponential-backoff": "^3.1.1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|