@viamrobotics/sdk 0.73.0-b.0 → 0.73.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.
- package/dist/app/app-client.d.ts +254 -130
- package/dist/app/billing-client.d.ts +15 -6
- package/dist/app/data-client.d.ts +252 -175
- package/dist/app/ml-training-client.d.ts +5 -5
- package/dist/app/provisioning-client.d.ts +4 -2
- package/dist/app/viam-client.d.ts +1 -1
- package/dist/app/viam-transport.d.ts +4 -1
- package/dist/assert.d.ts +3 -2
- package/dist/components/arm/arm.d.ts +2 -2
- package/dist/components/arm/client.d.ts +1 -1
- package/dist/components/audio-out/audio-out.d.ts +7 -6
- package/dist/components/audioin.d.ts +1 -1
- package/dist/components/audioout.d.ts +1 -1
- package/dist/components/base/base.d.ts +11 -10
- package/dist/components/board/board.d.ts +15 -8
- package/dist/components/board/client.d.ts +1 -1
- package/dist/components/camera/camera.d.ts +4 -2
- package/dist/components/camera/client.d.ts +2 -2
- package/dist/components/encoder/encoder.d.ts +5 -4
- package/dist/components/encoder.d.ts +1 -1
- package/dist/components/gantry/gantry.d.ts +10 -7
- package/dist/components/generic/generic.d.ts +4 -1
- package/dist/components/gripper/gripper.d.ts +2 -1
- package/dist/components/input-controller/input-controller.d.ts +15 -5
- package/dist/components/inputcontroller.d.ts +1 -1
- package/dist/components/motor/motor.d.ts +19 -17
- package/dist/components/movement-sensor/movement-sensor.d.ts +42 -14
- package/dist/components/pose-tracker/pose-tracker.d.ts +4 -1
- package/dist/components/power-sensor/power-sensor.d.ts +20 -6
- package/dist/components/switch/switch.d.ts +3 -2
- package/dist/debug.d.ts +15 -7
- package/dist/events.d.ts +10 -12
- package/dist/extra/stream/client.d.ts +11 -12
- package/dist/extra/stream/stream.d.ts +1 -1
- package/dist/gen/app/agent/v1/agent_connect.d.ts +1 -1
- package/dist/gen/app/build/v1/build_connect.d.ts +1 -1
- package/dist/gen/app/cloudslam/v1/cloud_slam_connect.d.ts +1 -1
- package/dist/gen/app/data/v1/data_connect.d.ts +1 -1
- package/dist/gen/app/datapipelines/v1/data_pipelines_connect.d.ts +1 -1
- package/dist/gen/app/dataset/v1/dataset_connect.d.ts +1 -1
- package/dist/gen/app/datasync/v1/data_sync_connect.d.ts +1 -1
- package/dist/gen/app/mlinference/v1/ml_inference_connect.d.ts +1 -1
- package/dist/gen/app/mltraining/v1/ml_training_connect.d.ts +1 -1
- package/dist/gen/app/packages/v1/packages_connect.d.ts +1 -1
- package/dist/gen/app/v1/app_connect.d.ts +1 -1
- package/dist/gen/app/v1/billing_connect.d.ts +1 -1
- package/dist/gen/app/v1/end_user_connect.d.ts +1 -1
- package/dist/gen/app/v1/robot_connect.d.ts +1 -1
- package/dist/gen/component/arm/v1/arm_connect.d.ts +1 -1
- package/dist/gen/component/audioin/v1/audioin_connect.d.ts +1 -1
- package/dist/gen/component/audioout/v1/audioout_connect.d.ts +1 -1
- package/dist/gen/component/base/v1/base_connect.d.ts +1 -1
- package/dist/gen/component/board/v1/board_connect.d.ts +1 -1
- package/dist/gen/component/button/v1/button_connect.d.ts +1 -1
- package/dist/gen/component/camera/v1/camera_connect.d.ts +1 -1
- package/dist/gen/component/encoder/v1/encoder_connect.d.ts +1 -1
- package/dist/gen/component/gantry/v1/gantry_connect.d.ts +1 -1
- package/dist/gen/component/generic/v1/generic_connect.d.ts +1 -1
- package/dist/gen/component/gripper/v1/gripper_connect.d.ts +1 -1
- package/dist/gen/component/inputcontroller/v1/input_controller_connect.d.ts +1 -1
- package/dist/gen/component/motor/v1/motor_connect.d.ts +1 -1
- package/dist/gen/component/movementsensor/v1/movementsensor_connect.d.ts +1 -1
- package/dist/gen/component/posetracker/v1/pose_tracker_connect.d.ts +1 -1
- package/dist/gen/component/powersensor/v1/powersensor_connect.d.ts +1 -1
- package/dist/gen/component/sensor/v1/sensor_connect.d.ts +1 -1
- package/dist/gen/component/servo/v1/servo_connect.d.ts +1 -1
- package/dist/gen/component/switch/v1/switch_connect.d.ts +1 -1
- package/dist/gen/component/testecho/v1/testecho_connect.d.ts +1 -1
- package/dist/gen/google/bytestream/bytestream_connect.d.ts +1 -1
- package/dist/gen/google/iam/v1/iam_policy_connect.d.ts +1 -1
- package/dist/gen/google/longrunning/operations_connect.d.ts +1 -1
- package/dist/gen/grpc/reflection/v1/reflection_connect.d.ts +1 -1
- package/dist/gen/opentelemetry/proto/collector/logs/v1/logs_service_connect.d.ts +1 -1
- package/dist/gen/opentelemetry/proto/collector/metrics/v1/metrics_service_connect.d.ts +1 -1
- package/dist/gen/opentelemetry/proto/collector/profiles/v1development/profiles_service_connect.d.ts +1 -1
- package/dist/gen/opentelemetry/proto/collector/trace/v1/trace_service_connect.d.ts +1 -1
- package/dist/gen/proto/rpc/examples/echo/v1/echo_connect.d.ts +1 -1
- package/dist/gen/proto/rpc/examples/echoresource/v1/echoresource_connect.d.ts +1 -1
- package/dist/gen/proto/rpc/v1/auth_connect.d.ts +1 -1
- package/dist/gen/proto/rpc/webrtc/v1/signaling_connect.d.ts +1 -1
- package/dist/gen/provisioning/v1/provisioning_connect.d.ts +1 -1
- package/dist/gen/robot/v1/robot_connect.d.ts +1 -1
- package/dist/gen/service/datamanager/v1/data_manager_connect.d.ts +1 -1
- package/dist/gen/service/discovery/v1/discovery_connect.d.ts +1 -1
- package/dist/gen/service/generic/v1/generic_connect.d.ts +1 -1
- package/dist/gen/service/mlmodel/v1/mlmodel_connect.d.ts +1 -1
- package/dist/gen/service/motion/v1/motion_connect.d.ts +1 -1
- package/dist/gen/service/navigation/v1/navigation_connect.d.ts +1 -1
- package/dist/gen/service/sensors/v1/sensors_connect.d.ts +1 -1
- package/dist/gen/service/shell/v1/shell_connect.d.ts +1 -1
- package/dist/gen/service/slam/v1/slam_connect.d.ts +1 -1
- package/dist/gen/service/video/v1/video_connect.d.ts +1 -1
- package/dist/gen/service/vision/v1/vision_connect.d.ts +1 -1
- package/dist/gen/service/worldstatestore/v1/world_state_store_connect.d.ts +1 -1
- package/dist/gen/stream/v1/stream_connect.d.ts +1 -1
- package/dist/main.d.ts +11 -10
- package/dist/main.es.js +33210 -28872
- package/dist/main.umd.js +7 -6
- package/dist/robot/client.d.ts +86 -59
- package/dist/robot/dial.d.ts +10 -7
- package/dist/robot/robot.d.ts +29 -27
- package/dist/rpc/client-channel.d.ts +1 -1
- package/dist/rpc/client-stream.d.ts +5 -4
- package/dist/rpc/connection-closed-error.d.ts +1 -1
- package/dist/rpc/dial.d.ts +41 -34
- package/dist/rpc/signaling-exchange.d.ts +1 -1
- package/dist/rpc/stream-client-stream.d.ts +1 -1
- package/dist/rpc/unary-client-stream.d.ts +1 -1
- package/dist/services/data-manager/client.d.ts +14 -5
- package/dist/services/data-manager/data-manager.d.ts +1 -1
- package/dist/services/generic/client.d.ts +1 -1
- package/dist/services/generic/generic.d.ts +2 -1
- package/dist/services/motion/motion.d.ts +78 -53
- package/dist/services/navigation/client.d.ts +1 -1
- package/dist/services/navigation/navigation.d.ts +4 -2
- package/dist/services/slam/client.d.ts +1 -1
- package/dist/services/slam/slam.d.ts +6 -4
- package/dist/services/video/video.d.ts +6 -2
- package/dist/services/vision/vision.d.ts +19 -13
- package/dist/services/world-state-store/world-state-store.d.ts +19 -6
- package/dist/types.d.ts +7 -5
- package/dist/utils.d.ts +5 -5
- package/package.json +29 -29
package/dist/robot/client.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ServiceType } from '@bufbuild/protobuf';
|
|
2
2
|
import { type CallOptions, type Client } from '@connectrpc/connect';
|
|
3
3
|
import { type Credentials } from '../app/viam-transport';
|
|
4
|
-
import { EventDispatcher
|
|
4
|
+
import { EventDispatcher } from '../events';
|
|
5
5
|
import type { PoseInFrame, Transform } from '../gen/common/v1/common_pb';
|
|
6
6
|
import { GetModelsFromModulesRequest, GetPoseRequest, RestartModuleRequest, TransformPCDRequest, TransformPoseRequest } from '../gen/robot/v1/robot_pb';
|
|
7
7
|
import type { Robot } from './robot';
|
|
@@ -25,9 +25,9 @@ export interface DialWebRTCConf {
|
|
|
25
25
|
abort: boolean;
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
28
|
-
* Called when a non-retryable error is encountered during reconnection.
|
|
29
|
-
* error as retryable. Does not override
|
|
30
|
-
* limit.
|
|
28
|
+
* Called when a non-retryable error is encountered during reconnection.
|
|
29
|
+
* Return true to treat the error as retryable. Does not override
|
|
30
|
+
* reconnectMaxAttempts — retries are still bounded by that limit.
|
|
31
31
|
*/
|
|
32
32
|
shouldRetryOnError?: () => boolean;
|
|
33
33
|
serviceHost?: string;
|
|
@@ -35,19 +35,21 @@ export interface DialWebRTCConf {
|
|
|
35
35
|
iceServers?: ICEServer[];
|
|
36
36
|
priority?: number;
|
|
37
37
|
/**
|
|
38
|
-
* When true, sets ICE transport policy to relay-only so only TURN candidates
|
|
39
|
-
* testing relay connectivity through a TURN server.
|
|
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
40
|
*/
|
|
41
41
|
forceRelay?: boolean;
|
|
42
42
|
/**
|
|
43
|
-
* When true, strips TURN servers from the ICE configuration so only host and
|
|
44
|
-
* candidates are used. Useful for testing direct
|
|
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.
|
|
45
46
|
*/
|
|
46
47
|
forceP2P?: boolean;
|
|
47
48
|
/**
|
|
48
|
-
* When set, filters the signaling server's TURN list to only the server whose
|
|
49
|
-
* (compared by scheme, host, port, and transport —
|
|
50
|
-
*
|
|
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"`
|
|
51
53
|
*/
|
|
52
54
|
turnUri?: string;
|
|
53
55
|
/** Overrides the scheme of the matched TURN URI (`"turn"` or `"turns"`). */
|
|
@@ -57,20 +59,20 @@ export interface DialWebRTCConf {
|
|
|
57
59
|
/** Overrides the port of the matched TURN URI. */
|
|
58
60
|
turnPort?: number;
|
|
59
61
|
/**
|
|
60
|
-
* When true, the connection to the signaling server is made over plain HTTP
|
|
61
|
-
* when connecting to a robot running with `no_tls: true`.
|
|
62
|
+
* When true, the connection to the signaling server is made over plain HTTP
|
|
63
|
+
* (no TLS). Use this when connecting to a robot running with `no_tls: true`.
|
|
62
64
|
*/
|
|
63
65
|
signalingInsecure?: boolean;
|
|
64
66
|
/**
|
|
65
|
-
* Set timeout in milliseconds for dialing. Default is defined by
|
|
66
|
-
* disables the timeout.
|
|
67
|
+
* Set timeout in milliseconds for dialing. Default is defined by
|
|
68
|
+
* DIAL_TIMEOUT. A value of 0 disables the timeout.
|
|
67
69
|
*
|
|
68
70
|
* @deprecated Use `dialTimeoutMs` instead.
|
|
69
71
|
*/
|
|
70
72
|
dialTimeout?: number;
|
|
71
73
|
/**
|
|
72
|
-
* Set timeout in milliseconds for dialing. Default is defined by
|
|
73
|
-
* disables the timeout.
|
|
74
|
+
* Set timeout in milliseconds for dialing. Default is defined by
|
|
75
|
+
* DIAL_TIMEOUT. A value of 0 disables the timeout.
|
|
74
76
|
*/
|
|
75
77
|
dialTimeoutMs?: number;
|
|
76
78
|
extraHeaders?: Record<string, string>;
|
|
@@ -87,21 +89,21 @@ export interface DialDirectConf {
|
|
|
87
89
|
abort: boolean;
|
|
88
90
|
};
|
|
89
91
|
/**
|
|
90
|
-
* Called when a non-retryable error is encountered during reconnection.
|
|
91
|
-
* error as retryable. Does not override
|
|
92
|
-
* limit.
|
|
92
|
+
* Called when a non-retryable error is encountered during reconnection.
|
|
93
|
+
* Return true to treat the error as retryable. Does not override
|
|
94
|
+
* reconnectMaxAttempts — retries are still bounded by that limit.
|
|
93
95
|
*/
|
|
94
96
|
shouldRetryOnError?: () => boolean;
|
|
95
97
|
/**
|
|
96
|
-
* Set timeout in milliseconds for dialing. Default is defined by
|
|
97
|
-
* disables the timeout.
|
|
98
|
+
* Set timeout in milliseconds for dialing. Default is defined by
|
|
99
|
+
* DIAL_TIMEOUT. A value of 0 disables the timeout.
|
|
98
100
|
*
|
|
99
101
|
* @deprecated Use `dialTimeoutMs` instead.
|
|
100
102
|
*/
|
|
101
103
|
dialTimeout?: number;
|
|
102
104
|
/**
|
|
103
|
-
* Set timeout in milliseconds for dialing. Default is defined by
|
|
104
|
-
* disables the timeout.
|
|
105
|
+
* Set timeout in milliseconds for dialing. Default is defined by
|
|
106
|
+
* DIAL_TIMEOUT. A value of 0 disables the timeout.
|
|
105
107
|
*/
|
|
106
108
|
dialTimeoutMs?: number;
|
|
107
109
|
extraHeaders?: Record<string, string>;
|
|
@@ -138,49 +140,31 @@ export interface ConnectOptions {
|
|
|
138
140
|
creds?: Credentials;
|
|
139
141
|
priority?: number;
|
|
140
142
|
/**
|
|
141
|
-
* Set timeout in milliseconds for dialing. Default is defined by
|
|
142
|
-
* disables the timeout.
|
|
143
|
+
* Set timeout in milliseconds for dialing. Default is defined by
|
|
144
|
+
* DIAL_TIMEOUT. A value of 0 disables the timeout.
|
|
143
145
|
*
|
|
144
146
|
* @deprecated Use `dialTimeoutMs` instead.
|
|
145
147
|
*/
|
|
146
148
|
dialTimeout?: number;
|
|
147
149
|
/**
|
|
148
|
-
* Set timeout in milliseconds for dialing. Default is defined by
|
|
149
|
-
* disables the timeout.
|
|
150
|
+
* Set timeout in milliseconds for dialing. Default is defined by
|
|
151
|
+
* DIAL_TIMEOUT. A value of 0 disables the timeout.
|
|
150
152
|
*/
|
|
151
153
|
dialTimeoutMs?: number;
|
|
152
154
|
extraHeaders?: Record<string, string>;
|
|
153
155
|
}
|
|
154
156
|
export declare const isDialWebRTCConf: (value: DialConf) => value is DialWebRTCConf;
|
|
155
|
-
/**
|
|
157
|
+
/**
|
|
158
|
+
* Validates a DialConf passed to createRobotClient. Throws an error for invalid
|
|
159
|
+
* configs.
|
|
160
|
+
*/
|
|
156
161
|
export declare const validateDialConf: (conf: DialConf) => void;
|
|
157
|
-
interface RobotClientDispatchEvents {
|
|
158
|
-
track: RTCTrackEvent;
|
|
159
|
-
connectionstatechange: {
|
|
160
|
-
eventType: MachineConnectionEvent;
|
|
161
|
-
};
|
|
162
|
-
[MachineConnectionEvent.CONNECTING]: Record<string, never>;
|
|
163
|
-
[MachineConnectionEvent.CONNECTED]: Record<string, never>;
|
|
164
|
-
[MachineConnectionEvent.DISCONNECTING]: Record<string, never>;
|
|
165
|
-
[MachineConnectionEvent.DISCONNECTED]: Event | {
|
|
166
|
-
error?: Error;
|
|
167
|
-
};
|
|
168
|
-
[MachineConnectionEvent.DIALING]: {
|
|
169
|
-
method: 'webrtc' | 'grpc';
|
|
170
|
-
attempt: number;
|
|
171
|
-
};
|
|
172
|
-
[MachineConnectionEvent.RECONNECTING]: Event | undefined;
|
|
173
|
-
[MachineConnectionEvent.RECONNECTION_FAILED]: {
|
|
174
|
-
error: unknown;
|
|
175
|
-
attempts: number;
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
162
|
/**
|
|
179
163
|
* A gRPC-web client for a Robot.
|
|
180
164
|
*
|
|
181
165
|
* @group Clients
|
|
182
166
|
*/
|
|
183
|
-
export declare class RobotClient extends EventDispatcher
|
|
167
|
+
export declare class RobotClient extends EventDispatcher implements Robot {
|
|
184
168
|
private serviceHost;
|
|
185
169
|
private readonly webrtcOptions;
|
|
186
170
|
private readonly directOptions;
|
|
@@ -263,7 +247,11 @@ export declare class RobotClient extends EventDispatcher<RobotClientDispatchEven
|
|
|
263
247
|
readonly I: typeof import("../gen/robot/v1/robot_pb").CancelOperationRequest;
|
|
264
248
|
readonly O: typeof import("../gen/robot/v1/robot_pb").CancelOperationResponse;
|
|
265
249
|
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
266
|
-
};
|
|
250
|
+
}; /**
|
|
251
|
+
* Called when a non-retryable error is encountered during reconnection.
|
|
252
|
+
* Return true to treat the error as retryable. Does not override
|
|
253
|
+
* reconnectMaxAttempts — retries are still bounded by that limit.
|
|
254
|
+
*/
|
|
267
255
|
readonly blockForOperation: {
|
|
268
256
|
readonly name: "BlockForOperation";
|
|
269
257
|
readonly I: typeof import("../gen/robot/v1/robot_pb").BlockForOperationRequest;
|
|
@@ -286,7 +274,12 @@ export declare class RobotClient extends EventDispatcher<RobotClientDispatchEven
|
|
|
286
274
|
readonly name: "StreamStatus";
|
|
287
275
|
readonly I: typeof import("../gen/robot/v1/robot_pb").StreamStatusRequest;
|
|
288
276
|
readonly O: typeof import("../gen/robot/v1/robot_pb").StreamStatusResponse;
|
|
289
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming;
|
|
277
|
+
readonly kind: import("@bufbuild/protobuf").MethodKind.ServerStreaming; /**
|
|
278
|
+
* Set timeout in milliseconds for dialing. Default is defined by
|
|
279
|
+
* DIAL_TIMEOUT. A value of 0 disables the timeout.
|
|
280
|
+
*
|
|
281
|
+
* @deprecated Use `dialTimeoutMs` instead.
|
|
282
|
+
*/
|
|
290
283
|
};
|
|
291
284
|
readonly stopAll: {
|
|
292
285
|
readonly name: "StopAll";
|
|
@@ -304,6 +297,7 @@ export declare class RobotClient extends EventDispatcher<RobotClientDispatchEven
|
|
|
304
297
|
readonly name: "SendSessionHeartbeat";
|
|
305
298
|
readonly I: typeof import("../gen/robot/v1/robot_pb").SendSessionHeartbeatRequest;
|
|
306
299
|
readonly O: typeof import("../gen/robot/v1/robot_pb").SendSessionHeartbeatResponse;
|
|
300
|
+
/** Options required to dial a robot. */
|
|
307
301
|
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
308
302
|
};
|
|
309
303
|
readonly log: {
|
|
@@ -423,6 +417,11 @@ export declare class RobotClient extends EventDispatcher<RobotClientDispatchEven
|
|
|
423
417
|
readonly name: "Stop";
|
|
424
418
|
readonly I: typeof import("../gen/component/arm/v1/arm_pb").StopRequest;
|
|
425
419
|
readonly O: typeof import("../gen/component/arm/v1/arm_pb").StopResponse;
|
|
420
|
+
/**
|
|
421
|
+
* When true, strips TURN servers from the ICE configuration so only host and
|
|
422
|
+
* server-reflexive candidates are used. Useful for testing direct
|
|
423
|
+
* connectivity without relay fallback.
|
|
424
|
+
*/
|
|
426
425
|
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
427
426
|
};
|
|
428
427
|
readonly isMoving: {
|
|
@@ -441,6 +440,12 @@ export declare class RobotClient extends EventDispatcher<RobotClientDispatchEven
|
|
|
441
440
|
readonly name: "GetStatus";
|
|
442
441
|
readonly I: typeof import("../gen/common/v1/common_pb").GetStatusRequest;
|
|
443
442
|
readonly O: typeof import("../gen/common/v1/common_pb").GetStatusResponse;
|
|
443
|
+
/**
|
|
444
|
+
* Set timeout in milliseconds for dialing. Default is defined by
|
|
445
|
+
* DIAL_TIMEOUT. A value of 0 disables the timeout.
|
|
446
|
+
*
|
|
447
|
+
* @deprecated Use `dialTimeoutMs` instead.
|
|
448
|
+
*/
|
|
444
449
|
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
445
450
|
};
|
|
446
451
|
readonly getKinematics: {
|
|
@@ -502,6 +507,11 @@ export declare class RobotClient extends EventDispatcher<RobotClientDispatchEven
|
|
|
502
507
|
readonly O: typeof import("../gen/component/base/v1/base_pb").IsMovingResponse;
|
|
503
508
|
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
504
509
|
};
|
|
510
|
+
/**
|
|
511
|
+
* Called when a non-retryable error is encountered during reconnection.
|
|
512
|
+
* Return true to treat the error as retryable. Does not override
|
|
513
|
+
* reconnectMaxAttempts — retries are still bounded by that limit.
|
|
514
|
+
*/
|
|
505
515
|
readonly doCommand: {
|
|
506
516
|
readonly name: "DoCommand";
|
|
507
517
|
readonly I: typeof import("../gen/common/v1/common_pb").DoCommandRequest;
|
|
@@ -522,7 +532,10 @@ export declare class RobotClient extends EventDispatcher<RobotClientDispatchEven
|
|
|
522
532
|
};
|
|
523
533
|
readonly getProperties: {
|
|
524
534
|
readonly name: "GetProperties";
|
|
525
|
-
readonly I: typeof import("../gen/component/base/v1/base_pb").GetPropertiesRequest;
|
|
535
|
+
readonly I: typeof import("../gen/component/base/v1/base_pb").GetPropertiesRequest; /**
|
|
536
|
+
* When true, the connection to the signaling server is made over plain HTTP
|
|
537
|
+
* (no TLS). Use this when connecting to a robot running with `no_tls: true`.
|
|
538
|
+
*/
|
|
526
539
|
readonly O: typeof import("../gen/component/base/v1/base_pb").GetPropertiesResponse;
|
|
527
540
|
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
528
541
|
};
|
|
@@ -605,6 +618,10 @@ export declare class RobotClient extends EventDispatcher<RobotClientDispatchEven
|
|
|
605
618
|
};
|
|
606
619
|
readonly setPowerMode: {
|
|
607
620
|
readonly name: "SetPowerMode";
|
|
621
|
+
/**
|
|
622
|
+
* Set timeout in milliseconds for dialing. Default is defined by
|
|
623
|
+
* DIAL_TIMEOUT. A value of 0 disables the timeout.
|
|
624
|
+
*/
|
|
608
625
|
readonly I: typeof import("../gen/component/board/v1/board_pb").SetPowerModeRequest;
|
|
609
626
|
readonly O: typeof import("../gen/component/board/v1/board_pb").SetPowerModeResponse;
|
|
610
627
|
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
@@ -694,7 +711,7 @@ export declare class RobotClient extends EventDispatcher<RobotClientDispatchEven
|
|
|
694
711
|
readonly isMoving: {
|
|
695
712
|
readonly name: "IsMoving";
|
|
696
713
|
readonly I: typeof import("../gen/component/gantry/v1/gantry_pb").IsMovingRequest;
|
|
697
|
-
readonly O: typeof import("../gen/component/gantry/v1/gantry_pb").IsMovingResponse;
|
|
714
|
+
readonly O: typeof import("../gen/component/gantry/v1/gantry_pb").IsMovingResponse; /** @default 10. */
|
|
698
715
|
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
699
716
|
};
|
|
700
717
|
readonly doCommand: {
|
|
@@ -1230,6 +1247,7 @@ export declare class RobotClient extends EventDispatcher<RobotClientDispatchEven
|
|
|
1230
1247
|
readonly doCommand: {
|
|
1231
1248
|
readonly name: "DoCommand";
|
|
1232
1249
|
readonly I: typeof import("../gen/common/v1/common_pb").DoCommandRequest;
|
|
1250
|
+
/** Overrides the scheme of the matched TURN URI (`"turn"` or `"turns"`). */
|
|
1233
1251
|
readonly O: typeof import("../gen/common/v1/common_pb").DoCommandResponse;
|
|
1234
1252
|
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
1235
1253
|
};
|
|
@@ -1293,7 +1311,12 @@ export declare class RobotClient extends EventDispatcher<RobotClientDispatchEven
|
|
|
1293
1311
|
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
1294
1312
|
};
|
|
1295
1313
|
readonly getStatus: {
|
|
1296
|
-
readonly name: "GetStatus";
|
|
1314
|
+
readonly name: "GetStatus"; /**
|
|
1315
|
+
* Set timeout in milliseconds for dialing. Default is defined by
|
|
1316
|
+
* DIAL_TIMEOUT. A value of 0 disables the timeout.
|
|
1317
|
+
*
|
|
1318
|
+
* @deprecated Use `dialTimeoutMs` instead.
|
|
1319
|
+
*/
|
|
1297
1320
|
readonly I: typeof import("../gen/common/v1/common_pb").GetStatusRequest;
|
|
1298
1321
|
readonly O: typeof import("../gen/common/v1/common_pb").GetStatusResponse;
|
|
1299
1322
|
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
@@ -1341,7 +1364,11 @@ export declare class RobotClient extends EventDispatcher<RobotClientDispatchEven
|
|
|
1341
1364
|
};
|
|
1342
1365
|
readonly getGeometries: {
|
|
1343
1366
|
readonly name: "GetGeometries";
|
|
1344
|
-
readonly I: typeof import("../gen/common/v1/common_pb").GetGeometriesRequest;
|
|
1367
|
+
readonly I: typeof import("../gen/common/v1/common_pb").GetGeometriesRequest; /**
|
|
1368
|
+
* Called when a non-retryable error is encountered during reconnection.
|
|
1369
|
+
* Return true to treat the error as retryable. Does not override
|
|
1370
|
+
* reconnectMaxAttempts — retries are still bounded by that limit.
|
|
1371
|
+
*/
|
|
1345
1372
|
readonly O: typeof import("../gen/common/v1/common_pb").GetGeometriesResponse;
|
|
1346
1373
|
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
1347
1374
|
};
|
|
@@ -1377,7 +1404,7 @@ export declare class RobotClient extends EventDispatcher<RobotClientDispatchEven
|
|
|
1377
1404
|
readonly doCommand: {
|
|
1378
1405
|
readonly name: "DoCommand";
|
|
1379
1406
|
readonly I: typeof import("../gen/common/v1/common_pb").DoCommandRequest;
|
|
1380
|
-
readonly O: typeof import("../gen/common/v1/common_pb").DoCommandResponse;
|
|
1407
|
+
readonly O: typeof import("../gen/common/v1/common_pb").DoCommandResponse; /** @default Number.POSITIVE_INFINITY */
|
|
1381
1408
|
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
1382
1409
|
};
|
|
1383
1410
|
readonly getStatus: {
|
|
@@ -1444,7 +1471,7 @@ export declare class RobotClient extends EventDispatcher<RobotClientDispatchEven
|
|
|
1444
1471
|
stopAll(): Promise<void>;
|
|
1445
1472
|
frameSystemConfig(transforms: Transform[]): Promise<import("../gen/robot/v1/robot_pb").FrameSystemConfig[]>;
|
|
1446
1473
|
transformPose(source: PoseInFrame, destination: string, supplementalTransforms: Transform[], callOptions?: CallOptions): Promise<PoseInFrame>;
|
|
1447
|
-
transformPCD(pointCloudPCD: Uint8Array, source: string, destination: string): Promise<Uint8Array
|
|
1474
|
+
transformPCD(pointCloudPCD: Uint8Array, source: string, destination: string): Promise<Uint8Array>;
|
|
1448
1475
|
getModelsFromModules(): Promise<import("../gen/robot/v1/robot_pb").ModuleModel[]>;
|
|
1449
1476
|
getCloudMetadata(): Promise<import("../gen/robot/v1/robot_pb").GetCloudMetadataResponse>;
|
|
1450
1477
|
resourceNames(): Promise<import("../gen/common/v1/common_pb").ResourceName[]>;
|
package/dist/robot/dial.d.ts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { RobotClient, type DialConf } from './client';
|
|
2
2
|
/**
|
|
3
|
-
* Connect to a robot via WebRTC or gRPC and return a RobotClient after
|
|
3
|
+
* Connect to a robot via WebRTC or gRPC and return a RobotClient after
|
|
4
|
+
* connecting successfully.
|
|
4
5
|
*
|
|
5
|
-
* The initial connection method is determined by whether a
|
|
6
|
-
* {@link DialDirectConf} is passed in as the first
|
|
6
|
+
* The initial connection method is determined by whether a
|
|
7
|
+
* {@link DialWebRTCConf} or {@link DialDirectConf} is passed in as the first
|
|
8
|
+
* argument.
|
|
7
9
|
*
|
|
8
|
-
* Reconnect is enabled by default and disabled with `noReconnect`. When
|
|
9
|
-
* re-attempt to reconnect if initial connection is
|
|
10
|
+
* Reconnect is enabled by default and disabled with `noReconnect`. When
|
|
11
|
+
* enabled, this function will re-attempt to reconnect if initial connection is
|
|
12
|
+
* unsuccessful using backoff.
|
|
10
13
|
*
|
|
11
|
-
* If `noReconnect` is specified and connecting via WebRTC fails, then this
|
|
12
|
-
* automatically re-attempt to connect via gRPC directly.
|
|
14
|
+
* If `noReconnect` is specified and connecting via WebRTC fails, then this
|
|
15
|
+
* function will automatically re-attempt to connect via gRPC directly.
|
|
13
16
|
*/
|
|
14
17
|
export declare const createRobotClient: (conf: DialConf) => Promise<RobotClient>;
|
package/dist/robot/robot.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { PlainMessage, Struct } from '@bufbuild/protobuf';
|
|
2
2
|
import type { CallOptions } from '@connectrpc/connect';
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
3
|
+
import { MachineConnectionEvent } from '../events';
|
|
4
|
+
import * as proto from '../gen/robot/v1/robot_pb';
|
|
5
5
|
import type { PoseInFrame, ResourceName, Transform } from '../types';
|
|
6
6
|
export type CloudMetadata = PlainMessage<proto.GetCloudMetadataResponse>;
|
|
7
7
|
export type ConfigStatus = PlainMessage<proto.ConfigStatus>;
|
|
@@ -57,8 +57,8 @@ export interface Robot {
|
|
|
57
57
|
*/
|
|
58
58
|
cancelOperation(id: string): Promise<void>;
|
|
59
59
|
/**
|
|
60
|
-
* Blocks on the specified operation on the machine. This function will only
|
|
61
|
-
* specific operation has finished or has been cancelled.
|
|
60
|
+
* Blocks on the specified operation on the machine. This function will only
|
|
61
|
+
* return when the specific operation has finished or has been cancelled.
|
|
62
62
|
*
|
|
63
63
|
* @example
|
|
64
64
|
*
|
|
@@ -72,8 +72,8 @@ export interface Robot {
|
|
|
72
72
|
*/
|
|
73
73
|
blockForOperation(id: string): Promise<void>;
|
|
74
74
|
/**
|
|
75
|
-
* Cancel all current and outstanding operations for the robot and stop all
|
|
76
|
-
* movement.
|
|
75
|
+
* Cancel all current and outstanding operations for the robot and stop all
|
|
76
|
+
* actuators and movement.
|
|
77
77
|
*
|
|
78
78
|
* @example
|
|
79
79
|
*
|
|
@@ -81,8 +81,8 @@ export interface Robot {
|
|
|
81
81
|
* await machine.stopAll();
|
|
82
82
|
* ```
|
|
83
83
|
*
|
|
84
|
-
* @param extra - Any extra parameters to pass to the components' `stop`
|
|
85
|
-
* component's resource name.
|
|
84
|
+
* @param extra - Any extra parameters to pass to the components' `stop`
|
|
85
|
+
* methods, keyed on the component's resource name.
|
|
86
86
|
* @group Operations
|
|
87
87
|
* @alpha
|
|
88
88
|
*/
|
|
@@ -101,28 +101,29 @@ export interface Robot {
|
|
|
101
101
|
*/
|
|
102
102
|
frameSystemConfig(transform: Transform[]): Promise<FrameSystemConfig[]>;
|
|
103
103
|
/**
|
|
104
|
-
* Transform a given source Pose from the reference frame to a new specified
|
|
105
|
-
* a reference frame.
|
|
104
|
+
* Transform a given source Pose from the reference frame to a new specified
|
|
105
|
+
* destination which is a reference frame.
|
|
106
106
|
*
|
|
107
107
|
* @param query - The pose that should be transformed
|
|
108
108
|
* @param destination - The name of the reference frame to transform the given
|
|
109
|
-
* @param supplementalTransforms - Pose information on any additional
|
|
110
|
-
* needed to perform the transform
|
|
109
|
+
* @param supplementalTransforms - Pose information on any additional
|
|
110
|
+
* reference frames that are needed to perform the transform
|
|
111
111
|
* @group Frame System
|
|
112
112
|
* @alpha
|
|
113
113
|
*/
|
|
114
114
|
transformPose(source: PoseInFrame, destination: string, supplementalTransforms: Transform[], callOptions?: CallOptions): Promise<PoseInFrame>;
|
|
115
115
|
/**
|
|
116
|
-
* Transform a given source point cloud from the reference frame to a new
|
|
117
|
-
* which is a reference frame.
|
|
116
|
+
* Transform a given source point cloud from the reference frame to a new
|
|
117
|
+
* specified destination which is a reference frame.
|
|
118
118
|
*
|
|
119
119
|
* @param pointCloudPCD - The point clouds to transform. This should be in the
|
|
120
120
|
* {@link https://pointclouds.org/documentation/tutorials/pcd_file_format.html PCD format encoded into bytes}
|
|
121
121
|
* @param source - The reference frame of the point cloud.
|
|
122
|
-
* @param destination - The reference frame into which the source data should
|
|
123
|
-
* unset this defaults to the "world" reference frame. Do
|
|
124
|
-
*
|
|
125
|
-
* that will make the
|
|
122
|
+
* @param destination - The reference frame into which the source data should
|
|
123
|
+
* be transformed, if unset this defaults to the "world" reference frame. Do
|
|
124
|
+
* not move the robot between the generation of the initial pointcloud and
|
|
125
|
+
* the receipt of the transformed pointcloud because that will make the
|
|
126
|
+
* transformations inaccurate.
|
|
126
127
|
* @group Frame System
|
|
127
128
|
* @alpha
|
|
128
129
|
*/
|
|
@@ -169,12 +170,13 @@ export interface Robot {
|
|
|
169
170
|
/**
|
|
170
171
|
* Call a function when a connection event occurs.
|
|
171
172
|
*
|
|
172
|
-
* Note that direct gRPC connections that disconnect will not emit a
|
|
173
|
-
* connections that disconnect will emit a disconnect
|
|
174
|
-
* manual calls of `connect` and
|
|
173
|
+
* Note that direct gRPC connections that disconnect will not emit a
|
|
174
|
+
* disconnect event. WebRTC connections that disconnect will emit a disconnect
|
|
175
|
+
* event. All connections emit events during manual calls of `connect` and
|
|
176
|
+
* `disconnect`.
|
|
175
177
|
*
|
|
176
|
-
* @param type - The event MachineConnectionEvent that was triggered, or all
|
|
177
|
-
* with 'connectionstatechange'.
|
|
178
|
+
* @param type - The event MachineConnectionEvent that was triggered, or all
|
|
179
|
+
* connection events with 'connectionstatechange'.
|
|
178
180
|
* @param listener - The function to call
|
|
179
181
|
* @alpha
|
|
180
182
|
*/
|
|
@@ -213,10 +215,10 @@ export interface Robot {
|
|
|
213
215
|
* await machine.restartModule('namespace:module:model', 'my_model_name');
|
|
214
216
|
* ```
|
|
215
217
|
*
|
|
216
|
-
* @param moduleId - The id matching the module_id field of the registry
|
|
217
|
-
* configuration
|
|
218
|
-
* @param moduleName - The name matching the name field of the local/registry
|
|
219
|
-
* configuration
|
|
218
|
+
* @param moduleId - The id matching the module_id field of the registry
|
|
219
|
+
* module in your part configuration
|
|
220
|
+
* @param moduleName - The name matching the name field of the local/registry
|
|
221
|
+
* module in your part configuration
|
|
220
222
|
* @group Modules
|
|
221
223
|
* @alpha
|
|
222
224
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AnyMessage, Message, MethodInfo, PartialMessage, ServiceType } from '@bufbuild/protobuf';
|
|
2
2
|
import type { ContextValues, StreamResponse, Transport, UnaryResponse } from '@connectrpc/connect';
|
|
3
|
-
import {
|
|
3
|
+
import { RequestHeaders, RequestMessage, Stream } from '../gen/proto/rpc/webrtc/v1/grpc_pb';
|
|
4
4
|
import { BaseChannel } from './base-channel';
|
|
5
5
|
export declare class ClientChannel extends BaseChannel implements Transport {
|
|
6
6
|
private streamIDCounter;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import type { AnyMessage, Message, MethodInfo, ServiceType } from '@bufbuild/protobuf';
|
|
2
|
-
import { Metadata, RequestHeaders,
|
|
2
|
+
import { Metadata, RequestHeaders, Response, ResponseHeaders, ResponseTrailers, Stream } from '../gen/proto/rpc/webrtc/v1/grpc_pb';
|
|
3
3
|
import { BaseStream } from './base-stream';
|
|
4
4
|
import type { ClientChannel } from './client-channel';
|
|
5
5
|
export interface ClientStreamConstructor<T extends ClientStream<I, O>, I extends Message<I> = AnyMessage, O extends Message<O> = AnyMessage> {
|
|
6
6
|
new (channel: ClientChannel, stream: Stream, onDone: (id: bigint) => void, service: ServiceType, method: MethodInfo<I, O>, header: HeadersInit | undefined): T;
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
|
-
* A ClientStream provides all the facilities needed to invoke and manage a gRPC
|
|
10
|
-
* low-level. Implementors like UnaryClientStream and
|
|
11
|
-
* flow of unary/stream
|
|
9
|
+
* A ClientStream provides all the facilities needed to invoke and manage a gRPC
|
|
10
|
+
* stream at a low-level. Implementors like UnaryClientStream and
|
|
11
|
+
* StreamClientStream handle the method specific flow of unary/stream
|
|
12
|
+
* operations.
|
|
12
13
|
*/
|
|
13
14
|
export declare abstract class ClientStream<I extends Message<I> = AnyMessage, O extends Message<O> = AnyMessage> extends BaseStream {
|
|
14
15
|
protected readonly channel: ClientChannel;
|
package/dist/rpc/dial.d.ts
CHANGED
|
@@ -1,51 +1,55 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Message } from '@bufbuild/protobuf';
|
|
2
2
|
import type { AnyMessage, MethodInfo, PartialMessage, ServiceType } from '@bufbuild/protobuf';
|
|
3
3
|
import type { ContextValues, StreamResponse, Transport, UnaryResponse } from '@connectrpc/connect';
|
|
4
4
|
import { type Credentials } from '../app/viam-transport';
|
|
5
5
|
export interface DialOptions {
|
|
6
|
-
credentials?: Credentials;
|
|
6
|
+
credentials?: Credentials | undefined;
|
|
7
7
|
webrtcOptions?: DialWebRTCOptions;
|
|
8
|
-
externalAuthAddress?: string;
|
|
9
|
-
externalAuthToEntity?: string;
|
|
8
|
+
externalAuthAddress?: string | undefined;
|
|
9
|
+
externalAuthToEntity?: string | undefined;
|
|
10
10
|
/**
|
|
11
|
-
* `accessToken` allows a pre-authenticated client to dial with an
|
|
12
|
-
* dial will have the access token appended to
|
|
13
|
-
* will appened it to the
|
|
11
|
+
* `accessToken` allows a pre-authenticated client to dial with an
|
|
12
|
+
* authorization header. Direct dial will have the access token appended to
|
|
13
|
+
* the "Authorization: Bearer" header. WebRTC dial will appened it to the
|
|
14
|
+
* signaling server communication
|
|
14
15
|
*
|
|
15
16
|
* If enabled, other auth options have no affect. Eg. authEntity, credentials,
|
|
16
|
-
* externalAuthAddress, externalAuthToEntity,
|
|
17
|
+
* externalAuthAddress, externalAuthToEntity,
|
|
18
|
+
* webrtcOptions.signalingAccessToken
|
|
17
19
|
*/
|
|
18
|
-
accessToken?: string;
|
|
20
|
+
accessToken?: string | undefined;
|
|
19
21
|
/**
|
|
20
22
|
* Set timeout in milliseconds for dialing.
|
|
21
23
|
*
|
|
22
24
|
* @deprecated Use `dialTimeoutMs` instead.
|
|
23
25
|
*/
|
|
24
|
-
dialTimeout?: number;
|
|
26
|
+
dialTimeout?: number | undefined;
|
|
25
27
|
/** Set timeout in milliseconds for dialing. */
|
|
26
|
-
dialTimeoutMs?: number;
|
|
28
|
+
dialTimeoutMs?: number | undefined;
|
|
27
29
|
extraHeaders?: Headers;
|
|
28
30
|
}
|
|
29
31
|
export interface DialWebRTCOptions {
|
|
30
32
|
disableTrickleICE: boolean;
|
|
31
33
|
rtcConfig?: RTCConfiguration;
|
|
32
34
|
/**
|
|
33
|
-
* SignalingExternalAuthAddress is the address to perform external auth yet.
|
|
34
|
-
* be needed since the signaler is typically in the same
|
|
35
|
+
* SignalingExternalAuthAddress is the address to perform external auth yet.
|
|
36
|
+
* This is unlikely to be needed since the signaler is typically in the same
|
|
37
|
+
* place where authentication happens.
|
|
35
38
|
*/
|
|
36
39
|
signalingExternalAuthAddress?: string;
|
|
37
40
|
/**
|
|
38
|
-
* SignalingExternalAuthToEntity is the entity to authenticate for after
|
|
39
|
-
* authenticating. This is unlikely to be needed since the signaler
|
|
40
|
-
* where authentication happens.
|
|
41
|
+
* SignalingExternalAuthToEntity is the entity to authenticate for after
|
|
42
|
+
* externally authenticating. This is unlikely to be needed since the signaler
|
|
43
|
+
* is typically in the same place where authentication happens.
|
|
41
44
|
*/
|
|
42
45
|
signalingExternalAuthToEntity?: string;
|
|
43
46
|
signalingCredentials?: Credentials;
|
|
44
47
|
/**
|
|
45
|
-
* `signalingAccessToken` allows a pre-authenticated client to dial with an
|
|
46
|
-
* to the signaling server. This skips the Authenticate()
|
|
47
|
-
* external auth but does not skip the
|
|
48
|
-
* external auth
|
|
48
|
+
* `signalingAccessToken` allows a pre-authenticated client to dial with an
|
|
49
|
+
* authorization header to the signaling server. This skips the Authenticate()
|
|
50
|
+
* request to the singaling server or external auth but does not skip the
|
|
51
|
+
* AuthenticateTo() request to retrieve the credentials at the external auth
|
|
52
|
+
* endpoint.
|
|
49
53
|
*
|
|
50
54
|
* If enabled, other auth options have no affect. Eg. authEntity, credentials,
|
|
51
55
|
* signalingAuthEntity, signalingCredentials.
|
|
@@ -53,19 +57,21 @@ export interface DialWebRTCOptions {
|
|
|
53
57
|
signalingAccessToken?: string;
|
|
54
58
|
additionalSdpFields?: Record<string, string | number>;
|
|
55
59
|
/**
|
|
56
|
-
* When true, sets ICE transport policy to relay-only so only TURN candidates
|
|
57
|
-
* testing relay connectivity through a TURN server.
|
|
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.
|
|
58
62
|
*/
|
|
59
63
|
forceRelay?: boolean;
|
|
60
64
|
/**
|
|
61
|
-
* When true, strips TURN servers from the ICE configuration so only host and
|
|
62
|
-
* candidates are used. Useful for testing direct
|
|
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.
|
|
63
68
|
*/
|
|
64
69
|
forceP2P?: boolean;
|
|
65
70
|
/**
|
|
66
|
-
* When set, filters the signaling server's TURN list to only the server whose
|
|
67
|
-
* (compared by scheme, host, port, and transport —
|
|
68
|
-
*
|
|
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"`
|
|
69
75
|
*/
|
|
70
76
|
turnUri?: string;
|
|
71
77
|
/** Overrides the scheme of the matched TURN URI (`"turn"` or `"turns"`). */
|
|
@@ -75,8 +81,8 @@ export interface DialWebRTCOptions {
|
|
|
75
81
|
/** Overrides the port of the matched TURN URI. */
|
|
76
82
|
turnPort?: number;
|
|
77
83
|
/**
|
|
78
|
-
* When true, the connection to the signaling server is made over plain HTTP
|
|
79
|
-
* when connecting to a robot running with `no_tls: true`.
|
|
84
|
+
* When true, the connection to the signaling server is made over plain HTTP
|
|
85
|
+
* (no TLS). Use this when connecting to a robot running with `no_tls: true`.
|
|
80
86
|
*/
|
|
81
87
|
signalingInsecure?: boolean;
|
|
82
88
|
}
|
|
@@ -100,11 +106,12 @@ export interface WebRTCConnection {
|
|
|
100
106
|
dataChannel: RTCDataChannel;
|
|
101
107
|
}
|
|
102
108
|
/**
|
|
103
|
-
* DialWebRTC makes a connection to given host by signaling with the address
|
|
104
|
-
* returned upon successful connection that contains a
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
109
|
+
* DialWebRTC makes a connection to given host by signaling with the address
|
|
110
|
+
* provided. A Promise is returned upon successful connection that contains a
|
|
111
|
+
* transport factory to use with gRPC client as well as the WebRTC
|
|
112
|
+
* PeerConnection itself. Care should be taken with the PeerConnection and is
|
|
113
|
+
* currently returned for experimental use. TODO(GOUT-7): figure out decent way
|
|
114
|
+
* to handle reconnect on connection termination
|
|
108
115
|
*/
|
|
109
116
|
export declare const dialWebRTC: (signalingAddress: string, host: string, dialOpts?: DialOptions, transportCredentialsInclude?: boolean) => Promise<WebRTCConnection>;
|
|
110
117
|
export declare const validateDialOptions: (opts?: DialOptions) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CallOptions, Client } from '@connectrpc/connect';
|
|
2
|
-
import {
|
|
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';
|
|
5
5
|
export declare class SignalingExchange {
|