@dashevo/dapi-grpc 4.2.0-dev.1 → 4.2.0-dev.5

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.
@@ -20039,6 +20039,7 @@ $root.org = (function() {
20039
20039
  * @property {number} BETWEEN_EXCLUDE_RIGHT=8 BETWEEN_EXCLUDE_RIGHT value
20040
20040
  * @property {number} IN=9 IN value
20041
20041
  * @property {number} STARTS_WITH=10 STARTS_WITH value
20042
+ * @property {number} IN_TIME_RANGE=11 IN_TIME_RANGE value
20042
20043
  */
20043
20044
  GetDocumentsRequest.WhereOperator = (function() {
20044
20045
  var valuesById = {}, values = Object.create(valuesById);
@@ -20053,6 +20054,7 @@ $root.org = (function() {
20053
20054
  values[valuesById[8] = "BETWEEN_EXCLUDE_RIGHT"] = 8;
20054
20055
  values[valuesById[9] = "IN"] = 9;
20055
20056
  values[valuesById[10] = "STARTS_WITH"] = 10;
20057
+ values[valuesById[11] = "IN_TIME_RANGE"] = 11;
20056
20058
  return values;
20057
20059
  })();
20058
20060
 
@@ -20870,6 +20872,7 @@ $root.org = (function() {
20870
20872
  case 8:
20871
20873
  case 9:
20872
20874
  case 10:
20875
+ case 11:
20873
20876
  break;
20874
20877
  }
20875
20878
  if (message.value != null && message.hasOwnProperty("value")) {
@@ -20939,6 +20942,10 @@ $root.org = (function() {
20939
20942
  case 10:
20940
20943
  message.operator = 10;
20941
20944
  break;
20945
+ case "IN_TIME_RANGE":
20946
+ case 11:
20947
+ message.operator = 11;
20948
+ break;
20942
20949
  }
20943
20950
  if (object.value != null) {
20944
20951
  if (typeof object.value !== "object")
@@ -26727,6 +26734,7 @@ $root.org = (function() {
26727
26734
  * @property {number|Long|null} [count] RankedEntry count
26728
26735
  * @property {number|Long|null} [sum] RankedEntry sum
26729
26736
  * @property {number|null} [avg] RankedEntry avg
26737
+ * @property {Uint8Array|null} [inKey] RankedEntry inKey
26730
26738
  */
26731
26739
 
26732
26740
  /**
@@ -26776,6 +26784,14 @@ $root.org = (function() {
26776
26784
  */
26777
26785
  RankedEntry.prototype.avg = 0;
26778
26786
 
26787
+ /**
26788
+ * RankedEntry inKey.
26789
+ * @member {Uint8Array} inKey
26790
+ * @memberof org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.RankedEntry
26791
+ * @instance
26792
+ */
26793
+ RankedEntry.prototype.inKey = $util.newBuffer([]);
26794
+
26779
26795
  // OneOf field names bound to virtual getters and setters
26780
26796
  var $oneOfFields;
26781
26797
 
@@ -26822,6 +26838,8 @@ $root.org = (function() {
26822
26838
  writer.uint32(/* id 3, wireType 0 =*/24).sint64(message.sum);
26823
26839
  if (message.avg != null && Object.hasOwnProperty.call(message, "avg"))
26824
26840
  writer.uint32(/* id 4, wireType 1 =*/33).double(message.avg);
26841
+ if (message.inKey != null && Object.hasOwnProperty.call(message, "inKey"))
26842
+ writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.inKey);
26825
26843
  return writer;
26826
26844
  };
26827
26845
 
@@ -26868,6 +26886,9 @@ $root.org = (function() {
26868
26886
  case 4:
26869
26887
  message.avg = reader.double();
26870
26888
  break;
26889
+ case 5:
26890
+ message.inKey = reader.bytes();
26891
+ break;
26871
26892
  default:
26872
26893
  reader.skipType(tag & 7);
26873
26894
  break;
@@ -26926,6 +26947,9 @@ $root.org = (function() {
26926
26947
  if (typeof message.avg !== "number")
26927
26948
  return "avg: number expected";
26928
26949
  }
26950
+ if (message.inKey != null && message.hasOwnProperty("inKey"))
26951
+ if (!(message.inKey && typeof message.inKey.length === "number" || $util.isString(message.inKey)))
26952
+ return "inKey: buffer expected";
26929
26953
  return null;
26930
26954
  };
26931
26955
 
@@ -26966,6 +26990,11 @@ $root.org = (function() {
26966
26990
  message.sum = new $util.LongBits(object.sum.low >>> 0, object.sum.high >>> 0).toNumber();
26967
26991
  if (object.avg != null)
26968
26992
  message.avg = Number(object.avg);
26993
+ if (object.inKey != null)
26994
+ if (typeof object.inKey === "string")
26995
+ $util.base64.decode(object.inKey, message.inKey = $util.newBuffer($util.base64.length(object.inKey)), 0);
26996
+ else if (object.inKey.length >= 0)
26997
+ message.inKey = object.inKey;
26969
26998
  return message;
26970
26999
  };
26971
27000
 
@@ -26982,7 +27011,7 @@ $root.org = (function() {
26982
27011
  if (!options)
26983
27012
  options = {};
26984
27013
  var object = {};
26985
- if (options.defaults)
27014
+ if (options.defaults) {
26986
27015
  if (options.bytes === String)
26987
27016
  object.key = "";
26988
27017
  else {
@@ -26990,6 +27019,14 @@ $root.org = (function() {
26990
27019
  if (options.bytes !== Array)
26991
27020
  object.key = $util.newBuffer(object.key);
26992
27021
  }
27022
+ if (options.bytes === String)
27023
+ object.inKey = "";
27024
+ else {
27025
+ object.inKey = [];
27026
+ if (options.bytes !== Array)
27027
+ object.inKey = $util.newBuffer(object.inKey);
27028
+ }
27029
+ }
26993
27030
  if (message.key != null && message.hasOwnProperty("key"))
26994
27031
  object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key;
26995
27032
  if (message.count != null && message.hasOwnProperty("count")) {
@@ -27013,6 +27050,8 @@ $root.org = (function() {
27013
27050
  if (options.oneofs)
27014
27051
  object.value = "avg";
27015
27052
  }
27053
+ if (message.inKey != null && message.hasOwnProperty("inKey"))
27054
+ object.inKey = options.bytes === String ? $util.base64.encode(message.inKey, 0, message.inKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.inKey) : message.inKey;
27016
27055
  return object;
27017
27056
  };
27018
27057
 
@@ -19531,6 +19531,7 @@ $root.org = (function() {
19531
19531
  * @property {number} BETWEEN_EXCLUDE_RIGHT=8 BETWEEN_EXCLUDE_RIGHT value
19532
19532
  * @property {number} IN=9 IN value
19533
19533
  * @property {number} STARTS_WITH=10 STARTS_WITH value
19534
+ * @property {number} IN_TIME_RANGE=11 IN_TIME_RANGE value
19534
19535
  */
19535
19536
  GetDocumentsRequest.WhereOperator = (function() {
19536
19537
  var valuesById = {}, values = Object.create(valuesById);
@@ -19545,6 +19546,7 @@ $root.org = (function() {
19545
19546
  values[valuesById[8] = "BETWEEN_EXCLUDE_RIGHT"] = 8;
19546
19547
  values[valuesById[9] = "IN"] = 9;
19547
19548
  values[valuesById[10] = "STARTS_WITH"] = 10;
19549
+ values[valuesById[11] = "IN_TIME_RANGE"] = 11;
19548
19550
  return values;
19549
19551
  })();
19550
19552
 
@@ -20362,6 +20364,7 @@ $root.org = (function() {
20362
20364
  case 8:
20363
20365
  case 9:
20364
20366
  case 10:
20367
+ case 11:
20365
20368
  break;
20366
20369
  }
20367
20370
  if (message.value != null && message.hasOwnProperty("value")) {
@@ -20431,6 +20434,10 @@ $root.org = (function() {
20431
20434
  case 10:
20432
20435
  message.operator = 10;
20433
20436
  break;
20437
+ case "IN_TIME_RANGE":
20438
+ case 11:
20439
+ message.operator = 11;
20440
+ break;
20434
20441
  }
20435
20442
  if (object.value != null) {
20436
20443
  if (typeof object.value !== "object")
@@ -26219,6 +26226,7 @@ $root.org = (function() {
26219
26226
  * @property {number|Long|null} [count] RankedEntry count
26220
26227
  * @property {number|Long|null} [sum] RankedEntry sum
26221
26228
  * @property {number|null} [avg] RankedEntry avg
26229
+ * @property {Uint8Array|null} [inKey] RankedEntry inKey
26222
26230
  */
26223
26231
 
26224
26232
  /**
@@ -26268,6 +26276,14 @@ $root.org = (function() {
26268
26276
  */
26269
26277
  RankedEntry.prototype.avg = 0;
26270
26278
 
26279
+ /**
26280
+ * RankedEntry inKey.
26281
+ * @member {Uint8Array} inKey
26282
+ * @memberof org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.RankedEntry
26283
+ * @instance
26284
+ */
26285
+ RankedEntry.prototype.inKey = $util.newBuffer([]);
26286
+
26271
26287
  // OneOf field names bound to virtual getters and setters
26272
26288
  var $oneOfFields;
26273
26289
 
@@ -26314,6 +26330,8 @@ $root.org = (function() {
26314
26330
  writer.uint32(/* id 3, wireType 0 =*/24).sint64(message.sum);
26315
26331
  if (message.avg != null && Object.hasOwnProperty.call(message, "avg"))
26316
26332
  writer.uint32(/* id 4, wireType 1 =*/33).double(message.avg);
26333
+ if (message.inKey != null && Object.hasOwnProperty.call(message, "inKey"))
26334
+ writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.inKey);
26317
26335
  return writer;
26318
26336
  };
26319
26337
 
@@ -26360,6 +26378,9 @@ $root.org = (function() {
26360
26378
  case 4:
26361
26379
  message.avg = reader.double();
26362
26380
  break;
26381
+ case 5:
26382
+ message.inKey = reader.bytes();
26383
+ break;
26363
26384
  default:
26364
26385
  reader.skipType(tag & 7);
26365
26386
  break;
@@ -26418,6 +26439,9 @@ $root.org = (function() {
26418
26439
  if (typeof message.avg !== "number")
26419
26440
  return "avg: number expected";
26420
26441
  }
26442
+ if (message.inKey != null && message.hasOwnProperty("inKey"))
26443
+ if (!(message.inKey && typeof message.inKey.length === "number" || $util.isString(message.inKey)))
26444
+ return "inKey: buffer expected";
26421
26445
  return null;
26422
26446
  };
26423
26447
 
@@ -26458,6 +26482,11 @@ $root.org = (function() {
26458
26482
  message.sum = new $util.LongBits(object.sum.low >>> 0, object.sum.high >>> 0).toNumber();
26459
26483
  if (object.avg != null)
26460
26484
  message.avg = Number(object.avg);
26485
+ if (object.inKey != null)
26486
+ if (typeof object.inKey === "string")
26487
+ $util.base64.decode(object.inKey, message.inKey = $util.newBuffer($util.base64.length(object.inKey)), 0);
26488
+ else if (object.inKey.length >= 0)
26489
+ message.inKey = object.inKey;
26461
26490
  return message;
26462
26491
  };
26463
26492
 
@@ -26474,7 +26503,7 @@ $root.org = (function() {
26474
26503
  if (!options)
26475
26504
  options = {};
26476
26505
  var object = {};
26477
- if (options.defaults)
26506
+ if (options.defaults) {
26478
26507
  if (options.bytes === String)
26479
26508
  object.key = "";
26480
26509
  else {
@@ -26482,6 +26511,14 @@ $root.org = (function() {
26482
26511
  if (options.bytes !== Array)
26483
26512
  object.key = $util.newBuffer(object.key);
26484
26513
  }
26514
+ if (options.bytes === String)
26515
+ object.inKey = "";
26516
+ else {
26517
+ object.inKey = [];
26518
+ if (options.bytes !== Array)
26519
+ object.inKey = $util.newBuffer(object.inKey);
26520
+ }
26521
+ }
26485
26522
  if (message.key != null && message.hasOwnProperty("key"))
26486
26523
  object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key;
26487
26524
  if (message.count != null && message.hasOwnProperty("count")) {
@@ -26505,6 +26542,8 @@ $root.org = (function() {
26505
26542
  if (options.oneofs)
26506
26543
  object.value = "avg";
26507
26544
  }
26545
+ if (message.inKey != null && message.hasOwnProperty("inKey"))
26546
+ object.inKey = options.bytes === String ? $util.base64.encode(message.inKey, 0, message.inKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.inKey) : message.inKey;
26508
26547
  return object;
26509
26548
  };
26510
26549
 
@@ -24389,7 +24389,8 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereOperator = {
24389
24389
  BETWEEN_EXCLUDE_LEFT: 7,
24390
24390
  BETWEEN_EXCLUDE_RIGHT: 8,
24391
24391
  IN: 9,
24392
- STARTS_WITH: 10
24392
+ STARTS_WITH: 10,
24393
+ IN_TIME_RANGE: 11
24393
24394
  };
24394
24395
 
24395
24396
 
@@ -30659,7 +30660,8 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.Rank
30659
30660
  key: msg.getKey_asB64(),
30660
30661
  count: jspb.Message.getFieldWithDefault(msg, 2, "0"),
30661
30662
  sum: jspb.Message.getFieldWithDefault(msg, 3, "0"),
30662
- avg: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0)
30663
+ avg: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0),
30664
+ inKey: msg.getInKey_asB64()
30663
30665
  };
30664
30666
 
30665
30667
  if (includeInstance) {
@@ -30712,6 +30714,10 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.Rank
30712
30714
  var value = /** @type {number} */ (reader.readDouble());
30713
30715
  msg.setAvg(value);
30714
30716
  break;
30717
+ case 5:
30718
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
30719
+ msg.setInKey(value);
30720
+ break;
30715
30721
  default:
30716
30722
  reader.skipField();
30717
30723
  break;
@@ -30769,6 +30775,13 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.Rank
30769
30775
  f
30770
30776
  );
30771
30777
  }
30778
+ f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 5));
30779
+ if (f != null) {
30780
+ writer.writeBytes(
30781
+ 5,
30782
+ f
30783
+ );
30784
+ }
30772
30785
  };
30773
30786
 
30774
30787
 
@@ -30922,6 +30935,66 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.Rank
30922
30935
  };
30923
30936
 
30924
30937
 
30938
+ /**
30939
+ * optional bytes in_key = 5;
30940
+ * @return {string}
30941
+ */
30942
+ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.RankedEntry.prototype.getInKey = function() {
30943
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
30944
+ };
30945
+
30946
+
30947
+ /**
30948
+ * optional bytes in_key = 5;
30949
+ * This is a type-conversion wrapper around `getInKey()`
30950
+ * @return {string}
30951
+ */
30952
+ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.RankedEntry.prototype.getInKey_asB64 = function() {
30953
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
30954
+ this.getInKey()));
30955
+ };
30956
+
30957
+
30958
+ /**
30959
+ * optional bytes in_key = 5;
30960
+ * Note that Uint8Array is not supported on all browsers.
30961
+ * @see http://caniuse.com/Uint8Array
30962
+ * This is a type-conversion wrapper around `getInKey()`
30963
+ * @return {!Uint8Array}
30964
+ */
30965
+ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.RankedEntry.prototype.getInKey_asU8 = function() {
30966
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
30967
+ this.getInKey()));
30968
+ };
30969
+
30970
+
30971
+ /**
30972
+ * @param {!(string|Uint8Array)} value
30973
+ * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.RankedEntry} returns this
30974
+ */
30975
+ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.RankedEntry.prototype.setInKey = function(value) {
30976
+ return jspb.Message.setField(this, 5, value);
30977
+ };
30978
+
30979
+
30980
+ /**
30981
+ * Clears the field making it undefined.
30982
+ * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.RankedEntry} returns this
30983
+ */
30984
+ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.RankedEntry.prototype.clearInKey = function() {
30985
+ return jspb.Message.setField(this, 5, undefined);
30986
+ };
30987
+
30988
+
30989
+ /**
30990
+ * Returns whether this field is set.
30991
+ * @return {boolean}
30992
+ */
30993
+ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.RankedEntry.prototype.hasInKey = function() {
30994
+ return jspb.Message.getField(this, 5) != null;
30995
+ };
30996
+
30997
+
30925
30998
 
30926
30999
  /**
30927
31000
  * List of repeated fields within this message type.
@@ -2739,6 +2739,7 @@ export namespace GetDocumentsRequest {
2739
2739
  BETWEEN_EXCLUDE_RIGHT: 8;
2740
2740
  IN: 9;
2741
2741
  STARTS_WITH: 10;
2742
+ IN_TIME_RANGE: 11;
2742
2743
  }
2743
2744
 
2744
2745
  export const WhereOperator: WhereOperatorMap;
@@ -3223,6 +3224,13 @@ export namespace GetDocumentsResponse {
3223
3224
  getAvg(): number;
3224
3225
  setAvg(value: number): void;
3225
3226
 
3227
+ hasInKey(): boolean;
3228
+ clearInKey(): void;
3229
+ getInKey(): Uint8Array | string;
3230
+ getInKey_asU8(): Uint8Array;
3231
+ getInKey_asB64(): string;
3232
+ setInKey(value: Uint8Array | string): void;
3233
+
3226
3234
  getValueCase(): RankedEntry.ValueCase;
3227
3235
  serializeBinary(): Uint8Array;
3228
3236
  toObject(includeInstance?: boolean): RankedEntry.AsObject;
@@ -3240,6 +3248,7 @@ export namespace GetDocumentsResponse {
3240
3248
  count: string,
3241
3249
  sum: string,
3242
3250
  avg: number,
3251
+ inKey: Uint8Array | string,
3243
3252
  }
3244
3253
 
3245
3254
  export enum ValueCase {
@@ -24389,7 +24389,8 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereOperator = {
24389
24389
  BETWEEN_EXCLUDE_LEFT: 7,
24390
24390
  BETWEEN_EXCLUDE_RIGHT: 8,
24391
24391
  IN: 9,
24392
- STARTS_WITH: 10
24392
+ STARTS_WITH: 10,
24393
+ IN_TIME_RANGE: 11
24393
24394
  };
24394
24395
 
24395
24396
 
@@ -30659,7 +30660,8 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.Rank
30659
30660
  key: msg.getKey_asB64(),
30660
30661
  count: jspb.Message.getFieldWithDefault(msg, 2, "0"),
30661
30662
  sum: jspb.Message.getFieldWithDefault(msg, 3, "0"),
30662
- avg: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0)
30663
+ avg: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0),
30664
+ inKey: msg.getInKey_asB64()
30663
30665
  };
30664
30666
 
30665
30667
  if (includeInstance) {
@@ -30712,6 +30714,10 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.Rank
30712
30714
  var value = /** @type {number} */ (reader.readDouble());
30713
30715
  msg.setAvg(value);
30714
30716
  break;
30717
+ case 5:
30718
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
30719
+ msg.setInKey(value);
30720
+ break;
30715
30721
  default:
30716
30722
  reader.skipField();
30717
30723
  break;
@@ -30769,6 +30775,13 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.Rank
30769
30775
  f
30770
30776
  );
30771
30777
  }
30778
+ f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 5));
30779
+ if (f != null) {
30780
+ writer.writeBytes(
30781
+ 5,
30782
+ f
30783
+ );
30784
+ }
30772
30785
  };
30773
30786
 
30774
30787
 
@@ -30922,6 +30935,66 @@ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.Rank
30922
30935
  };
30923
30936
 
30924
30937
 
30938
+ /**
30939
+ * optional bytes in_key = 5;
30940
+ * @return {string}
30941
+ */
30942
+ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.RankedEntry.prototype.getInKey = function() {
30943
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
30944
+ };
30945
+
30946
+
30947
+ /**
30948
+ * optional bytes in_key = 5;
30949
+ * This is a type-conversion wrapper around `getInKey()`
30950
+ * @return {string}
30951
+ */
30952
+ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.RankedEntry.prototype.getInKey_asB64 = function() {
30953
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
30954
+ this.getInKey()));
30955
+ };
30956
+
30957
+
30958
+ /**
30959
+ * optional bytes in_key = 5;
30960
+ * Note that Uint8Array is not supported on all browsers.
30961
+ * @see http://caniuse.com/Uint8Array
30962
+ * This is a type-conversion wrapper around `getInKey()`
30963
+ * @return {!Uint8Array}
30964
+ */
30965
+ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.RankedEntry.prototype.getInKey_asU8 = function() {
30966
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
30967
+ this.getInKey()));
30968
+ };
30969
+
30970
+
30971
+ /**
30972
+ * @param {!(string|Uint8Array)} value
30973
+ * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.RankedEntry} returns this
30974
+ */
30975
+ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.RankedEntry.prototype.setInKey = function(value) {
30976
+ return jspb.Message.setField(this, 5, value);
30977
+ };
30978
+
30979
+
30980
+ /**
30981
+ * Clears the field making it undefined.
30982
+ * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.RankedEntry} returns this
30983
+ */
30984
+ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.RankedEntry.prototype.clearInKey = function() {
30985
+ return jspb.Message.setField(this, 5, undefined);
30986
+ };
30987
+
30988
+
30989
+ /**
30990
+ * Returns whether this field is set.
30991
+ * @return {boolean}
30992
+ */
30993
+ proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.RankedEntry.prototype.hasInKey = function() {
30994
+ return jspb.Message.getField(this, 5) != null;
30995
+ };
30996
+
30997
+
30925
30998
 
30926
30999
  /**
30927
31000
  * List of repeated fields within this message type.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dashevo/dapi-grpc",
3
- "version": "4.2.0-dev.1",
3
+ "version": "4.2.0-dev.5",
4
4
  "description": "DAPI GRPC definition file and generated clients",
5
5
  "browser": "browser.js",
6
6
  "main": "node.js",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "homepage": "https://github.com/dashevo/dapi-grpc#readme",
47
47
  "dependencies": {
48
- "@dashevo/grpc-common": "4.2.0-dev.1",
48
+ "@dashevo/grpc-common": "4.2.0-dev.5",
49
49
  "@dashevo/protobufjs": "6.10.5",
50
50
  "@grpc/grpc-js": "^1.14.3",
51
51
  "@improbable-eng/grpc-web": "^0.15.0",
@@ -594,6 +594,18 @@ message GetDocumentsRequest {
594
594
  BETWEEN_EXCLUDE_RIGHT = 8;
595
595
  IN = 9;
596
596
  STARTS_WITH = 10;
597
+ // Time-range bucket selection (v1 only; the v0 CBOR surface is
598
+ // unaffected). `field` names a timestamp covered by a `timeRange`
599
+ // index. Operand: `text` selector `"newest"`/`"oldest"` when one grid
600
+ // buckets the field, or `list` `[selector, range, step(, phase)]` in
601
+ // the contract's declared seconds to name one of several grids (zero
602
+ // phase is spelled by omission — one wire spelling per grid). The
603
+ // server resolves it to a bucket-start equality from current block
604
+ // time; the verifier re-derives the same bucket from the quorum-signed
605
+ // metadata time — an ordinary index/count proof. See `timeRange` in
606
+ // the document meta-schema and
607
+ // `drive::query::resolve_time_range_bucket_clause`.
608
+ IN_TIME_RANGE = 11;
597
609
  }
598
610
 
599
611
  // Tagged scalar (or list) operand for a `WhereClause`. The
@@ -703,12 +715,21 @@ message GetDocumentsRequest {
703
715
  // before release rather than deprecated, because it invented
704
716
  // non-SQL grammar for something SQL already expresses.
705
717
  //
706
- // **`HAVING` cannot yet combine with an aggregate `ORDER BY`.**
707
- // The ranked executor reads a pre-sorted per-axis secondary and
708
- // has no way to drop groups from the middle of that walk, so a
709
- // request carrying both a non-empty `having` and a ranking
710
- // `order_by` is rejected with `Unsupported` rather than served
711
- // with one of the two silently ignored.
718
+ // **From protocol v14 a single `HAVING` clause is served as a
719
+ // bounded range read** (having-range mode): `SELECT <agg> GROUP BY
720
+ // p HAVING <agg> <op> <value> [ORDER BY <order-key> ASC|DESC]
721
+ // LIMIT n` answers from the same per-axis secondary as ranked
722
+ // mode, on an index declaring the matching ranked axis. The
723
+ // clause's aggregate must be the selected aggregate, the operator
724
+ // must describe one contiguous range (`NOT_EQUAL` / `IN` are
725
+ // rejected), and the optional `ORDER BY` picks the walk direction
726
+ // using the same order-key spelling as ranked mode: `f` for
727
+ // `SUM(f)` / `AVG(f)`, the `$count` sentinel for `COUNT(*)` —
728
+ // never an explicit `OrderClause.aggregate` target, which is
729
+ // rejected. See the supported-shape table on
730
+ // `GetDocumentsRequestV1`. On protocol v13 and earlier every
731
+ // non-empty `having` stays rejected with `Unsupported`, exactly as
732
+ // before.
712
733
  //
713
734
  // The operator set mirrors `WhereOperator` minus `STARTS_WITH`
714
735
  // (prefix matching has no natural meaning against a scalar
@@ -849,12 +870,16 @@ message GetDocumentsRequest {
849
870
  // It returns `ResultData.ranked`. See `order_by` and the
850
871
  // supported-shape table below.
851
872
  //
852
- // `having` is a boolean per-group predicate and is **still**
853
- // `Unsupported` at every protocol version, ranked mode or not
854
- // (`"HAVING clause is not yet implemented"`). It carries no ranking
855
- // spelling: an earlier draft put cross-group ranking on the right of
856
- // a `HAVING` (`HAVING AVG(grade) IN TOP(5)`) and that grammar was
857
- // removed before release in favour of `ORDER BY` + `LIMIT`.
873
+ // **Having-range mode** is served from protocol v14: a single
874
+ // `having` clause whose aggregate is the selected aggregate turns
875
+ // the request into a bounded range read over the same per-axis
876
+ // secondary ranked mode walks, answered in `ResultData.ranked`.
877
+ // On protocol v13 and earlier every non-empty `having` is rejected
878
+ // (`"HAVING clause is not yet implemented"`). `having` carries no
879
+ // ranking spelling: an earlier draft put cross-group ranking on the
880
+ // right of a `HAVING` (`HAVING AVG(grade) IN TOP(5)`) and that
881
+ // grammar was removed before release in favour of `ORDER BY` +
882
+ // `LIMIT`. See the supported-shape table below.
858
883
  //
859
884
  // **Supported shapes** (everything else rejects with a typed
860
885
  // `QuerySyntaxError::Unsupported` so callers can detect un-wired
@@ -880,12 +905,16 @@ message GetDocumentsRequest {
880
905
  // - a is the In field AND b is the range field, in that order → existing compound distinct shape; entries carry both `in_key` (= a's value) and `key` (= b's value).
881
906
  //
882
907
  // `select=<COUNT(*)|SUM(f)|AVG(f)>, group_by=[p], order_by=[<the selected aggregate>]` (protocol v14+) — **ranked mode**:
883
- // - exactly one `group_by` property, exactly one `order_by` clause naming the select's aggregate (`f` for `SUM(f)` / `AVG(f)`, the `$count` sentinel for `COUNT(*)`), a `limit` in `1 ..= 100`, an optional `offset`, and no `where` / `having` / `start_at`, on an index declaring the matching `rankedCountable` / `rankedSummable` / `rankedAverageable` axis → ranked executor, answered in `ResultData.ranked`.
908
+ // - exactly one `group_by` property, exactly one `order_by` clause naming the select's aggregate (`f` for `SUM(f)` / `AVG(f)`, the `$count` sentinel for `COUNT(*)`), a `limit` in `1 ..= 100`, an optional `offset`, and no `having` / `start_at`, on an index declaring the matching `rankedCountable` / `rankedSummable` / `rankedAverageable` axis → ranked executor, answered in `ResultData.ranked`. On a single-property ranked index no `where` is accepted; on a compound ranked index every leading index property must be pinned (one clause per property, `group_by` names the trailing property) — `EQUAL` pins one prefix, and **at most one** clause may be `IN` (2..=10 distinct elements, `null` legal; a single-element `IN` normalizes to the equality pin; an element whose prefix was never written — at any depth of its pinned chain — contributes an empty branch, union semantics), fanning the walk out across one prefix branch per element and merging by `(aggregate, encoded prefix, group key)`; merged entries carry `in_key`. A non-zero `offset` is rejected together with `IN` (rank-skip is per-secondary; `OFFSET 0` is the offset-free request).
884
909
  // - `DESC` is the "top n" reading (walk the axis from the largest aggregate down), `ASC` the "bottom n" reading. Worked example: `SELECT AVG(grade) GROUP BY restaurantId ORDER BY grade DESC LIMIT 1 OFFSET 4` is the 5th-best restaurant.
885
910
  //
911
+ // `select=<COUNT(*)|SUM(f)|AVG(f)>, group_by=[p], having=[<the selected aggregate> <op> <value>]` (protocol v14+) — **having-range mode**:
912
+ // - exactly one `group_by` property, exactly one `having` clause whose aggregate is the select's aggregate, an operator describing one contiguous range (`EQUAL`, `GREATER_THAN[_OR_EQUALS]`, `LESS_THAN[_OR_EQUALS]`, `BETWEEN*`; `NOT_EQUAL` / `IN` rejected), a `limit` in `1 ..= 100`, an optional `order_by` naming the same aggregate (walk direction; ascending by default), and no `offset` / `start_at` / `start_after`, on an index declaring the matching ranked axis → having-range executor, answered in `ResultData.ranked`. `where` follows the same rule as ranked mode: none on a single-property ranked index; exactly one pin per leading index property on a compound ranked index, at most one of them an `IN` (2..=10 distinct elements; a never-written element contributes an empty branch) that fans the bound out across prefix branches and merges, entries carrying `in_key`.
913
+ // - no offset or cursor pagination: a page cut at `limit` continues only by tightening the bound past the last *distinct* aggregate value seen; a cut inside a tie (several groups sharing the boundary aggregate) cannot be continued, so size `limit` above the widest expected tie.
914
+ //
886
915
  // **Rejected shapes** (return `Unsupported`):
887
- // - any non-empty `having`, at every protocol version.
888
- // - at v14+: a ranked-shaped request carrying a `where` clause, a `start_at` / `start_after` cursor, more than one `order_by`, or an `order_by` naming anything but the selected aggregate.
916
+ // - any non-empty `having` on protocol v13 and earlier; at v14+, any `having` shape outside having-range mode above (multiple clauses, an aggregate other than the select's, `NOT_EQUAL` / `IN` as the having operator, a `where` shape other than the compound-index prefix pins above — equality pins plus at most one bounded `IN` — or a carried `offset` / cursor).
917
+ // - at v14+: a ranked-shaped request carrying a `where` shape other than the compound-index prefix pins above (an operator other than `EQUAL` or the one permitted `IN`, more than one `IN`, a `null` pin combined with an `IN`, a repeated or non-leading property, or a missing pin), a `start_at` / `start_after` cursor, more than one `order_by`, or an `order_by` naming anything but the selected aggregate.
889
918
  // - `select=DOCUMENTS` with non-empty `group_by`.
890
919
  // - `select=COUNT` with `group_by` on a field that is not constrained by an `In` or range where clause.
891
920
  // - `select=COUNT` with `group_by.len() > 2`.
@@ -1084,12 +1113,13 @@ message GetDocumentsRequest {
1084
1113
  // `HavingClause` / `HavingAggregate` for the operator and
1085
1114
  // aggregate-function catalogs.
1086
1115
  //
1087
- // **Every non-empty `having` is rejected**, at every protocol
1088
- // version, with `Unsupported("HAVING clause is not yet
1089
- // implemented")`. The wire shape ships ahead of evaluation so
1090
- // callers can construct full `HAVING COUNT(*) > 5 AND
1091
- // SUM(amount) > 100` requests in their builders, and so the
1092
- // capability can land without another version bump.
1116
+ // **From protocol v14 a single clause is served** as a bounded
1117
+ // range read having-range mode; see the message-level
1118
+ // supported-shape table. On v13 and earlier every non-empty
1119
+ // `having` is rejected with `Unsupported("HAVING clause is not
1120
+ // yet implemented")`. Multi-clause `HAVING COUNT(*) > 5 AND
1121
+ // SUM(amount) > 100` requests can still be constructed on the
1122
+ // wire, but stay rejected until a multi-clause evaluator lands.
1093
1123
  //
1094
1124
  // **`having` does not express ranking.** "The n highest-scoring
1095
1125
  // groups" is `ORDER BY <the selected aggregate> DESC LIMIT n`
@@ -1107,13 +1137,17 @@ message GetDocumentsRequest {
1107
1137
  // routes to the ranked executor (`group_by` + a single `order_by`
1108
1138
  // naming the selected aggregate), `offset` skips that many ranks
1109
1139
  // before the returned page, so `ORDER BY avg(grade) DESC LIMIT 1
1110
- // OFFSET 4` is the 5th-best group. The skip is **count-attested**,
1111
- // not walked: grovedb proves it from the counted subtree
1112
- // commitments, so the proof stays `O(log n + k)` at any offset and
1113
- // the response echoes the attested number in
1114
- // `RankedEntries.skipped`. There is deliberately no ceiling — an
1115
- // offset of 4 and an offset of four billion cost the same, so
1116
- // there is no denial-of-service lever a cap would close. An offset
1140
+ // OFFSET 4` is the 5th-best group. The skip is **counted, not
1141
+ // walked**: grovedb descends on each subtree's aggregate count and
1142
+ // collapses whole subtrees that fit inside the remaining offset, so
1143
+ // the work stays `O(log n + k)` at any offset and the response
1144
+ // reports the skip it performed in `RankedEntries.skipped`. On a
1145
+ // proved request that count is additionally *attested* committed
1146
+ // to by the proof and re-derived by the verifier; on an unproved
1147
+ // one it is the node's own report. See `RankedEntries.skipped`. There is deliberately no ceiling — an
1148
+ // offset of 4 and an offset of four billion cost the same *order*
1149
+ // of work — neither walks the region it skips — so there is no
1150
+ // denial-of-service lever a cap would close. An offset
1117
1151
  // past the end of the ranking is a provable answer rather than an
1118
1152
  // error: `entries` comes back empty and `skipped` is the ranking's
1119
1153
  // whole population.
@@ -1372,6 +1406,14 @@ message GetDocumentsResponse {
1372
1406
  // than hardcoding the literal.
1373
1407
  double avg = 4;
1374
1408
  }
1409
+ // The prefix branch this entry came from, set **only** on an
1410
+ // `IN`-pinned request (see the supported-shape table): the
1411
+ // encoded index-key bytes of the `IN` property's pinned value —
1412
+ // empty bytes for the `null` (absent-value) branch. Absent on
1413
+ // single-prefix responses. The same group key can legally appear
1414
+ // under two prefixes, so `(in_key, key)` is the entry's identity
1415
+ // on a merged page, exactly as on `CountEntry`.
1416
+ optional bytes in_key = 5;
1375
1417
  }
1376
1418
 
1377
1419
  // Ranked result entries. **Entry order IS the ranking order** —
@@ -1399,20 +1441,31 @@ message GetDocumentsResponse {
1399
1441
  // group rather than the best.
1400
1442
  //
1401
1443
  // **When a requested offset exceeds the population**, `entries`
1402
- // is empty and `skipped` is the ranking's attested *total*
1444
+ // is empty and `skipped` is the ranking's *total* reported
1403
1445
  // population — a positive, useful answer ("there are only 12
1404
1446
  // groups") rather than a bare empty list.
1405
1447
  //
1406
- // On the proved path the number is grovedb's cryptographically
1407
- // attested count, re-derived by the verifier from the counted
1408
- // subtree commitments in the proof bytes rather than trusted
1409
- // from this field; a proving client should use the verified
1410
- // value. On the unproven read there is nothing to attest and
1411
- // grovedb's read API does not report a short walk, so the server
1412
- // echoes the requested offset. The two therefore disagree in
1413
- // exactly one case an offset past the end, where the unproven
1414
- // read reports the request and the proved one reports the truth.
1415
- // Callers who need the population must prove.
1448
+ // Both paths report the same quantity: the offset you asked for
1449
+ // when the skip succeeded, and the ranking's total population
1450
+ // when the walk ran out of groups first. They no longer disagree
1451
+ // anywhere, including past the end.
1452
+ //
1453
+ // What differs is the *warrant*, not the value. On the proved
1454
+ // path the number is cryptographically attested re-derived by
1455
+ // the verifier from the counted subtree commitments in the proof
1456
+ // bytes rather than trusted from this field so a proving client
1457
+ // should use the verified value and ignore this one. On the
1458
+ // unproven path it is an **unverified claim**, exactly like the
1459
+ // entries beside it: it equals the attested value on an honest
1460
+ // node, and nothing forces a node to be honest. Read "the true
1461
+ // population" as "what this node says the population is".
1462
+ // Callers who need to trust it, rather than merely receive it,
1463
+ // must still prove.
1464
+ //
1465
+ // Do not assume this field equals the offset you requested. It
1466
+ // equals the offset only when the skip succeeded; when the walk
1467
+ // ran out of groups first it is smaller, and that is the answer
1468
+ // rather than an inconsistency.
1416
1469
  optional uint64 skipped = 2 [jstype = JS_STRING];
1417
1470
  }
1418
1471