@viamrobotics/sdk 0.63.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.
@@ -1 +1 @@
1
- export declare const apiVersion = "v0.1.518";
1
+ export declare const apiVersion = "v0.1.521";
@@ -633,12 +633,16 @@ export declare class AppClient {
633
633
  * @param filter Optional string to filter logs on
634
634
  * @param levels Optional array of log levels to return. Defaults to returning
635
635
  * all log levels
636
+ * @param start Optional start time for log retrieval. Only logs created after
637
+ * this time will be returned.
638
+ * @param end Optional end time for log retrieval. Only logs created before
639
+ * this time will be returned.
636
640
  * @param pageToken Optional string indicating which page of logs to query.
637
641
  * Defaults to the most recent
638
642
  * @returns The robot requested logs and the page token for the next page of
639
643
  * logs
640
644
  */
641
- getRobotPartLogs(id: string, filter?: string, levels?: string[], pageToken?: string): Promise<GetRobotPartLogsResponse>;
645
+ getRobotPartLogs(id: string, filter?: string, levels?: string[], start?: Date, end?: Date, pageToken?: string): Promise<GetRobotPartLogsResponse>;
642
646
  /**
643
647
  * Get a stream of log entries for a specific robot part. Logs are sorted by
644
648
  * descending time (newest first).
@@ -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
  }
@@ -411,20 +411,30 @@ export declare class UploadMetadata extends Message<UploadMetadata> {
411
411
  type: DataType;
412
412
 
413
413
  /**
414
- * @generated from field: string file_name = 7;
414
+ * @generated from field: map<string, google.protobuf.Any> method_parameters = 8;
415
415
  */
416
- fileName: string;
416
+ methodParameters: { [key: string]: Any };
417
417
 
418
418
  /**
419
- * @generated from field: map<string, google.protobuf.Any> method_parameters = 8;
419
+ * @generated from field: string file_name = 7;
420
420
  */
421
- methodParameters: { [key: string]: Any };
421
+ fileName: string;
422
422
 
423
423
  /**
424
424
  * @generated from field: string file_extension = 9;
425
425
  */
426
426
  fileExtension: string;
427
427
 
428
+ /**
429
+ * @generated from field: google.protobuf.Timestamp file_create_time = 14;
430
+ */
431
+ fileCreateTime?: Timestamp;
432
+
433
+ /**
434
+ * @generated from field: google.protobuf.Timestamp file_modify_time = 15;
435
+ */
436
+ fileModifyTime?: Timestamp;
437
+
428
438
  /**
429
439
  * @generated from field: repeated string tags = 10;
430
440
  */
@@ -481,19 +481,35 @@ export declare class IsMovingResponse extends Message<IsMovingResponse> {
481
481
  */
482
482
  export declare class MoveOptions extends Message<MoveOptions> {
483
483
  /**
484
- * Maximum allowable velocity of an arm joint, in degrees per second
484
+ * Maximum allowable velocity of an arm joint, in degrees per second.
485
+ * Ignored when max_vel_degs_per_sec_joints is set.
485
486
  *
486
487
  * @generated from field: optional double max_vel_degs_per_sec = 1;
487
488
  */
488
489
  maxVelDegsPerSec?: number;
489
490
 
490
491
  /**
491
- * Maximum allowable acceleration of an arm joint, in degrees per second squared
492
+ * Maximum allowable acceleration of an arm joint, in degrees per second squared.
493
+ * ignored when max_acc_degs_per_sec2_joints is set.
492
494
  *
493
495
  * @generated from field: optional double max_acc_degs_per_sec2 = 2;
494
496
  */
495
497
  maxAccDegsPerSec2?: number;
496
498
 
499
+ /**
500
+ * Per-joint maximum velocity in degrees per second.
501
+ *
502
+ * @generated from field: repeated double max_vel_degs_per_sec_joints = 3;
503
+ */
504
+ maxVelDegsPerSecJoints: number[];
505
+
506
+ /**
507
+ * Per-joint maximum acceleration in degrees per second squared.
508
+ *
509
+ * @generated from field: repeated double max_acc_degs_per_sec2_joints = 4;
510
+ */
511
+ maxAccDegsPerSec2Joints: number[];
512
+
497
513
  constructor(data?: PartialMessage<MoveOptions>);
498
514
 
499
515
  static readonly runtime: typeof proto3;