@viamrobotics/sdk 0.79.1 → 0.79.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.
@@ -1 +1 @@
1
- export declare const apiVersion = "v0.1.607";
1
+ export declare const apiVersion = "v0.1.610";
@@ -17,7 +17,7 @@ export declare class PowerSensorClient implements PowerSensor {
17
17
  getVoltage(extra?: {}, callOptions?: CallOptions): Promise<readonly [number, boolean]>;
18
18
  getCurrent(extra?: {}, callOptions?: CallOptions): Promise<readonly [number, boolean]>;
19
19
  getPower(extra?: {}, callOptions?: CallOptions): Promise<number>;
20
- getBatteryPercent(extra?: {}, callOptions?: CallOptions): Promise<number>;
20
+ getBatteryPercent(extra?: {}, callOptions?: CallOptions): Promise<readonly [number, boolean]>;
21
21
  getProperties(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/component/powersensor/v1/powersensor_pb").GetPropertiesResponse>;
22
22
  getReadings(extra?: {}, callOptions?: CallOptions): Promise<Record<string, JsonValue>>;
23
23
  getStatus(callOptions?: CallOptions): Promise<JsonValue>;
@@ -48,21 +48,23 @@ export interface PowerSensor extends Sensor {
48
48
  */
49
49
  getPower(extra?: Struct): Promise<number>;
50
50
  /**
51
- * Get the remaining battery charge as a percentage from 0 to 100.
51
+ * Get the remaining battery charge as a percentage from 0 to 100, and a boolean indicating
52
+ * whether the battery is charging.
52
53
  *
53
- * Check `isBatteryPercentSupported` from {@link getProperties} first.
54
+ * Check `isBatteryPercentSupported` from {@link getProperties} first. The charging boolean is only
55
+ * meaningful when `isChargingSupported` is true.
54
56
  *
55
57
  * @example
56
58
  *
57
59
  * ```ts
58
60
  * const powerSensor = new VIAM.PowerSensorClient(machine, 'my_power_sensor');
59
- * const percent = await powerSensor.getBatteryPercent();
61
+ * const [percent, isCharging] = await powerSensor.getBatteryPercent();
60
62
  * ```
61
63
  *
62
64
  * For more information, see [Power Sensor
63
65
  * API](https://docs.viam.com/reference/apis/components/power-sensor/#getbatterypercent).
64
66
  */
65
- getBatteryPercent(extra?: Struct): Promise<number>;
67
+ getBatteryPercent(extra?: Struct): Promise<readonly [number, boolean]>;
66
68
  /**
67
69
  * Get the properties of the power sensor, such as whether it supports {@link getBatteryPercent}.
68
70
  *
@@ -6,6 +6,7 @@
6
6
  import type { BinaryReadOptions, Duration, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage, Struct } from "@bufbuild/protobuf";
7
7
  import { Message, proto3 } from "@bufbuild/protobuf";
8
8
  import type { Geometry, LogEntry, ResourceName } from "../../common/v1/common_pb.js";
9
+ import type { ModuleStatus_State } from "../../robot/v1/robot_pb.js";
9
10
 
10
11
  /**
11
12
  * @generated from enum viam.app.v1.CredentialsType
@@ -1640,6 +1641,29 @@ export declare class AgentInfo extends Message<AgentInfo> {
1640
1641
  */
1641
1642
  platformTags: string[];
1642
1643
 
1644
+ /**
1645
+ * modules in the applied config (registry and local) with their running version and status
1646
+ *
1647
+ * @generated from field: repeated viam.app.v1.ModuleVersionInfo module_versions = 8;
1648
+ */
1649
+ moduleVersions: ModuleVersionInfo[];
1650
+
1651
+ /**
1652
+ * how long this viam-server process has been running, measured with a monotonic clock;
1653
+ * app anchors it to the time the request is received
1654
+ *
1655
+ * @generated from field: google.protobuf.Duration viam_server_uptime = 9;
1656
+ */
1657
+ viamServerUptime?: Duration;
1658
+
1659
+ /**
1660
+ * true while a pending reconfigure is being held back by the maintenance sensor;
1661
+ * false once that reconfigure is applied (or when nothing is pending)
1662
+ *
1663
+ * @generated from field: bool reconfigure_blocked = 10;
1664
+ */
1665
+ reconfigureBlocked: boolean;
1666
+
1643
1667
  constructor(data?: PartialMessage<AgentInfo>);
1644
1668
 
1645
1669
  static readonly runtime: typeof proto3;
@@ -1655,6 +1679,76 @@ export declare class AgentInfo extends Message<AgentInfo> {
1655
1679
  static equals(a: AgentInfo | PlainMessage<AgentInfo> | undefined, b: AgentInfo | PlainMessage<AgentInfo> | undefined): boolean;
1656
1680
  }
1657
1681
 
1682
+ /**
1683
+ * @generated from message viam.app.v1.ModuleVersionInfo
1684
+ */
1685
+ export declare class ModuleVersionInfo extends Message<ModuleVersionInfo> {
1686
+ /**
1687
+ * registry module ID, e.g. "viam:realsense" (empty for local modules)
1688
+ *
1689
+ * @generated from field: string module_id = 1;
1690
+ */
1691
+ moduleId: string;
1692
+
1693
+ /**
1694
+ * module name from the machine config; unique within the part
1695
+ *
1696
+ * @generated from field: string module_name = 8;
1697
+ */
1698
+ moduleName: string;
1699
+
1700
+ /**
1701
+ * version currently running ("local" for local modules; empty if not running or unknown)
1702
+ *
1703
+ * @generated from field: string running_version = 2;
1704
+ */
1705
+ runningVersion: string;
1706
+
1707
+ /**
1708
+ * how long the running version has been ready, measured with a monotonic clock; app anchors it
1709
+ * to the time the request is received (unset if not running)
1710
+ *
1711
+ * @generated from field: google.protobuf.Duration running_for = 3;
1712
+ */
1713
+ runningFor?: Duration;
1714
+
1715
+ /**
1716
+ * current lifecycle state of the module process
1717
+ *
1718
+ * @generated from field: viam.robot.v1.ModuleStatus.State state = 4;
1719
+ */
1720
+ state: ModuleStatus_State;
1721
+
1722
+ /**
1723
+ * failures since the module was last ready
1724
+ *
1725
+ * @generated from field: uint32 consecutive_failures = 6;
1726
+ */
1727
+ consecutiveFailures: number;
1728
+
1729
+ /**
1730
+ * times the module has become ready since viam-server started, including the first start;
1731
+ * only goes up, and resets when viam-server restarts
1732
+ *
1733
+ * @generated from field: uint32 ready_count = 7;
1734
+ */
1735
+ readyCount: number;
1736
+
1737
+ constructor(data?: PartialMessage<ModuleVersionInfo>);
1738
+
1739
+ static readonly runtime: typeof proto3;
1740
+ static readonly typeName = "viam.app.v1.ModuleVersionInfo";
1741
+ static readonly fields: FieldList;
1742
+
1743
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ModuleVersionInfo;
1744
+
1745
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ModuleVersionInfo;
1746
+
1747
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ModuleVersionInfo;
1748
+
1749
+ static equals(a: ModuleVersionInfo | PlainMessage<ModuleVersionInfo> | undefined, b: ModuleVersionInfo | PlainMessage<ModuleVersionInfo> | undefined): boolean;
1750
+ }
1751
+
1658
1752
  /**
1659
1753
  * @generated from message viam.app.v1.ConfigRequest
1660
1754
  */
@@ -395,6 +395,40 @@ export declare class Capsule extends Message<Capsule> {
395
395
  static equals(a: Capsule | PlainMessage<Capsule> | undefined, b: Capsule | PlainMessage<Capsule> | undefined): boolean;
396
396
  }
397
397
 
398
+ /**
399
+ * Cylinder is a solid right circular cylinder, flat end caps included, whose axis is the local Z
400
+ * axis of the geometry's center pose.
401
+ *
402
+ * @generated from message viam.common.v1.Cylinder
403
+ */
404
+ export declare class Cylinder extends Message<Cylinder> {
405
+ /**
406
+ * @generated from field: double radius_mm = 1;
407
+ */
408
+ radiusMm: number;
409
+
410
+ /**
411
+ * Full end-to-end length along the cylinder's axis.
412
+ *
413
+ * @generated from field: double length_mm = 2;
414
+ */
415
+ lengthMm: number;
416
+
417
+ constructor(data?: PartialMessage<Cylinder>);
418
+
419
+ static readonly runtime: typeof proto3;
420
+ static readonly typeName = "viam.common.v1.Cylinder";
421
+ static readonly fields: FieldList;
422
+
423
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Cylinder;
424
+
425
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Cylinder;
426
+
427
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Cylinder;
428
+
429
+ static equals(a: Cylinder | PlainMessage<Cylinder> | undefined, b: Cylinder | PlainMessage<Cylinder> | undefined): boolean;
430
+ }
431
+
398
432
  /**
399
433
  * RectangularPrism contains a Vector3 field corresponding to the X, Y, Z dimensions of the prism in mms
400
434
  * These dimensions are with respect to the referenceframe in which the RectangularPrism is defined
@@ -534,6 +568,12 @@ export declare class Geometry extends Message<Geometry> {
534
568
  */
535
569
  value: PointCloud;
536
570
  case: "pointcloud";
571
+ } | {
572
+ /**
573
+ * @generated from field: viam.common.v1.Cylinder cylinder = 8;
574
+ */
575
+ value: Cylinder;
576
+ case: "cylinder";
537
577
  } | { case: undefined; value?: undefined };
538
578
 
539
579
  /**
@@ -241,6 +241,13 @@ export declare class GetBatteryPercentResponse extends Message<GetBatteryPercent
241
241
  */
242
242
  percent: number;
243
243
 
244
+ /**
245
+ * Whether the battery is charging. Only meaningful when GetProperties reports is_charging_supported.
246
+ *
247
+ * @generated from field: bool is_charging = 2;
248
+ */
249
+ isCharging: boolean;
250
+
244
251
  constructor(data?: PartialMessage<GetBatteryPercentResponse>);
245
252
 
246
253
  static readonly runtime: typeof proto3;
@@ -300,6 +307,13 @@ export declare class GetPropertiesResponse extends Message<GetPropertiesResponse
300
307
  */
301
308
  isBatteryPercentSupported: boolean;
302
309
 
310
+ /**
311
+ * Whether GetBatteryPercent reports a meaningful is_charging
312
+ *
313
+ * @generated from field: bool is_charging_supported = 2;
314
+ */
315
+ isChargingSupported: boolean;
316
+
303
317
  constructor(data?: PartialMessage<GetPropertiesResponse>);
304
318
 
305
319
  static readonly runtime: typeof proto3;