@viamrobotics/sdk 0.74.0 → 0.74.2

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>;
@@ -12,6 +14,8 @@ export type MachineStatusState = proto.GetMachineStatusResponse_State;
12
14
  export type ModuleModel = PlainMessage<proto.ModuleModel>;
13
15
  export type ModuleStatus = PlainMessage<proto.ModuleStatus>;
14
16
  export type ModuleStatusState = proto.ModuleStatus_State;
17
+ export type PackageStatus = PlainMessage<proto.PackageStatus>;
18
+ export type PackageStatusState = proto.PackageStatus_State;
15
19
  export type ResourceRPCSubtype = PlainMessage<proto.ResourceRPCSubtype>;
16
20
  export type ResourceStatus = PlainMessage<proto.ResourceStatus>;
17
21
  export type Session = PlainMessage<proto.Session>;
@@ -223,5 +227,20 @@ export interface Robot {
223
227
  * @alpha
224
228
  */
225
229
  restartModule(moduleId?: string, moduleName?: string): Promise<void>;
230
+ /**
231
+ * Upload a file or directory from the robot to the cloud via the configured data manager service.
232
+ *
233
+ * @example
234
+ *
235
+ * ```ts
236
+ * const result = await machine.uploadDataFromPath('/data/logs');
237
+ * ```
238
+ *
239
+ * @param path - File or folder path on the robot to upload.
240
+ * @param uploadMetadata - Optional metadata to apply to uploaded files.
241
+ * @group Data
242
+ * @alpha
243
+ */
244
+ uploadDataFromPath(path: string, uploadMetadata?: UploadMetadata, extra?: Record<string, unknown>): Promise<UploadDataFromPathResponse>;
226
245
  }
227
246
  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/urdf.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ import type { KinematicsData } from './utils';
2
+ /**
3
+ * Parse a URDF XML document into the SDK's shared {@link KinematicsData} shape.
4
+ *
5
+ * @param urdf - The URDF document as an XML string.
6
+ */
7
+ export declare const parseUrdf: (urdf: string) => KinematicsData;
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.2",
4
4
  "description": "",
5
5
  "main": "./dist/main.umd.js",
6
6
  "module": "./dist/main.es.js",
@@ -58,7 +58,8 @@
58
58
  "@connectrpc/connect": "^1.7.0",
59
59
  "@connectrpc/connect-web": "^1.7.0",
60
60
  "bsonfy": "^1.0.2",
61
- "exponential-backoff": "^3.1.3"
61
+ "exponential-backoff": "^3.1.3",
62
+ "fast-xml-parser": "^5.10.1"
62
63
  },
63
64
  "devDependencies": {
64
65
  "@bufbuild/buf": "^1.70.0",