@viamrobotics/sdk 0.73.0 → 0.74.0-b.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.
Files changed (126) hide show
  1. package/dist/api-version.d.ts +1 -1
  2. package/dist/app/app-client.d.ts +186 -254
  3. package/dist/app/billing-client.d.ts +6 -15
  4. package/dist/app/data-client.d.ts +175 -252
  5. package/dist/app/ml-training-client.d.ts +5 -5
  6. package/dist/app/provisioning-client.d.ts +2 -4
  7. package/dist/app/viam-client.d.ts +1 -1
  8. package/dist/app/viam-transport.d.ts +1 -4
  9. package/dist/assert.d.ts +2 -3
  10. package/dist/components/arm/arm.d.ts +2 -2
  11. package/dist/components/arm/client.d.ts +1 -1
  12. package/dist/components/audio-out/audio-out.d.ts +6 -7
  13. package/dist/components/audioin.d.ts +1 -1
  14. package/dist/components/audioout.d.ts +1 -1
  15. package/dist/components/base/base.d.ts +10 -11
  16. package/dist/components/board/board.d.ts +8 -15
  17. package/dist/components/board/client.d.ts +1 -1
  18. package/dist/components/camera/camera.d.ts +2 -4
  19. package/dist/components/camera/client.d.ts +2 -2
  20. package/dist/components/encoder/encoder.d.ts +4 -5
  21. package/dist/components/encoder.d.ts +1 -1
  22. package/dist/components/gantry/gantry.d.ts +7 -10
  23. package/dist/components/generic/generic.d.ts +1 -4
  24. package/dist/components/gripper/gripper.d.ts +1 -2
  25. package/dist/components/input-controller/input-controller.d.ts +5 -15
  26. package/dist/components/inputcontroller.d.ts +1 -1
  27. package/dist/components/motor/motor.d.ts +17 -19
  28. package/dist/components/movement-sensor/movement-sensor.d.ts +14 -42
  29. package/dist/components/pose-tracker/pose-tracker.d.ts +1 -4
  30. package/dist/components/power-sensor/power-sensor.d.ts +6 -20
  31. package/dist/components/switch/switch.d.ts +2 -3
  32. package/dist/debug.d.ts +7 -15
  33. package/dist/events.d.ts +12 -10
  34. package/dist/extra/stream/client.d.ts +12 -11
  35. package/dist/extra/stream/stream.d.ts +1 -1
  36. package/dist/gen/app/agent/v1/agent_connect.d.ts +1 -1
  37. package/dist/gen/app/build/v1/build_connect.d.ts +1 -1
  38. package/dist/gen/app/cloudslam/v1/cloud_slam_connect.d.ts +1 -1
  39. package/dist/gen/app/data/v1/data_connect.d.ts +1 -1
  40. package/dist/gen/app/datapipelines/v1/data_pipelines_connect.d.ts +1 -1
  41. package/dist/gen/app/dataset/v1/dataset_connect.d.ts +1 -1
  42. package/dist/gen/app/datasync/v1/data_sync_connect.d.ts +1 -1
  43. package/dist/gen/app/mlinference/v1/ml_inference_connect.d.ts +1 -1
  44. package/dist/gen/app/mltraining/v1/ml_training_connect.d.ts +1 -1
  45. package/dist/gen/app/packages/v1/packages_connect.d.ts +1 -1
  46. package/dist/gen/app/v1/app_connect.d.ts +38 -2
  47. package/dist/gen/app/v1/app_pb.d.ts +278 -1
  48. package/dist/gen/app/v1/billing_connect.d.ts +1 -1
  49. package/dist/gen/app/v1/end_user_connect.d.ts +1 -1
  50. package/dist/gen/app/v1/robot_connect.d.ts +1 -1
  51. package/dist/gen/component/arm/v1/arm_connect.d.ts +1 -1
  52. package/dist/gen/component/audioin/v1/audioin_connect.d.ts +1 -1
  53. package/dist/gen/component/audioout/v1/audioout_connect.d.ts +1 -1
  54. package/dist/gen/component/base/v1/base_connect.d.ts +1 -1
  55. package/dist/gen/component/board/v1/board_connect.d.ts +1 -1
  56. package/dist/gen/component/button/v1/button_connect.d.ts +1 -1
  57. package/dist/gen/component/camera/v1/camera_connect.d.ts +1 -1
  58. package/dist/gen/component/encoder/v1/encoder_connect.d.ts +1 -1
  59. package/dist/gen/component/gantry/v1/gantry_connect.d.ts +1 -1
  60. package/dist/gen/component/generic/v1/generic_connect.d.ts +1 -1
  61. package/dist/gen/component/gripper/v1/gripper_connect.d.ts +1 -1
  62. package/dist/gen/component/inputcontroller/v1/input_controller_connect.d.ts +1 -1
  63. package/dist/gen/component/motor/v1/motor_connect.d.ts +1 -1
  64. package/dist/gen/component/movementsensor/v1/movementsensor_connect.d.ts +1 -1
  65. package/dist/gen/component/posetracker/v1/pose_tracker_connect.d.ts +1 -1
  66. package/dist/gen/component/powersensor/v1/powersensor_connect.d.ts +1 -1
  67. package/dist/gen/component/sensor/v1/sensor_connect.d.ts +1 -1
  68. package/dist/gen/component/servo/v1/servo_connect.d.ts +1 -1
  69. package/dist/gen/component/switch/v1/switch_connect.d.ts +1 -1
  70. package/dist/gen/component/testecho/v1/testecho_connect.d.ts +1 -1
  71. package/dist/gen/google/bytestream/bytestream_connect.d.ts +1 -1
  72. package/dist/gen/google/iam/v1/iam_policy_connect.d.ts +1 -1
  73. package/dist/gen/google/longrunning/operations_connect.d.ts +1 -1
  74. package/dist/gen/grpc/reflection/v1/reflection_connect.d.ts +1 -1
  75. package/dist/gen/opentelemetry/proto/collector/logs/v1/logs_service_connect.d.ts +1 -1
  76. package/dist/gen/opentelemetry/proto/collector/metrics/v1/metrics_service_connect.d.ts +1 -1
  77. package/dist/gen/opentelemetry/proto/collector/profiles/v1development/profiles_service_connect.d.ts +1 -1
  78. package/dist/gen/opentelemetry/proto/collector/trace/v1/trace_service_connect.d.ts +1 -1
  79. package/dist/gen/proto/rpc/examples/echo/v1/echo_connect.d.ts +1 -1
  80. package/dist/gen/proto/rpc/examples/echoresource/v1/echoresource_connect.d.ts +1 -1
  81. package/dist/gen/proto/rpc/v1/auth_connect.d.ts +1 -1
  82. package/dist/gen/proto/rpc/webrtc/v1/signaling_connect.d.ts +1 -1
  83. package/dist/gen/provisioning/v1/provisioning_connect.d.ts +1 -1
  84. package/dist/gen/robot/v1/robot_connect.d.ts +1 -1
  85. package/dist/gen/robot/v1/robot_pb.d.ts +115 -0
  86. package/dist/gen/service/datamanager/v1/data_manager_connect.d.ts +1 -1
  87. package/dist/gen/service/discovery/v1/discovery_connect.d.ts +1 -1
  88. package/dist/gen/service/generic/v1/generic_connect.d.ts +1 -1
  89. package/dist/gen/service/mlmodel/v1/mlmodel_connect.d.ts +1 -1
  90. package/dist/gen/service/motion/v1/motion_connect.d.ts +1 -1
  91. package/dist/gen/service/navigation/v1/navigation_connect.d.ts +1 -1
  92. package/dist/gen/service/sensors/v1/sensors_connect.d.ts +1 -1
  93. package/dist/gen/service/shell/v1/shell_connect.d.ts +1 -1
  94. package/dist/gen/service/slam/v1/slam_connect.d.ts +1 -1
  95. package/dist/gen/service/video/v1/video_connect.d.ts +1 -1
  96. package/dist/gen/service/vision/v1/vision_connect.d.ts +1 -1
  97. package/dist/gen/service/worldstatestore/v1/world_state_store_connect.d.ts +1 -1
  98. package/dist/gen/stream/v1/stream_connect.d.ts +1 -1
  99. package/dist/main.d.ts +11 -12
  100. package/dist/main.es.js +29098 -33211
  101. package/dist/main.umd.js +6 -7
  102. package/dist/robot/client.d.ts +59 -86
  103. package/dist/robot/dial.d.ts +7 -10
  104. package/dist/robot/robot.d.ts +29 -29
  105. package/dist/rpc/client-channel.d.ts +1 -1
  106. package/dist/rpc/client-stream.d.ts +4 -5
  107. package/dist/rpc/connection-closed-error.d.ts +1 -1
  108. package/dist/rpc/dial.d.ts +34 -41
  109. package/dist/rpc/signaling-exchange.d.ts +1 -1
  110. package/dist/rpc/stream-client-stream.d.ts +1 -1
  111. package/dist/rpc/unary-client-stream.d.ts +1 -1
  112. package/dist/services/data-manager/client.d.ts +5 -14
  113. package/dist/services/data-manager/data-manager.d.ts +1 -1
  114. package/dist/services/generic/client.d.ts +1 -1
  115. package/dist/services/generic/generic.d.ts +1 -2
  116. package/dist/services/motion/motion.d.ts +53 -78
  117. package/dist/services/navigation/client.d.ts +1 -1
  118. package/dist/services/navigation/navigation.d.ts +2 -4
  119. package/dist/services/slam/client.d.ts +1 -1
  120. package/dist/services/slam/slam.d.ts +4 -6
  121. package/dist/services/video/video.d.ts +2 -6
  122. package/dist/services/vision/vision.d.ts +13 -19
  123. package/dist/services/world-state-store/world-state-store.d.ts +6 -19
  124. package/dist/types.d.ts +5 -7
  125. package/dist/utils.d.ts +5 -5
  126. package/package.json +29 -29
