@vertexvis/stream-api 0.12.0-canary.4 → 0.12.0-canary.40

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.
@@ -1,4 +1,4 @@
1
- import { __awaiter, __generator, __extends, __assign, __spreadArray } from 'tslib';
1
+ import { __extends, __awaiter, __generator, __assign, __spreadArray } from 'tslib';
2
2
  import { UUID, EventDispatcher, Uri, Objects } from '@vertexvis/utils';
3
3
 
4
4
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
@@ -9873,6 +9873,216 @@ const vertexvis = $root.vertexvis = (() => {
9873
9873
  return FeatureHighlightAttributes;
9874
9874
  })();
9875
9875
 
9876
+ stream.Token = (function() {
9877
+
9878
+ /**
9879
+ * Properties of a Token.
9880
+ * @memberof vertexvis.protobuf.stream
9881
+ * @interface IToken
9882
+ * @property {string|null} [token] Token token
9883
+ * @property {number|null} [expiresIn] Token expiresIn
9884
+ */
9885
+
9886
+ /**
9887
+ * Constructs a new Token.
9888
+ * @memberof vertexvis.protobuf.stream
9889
+ * @classdesc Represents a Token.
9890
+ * @implements IToken
9891
+ * @constructor
9892
+ * @param {vertexvis.protobuf.stream.IToken=} [properties] Properties to set
9893
+ */
9894
+ function Token(properties) {
9895
+ if (properties)
9896
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
9897
+ if (properties[keys[i]] != null)
9898
+ this[keys[i]] = properties[keys[i]];
9899
+ }
9900
+
9901
+ /**
9902
+ * Token token.
9903
+ * @member {string} token
9904
+ * @memberof vertexvis.protobuf.stream.Token
9905
+ * @instance
9906
+ */
9907
+ Token.prototype.token = "";
9908
+
9909
+ /**
9910
+ * Token expiresIn.
9911
+ * @member {number} expiresIn
9912
+ * @memberof vertexvis.protobuf.stream.Token
9913
+ * @instance
9914
+ */
9915
+ Token.prototype.expiresIn = 0;
9916
+
9917
+ /**
9918
+ * Creates a new Token instance using the specified properties.
9919
+ * @function create
9920
+ * @memberof vertexvis.protobuf.stream.Token
9921
+ * @static
9922
+ * @param {vertexvis.protobuf.stream.IToken=} [properties] Properties to set
9923
+ * @returns {vertexvis.protobuf.stream.Token} Token instance
9924
+ */
9925
+ Token.create = function create(properties) {
9926
+ return new Token(properties);
9927
+ };
9928
+
9929
+ /**
9930
+ * Encodes the specified Token message. Does not implicitly {@link vertexvis.protobuf.stream.Token.verify|verify} messages.
9931
+ * @function encode
9932
+ * @memberof vertexvis.protobuf.stream.Token
9933
+ * @static
9934
+ * @param {vertexvis.protobuf.stream.IToken} message Token message or plain object to encode
9935
+ * @param {$protobuf.Writer} [writer] Writer to encode to
9936
+ * @returns {$protobuf.Writer} Writer
9937
+ */
9938
+ Token.encode = function encode(message, writer) {
9939
+ if (!writer)
9940
+ writer = $Writer.create();
9941
+ if (message.token != null && Object.hasOwnProperty.call(message, "token"))
9942
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.token);
9943
+ if (message.expiresIn != null && Object.hasOwnProperty.call(message, "expiresIn"))
9944
+ writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.expiresIn);
9945
+ return writer;
9946
+ };
9947
+
9948
+ /**
9949
+ * Encodes the specified Token message, length delimited. Does not implicitly {@link vertexvis.protobuf.stream.Token.verify|verify} messages.
9950
+ * @function encodeDelimited
9951
+ * @memberof vertexvis.protobuf.stream.Token
9952
+ * @static
9953
+ * @param {vertexvis.protobuf.stream.IToken} message Token message or plain object to encode
9954
+ * @param {$protobuf.Writer} [writer] Writer to encode to
9955
+ * @returns {$protobuf.Writer} Writer
9956
+ */
9957
+ Token.encodeDelimited = function encodeDelimited(message, writer) {
9958
+ return this.encode(message, writer).ldelim();
9959
+ };
9960
+
9961
+ /**
9962
+ * Decodes a Token message from the specified reader or buffer.
9963
+ * @function decode
9964
+ * @memberof vertexvis.protobuf.stream.Token
9965
+ * @static
9966
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
9967
+ * @param {number} [length] Message length if known beforehand
9968
+ * @returns {vertexvis.protobuf.stream.Token} Token
9969
+ * @throws {Error} If the payload is not a reader or valid buffer
9970
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
9971
+ */
9972
+ Token.decode = function decode(reader, length) {
9973
+ if (!(reader instanceof $Reader))
9974
+ reader = $Reader.create(reader);
9975
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vertexvis.protobuf.stream.Token();
9976
+ while (reader.pos < end) {
9977
+ let tag = reader.uint32();
9978
+ switch (tag >>> 3) {
9979
+ case 1:
9980
+ message.token = reader.string();
9981
+ break;
9982
+ case 2:
9983
+ message.expiresIn = reader.uint32();
9984
+ break;
9985
+ default:
9986
+ reader.skipType(tag & 7);
9987
+ break;
9988
+ }
9989
+ }
9990
+ return message;
9991
+ };
9992
+
9993
+ /**
9994
+ * Decodes a Token message from the specified reader or buffer, length delimited.
9995
+ * @function decodeDelimited
9996
+ * @memberof vertexvis.protobuf.stream.Token
9997
+ * @static
9998
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
9999
+ * @returns {vertexvis.protobuf.stream.Token} Token
10000
+ * @throws {Error} If the payload is not a reader or valid buffer
10001
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
10002
+ */
10003
+ Token.decodeDelimited = function decodeDelimited(reader) {
10004
+ if (!(reader instanceof $Reader))
10005
+ reader = new $Reader(reader);
10006
+ return this.decode(reader, reader.uint32());
10007
+ };
10008
+
10009
+ /**
10010
+ * Verifies a Token message.
10011
+ * @function verify
10012
+ * @memberof vertexvis.protobuf.stream.Token
10013
+ * @static
10014
+ * @param {Object.<string,*>} message Plain object to verify
10015
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
10016
+ */
10017
+ Token.verify = function verify(message) {
10018
+ if (typeof message !== "object" || message === null)
10019
+ return "object expected";
10020
+ if (message.token != null && message.hasOwnProperty("token"))
10021
+ if (!$util.isString(message.token))
10022
+ return "token: string expected";
10023
+ if (message.expiresIn != null && message.hasOwnProperty("expiresIn"))
10024
+ if (!$util.isInteger(message.expiresIn))
10025
+ return "expiresIn: integer expected";
10026
+ return null;
10027
+ };
10028
+
10029
+ /**
10030
+ * Creates a Token message from a plain object. Also converts values to their respective internal types.
10031
+ * @function fromObject
10032
+ * @memberof vertexvis.protobuf.stream.Token
10033
+ * @static
10034
+ * @param {Object.<string,*>} object Plain object
10035
+ * @returns {vertexvis.protobuf.stream.Token} Token
10036
+ */
10037
+ Token.fromObject = function fromObject(object) {
10038
+ if (object instanceof $root.vertexvis.protobuf.stream.Token)
10039
+ return object;
10040
+ let message = new $root.vertexvis.protobuf.stream.Token();
10041
+ if (object.token != null)
10042
+ message.token = String(object.token);
10043
+ if (object.expiresIn != null)
10044
+ message.expiresIn = object.expiresIn >>> 0;
10045
+ return message;
10046
+ };
10047
+
10048
+ /**
10049
+ * Creates a plain object from a Token message. Also converts values to other types if specified.
10050
+ * @function toObject
10051
+ * @memberof vertexvis.protobuf.stream.Token
10052
+ * @static
10053
+ * @param {vertexvis.protobuf.stream.Token} message Token
10054
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
10055
+ * @returns {Object.<string,*>} Plain object
10056
+ */
10057
+ Token.toObject = function toObject(message, options) {
10058
+ if (!options)
10059
+ options = {};
10060
+ let object = {};
10061
+ if (options.defaults) {
10062
+ object.token = "";
10063
+ object.expiresIn = 0;
10064
+ }
10065
+ if (message.token != null && message.hasOwnProperty("token"))
10066
+ object.token = message.token;
10067
+ if (message.expiresIn != null && message.hasOwnProperty("expiresIn"))
10068
+ object.expiresIn = message.expiresIn;
10069
+ return object;
10070
+ };
10071
+
10072
+ /**
10073
+ * Converts this Token to JSON.
10074
+ * @function toJSON
10075
+ * @memberof vertexvis.protobuf.stream.Token
10076
+ * @instance
10077
+ * @returns {Object.<string,*>} JSON object
10078
+ */
10079
+ Token.prototype.toJSON = function toJSON() {
10080
+ return this.constructor.toObject(this, minimal.util.toJSONOptions);
10081
+ };
10082
+
10083
+ return Token;
10084
+ })();
10085
+
9876
10086
  stream.Error = (function() {
9877
10087
 
9878
10088
  /**
@@ -11098,6 +11308,8 @@ const vertexvis = $root.vertexvis = (() => {
11098
11308
  * @property {vertexvis.protobuf.stream.ILoadSceneViewStatePayload|null} [loadSceneViewState] StreamRequest loadSceneViewState
11099
11309
  * @property {vertexvis.protobuf.stream.IUpdateCrossSectioningPayload|null} [updateCrossSectioning] StreamRequest updateCrossSectioning
11100
11310
  * @property {vertexvis.protobuf.stream.IGetStencilBufferPayload|null} [getStencilBuffer] StreamRequest getStencilBuffer
11311
+ * @property {vertexvis.protobuf.stream.IResetViewPlayload|null} [resetView] StreamRequest resetView
11312
+ * @property {vertexvis.protobuf.stream.IRefreshTokenPayload|null} [refreshToken] StreamRequest refreshToken
11101
11313
  */
11102
11314
 
11103
11315
  /**
@@ -11259,17 +11471,33 @@ const vertexvis = $root.vertexvis = (() => {
11259
11471
  */
11260
11472
  StreamRequest.prototype.getStencilBuffer = null;
11261
11473
 
11474
+ /**
11475
+ * StreamRequest resetView.
11476
+ * @member {vertexvis.protobuf.stream.IResetViewPlayload|null|undefined} resetView
11477
+ * @memberof vertexvis.protobuf.stream.StreamRequest
11478
+ * @instance
11479
+ */
11480
+ StreamRequest.prototype.resetView = null;
11481
+
11482
+ /**
11483
+ * StreamRequest refreshToken.
11484
+ * @member {vertexvis.protobuf.stream.IRefreshTokenPayload|null|undefined} refreshToken
11485
+ * @memberof vertexvis.protobuf.stream.StreamRequest
11486
+ * @instance
11487
+ */
11488
+ StreamRequest.prototype.refreshToken = null;
11489
+
11262
11490
  // OneOf field names bound to virtual getters and setters
11263
11491
  let $oneOfFields;
11264
11492
 
11265
11493
  /**
11266
11494
  * StreamRequest payload.
11267
- * @member {"startStream"|"updateCamera"|"beginInteraction"|"endInteraction"|"gracefulReconnection"|"reconnect"|"hitItems"|"createSceneAlteration"|"drawFrame"|"syncTime"|"recordPerformance"|"updateDimensions"|"updateStream"|"flyTo"|"loadSceneViewState"|"updateCrossSectioning"|"getStencilBuffer"|undefined} payload
11495
+ * @member {"startStream"|"updateCamera"|"beginInteraction"|"endInteraction"|"gracefulReconnection"|"reconnect"|"hitItems"|"createSceneAlteration"|"drawFrame"|"syncTime"|"recordPerformance"|"updateDimensions"|"updateStream"|"flyTo"|"loadSceneViewState"|"updateCrossSectioning"|"getStencilBuffer"|"resetView"|"refreshToken"|undefined} payload
11268
11496
  * @memberof vertexvis.protobuf.stream.StreamRequest
11269
11497
  * @instance
11270
11498
  */
11271
11499
  Object.defineProperty(StreamRequest.prototype, "payload", {
11272
- get: $util.oneOfGetter($oneOfFields = ["startStream", "updateCamera", "beginInteraction", "endInteraction", "gracefulReconnection", "reconnect", "hitItems", "createSceneAlteration", "drawFrame", "syncTime", "recordPerformance", "updateDimensions", "updateStream", "flyTo", "loadSceneViewState", "updateCrossSectioning", "getStencilBuffer"]),
11500
+ get: $util.oneOfGetter($oneOfFields = ["startStream", "updateCamera", "beginInteraction", "endInteraction", "gracefulReconnection", "reconnect", "hitItems", "createSceneAlteration", "drawFrame", "syncTime", "recordPerformance", "updateDimensions", "updateStream", "flyTo", "loadSceneViewState", "updateCrossSectioning", "getStencilBuffer", "resetView", "refreshToken"]),
11273
11501
  set: $util.oneOfSetter($oneOfFields)
11274
11502
  });
11275
11503
 
@@ -11333,6 +11561,10 @@ const vertexvis = $root.vertexvis = (() => {
11333
11561
  $root.vertexvis.protobuf.stream.UpdateCrossSectioningPayload.encode(message.updateCrossSectioning, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
11334
11562
  if (message.getStencilBuffer != null && Object.hasOwnProperty.call(message, "getStencilBuffer"))
11335
11563
  $root.vertexvis.protobuf.stream.GetStencilBufferPayload.encode(message.getStencilBuffer, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim();
11564
+ if (message.resetView != null && Object.hasOwnProperty.call(message, "resetView"))
11565
+ $root.vertexvis.protobuf.stream.ResetViewPlayload.encode(message.resetView, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim();
11566
+ if (message.refreshToken != null && Object.hasOwnProperty.call(message, "refreshToken"))
11567
+ $root.vertexvis.protobuf.stream.RefreshTokenPayload.encode(message.refreshToken, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim();
11336
11568
  return writer;
11337
11569
  };
11338
11570
 
@@ -11421,6 +11653,12 @@ const vertexvis = $root.vertexvis = (() => {
11421
11653
  case 18:
11422
11654
  message.getStencilBuffer = $root.vertexvis.protobuf.stream.GetStencilBufferPayload.decode(reader, reader.uint32());
11423
11655
  break;
11656
+ case 19:
11657
+ message.resetView = $root.vertexvis.protobuf.stream.ResetViewPlayload.decode(reader, reader.uint32());
11658
+ break;
11659
+ case 20:
11660
+ message.refreshToken = $root.vertexvis.protobuf.stream.RefreshTokenPayload.decode(reader, reader.uint32());
11661
+ break;
11424
11662
  default:
11425
11663
  reader.skipType(tag & 7);
11426
11664
  break;
@@ -11630,6 +11868,26 @@ const vertexvis = $root.vertexvis = (() => {
11630
11868
  return "getStencilBuffer." + error;
11631
11869
  }
11632
11870
  }
11871
+ if (message.resetView != null && message.hasOwnProperty("resetView")) {
11872
+ if (properties.payload === 1)
11873
+ return "payload: multiple values";
11874
+ properties.payload = 1;
11875
+ {
11876
+ let error = $root.vertexvis.protobuf.stream.ResetViewPlayload.verify(message.resetView);
11877
+ if (error)
11878
+ return "resetView." + error;
11879
+ }
11880
+ }
11881
+ if (message.refreshToken != null && message.hasOwnProperty("refreshToken")) {
11882
+ if (properties.payload === 1)
11883
+ return "payload: multiple values";
11884
+ properties.payload = 1;
11885
+ {
11886
+ let error = $root.vertexvis.protobuf.stream.RefreshTokenPayload.verify(message.refreshToken);
11887
+ if (error)
11888
+ return "refreshToken." + error;
11889
+ }
11890
+ }
11633
11891
  return null;
11634
11892
  };
11635
11893
 
@@ -11735,6 +11993,16 @@ const vertexvis = $root.vertexvis = (() => {
11735
11993
  throw TypeError(".vertexvis.protobuf.stream.StreamRequest.getStencilBuffer: object expected");
11736
11994
  message.getStencilBuffer = $root.vertexvis.protobuf.stream.GetStencilBufferPayload.fromObject(object.getStencilBuffer);
11737
11995
  }
11996
+ if (object.resetView != null) {
11997
+ if (typeof object.resetView !== "object")
11998
+ throw TypeError(".vertexvis.protobuf.stream.StreamRequest.resetView: object expected");
11999
+ message.resetView = $root.vertexvis.protobuf.stream.ResetViewPlayload.fromObject(object.resetView);
12000
+ }
12001
+ if (object.refreshToken != null) {
12002
+ if (typeof object.refreshToken !== "object")
12003
+ throw TypeError(".vertexvis.protobuf.stream.StreamRequest.refreshToken: object expected");
12004
+ message.refreshToken = $root.vertexvis.protobuf.stream.RefreshTokenPayload.fromObject(object.refreshToken);
12005
+ }
11738
12006
  return message;
11739
12007
  };
11740
12008
 
@@ -11840,6 +12108,16 @@ const vertexvis = $root.vertexvis = (() => {
11840
12108
  if (options.oneofs)
11841
12109
  object.payload = "getStencilBuffer";
11842
12110
  }
12111
+ if (message.resetView != null && message.hasOwnProperty("resetView")) {
12112
+ object.resetView = $root.vertexvis.protobuf.stream.ResetViewPlayload.toObject(message.resetView, options);
12113
+ if (options.oneofs)
12114
+ object.payload = "resetView";
12115
+ }
12116
+ if (message.refreshToken != null && message.hasOwnProperty("refreshToken")) {
12117
+ object.refreshToken = $root.vertexvis.protobuf.stream.RefreshTokenPayload.toObject(message.refreshToken, options);
12118
+ if (options.oneofs)
12119
+ object.payload = "refreshToken";
12120
+ }
11843
12121
  return object;
11844
12122
  };
11845
12123
 
@@ -15563,6 +15841,221 @@ const vertexvis = $root.vertexvis = (() => {
15563
15841
  return LoadSceneViewStatePayload;
15564
15842
  })();
15565
15843
 
15844
+ stream.ResetViewPlayload = (function() {
15845
+
15846
+ /**
15847
+ * Properties of a ResetViewPlayload.
15848
+ * @memberof vertexvis.protobuf.stream
15849
+ * @interface IResetViewPlayload
15850
+ * @property {google.protobuf.IStringValue|null} [frameCorrelationId] ResetViewPlayload frameCorrelationId
15851
+ * @property {boolean|null} [includeCamera] ResetViewPlayload includeCamera
15852
+ */
15853
+
15854
+ /**
15855
+ * Constructs a new ResetViewPlayload.
15856
+ * @memberof vertexvis.protobuf.stream
15857
+ * @classdesc Represents a ResetViewPlayload.
15858
+ * @implements IResetViewPlayload
15859
+ * @constructor
15860
+ * @param {vertexvis.protobuf.stream.IResetViewPlayload=} [properties] Properties to set
15861
+ */
15862
+ function ResetViewPlayload(properties) {
15863
+ if (properties)
15864
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
15865
+ if (properties[keys[i]] != null)
15866
+ this[keys[i]] = properties[keys[i]];
15867
+ }
15868
+
15869
+ /**
15870
+ * ResetViewPlayload frameCorrelationId.
15871
+ * @member {google.protobuf.IStringValue|null|undefined} frameCorrelationId
15872
+ * @memberof vertexvis.protobuf.stream.ResetViewPlayload
15873
+ * @instance
15874
+ */
15875
+ ResetViewPlayload.prototype.frameCorrelationId = null;
15876
+
15877
+ /**
15878
+ * ResetViewPlayload includeCamera.
15879
+ * @member {boolean} includeCamera
15880
+ * @memberof vertexvis.protobuf.stream.ResetViewPlayload
15881
+ * @instance
15882
+ */
15883
+ ResetViewPlayload.prototype.includeCamera = false;
15884
+
15885
+ /**
15886
+ * Creates a new ResetViewPlayload instance using the specified properties.
15887
+ * @function create
15888
+ * @memberof vertexvis.protobuf.stream.ResetViewPlayload
15889
+ * @static
15890
+ * @param {vertexvis.protobuf.stream.IResetViewPlayload=} [properties] Properties to set
15891
+ * @returns {vertexvis.protobuf.stream.ResetViewPlayload} ResetViewPlayload instance
15892
+ */
15893
+ ResetViewPlayload.create = function create(properties) {
15894
+ return new ResetViewPlayload(properties);
15895
+ };
15896
+
15897
+ /**
15898
+ * Encodes the specified ResetViewPlayload message. Does not implicitly {@link vertexvis.protobuf.stream.ResetViewPlayload.verify|verify} messages.
15899
+ * @function encode
15900
+ * @memberof vertexvis.protobuf.stream.ResetViewPlayload
15901
+ * @static
15902
+ * @param {vertexvis.protobuf.stream.IResetViewPlayload} message ResetViewPlayload message or plain object to encode
15903
+ * @param {$protobuf.Writer} [writer] Writer to encode to
15904
+ * @returns {$protobuf.Writer} Writer
15905
+ */
15906
+ ResetViewPlayload.encode = function encode(message, writer) {
15907
+ if (!writer)
15908
+ writer = $Writer.create();
15909
+ if (message.frameCorrelationId != null && Object.hasOwnProperty.call(message, "frameCorrelationId"))
15910
+ $root.google.protobuf.StringValue.encode(message.frameCorrelationId, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
15911
+ if (message.includeCamera != null && Object.hasOwnProperty.call(message, "includeCamera"))
15912
+ writer.uint32(/* id 2, wireType 0 =*/16).bool(message.includeCamera);
15913
+ return writer;
15914
+ };
15915
+
15916
+ /**
15917
+ * Encodes the specified ResetViewPlayload message, length delimited. Does not implicitly {@link vertexvis.protobuf.stream.ResetViewPlayload.verify|verify} messages.
15918
+ * @function encodeDelimited
15919
+ * @memberof vertexvis.protobuf.stream.ResetViewPlayload
15920
+ * @static
15921
+ * @param {vertexvis.protobuf.stream.IResetViewPlayload} message ResetViewPlayload message or plain object to encode
15922
+ * @param {$protobuf.Writer} [writer] Writer to encode to
15923
+ * @returns {$protobuf.Writer} Writer
15924
+ */
15925
+ ResetViewPlayload.encodeDelimited = function encodeDelimited(message, writer) {
15926
+ return this.encode(message, writer).ldelim();
15927
+ };
15928
+
15929
+ /**
15930
+ * Decodes a ResetViewPlayload message from the specified reader or buffer.
15931
+ * @function decode
15932
+ * @memberof vertexvis.protobuf.stream.ResetViewPlayload
15933
+ * @static
15934
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
15935
+ * @param {number} [length] Message length if known beforehand
15936
+ * @returns {vertexvis.protobuf.stream.ResetViewPlayload} ResetViewPlayload
15937
+ * @throws {Error} If the payload is not a reader or valid buffer
15938
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
15939
+ */
15940
+ ResetViewPlayload.decode = function decode(reader, length) {
15941
+ if (!(reader instanceof $Reader))
15942
+ reader = $Reader.create(reader);
15943
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vertexvis.protobuf.stream.ResetViewPlayload();
15944
+ while (reader.pos < end) {
15945
+ let tag = reader.uint32();
15946
+ switch (tag >>> 3) {
15947
+ case 1:
15948
+ message.frameCorrelationId = $root.google.protobuf.StringValue.decode(reader, reader.uint32());
15949
+ break;
15950
+ case 2:
15951
+ message.includeCamera = reader.bool();
15952
+ break;
15953
+ default:
15954
+ reader.skipType(tag & 7);
15955
+ break;
15956
+ }
15957
+ }
15958
+ return message;
15959
+ };
15960
+
15961
+ /**
15962
+ * Decodes a ResetViewPlayload message from the specified reader or buffer, length delimited.
15963
+ * @function decodeDelimited
15964
+ * @memberof vertexvis.protobuf.stream.ResetViewPlayload
15965
+ * @static
15966
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
15967
+ * @returns {vertexvis.protobuf.stream.ResetViewPlayload} ResetViewPlayload
15968
+ * @throws {Error} If the payload is not a reader or valid buffer
15969
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
15970
+ */
15971
+ ResetViewPlayload.decodeDelimited = function decodeDelimited(reader) {
15972
+ if (!(reader instanceof $Reader))
15973
+ reader = new $Reader(reader);
15974
+ return this.decode(reader, reader.uint32());
15975
+ };
15976
+
15977
+ /**
15978
+ * Verifies a ResetViewPlayload message.
15979
+ * @function verify
15980
+ * @memberof vertexvis.protobuf.stream.ResetViewPlayload
15981
+ * @static
15982
+ * @param {Object.<string,*>} message Plain object to verify
15983
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
15984
+ */
15985
+ ResetViewPlayload.verify = function verify(message) {
15986
+ if (typeof message !== "object" || message === null)
15987
+ return "object expected";
15988
+ if (message.frameCorrelationId != null && message.hasOwnProperty("frameCorrelationId")) {
15989
+ let error = $root.google.protobuf.StringValue.verify(message.frameCorrelationId);
15990
+ if (error)
15991
+ return "frameCorrelationId." + error;
15992
+ }
15993
+ if (message.includeCamera != null && message.hasOwnProperty("includeCamera"))
15994
+ if (typeof message.includeCamera !== "boolean")
15995
+ return "includeCamera: boolean expected";
15996
+ return null;
15997
+ };
15998
+
15999
+ /**
16000
+ * Creates a ResetViewPlayload message from a plain object. Also converts values to their respective internal types.
16001
+ * @function fromObject
16002
+ * @memberof vertexvis.protobuf.stream.ResetViewPlayload
16003
+ * @static
16004
+ * @param {Object.<string,*>} object Plain object
16005
+ * @returns {vertexvis.protobuf.stream.ResetViewPlayload} ResetViewPlayload
16006
+ */
16007
+ ResetViewPlayload.fromObject = function fromObject(object) {
16008
+ if (object instanceof $root.vertexvis.protobuf.stream.ResetViewPlayload)
16009
+ return object;
16010
+ let message = new $root.vertexvis.protobuf.stream.ResetViewPlayload();
16011
+ if (object.frameCorrelationId != null) {
16012
+ if (typeof object.frameCorrelationId !== "object")
16013
+ throw TypeError(".vertexvis.protobuf.stream.ResetViewPlayload.frameCorrelationId: object expected");
16014
+ message.frameCorrelationId = $root.google.protobuf.StringValue.fromObject(object.frameCorrelationId);
16015
+ }
16016
+ if (object.includeCamera != null)
16017
+ message.includeCamera = Boolean(object.includeCamera);
16018
+ return message;
16019
+ };
16020
+
16021
+ /**
16022
+ * Creates a plain object from a ResetViewPlayload message. Also converts values to other types if specified.
16023
+ * @function toObject
16024
+ * @memberof vertexvis.protobuf.stream.ResetViewPlayload
16025
+ * @static
16026
+ * @param {vertexvis.protobuf.stream.ResetViewPlayload} message ResetViewPlayload
16027
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
16028
+ * @returns {Object.<string,*>} Plain object
16029
+ */
16030
+ ResetViewPlayload.toObject = function toObject(message, options) {
16031
+ if (!options)
16032
+ options = {};
16033
+ let object = {};
16034
+ if (options.defaults) {
16035
+ object.frameCorrelationId = null;
16036
+ object.includeCamera = false;
16037
+ }
16038
+ if (message.frameCorrelationId != null && message.hasOwnProperty("frameCorrelationId"))
16039
+ object.frameCorrelationId = $root.google.protobuf.StringValue.toObject(message.frameCorrelationId, options);
16040
+ if (message.includeCamera != null && message.hasOwnProperty("includeCamera"))
16041
+ object.includeCamera = message.includeCamera;
16042
+ return object;
16043
+ };
16044
+
16045
+ /**
16046
+ * Converts this ResetViewPlayload to JSON.
16047
+ * @function toJSON
16048
+ * @memberof vertexvis.protobuf.stream.ResetViewPlayload
16049
+ * @instance
16050
+ * @returns {Object.<string,*>} JSON object
16051
+ */
16052
+ ResetViewPlayload.prototype.toJSON = function toJSON() {
16053
+ return this.constructor.toObject(this, minimal.util.toJSONOptions);
16054
+ };
16055
+
16056
+ return ResetViewPlayload;
16057
+ })();
16058
+
15566
16059
  stream.UpdateCrossSectioningPayload = (function() {
15567
16060
 
15568
16061
  /**
@@ -15789,6 +16282,7 @@ const vertexvis = $root.vertexvis = (() => {
15789
16282
  * Properties of a GetStencilBufferPayload.
15790
16283
  * @memberof vertexvis.protobuf.stream
15791
16284
  * @interface IGetStencilBufferPayload
16285
+ * @property {boolean|null} [includeDepthBuffer] GetStencilBufferPayload includeDepthBuffer
15792
16286
  */
15793
16287
 
15794
16288
  /**
@@ -15806,6 +16300,14 @@ const vertexvis = $root.vertexvis = (() => {
15806
16300
  this[keys[i]] = properties[keys[i]];
15807
16301
  }
15808
16302
 
16303
+ /**
16304
+ * GetStencilBufferPayload includeDepthBuffer.
16305
+ * @member {boolean} includeDepthBuffer
16306
+ * @memberof vertexvis.protobuf.stream.GetStencilBufferPayload
16307
+ * @instance
16308
+ */
16309
+ GetStencilBufferPayload.prototype.includeDepthBuffer = false;
16310
+
15809
16311
  /**
15810
16312
  * Creates a new GetStencilBufferPayload instance using the specified properties.
15811
16313
  * @function create
@@ -15830,6 +16332,8 @@ const vertexvis = $root.vertexvis = (() => {
15830
16332
  GetStencilBufferPayload.encode = function encode(message, writer) {
15831
16333
  if (!writer)
15832
16334
  writer = $Writer.create();
16335
+ if (message.includeDepthBuffer != null && Object.hasOwnProperty.call(message, "includeDepthBuffer"))
16336
+ writer.uint32(/* id 1, wireType 0 =*/8).bool(message.includeDepthBuffer);
15833
16337
  return writer;
15834
16338
  };
15835
16339
 
@@ -15864,6 +16368,9 @@ const vertexvis = $root.vertexvis = (() => {
15864
16368
  while (reader.pos < end) {
15865
16369
  let tag = reader.uint32();
15866
16370
  switch (tag >>> 3) {
16371
+ case 1:
16372
+ message.includeDepthBuffer = reader.bool();
16373
+ break;
15867
16374
  default:
15868
16375
  reader.skipType(tag & 7);
15869
16376
  break;
@@ -15899,6 +16406,9 @@ const vertexvis = $root.vertexvis = (() => {
15899
16406
  GetStencilBufferPayload.verify = function verify(message) {
15900
16407
  if (typeof message !== "object" || message === null)
15901
16408
  return "object expected";
16409
+ if (message.includeDepthBuffer != null && message.hasOwnProperty("includeDepthBuffer"))
16410
+ if (typeof message.includeDepthBuffer !== "boolean")
16411
+ return "includeDepthBuffer: boolean expected";
15902
16412
  return null;
15903
16413
  };
15904
16414
 
@@ -15913,7 +16423,10 @@ const vertexvis = $root.vertexvis = (() => {
15913
16423
  GetStencilBufferPayload.fromObject = function fromObject(object) {
15914
16424
  if (object instanceof $root.vertexvis.protobuf.stream.GetStencilBufferPayload)
15915
16425
  return object;
15916
- return new $root.vertexvis.protobuf.stream.GetStencilBufferPayload();
16426
+ let message = new $root.vertexvis.protobuf.stream.GetStencilBufferPayload();
16427
+ if (object.includeDepthBuffer != null)
16428
+ message.includeDepthBuffer = Boolean(object.includeDepthBuffer);
16429
+ return message;
15917
16430
  };
15918
16431
 
15919
16432
  /**
@@ -15925,8 +16438,15 @@ const vertexvis = $root.vertexvis = (() => {
15925
16438
  * @param {$protobuf.IConversionOptions} [options] Conversion options
15926
16439
  * @returns {Object.<string,*>} Plain object
15927
16440
  */
15928
- GetStencilBufferPayload.toObject = function toObject() {
15929
- return {};
16441
+ GetStencilBufferPayload.toObject = function toObject(message, options) {
16442
+ if (!options)
16443
+ options = {};
16444
+ let object = {};
16445
+ if (options.defaults)
16446
+ object.includeDepthBuffer = false;
16447
+ if (message.includeDepthBuffer != null && message.hasOwnProperty("includeDepthBuffer"))
16448
+ object.includeDepthBuffer = message.includeDepthBuffer;
16449
+ return object;
15930
16450
  };
15931
16451
 
15932
16452
  /**
@@ -15943,6 +16463,166 @@ const vertexvis = $root.vertexvis = (() => {
15943
16463
  return GetStencilBufferPayload;
15944
16464
  })();
15945
16465
 
16466
+ stream.RefreshTokenPayload = (function() {
16467
+
16468
+ /**
16469
+ * Properties of a RefreshTokenPayload.
16470
+ * @memberof vertexvis.protobuf.stream
16471
+ * @interface IRefreshTokenPayload
16472
+ */
16473
+
16474
+ /**
16475
+ * Constructs a new RefreshTokenPayload.
16476
+ * @memberof vertexvis.protobuf.stream
16477
+ * @classdesc Represents a RefreshTokenPayload.
16478
+ * @implements IRefreshTokenPayload
16479
+ * @constructor
16480
+ * @param {vertexvis.protobuf.stream.IRefreshTokenPayload=} [properties] Properties to set
16481
+ */
16482
+ function RefreshTokenPayload(properties) {
16483
+ if (properties)
16484
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
16485
+ if (properties[keys[i]] != null)
16486
+ this[keys[i]] = properties[keys[i]];
16487
+ }
16488
+
16489
+ /**
16490
+ * Creates a new RefreshTokenPayload instance using the specified properties.
16491
+ * @function create
16492
+ * @memberof vertexvis.protobuf.stream.RefreshTokenPayload
16493
+ * @static
16494
+ * @param {vertexvis.protobuf.stream.IRefreshTokenPayload=} [properties] Properties to set
16495
+ * @returns {vertexvis.protobuf.stream.RefreshTokenPayload} RefreshTokenPayload instance
16496
+ */
16497
+ RefreshTokenPayload.create = function create(properties) {
16498
+ return new RefreshTokenPayload(properties);
16499
+ };
16500
+
16501
+ /**
16502
+ * Encodes the specified RefreshTokenPayload message. Does not implicitly {@link vertexvis.protobuf.stream.RefreshTokenPayload.verify|verify} messages.
16503
+ * @function encode
16504
+ * @memberof vertexvis.protobuf.stream.RefreshTokenPayload
16505
+ * @static
16506
+ * @param {vertexvis.protobuf.stream.IRefreshTokenPayload} message RefreshTokenPayload message or plain object to encode
16507
+ * @param {$protobuf.Writer} [writer] Writer to encode to
16508
+ * @returns {$protobuf.Writer} Writer
16509
+ */
16510
+ RefreshTokenPayload.encode = function encode(message, writer) {
16511
+ if (!writer)
16512
+ writer = $Writer.create();
16513
+ return writer;
16514
+ };
16515
+
16516
+ /**
16517
+ * Encodes the specified RefreshTokenPayload message, length delimited. Does not implicitly {@link vertexvis.protobuf.stream.RefreshTokenPayload.verify|verify} messages.
16518
+ * @function encodeDelimited
16519
+ * @memberof vertexvis.protobuf.stream.RefreshTokenPayload
16520
+ * @static
16521
+ * @param {vertexvis.protobuf.stream.IRefreshTokenPayload} message RefreshTokenPayload message or plain object to encode
16522
+ * @param {$protobuf.Writer} [writer] Writer to encode to
16523
+ * @returns {$protobuf.Writer} Writer
16524
+ */
16525
+ RefreshTokenPayload.encodeDelimited = function encodeDelimited(message, writer) {
16526
+ return this.encode(message, writer).ldelim();
16527
+ };
16528
+
16529
+ /**
16530
+ * Decodes a RefreshTokenPayload message from the specified reader or buffer.
16531
+ * @function decode
16532
+ * @memberof vertexvis.protobuf.stream.RefreshTokenPayload
16533
+ * @static
16534
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
16535
+ * @param {number} [length] Message length if known beforehand
16536
+ * @returns {vertexvis.protobuf.stream.RefreshTokenPayload} RefreshTokenPayload
16537
+ * @throws {Error} If the payload is not a reader or valid buffer
16538
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
16539
+ */
16540
+ RefreshTokenPayload.decode = function decode(reader, length) {
16541
+ if (!(reader instanceof $Reader))
16542
+ reader = $Reader.create(reader);
16543
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vertexvis.protobuf.stream.RefreshTokenPayload();
16544
+ while (reader.pos < end) {
16545
+ let tag = reader.uint32();
16546
+ switch (tag >>> 3) {
16547
+ default:
16548
+ reader.skipType(tag & 7);
16549
+ break;
16550
+ }
16551
+ }
16552
+ return message;
16553
+ };
16554
+
16555
+ /**
16556
+ * Decodes a RefreshTokenPayload message from the specified reader or buffer, length delimited.
16557
+ * @function decodeDelimited
16558
+ * @memberof vertexvis.protobuf.stream.RefreshTokenPayload
16559
+ * @static
16560
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
16561
+ * @returns {vertexvis.protobuf.stream.RefreshTokenPayload} RefreshTokenPayload
16562
+ * @throws {Error} If the payload is not a reader or valid buffer
16563
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
16564
+ */
16565
+ RefreshTokenPayload.decodeDelimited = function decodeDelimited(reader) {
16566
+ if (!(reader instanceof $Reader))
16567
+ reader = new $Reader(reader);
16568
+ return this.decode(reader, reader.uint32());
16569
+ };
16570
+
16571
+ /**
16572
+ * Verifies a RefreshTokenPayload message.
16573
+ * @function verify
16574
+ * @memberof vertexvis.protobuf.stream.RefreshTokenPayload
16575
+ * @static
16576
+ * @param {Object.<string,*>} message Plain object to verify
16577
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
16578
+ */
16579
+ RefreshTokenPayload.verify = function verify(message) {
16580
+ if (typeof message !== "object" || message === null)
16581
+ return "object expected";
16582
+ return null;
16583
+ };
16584
+
16585
+ /**
16586
+ * Creates a RefreshTokenPayload message from a plain object. Also converts values to their respective internal types.
16587
+ * @function fromObject
16588
+ * @memberof vertexvis.protobuf.stream.RefreshTokenPayload
16589
+ * @static
16590
+ * @param {Object.<string,*>} object Plain object
16591
+ * @returns {vertexvis.protobuf.stream.RefreshTokenPayload} RefreshTokenPayload
16592
+ */
16593
+ RefreshTokenPayload.fromObject = function fromObject(object) {
16594
+ if (object instanceof $root.vertexvis.protobuf.stream.RefreshTokenPayload)
16595
+ return object;
16596
+ return new $root.vertexvis.protobuf.stream.RefreshTokenPayload();
16597
+ };
16598
+
16599
+ /**
16600
+ * Creates a plain object from a RefreshTokenPayload message. Also converts values to other types if specified.
16601
+ * @function toObject
16602
+ * @memberof vertexvis.protobuf.stream.RefreshTokenPayload
16603
+ * @static
16604
+ * @param {vertexvis.protobuf.stream.RefreshTokenPayload} message RefreshTokenPayload
16605
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
16606
+ * @returns {Object.<string,*>} Plain object
16607
+ */
16608
+ RefreshTokenPayload.toObject = function toObject() {
16609
+ return {};
16610
+ };
16611
+
16612
+ /**
16613
+ * Converts this RefreshTokenPayload to JSON.
16614
+ * @function toJSON
16615
+ * @memberof vertexvis.protobuf.stream.RefreshTokenPayload
16616
+ * @instance
16617
+ * @returns {Object.<string,*>} JSON object
16618
+ */
16619
+ RefreshTokenPayload.prototype.toJSON = function toJSON() {
16620
+ return this.constructor.toObject(this, minimal.util.toJSONOptions);
16621
+ };
16622
+
16623
+ return RefreshTokenPayload;
16624
+ })();
16625
+
15946
16626
  stream.StreamResponse = (function() {
15947
16627
 
15948
16628
  /**
@@ -15966,6 +16646,8 @@ const vertexvis = $root.vertexvis = (() => {
15966
16646
  * @property {vertexvis.protobuf.stream.ILoadSceneViewStateResult|null} [loadSceneViewState] StreamResponse loadSceneViewState
15967
16647
  * @property {vertexvis.protobuf.stream.IUpdateCrossSectioningResult|null} [updateCrossSectioning] StreamResponse updateCrossSectioning
15968
16648
  * @property {vertexvis.protobuf.stream.IGetStencilBufferResult|null} [stencilBuffer] StreamResponse stencilBuffer
16649
+ * @property {vertexvis.protobuf.stream.IResetViewResult|null} [resetView] StreamResponse resetView
16650
+ * @property {vertexvis.protobuf.stream.IRefreshTokenResult|null} [refreshToken] StreamResponse refreshToken
15969
16651
  */
15970
16652
 
15971
16653
  /**
@@ -16119,17 +16801,33 @@ const vertexvis = $root.vertexvis = (() => {
16119
16801
  */
16120
16802
  StreamResponse.prototype.stencilBuffer = null;
16121
16803
 
16804
+ /**
16805
+ * StreamResponse resetView.
16806
+ * @member {vertexvis.protobuf.stream.IResetViewResult|null|undefined} resetView
16807
+ * @memberof vertexvis.protobuf.stream.StreamResponse
16808
+ * @instance
16809
+ */
16810
+ StreamResponse.prototype.resetView = null;
16811
+
16812
+ /**
16813
+ * StreamResponse refreshToken.
16814
+ * @member {vertexvis.protobuf.stream.IRefreshTokenResult|null|undefined} refreshToken
16815
+ * @memberof vertexvis.protobuf.stream.StreamResponse
16816
+ * @instance
16817
+ */
16818
+ StreamResponse.prototype.refreshToken = null;
16819
+
16122
16820
  // OneOf field names bound to virtual getters and setters
16123
16821
  let $oneOfFields;
16124
16822
 
16125
16823
  /**
16126
16824
  * StreamResponse result.
16127
- * @member {"startStream"|"updateCamera"|"beginInteraction"|"endInteraction"|"reconnect"|"hitItems"|"drawFrame"|"syncTime"|"recordPerformance"|"updateDimensions"|"updateStream"|"flyTo"|"loadSceneViewState"|"updateCrossSectioning"|"stencilBuffer"|undefined} result
16825
+ * @member {"startStream"|"updateCamera"|"beginInteraction"|"endInteraction"|"reconnect"|"hitItems"|"drawFrame"|"syncTime"|"recordPerformance"|"updateDimensions"|"updateStream"|"flyTo"|"loadSceneViewState"|"updateCrossSectioning"|"stencilBuffer"|"resetView"|"refreshToken"|undefined} result
16128
16826
  * @memberof vertexvis.protobuf.stream.StreamResponse
16129
16827
  * @instance
16130
16828
  */
16131
16829
  Object.defineProperty(StreamResponse.prototype, "result", {
16132
- get: $util.oneOfGetter($oneOfFields = ["startStream", "updateCamera", "beginInteraction", "endInteraction", "reconnect", "hitItems", "drawFrame", "syncTime", "recordPerformance", "updateDimensions", "updateStream", "flyTo", "loadSceneViewState", "updateCrossSectioning", "stencilBuffer"]),
16830
+ get: $util.oneOfGetter($oneOfFields = ["startStream", "updateCamera", "beginInteraction", "endInteraction", "reconnect", "hitItems", "drawFrame", "syncTime", "recordPerformance", "updateDimensions", "updateStream", "flyTo", "loadSceneViewState", "updateCrossSectioning", "stencilBuffer", "resetView", "refreshToken"]),
16133
16831
  set: $util.oneOfSetter($oneOfFields)
16134
16832
  });
16135
16833
 
@@ -16191,6 +16889,10 @@ const vertexvis = $root.vertexvis = (() => {
16191
16889
  $root.vertexvis.protobuf.stream.UpdateCrossSectioningResult.encode(message.updateCrossSectioning, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim();
16192
16890
  if (message.stencilBuffer != null && Object.hasOwnProperty.call(message, "stencilBuffer"))
16193
16891
  $root.vertexvis.protobuf.stream.GetStencilBufferResult.encode(message.stencilBuffer, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
16892
+ if (message.resetView != null && Object.hasOwnProperty.call(message, "resetView"))
16893
+ $root.vertexvis.protobuf.stream.ResetViewResult.encode(message.resetView, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim();
16894
+ if (message.refreshToken != null && Object.hasOwnProperty.call(message, "refreshToken"))
16895
+ $root.vertexvis.protobuf.stream.RefreshTokenResult.encode(message.refreshToken, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim();
16194
16896
  return writer;
16195
16897
  };
16196
16898
 
@@ -16276,6 +16978,12 @@ const vertexvis = $root.vertexvis = (() => {
16276
16978
  case 17:
16277
16979
  message.stencilBuffer = $root.vertexvis.protobuf.stream.GetStencilBufferResult.decode(reader, reader.uint32());
16278
16980
  break;
16981
+ case 18:
16982
+ message.resetView = $root.vertexvis.protobuf.stream.ResetViewResult.decode(reader, reader.uint32());
16983
+ break;
16984
+ case 19:
16985
+ message.refreshToken = $root.vertexvis.protobuf.stream.RefreshTokenResult.decode(reader, reader.uint32());
16986
+ break;
16279
16987
  default:
16280
16988
  reader.skipType(tag & 7);
16281
16989
  break;
@@ -16470,6 +17178,26 @@ const vertexvis = $root.vertexvis = (() => {
16470
17178
  return "stencilBuffer." + error;
16471
17179
  }
16472
17180
  }
17181
+ if (message.resetView != null && message.hasOwnProperty("resetView")) {
17182
+ if (properties.result === 1)
17183
+ return "result: multiple values";
17184
+ properties.result = 1;
17185
+ {
17186
+ let error = $root.vertexvis.protobuf.stream.ResetViewResult.verify(message.resetView);
17187
+ if (error)
17188
+ return "resetView." + error;
17189
+ }
17190
+ }
17191
+ if (message.refreshToken != null && message.hasOwnProperty("refreshToken")) {
17192
+ if (properties.result === 1)
17193
+ return "result: multiple values";
17194
+ properties.result = 1;
17195
+ {
17196
+ let error = $root.vertexvis.protobuf.stream.RefreshTokenResult.verify(message.refreshToken);
17197
+ if (error)
17198
+ return "refreshToken." + error;
17199
+ }
17200
+ }
16473
17201
  return null;
16474
17202
  };
16475
17203
 
@@ -16570,6 +17298,16 @@ const vertexvis = $root.vertexvis = (() => {
16570
17298
  throw TypeError(".vertexvis.protobuf.stream.StreamResponse.stencilBuffer: object expected");
16571
17299
  message.stencilBuffer = $root.vertexvis.protobuf.stream.GetStencilBufferResult.fromObject(object.stencilBuffer);
16572
17300
  }
17301
+ if (object.resetView != null) {
17302
+ if (typeof object.resetView !== "object")
17303
+ throw TypeError(".vertexvis.protobuf.stream.StreamResponse.resetView: object expected");
17304
+ message.resetView = $root.vertexvis.protobuf.stream.ResetViewResult.fromObject(object.resetView);
17305
+ }
17306
+ if (object.refreshToken != null) {
17307
+ if (typeof object.refreshToken !== "object")
17308
+ throw TypeError(".vertexvis.protobuf.stream.StreamResponse.refreshToken: object expected");
17309
+ message.refreshToken = $root.vertexvis.protobuf.stream.RefreshTokenResult.fromObject(object.refreshToken);
17310
+ }
16573
17311
  return message;
16574
17312
  };
16575
17313
 
@@ -16669,6 +17407,16 @@ const vertexvis = $root.vertexvis = (() => {
16669
17407
  if (options.oneofs)
16670
17408
  object.result = "stencilBuffer";
16671
17409
  }
17410
+ if (message.resetView != null && message.hasOwnProperty("resetView")) {
17411
+ object.resetView = $root.vertexvis.protobuf.stream.ResetViewResult.toObject(message.resetView, options);
17412
+ if (options.oneofs)
17413
+ object.result = "resetView";
17414
+ }
17415
+ if (message.refreshToken != null && message.hasOwnProperty("refreshToken")) {
17416
+ object.refreshToken = $root.vertexvis.protobuf.stream.RefreshTokenResult.toObject(message.refreshToken, options);
17417
+ if (options.oneofs)
17418
+ object.result = "refreshToken";
17419
+ }
16672
17420
  return object;
16673
17421
  };
16674
17422
 
@@ -16697,6 +17445,7 @@ const vertexvis = $root.vertexvis = (() => {
16697
17445
  * @property {vertexvis.protobuf.core.IUuid|null} [sessionId] StartStreamResult sessionId
16698
17446
  * @property {string|null} [jwt] StartStreamResult jwt
16699
17447
  * @property {vertexvis.protobuf.stream.IOrientation|null} [worldOrientation] StartStreamResult worldOrientation
17448
+ * @property {vertexvis.protobuf.stream.IToken|null} [token] StartStreamResult token
16700
17449
  */
16701
17450
 
16702
17451
  /**
@@ -16754,6 +17503,14 @@ const vertexvis = $root.vertexvis = (() => {
16754
17503
  */
16755
17504
  StartStreamResult.prototype.worldOrientation = null;
16756
17505
 
17506
+ /**
17507
+ * StartStreamResult token.
17508
+ * @member {vertexvis.protobuf.stream.IToken|null|undefined} token
17509
+ * @memberof vertexvis.protobuf.stream.StartStreamResult
17510
+ * @instance
17511
+ */
17512
+ StartStreamResult.prototype.token = null;
17513
+
16757
17514
  /**
16758
17515
  * Creates a new StartStreamResult instance using the specified properties.
16759
17516
  * @function create
@@ -16788,6 +17545,8 @@ const vertexvis = $root.vertexvis = (() => {
16788
17545
  writer.uint32(/* id 4, wireType 2 =*/34).string(message.jwt);
16789
17546
  if (message.worldOrientation != null && Object.hasOwnProperty.call(message, "worldOrientation"))
16790
17547
  $root.vertexvis.protobuf.stream.Orientation.encode(message.worldOrientation, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
17548
+ if (message.token != null && Object.hasOwnProperty.call(message, "token"))
17549
+ $root.vertexvis.protobuf.stream.Token.encode(message.token, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
16791
17550
  return writer;
16792
17551
  };
16793
17552
 
@@ -16837,6 +17596,9 @@ const vertexvis = $root.vertexvis = (() => {
16837
17596
  case 5:
16838
17597
  message.worldOrientation = $root.vertexvis.protobuf.stream.Orientation.decode(reader, reader.uint32());
16839
17598
  break;
17599
+ case 6:
17600
+ message.token = $root.vertexvis.protobuf.stream.Token.decode(reader, reader.uint32());
17601
+ break;
16840
17602
  default:
16841
17603
  reader.skipType(tag & 7);
16842
17604
  break;
@@ -16895,6 +17657,11 @@ const vertexvis = $root.vertexvis = (() => {
16895
17657
  if (error)
16896
17658
  return "worldOrientation." + error;
16897
17659
  }
17660
+ if (message.token != null && message.hasOwnProperty("token")) {
17661
+ let error = $root.vertexvis.protobuf.stream.Token.verify(message.token);
17662
+ if (error)
17663
+ return "token." + error;
17664
+ }
16898
17665
  return null;
16899
17666
  };
16900
17667
 
@@ -16932,6 +17699,11 @@ const vertexvis = $root.vertexvis = (() => {
16932
17699
  throw TypeError(".vertexvis.protobuf.stream.StartStreamResult.worldOrientation: object expected");
16933
17700
  message.worldOrientation = $root.vertexvis.protobuf.stream.Orientation.fromObject(object.worldOrientation);
16934
17701
  }
17702
+ if (object.token != null) {
17703
+ if (typeof object.token !== "object")
17704
+ throw TypeError(".vertexvis.protobuf.stream.StartStreamResult.token: object expected");
17705
+ message.token = $root.vertexvis.protobuf.stream.Token.fromObject(object.token);
17706
+ }
16935
17707
  return message;
16936
17708
  };
16937
17709
 
@@ -16954,6 +17726,7 @@ const vertexvis = $root.vertexvis = (() => {
16954
17726
  object.sessionId = null;
16955
17727
  object.jwt = "";
16956
17728
  object.worldOrientation = null;
17729
+ object.token = null;
16957
17730
  }
16958
17731
  if (message.streamId != null && message.hasOwnProperty("streamId"))
16959
17732
  object.streamId = $root.vertexvis.protobuf.core.Uuid.toObject(message.streamId, options);
@@ -16965,6 +17738,8 @@ const vertexvis = $root.vertexvis = (() => {
16965
17738
  object.jwt = message.jwt;
16966
17739
  if (message.worldOrientation != null && message.hasOwnProperty("worldOrientation"))
16967
17740
  object.worldOrientation = $root.vertexvis.protobuf.stream.Orientation.toObject(message.worldOrientation, options);
17741
+ if (message.token != null && message.hasOwnProperty("token"))
17742
+ object.token = $root.vertexvis.protobuf.stream.Token.toObject(message.token, options);
16968
17743
  return object;
16969
17744
  };
16970
17745
 
@@ -17693,6 +18468,7 @@ const vertexvis = $root.vertexvis = (() => {
17693
18468
  * @memberof vertexvis.protobuf.stream
17694
18469
  * @interface IReconnectResult
17695
18470
  * @property {string|null} [jwt] ReconnectResult jwt
18471
+ * @property {vertexvis.protobuf.stream.IToken|null} [token] ReconnectResult token
17696
18472
  */
17697
18473
 
17698
18474
  /**
@@ -17718,6 +18494,14 @@ const vertexvis = $root.vertexvis = (() => {
17718
18494
  */
17719
18495
  ReconnectResult.prototype.jwt = "";
17720
18496
 
18497
+ /**
18498
+ * ReconnectResult token.
18499
+ * @member {vertexvis.protobuf.stream.IToken|null|undefined} token
18500
+ * @memberof vertexvis.protobuf.stream.ReconnectResult
18501
+ * @instance
18502
+ */
18503
+ ReconnectResult.prototype.token = null;
18504
+
17721
18505
  /**
17722
18506
  * Creates a new ReconnectResult instance using the specified properties.
17723
18507
  * @function create
@@ -17744,6 +18528,8 @@ const vertexvis = $root.vertexvis = (() => {
17744
18528
  writer = $Writer.create();
17745
18529
  if (message.jwt != null && Object.hasOwnProperty.call(message, "jwt"))
17746
18530
  writer.uint32(/* id 1, wireType 2 =*/10).string(message.jwt);
18531
+ if (message.token != null && Object.hasOwnProperty.call(message, "token"))
18532
+ $root.vertexvis.protobuf.stream.Token.encode(message.token, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
17747
18533
  return writer;
17748
18534
  };
17749
18535
 
@@ -17781,6 +18567,9 @@ const vertexvis = $root.vertexvis = (() => {
17781
18567
  case 1:
17782
18568
  message.jwt = reader.string();
17783
18569
  break;
18570
+ case 2:
18571
+ message.token = $root.vertexvis.protobuf.stream.Token.decode(reader, reader.uint32());
18572
+ break;
17784
18573
  default:
17785
18574
  reader.skipType(tag & 7);
17786
18575
  break;
@@ -17819,6 +18608,11 @@ const vertexvis = $root.vertexvis = (() => {
17819
18608
  if (message.jwt != null && message.hasOwnProperty("jwt"))
17820
18609
  if (!$util.isString(message.jwt))
17821
18610
  return "jwt: string expected";
18611
+ if (message.token != null && message.hasOwnProperty("token")) {
18612
+ let error = $root.vertexvis.protobuf.stream.Token.verify(message.token);
18613
+ if (error)
18614
+ return "token." + error;
18615
+ }
17822
18616
  return null;
17823
18617
  };
17824
18618
 
@@ -17836,6 +18630,11 @@ const vertexvis = $root.vertexvis = (() => {
17836
18630
  let message = new $root.vertexvis.protobuf.stream.ReconnectResult();
17837
18631
  if (object.jwt != null)
17838
18632
  message.jwt = String(object.jwt);
18633
+ if (object.token != null) {
18634
+ if (typeof object.token !== "object")
18635
+ throw TypeError(".vertexvis.protobuf.stream.ReconnectResult.token: object expected");
18636
+ message.token = $root.vertexvis.protobuf.stream.Token.fromObject(object.token);
18637
+ }
17839
18638
  return message;
17840
18639
  };
17841
18640
 
@@ -17852,10 +18651,14 @@ const vertexvis = $root.vertexvis = (() => {
17852
18651
  if (!options)
17853
18652
  options = {};
17854
18653
  let object = {};
17855
- if (options.defaults)
18654
+ if (options.defaults) {
17856
18655
  object.jwt = "";
18656
+ object.token = null;
18657
+ }
17857
18658
  if (message.jwt != null && message.hasOwnProperty("jwt"))
17858
18659
  object.jwt = message.jwt;
18660
+ if (message.token != null && message.hasOwnProperty("token"))
18661
+ object.token = $root.vertexvis.protobuf.stream.Token.toObject(message.token, options);
17859
18662
  return object;
17860
18663
  };
17861
18664
 
@@ -19137,6 +19940,166 @@ const vertexvis = $root.vertexvis = (() => {
19137
19940
  return LoadSceneViewStateResult;
19138
19941
  })();
19139
19942
 
19943
+ stream.ResetViewResult = (function() {
19944
+
19945
+ /**
19946
+ * Properties of a ResetViewResult.
19947
+ * @memberof vertexvis.protobuf.stream
19948
+ * @interface IResetViewResult
19949
+ */
19950
+
19951
+ /**
19952
+ * Constructs a new ResetViewResult.
19953
+ * @memberof vertexvis.protobuf.stream
19954
+ * @classdesc Represents a ResetViewResult.
19955
+ * @implements IResetViewResult
19956
+ * @constructor
19957
+ * @param {vertexvis.protobuf.stream.IResetViewResult=} [properties] Properties to set
19958
+ */
19959
+ function ResetViewResult(properties) {
19960
+ if (properties)
19961
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
19962
+ if (properties[keys[i]] != null)
19963
+ this[keys[i]] = properties[keys[i]];
19964
+ }
19965
+
19966
+ /**
19967
+ * Creates a new ResetViewResult instance using the specified properties.
19968
+ * @function create
19969
+ * @memberof vertexvis.protobuf.stream.ResetViewResult
19970
+ * @static
19971
+ * @param {vertexvis.protobuf.stream.IResetViewResult=} [properties] Properties to set
19972
+ * @returns {vertexvis.protobuf.stream.ResetViewResult} ResetViewResult instance
19973
+ */
19974
+ ResetViewResult.create = function create(properties) {
19975
+ return new ResetViewResult(properties);
19976
+ };
19977
+
19978
+ /**
19979
+ * Encodes the specified ResetViewResult message. Does not implicitly {@link vertexvis.protobuf.stream.ResetViewResult.verify|verify} messages.
19980
+ * @function encode
19981
+ * @memberof vertexvis.protobuf.stream.ResetViewResult
19982
+ * @static
19983
+ * @param {vertexvis.protobuf.stream.IResetViewResult} message ResetViewResult message or plain object to encode
19984
+ * @param {$protobuf.Writer} [writer] Writer to encode to
19985
+ * @returns {$protobuf.Writer} Writer
19986
+ */
19987
+ ResetViewResult.encode = function encode(message, writer) {
19988
+ if (!writer)
19989
+ writer = $Writer.create();
19990
+ return writer;
19991
+ };
19992
+
19993
+ /**
19994
+ * Encodes the specified ResetViewResult message, length delimited. Does not implicitly {@link vertexvis.protobuf.stream.ResetViewResult.verify|verify} messages.
19995
+ * @function encodeDelimited
19996
+ * @memberof vertexvis.protobuf.stream.ResetViewResult
19997
+ * @static
19998
+ * @param {vertexvis.protobuf.stream.IResetViewResult} message ResetViewResult message or plain object to encode
19999
+ * @param {$protobuf.Writer} [writer] Writer to encode to
20000
+ * @returns {$protobuf.Writer} Writer
20001
+ */
20002
+ ResetViewResult.encodeDelimited = function encodeDelimited(message, writer) {
20003
+ return this.encode(message, writer).ldelim();
20004
+ };
20005
+
20006
+ /**
20007
+ * Decodes a ResetViewResult message from the specified reader or buffer.
20008
+ * @function decode
20009
+ * @memberof vertexvis.protobuf.stream.ResetViewResult
20010
+ * @static
20011
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
20012
+ * @param {number} [length] Message length if known beforehand
20013
+ * @returns {vertexvis.protobuf.stream.ResetViewResult} ResetViewResult
20014
+ * @throws {Error} If the payload is not a reader or valid buffer
20015
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
20016
+ */
20017
+ ResetViewResult.decode = function decode(reader, length) {
20018
+ if (!(reader instanceof $Reader))
20019
+ reader = $Reader.create(reader);
20020
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vertexvis.protobuf.stream.ResetViewResult();
20021
+ while (reader.pos < end) {
20022
+ let tag = reader.uint32();
20023
+ switch (tag >>> 3) {
20024
+ default:
20025
+ reader.skipType(tag & 7);
20026
+ break;
20027
+ }
20028
+ }
20029
+ return message;
20030
+ };
20031
+
20032
+ /**
20033
+ * Decodes a ResetViewResult message from the specified reader or buffer, length delimited.
20034
+ * @function decodeDelimited
20035
+ * @memberof vertexvis.protobuf.stream.ResetViewResult
20036
+ * @static
20037
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
20038
+ * @returns {vertexvis.protobuf.stream.ResetViewResult} ResetViewResult
20039
+ * @throws {Error} If the payload is not a reader or valid buffer
20040
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
20041
+ */
20042
+ ResetViewResult.decodeDelimited = function decodeDelimited(reader) {
20043
+ if (!(reader instanceof $Reader))
20044
+ reader = new $Reader(reader);
20045
+ return this.decode(reader, reader.uint32());
20046
+ };
20047
+
20048
+ /**
20049
+ * Verifies a ResetViewResult message.
20050
+ * @function verify
20051
+ * @memberof vertexvis.protobuf.stream.ResetViewResult
20052
+ * @static
20053
+ * @param {Object.<string,*>} message Plain object to verify
20054
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
20055
+ */
20056
+ ResetViewResult.verify = function verify(message) {
20057
+ if (typeof message !== "object" || message === null)
20058
+ return "object expected";
20059
+ return null;
20060
+ };
20061
+
20062
+ /**
20063
+ * Creates a ResetViewResult message from a plain object. Also converts values to their respective internal types.
20064
+ * @function fromObject
20065
+ * @memberof vertexvis.protobuf.stream.ResetViewResult
20066
+ * @static
20067
+ * @param {Object.<string,*>} object Plain object
20068
+ * @returns {vertexvis.protobuf.stream.ResetViewResult} ResetViewResult
20069
+ */
20070
+ ResetViewResult.fromObject = function fromObject(object) {
20071
+ if (object instanceof $root.vertexvis.protobuf.stream.ResetViewResult)
20072
+ return object;
20073
+ return new $root.vertexvis.protobuf.stream.ResetViewResult();
20074
+ };
20075
+
20076
+ /**
20077
+ * Creates a plain object from a ResetViewResult message. Also converts values to other types if specified.
20078
+ * @function toObject
20079
+ * @memberof vertexvis.protobuf.stream.ResetViewResult
20080
+ * @static
20081
+ * @param {vertexvis.protobuf.stream.ResetViewResult} message ResetViewResult
20082
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
20083
+ * @returns {Object.<string,*>} Plain object
20084
+ */
20085
+ ResetViewResult.toObject = function toObject() {
20086
+ return {};
20087
+ };
20088
+
20089
+ /**
20090
+ * Converts this ResetViewResult to JSON.
20091
+ * @function toJSON
20092
+ * @memberof vertexvis.protobuf.stream.ResetViewResult
20093
+ * @instance
20094
+ * @returns {Object.<string,*>} JSON object
20095
+ */
20096
+ ResetViewResult.prototype.toJSON = function toJSON() {
20097
+ return this.constructor.toObject(this, minimal.util.toJSONOptions);
20098
+ };
20099
+
20100
+ return ResetViewResult;
20101
+ })();
20102
+
19140
20103
  stream.GetStencilBufferResult = (function() {
19141
20104
 
19142
20105
  /**
@@ -19145,6 +20108,7 @@ const vertexvis = $root.vertexvis = (() => {
19145
20108
  * @interface IGetStencilBufferResult
19146
20109
  * @property {Uint8Array|null} [stencilBuffer] GetStencilBufferResult stencilBuffer
19147
20110
  * @property {vertexvis.protobuf.stream.IImageAttributes|null} [imageAttributes] GetStencilBufferResult imageAttributes
20111
+ * @property {google.protobuf.IBytesValue|null} [depthBuffer] GetStencilBufferResult depthBuffer
19148
20112
  */
19149
20113
 
19150
20114
  /**
@@ -19178,6 +20142,14 @@ const vertexvis = $root.vertexvis = (() => {
19178
20142
  */
19179
20143
  GetStencilBufferResult.prototype.imageAttributes = null;
19180
20144
 
20145
+ /**
20146
+ * GetStencilBufferResult depthBuffer.
20147
+ * @member {google.protobuf.IBytesValue|null|undefined} depthBuffer
20148
+ * @memberof vertexvis.protobuf.stream.GetStencilBufferResult
20149
+ * @instance
20150
+ */
20151
+ GetStencilBufferResult.prototype.depthBuffer = null;
20152
+
19181
20153
  /**
19182
20154
  * Creates a new GetStencilBufferResult instance using the specified properties.
19183
20155
  * @function create
@@ -19206,6 +20178,8 @@ const vertexvis = $root.vertexvis = (() => {
19206
20178
  writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.stencilBuffer);
19207
20179
  if (message.imageAttributes != null && Object.hasOwnProperty.call(message, "imageAttributes"))
19208
20180
  $root.vertexvis.protobuf.stream.ImageAttributes.encode(message.imageAttributes, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
20181
+ if (message.depthBuffer != null && Object.hasOwnProperty.call(message, "depthBuffer"))
20182
+ $root.google.protobuf.BytesValue.encode(message.depthBuffer, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
19209
20183
  return writer;
19210
20184
  };
19211
20185
 
@@ -19246,6 +20220,9 @@ const vertexvis = $root.vertexvis = (() => {
19246
20220
  case 2:
19247
20221
  message.imageAttributes = $root.vertexvis.protobuf.stream.ImageAttributes.decode(reader, reader.uint32());
19248
20222
  break;
20223
+ case 3:
20224
+ message.depthBuffer = $root.google.protobuf.BytesValue.decode(reader, reader.uint32());
20225
+ break;
19249
20226
  default:
19250
20227
  reader.skipType(tag & 7);
19251
20228
  break;
@@ -19289,6 +20266,11 @@ const vertexvis = $root.vertexvis = (() => {
19289
20266
  if (error)
19290
20267
  return "imageAttributes." + error;
19291
20268
  }
20269
+ if (message.depthBuffer != null && message.hasOwnProperty("depthBuffer")) {
20270
+ let error = $root.google.protobuf.BytesValue.verify(message.depthBuffer);
20271
+ if (error)
20272
+ return "depthBuffer." + error;
20273
+ }
19292
20274
  return null;
19293
20275
  };
19294
20276
 
@@ -19314,6 +20296,11 @@ const vertexvis = $root.vertexvis = (() => {
19314
20296
  throw TypeError(".vertexvis.protobuf.stream.GetStencilBufferResult.imageAttributes: object expected");
19315
20297
  message.imageAttributes = $root.vertexvis.protobuf.stream.ImageAttributes.fromObject(object.imageAttributes);
19316
20298
  }
20299
+ if (object.depthBuffer != null) {
20300
+ if (typeof object.depthBuffer !== "object")
20301
+ throw TypeError(".vertexvis.protobuf.stream.GetStencilBufferResult.depthBuffer: object expected");
20302
+ message.depthBuffer = $root.google.protobuf.BytesValue.fromObject(object.depthBuffer);
20303
+ }
19317
20304
  return message;
19318
20305
  };
19319
20306
 
@@ -19339,11 +20326,14 @@ const vertexvis = $root.vertexvis = (() => {
19339
20326
  object.stencilBuffer = $util.newBuffer(object.stencilBuffer);
19340
20327
  }
19341
20328
  object.imageAttributes = null;
20329
+ object.depthBuffer = null;
19342
20330
  }
19343
20331
  if (message.stencilBuffer != null && message.hasOwnProperty("stencilBuffer"))
19344
20332
  object.stencilBuffer = options.bytes === String ? $util.base64.encode(message.stencilBuffer, 0, message.stencilBuffer.length) : options.bytes === Array ? Array.prototype.slice.call(message.stencilBuffer) : message.stencilBuffer;
19345
20333
  if (message.imageAttributes != null && message.hasOwnProperty("imageAttributes"))
19346
20334
  object.imageAttributes = $root.vertexvis.protobuf.stream.ImageAttributes.toObject(message.imageAttributes, options);
20335
+ if (message.depthBuffer != null && message.hasOwnProperty("depthBuffer"))
20336
+ object.depthBuffer = $root.google.protobuf.BytesValue.toObject(message.depthBuffer, options);
19347
20337
  return object;
19348
20338
  };
19349
20339
 
@@ -19361,6 +20351,198 @@ const vertexvis = $root.vertexvis = (() => {
19361
20351
  return GetStencilBufferResult;
19362
20352
  })();
19363
20353
 
20354
+ stream.RefreshTokenResult = (function() {
20355
+
20356
+ /**
20357
+ * Properties of a RefreshTokenResult.
20358
+ * @memberof vertexvis.protobuf.stream
20359
+ * @interface IRefreshTokenResult
20360
+ * @property {vertexvis.protobuf.stream.IToken|null} [token] RefreshTokenResult token
20361
+ */
20362
+
20363
+ /**
20364
+ * Constructs a new RefreshTokenResult.
20365
+ * @memberof vertexvis.protobuf.stream
20366
+ * @classdesc Represents a RefreshTokenResult.
20367
+ * @implements IRefreshTokenResult
20368
+ * @constructor
20369
+ * @param {vertexvis.protobuf.stream.IRefreshTokenResult=} [properties] Properties to set
20370
+ */
20371
+ function RefreshTokenResult(properties) {
20372
+ if (properties)
20373
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
20374
+ if (properties[keys[i]] != null)
20375
+ this[keys[i]] = properties[keys[i]];
20376
+ }
20377
+
20378
+ /**
20379
+ * RefreshTokenResult token.
20380
+ * @member {vertexvis.protobuf.stream.IToken|null|undefined} token
20381
+ * @memberof vertexvis.protobuf.stream.RefreshTokenResult
20382
+ * @instance
20383
+ */
20384
+ RefreshTokenResult.prototype.token = null;
20385
+
20386
+ /**
20387
+ * Creates a new RefreshTokenResult instance using the specified properties.
20388
+ * @function create
20389
+ * @memberof vertexvis.protobuf.stream.RefreshTokenResult
20390
+ * @static
20391
+ * @param {vertexvis.protobuf.stream.IRefreshTokenResult=} [properties] Properties to set
20392
+ * @returns {vertexvis.protobuf.stream.RefreshTokenResult} RefreshTokenResult instance
20393
+ */
20394
+ RefreshTokenResult.create = function create(properties) {
20395
+ return new RefreshTokenResult(properties);
20396
+ };
20397
+
20398
+ /**
20399
+ * Encodes the specified RefreshTokenResult message. Does not implicitly {@link vertexvis.protobuf.stream.RefreshTokenResult.verify|verify} messages.
20400
+ * @function encode
20401
+ * @memberof vertexvis.protobuf.stream.RefreshTokenResult
20402
+ * @static
20403
+ * @param {vertexvis.protobuf.stream.IRefreshTokenResult} message RefreshTokenResult message or plain object to encode
20404
+ * @param {$protobuf.Writer} [writer] Writer to encode to
20405
+ * @returns {$protobuf.Writer} Writer
20406
+ */
20407
+ RefreshTokenResult.encode = function encode(message, writer) {
20408
+ if (!writer)
20409
+ writer = $Writer.create();
20410
+ if (message.token != null && Object.hasOwnProperty.call(message, "token"))
20411
+ $root.vertexvis.protobuf.stream.Token.encode(message.token, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
20412
+ return writer;
20413
+ };
20414
+
20415
+ /**
20416
+ * Encodes the specified RefreshTokenResult message, length delimited. Does not implicitly {@link vertexvis.protobuf.stream.RefreshTokenResult.verify|verify} messages.
20417
+ * @function encodeDelimited
20418
+ * @memberof vertexvis.protobuf.stream.RefreshTokenResult
20419
+ * @static
20420
+ * @param {vertexvis.protobuf.stream.IRefreshTokenResult} message RefreshTokenResult message or plain object to encode
20421
+ * @param {$protobuf.Writer} [writer] Writer to encode to
20422
+ * @returns {$protobuf.Writer} Writer
20423
+ */
20424
+ RefreshTokenResult.encodeDelimited = function encodeDelimited(message, writer) {
20425
+ return this.encode(message, writer).ldelim();
20426
+ };
20427
+
20428
+ /**
20429
+ * Decodes a RefreshTokenResult message from the specified reader or buffer.
20430
+ * @function decode
20431
+ * @memberof vertexvis.protobuf.stream.RefreshTokenResult
20432
+ * @static
20433
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
20434
+ * @param {number} [length] Message length if known beforehand
20435
+ * @returns {vertexvis.protobuf.stream.RefreshTokenResult} RefreshTokenResult
20436
+ * @throws {Error} If the payload is not a reader or valid buffer
20437
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
20438
+ */
20439
+ RefreshTokenResult.decode = function decode(reader, length) {
20440
+ if (!(reader instanceof $Reader))
20441
+ reader = $Reader.create(reader);
20442
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vertexvis.protobuf.stream.RefreshTokenResult();
20443
+ while (reader.pos < end) {
20444
+ let tag = reader.uint32();
20445
+ switch (tag >>> 3) {
20446
+ case 1:
20447
+ message.token = $root.vertexvis.protobuf.stream.Token.decode(reader, reader.uint32());
20448
+ break;
20449
+ default:
20450
+ reader.skipType(tag & 7);
20451
+ break;
20452
+ }
20453
+ }
20454
+ return message;
20455
+ };
20456
+
20457
+ /**
20458
+ * Decodes a RefreshTokenResult message from the specified reader or buffer, length delimited.
20459
+ * @function decodeDelimited
20460
+ * @memberof vertexvis.protobuf.stream.RefreshTokenResult
20461
+ * @static
20462
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
20463
+ * @returns {vertexvis.protobuf.stream.RefreshTokenResult} RefreshTokenResult
20464
+ * @throws {Error} If the payload is not a reader or valid buffer
20465
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
20466
+ */
20467
+ RefreshTokenResult.decodeDelimited = function decodeDelimited(reader) {
20468
+ if (!(reader instanceof $Reader))
20469
+ reader = new $Reader(reader);
20470
+ return this.decode(reader, reader.uint32());
20471
+ };
20472
+
20473
+ /**
20474
+ * Verifies a RefreshTokenResult message.
20475
+ * @function verify
20476
+ * @memberof vertexvis.protobuf.stream.RefreshTokenResult
20477
+ * @static
20478
+ * @param {Object.<string,*>} message Plain object to verify
20479
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
20480
+ */
20481
+ RefreshTokenResult.verify = function verify(message) {
20482
+ if (typeof message !== "object" || message === null)
20483
+ return "object expected";
20484
+ if (message.token != null && message.hasOwnProperty("token")) {
20485
+ let error = $root.vertexvis.protobuf.stream.Token.verify(message.token);
20486
+ if (error)
20487
+ return "token." + error;
20488
+ }
20489
+ return null;
20490
+ };
20491
+
20492
+ /**
20493
+ * Creates a RefreshTokenResult message from a plain object. Also converts values to their respective internal types.
20494
+ * @function fromObject
20495
+ * @memberof vertexvis.protobuf.stream.RefreshTokenResult
20496
+ * @static
20497
+ * @param {Object.<string,*>} object Plain object
20498
+ * @returns {vertexvis.protobuf.stream.RefreshTokenResult} RefreshTokenResult
20499
+ */
20500
+ RefreshTokenResult.fromObject = function fromObject(object) {
20501
+ if (object instanceof $root.vertexvis.protobuf.stream.RefreshTokenResult)
20502
+ return object;
20503
+ let message = new $root.vertexvis.protobuf.stream.RefreshTokenResult();
20504
+ if (object.token != null) {
20505
+ if (typeof object.token !== "object")
20506
+ throw TypeError(".vertexvis.protobuf.stream.RefreshTokenResult.token: object expected");
20507
+ message.token = $root.vertexvis.protobuf.stream.Token.fromObject(object.token);
20508
+ }
20509
+ return message;
20510
+ };
20511
+
20512
+ /**
20513
+ * Creates a plain object from a RefreshTokenResult message. Also converts values to other types if specified.
20514
+ * @function toObject
20515
+ * @memberof vertexvis.protobuf.stream.RefreshTokenResult
20516
+ * @static
20517
+ * @param {vertexvis.protobuf.stream.RefreshTokenResult} message RefreshTokenResult
20518
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
20519
+ * @returns {Object.<string,*>} Plain object
20520
+ */
20521
+ RefreshTokenResult.toObject = function toObject(message, options) {
20522
+ if (!options)
20523
+ options = {};
20524
+ let object = {};
20525
+ if (options.defaults)
20526
+ object.token = null;
20527
+ if (message.token != null && message.hasOwnProperty("token"))
20528
+ object.token = $root.vertexvis.protobuf.stream.Token.toObject(message.token, options);
20529
+ return object;
20530
+ };
20531
+
20532
+ /**
20533
+ * Converts this RefreshTokenResult to JSON.
20534
+ * @function toJSON
20535
+ * @memberof vertexvis.protobuf.stream.RefreshTokenResult
20536
+ * @instance
20537
+ * @returns {Object.<string,*>} JSON object
20538
+ */
20539
+ RefreshTokenResult.prototype.toJSON = function toJSON() {
20540
+ return this.constructor.toObject(this, minimal.util.toJSONOptions);
20541
+ };
20542
+
20543
+ return RefreshTokenResult;
20544
+ })();
20545
+
19364
20546
  stream.StreamEvent = (function() {
19365
20547
 
19366
20548
  /**
@@ -31272,6 +32454,23 @@ function decode(bufferOrBytes) {
31272
32454
  });
31273
32455
  }
31274
32456
 
32457
+ var StreamRequestError = /** @class */ (function (_super) {
32458
+ __extends(StreamRequestError, _super);
32459
+ function StreamRequestError(requestId, requestPayload, summary, details) {
32460
+ var _this = _super.call(this, summary != null && summary.length > 0
32461
+ ? "Stream request failed (" + summary + ")"
32462
+ : 'Stream request failed') || this;
32463
+ _this.requestId = requestId;
32464
+ _this.requestPayload = requestPayload;
32465
+ _this.summary = summary;
32466
+ _this.details = details;
32467
+ // Allows for `instanceof` checks. See https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes#extending-built-ins-like-error-array-and-map-may-no-longer-work
32468
+ Object.setPrototypeOf(_this, StreamRequestError.prototype);
32469
+ return _this;
32470
+ }
32471
+ return StreamRequestError;
32472
+ }(Error));
32473
+
31275
32474
  var WebSocketClientImpl = /** @class */ (function () {
31276
32475
  function WebSocketClientImpl() {
31277
32476
  var _this = this;
@@ -32719,21 +33918,6 @@ function parseEpochMillis(millis) {
32719
33918
  return { seconds: seconds * (millis < 0 ? -1 : 1), nanos: nanos };
32720
33919
  }
32721
33920
 
32722
- var StreamRequestError = /** @class */ (function (_super) {
32723
- __extends(StreamRequestError, _super);
32724
- function StreamRequestError(requestId, requestPayload, summary, details) {
32725
- var _this = _super.call(this, summary != null && summary.length > 0
32726
- ? "Stream request failed (" + summary + ")"
32727
- : 'Stream request failed') || this;
32728
- _this.requestId = requestId;
32729
- _this.requestPayload = requestPayload;
32730
- _this.summary = summary;
32731
- _this.details = details;
32732
- return _this;
32733
- }
32734
- return StreamRequestError;
32735
- }(Error));
32736
-
32737
33921
  function defineParams() {
32738
33922
  var definitions = [];
32739
33923
  for (var _i = 0; _i < arguments.length; _i++) {
@@ -32805,14 +33989,17 @@ function defineSettings(getter, defaults, builder) {
32805
33989
  * The API client to interact with Vertex's streaming API.
32806
33990
  */
32807
33991
  var StreamApi = /** @class */ (function () {
32808
- function StreamApi(websocket, loggingEnabled) {
33992
+ function StreamApi(websocket, opts) {
32809
33993
  if (websocket === void 0) { websocket = new WebSocketClientImpl(); }
32810
- if (loggingEnabled === void 0) { loggingEnabled = false; }
33994
+ if (opts === void 0) { opts = {}; }
33995
+ var _a;
32811
33996
  this.websocket = websocket;
32812
- this.loggingEnabled = loggingEnabled;
32813
33997
  this.onResponseDispatcher = new EventDispatcher();
32814
33998
  this.onRequestDispatcher = new EventDispatcher();
32815
33999
  this.onEventDispatcher = new EventDispatcher();
34000
+ this.opts = {
34001
+ loggingEnabled: (_a = opts.loggingEnabled) !== null && _a !== void 0 ? _a : false,
34002
+ };
32816
34003
  }
32817
34004
  /**
32818
34005
  * Initiates a websocket connection to Vertex's streaming API. Returns a
@@ -32869,6 +34056,14 @@ var StreamApi = /** @class */ (function () {
32869
34056
  StreamApi.prototype.onEvent = function (handler) {
32870
34057
  return this.onEventDispatcher.on(handler);
32871
34058
  };
34059
+ /**
34060
+ * Adds a callback that is invoked when the websocket connection is closed.
34061
+ *
34062
+ * @param handler A handler function.
34063
+ */
34064
+ StreamApi.prototype.onClose = function (handler) {
34065
+ return this.websocket.onClose(handler);
34066
+ };
32872
34067
  /**
32873
34068
  * Sends a request to initiate a streaming session.
32874
34069
  *
@@ -33050,6 +34245,22 @@ var StreamApi = /** @class */ (function () {
33050
34245
  if (withResponse === void 0) { withResponse = true; }
33051
34246
  return this.sendRequest({ createSceneAlteration: payload }, withResponse);
33052
34247
  };
34248
+ /**
34249
+ * Sends a request to reset all overrides for a given scene and optionally to
34250
+ * reset the camera to that of the base scene.
34251
+ *
34252
+ * Use `withResponse` to indicate if the server should reply with a response.
34253
+ * If `false`, the returned promise will complete immediately. Otherwise,
34254
+ * it'll complete when a response is received.
34255
+ *
34256
+ * @param payload The payload of the request.
34257
+ * @param withResponse Indicates if the server should reply with a response.
34258
+ * Defaults to `true`.
34259
+ */
34260
+ StreamApi.prototype.resetSceneView = function (payload, withResponse) {
34261
+ if (withResponse === void 0) { withResponse = true; }
34262
+ return this.sendRequest({ resetView: payload }, withResponse);
34263
+ };
33053
34264
  /**
33054
34265
  * Sends a request to tell the rendering pipeline that an interaction has
33055
34266
  * ended.
@@ -33115,8 +34326,20 @@ var StreamApi = /** @class */ (function () {
33115
34326
  /**
33116
34327
  * Sends a request to get a stencil buffer image for the current scene view.
33117
34328
  */
33118
- StreamApi.prototype.getStencilBuffer = function (withResponse) {
33119
- return this.sendRequest({ getStencilBuffer: {} }, true);
34329
+ StreamApi.prototype.getStencilBuffer = function (payload, withResponse) {
34330
+ if (withResponse === void 0) { withResponse = true; }
34331
+ return this.sendRequest({ getStencilBuffer: payload }, withResponse);
34332
+ };
34333
+ /**
34334
+ * Sends a request to retrieve a new token. This token can be used to
34335
+ * authenticate with other Vertex services.
34336
+ *
34337
+ * @param withResponse Indicates if the server should reply with a response.
34338
+ * @returns A promise that completes with the refreshed token.
34339
+ */
34340
+ StreamApi.prototype.refreshToken = function (withResponse) {
34341
+ if (withResponse === void 0) { withResponse = true; }
34342
+ return this.sendRequest({ refreshToken: {} }, withResponse);
33120
34343
  };
33121
34344
  /**
33122
34345
  * Acknowledges a successful request by sending a reply back to the server
@@ -33169,7 +34392,7 @@ var StreamApi = /** @class */ (function () {
33169
34392
  for (var _i = 1; _i < arguments.length; _i++) {
33170
34393
  other[_i - 1] = arguments[_i];
33171
34394
  }
33172
- if (this.loggingEnabled) {
34395
+ if (this.opts.loggingEnabled) {
33173
34396
  console.debug.apply(console, __spreadArray([msg], other, false));
33174
34397
  }
33175
34398
  };
@@ -33210,6 +34433,23 @@ var StreamApi = /** @class */ (function () {
33210
34433
  return StreamApi;
33211
34434
  }());
33212
34435
 
34436
+ function event(req, meta) {
34437
+ return __assign({ sentAtTime: currentDateAsProtoTimestamp(), event: __assign({}, req) }, meta);
34438
+ }
34439
+ function animationCompleted(id) {
34440
+ var def = {
34441
+ animationId: { hex: id },
34442
+ };
34443
+ return event({
34444
+ animationCompleted: __assign({}, def),
34445
+ });
34446
+ }
34447
+
34448
+ var events = /*#__PURE__*/Object.freeze({
34449
+ __proto__: null,
34450
+ animationCompleted: animationCompleted
34451
+ });
34452
+
33213
34453
  function request(req, meta) {
33214
34454
  return __assign(__assign({ sentAtTime: currentDateAsProtoTimestamp() }, meta), { request: __assign({ requestId: req.requestId != null ? { value: req.requestId } : undefined }, req.payload) });
33215
34455
  }
@@ -33256,7 +34496,7 @@ function gracefulReconnect(req, meta) {
33256
34496
  };
33257
34497
  return request({
33258
34498
  requestId: req.requestId,
33259
- payload: { reconnect: Objects.defaults(req.payload, def) },
34499
+ payload: { gracefulReconnection: Objects.defaults(req.payload, def) },
33260
34500
  }, meta);
33261
34501
  }
33262
34502
 
@@ -33266,44 +34506,102 @@ var requests = /*#__PURE__*/Object.freeze({
33266
34506
  gracefulReconnect: gracefulReconnect
33267
34507
  });
33268
34508
 
33269
- function event(req, meta) {
33270
- return __assign({ sentAtTime: currentDateAsProtoTimestamp(), event: __assign({}, req) }, meta);
34509
+ function response(res, meta) {
34510
+ return __assign(__assign({ sentAtTime: currentDateAsProtoTimestamp() }, meta), { response: __assign({ requestId: res.requestId != null ? { value: res.requestId } : undefined }, res.result) });
33271
34511
  }
33272
- function animationCompleted(id) {
34512
+ function startStream(res, meta) {
34513
+ if (res === void 0) { res = {}; }
33273
34514
  var def = {
33274
- animationId: { hex: id },
34515
+ streamId: { hex: UUID.create() },
34516
+ sceneViewId: { hex: UUID.create() },
34517
+ sessionId: { hex: UUID.create() },
34518
+ jwt: 'jwt',
34519
+ token: { token: 'token', expiresIn: new Date().getTime() + 10000 },
34520
+ worldOrientation: {
34521
+ front: { x: 0, y: 0, z: 1 },
34522
+ up: { x: 0, y: 1, z: 0 },
34523
+ },
33275
34524
  };
33276
- return event({
33277
- animationCompleted: __assign({}, def),
34525
+ return response({
34526
+ requestId: res.requestId,
34527
+ result: { startStream: Objects.defaults(res.result, def) },
34528
+ }, meta);
34529
+ }
34530
+ function syncTime(res, meta) {
34531
+ if (res === void 0) { res = {}; }
34532
+ var def = { replyTime: { seconds: 1, nanos: 0 } };
34533
+ return response({
34534
+ requestId: res.requestId,
34535
+ result: { syncTime: Objects.defaults(res.result, def) },
33278
34536
  });
34537
+ }
34538
+ function reconnect(res, meta) {
34539
+ if (res === void 0) { res = {}; }
34540
+ var def = {
34541
+ jwt: 'jwt',
34542
+ token: { token: 'token', expiresIn: new Date().getTime() + 10000 },
34543
+ };
34544
+ return response({
34545
+ requestId: res.requestId,
34546
+ result: { reconnect: Objects.defaults(res.result, def) },
34547
+ }, meta);
34548
+ }
34549
+ function loadSceneViewState(res, meta) {
34550
+ if (res === void 0) { res = {}; }
34551
+ var def = {};
34552
+ return response({
34553
+ requestId: res.requestId,
34554
+ result: { loadSceneViewState: Objects.defaults(res.result, def) },
34555
+ }, meta);
34556
+ }
34557
+ function refreshToken(res, meta) {
34558
+ if (res === void 0) { res = {}; }
34559
+ var def = {
34560
+ token: { token: 'token', expiresIn: new Date().getTime() + 10000 },
34561
+ };
34562
+ return response({
34563
+ requestId: res.requestId,
34564
+ result: { refreshToken: Objects.defaults(res.result, def) },
34565
+ }, meta);
33279
34566
  }
33280
34567
 
33281
- var events = /*#__PURE__*/Object.freeze({
34568
+ var responses = /*#__PURE__*/Object.freeze({
33282
34569
  __proto__: null,
33283
- animationCompleted: animationCompleted
34570
+ startStream: startStream,
34571
+ syncTime: syncTime,
34572
+ reconnect: reconnect,
34573
+ loadSceneViewState: loadSceneViewState,
34574
+ refreshToken: refreshToken
33284
34575
  });
33285
34576
 
33286
34577
  var index = /*#__PURE__*/Object.freeze({
33287
34578
  __proto__: null,
34579
+ Events: events,
33288
34580
  Requests: requests,
33289
- Events: events
34581
+ Responses: responses
33290
34582
  });
33291
34583
 
33292
34584
  var WebSocketClientMock = /** @class */ (function () {
33293
34585
  function WebSocketClientMock() {
33294
- this.handlers = new Set();
34586
+ this.closeHandlers = new Set();
34587
+ this.msgHandlers = new Set();
33295
34588
  this.sentMessages = new Array();
33296
34589
  }
33297
34590
  WebSocketClientMock.prototype.close = function () {
33298
- // NOOP
34591
+ this.closeHandlers.forEach(function (handler) { return handler(new CloseEvent('close')); });
33299
34592
  };
33300
34593
  WebSocketClientMock.prototype.connect = function (descriptor) {
33301
34594
  return Promise.resolve();
33302
34595
  };
34596
+ WebSocketClientMock.prototype.onClose = function (handler) {
34597
+ var _this = this;
34598
+ this.closeHandlers.add(handler);
34599
+ return { dispose: function () { return _this.closeHandlers.delete(handler); } };
34600
+ };
33303
34601
  WebSocketClientMock.prototype.onMessage = function (handler) {
33304
34602
  var _this = this;
33305
- this.handlers.add(handler);
33306
- return { dispose: function () { return _this.handlers.delete(handler); } };
34603
+ this.msgHandlers.add(handler);
34604
+ return { dispose: function () { return _this.msgHandlers.delete(handler); } };
33307
34605
  };
33308
34606
  WebSocketClientMock.prototype.send = function (data) {
33309
34607
  this.sentMessages.push(data);
@@ -33318,7 +34616,7 @@ var WebSocketClientMock = /** @class */ (function () {
33318
34616
  * @param data The websocket message data.
33319
34617
  */
33320
34618
  WebSocketClientMock.prototype.receiveMessage = function (data) {
33321
- this.handlers.forEach(function (handler) {
34619
+ this.msgHandlers.forEach(function (handler) {
33322
34620
  return handler(new MessageEvent('message', { data: data }));
33323
34621
  });
33324
34622
  };
@@ -33328,7 +34626,8 @@ var WebSocketClientMock = /** @class */ (function () {
33328
34626
  */
33329
34627
  WebSocketClientMock.prototype.reset = function () {
33330
34628
  this.sentMessages = [];
33331
- this.handlers.clear();
34629
+ this.msgHandlers.clear();
34630
+ this.closeHandlers.clear();
33332
34631
  };
33333
34632
  /**
33334
34633
  * Returns `true` if there are remaining sent messages..
@@ -33381,5 +34680,5 @@ var WebSocketClientMock = /** @class */ (function () {
33381
34680
  return WebSocketClientMock;
33382
34681
  }());
33383
34682
 
33384
- export { index as Fixtures, StreamApi, WebSocketClientImpl, WebSocketClientMock, currentDateAsProtoTimestamp, decode, encode, protoToDate, toProtoDuration, toProtoTimestamp };
34683
+ export { index as Fixtures, StreamApi, StreamRequestError, WebSocketClientImpl, WebSocketClientMock, currentDateAsProtoTimestamp, decode, encode, protoToDate, toProtoDuration, toProtoTimestamp };
33385
34684
  //# sourceMappingURL=bundle.esm.js.map