@viamrobotics/sdk 0.66.1 → 0.67.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/api-version.d.ts +1 -1
- package/dist/app/data-client.d.ts +18 -6
- package/dist/gen/app/agent/v1/agent_pb.d.ts +14 -0
- package/dist/gen/app/build/v1/build_pb.d.ts +8 -0
- package/dist/gen/app/data/v1/data_pb.d.ts +62 -0
- package/dist/gen/app/v1/app_pb.d.ts +5 -0
- package/dist/gen/common/v1/common_pb.d.ts +59 -0
- package/dist/gen/opentelemetry/proto/common/v1/common_pb.d.ts +35 -0
- package/dist/gen/opentelemetry/proto/logs/v1/logs_pb.d.ts +0 -2
- package/dist/gen/opentelemetry/proto/profiles/v1development/profiles_pb.d.ts +29 -14
- package/dist/main.es.js +3913 -3779
- package/dist/main.umd.js +7 -7
- package/dist/robot/client.d.ts +61 -4
- package/dist/rpc/dial.d.ts +7 -0
- package/dist/rpc/index.d.ts +2 -1
- package/package.json +1 -1
package/dist/robot/client.d.ts
CHANGED
|
@@ -24,6 +24,12 @@ export interface DialWebRTCConf {
|
|
|
24
24
|
reconnectAbortSignal?: {
|
|
25
25
|
abort: boolean;
|
|
26
26
|
};
|
|
27
|
+
/**
|
|
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
|
+
*/
|
|
32
|
+
shouldRetryOnError?: () => boolean;
|
|
27
33
|
serviceHost?: string;
|
|
28
34
|
signalingAddress: string;
|
|
29
35
|
iceServers?: ICEServer[];
|
|
@@ -31,8 +37,15 @@ export interface DialWebRTCConf {
|
|
|
31
37
|
/**
|
|
32
38
|
* Set timeout in milliseconds for dialing. Default is defined by
|
|
33
39
|
* DIAL_TIMEOUT. A value of 0 disables the timeout.
|
|
40
|
+
*
|
|
41
|
+
* @deprecated Use `dialTimeoutMs` instead.
|
|
34
42
|
*/
|
|
35
43
|
dialTimeout?: number;
|
|
44
|
+
/**
|
|
45
|
+
* Set timeout in milliseconds for dialing. Default is defined by
|
|
46
|
+
* DIAL_TIMEOUT. A value of 0 disables the timeout.
|
|
47
|
+
*/
|
|
48
|
+
dialTimeoutMs?: number;
|
|
36
49
|
extraHeaders?: Record<string, string>;
|
|
37
50
|
}
|
|
38
51
|
/** Options required to dial a robot via gRPC. */
|
|
@@ -46,7 +59,24 @@ export interface DialDirectConf {
|
|
|
46
59
|
reconnectAbortSignal?: {
|
|
47
60
|
abort: boolean;
|
|
48
61
|
};
|
|
62
|
+
/**
|
|
63
|
+
* Called when a non-retryable error is encountered during reconnection.
|
|
64
|
+
* Return true to treat the error as retryable. Does not override
|
|
65
|
+
* reconnectMaxAttempts — retries are still bounded by that limit.
|
|
66
|
+
*/
|
|
67
|
+
shouldRetryOnError?: () => boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Set timeout in milliseconds for dialing. Default is defined by
|
|
70
|
+
* DIAL_TIMEOUT. A value of 0 disables the timeout.
|
|
71
|
+
*
|
|
72
|
+
* @deprecated Use `dialTimeoutMs` instead.
|
|
73
|
+
*/
|
|
49
74
|
dialTimeout?: number;
|
|
75
|
+
/**
|
|
76
|
+
* Set timeout in milliseconds for dialing. Default is defined by
|
|
77
|
+
* DIAL_TIMEOUT. A value of 0 disables the timeout.
|
|
78
|
+
*/
|
|
79
|
+
dialTimeoutMs?: number;
|
|
50
80
|
extraHeaders?: Record<string, string>;
|
|
51
81
|
}
|
|
52
82
|
/** Options required to dial a robot. */
|
|
@@ -59,11 +89,13 @@ interface WebRTCOptions {
|
|
|
59
89
|
noReconnect?: boolean;
|
|
60
90
|
reconnectMaxAttempts?: number;
|
|
61
91
|
reconnectMaxWait?: number;
|
|
92
|
+
shouldRetryOnError?: () => boolean;
|
|
62
93
|
}
|
|
63
94
|
interface DirectOptions {
|
|
64
95
|
noReconnect?: boolean;
|
|
65
96
|
reconnectMaxAttempts?: number;
|
|
66
97
|
reconnectMaxWait?: number;
|
|
98
|
+
shouldRetryOnError?: () => boolean;
|
|
67
99
|
}
|
|
68
100
|
interface SessionOptions {
|
|
69
101
|
disabled: boolean;
|
|
@@ -71,7 +103,18 @@ interface SessionOptions {
|
|
|
71
103
|
export interface ConnectOptions {
|
|
72
104
|
creds?: Credentials;
|
|
73
105
|
priority?: number;
|
|
106
|
+
/**
|
|
107
|
+
* Set timeout in milliseconds for dialing. Default is defined by
|
|
108
|
+
* DIAL_TIMEOUT. A value of 0 disables the timeout.
|
|
109
|
+
*
|
|
110
|
+
* @deprecated Use `dialTimeoutMs` instead.
|
|
111
|
+
*/
|
|
74
112
|
dialTimeout?: number;
|
|
113
|
+
/**
|
|
114
|
+
* Set timeout in milliseconds for dialing. Default is defined by
|
|
115
|
+
* DIAL_TIMEOUT. A value of 0 disables the timeout.
|
|
116
|
+
*/
|
|
117
|
+
dialTimeoutMs?: number;
|
|
75
118
|
extraHeaders?: Record<string, string>;
|
|
76
119
|
}
|
|
77
120
|
export declare const isDialWebRTCConf: (value: DialConf) => value is DialWebRTCConf;
|
|
@@ -131,6 +174,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
|
|
|
131
174
|
private get noReconnect();
|
|
132
175
|
private get reconnectMaxAttempts();
|
|
133
176
|
private get reconnectMaxWait();
|
|
177
|
+
private get shouldRetryOnError();
|
|
134
178
|
get sessionId(): string;
|
|
135
179
|
private static readonly notConnectedYetStr;
|
|
136
180
|
get robotService(): Client<{
|
|
@@ -318,7 +362,12 @@ export declare class RobotClient extends EventDispatcher implements Robot {
|
|
|
318
362
|
readonly moveThroughJointPositions: {
|
|
319
363
|
readonly name: "MoveThroughJointPositions";
|
|
320
364
|
readonly I: typeof import("../gen/component/arm/v1/arm_pb").MoveThroughJointPositionsRequest;
|
|
321
|
-
readonly O: typeof import("../gen/component/arm/v1/arm_pb").MoveThroughJointPositionsResponse;
|
|
365
|
+
readonly O: typeof import("../gen/component/arm/v1/arm_pb").MoveThroughJointPositionsResponse; /**
|
|
366
|
+
* Set timeout in milliseconds for dialing. Default is defined by
|
|
367
|
+
* DIAL_TIMEOUT. A value of 0 disables the timeout.
|
|
368
|
+
*
|
|
369
|
+
* @deprecated Use `dialTimeoutMs` instead.
|
|
370
|
+
*/
|
|
322
371
|
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
323
372
|
};
|
|
324
373
|
readonly stop: {
|
|
@@ -854,7 +903,11 @@ export declare class RobotClient extends EventDispatcher implements Robot {
|
|
|
854
903
|
readonly name: "SetRPM"; /** @default Number.POSITIVE_INFINITY */
|
|
855
904
|
readonly I: typeof import("../gen/component/motor/v1/motor_pb").SetRPMRequest;
|
|
856
905
|
readonly O: typeof import("../gen/component/motor/v1/motor_pb").SetRPMResponse;
|
|
857
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
906
|
+
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary; /**
|
|
907
|
+
* Called when a non-retryable error is encountered during reconnection.
|
|
908
|
+
* Return true to treat the error as retryable. Does not override
|
|
909
|
+
* reconnectMaxAttempts — retries are still bounded by that limit.
|
|
910
|
+
*/
|
|
858
911
|
};
|
|
859
912
|
readonly resetZeroPosition: {
|
|
860
913
|
readonly name: "ResetZeroPosition";
|
|
@@ -949,7 +1002,11 @@ export declare class RobotClient extends EventDispatcher implements Robot {
|
|
|
949
1002
|
readonly name: "GetObstacles";
|
|
950
1003
|
readonly I: typeof import("../gen/service/navigation/v1/navigation_pb").GetObstaclesRequest;
|
|
951
1004
|
readonly O: typeof import("../gen/service/navigation/v1/navigation_pb").GetObstaclesResponse;
|
|
952
|
-
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
|
|
1005
|
+
readonly kind: import("@bufbuild/protobuf").MethodKind.Unary; /**
|
|
1006
|
+
* Called when a non-retryable error is encountered during reconnection.
|
|
1007
|
+
* Return true to treat the error as retryable. Does not override
|
|
1008
|
+
* reconnectMaxAttempts — retries are still bounded by that limit.
|
|
1009
|
+
*/
|
|
953
1010
|
};
|
|
954
1011
|
readonly getPaths: {
|
|
955
1012
|
readonly name: "GetPaths";
|
|
@@ -1212,7 +1269,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
|
|
|
1212
1269
|
private performDial;
|
|
1213
1270
|
disconnect(): Promise<void>;
|
|
1214
1271
|
isConnected(): boolean;
|
|
1215
|
-
connect({ creds, priority, dialTimeout, extraHeaders, }?: ConnectOptions): Promise<void>;
|
|
1272
|
+
connect({ creds, priority, dialTimeout, dialTimeoutMs, extraHeaders, }?: ConnectOptions): Promise<void>;
|
|
1216
1273
|
getSessions(): Promise<import("../gen/robot/v1/robot_pb").Session[]>;
|
|
1217
1274
|
getOperations(): Promise<import("../gen/robot/v1/robot_pb").Operation[]>;
|
|
1218
1275
|
cancelOperation(id: string): Promise<void>;
|
package/dist/rpc/dial.d.ts
CHANGED
|
@@ -18,7 +18,14 @@ export interface DialOptions {
|
|
|
18
18
|
* webrtcOptions.signalingAccessToken
|
|
19
19
|
*/
|
|
20
20
|
accessToken?: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Set timeout in milliseconds for dialing.
|
|
23
|
+
*
|
|
24
|
+
* @deprecated Use `dialTimeoutMs` instead.
|
|
25
|
+
*/
|
|
21
26
|
dialTimeout?: number | undefined;
|
|
27
|
+
/** Set timeout in milliseconds for dialing. */
|
|
28
|
+
dialTimeoutMs?: number | undefined;
|
|
22
29
|
extraHeaders?: Headers;
|
|
23
30
|
}
|
|
24
31
|
export interface DialWebRTCOptions {
|
package/dist/rpc/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Transport } from '@connectrpc/connect';
|
|
2
|
+
import type { GrpcWebTransportOptions } from '@connectrpc/connect-web';
|
|
2
3
|
declare global {
|
|
3
4
|
var VIAM: {
|
|
4
|
-
GRPC_TRANSPORT_FACTORY?: (opts:
|
|
5
|
+
GRPC_TRANSPORT_FACTORY?: (opts: GrpcWebTransportOptions) => Transport;
|
|
5
6
|
GRPC_TRACE_LOGGING?: boolean;
|
|
6
7
|
} | undefined;
|
|
7
8
|
}
|