@viamrobotics/sdk 0.16.0 → 0.17.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.
@@ -10,6 +10,7 @@ export interface Tick {
10
10
  time: number;
11
11
  }
12
12
  export type Duration = PBDuration.AsObject;
13
+ export type AnalogValue = pb.ReadAnalogReaderResponse.AsObject;
13
14
  /**
14
15
  * Represents a physical general purpose compute board that contains various
15
16
  * components such as analog readers, and digital interrupts.
@@ -57,7 +58,7 @@ export interface Board extends Resource {
57
58
  *
58
59
  * @param analogReader - The name of the analog reader.
59
60
  */
60
- readAnalogReader(analogReader: string, extra?: StructType): Promise<number>;
61
+ readAnalogReader(analogReader: string, extra?: StructType): Promise<AnalogValue>;
61
62
  /**
62
63
  * Write an analog value to a pin on the board.
63
64
  *
@@ -1,5 +1,6 @@
1
1
  import type { RobotClient } from '../../robot';
2
2
  import type { Options, StructType } from '../../types';
3
+ import pb from '../../gen/component/board/v1/board_pb';
3
4
  import type { Board, Duration, PowerMode, Tick } from './board';
4
5
  /**
5
6
  * A gRPC-web client for the Board component.
@@ -18,7 +19,7 @@ export declare class BoardClient implements Board {
18
19
  setPWM(pin: string, dutyCyle: number, extra?: {}): Promise<void>;
19
20
  getPWMFrequency(pin: string, extra?: {}): Promise<number>;
20
21
  setPWMFrequency(pin: string, frequencyHz: number, extra?: {}): Promise<void>;
21
- readAnalogReader(analogReader: string, extra?: {}): Promise<number>;
22
+ readAnalogReader(analogReader: string, extra?: {}): Promise<pb.ReadAnalogReaderResponse.AsObject>;
22
23
  writeAnalog(pin: string, value: number, extra?: {}): Promise<void>;
23
24
  getDigitalInterruptValue(digitalInteruptName: string, extra?: {}): Promise<number>;
24
25
  streamTicks(interrupts: string[], queue: Tick[], extra?: {}): Promise<void>;
@@ -1,2 +1,2 @@
1
- export { type Board, type Duration, PowerMode, type Tick } from './board/board';
1
+ export { type Board, type Duration, PowerMode, type Tick, type AnalogValue, } from './board/board';
2
2
  export { BoardClient } from './board/client';
package/dist/events.d.ts CHANGED
@@ -2,11 +2,11 @@ type Callback = (args: unknown) => void;
2
2
  /**
3
3
  * MachineConnectionEvent events are emitted by a Client's EventDispatcher when
4
4
  * connection events occur.
5
- *
6
- * TODO: Emit 'connecting' and 'connected' events
7
5
  */
8
6
  export declare enum MachineConnectionEvent {
9
- RECONNECTED = "reconnected",
7
+ CONNECTING = "connecting",
8
+ CONNECTED = "connected",
9
+ DISCONNECTING = "disconnecting",
10
10
  DISCONNECTED = "disconnected"
11
11
  }
