@viamrobotics/sdk 0.74.0 → 0.74.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.
@@ -3,9 +3,10 @@ import { type CallOptions, type Client } from '@connectrpc/connect';
3
3
  import { type Credentials } from '../app/viam-transport';
4
4
  import { EventDispatcher, MachineConnectionEvent } from '../events';
5
5
  import type { PoseInFrame, Transform } from '../gen/common/v1/common_pb';
6
- import { GetModelsFromModulesRequest, GetPoseRequest, RestartModuleRequest, TransformPCDRequest, TransformPoseRequest } from '../gen/robot/v1/robot_pb';
6
+ import { GetModelsFromModulesRequest, GetPoseRequest, RestartModuleRequest, TransformPCDRequest, TransformPoseRequest, UploadDataFromPathRequest } from '../gen/robot/v1/robot_pb';
7
7
  import type { Robot } from './robot';
8
8
  import type { AccessToken, Credential } from '../main';
9
+ import type { UploadMetadata } from '../gen/app/datasync/v1/data_sync_pb';
9
10
  interface ICEServer {
10
11
  urls: string;
11
12
  username?: string;
@@ -384,6 +385,12 @@ export declare class RobotClient extends EventDispatcher<RobotClientDispatchEven
384
385
  readonly O: typeof import("../gen/robot/v1/robot_pb").SendTracesResponse;
385
386
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
386
387
  };
388
+ readonly uploadDataFromPath: {
389
+ readonly name: "UploadDataFromPath";
390
+ readonly I: typeof UploadDataFromPathRequest;
391
+ readonly O: typeof import("../gen/robot/v1/robot_pb").UploadDataFromPathResponse;
392
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
393
+ };
387
394
  };
388
395
  }>;
389
396
  get armService(): Client<{
@@ -1453,5 +1460,6 @@ export declare class RobotClient extends EventDispatcher<RobotClientDispatchEven
1453
1460
  getVersion(): Promise<import("../gen/robot/v1/robot_pb").GetVersionResponse>;
1454
1461
  restartModule(moduleId?: string, moduleName?: string): Promise<void>;
1455
1462
  getPose(componentName: string, destinationFrame: string, supplementalTransforms: Transform[]): Promise<PoseInFrame>;
1463
+ uploadDataFromPath(path: string, uploadMetadata?: UploadMetadata, extra?: {}): Promise<import("../gen/robot/v1/robot_pb").UploadDataFromPathResponse>;
1456
1464
  }
1457
1465
  export {};
@@ -2,8 +2,10 @@ import type { PlainMessage, Struct } from '@bufbuild/protobuf';
2
2
  import type { CallOptions } from '@connectrpc/connect';
3
3
  import { type MachineConnectionEvent } from '../events';
4
4
  import type * as proto from '../gen/robot/v1/robot_pb';
5
+ import type { UploadMetadata } from '../gen/app/datasync/v1/data_sync_pb';
5
6
  import type { PoseInFrame, ResourceName, Transform } from '../types';
6
7
  export type CloudMetadata = PlainMessage<proto.GetCloudMetadataResponse>;
8
+ export type UploadDataFromPathResponse = PlainMessage<proto.UploadDataFromPathResponse>;
7
9
  export type ConfigStatus = PlainMessage<proto.ConfigStatus>;
8
10
  export type FrameSystemConfig = PlainMessage<proto.FrameSystemConfig>;
9
11
  export type JobStatus = PlainMessage<proto.JobStatus>;
@@ -223,5 +225,20 @@ export interface Robot {
223
225
  * @alpha
224
226
  */
225
227
  restartModule(moduleId?: string, moduleName?: string): Promise<void>;
228
+ /**
229
+ * Upload a file or directory from the robot to the cloud via the configured data manager service.
230
+ *
231
+ * @example
232
+ *
233
+ * ```ts
234
+ * const result = await machine.uploadDataFromPath('/data/logs');
235
+ * ```
236
+ *
237
+ * @param path - File or folder path on the robot to upload.
238
+ * @param uploadMetadata - Optional metadata to apply to uploaded files.
239
+ * @group Data
240
+ * @alpha
241
+ */
242
+ uploadDataFromPath(path: string, uploadMetadata?: UploadMetadata, extra?: Record<string, unknown>): Promise<UploadDataFromPathResponse>;
226
243
  }
227
244
  export {};
@@ -25,6 +25,7 @@ export declare class VisionClient implements Vision {
25
25
  classificationsSupported: boolean;
26
26
  detectionsSupported: boolean;
27
27
  objectPointCloudsSupported: boolean;
28
+ defaultCamera: string | undefined;
28
29
  }>;
29
30
  captureAllFromCamera(cameraName: string, { returnImage, returnClassifications, returnDetections, returnObjectPointClouds, }: CaptureAllOptions, extra?: {}, callOptions?: CallOptions): Promise<{
30
31
  image: import("../../gen/component/camera/v1/camera_pb").Image | undefined;
@@ -14,6 +14,8 @@ export interface Properties {
14
14
  detectionsSupported: boolean;
15
15
  /** Whether or not 3d segmentation is supported by the vision service */
16
16
  objectPointCloudsSupported: boolean;
17
+ /** The default camera used for *FromCamera and GetObjectPointClouds calls */
18
+ defaultCamera?: string;
17
19
  }
18
20
  export interface CaptureAllOptions {
19
21
  returnImage: boolean;
package/dist/utils.d.ts CHANGED
@@ -45,6 +45,7 @@ export interface KinematicsData {
45
45
  min: number;
46
46
  }[];
47
47
  links: Frame[];
48
+ urdf?: string;
48
49
  }
49
50
  /** Newer kinematics return shape that includes meshes */
50
51
  export interface GetKinematicsResultWithMeshes {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viamrobotics/sdk",
3
- "version": "0.74.0",
3
+ "version": "0.74.1",
4
4
  "description": "",
5
5
  "main": "./dist/main.umd.js",
6
6
  "module": "./dist/main.es.js",