@viamrobotics/sdk 0.65.0 → 0.66.0

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.
Files changed (36) hide show
  1. package/dist/components/arm/client.d.ts +1 -1
  2. package/dist/components/audio-in/audio-in.d.ts +1 -1
  3. package/dist/components/audio-in/client.d.ts +2 -2
  4. package/dist/components/audio-out/audio-out.d.ts +1 -1
  5. package/dist/components/audio-out/client.d.ts +2 -2
  6. package/dist/components/base/client.d.ts +1 -1
  7. package/dist/components/board/client.d.ts +1 -1
  8. package/dist/components/button/client.d.ts +1 -1
  9. package/dist/components/camera/client.d.ts +1 -1
  10. package/dist/components/encoder/client.d.ts +1 -1
  11. package/dist/components/gantry/client.d.ts +1 -1
  12. package/dist/components/generic/client.d.ts +1 -1
  13. package/dist/components/gripper/client.d.ts +1 -1
  14. package/dist/components/input-controller/client.d.ts +1 -1
  15. package/dist/components/motor/client.d.ts +1 -1
  16. package/dist/components/movement-sensor/client.d.ts +1 -1
  17. package/dist/components/pose-tracker/client.d.ts +1 -1
  18. package/dist/components/power-sensor/client.d.ts +1 -1
  19. package/dist/components/sensor/client.d.ts +1 -1
  20. package/dist/components/servo/client.d.ts +1 -1
  21. package/dist/components/switch/client.d.ts +1 -1
  22. package/dist/main.es.js +21 -19
  23. package/dist/main.umd.js +2 -2
  24. package/dist/services/data-manager/client.d.ts +1 -1
  25. package/dist/services/discovery/client.d.ts +1 -1
  26. package/dist/services/generic/client.d.ts +1 -1
  27. package/dist/services/motion/client.d.ts +1 -1
  28. package/dist/services/navigation/client.d.ts +1 -1
  29. package/dist/services/slam/client.d.ts +1 -1
  30. package/dist/services/video/client.d.ts +1 -1
  31. package/dist/services/video/video.d.ts +1 -1
  32. package/dist/services/vision/client.d.ts +1 -1
  33. package/dist/services/world-state-store/client.d.ts +1 -1
  34. package/dist/types.d.ts +10 -5
  35. package/dist/utils.d.ts +23 -2
  36. package/package.json +1 -1
@@ -26,5 +26,5 @@ export declare class ArmClient implements Arm {
26
26
  getJointPositions(extra?: {}, callOptions?: CallOptions): Promise<JointPositions>;
27
27
  stop(extra?: {}, callOptions?: CallOptions): Promise<void>;
28
28
  isMoving(callOptions?: CallOptions): Promise<boolean>;
29
- doCommand(command: Struct, callOptions?: CallOptions): Promise<JsonValue>;
29
+ doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
30
30
  }
@@ -32,5 +32,5 @@ export interface AudioIn extends Resource {
32
32
  * const properties = await audioIn.getProperties();
33
33
  * ```
34
34
  */
35
- getProperties: () => Promise<AudioProperties>;
35
+ getProperties: (extra?: Struct) => Promise<AudioProperties>;
36
36
  }
@@ -10,10 +10,10 @@ export declare class AudioInClient implements AudioIn {
10
10
  callOptions: CallOptions;
11
11
  constructor(client: RobotClient, name: string, options?: Options);
12
12
  getAudio(codec: string, durationSeconds: number, previousTimestamp?: bigint, extra?: {}, callOptions?: CallOptions): AsyncIterable<AudioChunk>;
13
- getProperties(callOptions?: CallOptions): Promise<{
13
+ getProperties(extra?: {}, callOptions?: CallOptions): Promise<{
14
14
  supportedCodecs: string[];
15
15
  sampleRateHz: number;
16
16
  numChannels: number;
17
17
  }>;
18
- doCommand(command: Struct, callOptions?: CallOptions): Promise<JsonValue>;
18
+ doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
19
19
  }
@@ -30,5 +30,5 @@ export interface AudioOut extends Resource {
30
30
  * const properties = await audioOut.getProperties();
31
31
  * ```
32
32
  */
33
- getProperties: () => Promise<AudioProperties>;
33
+ getProperties: (extra?: Struct) => Promise<AudioProperties>;
34
34
  }
