@viamrobotics/sdk 0.0.42 → 0.0.43

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.
@@ -6,6 +6,7 @@ import type { Duration } from 'google-protobuf/google/protobuf/duration_pb';
6
6
  import { ArmServiceClient } from '../gen/component/arm/v1/arm_pb_service';
7
7
  import { BaseServiceClient } from '../gen/component/base/v1/base_pb_service';
8
8
  import { BoardServiceClient } from '../gen/component/board/v1/board_pb_service';
9
+ import { EncoderServiceClient } from '../gen/component/encoder/v1/encoder_pb_service';
9
10
  import { GantryServiceClient } from '../gen/component/gantry/v1/gantry_pb_service';
10
11
  import { GenericServiceClient } from '../gen/component/generic/v1/generic_pb_service';
11
12
  import { GripperServiceClient } from '../gen/component/gripper/v1/gripper_pb_service';
@@ -54,6 +55,7 @@ export declare class RobotClient implements Robot {
54
55
  private armServiceClient;
55
56
  private baseServiceClient;
56
57
  private boardServiceClient;
58
+ private encoderServiceClient;
57
59
  private gantryServiceClient;
58
60
  private genericServiceClient;
59
61
  private gripperServiceClient;
@@ -73,6 +75,7 @@ export declare class RobotClient implements Robot {
73
75
  get armService(): ArmServiceClient;
74
76
  get baseService(): BaseServiceClient;
75
77
  get boardService(): BoardServiceClient;
78
+ get encoderService(): EncoderServiceClient;
76
79
  get gantryService(): GantryServiceClient;
77
80
  get genericService(): GenericServiceClient;
78
81
  get gripperService(): GripperServiceClient;
@@ -22,6 +22,21 @@ export interface DialWebRTCConf {
22
22
  signalingAddress: string;
23
23
  iceServers?: ICEServer[];
24
24
  }
25
- type Conf = DialDirectConf | DialWebRTCConf;
26
- export declare const createRobotClient: (conf: Conf) => Promise<RobotClient>;
25
+ /** Options required to dial a robot. */
26
+ export type DialConf = DialDirectConf | DialWebRTCConf;
27
+ /**
28
+ * Connect to a robot via WebRTC or gRPC and return a RobotClient after
29
+ * connecting successfully.
30
+ *
31
+ * The initial connection method is determined by whether a
32
+ * {@link DialWebRTCConf} or {@link DialDirectConf} is passed in as the first
33
+ * argument.
34
+ *
35
+ * If connecting via WebRTC fails, then this function will automatically
36
+ * re-attempt to connect via gRPC directly.
37
+ *
38
+ * @privateRemarks
39
+ * We should add an example that is not viam-specific.
40
+ */
41
+ export declare const createRobotClient: (conf: DialConf) => Promise<RobotClient>;
27
42
  export {};
package/dist/robot.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export type { Robot } from './robot/Robot';
2
2
  export { RobotClient } from './robot/Client';
3
- export { type DialDirectConf, type DialWebRTCConf, createRobotClient, } from './robot/dial';
3
+ export { type DialConf, type DialDirectConf, type DialWebRTCConf, createRobotClient, } from './robot/dial';
package/dist/types.d.ts CHANGED
@@ -14,6 +14,11 @@ export interface Orientation {
14
14
  export interface Options {
15
15
  requestLogger?: (req: unknown) => void;
16
16
  }
17
+ export declare enum PositionType {
18
+ POSITION_TYPE_UNSPECIFIED = 0,
19
+ POSITION_TYPE_TICKS_COUNT = 1,
20
+ POSITION_TYPE_ANGLE_DEGREES = 2
21
+ }
17
22
  export type ResourceName = common.ResourceName.AsObject;
18
23
  export type Pose = common.Pose.AsObject;
19
24
  export type PoseInFrame = common.PoseInFrame.AsObject;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viamrobotics/sdk",
3
- "version": "0.0.42",
3
+ "version": "0.0.43",
4
4
  "description": "",
5
5
  "main": "./dist/main.umd.js",
6
6
  "module": "./dist/main.es.js",
@@ -68,7 +68,7 @@
68
68
  "prettier": "^2.8.1",
69
69
  "prettier-plugin-jsdoc": "^0.4.2",
70
70
  "ts-protoc-gen": "^0.15.0",
71
- "typedoc": "^0.23.28",
71
+ "typedoc": "^0.24.1",
72
72
  "typescript": "^5.0.3",
73
73
  "vite": "^4.2.1",
74
74
  "vitest": "^0.28.4"