@viamrobotics/sdk 0.0.50 → 0.0.51

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.
@@ -7,7 +7,7 @@ export interface Properties {
7
7
  /** Camera distortion parameters, if available. */
8
8
  distortionParameters?: DistortionParameters.AsObject;
9
9
  }
10
- export type MimeType = 'image/vnd.viam.rgba' | 'image/jpeg' | 'image/png' | 'pointcloud/pcd' | 'unsupported';
10
+ export type MimeType = '' | 'image/vnd.viam.rgba' | 'image/jpeg' | 'image/png' | 'pointcloud/pcd' | 'unsupported';
11
11
  /** Represents any physical hardware that can capture frames. */
12
12
  export interface Camera {
13
13
  /**
@@ -16,14 +16,14 @@ export interface Camera {
16
16
  * @param mimeType - A specific MIME type to request. This is not necessarily
17
17
  * the same type that will be returned.
18
18
  */
19
- getImage: (mimeType: MimeType) => Promise<Uint8Array>;
19
+ getImage: (mimeType?: MimeType) => Promise<Uint8Array>;
20
20
  /**
21
21
  * Render a frame from a camera to an HTTP response.
22
22
  *
23
23
  * @param mimeType - A specific MIME type to request. This is not necessarily
24
24
  * the same type that will be returned.
25
25
  */
26
- renderFrame: (mimeType: MimeType) => Promise<Blob>;
26
+ renderFrame: (mimeType?: MimeType) => Promise<Blob>;
27
27
  /** Return a point cloud from a camera. */
28
28
  getPointCloud: () => Promise<Uint8Array>;
29
29
  /** Return the camera properties. */
@@ -13,8 +13,8 @@ export declare class CameraClient implements Camera {
13
13
  private readonly options;
14
14
  constructor(client: RobotClient, name: string, options?: Options);
15
15
  private get cameraService();
16
- getImage(mimeType: MimeType): Promise<Uint8Array>;
17
- renderFrame(mimeType: MimeType): Promise<Blob>;
16
+ getImage(mimeType?: MimeType): Promise<Uint8Array>;
17
+ renderFrame(mimeType?: MimeType): Promise<Blob>;
18
18
  getPointCloud(): Promise<Uint8Array>;
19
19
  getProperties(): Promise<pb.GetPropertiesResponse.AsObject>;
20
20
  }
@@ -1,2 +1,2 @@
1
- export type { Camera } from './camera/Camera';
1
+ export type { Camera, MimeType } from './camera/Camera';
2
2
  export { CameraClient } from './camera/Client';
package/dist/main.d.ts CHANGED
@@ -58,7 +58,7 @@ export { type Board, BoardClient } from './components/board';
58
58
  * @group Raw Protobufs
59
59
  */
60
60
  export { default as cameraApi } from './gen/component/camera/v1/camera_pb';
61
- export { type Camera, CameraClient } from './components/camera';
61
+ export { type Camera, type MimeType, CameraClient } from './components/camera';
62
62
  /**
63
63
  * Raw Protobuf interfaces for an Encoder component.
64
64
  *
package/dist/main.es.js CHANGED
@@ -39619,15 +39619,15 @@ class CameraClient {
39619
39619
  get cameraService() {
39620
39620
  return this.client;
39621
39621
  }
39622
- async getImage(e) {
39622
+ async getImage(e = "") {
39623
39623
  const s = this.cameraService, i = new camera_pb.GetImageRequest();
39624
39624
  return i.setName(this.name), i.setMimeType(e), this.options.requestLogger?.(i), (await promisify(
39625
39625
  s.getImage.bind(s),
39626
39626
  i
39627
39627
  )).getImage_asU8();
39628
39628
  }
39629
- async renderFrame(e) {
39630
- const s = this.cameraService, i = new camera_pb.GetPointCloudRequest();
39629
+ async renderFrame(e = "") {
39630
+ const s = this.cameraService, i = new camera_pb.RenderFrameRequest();
39631
39631
  i.setName(this.name), i.setMimeType(e), this.options.requestLogger?.(i);
39632
39632
  const u = await promisify(
39633
39633
  s.renderFrame.bind(s),
@@ -40682,7 +40682,7 @@ class DataManagerClient {
40682
40682
  );
40683
40683
  }
40684
40684
  }
40685
- const version = "0.0.50";
40685
+ const version = "0.0.51";
40686
40686
  export {
40687
40687
  ArmClient,
40688
40688
  BaseClient,