12
12
  export declare class EventDispatcher {
@@ -17,5 +17,4 @@ export declare class EventDispatcher {
17
17
  off(type: string, listener: Callback): void;
18
18
  emit(type: string, args: unknown): void;
19
19
  }
20
- export declare const events: EventDispatcher;
21
20
  export {};
@@ -75,6 +75,9 @@ export class SubmitCustomTrainingJobRequest extends jspb.Message {
75
75
  getRegistryItemId(): string;
76
76
  setRegistryItemId(value: string): void;
77
77
 
78
+ getRegistryItemVersion(): string;
79
+ setRegistryItemVersion(value: string): void;
80
+
78
81
  getOrganizationId(): string;
79
82
  setOrganizationId(value: string): void;
80
83
 
@@ -98,6 +101,7 @@ export namespace SubmitCustomTrainingJobRequest {
98
101
  export type AsObject = {
99
102
  datasetId: string,
100
103
  registryItemId: string,
104
+ registryItemVersion: string,
101
105
  organizationId: string,
102
106
  modelName: string,
103
107
  modelVersion: string,
@@ -245,6 +249,9 @@ export class TrainingJobMetadata extends jspb.Message {
245
249
  getRegistryItemId(): string;
246
250
  setRegistryItemId(value: string): void;
247
251
 
252
+ getRegistryItemVersion(): string;
253
+ setRegistryItemVersion(value: string): void;
254
+
248
255
  getStatus(): TrainingStatusMap[keyof TrainingStatusMap];
249
256
  setStatus(value: TrainingStatusMap[keyof TrainingStatusMap]): void;
250
257
 
@@ -303,6 +310,7 @@ export namespace TrainingJobMetadata {
303
310
  modelFramework: ModelFrameworkMap[keyof ModelFrameworkMap],
304
311
  isCustomJob: boolean,
305
312
  registryItemId: string,
313
+ registryItemVersion: string,
306
314
  status: TrainingStatusMap[keyof TrainingStatusMap],
307
315
  errorStatus?: google_rpc_status_pb.Status.AsObject,
308
316
  createdOn?: google_protobuf_timestamp_pb.Timestamp.AsObject,
@@ -13,6 +13,11 @@ export class FileInfo extends jspb.Message {
13
13
  getSize(): number;
14
14
  setSize(value: number): void;
15
15
 
16
+ hasIsDirectory(): boolean;
17
+ clearIsDirectory(): void;
18
+ getIsDirectory(): boolean;
19
+ setIsDirectory(value: boolean): void;
20
+
16
21
  serializeBinary(): Uint8Array;
17
22
  toObject(includeInstance?: boolean): FileInfo.AsObject;
18
23
  static toObject(includeInstance: boolean, msg: FileInfo): FileInfo.AsObject;
@@ -27,6 +32,7 @@ export namespace FileInfo {
27
32
  export type AsObject = {
28
33
  name: string,
29
34
  size: number,
35
+ isDirectory: boolean,
30
36
  }
31
37
  }
32
38
 
@@ -3393,6 +3393,11 @@ export class ListRegistryItemsRequest extends jspb.Message {
3393
3393
  getPageToken(): string;
3394
3394
  setPageToken(value: string): void;
3395
3395
 
3396
+ clearPublicNamespacesList(): void;
3397
+ getPublicNamespacesList(): Array<string>;
3398
+ setPublicNamespacesList(value: Array<string>): void;
3399
+ addPublicNamespaces(value: string, index?: number): string;
3400
+
3396
3401
  serializeBinary(): Uint8Array;
3397
3402
  toObject(includeInstance?: boolean): ListRegistryItemsRequest.AsObject;
3398
3403
  static toObject(includeInstance: boolean, msg: ListRegistryItemsRequest): ListRegistryItemsRequest.AsObject;
@@ -3412,6 +3417,7 @@ export namespace ListRegistryItemsRequest {
3412
3417
  statusesList: Array<RegistryItemStatusMap[keyof RegistryItemStatusMap]>,
3413
3418
  searchTerm: string,
3414
3419
  pageToken: string,
3420
+ publicNamespacesList: Array<string>,
3415
3421
  }
3416
3422
  }
3417
3423
 
@@ -68,6 +68,11 @@ export class RobotConfig extends jspb.Message {
68
68
  setOverwriteFragmentStatusList(value: Array<AppValidationStatus>): void;
69
69
  addOverwriteFragmentStatus(value?: AppValidationStatus, index?: number): AppValidationStatus;
70
70
 
71
+ hasEnableWebProfile(): boolean;
72
+ clearEnableWebProfile(): void;
73
+ getEnableWebProfile(): boolean;
74
+ setEnableWebProfile(value: boolean): void;
75
+
71
76
  serializeBinary(): Uint8Array;
72
77
  toObject(includeInstance?: boolean): RobotConfig.AsObject;
73
78
  static toObject(includeInstance: boolean, msg: RobotConfig): RobotConfig.AsObject;
@@ -92,6 +97,7 @@ export namespace RobotConfig {
92
97
  disablePartialStart: boolean,
93
98
  packagesList: Array<PackageConfig.AsObject>,
94
99
  overwriteFragmentStatusList: Array<AppValidationStatus.AsObject>,
100
+ enableWebProfile: boolean,
95
101
  }
96
102
  }
97
103
 
@@ -364,7 +364,7 @@ export namespace GeoPoint {
364
364
  }
365
365
  }
366
366
 
367
- export class GeoObstacle extends jspb.Message {
367
+ export class GeoGeometry extends jspb.Message {
368
368
  hasLocation(): boolean;
369
369
  clearLocation(): void;
370
370
  getLocation(): GeoPoint | undefined;
@@ -376,16 +376,16 @@ export class GeoObstacle extends jspb.Message {
376
376
  addGeometries(value?: Geometry, index?: number): Geometry;
377
377
 
378
378
  serializeBinary(): Uint8Array;
379
- toObject(includeInstance?: boolean): GeoObstacle.AsObject;
380
- static toObject(includeInstance: boolean, msg: GeoObstacle): GeoObstacle.AsObject;
379
+ toObject(includeInstance?: boolean): GeoGeometry.AsObject;
380
+ static toObject(includeInstance: boolean, msg: GeoGeometry): GeoGeometry.AsObject;
381
381
  static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
382
382
  static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
383
- static serializeBinaryToWriter(message: GeoObstacle, writer: jspb.BinaryWriter): void;
384
- static deserializeBinary(bytes: Uint8Array): GeoObstacle;
385
- static deserializeBinaryFromReader(message: GeoObstacle, reader: jspb.BinaryReader): GeoObstacle;
383
+ static serializeBinaryToWriter(message: GeoGeometry, writer: jspb.BinaryWriter): void;
384
+ static deserializeBinary(bytes: Uint8Array): GeoGeometry;
385
+ static deserializeBinaryFromReader(message: GeoGeometry, reader: jspb.BinaryReader): GeoGeometry;
386
386
  }
387
387
 
388
- export namespace GeoObstacle {
388
+ export namespace GeoGeometry {
389
389
  export type AsObject = {
390
390
  location?: GeoPoint.AsObject,
391
391
  geometriesList: Array<Geometry.AsObject>,
@@ -258,15 +258,20 @@ export class MoveOnGlobeRequest extends jspb.Message {
258
258
  setMovementSensorName(value?: common_v1_common_pb.ResourceName): void;
259
259
 
260
260
  clearObstaclesList(): void;
261
- getObstaclesList(): Array<common_v1_common_pb.GeoObstacle>;
262
- setObstaclesList(value: Array<common_v1_common_pb.GeoObstacle>): void;
263
- addObstacles(value?: common_v1_common_pb.GeoObstacle, index?: number): common_v1_common_pb.GeoObstacle;
261
+ getObstaclesList(): Array<common_v1_common_pb.GeoGeometry>;
262
+ setObstaclesList(value: Array<common_v1_common_pb.GeoGeometry>): void;
263
+ addObstacles(value?: common_v1_common_pb.GeoGeometry, index?: number): common_v1_common_pb.GeoGeometry;
264
264
 
265
265
  hasMotionConfiguration(): boolean;
266
266
  clearMotionConfiguration(): void;
267
267
  getMotionConfiguration(): MotionConfiguration | undefined;
268
268
  setMotionConfiguration(value?: MotionConfiguration): void;
269
269
 
270
+ clearBoundingRegionsList(): void;
271
+ getBoundingRegionsList(): Array<common_v1_common_pb.GeoGeometry>;
272
+ setBoundingRegionsList(value: Array<common_v1_common_pb.GeoGeometry>): void;
273
+ addBoundingRegions(value?: common_v1_common_pb.GeoGeometry, index?: number): common_v1_common_pb.GeoGeometry;
274
+
270
275
  hasExtra(): boolean;
271
276
  clearExtra(): void;
272
277
  getExtra(): google_protobuf_struct_pb.Struct | undefined;
@@ -289,8 +294,9 @@ export namespace MoveOnGlobeRequest {
289
294
  heading: number,
290
295
  componentName?: common_v1_common_pb.ResourceName.AsObject,
291
296
  movementSensorName?: common_v1_common_pb.ResourceName.AsObject,
292
- obstaclesList: Array<common_v1_common_pb.GeoObstacle.AsObject>,
297
+ obstaclesList: Array<common_v1_common_pb.GeoGeometry.AsObject>,
293
298
  motionConfiguration?: MotionConfiguration.AsObject,
299
+ boundingRegionsList: Array<common_v1_common_pb.GeoGeometry.AsObject>,
294
300
  extra?: google_protobuf_struct_pb.Struct.AsObject,
295
301
  }
296
302
  }
@@ -346,9 +346,9 @@ export namespace GetObstaclesRequest {
346
346
 
347
347
  export class GetObstaclesResponse extends jspb.Message {
348
348
  clearObstaclesList(): void;
349
- getObstaclesList(): Array<common_v1_common_pb.GeoObstacle>;
350
- setObstaclesList(value: Array<common_v1_common_pb.GeoObstacle>): void;
351
- addObstacles(value?: common_v1_common_pb.GeoObstacle, index?: number): common_v1_common_pb.GeoObstacle;
349
+ getObstaclesList(): Array<common_v1_common_pb.GeoGeometry>;
350
+ setObstaclesList(value: Array<common_v1_common_pb.GeoGeometry>): void;
351
+ addObstacles(value?: common_v1_common_pb.GeoGeometry, index?: number): common_v1_common_pb.GeoGeometry;
352
352
 
353
353
  serializeBinary(): Uint8Array;
354
354
  toObject(includeInstance?: boolean): GetObstaclesResponse.AsObject;
@@ -362,7 +362,7 @@ export class GetObstaclesResponse extends jspb.Message {
362
362
 
363
363
  export namespace GetObstaclesResponse {
364
364
  export type AsObject = {
365
- obstaclesList: Array<common_v1_common_pb.GeoObstacle.AsObject>,
365
+ obstaclesList: Array<common_v1_common_pb.GeoGeometry.AsObject>,
366
366
  }
367
367
  }
368
368
 
@@ -1,5 +1,5 @@
1
1
  // package: proto.stream.v1
2
- // file: proto/stream/v1/stream.proto
2
+ // file: stream/v1/stream.proto
3
3
 
4
4
  import * as jspb from "google-protobuf";
5
5
 
@@ -1,7 +1,7 @@
1
1
  // package: proto.stream.v1
2
- // file: proto/stream/v1/stream.proto
2
+ // file: stream/v1/stream.proto
3
3
 
4
- import * as proto_stream_v1_stream_pb from "../../../proto/stream/v1/stream_pb";
4
+ import * as stream_v1_stream_pb from "../../stream/v1/stream_pb";
5
5
  import {grpc} from "@improbable-eng/grpc-web";
6
6
 
7
7
  type StreamServiceListStreams = {
@@ -9,8 +9,8 @@ type StreamServiceListStreams = {
9
9
  readonly service: typeof StreamService;
10
10
  readonly requestStream: false;
11
11
  readonly responseStream: false;
12
- readonly requestType: typeof proto_stream_v1_stream_pb.ListStreamsRequest;
13
- readonly responseType: typeof proto_stream_v1_stream_pb.ListStreamsResponse;
12
+ readonly requestType: typeof stream_v1_stream_pb.ListStreamsRequest;
13
+ readonly responseType: typeof stream_v1_stream_pb.ListStreamsResponse;
14
14
  };
15
15
 
16
16
  type StreamServiceAddStream = {
@@ -18,8 +18,8 @@ type StreamServiceAddStream = {
18
18
  readonly service: typeof StreamService;
19
19
  readonly requestStream: false;
20
20
  readonly responseStream: false;
21
- readonly requestType: typeof proto_stream_v1_stream_pb.AddStreamRequest;
22
- readonly responseType: typeof proto_stream_v1_stream_pb.AddStreamResponse;
21
+ readonly requestType: typeof stream_v1_stream_pb.AddStreamRequest;
22
+ readonly responseType: typeof stream_v1_stream_pb.AddStreamResponse;
23
23
  };
24
24
 
25
25
  type StreamServiceRemoveStream = {
@@ -27,8 +27,8 @@ type StreamServiceRemoveStream = {
27
27
  readonly service: typeof StreamService;
28
28
  readonly requestStream: false;
29
29
  readonly responseStream: false;
30
- readonly requestType: typeof proto_stream_v1_stream_pb.RemoveStreamRequest;
31
- readonly responseType: typeof proto_stream_v1_stream_pb.RemoveStreamResponse;
30
+ readonly requestType: typeof stream_v1_stream_pb.RemoveStreamRequest;
31
+ readonly responseType: typeof stream_v1_stream_pb.RemoveStreamResponse;
32
32
  };
33
33
 
34
34
  export class StreamService {
@@ -71,31 +71,31 @@ export class StreamServiceClient {
71
71
 
72
72
  constructor(serviceHost: string, options?: grpc.RpcOptions);
73
73
  listStreams(
74
- requestMessage: proto_stream_v1_stream_pb.ListStreamsRequest,
74
+ requestMessage: stream_v1_stream_pb.ListStreamsRequest,
75
75
  metadata: grpc.Metadata,
76
- callback: (error: ServiceError|null, responseMessage: proto_stream_v1_stream_pb.ListStreamsResponse|null) => void
76
+ callback: (error: ServiceError|null, responseMessage: stream_v1_stream_pb.ListStreamsResponse|null) => void
77
77
  ): UnaryResponse;
78
78
  listStreams(
79
- requestMessage: proto_stream_v1_stream_pb.ListStreamsRequest,
80
- callback: (error: ServiceError|null, responseMessage: proto_stream_v1_stream_pb.ListStreamsResponse|null) => void
79
+ requestMessage: stream_v1_stream_pb.ListStreamsRequest,
80
+ callback: (error: ServiceError|null, responseMessage: stream_v1_stream_pb.ListStreamsResponse|null) => void
81
81
  ): UnaryResponse;
82
82
  addStream(
83
- requestMessage: proto_stream_v1_stream_pb.AddStreamRequest,
83
+ requestMessage: stream_v1_stream_pb.AddStreamRequest,
84
84
  metadata: grpc.Metadata,
85
- callback: (error: ServiceError|null, responseMessage: proto_stream_v1_stream_pb.AddStreamResponse|null) => void
85
+ callback: (error: ServiceError|null, responseMessage: stream_v1_stream_pb.AddStreamResponse|null) => void
86
86
  ): UnaryResponse;
87
87
  addStream(
88
- requestMessage: proto_stream_v1_stream_pb.AddStreamRequest,
89
- callback: (error: ServiceError|null, responseMessage: proto_stream_v1_stream_pb.AddStreamResponse|null) => void
88
+ requestMessage: stream_v1_stream_pb.AddStreamRequest,
89
+ callback: (error: ServiceError|null, responseMessage: stream_v1_stream_pb.AddStreamResponse|null) => void
90
90
  ): UnaryResponse;
91
91
  removeStream(
92
- requestMessage: proto_stream_v1_stream_pb.RemoveStreamRequest,
92
+ requestMessage: stream_v1_stream_pb.RemoveStreamRequest,
93
93
  metadata: grpc.Metadata,
94
- callback: (error: ServiceError|null, responseMessage: proto_stream_v1_stream_pb.RemoveStreamResponse|null) => void
94
+ callback: (error: ServiceError|null, responseMessage: stream_v1_stream_pb.RemoveStreamResponse|null) => void
95
95
  ): UnaryResponse;
96
96
  removeStream(
97
- requestMessage: proto_stream_v1_stream_pb.RemoveStreamRequest,
98
- callback: (error: ServiceError|null, responseMessage: proto_stream_v1_stream_pb.RemoveStreamResponse|null) => void
97
+ requestMessage: stream_v1_stream_pb.RemoveStreamRequest,
98
+ callback: (error: ServiceError|null, responseMessage: stream_v1_stream_pb.RemoveStreamResponse|null) => void
99
99
  ): UnaryResponse;
100
100
  }
101
101
 
package/dist/main.d.ts CHANGED
@@ -104,7 +104,7 @@ export { type Base, type BaseProperties, BaseClient } from './components/base';
104
104
  * @group Raw Protobufs
105
105
  */
106
106
  export { default as boardApi } from './gen/component/board/v1/board_pb';
107
- export { type Board, BoardClient, type Duration, PowerMode, } from './components/board';
107
+ export { type Board, BoardClient, type Duration, PowerMode, type AnalogValue, type Tick, } from './components/board';
108
108
  /**
109
109
  * Raw Protobuf interfaces for a Camera component.
110
110
  *
@@ -217,7 +217,7 @@ export { default as sensorsApi } from './gen/service/sensors/v1/sensors_pb';
217
217
  * @deprecated Use {@link StreamClient} instead.
218
218
  * @group Raw Protobufs
219
219
  */
220
- export { default as streamApi } from './gen/proto/stream/v1/stream_pb';
220
+ export { default as streamApi } from './gen/stream/v1/stream_pb';
221
221
  export { type Stream, StreamClient } from './extra/stream';
222
222
  /**
223
223
  * Raw Protobuf interfaces for a Generic component.