@viamrobotics/sdk 0.20.0 → 0.22.0-b.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 -0
- package/dist/app/viam-transport.d.ts +3 -7
- package/dist/gen/google/api/expr/v1alpha1/syntax_pb.d.ts +4 -0
- package/dist/gen/robot/v1/robot_pb.d.ts +49 -0
- package/dist/gen/robot/v1/robot_pb_service.d.ts +19 -0
- package/dist/main.d.ts +1 -1
- package/dist/main.es.js +253 -70
- package/dist/main.umd.js +3 -3
- package/dist/robot/client.d.ts +1 -0
- package/dist/robot/dial.d.ts +6 -0
- package/dist/robot/robot.d.ts +11 -0
- package/dist/utils.d.ts +9 -0
- package/package.json +3 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const apiVersion = "v0.1.331";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { grpc } from '@improbable-eng/grpc-web';
|
|
2
|
+
import { MetadataTransport } from '../utils';
|
|
2
3
|
/** A credential that can be exchanged to obtain an access token */
|
|
3
4
|
export interface Credential {
|
|
4
5
|
authEntity: string;
|
|
@@ -17,12 +18,7 @@ export declare const isCredential: (object: Credential | AccessToken) => object
|
|
|
17
18
|
* resources.
|
|
18
19
|
*/
|
|
19
20
|
export declare const createViamTransportFactory: (serviceHost: string, credential: Credential | AccessToken) => Promise<grpc.TransportFactory>;
|
|
20
|
-
export declare
|
|
21
|
-
|
|
22
|
-
protected readonly transport: grpc.Transport;
|
|
21
|
+
export declare const getAccessTokenFromCredential: (host: string, credential: Credential) => Promise<AccessToken>;
|
|
22
|
+
export declare class ViamTransport extends MetadataTransport {
|
|
23
23
|
constructor(transportFactory: grpc.TransportFactory, opts: grpc.TransportOptions, accessToken: string);
|
|
24
|
-
start(metadata: grpc.Metadata): void;
|
|
25
|
-
sendMessage(msgBytes: Uint8Array): void;
|
|
26
|
-
finishSend(): void;
|
|
27
|
-
cancel(): void;
|
|
28
24
|
}
|
|
@@ -285,6 +285,9 @@ export namespace Expr {
|
|
|
285
285
|
getIterVar(): string;
|
|
286
286
|
setIterVar(value: string): void;
|
|
287
287
|
|
|
288
|
+
getIterVar2(): string;
|
|
289
|
+
setIterVar2(value: string): void;
|
|
290
|
+
|
|
288
291
|
hasIterRange(): boolean;
|
|
289
292
|
clearIterRange(): void;
|
|
290
293
|
getIterRange(): Expr | undefined;
|
|
@@ -326,6 +329,7 @@ export namespace Expr {
|
|
|
326
329
|
export namespace Comprehension {
|
|
327
330
|
export type AsObject = {
|
|
328
331
|
iterVar: string,
|
|
332
|
+
iterVar2: string,
|
|
329
333
|
iterRange?: Expr.AsObject,
|
|
330
334
|
accuVar: string,
|
|
331
335
|
accuInit?: Expr.AsObject,
|
|
@@ -1142,6 +1142,9 @@ export class ResourceStatus extends jspb.Message {
|
|
|
1142
1142
|
getRevision(): string;
|
|
1143
1143
|
setRevision(value: string): void;
|
|
1144
1144
|
|
|
1145
|
+
getError(): string;
|
|
1146
|
+
setError(value: string): void;
|
|
1147
|
+
|
|
1145
1148
|
serializeBinary(): Uint8Array;
|
|
1146
1149
|
toObject(includeInstance?: boolean): ResourceStatus.AsObject;
|
|
1147
1150
|
static toObject(includeInstance: boolean, msg: ResourceStatus): ResourceStatus.AsObject;
|
|
@@ -1158,6 +1161,7 @@ export namespace ResourceStatus {
|
|
|
1158
1161
|
state: ResourceStatus.StateMap[keyof ResourceStatus.StateMap],
|
|
1159
1162
|
lastUpdated?: google_protobuf_timestamp_pb.Timestamp.AsObject,
|
|
1160
1163
|
revision: string,
|
|
1164
|
+
error: string,
|
|
1161
1165
|
}
|
|
1162
1166
|
|
|
1163
1167
|
export interface StateMap {
|
|
@@ -1166,6 +1170,7 @@ export namespace ResourceStatus {
|
|
|
1166
1170
|
STATE_CONFIGURING: 2;
|
|
1167
1171
|
STATE_READY: 3;
|
|
1168
1172
|
STATE_REMOVING: 4;
|
|
1173
|
+
STATE_UNHEALTHY: 5;
|
|
1169
1174
|
}
|
|
1170
1175
|
|
|
1171
1176
|
export const State: StateMap;
|
|
@@ -1197,6 +1202,50 @@ export namespace ConfigStatus {
|
|
|
1197
1202
|
}
|
|
1198
1203
|
}
|
|
1199
1204
|
|
|
1205
|
+
export class GetVersionRequest extends jspb.Message {
|
|
1206
|
+
serializeBinary(): Uint8Array;
|
|
1207
|
+
toObject(includeInstance?: boolean): GetVersionRequest.AsObject;
|
|
1208
|
+
static toObject(includeInstance: boolean, msg: GetVersionRequest): GetVersionRequest.AsObject;
|
|
1209
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
1210
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
1211
|
+
static serializeBinaryToWriter(message: GetVersionRequest, writer: jspb.BinaryWriter): void;
|
|
1212
|
+
static deserializeBinary(bytes: Uint8Array): GetVersionRequest;
|
|
1213
|
+
static deserializeBinaryFromReader(message: GetVersionRequest, reader: jspb.BinaryReader): GetVersionRequest;
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
export namespace GetVersionRequest {
|
|
1217
|
+
export type AsObject = {
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
export class GetVersionResponse extends jspb.Message {
|
|
1222
|
+
getPlatform(): string;
|
|
1223
|
+
setPlatform(value: string): void;
|
|
1224
|
+
|
|
1225
|
+
getVersion(): string;
|
|
1226
|
+
setVersion(value: string): void;
|
|
1227
|
+
|
|
1228
|
+
getApiVersion(): string;
|
|
1229
|
+
setApiVersion(value: string): void;
|
|
1230
|
+
|
|
1231
|
+
serializeBinary(): Uint8Array;
|
|
1232
|
+
toObject(includeInstance?: boolean): GetVersionResponse.AsObject;
|
|
1233
|
+
static toObject(includeInstance: boolean, msg: GetVersionResponse): GetVersionResponse.AsObject;
|
|
1234
|
+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
|
1235
|
+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
|
1236
|
+
static serializeBinaryToWriter(message: GetVersionResponse, writer: jspb.BinaryWriter): void;
|
|
1237
|
+
static deserializeBinary(bytes: Uint8Array): GetVersionResponse;
|
|
1238
|
+
static deserializeBinaryFromReader(message: GetVersionResponse, reader: jspb.BinaryReader): GetVersionResponse;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
export namespace GetVersionResponse {
|
|
1242
|
+
export type AsObject = {
|
|
1243
|
+
platform: string,
|
|
1244
|
+
version: string,
|
|
1245
|
+
apiVersion: string,
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1200
1249
|
export interface PeerConnectionTypeMap {
|
|
1201
1250
|
PEER_CONNECTION_TYPE_UNSPECIFIED: 0;
|
|
1202
1251
|
PEER_CONNECTION_TYPE_GRPC: 1;
|
|
@@ -184,6 +184,15 @@ type RobotServiceGetMachineStatus = {
|
|
|
184
184
|
readonly responseType: typeof robot_v1_robot_pb.GetMachineStatusResponse;
|
|
185
185
|
};
|
|
186
186
|
|
|
187
|
+
type RobotServiceGetVersion = {
|
|
188
|
+
readonly methodName: string;
|
|
189
|
+
readonly service: typeof RobotService;
|
|
190
|
+
readonly requestStream: false;
|
|
191
|
+
readonly responseStream: false;
|
|
192
|
+
readonly requestType: typeof robot_v1_robot_pb.GetVersionRequest;
|
|
193
|
+
readonly responseType: typeof robot_v1_robot_pb.GetVersionResponse;
|
|
194
|
+
};
|
|
195
|
+
|
|
187
196
|
export class RobotService {
|
|
188
197
|
static readonly serviceName: string;
|
|
189
198
|
static readonly GetOperations: RobotServiceGetOperations;
|
|
@@ -206,6 +215,7 @@ export class RobotService {
|
|
|
206
215
|
static readonly RestartModule: RobotServiceRestartModule;
|
|
207
216
|
static readonly Shutdown: RobotServiceShutdown;
|
|
208
217
|
static readonly GetMachineStatus: RobotServiceGetMachineStatus;
|
|
218
|
+
static readonly GetVersion: RobotServiceGetVersion;
|
|
209
219
|
}
|
|
210
220
|
|
|
211
221
|
export type ServiceError = { message: string, code: number; metadata: grpc.Metadata }
|
|
@@ -412,5 +422,14 @@ export class RobotServiceClient {
|
|
|
412
422
|
requestMessage: robot_v1_robot_pb.GetMachineStatusRequest,
|
|
413
423
|
callback: (error: ServiceError|null, responseMessage: robot_v1_robot_pb.GetMachineStatusResponse|null) => void
|
|
414
424
|
): UnaryResponse;
|
|
425
|
+
getVersion(
|
|
426
|
+
requestMessage: robot_v1_robot_pb.GetVersionRequest,
|
|
427
|
+
metadata: grpc.Metadata,
|
|
428
|
+
callback: (error: ServiceError|null, responseMessage: robot_v1_robot_pb.GetVersionResponse|null) => void
|
|
429
|
+
): UnaryResponse;
|
|
430
|
+
getVersion(
|
|
431
|
+
requestMessage: robot_v1_robot_pb.GetVersionRequest,
|
|
432
|
+
callback: (error: ServiceError|null, responseMessage: robot_v1_robot_pb.GetVersionResponse|null) => void
|
|
433
|
+
): UnaryResponse;
|
|
415
434
|
}
|
|
416
435
|
|
package/dist/main.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export { type Robot, type DialConf, type DialDirectConf, type DialWebRTCConf, ty
|
|
|
16
16
|
*/
|
|
17
17
|
export { RobotClient as Client } from './robot';
|
|
18
18
|
export { createViamClient, type ViamClient, type ViamClientOptions, } from './app/viam-client';
|
|
19
|
-
export type
|
|
19
|
+
export { getAccessTokenFromCredential, type Credential, type CredentialType, type AccessToken, } from './app/viam-transport';
|
|
20
20
|
/**
|
|
21
21
|
* Raw Protobuf interfaces for Data.
|
|
22
22
|
*
|