@viamrobotics/sdk 0.0.44 → 0.0.46

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.
@@ -0,0 +1,19 @@
1
+ import type { RobotClient } from '../../robot';
2
+ import type { Options } from '../../types';
3
+ import type { Gripper } from './gripper';
4
+ /**
5
+ * A gRPC-web client for the Gripper component.
6
+ *
7
+ * @group Clients
8
+ */
9
+ export declare class GripperClient implements Gripper {
10
+ private client;
11
+ private readonly name;
12
+ private readonly options;
13
+ constructor(client: RobotClient, name: string, options?: Options);
14
+ private get gripperService();
15
+ open(extra?: {}): Promise<void>;
16
+ grab(extra?: {}): Promise<void>;
17
+ stop(extra?: {}): Promise<void>;
18
+ isMoving(): Promise<boolean>;
19
+ }
@@ -0,0 +1,12 @@
1
+ import type { Extra } from '../../types';
2
+ /** Represents a physical robotic gripper. */
3
+ export interface Gripper {
4
+ /** Open a gripper of the underlying robot. */
5
+ open: (extra?: Extra) => Promise<void>;
6
+ /** Request a gripper of the underlying robot to grab. */
7
+ grab: (extra?: Extra) => Promise<void>;
8
+ /** Stop a robot's gripper. */
9
+ stop: (extra?: Extra) => Promise<void>;
10
+ /** Report if the gripper is in motion. */
11
+ isMoving: () => Promise<boolean>;
12
+ }
@@ -0,0 +1,2 @@
1
+ export type { Gripper } from './gripper/gripper';
2
+ export { GripperClient } from './gripper/client';
package/dist/main.d.ts CHANGED
@@ -203,29 +203,12 @@ export { default as genericApi } from './gen/component/generic/v1/generic_pb';
203
203
  *
204
204
  * Generated with https://github.com/improbable-eng/grpc-web
205
205
  *
206
- * @example
207
- *
208
- * ```ts
209
- * import { grpc } from '@improbable-eng/grpc-web';
210
- *
211
- * const client = {}; // replace with a connected robot client
212
- *
213
- * const request = new gripperApi.IsMovingRequest();
214
- * request.setName('mygripper');
215
- *
216
- * client.gripperService.isMoving(
217
- * request,
218
- * new grpc.Metadata(),
219
- * (error, response) => {
220
- * // do something with error or response
221
- * }
222
- * );
223
- * ```
224
- *
206
+ * @deprecated Use {@link GripperClient} instead.
225
207
  * @alpha
226
208
  * @group Raw Protobufs
227
209
  */
228
210
  export { default as gripperApi } from './gen/component/gripper/v1/gripper_pb';
211
+ export { type Gripper, GripperClient } from './components/gripper';
229
212
  /**
230
213
  * Raw Protobuf interfaces for an InputController component.
231
214
  *