@@ -1,6 +1,6 @@
1
1
  import type { Message, PartialMessage } from '@bufbuild/protobuf';
2
2
  import type { ContextValues, StreamResponse } from '@connectrpc/connect';
3
- import { ResponseHeaders, ResponseTrailers } from '../gen/proto/rpc/webrtc/v1/grpc_pb';
3
+ import { type ResponseHeaders, type ResponseTrailers } from '../gen/proto/rpc/webrtc/v1/grpc_pb';
4
4
  import { ClientStream } from './client-stream';
5
5
  export declare class StreamClientStream<I extends Message<I>, O extends Message<O>> extends ClientStream<I, O> {
6
6
  private awaitingHeadersResult?;
@@ -1,6 +1,6 @@
1
1
  import type { Message, PartialMessage } from '@bufbuild/protobuf';
2
2
  import type { ContextValues, UnaryResponse } from '@connectrpc/connect';
3
- import { ResponseHeaders, ResponseTrailers } from '../gen/proto/rpc/webrtc/v1/grpc_pb';
3
+ import { type ResponseHeaders, type ResponseTrailers } from '../gen/proto/rpc/webrtc/v1/grpc_pb';
4
4
  import { ClientStream } from './client-stream';
5
5
  export declare class UnaryClientStream<I extends Message<I>, O extends Message<O>> extends ClientStream<I, O> {
6
6
  private result?;
@@ -1,6 +1,6 @@
1
1
  import { Struct, type JsonValue } from '@bufbuild/protobuf';
2
2
  import type { CallOptions } from '@connectrpc/connect';
3
- import { MimeType } from '../../gen/app/datasync/v1/data_sync_pb.js';
3
+ import { type MimeType } from '../../gen/app/datasync/v1/data_sync_pb.js';
4
4
  import type { RobotClient } from '../../robot';
5
5
  import type { Options } from '../../types';
6
6
  import type { DataManager } from './data-manager';
@@ -16,10 +16,7 @@ export declare class DataManagerClient implements DataManager {
16
16
  * @example
17
17
  *
18
18
  * ```ts
19
- * const dataManager = new VIAM.DataManagerClient(
20
- * machine,
21
- * 'my_data_manager'
22
- * );
19
+ * const dataManager = new VIAM.DataManagerClient(machine, 'my_data_manager');
23
20
  * await dataManager.sync();
24
21
  * ```
25
22
  *
@@ -36,10 +33,7 @@ export declare class DataManagerClient implements DataManager {
36
33
  * @example
37
34
  *
38
35
  * ```ts
39
- * const dataManager = new VIAM.DataManagerClient(
40
- * machine,
41
- * 'my_data_manager'
42
- * );
36
+ * const dataManager = new VIAM.DataManagerClient(machine, 'my_data_manager');
43
37
  * await dataManager.doCommand(new Struct({ cmd: 'test', data1: 500 }));
44
38
  * ```
45
39
  *
@@ -57,15 +51,12 @@ export declare class DataManagerClient implements DataManager {
57
51
  * @example
58
52
  *
59
53
  * ```ts
60
- * const dataManager = new VIAM.DataManagerClient(
61
- * machine,
62
- * 'my_data_manager'
63
- * );
54
+ * const dataManager = new VIAM.DataManagerClient(machine, 'my_data_manager');
64
55
  * await dataManager.uploadBinaryDataToDatasets(
65
56
  * new Uint8Array([1, 2, 3]),
66
57
  * ['tag1', 'tag2'],
67
58
  * ['datasetId1', 'datasetId2'],
68
- * MimeType.MIME_TYPE_JPEG
59
+ * MimeType.MIME_TYPE_JPEG,
69
60
  * );
70
61
  * ```
71
62
  *
@@ -1,5 +1,5 @@
1
1
  import type { Struct } from '@bufbuild/protobuf';
2
- import { MimeType } from '../../gen/app/datasync/v1/data_sync_pb.js';
2
+ import { type MimeType } from '../../gen/app/datasync/v1/data_sync_pb.js';
3
3
  import type { Resource } from '../../types';
4
4
  export interface DataManager extends Resource {
5
5
  sync: (extra?: Struct) => Promise<void>;
@@ -1,6 +1,6 @@
1
1
  import type { JsonValue, Struct } from '@bufbuild/protobuf';
2
2
  import type { CallOptions } from '@connectrpc/connect';
3
- import { RobotClient } from '../../robot';
3
+ import { type RobotClient } from '../../robot';
4
4
  import type { Options } from '../../types';
5
5
  import type { Generic } from './generic';
6
6
  /**
@@ -1,4 +1,3 @@
1
1
  import type { Resource } from '../../types';
2
2
  /** A generic service. */
3
- export interface Generic extends Resource {
4
- }
3
+ export type Generic = Resource;
@@ -1,14 +1,11 @@
1
1
  import type { Struct } from '@bufbuild/protobuf';
2
2
  import type { GeoGeometry, GeoPoint, Geometry, Pose, PoseInFrame, Resource, Transform, WorldState } from '../../types';
3
3
  import type { Constraints, GetPlanResponse, ListPlanStatusesResponse, MotionConfiguration } from './types';
4
- /**
5
- * A service that coordinates motion planning across all of the components in a
6
- * given robot.
7
- */
4
+ /** A service that coordinates motion planning across all of the components in a given robot. */
8
5
  export interface Motion extends Resource {
9
6
  /**
10
- * Move any component on the robot to a specified destination which can be
11
- * from the reference frame of any other component on the robot.
7
+ * Move any component on the robot to a specified destination which can be from the reference
8
+ * frame of any other component on the robot.
12
9
  *
13
10
  * @example
14
11
  *
@@ -39,24 +36,22 @@ export interface Motion extends Resource {
39
36
  * For more information, see [Motion
40
37
  * API](https://docs.viam.com/dev/reference/apis/services/motion/#move).
41
38
  *
42
- * @param destination - Destination to move to, which can a pose in the
43
- * reference frame of any frame in the robot's frame system.
44
- * @param componentName - Component on the robot to move to the specified
45
- * destination.
46
- * @param worldState - Avoid obstacles by specifying their geometries in the
47
- * world state. Augment the frame system of the robot by specifying
48
- * additional transforms to add to it for the duration of the Move.
39
+ * @param destination - Destination to move to, which can a pose in the reference frame of any
40
+ * frame in the robot's frame system.
41
+ * @param componentName - Component on the robot to move to the specified destination.
42
+ * @param worldState - Avoid obstacles by specifying their geometries in the world state. Augment
43
+ * the frame system of the robot by specifying additional transforms to add to it for the
44
+ * duration of the Move.
49
45
  * @param constraints - Constrain the way the robot will move.
50
46
  */
51
47
  move: (destination: PoseInFrame, componentName: string, worldState?: WorldState, constraints?: Constraints, extra?: Struct) => Promise<boolean>;
52
48
  /**
53
- * Move a component to a `Pose` in respect to the origin of the SLAM map,
54
- * using a `SLAM` service to check the location. moveOnMap()`is non blocking,
55
- * meaning the motion service will move the component to the destination Pose
56
- * after`moveOnMap()`returns. Each successful`moveOnMap()`call retuns a unique
57
- * ExectionID which you can use to identify all plans generated durring
58
- * the`moveOnMap()`call. You can monitor the progress of the`moveOnMap()`call
59
- * by querying`getPlan()`and`listPlanStatuses()`.
49
+ * Move a component to a `Pose` in respect to the origin of the SLAM map, using a `SLAM` service
50
+ * to check the location. moveOnMap()`is non blocking, meaning the motion service will move the
51
+ * component to the destination Pose after`moveOnMap()`returns. Each successful`moveOnMap()`call
52
+ * retuns a unique ExectionID which you can use to identify all plans generated durring
53
+ * the`moveOnMap()`call. You can monitor the progress of the`moveOnMap()`call by
54
+ * querying`getPlan()`and`listPlanStatuses()`.
60
55
  *
61
56
  * @example
62
57
  *
@@ -78,34 +73,27 @@ export interface Motion extends Resource {
78
73
  * const slamServiceName = 'my_slam_service';
79
74
  *
80
75
  * // Move the base to Y=10 (location of 0,10,0) relative to map origin
81
- * const executionId = await motion.moveOnMap(
82
- * myPose,
83
- * baseName,
84
- * slamServiceName
85
- * );
76
+ * const executionId = await motion.moveOnMap(myPose, baseName, slamServiceName);
86
77
  * ```
87
78
  *
88
79
  * For more information, see [Motion
89
80
  * API](https://docs.viam.com/dev/reference/apis/services/motion/#moveonmap).
90
81
  *
91
- * @param destination - Specify a destination to, which can be any `Pose` with
92
- * respect to the SLAM map's origin.
93
- * @param componentName - Component on the robot to move to the specified
94
- * destination.
95
- * @param slamServiceName - Name of the `SLAM` service from which the SLAM map
96
- * is requested
82
+ * @param destination - Specify a destination to, which can be any `Pose` with respect to the SLAM
83
+ * map's origin.
84
+ * @param componentName - Component on the robot to move to the specified destination.
85
+ * @param slamServiceName - Name of the `SLAM` service from which the SLAM map is requested
97
86
  * @param motionConfiguration - Optional motion configuration options.
98
87
  * @param obstacles - Optional obstacles to be considered for motion planning.
99
88
  */
100
89
  moveOnMap: (destination: Pose, componentName: string, slamServiceName: string, motionConfiguration?: MotionConfiguration, obstacles?: Geometry[], extra?: Struct) => Promise<string>;
101
90
  /**
102
- * Move a component to a specific latitude and longitude, using a
103
- * `MovementSensor` to check the location. `moveOnGlobe()` is non blocking,
104
- * meaning the motion service will move the component to the destination GPS
105
- * point after `moveOnGlobe()` returns. Each successful `moveOnGlobe()` call
106
- * retuns a unique ExectionID which you can use to identify all plans
107
- * generated durring the `moveOnGlobe()` call. You can monitor the progress of
108
- * the `moveOnGlobe()` call by querying `getPlan()` and `listPlanStatuses()`.
91
+ * Move a component to a specific latitude and longitude, using a `MovementSensor` to check the
92
+ * location. `moveOnGlobe()` is non blocking, meaning the motion service will move the component
93
+ * to the destination GPS point after `moveOnGlobe()` returns. Each successful `moveOnGlobe()`
94
+ * call retuns a unique ExectionID which you can use to identify all plans generated durring the
95
+ * `moveOnGlobe()` call. You can monitor the progress of the `moveOnGlobe()` call by querying
96
+ * `getPlan()` and `listPlanStatuses()`.
109
97
  *
110
98
  * @example
111
99
  *
@@ -125,29 +113,25 @@ export interface Motion extends Resource {
125
113
  * const globeExecutionId = await motion.moveOnGlobe(
126
114
  * destination,
127
115
  * baseName,
128
- * movementSensorName
116
+ * movementSensorName,
129
117
  * );
130
118
  * ```
131
119
  *
132
120
  * For more information, see [Motion
133
121
  * API](https://docs.viam.com/dev/reference/apis/services/motion/#moveonglobe).
134
122
  *
135
- * @param destination - Destination for the component to move to, represented
136
- * as a `GeoPoint`.
123
+ * @param destination - Destination for the component to move to, represented as a `GeoPoint`.
137
124
  * @param componentName - The name of the component to move.
138
- * @param movementSensorName - The name of the `Movement Sensor` used to check
139
- * the robot's location.
140
- * @param obstaclesList - Obstacles to consider when planning the motion of
141
- * the component.
125
+ * @param movementSensorName - The name of the `Movement Sensor` used to check the robot's
126
+ * location.
127
+ * @param obstaclesList - Obstacles to consider when planning the motion of the component.
142
128
  * @param heading - Compass heading, in degrees, to achieve at destination.
143
129
  * @param motionConfiguration - Optional motion configuration options.
144
- * @param boundingRegion - Set of obstacles which the robot must remain within
145
- * while navigating
130
+ * @param boundingRegion - Set of obstacles which the robot must remain within while navigating
146
131
  */
147
132
  moveOnGlobe: (destination: GeoPoint, componentName: string, movementSensorName: string, heading?: number, obstaclesList?: GeoGeometry[], motionConfiguration?: MotionConfiguration, boundingRegion?: GeoGeometry[], extra?: Struct) => Promise<string>;
148
133
  /**
149
- * Stop a component being moved by an in progress `moveOnGlobe()` or
150
- * `moveOnMap()` call.
134
+ * Stop a component being moved by an in progress `moveOnGlobe()` or `moveOnMap()` call.
151
135
  *
152
136
  * @example
153
137
  *
@@ -166,18 +150,17 @@ export interface Motion extends Resource {
166
150
  */
167
151
  stopPlan: (componentName: string, extra?: Struct) => Promise<null>;
168
152
  /**
169
- * By default: returns the plan history of the most recent `moveOnGlobe()` or
170
- * `moveOnMap()` call to move a component. The plan history for executions
171
- * before the most recent can be requested by providing an ExecutionID in the
172
- * request. Returns a result if both of the following conditions are met:
153
+ * By default: returns the plan history of the most recent `moveOnGlobe()` or `moveOnMap()` call
154
+ * to move a component. The plan history for executions before the most recent can be requested by
155
+ * providing an ExecutionID in the request. Returns a result if both of the following conditions
156
+ * are met:
173
157
  *
174
- * - The execution (call to `moveOnGlobe()` or `moveOnMap()`) is still executing
175
- * **or** changed state within the last 24 hours
158
+ * - The execution (call to `moveOnGlobe()` or `moveOnMap()`) is still executing **or** changed
159
+ * state within the last 24 hours
176
160
  * - The robot has not reinitialized
177
161
  *
178
- * Plans never change. Replans always create new plans. Replans share the
179
- * ExecutionID of the previously executing plan. All repeated fields are in
180
- * chronological order.
162
+ * Plans never change. Replans always create new plans. Replans share the ExecutionID of the
163
+ * previously executing plan. All repeated fields are in chronological order.
181
164
  *
182
165
  * @example
183
166
  *
@@ -193,17 +176,15 @@ export interface Motion extends Resource {
193
176
  * API](https://docs.viam.com/dev/reference/apis/services/motion/#getplan).
194
177
  *
195
178
  * @param componentName - The component to query
196
- * @param destinationFrame - The reference frame in which the component's
197
- * `Pose` should be provided, if unset this defaults to the "world"
198
- * reference frame.
199
- * @param supplementalTransforms - `Pose` information on any additional
200
- * reference frames that are needed to compute the component's `Pose`.
179
+ * @param destinationFrame - The reference frame in which the component's `Pose` should be
180
+ * provided, if unset this defaults to the "world" reference frame.
181
+ * @param supplementalTransforms - `Pose` information on any additional reference frames that are
182
+ * needed to compute the component's `Pose`.
201
183
  */
202
184
  getPlan: (componentName: string, lastPlanOnly?: boolean, executionId?: string, extra?: Struct) => Promise<GetPlanResponse>;
203
185
  /**
204
- * Returns the statuses of plans created by MoveOnGlobe calls that meet at
205
- * least one of the following conditions since the motion service
206
- * initialized:
186
+ * Returns the statuses of plans created by MoveOnGlobe calls that meet at least one of the
187
+ * following conditions since the motion service initialized:
207
188
  *
208
189
  * - The plan's status is in progress
209
190
  * - The plan's status changed state within the last 24 hours
@@ -222,8 +203,7 @@ export interface Motion extends Resource {
222
203
  * For more information, see [Motion
223
204
  * API](https://docs.viam.com/dev/reference/apis/services/motion/#listplanstatuses).
224
205
  *
225
- * @param onlyActivePlans - If true, the response will only return plans which
226
- * are executing.
206
+ * @param onlyActivePlans - If true, the response will only return plans which are executing.
227
207
  */
228
208
  listPlanStatuses: (onlyActivePlans?: boolean, extra?: Struct) => Promise<ListPlanStatusesResponse>;
229
209
  /**
@@ -238,22 +218,17 @@ export interface Motion extends Resource {
238
218
  * const gripperName = 'my_gripper';
239
219
  *
240
220
  * // Get the gripper's pose in world coordinates
241
- * const gripperPoseInWorld = await motion.getPose(
242
- * gripperName,
243
- * 'world',
244
- * []
245
- * );
221
+ * const gripperPoseInWorld = await motion.getPose(gripperName, 'world', []);
246
222
  * ```
247
223
  *
248
224
  * For more information, see [Motion
249
225
  * API](https://docs.viam.com/dev/reference/apis/services/motion/#getpose).
250
226
  *
251
227
  * @param componentName - The component whose `Pose` is being requested.
252
- * @param destinationFrame - The reference frame in which the component's
253
- * `Pose` should be provided, if unset this defaults to the "world"
254
- * reference frame.
255
- * @param supplementalTransforms - `Pose` information on any additional
256
- * reference frames that are needed to compute the component's `Pose`.
228
+ * @param destinationFrame - The reference frame in which the component's `Pose` should be
229
+ * provided, if unset this defaults to the "world" reference frame.
230
+ * @param supplementalTransforms - `Pose` information on any additional reference frames that are
231
+ * needed to compute the component's `Pose`.
257
232
  */
258
233
  getPose: (componentName: string, destinationFrame: string, supplementalTransforms: Transform[], extra?: Struct) => Promise<PoseInFrame>;
259
234
  }
@@ -1,6 +1,6 @@
1
1
  import { Struct, type JsonValue } from '@bufbuild/protobuf';
2
2
  import type { CallOptions } from '@connectrpc/connect';
3
- import { RobotClient } from '../../robot';
3
+ import { type RobotClient } from '../../robot';
4
4
  import type { GeoPoint, Options } from '../../types';
5
5
  import type { Navigation } from './navigation';
6
6
  import type { Mode } from './types';
@@ -2,8 +2,7 @@ import type { Struct } from '@bufbuild/protobuf';
2
2
  import type { GeoGeometry, GeoPoint, Resource } from '../../types';
3
3
  import type { Mode, NavigationPosition, NavigationProperties, Path, Waypoint } from './types';
4
4
  /**
5
- * A service that uses GPS to automatically navigate a robot to user defined
6
- * endpoints.
5
+ * A service that uses GPS to automatically navigate a robot to user defined endpoints.
7
6
  *
8
7
  * @example
9
8
  *
@@ -120,8 +119,7 @@ export interface Navigation extends Resource {
120
119
  * For more information, see [Navigation
121
120
  * API](https://docs.viam.com/dev/reference/apis/services/navigation/#removewaypoint).
122
121
  *
123
- * @param id - The MongoDB ObjectID of the waypoint to remove from the
124
- * service's data storage.
122
+ * @param id - The MongoDB ObjectID of the waypoint to remove from the service's data storage.
125
123
  */
126
124
  removeWayPoint: (id: string, extra?: Struct) => Promise<void>;
127
125
  /**
@@ -1,6 +1,6 @@
1
1
  import type { JsonValue, Struct } from '@bufbuild/protobuf';
2
2
  import type { CallOptions } from '@connectrpc/connect';
3
- import { RobotClient } from '../../robot';
3
+ import { type RobotClient } from '../../robot';
4
4
  import type { Options } from '../../types';
5
5
  import type { Slam } from './slam';
6
6
  /**
@@ -1,13 +1,12 @@
1
1
  import type { Resource } from '../../types';
2
2
  import type { SlamPosition, SlamProperties } from './types';
3
3
  /**
4
- * A service that allows your robot to create a map of its surroundings and find
5
- * its location within that map.
4
+ * A service that allows your robot to create a map of its surroundings and find its location within
5
+ * that map.
6
6
  */
7
7
  export interface Slam extends Resource {
8
8
  /**
9
- * Get the current position of the specified source component in the point
10
- * cloud SLAM map.
9
+ * Get the current position of the specified source component in the point cloud SLAM map.
11
10
  *
12
11
  * @example
13
12
  *
@@ -43,8 +42,7 @@ export interface Slam extends Resource {
43
42
  */
44
43
  getPointCloudMap: (returnEditedMap?: boolean) => Promise<Uint8Array>;
45
44
  /**
46
- * Get the internal state of the SLAM algorithm required to continue
47
- * mapping/localization.
45
+ * Get the internal state of the SLAM algorithm required to continue mapping/localization.
48
46
  *
49
47
  * @example
50
48
  *
@@ -14,15 +14,11 @@ export interface Video extends Resource {
14
14
  * new Date('2025-01-01T00:00:00Z'),
15
15
  * new Date('2025-01-01T00:10:00Z'),
16
16
  * 'h264',
17
- * 'mp4'
17
+ * 'mp4',
18
18
  * );
19
19
  *
20
20
  * for await (const chunk of videoStream) {
21
- * console.log(
22
- * 'Received video chunk:',
23
- * chunk.videoData.length,
24
- * 'bytes'
25
- * );
21
+ * console.log('Received video chunk:', chunk.videoData.length, 'bytes');
26
22
  * }
27
23
  * ```
28
24
  *
@@ -35,7 +35,7 @@ export interface Vision extends Resource {
35
35
  * images[0].image,
36
36
  * 600,
37
37
  * 600,
38
- * images[0].mimeType
38
+ * images[0].mimeType,
39
39
  * );
40
40
  * ```
41
41
  *
@@ -56,10 +56,7 @@ export interface Vision extends Resource {
56
56
  *
57
57
  * ```ts
58
58
  * const vision = new VIAM.VisionClient(machine, 'my_vision');
59
- * const classifications = await vision.getClassificationsFromCamera(
60
- * 'my_camera',
61
- * 10
62
- * );
59
+ * const classifications = await vision.getClassificationsFromCamera('my_camera', 10);
63
60
  * ```
64
61
  *
65
62
  * For more information, see [Vision
@@ -85,7 +82,7 @@ export interface Vision extends Resource {
85
82
  * 600,
86
83
  * 600,
87
84
  * images[0].mimeType,
88
- * 10
85
+ * 10,
89
86
  * );
90
87
  * ```
91
88
  *
@@ -101,15 +98,14 @@ export interface Vision extends Resource {
101
98
  */
102
99
  getClassifications: (image: Uint8Array, width: number, height: number, mimeType: MimeType, count: number, extra?: Struct) => Promise<Classification[]>;
103
100
  /**
104
- * Returns a list of the 3D point cloud objects and associated metadata in the
105
- * latest picture obtained from the specified 3D camera.
101
+ * Returns a list of the 3D point cloud objects and associated metadata in the latest picture
102
+ * obtained from the specified 3D camera.
106
103
  *
107
104
  * @example
108
105
  *
109
106
  * ```ts
110
107
  * const vision = new VIAM.VisionClient(machine, 'my_vision');
111
- * const pointCloudObjects =
112
- * await vision.getObjectPointClouds('my_camera');
108
+ * const pointCloudObjects = await vision.getObjectPointClouds('my_camera');
113
109
  * ```
114
110
  *
115
111
  * For more information, see [Vision
@@ -120,9 +116,8 @@ export interface Vision extends Resource {
120
116
  */
121
117
  getObjectPointClouds: (cameraName: string, extra?: Struct) => Promise<PointCloudObject[]>;
122
118
  /**
123
- * Returns an object describing the properties of the vision service, namely
124
- * booleans indicating whether classifications, detections, and 3d
125
- * segmentation are supported.
119
+ * Returns an object describing the properties of the vision service, namely booleans indicating
120
+ * whether classifications, detections, and 3d segmentation are supported.
126
121
  *
127
122
  * @example
128
123
  *
@@ -138,8 +133,8 @@ export interface Vision extends Resource {
138
133
  */
139
134
  getProperties: (extra?: Struct) => Promise<Properties>;
140
135
  /**
141
- * Returns the requested image, classifications, detections, and 3d point
142
- * cloud objects in the next image given a camera.
136
+ * Returns the requested image, classifications, detections, and 3d point cloud objects in the
137
+ * next image given a camera.
143
138
  *
144
139
  * @example
145
140
  *
@@ -156,11 +151,10 @@ export interface Vision extends Resource {
156
151
  * For more information, see [Vision
157
152
  * API](https://docs.viam.com/dev/reference/apis/services/vision/#captureallfromcamera).
158
153
  *
159
- * @param cameraName - The name of the camera to use for classification,
160
- * detection, and segmentation.
154
+ * @param cameraName - The name of the camera to use for classification, detection, and
155
+ * segmentation.
161
156
  * @param opts - The fields desired in the response.
162
- * @returns - The requested image, classifications, detections, and 3d point
163
- * cloud objects.
157
+ * @returns - The requested image, classifications, detections, and 3d point cloud objects.
164
158
  */
165
159
  captureAllFromCamera: (cameraName: string, opts: CaptureAllOptions, extra?: Struct) => Promise<CaptureAllResponse>;
166
160
  }
@@ -2,8 +2,8 @@ import type { Struct } from '@bufbuild/protobuf';
2
2
  import type { Transform, Resource } from '../../types';
3
3
  import type { TransformChangeEvent, TransformWithUUID } from './types';
4
4
  /**
5
- * A service that manages world state transforms, allowing storage and retrieval
6
- * of spatial relationships between reference frames.
5
+ * A service that manages world state transforms, allowing storage and retrieval of spatial
6
+ * relationships between reference frames.
7
7
  */
8
8
  export interface WorldStateStore extends Resource {
9
9
  /**
@@ -12,10 +12,7 @@ export interface WorldStateStore extends Resource {
12
12
  * @example
13
13
  *
14
14
  * ```ts
15
- * const worldStateStore = new VIAM.WorldStateStoreClient(
16
- * machine,
17
- * 'builtin'
18
- * );
15
+ * const worldStateStore = new VIAM.WorldStateStoreClient(machine, 'builtin');
19
16
  *
20
17
  * // Get all transform UUIDs
21
18
  * const uuids = await worldStateStore.listUUIDs();
@@ -30,10 +27,7 @@ export interface WorldStateStore extends Resource {
30
27
  * @example
31
28
  *
32
29
  * ```ts
33
- * const worldStateStore = new VIAM.WorldStateStoreClient(
34
- * machine,
35
- * 'builtin'
36
- * );
30
+ * const worldStateStore = new VIAM.WorldStateStoreClient(machine, 'builtin');
37
31
  *
38
32
  * // Get a specific transform by UUID
39
33
  * const transform = await worldStateStore.getTransform(uuid);
@@ -51,19 +45,12 @@ export interface WorldStateStore extends Resource {
51
45
  * @example
52
46
  *
53
47
  * ```ts
54
- * const worldStateStore = new VIAM.WorldStateStoreClient(
55
- * machine,
56
- * 'builtin'
57
- * );
48
+ * const worldStateStore = new VIAM.WorldStateStoreClient(machine, 'builtin');
58
49
  *
59
50
  * // Stream transform changes
60
51
  * const stream = worldStateStore.streamTransformChanges();
61
52
  * for await (const change of stream) {
62
- * console.log(
63
- * 'Transform change:',
64
- * change.changeType,
65
- * change.transform
66
- * );
53
+ * console.log('Transform change:', change.changeType, change.transform);
67
54
  * }
68
55
  * ```
69
56
  *
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Struct, type JsonValue, type PlainMessage } from '@bufbuild/protobuf';
1
+ import { type Struct, type JsonValue, type PlainMessage } from '@bufbuild/protobuf';
2
2
  export { Code, ConnectError } from '@connectrpc/connect';
3
3
  export { ConnectionClosedError } from './rpc';
4
4
  export interface Options {
@@ -21,13 +21,11 @@ export interface Resource {
21
21
  * // Struct (still supported)
22
22
  * import { Struct } from '@viamrobotics/sdk';
23
23
  *
24
- * const result = await resource.doCommand(
25
- * Struct.fromJson({ myCommand: { key: 'value' } })
26
- * );
24
+ * const result = await resource.doCommand(Struct.fromJson({ myCommand: { key: 'value' } }));
27
25
  * ```
28
26
  *
29
- * @param command - The command to execute. Accepts either a {@link Struct} or
30
- * a plain object, which will be converted automatically.
27
+ * @param command - The command to execute. Accepts either a {@link Struct} or a plain object,
28
+ * which will be converted automatically.
31
29
  */
32
30
  doCommand(command: Struct | Record<string, JsonValue>): Promise<JsonValue>;
33
31
  /** Get the status of the resource. */
@@ -51,4 +49,4 @@ export type Vector3 = PlainMessage<commonApi.Vector3>;
51
49
  export type WorldState = PlainMessage<commonApi.WorldState>;
52
50
  export declare const Capsule: typeof commonApi.Capsule, GeoGeometry: typeof commonApi.GeoGeometry, GeoPoint: typeof commonApi.GeoPoint, GeometriesInFrame: typeof commonApi.GeometriesInFrame, Geometry: typeof commonApi.Geometry, Orientation: typeof commonApi.Orientation, PointCloud: typeof commonApi.PointCloud, Pose: typeof commonApi.Pose, PoseInFrame: typeof commonApi.PoseInFrame, RectangularPrism: typeof commonApi.RectangularPrism, ResourceName: typeof commonApi.ResourceName, Sphere: typeof commonApi.Sphere, Transform: typeof commonApi.Transform, Vector3: typeof commonApi.Vector3, WorldState: typeof commonApi.WorldState;
53
51
  export declare const isValidGeoPoint: (value: GeoPoint) => boolean;
54
- export { Duration, Struct, Timestamp, type JsonValue, type PlainMessage, } from '@bufbuild/protobuf';
52
+ export { Duration, Struct, Timestamp, type JsonValue, type PlainMessage } from '@bufbuild/protobuf';
package/dist/utils.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { Struct, type JsonValue, type PartialMessage } from '@bufbuild/protobuf';
2
2
  import type { CallOptions } from '@connectrpc/connect';
3
- import { DoCommandRequest, DoCommandResponse, GetKinematicsRequest, GetKinematicsResponse, GetGeometriesRequest, GetGeometriesResponse, GetStatusRequest, GetStatusResponse, Geometry, Mesh } from './gen/common/v1/common_pb';
4
- import type { Options, Vector3 } from './types';
5
3
  import type { Frame } from './gen/app/v1/robot_pb';
4
+ import { DoCommandRequest, type DoCommandResponse, type Geometry, GetGeometriesRequest, type GetGeometriesResponse, GetKinematicsRequest, type GetKinematicsResponse, GetStatusRequest, type GetStatusResponse, type Mesh } from './gen/common/v1/common_pb';
5
+ import type { Options, Vector3 } from './types';
6
6
  export declare const clientHeaders: Headers;
7
7
  type doCommand = (request: PartialMessage<DoCommandRequest>, options?: CallOptions) => Promise<DoCommandResponse>;
8
8
  /**
@@ -20,12 +20,12 @@ type doCommand = (request: PartialMessage<DoCommandRequest>, options?: CallOptio
20
20
  * const result = await doCommandFromClient(
21
21
  * doFn,
22
22
  * name,
23
- * Struct.fromJson({ myCommand: { key: 'value' } })
23
+ * Struct.fromJson({ myCommand: { key: 'value' } }),
24
24
  * );
25
25
  * ```
26
26
  *
27
- * @param command - The command to execute. Accepts either a {@link Struct} or a
28
- * plain object, which will be converted automatically.
27
+ * @param command - The command to execute. Accepts either a {@link Struct} or a plain object, which
28
+ * will be converted automatically.
29
29
  */
30
30
  export declare const doCommandFromClient: (doCommander: doCommand, name: string, command: Struct | Record<string, JsonValue>, options?: Options, callOptions?: CallOptions) => Promise<JsonValue>;
31
31
  export declare const enableDebugLogging: (key?: string, opts?: CallOptions) => CallOptions;