@@ -16,10 +16,10 @@ export declare class AudioOutClient implements AudioOut {
16
16
  callOptions: CallOptions;
17
17
  constructor(client: RobotClient, name: string, options?: Options);
18
18
  play(audioData: Uint8Array, audioInfo?: AudioInfo, extra?: {}, callOptions?: CallOptions): Promise<void>;
19
- getProperties(callOptions?: CallOptions): Promise<{
19
+ getProperties(extra?: {}, callOptions?: CallOptions): Promise<{
20
20
  supportedCodecs: string[];
21
21
  sampleRateHz: number;
22
22
  numChannels: number;
23
23
  }>;
24
- doCommand(command: Struct, callOptions?: CallOptions): Promise<JsonValue>;
24
+ doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
25
25
  }
@@ -21,6 +21,6 @@ export declare class BaseClient implements Base {
21
21
  setVelocity(linear: Vector3, angular: Vector3, extra?: {}, callOptions?: CallOptions): Promise<void>;
22
22
  stop(extra?: {}, callOptions?: CallOptions): Promise<void>;
23
23
  isMoving(callOptions?: CallOptions): Promise<boolean>;
24
- doCommand(command: Struct, callOptions?: CallOptions): Promise<JsonValue>;
24
+ doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
25
25
  getProperties(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/component/base/v1/base_pb").GetPropertiesResponse>;
26
26
  }
@@ -25,5 +25,5 @@ export declare class BoardClient implements Board {
25
25
  getDigitalInterruptValue(digitalInterruptName: string, extra?: {}, callOptions?: CallOptions): Promise<number>;
26
26
  streamTicks(interrupts: string[], queue: Tick[], extra?: {}, callOptions?: CallOptions): Promise<void>;
27
27
  setPowerMode(powerMode: PowerMode, duration?: Duration, extra?: {}, callOptions?: CallOptions): Promise<void>;
28
- doCommand(command: Struct, callOptions?: CallOptions): Promise<JsonValue>;
28
+ doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
29
29
  }
@@ -15,5 +15,5 @@ export declare class ButtonClient implements Button {
15
15
  callOptions: CallOptions;
16
16
  constructor(client: RobotClient, name: string, options?: Options);
17
17
  push(extra?: {}, callOptions?: CallOptions): Promise<void>;
18
- doCommand(command: Struct, callOptions?: CallOptions): Promise<JsonValue>;
18
+ doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
19
19
  }
@@ -25,5 +25,5 @@ export declare class CameraClient implements Camera {
25
25
  }>;
26
26
  getPointCloud(extra?: {}, callOptions?: CallOptions): Promise<Uint8Array>;
27
27
  getProperties(callOptions?: CallOptions): Promise<import("../../gen/component/camera/v1/camera_pb").GetPropertiesResponse>;
28
- doCommand(command: Struct, callOptions?: CallOptions): Promise<JsonValue>;
28
+ doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
29
29
  }
@@ -17,5 +17,5 @@ export declare class EncoderClient implements Encoder {
17
17
  resetPosition(extra?: {}, callOptions?: CallOptions): Promise<void>;
18
18
  getProperties(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/component/encoder/v1/encoder_pb").GetPropertiesResponse>;
19
19
  getPosition(positionType?: EncoderPositionType, extra?: {}, callOptions?: CallOptions): Promise<readonly [number, import("../../gen/component/encoder/v1/encoder_pb").PositionType]>;
20
- doCommand(command: Struct, callOptions?: CallOptions): Promise<JsonValue>;
20
+ doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
21
21
  }
@@ -23,5 +23,5 @@ export declare class GantryClient implements Gantry {
23
23
  getLengths(extra?: {}, callOptions?: CallOptions): Promise<number[]>;
24
24
  stop(extra?: {}, callOptions?: CallOptions): Promise<void>;
25
25
  isMoving(callOptions?: CallOptions): Promise<boolean>;
26
- doCommand(command: Struct, callOptions?: CallOptions): Promise<JsonValue>;
26
+ doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
27
27
  }
@@ -15,5 +15,5 @@ export declare class GenericClient implements Generic {
15
15
  callOptions: CallOptions;
16
16
  constructor(client: RobotClient, name: string, options?: Options);
17
17
  getGeometries(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/common/v1/common_pb").Geometry[]>;
18
- doCommand(command: Struct, callOptions?: CallOptions): Promise<JsonValue>;
18
+ doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
19
19
  }
@@ -20,5 +20,5 @@ export declare class GripperClient implements Gripper {
20
20
  stop(extra?: {}, callOptions?: CallOptions): Promise<void>;
21
21
  isMoving(callOptions?: CallOptions): Promise<boolean>;
22
22
  isHoldingSomething(extra?: {}, callOptions?: CallOptions): Promise<boolean>;
23
- doCommand(command: Struct, callOptions?: CallOptions): Promise<JsonValue>;
23
+ doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
24
24
  }
@@ -16,5 +16,5 @@ export declare class InputControllerClient implements InputController {
16
16
  constructor(client: RobotClient, name: string, options?: Options);
17
17
  getEvents(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/component/inputcontroller/v1/input_controller_pb").Event[]>;
18
18
  triggerEvent(event: InputControllerEvent, extra?: {}, callOptions?: CallOptions): Promise<void>;
19
- doCommand(command: Struct, callOptions?: CallOptions): Promise<JsonValue>;
19
+ doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
20
20
  }
@@ -26,5 +26,5 @@ export declare class MotorClient implements Motor {
26
26
  getPosition(extra?: {}, callOptions?: CallOptions): Promise<number>;
27
27
  isPowered(extra?: {}, callOptions?: CallOptions): Promise<readonly [boolean, number]>;
28
28
  isMoving(callOptions?: CallOptions): Promise<boolean>;
29
- doCommand(command: Struct, callOptions?: CallOptions): Promise<JsonValue>;
29
+ doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
30
30
  }
@@ -23,5 +23,5 @@ export declare class MovementSensorClient implements MovementSensor {
23
23
  getAccuracy(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/component/movementsensor/v1/movementsensor_pb").GetAccuracyResponse>;
24
24
  getLinearAcceleration(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/common/v1/common_pb").Vector3>;
25
25
  getReadings(extra?: {}, callOptions?: CallOptions): Promise<Record<string, JsonValue>>;
26
- doCommand(command: Struct, callOptions?: CallOptions): Promise<JsonValue>;
26
+ doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
27
27
  }
@@ -15,5 +15,5 @@ export declare class PoseTrackerClient implements PoseTracker {
15
15
  callOptions: CallOptions;
16
16
  constructor(client: RobotClient, name: string, options?: Options);
17
17
  getGeometries(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/common/v1/common_pb").Geometry[]>;
18
- doCommand(command: Struct, callOptions?: CallOptions): Promise<JsonValue>;
18
+ doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
19
19
  }
@@ -18,5 +18,5 @@ export declare class PowerSensorClient implements PowerSensor {
18
18
  getCurrent(extra?: {}, callOptions?: CallOptions): Promise<readonly [number, boolean]>;
19
19
  getPower(extra?: {}, callOptions?: CallOptions): Promise<number>;
20
20
  getReadings(extra?: {}, callOptions?: CallOptions): Promise<Record<string, JsonValue>>;
21
- doCommand(command: Struct, callOptions?: CallOptions): Promise<JsonValue>;
21
+ doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
22
22
  }
@@ -15,5 +15,5 @@ export declare class SensorClient implements Sensor {
15
15
  callOptions: CallOptions;
16
16
  constructor(client: RobotClient, name: string, options?: Options);
17
17
  getReadings(extra?: {}, callOptions?: CallOptions): Promise<Record<string, JsonValue>>;
18
- doCommand(command: Struct, callOptions?: CallOptions): Promise<JsonValue>;
18
+ doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
19
19
  }
@@ -18,5 +18,5 @@ export declare class ServoClient implements Servo {
18
18
  getPosition(extra?: {}, callOptions?: CallOptions): Promise<number>;
19
19
  stop(extra?: {}, callOptions?: CallOptions): Promise<void>;
20
20
  isMoving(callOptions?: CallOptions): Promise<boolean>;
21
- doCommand(command: Struct, callOptions?: CallOptions): Promise<JsonValue>;
21
+ doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
22
22
  }
@@ -17,5 +17,5 @@ export declare class SwitchClient implements Switch {
17
17
  setPosition(position: number, extra?: {}, callOptions?: CallOptions): Promise<void>;
18
18
  getPosition(extra?: {}, callOptions?: CallOptions): Promise<number>;
19
19
  getNumberOfPositions(extra?: {}, callOptions?: CallOptions): Promise<[number, string[]]>;
20
- doCommand(command: Struct, callOptions?: CallOptions): Promise<JsonValue>;
20
+ doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
21
21
  }
package/dist/main.es.js CHANGED
@@ -6933,11 +6933,11 @@ const Dn = (t) => {
6933
6933
  WorldState: Yr,
6934
6934
  safety_heartbeat_monitored: jr
6935
6935
  }, Symbol.toStringTag, { value: "Module" })), An = new Headers({
6936
- viam_client: `typescript;v0.65.0;${z1}`
6936
+ viam_client: `typescript;v0.66.0;${z1}`
6937
6937
  }), A = async function(e, n, a, o = {}, i = {}) {
6938
6938
  const r = new P({
6939
6939
  name: n,
6940
- command: a
6940
+ command: a instanceof p ? a : p.fromJson(a)
6941
6941
  });
6942
6942
  o.requestLogger?.(r);
6943
6943
  const l = (await e(r, i)).result?.toJson();
@@ -28675,16 +28675,17 @@ class XI {
28675
28675
  requestID: l.requestId
28676
28676
  });
28677
28677
  }
28678
- async getProperties(e = this.callOptions) {
28679
- const n = new Bn({
28680
- name: this.name
28678
+ async getProperties(e = {}, n = this.callOptions) {
28679
+ const a = new Bn({
28680
+ name: this.name,
28681
+ extra: p.fromJson(e)
28681
28682
  });
28682
- this.options.requestLogger?.(n);
28683
- const a = await this.client.getProperties(n, e);
28683
+ this.options.requestLogger?.(a);
28684
+ const o = await this.client.getProperties(a, n);
28684
28685
  return {
28685
- supportedCodecs: a.supportedCodecs,
28686
- sampleRateHz: a.sampleRateHz,
28687
- numChannels: a.numChannels
28686
+ supportedCodecs: o.supportedCodecs,
28687
+ sampleRateHz: o.sampleRateHz,
28688
+ numChannels: o.numChannels
28688
28689
  };
28689
28690
  }
28690
28691
  async doCommand(e, n = this.callOptions) {
@@ -28795,16 +28796,17 @@ class ZI {
28795
28796
  });
28796
28797
  this.options.requestLogger?.(i), await this.client.play(i, o);
28797
28798
  }
28798
- async getProperties(e = this.callOptions) {
28799
- const n = new Bn({
28800
- name: this.name
28799
+ async getProperties(e = {}, n = this.callOptions) {
28800
+ const a = new Bn({
28801
+ name: this.name,
28802
+ extra: p.fromJson(e)
28801
28803
  });
28802
- this.options.requestLogger?.(n);
28803
- const a = await this.client.getProperties(n, e);
28804
+ this.options.requestLogger?.(a);
28805
+ const o = await this.client.getProperties(a, n);
28804
28806
  return {
28805
- supportedCodecs: a.supportedCodecs,
28806
- sampleRateHz: a.sampleRateHz,
28807
- numChannels: a.numChannels
28807
+ supportedCodecs: o.supportedCodecs,
28808
+ sampleRateHz: o.sampleRateHz,
28809
+ numChannels: o.numChannels
28808
28810
  };
28809
28811
  }
28810
28812
  async doCommand(e, n = this.callOptions) {
@@ -31249,7 +31251,7 @@ class _M {
31249
31251
  );
31250
31252
  }
31251
31253
  }
31252
- const SM = "0.65.0";
31254
+ const SM = "0.66.0";
31253
31255
  export {
31254
31256
  aE as AnalogValue,
31255
31257
  KI as ArmClient,