@viamrobotics/sdk 0.53.0 → 0.54.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.
@@ -90,6 +90,7 @@ export declare class RobotClient extends EventDispatcher implements Robot {
90
90
  private gRPCConnectionManager;
91
91
  private sessionManager;
92
92
  private peerConn;
93
+ private dataChannel;
93
94
  private transport;
94
95
  private connecting;
95
96
  private connectResolve;
@@ -116,7 +117,11 @@ export declare class RobotClient extends EventDispatcher implements Robot {
116
117
  private slamServiceClient;
117
118
  private worldStateStoreServiceClient;
118
119
  private currentRetryAttempt;
120
+ private onICEConnectionStateChange?;
121
+ private onDataChannelClose?;
122
+ private onTrack?;
119
123
  constructor(serviceHost?: string, webrtcOptions?: WebRTCOptions, sessionOptions?: SessionOptions, directOptions?: DirectOptions);
124
+ private cleanupEventListeners;
120
125
  private onDisconnect;
121
126
  private get noReconnect();
122
127
  private get reconnectMaxAttempts();
@@ -335,6 +340,12 @@ export declare class RobotClient extends EventDispatcher implements Robot {
335
340
  readonly O: typeof import("../gen/common/v1/common_pb").GetGeometriesResponse;
336
341
  readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
337
342
  };
343
+ readonly get3DModels: {
344
+ readonly name: "Get3DModels";
345
+ readonly I: typeof import("../gen/common/v1/common_pb").Get3DModelsRequest;
346
+ readonly O: typeof import("../gen/common/v1/common_pb").Get3DModelsResponse;
347
+ readonly kind: import("@bufbuild/protobuf").MethodKind.Unary;
348
+ };
338
349
  };
339
350
  }>;
340
351
  get baseService(): Client<{
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,6 @@
1
- import type { Transport } from '@connectrpc/connect';
1
+ import { Message } from '@bufbuild/protobuf';
2
+ import type { AnyMessage, MethodInfo, PartialMessage, ServiceType } from '@bufbuild/protobuf';
3
+ import type { ContextValues, StreamResponse, Transport, UnaryResponse } from '@connectrpc/connect';
2
4
  import { type Credentials } from '../app/viam-transport';
3
5
  export interface DialOptions {
4
6
  credentials?: Credentials | undefined;
@@ -53,6 +55,13 @@ interface TransportInitOptions {
53
55
  baseUrl: string;
54
56
  }
55
57
  export declare const dialDirect: (address: string, opts?: DialOptions, transportCredentialsInclude?: boolean) => Promise<Transport>;
58
+ export declare class AuthenticatedTransport implements Transport {
59
+ protected readonly transport: Transport;
60
+ protected readonly extraHeaders: Headers;
61
+ constructor(opts: TransportInitOptions, defaultFactory: TransportFactory, extraHeaders: Headers);
62
+ unary<I extends Message<I> = AnyMessage, O extends Message<O> = AnyMessage>(service: ServiceType, method: MethodInfo<I, O>, signal: AbortSignal | undefined, timeoutMs: number | undefined, header: HeadersInit | undefined, message: PartialMessage<I>, contextValues?: ContextValues): Promise<UnaryResponse<I, O>>;
63
+ stream<I extends Message<I> = AnyMessage, O extends Message<O> = AnyMessage>(service: ServiceType, method: MethodInfo<I, O>, signal: AbortSignal | undefined, timeoutMs: number | undefined, header: HeadersInit | undefined, input: AsyncIterable<PartialMessage<I>>, contextValues?: ContextValues): Promise<StreamResponse<I, O>>;
64
+ }
56
65
  export declare const cloneHeaders: (headers: HeadersInit | undefined) => Headers;
57
66
  export interface WebRTCConnection {
58
67
  transport: Transport;
@@ -68,4 +77,5 @@ export interface WebRTCConnection {
68
77
  * to handle reconnect on connection termination
69
78
  */
70
79
  export declare const dialWebRTC: (signalingAddress: string, host: string, dialOpts?: DialOptions, transportCredentialsInclude?: boolean) => Promise<WebRTCConnection>;
80
+ export declare const validateDialOptions: (opts?: DialOptions) => void;
71
81
  export {};
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viamrobotics/sdk",
3
- "version": "0.53.0",
3
+ "version": "0.54.0",
4
4
  "description": "",
5
5
  "main": "./dist/main.umd.js",
6
6
  "module": "./dist/main.es.js",
@@ -60,7 +60,7 @@
60
60
  },
61
61
  "devDependencies": {
62
62
  "@bufbuild/buf": "^1.15.0-1",
63
- "@playwright/test": "1.45.3",
63
+ "@playwright/test": "1.56.1",
64
64
  "@types/node": "^20.11.10",
65
65
  "@typescript-eslint/eslint-plugin": "^6.17.0",
66
66
  "@typescript-eslint/parser": "^6.17.0",
@@ -74,7 +74,7 @@
74
74
  "eslint-plugin-tsdoc": "^0.2.17",
75
75
  "eslint-plugin-vitest": "^0.3.20",
76
76
  "grpc-web": "^1.4.2",
77
- "happy-dom": "^15.10.1",
77
+ "happy-dom": "^20.0.8",
78
78
  "npm-check-updates": "^17.1.11",
79
79
  "prettier": "^3.1.1",
80
80
  "prettier-plugin-jsdoc": "^1.1.1",