@viamrobotics/sdk 0.68.1 → 0.68.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.
- package/dist/api-version.d.ts +1 -1
- package/dist/components/arm/client.d.ts +1 -0
- package/dist/components/audio-in/client.d.ts +1 -0
- package/dist/components/audio-out/client.d.ts +1 -0
- package/dist/components/base/client.d.ts +1 -0
- package/dist/components/board/client.d.ts +1 -0
- package/dist/components/button/client.d.ts +1 -0
- package/dist/components/camera/client.d.ts +1 -0
- package/dist/components/encoder/client.d.ts +1 -0
- package/dist/components/gantry/client.d.ts +1 -0
- package/dist/components/generic/client.d.ts +1 -0
- package/dist/components/gripper/client.d.ts +1 -0
- package/dist/components/input-controller/client.d.ts +1 -0
- package/dist/components/motor/client.d.ts +1 -0
- package/dist/components/movement-sensor/client.d.ts +1 -0
- package/dist/components/pose-tracker/client.d.ts +1 -0
- package/dist/components/power-sensor/client.d.ts +1 -0
- package/dist/components/sensor/client.d.ts +1 -0
- package/dist/components/servo/client.d.ts +1 -0
- package/dist/components/switch/client.d.ts +1 -0
- package/dist/gen/app/build/v1/build_pb.d.ts +17 -1
- package/dist/gen/app/v1/app_connect.d.ts +68 -1
- package/dist/gen/app/v1/app_pb.d.ts +298 -0
- package/dist/gen/robot/v1/robot_pb.d.ts +0 -8
- package/dist/main.d.ts +1 -1
- package/dist/main.es.js +6558 -6063
- package/dist/main.umd.js +7 -7
- package/dist/robot/client.d.ts +44 -11
- package/dist/rpc/dial.d.ts +24 -0
- package/dist/services/data-manager/client.d.ts +1 -0
- package/dist/services/discovery/client.d.ts +1 -0
- package/dist/services/generic/client.d.ts +1 -0
- package/dist/services/motion/client.d.ts +1 -0
- package/dist/services/navigation/client.d.ts +1 -0
- package/dist/services/slam/client.d.ts +1 -0
- package/dist/services/video/client.d.ts +1 -0
- package/dist/services/vision/client.d.ts +1 -0
- package/dist/services/world-state-store/client.d.ts +1 -0
- package/dist/types.d.ts +2 -0
- package/dist/utils.d.ts +4 -1
- package/package.json +2 -1
package/dist/robot/client.d.ts
CHANGED
|
@@ -34,6 +34,30 @@ export interface DialWebRTCConf {
|
|
|
34
34
|
signalingAddress: string;
|
|
35
35
|
iceServers?: ICEServer[];
|
|
36
36
|
priority?: number;
|
|
37
|
+
/**
|
|
38
|
+
* When true, sets ICE transport policy to relay-only so only TURN candidates
|
|
39
|
+
* are used. Useful for testing relay connectivity through a TURN server.
|
|
40
|
+
*/
|
|
41
|
+
forceRelay?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* When true, strips TURN servers from the ICE configuration so only host and
|
|
44
|
+
* server-reflexive candidates are used. Useful for testing direct
|
|
45
|
+
* connectivity without relay fallback.
|
|
46
|
+
*/
|
|
47
|
+
forceP2P?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* When set, filters the signaling server's TURN list to only the server whose
|
|
50
|
+
* parsed URI matches (compared by scheme, host, port, and transport —
|
|
51
|
+
* defaulting transport to UDP if unspecified). Example:
|
|
52
|
+
* `"turn:turn.viam.com:443"`
|
|
53
|
+
*/
|
|
54
|
+
turnUri?: string;
|
|
55
|
+
/** Overrides the scheme of the matched TURN URI (`"turn"` or `"turns"`). */
|
|
56
|
+
turnScheme?: 'turn' | 'turns';
|
|
57
|
+
/** Overrides the transport of the matched TURN URI (`"tcp"` or `"udp"`). */
|
|
58
|
+
turnTransport?: 'tcp' | 'udp';
|
|
59
|
+
/** Overrides the port of the matched TURN URI. */
|
|
60
|
+
turnPort?: number;
|
|
37
61
|
/**
|
|
38
62
|
* Set timeout in milliseconds for dialing. Default is defined by
|
|
39
63
|
* DIAL_TIMEOUT. A value of 0 disables the timeout.
|
|
@@ -90,6 +114,12 @@ interface WebRTCOptions {
|
|
|
90
114
|
reconnectMaxAttempts?: number;
|
|
91
115
|
reconnectMaxWait?: number;
|
|
92
116
|
shouldRetryOnError?: () => boolean;
|
|
117
|
+
forceRelay?: boolean;
|
|
118
|
+
forceP2P?: boolean;
|
|
119
|
+
turnUri?: string;
|
|
120
|
+
turnScheme?: 'turn' | 'turns';
|
|
121
|
+
turnTransport?: 'tcp' | 'udp';
|
|
122
|
+
turnPort?: number;
|
|
93
123
|
}
|
|
94
124
|
interface DirectOptions {
|
|
95
125
|
noReconnect?: boolean;
|
|
@@ -396,6 +426,12 @@ export declare class RobotClient extends EventDispatcher implements Robot {
|
|
|
396
426
|
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
397
427
|
};
|
|
398
428
|
readonly getGeometries: {
|
|
429
|
+
/**
|
|
430
|
+
* Set timeout in milliseconds for dialing. Default is defined by
|
|
431
|
+
* DIAL_TIMEOUT. A value of 0 disables the timeout.
|
|
432
|
+
*
|
|
433
|
+
* @deprecated Use `dialTimeoutMs` instead.
|
|
434
|
+
*/
|
|
399
435
|
readonly name: "GetGeometries";
|
|
400
436
|
readonly I: typeof import("../gen/common/v1/common_pb").GetGeometriesRequest;
|
|
401
437
|
readonly O: typeof import("../gen/common/v1/common_pb").GetGeometriesResponse;
|
|
@@ -532,6 +568,10 @@ export declare class RobotClient extends EventDispatcher implements Robot {
|
|
|
532
568
|
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
533
569
|
};
|
|
534
570
|
readonly writeAnalog: {
|
|
571
|
+
/**
|
|
572
|
+
* Set timeout in milliseconds for dialing. Default is defined by
|
|
573
|
+
* DIAL_TIMEOUT. A value of 0 disables the timeout.
|
|
574
|
+
*/
|
|
535
575
|
readonly name: "WriteAnalog";
|
|
536
576
|
readonly I: typeof import("../gen/component/board/v1/board_pb").WriteAnalogRequest;
|
|
537
577
|
readonly O: typeof import("../gen/component/board/v1/board_pb").WriteAnalogResponse;
|
|
@@ -836,12 +876,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
|
|
|
836
876
|
readonly I: typeof import("../gen/common/v1/common_pb").GetStatusRequest;
|
|
837
877
|
readonly O: typeof import("../gen/common/v1/common_pb").GetStatusResponse;
|
|
838
878
|
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
839
|
-
};
|
|
840
|
-
* Set timeout in milliseconds for dialing. Default is defined by
|
|
841
|
-
* DIAL_TIMEOUT. A value of 0 disables the timeout.
|
|
842
|
-
*
|
|
843
|
-
* @deprecated Use `dialTimeoutMs` instead.
|
|
844
|
-
*/
|
|
879
|
+
};
|
|
845
880
|
readonly getGeometries: {
|
|
846
881
|
readonly name: "GetGeometries";
|
|
847
882
|
readonly I: typeof import("../gen/common/v1/common_pb").GetGeometriesRequest;
|
|
@@ -1096,7 +1131,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
|
|
|
1096
1131
|
readonly doCommand: {
|
|
1097
1132
|
readonly name: "DoCommand";
|
|
1098
1133
|
readonly I: typeof import("../gen/common/v1/common_pb").DoCommandRequest;
|
|
1099
|
-
readonly O: typeof import("../gen/common/v1/common_pb").DoCommandResponse;
|
|
1134
|
+
readonly O: typeof import("../gen/common/v1/common_pb").DoCommandResponse; /** Overrides the scheme of the matched TURN URI (`"turn"` or `"turns"`). */
|
|
1100
1135
|
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
1101
1136
|
};
|
|
1102
1137
|
readonly getStatus: {
|
|
@@ -1220,10 +1255,8 @@ export declare class RobotClient extends EventDispatcher implements Robot {
|
|
|
1220
1255
|
readonly name: "GetObjectPointClouds";
|
|
1221
1256
|
readonly I: typeof import("../gen/service/vision/v1/vision_pb").GetObjectPointCloudsRequest;
|
|
1222
1257
|
readonly O: typeof import("../gen/service/vision/v1/vision_pb").GetObjectPointCloudsResponse; /**
|
|
1223
|
-
*
|
|
1224
|
-
*
|
|
1225
|
-
*
|
|
1226
|
-
* @deprecated Use `dialTimeoutMs` instead.
|
|
1258
|
+
* When true, sets ICE transport policy to relay-only so only TURN candidates
|
|
1259
|
+
* are used. Useful for testing relay connectivity through a TURN server.
|
|
1227
1260
|
*/
|
|
1228
1261
|
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
1229
1262
|
};
|
package/dist/rpc/dial.d.ts
CHANGED
|
@@ -56,6 +56,30 @@ export interface DialWebRTCOptions {
|
|
|
56
56
|
*/
|
|
57
57
|
signalingAccessToken?: string;
|
|
58
58
|
additionalSdpFields?: Record<string, string | number>;
|
|
59
|
+
/**
|
|
60
|
+
* When true, sets ICE transport policy to relay-only so only TURN candidates
|
|
61
|
+
* are used. Useful for testing relay connectivity through a TURN server.
|
|
62
|
+
*/
|
|
63
|
+
forceRelay?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* When true, strips TURN servers from the ICE configuration so only host and
|
|
66
|
+
* server-reflexive candidates are used. Useful for testing direct
|
|
67
|
+
* connectivity without relay fallback.
|
|
68
|
+
*/
|
|
69
|
+
forceP2P?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* When set, filters the signaling server's TURN list to only the server whose
|
|
72
|
+
* parsed URI matches (compared by scheme, host, port, and transport —
|
|
73
|
+
* defaulting transport to UDP if unspecified). Example:
|
|
74
|
+
* `"turn:turn.viam.com:443"`
|
|
75
|
+
*/
|
|
76
|
+
turnUri?: string;
|
|
77
|
+
/** Overrides the scheme of the matched TURN URI (`"turn"` or `"turns"`). */
|
|
78
|
+
turnScheme?: 'turn' | 'turns';
|
|
79
|
+
/** Overrides the transport of the matched TURN URI (`"tcp"` or `"udp"`). */
|
|
80
|
+
turnTransport?: 'tcp' | 'udp';
|
|
81
|
+
/** Overrides the port of the matched TURN URI. */
|
|
82
|
+
turnPort?: number;
|
|
59
83
|
}
|
|
60
84
|
export type TransportFactory = (init: TransportInitOptions) => Transport;
|
|
61
85
|
interface TransportInitOptions {
|
|
@@ -49,6 +49,7 @@ export declare class DataManagerClient implements DataManager {
|
|
|
49
49
|
* @param command - The command to do.
|
|
50
50
|
* @param callOptions - Call options for the command.
|
|
51
51
|
*/
|
|
52
|
+
getStatus(callOptions?: CallOptions): Promise<JsonValue>;
|
|
52
53
|
doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
|
|
53
54
|
/**
|
|
54
55
|
* Uploads binary data to specified datasets.
|
|
@@ -15,5 +15,6 @@ export declare class DiscoveryClient implements Discovery {
|
|
|
15
15
|
callOptions: CallOptions;
|
|
16
16
|
constructor(client: RobotClient, name: string, options?: Options);
|
|
17
17
|
discoverResources(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/app/v1/robot_pb").ComponentConfig[]>;
|
|
18
|
+
getStatus(callOptions?: CallOptions): Promise<JsonValue>;
|
|
18
19
|
doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
|
|
19
20
|
}
|
|
@@ -14,5 +14,6 @@ export declare class GenericClient implements Generic {
|
|
|
14
14
|
private readonly options;
|
|
15
15
|
callOptions: CallOptions;
|
|
16
16
|
constructor(client: RobotClient, name: string, options?: Options);
|
|
17
|
+
getStatus(callOptions?: CallOptions): Promise<JsonValue>;
|
|
17
18
|
doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
|
|
18
19
|
}
|
|
@@ -23,5 +23,6 @@ export declare class MotionClient implements Motion {
|
|
|
23
23
|
listPlanStatuses(onlyActivePlans?: boolean, extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/motion/v1/motion_pb").ListPlanStatusesResponse>;
|
|
24
24
|
/** @deprecated Use `RobotClient.getPose` instead. */
|
|
25
25
|
getPose(componentName: string, destinationFrame: string, supplementalTransforms: Transform[], extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/common/v1/common_pb").PoseInFrame>;
|
|
26
|
+
getStatus(callOptions?: CallOptions): Promise<JsonValue>;
|
|
26
27
|
doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
|
|
27
28
|
}
|
|
@@ -24,5 +24,6 @@ export declare class NavigationClient implements Navigation {
|
|
|
24
24
|
getObstacles(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/common/v1/common_pb").GeoGeometry[]>;
|
|
25
25
|
getPaths(extra?: {}, callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").Path[]>;
|
|
26
26
|
getProperties(callOptions?: CallOptions): Promise<import("../../gen/service/navigation/v1/navigation_pb").GetPropertiesResponse>;
|
|
27
|
+
getStatus(callOptions?: CallOptions): Promise<JsonValue>;
|
|
27
28
|
doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
|
|
28
29
|
}
|
|
@@ -18,5 +18,6 @@ export declare class SlamClient implements Slam {
|
|
|
18
18
|
getPointCloudMap(returnEditedMap?: boolean, callOptions?: CallOptions): Promise<Uint8Array>;
|
|
19
19
|
getInternalState(callOptions?: CallOptions): Promise<Uint8Array>;
|
|
20
20
|
getProperties(callOptions?: CallOptions): Promise<import("../../gen/service/slam/v1/slam_pb").GetPropertiesResponse>;
|
|
21
|
+
getStatus(callOptions?: CallOptions): Promise<JsonValue>;
|
|
21
22
|
doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
|
|
22
23
|
}
|
|
@@ -16,5 +16,6 @@ export declare class VideoClient implements Video {
|
|
|
16
16
|
callOptions: CallOptions;
|
|
17
17
|
constructor(client: RobotClient, name: string, options?: Options);
|
|
18
18
|
getVideo(startTimestamp?: Date, endTimestamp?: Date, videoCodec?: string, videoContainer?: string, extra?: {}, callOptions?: CallOptions): AsyncIterable<VideoChunk>;
|
|
19
|
+
getStatus(callOptions?: CallOptions): Promise<JsonValue>;
|
|
19
20
|
doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
|
|
20
21
|
}
|
|
@@ -33,5 +33,6 @@ export declare class VisionClient implements Vision {
|
|
|
33
33
|
objectPointClouds: import("../../gen/common/v1/common_pb").PointCloudObject[];
|
|
34
34
|
extra: Struct | undefined;
|
|
35
35
|
}>;
|
|
36
|
+
getStatus(callOptions?: CallOptions): Promise<JsonValue>;
|
|
36
37
|
doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
|
|
37
38
|
}
|
|
@@ -18,5 +18,6 @@ export declare class WorldStateStoreClient implements WorldStateStore {
|
|
|
18
18
|
listUUIDs(extra?: {}, callOptions?: CallOptions): Promise<string[]>;
|
|
19
19
|
getTransform(uuid: string, extra?: {}, callOptions?: CallOptions): Promise<import("./types").TransformWithUUID>;
|
|
20
20
|
streamTransformChanges(extra?: {}, callOptions?: CallOptions): AsyncGenerator<TransformChangeEvent, void>;
|
|
21
|
+
getStatus(callOptions?: CallOptions): Promise<JsonValue>;
|
|
21
22
|
doCommand(command: Struct | Record<string, JsonValue>, callOptions?: CallOptions): Promise<JsonValue>;
|
|
22
23
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -30,6 +30,8 @@ export interface Resource {
|
|
|
30
30
|
* a plain object, which will be converted automatically.
|
|
31
31
|
*/
|
|
32
32
|
doCommand(command: Struct | Record<string, JsonValue>): Promise<JsonValue>;
|
|
33
|
+
/** Get the status of the resource. */
|
|
34
|
+
getStatus(): Promise<JsonValue>;
|
|
33
35
|
}
|
|
34
36
|
import * as commonApi from './gen/common/v1/common_pb';
|
|
35
37
|
export type Capsule = PlainMessage<commonApi.Capsule>;
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Struct, type JsonValue, type PartialMessage } from '@bufbuild/protobuf';
|
|
2
2
|
import type { CallOptions } from '@connectrpc/connect';
|
|
3
|
-
import { DoCommandRequest, DoCommandResponse, GetKinematicsRequest, GetKinematicsResponse, GetGeometriesRequest, GetGeometriesResponse, Geometry, Mesh } from './gen/common/v1/common_pb';
|
|
3
|
+
import { DoCommandRequest, DoCommandResponse, GetKinematicsRequest, GetKinematicsResponse, GetGeometriesRequest, GetGeometriesResponse, GetStatusRequest, GetStatusResponse, Geometry, Mesh } from './gen/common/v1/common_pb';
|
|
4
4
|
import type { Options, Vector3 } from './types';
|
|
5
5
|
import type { Frame } from './gen/app/v1/robot_pb';
|
|
6
6
|
export declare const clientHeaders: Headers;
|
|
@@ -59,4 +59,7 @@ export declare const getKinematicsFromClient: (getKinematicsMethod: getKinematic
|
|
|
59
59
|
type getGeometries = (request: PartialMessage<GetGeometriesRequest>, options?: CallOptions) => Promise<GetGeometriesResponse>;
|
|
60
60
|
/** Get geometries information using a resource client */
|
|
61
61
|
export declare const getGeometriesFromClient: (getGeometriesMethod: getGeometries, name: string, extra?: Struct, callOptions?: CallOptions) => Promise<Geometry[]>;
|
|
62
|
+
type getStatus = (request: PartialMessage<GetStatusRequest>, options?: CallOptions) => Promise<GetStatusResponse>;
|
|
63
|
+
/** Get the status of a resource using a resource client */
|
|
64
|
+
export declare const getStatusFromClient: (getStatusMethod: getStatus, name: string, options?: Options, callOptions?: CallOptions) => Promise<JsonValue>;
|
|
62
65
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viamrobotics/sdk",
|
|
3
|
-
"version": "0.68.
|
|
3
|
+
"version": "0.68.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/main.umd.js",
|
|
6
6
|
"module": "./dist/main.es.js",
|
|
@@ -77,6 +77,7 @@
|
|
|
77
77
|
"eslint-config-prettier": "^9.1.0",
|
|
78
78
|
"eslint-plugin-tsdoc": "^0.2.17",
|
|
79
79
|
"eslint-plugin-vitest": "^0.3.20",
|
|
80
|
+
"flatted": "^3.4.2",
|
|
80
81
|
"grpc-web": "^1.4.2",
|
|
81
82
|
"happy-dom": "^20.0.8",
|
|
82
83
|
"npm-check-updates": "^17.1.11",
|