@vertexvis/stream-api 0.13.2-canary.7 → 0.14.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.
@@ -2,7 +2,7 @@ import { vertexvis } from '@vertexvis/frame-streaming-protos';
2
2
  import { Disposable } from '@vertexvis/utils';
3
3
  import { ConnectionDescriptor } from './connection';
4
4
  import { Settings } from './settings';
5
- import { EventMessage, GetStencilBufferPayload, HitItemsPayload, LoadSceneViewStatePayload, ReconnectPayload, RecordPerformancePayload, ReplaceCameraPayload, RequestMessage, ResponseError, ResponseMessage, ResponseResult, StartStreamPayload, SyncTimePayload, UpdateCrossSectioningPayload, UpdateDimensionsPayload, UpdateStreamPayload } from './types';
5
+ import { BeginInteractionPayload, EndInteractionPayload, EventMessage, GetStencilBufferPayload, HitItemsPayload, LoadSceneViewStatePayload, ReconnectPayload, RecordPerformancePayload, ReplaceCameraPayload, RequestMessage, ResponseError, ResponseMessage, ResponseResult, StartStreamPayload, SyncTimePayload, UpdateCrossSectioningPayload, UpdateDimensionsPayload, UpdateInteractionPayload, UpdateStreamPayload } from './types';
6
6
  import { WebSocketClient } from './webSocketClient';
7
7
  export declare type RequestMessageHandler = (msg: RequestMessage) => void;
8
8
  export declare type ResponseMessageHandler = (msg: ResponseMessage) => void;
@@ -106,7 +106,7 @@ export declare class StreamApi {
106
106
  * @param withResponse Indicates if the server should reply with a response.
107
107
  * Defaults to `true`.
108
108
  */
109
- beginInteraction(withResponse?: boolean): Promise<vertexvis.protobuf.stream.IStreamResponse>;
109
+ beginInteraction(payload?: BeginInteractionPayload, withResponse?: boolean): Promise<vertexvis.protobuf.stream.IStreamResponse>;
110
110
  /**
111
111
  * Sends a request to update the position of the scene's camera.
112
112
  *
@@ -140,6 +140,18 @@ export declare class StreamApi {
140
140
  * @param withResponse
141
141
  */
142
142
  flyTo(payload: vertexvis.protobuf.stream.IFlyToPayload, withResponse?: boolean): Promise<vertexvis.protobuf.stream.IStreamResponse>;
143
+ /**
144
+ * Sends a request to update the specified interaction.
145
+ *
146
+ * Use `withResponse` to indicate if the server should reply with a response.
147
+ * If `false`, the returned promise will complete immediately. Otherwise,
148
+ * it'll complete when a response is received.
149
+ *
150
+ * @param payload The payload of the request.
151
+ * @param withResponse Indicates if the server should reply with a response.
152
+ * Defaults to `true`.
153
+ */
154
+ updateInteraction(payload: UpdateInteractionPayload, withResponse?: boolean): Promise<vertexvis.protobuf.stream.IStreamResponse>;
143
155
  /**
144
156
  * Sends a request to update the dimensions of the frame.
145
157
  *
@@ -223,7 +235,7 @@ export declare class StreamApi {
223
235
  * @param withResponse Indicates if the server should reply with a response.
224
236
  * Defaults to `true`.
225
237
  */
226
- endInteraction(withResponse?: boolean): Promise<vertexvis.protobuf.stream.IBeginInteractionResult>;
238
+ endInteraction(payload?: EndInteractionPayload, withResponse?: boolean): Promise<vertexvis.protobuf.stream.IBeginInteractionResult>;
227
239
  /**
228
240
  * Sends a request to sync the clocks between the client and server.
229
241
  *
package/dist/types.d.ts CHANGED
@@ -34,6 +34,15 @@ export declare type LoadSceneViewStatePayload = DeepRequired<vertexvis.protobuf.
34
34
  ]>;
35
35
  export declare type GetStencilBufferPayload = DeepRequired<vertexvis.protobuf.stream.IGetStencilBufferPayload, [
36
36
  ]>;
37
+ export declare type BeginInteractionPayload = DeepRequired<vertexvis.protobuf.stream.IBeginInteractionPayload, [
38
+ 'transform'
39
+ ]>;
40
+ export declare type UpdateInteractionPayload = DeepRequired<vertexvis.protobuf.stream.IUpdateInteractionPayload, [
41
+ 'transform'
42
+ ]>;
43
+ export declare type EndInteractionPayload = DeepRequired<vertexvis.protobuf.stream.IEndInteractionPayload, [
44
+ 'transform'
45
+ ]>;
37
46
  export declare type DrawFrameResult = DeepRequired<Pick<vertexvis.protobuf.stream.IStreamResponse, 'drawFrame'>, ['drawFrame', 'timing', 'receiveToPaintDuration'] | ['drawFrame', 'timing', 'sendToReceiveDuration']>;
38
47
  export declare type StartStreamResult = DeepRequired<vertexvis.protobuf.stream.IStartStreamResult, [
39
48
  ]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertexvis/stream-api",
3
- "version": "0.13.2-canary.7",
3
+ "version": "0.14.0",
4
4
  "description": "A websocket client for interacting with Vertex's stream API.",
5
5
  "license": "MIT",
6
6
  "author": "Vertex Developers <support@vertexvis.com> (https://developer.vertexvis.com)",
@@ -35,14 +35,14 @@
35
35
  "test:coverage": "yarn test --coverage"
36
36
  },
37
37
  "dependencies": {
38
- "@vertexvis/frame-streaming-protos": "^0.6.19"
38
+ "@vertexvis/frame-streaming-protos": "^0.6.22"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/jest": "^26.0.20",
42
42
  "@vertexvis/eslint-config-vertexvis-typescript": "^0.5.0",
43
43
  "@vertexvis/jest-config-vertexvis": "^0.5.4",
44
- "@vertexvis/utils": "0.13.2-canary.7",
45
- "@vertexwebsdk/build": "0.13.2-canary.7",
44
+ "@vertexvis/utils": "0.14.0",
45
+ "@vertexwebsdk/build": "0.14.0",
46
46
  "eslint": "^8.6.0",
47
47
  "jest": "^26.6.3",
48
48
  "protobufjs": "^6.9.0",
@@ -56,5 +56,5 @@
56
56
  "protobufjs": ">=6.9.0 <7.0.0",
57
57
  "tslib": ">=2.1.0"
58
58
  },
59
- "gitHead": "e54e07ff42889270cdd42f4d9c3187916115446b"
59
+ "gitHead": "933bf93aab0d356bc6a0e906c8240a6e428e9614"
60
60
  }