@viamrobotics/sdk 0.49.1 → 0.50.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.
@@ -1,5 +1,5 @@
1
1
  import { type ServiceType } from '@bufbuild/protobuf';
2
- import { type PromiseClient } from '@connectrpc/connect';
2
+ import { type Client } from '@connectrpc/connect';
3
3
  import { type Credentials } from '../app/viam-transport';
4
4
  import { EventDispatcher } from '../events';
5
5
  import type { PoseInFrame, Transform } from '../gen/common/v1/common_pb';
@@ -114,6 +114,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
114
114
  private visionServiceClient;
115
115
  private servoServiceClient;
116
116
  private slamServiceClient;
117
+ private worldStateStoreServiceClient;
117
118
  private currentRetryAttempt;
118
119
  constructor(serviceHost?: string, webrtcOptions?: WebRTCOptions, sessionOptions?: SessionOptions, directOptions?: DirectOptions);
119
120
  private onDisconnect;
@@ -122,7 +123,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
122
123
  private get reconnectMaxWait();
123
124
  get sessionId(): string;
124
125
  private static readonly notConnectedYetStr;
125
- get robotService(): PromiseClient<{
126
+ get robotService(): Client<{
126
127
  readonly typeName: "viam.robot.v1.RobotService";
127
128
  readonly methods: {
128
129
  readonly getOperations: {
@@ -145,7 +146,6 @@ export declare class RobotClient extends EventDispatcher implements Robot {
145
146
  };
146
147
  readonly resourceRPCSubtypes: {
147
148
  readonly name: "ResourceRPCSubtypes";
148
- /** @default Number.POSITIVE_INFINITY */
149
149
  readonly I: typeof import("../gen/robot/v1/robot_pb").ResourceRPCSubtypesRequest;
150
150
  readonly O: typeof import("../gen/robot/v1/robot_pb").ResourceRPCSubtypesResponse;
151
151
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
@@ -272,7 +272,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
272
272
  };
273
273
  };
274
274
  }>;
275
- get armService(): PromiseClient<{
275
+ get armService(): Client<{
276
276
  readonly typeName: "viam.component.arm.v1.ArmService";
277
277
  readonly methods: {
278
278
  readonly getEndPosition: {
@@ -295,7 +295,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
295
295
  };
296
296
  readonly moveToJointPositions: {
297
297
  readonly name: "MoveToJointPositions";
298
- readonly I: typeof import("../gen/component/arm/v1/arm_pb").MoveToJointPositionsRequest; /** @default Number.POSITIVE_INFINITY */
298
+ readonly I: typeof import("../gen/component/arm/v1/arm_pb").MoveToJointPositionsRequest;
299
299
  readonly O: typeof import("../gen/component/arm/v1/arm_pb").MoveToJointPositionsResponse;
300
300
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
301
301
  };
@@ -337,7 +337,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
337
337
  };
338
338
  };
339
339
  }>;
340
- get baseService(): PromiseClient<{
340
+ get baseService(): Client<{
341
341
  readonly typeName: "viam.component.base.v1.BaseService";
342
342
  readonly methods: {
343
343
  readonly moveStraight: {
@@ -396,7 +396,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
396
396
  };
397
397
  };
398
398
  }>;
399
- get boardService(): PromiseClient<{
399
+ get boardService(): Client<{
400
400
  readonly typeName: "viam.component.board.v1.BoardService";
401
401
  readonly methods: {
402
402
  readonly setGPIO: {
@@ -426,7 +426,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
426
426
  readonly pWMFrequency: {
427
427
  readonly name: "PWMFrequency";
428
428
  readonly I: typeof import("../gen/component/board/v1/board_pb").PWMFrequencyRequest;
429
- readonly O: typeof import("../gen/component/board/v1/board_pb").PWMFrequencyResponse;
429
+ readonly O: typeof import("../gen/component/board/v1/board_pb").PWMFrequencyResponse; /** @default 10. */
430
430
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
431
431
  };
432
432
  readonly setPWMFrequency: {
@@ -479,7 +479,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
479
479
  };
480
480
  };
481
481
  }>;
482
- get encoderService(): PromiseClient<{
482
+ get encoderService(): Client<{
483
483
  readonly typeName: "viam.component.encoder.v1.EncoderService";
484
484
  readonly methods: {
485
485
  readonly getPosition: {
@@ -514,7 +514,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
514
514
  };
515
515
  };
516
516
  }>;
517
- get gantryService(): PromiseClient<{
517
+ get gantryService(): Client<{
518
518
  readonly typeName: "viam.component.gantry.v1.GantryService";
519
519
  readonly methods: {
520
520
  readonly getPosition: {
@@ -546,7 +546,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
546
546
  readonly I: typeof import("../gen/component/gantry/v1/gantry_pb").StopRequest;
547
547
  readonly O: typeof import("../gen/component/gantry/v1/gantry_pb").StopResponse;
548
548
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
549
- }; /** @default 10. */
549
+ };
550
550
  readonly isMoving: {
551
551
  readonly name: "IsMoving";
552
552
  readonly I: typeof import("../gen/component/gantry/v1/gantry_pb").IsMovingRequest;
@@ -560,7 +560,6 @@ export declare class RobotClient extends EventDispatcher implements Robot {
560
560
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
561
561
  };
562
562
  readonly getGeometries: {
563
- /** Options required to dial a robot. */
564
563
  readonly name: "GetGeometries";
565
564
  readonly I: typeof import("../gen/common/v1/common_pb").GetGeometriesRequest;
566
565
  readonly O: typeof import("../gen/common/v1/common_pb").GetGeometriesResponse;
@@ -568,7 +567,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
568
567
  };
569
568
  };
570
569
  }>;
571
- get genericService(): PromiseClient<{
570
+ get genericService(): Client<{
572
571
  readonly typeName: "viam.component.generic.v1.GenericService";
573
572
  readonly methods: {
574
573
  readonly doCommand: {
@@ -585,7 +584,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
585
584
  };
586
585
  };
587
586
  }>;
588
- get gripperService(): PromiseClient<{
587
+ get gripperService(): Client<{
589
588
  readonly typeName: "viam.component.gripper.v1.GripperService";
590
589
  readonly methods: {
591
590
  readonly open: {
@@ -620,7 +619,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
620
619
  };
621
620
  readonly doCommand: {
622
621
  readonly name: "DoCommand";
623
- readonly I: typeof import("../gen/common/v1/common_pb").DoCommandRequest;
622
+ readonly I: typeof import("../gen/common/v1/common_pb").DoCommandRequest; /** @default Number.POSITIVE_INFINITY */
624
623
  readonly O: typeof import("../gen/common/v1/common_pb").DoCommandResponse;
625
624
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
626
625
  };
@@ -638,7 +637,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
638
637
  };
639
638
  };
640
639
  }>;
641
- get mlModelService(): PromiseClient<{
640
+ get mlModelService(): Client<{
642
641
  readonly typeName: "viam.service.mlmodel.v1.MLModelService";
643
642
  readonly methods: {
644
643
  readonly infer: {
@@ -655,7 +654,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
655
654
  };
656
655
  };
657
656
  }>;
658
- get movementSensorService(): PromiseClient<{
657
+ get movementSensorService(): Client<{
659
658
  readonly typeName: "viam.component.movementsensor.v1.MovementSensorService";
660
659
  readonly methods: {
661
660
  readonly getLinearVelocity: {
@@ -696,6 +695,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
696
695
  };
697
696
  readonly getAccuracy: {
698
697
  readonly name: "GetAccuracy";
698
+ /** Options required to dial a robot via gRPC. */
699
699
  readonly I: typeof import("../gen/component/movementsensor/v1/movementsensor_pb").GetAccuracyRequest;
700
700
  readonly O: typeof import("../gen/component/movementsensor/v1/movementsensor_pb").GetAccuracyResponse;
701
701
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
@@ -726,7 +726,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
726
726
  };
727
727
  };
728
728
  }>;
729
- get powerSensorService(): PromiseClient<{
729
+ get powerSensorService(): Client<{
730
730
  readonly typeName: "viam.component.powersensor.v1.PowerSensorService";
731
731
  readonly methods: {
732
732
  readonly getVoltage: {
@@ -758,10 +758,10 @@ export declare class RobotClient extends EventDispatcher implements Robot {
758
758
  readonly I: typeof import("../gen/common/v1/common_pb").DoCommandRequest;
759
759
  readonly O: typeof import("../gen/common/v1/common_pb").DoCommandResponse;
760
760
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
761
- }; /** @default 10. */
761
+ };
762
762
  };
763
763
  }>;
764
- get inputControllerService(): PromiseClient<{
764
+ get inputControllerService(): Client<{
765
765
  readonly typeName: "viam.component.inputcontroller.v1.InputControllerService";
766
766
  readonly methods: {
767
767
  readonly getControls: {
@@ -791,10 +791,6 @@ export declare class RobotClient extends EventDispatcher implements Robot {
791
791
  readonly doCommand: {
792
792
  readonly name: "DoCommand";
793
793
  readonly I: typeof import("../gen/common/v1/common_pb").DoCommandRequest;
794
- /**
795
- * Set timeout in milliseconds for dialing. Default is defined by
796
- * DIAL_TIMEOUT. A value of 0 disables the timeout.
797
- */
798
794
  readonly O: typeof import("../gen/common/v1/common_pb").DoCommandResponse;
799
795
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
800
796
  };
@@ -806,7 +802,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
806
802
  };
807
803
  };
808
804
  }>;
809
- get motorService(): PromiseClient<{
805
+ get motorService(): Client<{
810
806
  readonly typeName: "viam.component.motor.v1.MotorService";
811
807
  readonly methods: {
812
808
  readonly setPower: {
@@ -825,13 +821,16 @@ export declare class RobotClient extends EventDispatcher implements Robot {
825
821
  readonly name: "GoTo";
826
822
  readonly I: typeof import("../gen/component/motor/v1/motor_pb").GoToRequest;
827
823
  readonly O: typeof import("../gen/component/motor/v1/motor_pb").GoToResponse;
828
- readonly kind: import("@bufbuild/protobuf").MethodKind.Unary; /** @default Number.POSITIVE_INFINITY */
824
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
829
825
  };
830
826
  readonly setRPM: {
831
827
  readonly name: "SetRPM";
832
828
  readonly I: typeof import("../gen/component/motor/v1/motor_pb").SetRPMRequest;
833
829
  readonly O: typeof import("../gen/component/motor/v1/motor_pb").SetRPMResponse;
834
- readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
830
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary; /**
831
+ * Set timeout in milliseconds for dialing. Default is defined by
832
+ * DIAL_TIMEOUT. A value of 0 disables the timeout.
833
+ */
835
834
  };
836
835
  readonly resetZeroPosition: {
837
836
  readonly name: "ResetZeroPosition";
@@ -883,7 +882,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
883
882
  };
884
883
  };
885
884
  }>;
886
- get navigationService(): PromiseClient<{
885
+ get navigationService(): Client<{
887
886
  readonly typeName: "viam.service.navigation.v1.NavigationService";
888
887
  readonly methods: {
889
888
  readonly getMode: {
@@ -930,6 +929,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
930
929
  };
931
930
  readonly getPaths: {
932
931
  readonly name: "GetPaths";
932
+ /** Options required to dial a robot via gRPC. */
933
933
  readonly I: typeof import("../gen/service/navigation/v1/navigation_pb").GetPathsRequest;
934
934
  readonly O: typeof import("../gen/service/navigation/v1/navigation_pb").GetPathsResponse;
935
935
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
@@ -948,7 +948,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
948
948
  };
949
949
  };
950
950
  }>;
951
- get discoveryService(): PromiseClient<{
951
+ get discoveryService(): Client<{
952
952
  readonly typeName: "viam.service.discovery.v1.DiscoveryService";
953
953
  readonly methods: {
954
954
  readonly discoverResources: {
@@ -965,7 +965,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
965
965
  };
966
966
  };
967
967
  }>;
968
- get motionService(): PromiseClient<{
968
+ get motionService(): Client<{
969
969
  readonly typeName: "viam.service.motion.v1.MotionService";
970
970
  readonly methods: {
971
971
  readonly move: {
@@ -1000,7 +1000,6 @@ export declare class RobotClient extends EventDispatcher implements Robot {
1000
1000
  };
1001
1001
  readonly listPlanStatuses: {
1002
1002
  readonly name: "ListPlanStatuses";
1003
- /** Options required to dial a robot via gRPC. */
1004
1003
  readonly I: typeof import("../gen/service/motion/v1/motion_pb").ListPlanStatusesRequest;
1005
1004
  readonly O: typeof import("../gen/service/motion/v1/motion_pb").ListPlanStatusesResponse;
1006
1005
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
@@ -1019,7 +1018,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
1019
1018
  };
1020
1019
  };
1021
1020
  }>;
1022
- get visionService(): PromiseClient<{
1021
+ get visionService(): Client<{
1023
1022
  readonly typeName: "viam.service.vision.v1.VisionService";
1024
1023
  readonly methods: {
1025
1024
  readonly getDetectionsFromCamera: {
@@ -1072,7 +1071,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
1072
1071
  };
1073
1072
  };
1074
1073
  }>;
1075
- get servoService(): PromiseClient<{
1074
+ get servoService(): Client<{
1076
1075
  readonly typeName: "viam.component.servo.v1.ServoService";
1077
1076
  readonly methods: {
1078
1077
  readonly move: {
@@ -1107,13 +1106,14 @@ export declare class RobotClient extends EventDispatcher implements Robot {
1107
1106
  };
1108
1107
  readonly getGeometries: {
1109
1108
  readonly name: "GetGeometries";
1109
+ /** @default 10. */
1110
1110
  readonly I: typeof import("../gen/common/v1/common_pb").GetGeometriesRequest;
1111
1111
  readonly O: typeof import("../gen/common/v1/common_pb").GetGeometriesResponse;
1112
1112
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1113
1113
  };
1114
1114
  };
1115
1115
  }>;
1116
- get slamService(): PromiseClient<{
1116
+ get slamService(): Client<{
1117
1117
  readonly typeName: "viam.service.slam.v1.SLAMService";
1118
1118
  readonly methods: {
1119
1119
  readonly getPosition: {
@@ -1135,9 +1135,10 @@ export declare class RobotClient extends EventDispatcher implements Robot {
1135
1135
  readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
1136
1136
  };
1137
1137
  readonly getProperties: {
1138
+ /** Options required to dial a robot via WebRTC. */
1138
1139
  readonly name: "GetProperties";
1139
1140
  readonly I: typeof import("../gen/service/slam/v1/slam_pb").GetPropertiesRequest;
1140
- readonly O: typeof import("../gen/service/slam/v1/slam_pb").GetPropertiesResponse; /** @default Number.POSITIVE_INFINITY */
1141
+ readonly O: typeof import("../gen/service/slam/v1/slam_pb").GetPropertiesResponse;
1141
1142
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1142
1143
  };
1143
1144
  readonly doCommand: {
@@ -1148,13 +1149,43 @@ export declare class RobotClient extends EventDispatcher implements Robot {
1148
1149
  };
1149
1150
  };
1150
1151
  }>;
1151
- createServiceClient<T extends ServiceType>(svcType: T): PromiseClient<T>;
1152
+ get worldStateStoreService(): Client<{
1153
+ readonly typeName: "viam.service.worldstatestore.v1.WorldStateStoreService";
1154
+ readonly methods: {
1155
+ readonly listUUIDs: {
1156
+ readonly name: "ListUUIDs";
1157
+ readonly I: typeof import("../gen/service/worldstatestore/v1/world_state_store_pb").ListUUIDsRequest;
1158
+ readonly O: typeof import("../gen/service/worldstatestore/v1/world_state_store_pb").ListUUIDsResponse;
1159
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1160
+ };
1161
+ readonly getTransform: {
1162
+ readonly name: "GetTransform";
1163
+ readonly I: typeof import("../gen/service/worldstatestore/v1/world_state_store_pb").GetTransformRequest;
1164
+ readonly O: typeof import("../gen/service/worldstatestore/v1/world_state_store_pb").GetTransformResponse;
1165
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1166
+ };
1167
+ readonly streamTransformChanges: {
1168
+ readonly name: "StreamTransformChanges";
1169
+ readonly I: typeof import("../gen/service/worldstatestore/v1/world_state_store_pb").StreamTransformChangesRequest;
1170
+ readonly O: typeof import("../gen/service/worldstatestore/v1/world_state_store_pb").StreamTransformChangesResponse;
1171
+ readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
1172
+ };
1173
+ readonly doCommand: {
1174
+ readonly name: "DoCommand";
1175
+ readonly I: typeof import("../gen/common/v1/common_pb").DoCommandRequest;
1176
+ readonly O: typeof import("../gen/common/v1/common_pb").DoCommandResponse;
1177
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
1178
+ };
1179
+ };
1180
+ }>;
1181
+ createServiceClient<T extends ServiceType>(svcType: T): Client<T>;
1152
1182
  get peerConnection(): RTCPeerConnection | undefined;
1153
- disconnect(): Promise<void>;
1154
- isConnected(): boolean;
1183
+ private get clientTransport();
1155
1184
  private dialWebRTC;
1156
1185
  private dialDirect;
1157
1186
  dial(conf: DialConf): Promise<this>;
1187
+ disconnect(): Promise<void>;
1188
+ isConnected(): boolean;
1158
1189
  connect({ creds, priority, dialTimeout, }?: ConnectOptions): Promise<void>;
1159
1190
  getSessions(): Promise<import("../gen/robot/v1/robot_pb").Session[]>;
1160
1191
  getOperations(): Promise<import("../gen/robot/v1/robot_pb").Operation[]>;
@@ -1,4 +1,4 @@
1
- import type { CallOptions, PromiseClient } from '@connectrpc/connect';
1
+ import type { CallOptions, Client } from '@connectrpc/connect';
2
2
  import { SignalingService } from '../gen/proto/rpc/webrtc/v1/signaling_connect';
3
3
  import { ClientChannel } from './client-channel';
4
4
  import type { DialWebRTCOptions } from './dial';
@@ -19,7 +19,7 @@ export declare class SignalingExchange {
19
19
  private numCallUpdates;
20
20
  private maxCallUpdateDuration;
21
21
  private totalCallUpdateDuration;
22
- constructor(signalingClient: PromiseClient<typeof SignalingService>, callOpts: CallOptions, pc: RTCPeerConnection, dc: RTCDataChannel, dialOpts?: DialWebRTCOptions | undefined);
22
+ constructor(signalingClient: Client<typeof SignalingService>, callOpts: CallOptions, pc: RTCPeerConnection, dc: RTCDataChannel, dialOpts?: DialWebRTCOptions | undefined);
23
23
  doExchange(): Promise<ClientChannel>;
24
24
  private setup;
25
25
  terminate(err: Error): void;
@@ -0,0 +1,22 @@
1
+ import { Struct, type JsonValue } from '@bufbuild/protobuf';
2
+ import type { CallOptions } from '@connectrpc/connect';
3
+ import type { RobotClient } from '../../robot';
4
+ import type { Options } from '../../types';
5
+ import type { WorldStateStore } from './world-state-store';
6
+ import type { TransformChangeEvent } from './types';
7
+ /**
8
+ * A gRPC-web client for a WorldStateStore service.
9
+ *
10
+ * @group Clients
11
+ */
12
+ export declare class WorldStateStoreClient implements WorldStateStore {
13
+ private client;
14
+ readonly name: string;
15
+ private readonly options;
16
+ callOptions: CallOptions;
17
+ constructor(client: RobotClient, name: string, options?: Options);
18
+ listUUIDs(extra?: {}, callOptions?: CallOptions): Promise<string[]>;
19
+ getTransform(uuid: string, extra?: {}, callOptions?: CallOptions): Promise<import("./types").TransformWithUUID>;
20
+ streamTransformChanges(extra?: {}, callOptions?: CallOptions): AsyncGenerator<TransformChangeEvent, void>;
21
+ doCommand(command: Struct, callOptions?: CallOptions): Promise<JsonValue>;
22
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ export { WorldStateStoreClient } from './client';
2
+ export type { WorldStateStore } from './world-state-store';
3
+ export { transformWithUUID } from './world-state-store';
4
+ export type { TransformChangeEvent, TransformWithUUID } from './types';
5
+ export { TransformChangeType } from '../../gen/service/worldstatestore/v1/world_state_store_pb';
@@ -0,0 +1,9 @@
1
+ import type { PlainMessage } from '@bufbuild/protobuf';
2
+ import type { Transform } from '../../gen/common/v1/common_pb';
3
+ import type { StreamTransformChangesResponse } from '../../gen/service/worldstatestore/v1/world_state_store_pb';
4
+ export interface TransformWithUUID extends PlainMessage<Transform> {
5
+ uuidString: string;
6
+ }
7
+ export type TransformChangeEvent = Omit<PlainMessage<StreamTransformChangesResponse>, 'transform'> & {
8
+ transform: TransformWithUUID | undefined;
9
+ };
@@ -0,0 +1,76 @@
1
+ import type { Struct } from '@bufbuild/protobuf';
2
+ import type { Transform, Resource } from '../../types';
3
+ import type { TransformChangeEvent, TransformWithUUID } from './types';
4
+ /**
5
+ * A service that manages world state transforms, allowing storage and retrieval
6
+ * of spatial relationships between reference frames.
7
+ */
8
+ export interface WorldStateStore extends Resource {
9
+ /**
10
+ * ListUUIDs returns all world state transform UUIDs.
11
+ *
12
+ * @example
13
+ *
14
+ * ```ts
15
+ * const worldStateStore = new VIAM.WorldStateStoreClient(
16
+ * machine,
17
+ * 'builtin'
18
+ * );
19
+ *
20
+ * // Get all transform UUIDs
21
+ * const uuids = await worldStateStore.listUUIDs();
22
+ * ```
23
+ *
24
+ * @param extra - Additional arguments to the method
25
+ */
26
+ listUUIDs: (extra?: Struct) => Promise<string[]>;
27
+ /**
28
+ * GetTransform returns a world state transform by UUID.
29
+ *
30
+ * @example
31
+ *
32
+ * ```ts
33
+ * const worldStateStore = new VIAM.WorldStateStoreClient(
34
+ * machine,
35
+ * 'builtin'
36
+ * );
37
+ *
38
+ * // Get a specific transform by UUID
39
+ * const transform = await worldStateStore.getTransform(uuid);
40
+ * ```
41
+ *
42
+ * @param uuid - The UUID of the transform to retrieve
43
+ * @param extra - Additional arguments to the method
44
+ */
45
+ getTransform: (uuid: string, extra?: Struct) => Promise<TransformWithUUID>;
46
+ /**
47
+ * StreamTransformChanges streams changes to world state transforms.
48
+ *
49
+ * The returned transform will only contain the fields that have changed.
50
+ *
51
+ * @example
52
+ *
53
+ * ```ts
54
+ * const worldStateStore = new VIAM.WorldStateStoreClient(
55
+ * machine,
56
+ * 'builtin'
57
+ * );
58
+ *
59
+ * // Stream transform changes
60
+ * const stream = worldStateStore.streamTransformChanges();
61
+ * for await (const change of stream) {
62
+ * console.log(
63
+ * 'Transform change:',
64
+ * change.changeType,
65
+ * change.transform
66
+ * );
67
+ * }
68
+ * ```
69
+ *
70
+ * @param extra - Additional arguments to the method
71
+ */
72
+ streamTransformChanges: (extra?: Struct) => AsyncGenerator<TransformChangeEvent, void>;
73
+ }
74
+ export declare const uuidToString: (uuid: Uint8Array) => string;
75
+ export declare const uuidFromString: (uuid: string) => Uint8Array;
76
+ export declare const transformWithUUID: (transform: Transform) => TransformWithUUID;
package/dist/types.d.ts CHANGED
@@ -33,6 +33,7 @@ export type GeoPoint = PlainMessage<commonApi.GeoPoint>;
33
33
  export type GeometriesInFrame = PlainMessage<commonApi.GeometriesInFrame>;
34
34
  export type Geometry = PlainMessage<commonApi.Geometry>;
35
35
  export type Orientation = PlainMessage<commonApi.Orientation>;
36
+ export type PointCloud = PlainMessage<commonApi.PointCloud>;
36
37
  export type Pose = PlainMessage<commonApi.Pose>;
37
38
  export type PoseInFrame = PlainMessage<commonApi.PoseInFrame>;
38
39
  export type RectangularPrism = PlainMessage<commonApi.RectangularPrism>;
@@ -41,6 +42,6 @@ export type Sphere = PlainMessage<commonApi.Sphere>;
41
42
  export type Transform = PlainMessage<commonApi.Transform>;
42
43
  export type Vector3 = PlainMessage<commonApi.Vector3>;
43
44
  export type WorldState = PlainMessage<commonApi.WorldState>;
44
- export declare const Capsule: typeof commonApi.Capsule, GeoGeometry: typeof commonApi.GeoGeometry, GeoPoint: typeof commonApi.GeoPoint, GeometriesInFrame: typeof commonApi.GeometriesInFrame, Geometry: typeof commonApi.Geometry, Orientation: typeof commonApi.Orientation, Pose: typeof commonApi.Pose, PoseInFrame: typeof commonApi.PoseInFrame, RectangularPrism: typeof commonApi.RectangularPrism, ResourceName: typeof commonApi.ResourceName, Sphere: typeof commonApi.Sphere, Transform: typeof commonApi.Transform, Vector3: typeof commonApi.Vector3, WorldState: typeof commonApi.WorldState;
45
+ export declare const Capsule: typeof commonApi.Capsule, GeoGeometry: typeof commonApi.GeoGeometry, GeoPoint: typeof commonApi.GeoPoint, GeometriesInFrame: typeof commonApi.GeometriesInFrame, Geometry: typeof commonApi.Geometry, Orientation: typeof commonApi.Orientation, PointCloud: typeof commonApi.PointCloud, Pose: typeof commonApi.Pose, PoseInFrame: typeof commonApi.PoseInFrame, RectangularPrism: typeof commonApi.RectangularPrism, ResourceName: typeof commonApi.ResourceName, Sphere: typeof commonApi.Sphere, Transform: typeof commonApi.Transform, Vector3: typeof commonApi.Vector3, WorldState: typeof commonApi.WorldState;
45
46
  export declare const isValidGeoPoint: (value: GeoPoint) => boolean;
46
47
  export { Duration, Struct, Timestamp, type JsonValue, type PlainMessage, } from '@bufbuild/protobuf';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viamrobotics/sdk",
3
- "version": "0.49.1",
3
+ "version": "0.50.0",
4
4
  "description": "",
5
5
  "main": "./dist/main.umd.js",
6
6
  "module": "./dist/main.es.js",
@@ -80,6 +80,7 @@
80
80
  "prettier-plugin-jsdoc": "^1.1.1",
81
81
  "typedoc": "^0.27.9",
82
82
  "typescript": "^5.3.3",
83
+ "uuid-tool": "^2.0.3",
83
84
  "vite": "^5.0.10",
84
85
  "vitest": "^1.1.0",
85
86
  "yaml": "^2.3.3"