@viamrobotics/sdk 0.64.0 → 0.64.1

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.
@@ -60,6 +60,28 @@ export interface FileUploadOptions {
60
60
  /** Optional list of datasets to add the data to. */
61
61
  datasetIds?: string[];
62
62
  }
63
+ /** Optional parameters for uploading binary sensor data. */
64
+ export interface BinaryDataCaptureUploadOptions {
65
+ /**
66
+ * Optional MIME type of the binary data (for example, "image/jpeg").
67
+ *
68
+ * If provided, the backend will use this value. Otherwise, it may derive the
69
+ * MIME type from the file extension.
70
+ */
71
+ mimeType?: string;
72
+ /**
73
+ * Optional file extension of the binary data including the period, for
74
+ * example ".jpg", ".png", or ".pcd".
75
+ */
76
+ fileExtension?: string;
77
+ /**
78
+ * Optional list of tags to allow for tag-based filtering when retrieving
79
+ * data.
80
+ */
81
+ tags?: string[];
82
+ /** Optional list of dataset IDs to add the data to. */
83
+ datasetIds?: string[];
84
+ }
63
85
  export type Dataset = Partial<PBDataset> & {
64
86
  created?: Date;
65
87
  };
@@ -813,8 +835,8 @@ export declare class DataClient {
813
835
  * 'rdk:component:camera',
814
836
  * 'my-camera',
815
837
  * 'ReadImage',
816
- * '.jpg',
817
- * [new Date('2025-03-19'), new Date('2025-03-19')]
838
+ * [new Date('2025-03-19'), new Date('2025-03-19')],
839
+ * { mimeType: 'image/jpeg' }
818
840
  * );
819
841
  * ```
820
842
  *
@@ -827,17 +849,18 @@ export declare class DataClient {
827
849
  * (for example, "movementSensor")
828
850
  * @param componentName The name of the component used to capture the data
829
851
  * @param methodName The name of the method used to capture the data.
830
- * @param fileExtension The file extension of binary data including the
831
- * period, for example .jpg, .png, or .pcd. The backend will route the
832
- * binary to its corresponding mime type based on this extension. Files with
833
- * a .jpeg, .jpg, or .png extension will be saved to the images tab.
834
- * @param tags The list of tags to allow for tag-based filtering when
835
- * retrieving data
836
852
  * @param dataRequestTimes Tuple containing `Date` objects denoting the times
837
853
  * this data was requested[0] by the robot and received[1] from the
838
854
  * appropriate sensor.
855
+ * @param options Optional parameters including `mimeType`, `fileExtension`,
856
+ * `tags`, and `datasetIds`.
839
857
  * @returns The binary data ID of the uploaded data
840
858
  */
859
+ binaryDataCaptureUpload(binaryData: Uint8Array, partId: string, componentType: string, componentName: string, methodName: string, dataRequestTimes: [Date, Date], options?: BinaryDataCaptureUploadOptions): Promise<string>;
860
+ /**
861
+ * @deprecated Use the overload that takes `(dataRequestTimes, options)` to
862
+ * provide `mimeType`, `fileExtension`, `tags`, and `datasetIds`.
863
+ */
841
864
  binaryDataCaptureUpload(binaryData: Uint8Array, partId: string, componentType: string, componentName: string, methodName: string, fileExtension: string, dataRequestTimes: [Date, Date], tags?: string[], datasetIds?: string[]): Promise<string>;
842
865
  /**
843
866
  * Upload arbitrary file data.
@@ -19,5 +19,6 @@ export declare class GripperClient implements Gripper {
19
19
  grab(extra?: {}, callOptions?: CallOptions): Promise<void>;
20
20
  stop(extra?: {}, callOptions?: CallOptions): Promise<void>;
21
21
  isMoving(callOptions?: CallOptions): Promise<boolean>;
22
+ isHoldingSomething(extra?: {}, callOptions?: CallOptions): Promise<boolean>;
22
23
  doCommand(command: Struct, callOptions?: CallOptions): Promise<JsonValue>;
23
24
  }
@@ -85,4 +85,22 @@ export interface Gripper extends Resource {
85
85
  * API](https://docs.viam.com/dev/reference/apis/components/gripper/#ismoving).
86
86
  */
87
87
  isMoving: () => Promise<boolean>;
88
+ /**
89
+ * Get information about whether the gripper is currently holding onto an
90
+ * object.
91
+ *
92
+ * @example
93
+ *
94
+ * ```ts
95
+ * const gripper = new VIAM.GripperClient(machine, 'my_gripper');
96
+ *
97
+ * // Check if the gripper is holding something
98
+ * const holding = await gripper.isHoldingSomething();
99
+ * console.log('Gripper is holding something:', holding);
100
+ * ```
101
+ *
102
+ * For more information, see [Gripper
103
+ * API](https://docs.viam.com/dev/reference/apis/components/gripper/#isholdingsomething).
104
+ */
105
+ isHoldingSomething: (extra?: Struct) => Promise<boolean>;
88
106
  }