@vertexvis/stream-api 0.21.0-canary.0 → 0.21.0-canary.2

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.
@@ -7867,6 +7867,193 @@ const vertexvis = $root.vertexvis = (() => {
7867
7867
  return SelectionQuery;
7868
7868
  })();
7869
7869
 
7870
+ stream.VisibilityQuery = (function() {
7871
+
7872
+ /**
7873
+ * Properties of a VisibilityQuery.
7874
+ * @memberof vertexvis.protobuf.stream
7875
+ * @interface IVisibilityQuery
7876
+ * @property {boolean|null} [visibilityState] VisibilityQuery visibilityState
7877
+ */
7878
+
7879
+ /**
7880
+ * Constructs a new VisibilityQuery.
7881
+ * @memberof vertexvis.protobuf.stream
7882
+ * @classdesc Represents a VisibilityQuery.
7883
+ * @implements IVisibilityQuery
7884
+ * @constructor
7885
+ * @param {vertexvis.protobuf.stream.IVisibilityQuery=} [properties] Properties to set
7886
+ */
7887
+ function VisibilityQuery(properties) {
7888
+ if (properties)
7889
+ for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
7890
+ if (properties[keys[i]] != null)
7891
+ this[keys[i]] = properties[keys[i]];
7892
+ }
7893
+
7894
+ /**
7895
+ * VisibilityQuery visibilityState.
7896
+ * @member {boolean} visibilityState
7897
+ * @memberof vertexvis.protobuf.stream.VisibilityQuery
7898
+ * @instance
7899
+ */
7900
+ VisibilityQuery.prototype.visibilityState = false;
7901
+
7902
+ /**
7903
+ * Creates a new VisibilityQuery instance using the specified properties.
7904
+ * @function create
7905
+ * @memberof vertexvis.protobuf.stream.VisibilityQuery
7906
+ * @static
7907
+ * @param {vertexvis.protobuf.stream.IVisibilityQuery=} [properties] Properties to set
7908
+ * @returns {vertexvis.protobuf.stream.VisibilityQuery} VisibilityQuery instance
7909
+ */
7910
+ VisibilityQuery.create = function create(properties) {
7911
+ return new VisibilityQuery(properties);
7912
+ };
7913
+
7914
+ /**
7915
+ * Encodes the specified VisibilityQuery message. Does not implicitly {@link vertexvis.protobuf.stream.VisibilityQuery.verify|verify} messages.
7916
+ * @function encode
7917
+ * @memberof vertexvis.protobuf.stream.VisibilityQuery
7918
+ * @static
7919
+ * @param {vertexvis.protobuf.stream.IVisibilityQuery} message VisibilityQuery message or plain object to encode
7920
+ * @param {$protobuf.Writer} [writer] Writer to encode to
7921
+ * @returns {$protobuf.Writer} Writer
7922
+ */
7923
+ VisibilityQuery.encode = function encode(message, writer) {
7924
+ if (!writer)
7925
+ writer = $Writer.create();
7926
+ if (message.visibilityState != null && Object.hasOwnProperty.call(message, "visibilityState"))
7927
+ writer.uint32(/* id 1, wireType 0 =*/8).bool(message.visibilityState);
7928
+ return writer;
7929
+ };
7930
+
7931
+ /**
7932
+ * Encodes the specified VisibilityQuery message, length delimited. Does not implicitly {@link vertexvis.protobuf.stream.VisibilityQuery.verify|verify} messages.
7933
+ * @function encodeDelimited
7934
+ * @memberof vertexvis.protobuf.stream.VisibilityQuery
7935
+ * @static
7936
+ * @param {vertexvis.protobuf.stream.IVisibilityQuery} message VisibilityQuery message or plain object to encode
7937
+ * @param {$protobuf.Writer} [writer] Writer to encode to
7938
+ * @returns {$protobuf.Writer} Writer
7939
+ */
7940
+ VisibilityQuery.encodeDelimited = function encodeDelimited(message, writer) {
7941
+ return this.encode(message, writer).ldelim();
7942
+ };
7943
+
7944
+ /**
7945
+ * Decodes a VisibilityQuery message from the specified reader or buffer.
7946
+ * @function decode
7947
+ * @memberof vertexvis.protobuf.stream.VisibilityQuery
7948
+ * @static
7949
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
7950
+ * @param {number} [length] Message length if known beforehand
7951
+ * @returns {vertexvis.protobuf.stream.VisibilityQuery} VisibilityQuery
7952
+ * @throws {Error} If the payload is not a reader or valid buffer
7953
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
7954
+ */
7955
+ VisibilityQuery.decode = function decode(reader, length) {
7956
+ if (!(reader instanceof $Reader))
7957
+ reader = $Reader.create(reader);
7958
+ let end = length === undefined ? reader.len : reader.pos + length, message = new $root.vertexvis.protobuf.stream.VisibilityQuery();
7959
+ while (reader.pos < end) {
7960
+ let tag = reader.uint32();
7961
+ switch (tag >>> 3) {
7962
+ case 1:
7963
+ message.visibilityState = reader.bool();
7964
+ break;
7965
+ default:
7966
+ reader.skipType(tag & 7);
7967
+ break;
7968
+ }
7969
+ }
7970
+ return message;
7971
+ };
7972
+
7973
+ /**
7974
+ * Decodes a VisibilityQuery message from the specified reader or buffer, length delimited.
7975
+ * @function decodeDelimited
7976
+ * @memberof vertexvis.protobuf.stream.VisibilityQuery
7977
+ * @static
7978
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
7979
+ * @returns {vertexvis.protobuf.stream.VisibilityQuery} VisibilityQuery
7980
+ * @throws {Error} If the payload is not a reader or valid buffer
7981
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
7982
+ */
7983
+ VisibilityQuery.decodeDelimited = function decodeDelimited(reader) {
7984
+ if (!(reader instanceof $Reader))
7985
+ reader = new $Reader(reader);
7986
+ return this.decode(reader, reader.uint32());
7987
+ };
7988
+
7989
+ /**
7990
+ * Verifies a VisibilityQuery message.
7991
+ * @function verify
7992
+ * @memberof vertexvis.protobuf.stream.VisibilityQuery
7993
+ * @static
7994
+ * @param {Object.<string,*>} message Plain object to verify
7995
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
7996
+ */
7997
+ VisibilityQuery.verify = function verify(message) {
7998
+ if (typeof message !== "object" || message === null)
7999
+ return "object expected";
8000
+ if (message.visibilityState != null && message.hasOwnProperty("visibilityState"))
8001
+ if (typeof message.visibilityState !== "boolean")
8002
+ return "visibilityState: boolean expected";
8003
+ return null;
8004
+ };
8005
+
8006
+ /**
8007
+ * Creates a VisibilityQuery message from a plain object. Also converts values to their respective internal types.
8008
+ * @function fromObject
8009
+ * @memberof vertexvis.protobuf.stream.VisibilityQuery
8010
+ * @static
8011
+ * @param {Object.<string,*>} object Plain object
8012
+ * @returns {vertexvis.protobuf.stream.VisibilityQuery} VisibilityQuery
8013
+ */
8014
+ VisibilityQuery.fromObject = function fromObject(object) {
8015
+ if (object instanceof $root.vertexvis.protobuf.stream.VisibilityQuery)
8016
+ return object;
8017
+ let message = new $root.vertexvis.protobuf.stream.VisibilityQuery();
8018
+ if (object.visibilityState != null)
8019
+ message.visibilityState = Boolean(object.visibilityState);
8020
+ return message;
8021
+ };
8022
+
8023
+ /**
8024
+ * Creates a plain object from a VisibilityQuery message. Also converts values to other types if specified.
8025
+ * @function toObject
8026
+ * @memberof vertexvis.protobuf.stream.VisibilityQuery
8027
+ * @static
8028
+ * @param {vertexvis.protobuf.stream.VisibilityQuery} message VisibilityQuery
8029
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
8030
+ * @returns {Object.<string,*>} Plain object
8031
+ */
8032
+ VisibilityQuery.toObject = function toObject(message, options) {
8033
+ if (!options)
8034
+ options = {};
8035
+ let object = {};
8036
+ if (options.defaults)
8037
+ object.visibilityState = false;
8038
+ if (message.visibilityState != null && message.hasOwnProperty("visibilityState"))
8039
+ object.visibilityState = message.visibilityState;
8040
+ return object;
8041
+ };
8042
+
8043
+ /**
8044
+ * Converts this VisibilityQuery to JSON.
8045
+ * @function toJSON
8046
+ * @memberof vertexvis.protobuf.stream.VisibilityQuery
8047
+ * @instance
8048
+ * @returns {Object.<string,*>} JSON object
8049
+ */
8050
+ VisibilityQuery.prototype.toJSON = function toJSON() {
8051
+ return this.constructor.toObject(this, minimal.util.toJSONOptions);
8052
+ };
8053
+
8054
+ return VisibilityQuery;
8055
+ })();
8056
+
7870
8057
  stream.OverrideQuery = (function() {
7871
8058
 
7872
8059
  /**
@@ -7874,6 +8061,7 @@ const vertexvis = $root.vertexvis = (() => {
7874
8061
  * @memberof vertexvis.protobuf.stream
7875
8062
  * @interface IOverrideQuery
7876
8063
  * @property {vertexvis.protobuf.stream.ISelectionQuery|null} [selection] OverrideQuery selection
8064
+ * @property {vertexvis.protobuf.stream.IVisibilityQuery|null} [visibility] OverrideQuery visibility
7877
8065
  */
7878
8066
 
7879
8067
  /**
@@ -7899,17 +8087,25 @@ const vertexvis = $root.vertexvis = (() => {
7899
8087
  */
7900
8088
  OverrideQuery.prototype.selection = null;
7901
8089
 
8090
+ /**
8091
+ * OverrideQuery visibility.
8092
+ * @member {vertexvis.protobuf.stream.IVisibilityQuery|null|undefined} visibility
8093
+ * @memberof vertexvis.protobuf.stream.OverrideQuery
8094
+ * @instance
8095
+ */
8096
+ OverrideQuery.prototype.visibility = null;
8097
+
7902
8098
  // OneOf field names bound to virtual getters and setters
7903
8099
  let $oneOfFields;
7904
8100
 
7905
8101
  /**
7906
8102
  * OverrideQuery override.
7907
- * @member {"selection"|undefined} override
8103
+ * @member {"selection"|"visibility"|undefined} override
7908
8104
  * @memberof vertexvis.protobuf.stream.OverrideQuery
7909
8105
  * @instance
7910
8106
  */
7911
8107
  Object.defineProperty(OverrideQuery.prototype, "override", {
7912
- get: $util.oneOfGetter($oneOfFields = ["selection"]),
8108
+ get: $util.oneOfGetter($oneOfFields = ["selection", "visibility"]),
7913
8109
  set: $util.oneOfSetter($oneOfFields)
7914
8110
  });
7915
8111
 
@@ -7939,6 +8135,8 @@ const vertexvis = $root.vertexvis = (() => {
7939
8135
  writer = $Writer.create();
7940
8136
  if (message.selection != null && Object.hasOwnProperty.call(message, "selection"))
7941
8137
  $root.vertexvis.protobuf.stream.SelectionQuery.encode(message.selection, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
8138
+ if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility"))
8139
+ $root.vertexvis.protobuf.stream.VisibilityQuery.encode(message.visibility, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
7942
8140
  return writer;
7943
8141
  };
7944
8142
 
@@ -7976,6 +8174,9 @@ const vertexvis = $root.vertexvis = (() => {
7976
8174
  case 1:
7977
8175
  message.selection = $root.vertexvis.protobuf.stream.SelectionQuery.decode(reader, reader.uint32());
7978
8176
  break;
8177
+ case 2:
8178
+ message.visibility = $root.vertexvis.protobuf.stream.VisibilityQuery.decode(reader, reader.uint32());
8179
+ break;
7979
8180
  default:
7980
8181
  reader.skipType(tag & 7);
7981
8182
  break;
@@ -8011,13 +8212,25 @@ const vertexvis = $root.vertexvis = (() => {
8011
8212
  OverrideQuery.verify = function verify(message) {
8012
8213
  if (typeof message !== "object" || message === null)
8013
8214
  return "object expected";
8215
+ let properties = {};
8014
8216
  if (message.selection != null && message.hasOwnProperty("selection")) {
8217
+ properties.override = 1;
8015
8218
  {
8016
8219
  let error = $root.vertexvis.protobuf.stream.SelectionQuery.verify(message.selection);
8017
8220
  if (error)
8018
8221
  return "selection." + error;
8019
8222
  }
8020
8223
  }
8224
+ if (message.visibility != null && message.hasOwnProperty("visibility")) {
8225
+ if (properties.override === 1)
8226
+ return "override: multiple values";
8227
+ properties.override = 1;
8228
+ {
8229
+ let error = $root.vertexvis.protobuf.stream.VisibilityQuery.verify(message.visibility);
8230
+ if (error)
8231
+ return "visibility." + error;
8232
+ }
8233
+ }
8021
8234
  return null;
8022
8235
  };
8023
8236
 
@@ -8038,6 +8251,11 @@ const vertexvis = $root.vertexvis = (() => {
8038
8251
  throw TypeError(".vertexvis.protobuf.stream.OverrideQuery.selection: object expected");
8039
8252
  message.selection = $root.vertexvis.protobuf.stream.SelectionQuery.fromObject(object.selection);
8040
8253
  }
8254
+ if (object.visibility != null) {
8255
+ if (typeof object.visibility !== "object")
8256
+ throw TypeError(".vertexvis.protobuf.stream.OverrideQuery.visibility: object expected");
8257
+ message.visibility = $root.vertexvis.protobuf.stream.VisibilityQuery.fromObject(object.visibility);
8258
+ }
8041
8259
  return message;
8042
8260
  };
8043
8261
 
@@ -8059,6 +8277,11 @@ const vertexvis = $root.vertexvis = (() => {
8059
8277
  if (options.oneofs)
8060
8278
  object.override = "selection";
8061
8279
  }
8280
+ if (message.visibility != null && message.hasOwnProperty("visibility")) {
8281
+ object.visibility = $root.vertexvis.protobuf.stream.VisibilityQuery.toObject(message.visibility, options);
8282
+ if (options.oneofs)
8283
+ object.override = "visibility";
8284
+ }
8062
8285
  return object;
8063
8286
  };
8064
8287