@sentio/runtime 2.59.0-rc.21 → 2.59.0-rc.23

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.
@@ -4314,6 +4314,13 @@ function eventLogConfig_BasicFieldTypeToJSON(object) {
4314
4314
  return "UNRECOGNIZED";
4315
4315
  }
4316
4316
  }
4317
+ var ProcessStreamResponse_Partitions_Partition_SysValue;
4318
+ (function(ProcessStreamResponse_Partitions_Partition_SysValue2) {
4319
+ ProcessStreamResponse_Partitions_Partition_SysValue2[ProcessStreamResponse_Partitions_Partition_SysValue2["BLOCK_NUMBER"] = 0] = "BLOCK_NUMBER";
4320
+ ProcessStreamResponse_Partitions_Partition_SysValue2[ProcessStreamResponse_Partitions_Partition_SysValue2["SEQ_MODE"] = 1] = "SEQ_MODE";
4321
+ ProcessStreamResponse_Partitions_Partition_SysValue2[ProcessStreamResponse_Partitions_Partition_SysValue2["UNIQUE_VALUE"] = 2] = "UNIQUE_VALUE";
4322
+ ProcessStreamResponse_Partitions_Partition_SysValue2[ProcessStreamResponse_Partitions_Partition_SysValue2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
4323
+ })(ProcessStreamResponse_Partitions_Partition_SysValue || (ProcessStreamResponse_Partitions_Partition_SysValue = {}));
4317
4324
  var EntityUpdateData_Operator;
4318
4325
  (function(EntityUpdateData_Operator2) {
4319
4326
  EntityUpdateData_Operator2[EntityUpdateData_Operator2["SET"] = 0] = "SET";
@@ -10848,6 +10855,19 @@ var Plugin = class {
10848
10855
  async preprocessBinding(request, preprocessStore) {
10849
10856
  return PreprocessResult.create();
10850
10857
  }
10858
+ async partition(request) {
10859
+ return {
10860
+ partitions: request.handlerIds.reduce(
10861
+ (acc, id) => ({
10862
+ ...acc,
10863
+ [id]: {
10864
+ sysValue: ProcessStreamResponse_Partitions_Partition_SysValue.UNRECOGNIZED
10865
+ }
10866
+ }),
10867
+ {}
10868
+ )
10869
+ };
10870
+ }
10851
10871
  /**
10852
10872
  * method used by action server only
10853
10873
  * @param port
@@ -10905,6 +10925,13 @@ var PluginManager = class _PluginManager {
10905
10925
  return plugin.processBinding(request, preparedData);
10906
10926
  });
10907
10927
  }
10928
+ async partition(request) {
10929
+ const plugin = this.typesToPlugin.get(request.handlerType);
10930
+ if (!plugin) {
10931
+ throw new Error(`No plugin for ${request.handlerType}`);
10932
+ }
10933
+ return plugin.partition(request);
10934
+ }
10908
10935
  preprocessBinding(request, preprocessStore, dbContext) {
10909
10936
  const plugin = this.typesToPlugin.get(request.handlerType);
10910
10937
  if (!plugin) {
@@ -12708,6 +12735,36 @@ function eventLogConfig_BasicFieldTypeToJSON2(object) {
12708
12735
  return "UNRECOGNIZED";
12709
12736
  }
12710
12737
  }
12738
+ function processStreamResponse_Partitions_Partition_SysValueFromJSON(object) {
12739
+ switch (object) {
12740
+ case 0:
12741
+ case "BLOCK_NUMBER":
12742
+ return 0 /* BLOCK_NUMBER */;
12743
+ case 1:
12744
+ case "SEQ_MODE":
12745
+ return 1 /* SEQ_MODE */;
12746
+ case 2:
12747
+ case "UNIQUE_VALUE":
12748
+ return 2 /* UNIQUE_VALUE */;
12749
+ case -1:
12750
+ case "UNRECOGNIZED":
12751
+ default:
12752
+ return -1 /* UNRECOGNIZED */;
12753
+ }
12754
+ }
12755
+ function processStreamResponse_Partitions_Partition_SysValueToJSON(object) {
12756
+ switch (object) {
12757
+ case 0 /* BLOCK_NUMBER */:
12758
+ return "BLOCK_NUMBER";
12759
+ case 1 /* SEQ_MODE */:
12760
+ return "SEQ_MODE";
12761
+ case 2 /* UNIQUE_VALUE */:
12762
+ return "UNIQUE_VALUE";
12763
+ case -1 /* UNRECOGNIZED */:
12764
+ default:
12765
+ return "UNRECOGNIZED";
12766
+ }
12767
+ }
12711
12768
  function entityUpdateData_OperatorFromJSON(object) {
12712
12769
  switch (object) {
12713
12770
  case 0:
@@ -18495,7 +18552,7 @@ var ProcessBindingResponse = {
18495
18552
  }
18496
18553
  };
18497
18554
  function createBaseProcessStreamRequest() {
18498
- return { processId: 0, binding: void 0, dbResult: void 0 };
18555
+ return { processId: 0, binding: void 0, dbResult: void 0, start: void 0 };
18499
18556
  }
18500
18557
  var ProcessStreamRequest = {
18501
18558
  encode(message, writer = import_minimal10.default.Writer.create()) {
@@ -18508,6 +18565,9 @@ var ProcessStreamRequest = {
18508
18565
  if (message.dbResult !== void 0) {
18509
18566
  DBResponse.encode(message.dbResult, writer.uint32(26).fork()).ldelim();
18510
18567
  }
18568
+ if (message.start !== void 0) {
18569
+ writer.uint32(32).bool(message.start);
18570
+ }
18511
18571
  return writer;
18512
18572
  },
18513
18573
  decode(input, length) {
@@ -18535,6 +18595,12 @@ var ProcessStreamRequest = {
18535
18595
  }
18536
18596
  message.dbResult = DBResponse.decode(reader, reader.uint32());
18537
18597
  continue;
18598
+ case 4:
18599
+ if (tag !== 32) {
18600
+ break;
18601
+ }
18602
+ message.start = reader.bool();
18603
+ continue;
18538
18604
  }
18539
18605
  if ((tag & 7) === 4 || tag === 0) {
18540
18606
  break;
@@ -18547,7 +18613,8 @@ var ProcessStreamRequest = {
18547
18613
  return {
18548
18614
  processId: isSet8(object.processId) ? globalThis.Number(object.processId) : 0,
18549
18615
  binding: isSet8(object.binding) ? DataBinding2.fromJSON(object.binding) : void 0,
18550
- dbResult: isSet8(object.dbResult) ? DBResponse.fromJSON(object.dbResult) : void 0
18616
+ dbResult: isSet8(object.dbResult) ? DBResponse.fromJSON(object.dbResult) : void 0,
18617
+ start: isSet8(object.start) ? globalThis.Boolean(object.start) : void 0
18551
18618
  };
18552
18619
  },
18553
18620
  toJSON(message) {
@@ -18561,6 +18628,9 @@ var ProcessStreamRequest = {
18561
18628
  if (message.dbResult !== void 0) {
18562
18629
  obj.dbResult = DBResponse.toJSON(message.dbResult);
18563
18630
  }
18631
+ if (message.start !== void 0) {
18632
+ obj.start = message.start;
18633
+ }
18564
18634
  return obj;
18565
18635
  },
18566
18636
  create(base) {
@@ -18571,11 +18641,12 @@ var ProcessStreamRequest = {
18571
18641
  message.processId = object.processId ?? 0;
18572
18642
  message.binding = object.binding !== void 0 && object.binding !== null ? DataBinding2.fromPartial(object.binding) : void 0;
18573
18643
  message.dbResult = object.dbResult !== void 0 && object.dbResult !== null ? DBResponse.fromPartial(object.dbResult) : void 0;
18644
+ message.start = object.start ?? void 0;
18574
18645
  return message;
18575
18646
  }
18576
18647
  };
18577
18648
  function createBaseProcessStreamResponse() {
18578
- return { processId: 0, dbRequest: void 0, result: void 0 };
18649
+ return { processId: 0, dbRequest: void 0, result: void 0, partitions: void 0 };
18579
18650
  }
18580
18651
  var ProcessStreamResponse = {
18581
18652
  encode(message, writer = import_minimal10.default.Writer.create()) {
@@ -18588,6 +18659,9 @@ var ProcessStreamResponse = {
18588
18659
  if (message.result !== void 0) {
18589
18660
  ProcessResult2.encode(message.result, writer.uint32(26).fork()).ldelim();
18590
18661
  }
18662
+ if (message.partitions !== void 0) {
18663
+ ProcessStreamResponse_Partitions2.encode(message.partitions, writer.uint32(34).fork()).ldelim();
18664
+ }
18591
18665
  return writer;
18592
18666
  },
18593
18667
  decode(input, length) {
@@ -18615,6 +18689,12 @@ var ProcessStreamResponse = {
18615
18689
  }
18616
18690
  message.result = ProcessResult2.decode(reader, reader.uint32());
18617
18691
  continue;
18692
+ case 4:
18693
+ if (tag !== 34) {
18694
+ break;
18695
+ }
18696
+ message.partitions = ProcessStreamResponse_Partitions2.decode(reader, reader.uint32());
18697
+ continue;
18618
18698
  }
18619
18699
  if ((tag & 7) === 4 || tag === 0) {
18620
18700
  break;
@@ -18627,7 +18707,8 @@ var ProcessStreamResponse = {
18627
18707
  return {
18628
18708
  processId: isSet8(object.processId) ? globalThis.Number(object.processId) : 0,
18629
18709
  dbRequest: isSet8(object.dbRequest) ? DBRequest.fromJSON(object.dbRequest) : void 0,
18630
- result: isSet8(object.result) ? ProcessResult2.fromJSON(object.result) : void 0
18710
+ result: isSet8(object.result) ? ProcessResult2.fromJSON(object.result) : void 0,
18711
+ partitions: isSet8(object.partitions) ? ProcessStreamResponse_Partitions2.fromJSON(object.partitions) : void 0
18631
18712
  };
18632
18713
  },
18633
18714
  toJSON(message) {
@@ -18641,6 +18722,9 @@ var ProcessStreamResponse = {
18641
18722
  if (message.result !== void 0) {
18642
18723
  obj.result = ProcessResult2.toJSON(message.result);
18643
18724
  }
18725
+ if (message.partitions !== void 0) {
18726
+ obj.partitions = ProcessStreamResponse_Partitions2.toJSON(message.partitions);
18727
+ }
18644
18728
  return obj;
18645
18729
  },
18646
18730
  create(base) {
@@ -18651,6 +18735,211 @@ var ProcessStreamResponse = {
18651
18735
  message.processId = object.processId ?? 0;
18652
18736
  message.dbRequest = object.dbRequest !== void 0 && object.dbRequest !== null ? DBRequest.fromPartial(object.dbRequest) : void 0;
18653
18737
  message.result = object.result !== void 0 && object.result !== null ? ProcessResult2.fromPartial(object.result) : void 0;
18738
+ message.partitions = object.partitions !== void 0 && object.partitions !== null ? ProcessStreamResponse_Partitions2.fromPartial(object.partitions) : void 0;
18739
+ return message;
18740
+ }
18741
+ };
18742
+ function createBaseProcessStreamResponse_Partitions() {
18743
+ return { partitions: {} };
18744
+ }
18745
+ var ProcessStreamResponse_Partitions2 = {
18746
+ encode(message, writer = import_minimal10.default.Writer.create()) {
18747
+ Object.entries(message.partitions).forEach(([key, value]) => {
18748
+ ProcessStreamResponse_Partitions_PartitionsEntry.encode({ key, value }, writer.uint32(10).fork()).ldelim();
18749
+ });
18750
+ return writer;
18751
+ },
18752
+ decode(input, length) {
18753
+ const reader = input instanceof import_minimal10.default.Reader ? input : import_minimal10.default.Reader.create(input);
18754
+ let end = length === void 0 ? reader.len : reader.pos + length;
18755
+ const message = createBaseProcessStreamResponse_Partitions();
18756
+ while (reader.pos < end) {
18757
+ const tag = reader.uint32();
18758
+ switch (tag >>> 3) {
18759
+ case 1:
18760
+ if (tag !== 10) {
18761
+ break;
18762
+ }
18763
+ const entry1 = ProcessStreamResponse_Partitions_PartitionsEntry.decode(reader, reader.uint32());
18764
+ if (entry1.value !== void 0) {
18765
+ message.partitions[entry1.key] = entry1.value;
18766
+ }
18767
+ continue;
18768
+ }
18769
+ if ((tag & 7) === 4 || tag === 0) {
18770
+ break;
18771
+ }
18772
+ reader.skipType(tag & 7);
18773
+ }
18774
+ return message;
18775
+ },
18776
+ fromJSON(object) {
18777
+ return {
18778
+ partitions: isObject6(object.partitions) ? Object.entries(object.partitions).reduce(
18779
+ (acc, [key, value]) => {
18780
+ acc[globalThis.Number(key)] = ProcessStreamResponse_Partitions_Partition.fromJSON(value);
18781
+ return acc;
18782
+ },
18783
+ {}
18784
+ ) : {}
18785
+ };
18786
+ },
18787
+ toJSON(message) {
18788
+ const obj = {};
18789
+ if (message.partitions) {
18790
+ const entries = Object.entries(message.partitions);
18791
+ if (entries.length > 0) {
18792
+ obj.partitions = {};
18793
+ entries.forEach(([k, v]) => {
18794
+ obj.partitions[k] = ProcessStreamResponse_Partitions_Partition.toJSON(v);
18795
+ });
18796
+ }
18797
+ }
18798
+ return obj;
18799
+ },
18800
+ create(base) {
18801
+ return ProcessStreamResponse_Partitions2.fromPartial(base ?? {});
18802
+ },
18803
+ fromPartial(object) {
18804
+ const message = createBaseProcessStreamResponse_Partitions();
18805
+ message.partitions = Object.entries(object.partitions ?? {}).reduce((acc, [key, value]) => {
18806
+ if (value !== void 0) {
18807
+ acc[globalThis.Number(key)] = ProcessStreamResponse_Partitions_Partition.fromPartial(value);
18808
+ }
18809
+ return acc;
18810
+ }, {});
18811
+ return message;
18812
+ }
18813
+ };
18814
+ function createBaseProcessStreamResponse_Partitions_Partition() {
18815
+ return { userValue: void 0, sysValue: void 0 };
18816
+ }
18817
+ var ProcessStreamResponse_Partitions_Partition = {
18818
+ encode(message, writer = import_minimal10.default.Writer.create()) {
18819
+ if (message.userValue !== void 0) {
18820
+ writer.uint32(10).string(message.userValue);
18821
+ }
18822
+ if (message.sysValue !== void 0) {
18823
+ writer.uint32(16).int32(message.sysValue);
18824
+ }
18825
+ return writer;
18826
+ },
18827
+ decode(input, length) {
18828
+ const reader = input instanceof import_minimal10.default.Reader ? input : import_minimal10.default.Reader.create(input);
18829
+ let end = length === void 0 ? reader.len : reader.pos + length;
18830
+ const message = createBaseProcessStreamResponse_Partitions_Partition();
18831
+ while (reader.pos < end) {
18832
+ const tag = reader.uint32();
18833
+ switch (tag >>> 3) {
18834
+ case 1:
18835
+ if (tag !== 10) {
18836
+ break;
18837
+ }
18838
+ message.userValue = reader.string();
18839
+ continue;
18840
+ case 2:
18841
+ if (tag !== 16) {
18842
+ break;
18843
+ }
18844
+ message.sysValue = reader.int32();
18845
+ continue;
18846
+ }
18847
+ if ((tag & 7) === 4 || tag === 0) {
18848
+ break;
18849
+ }
18850
+ reader.skipType(tag & 7);
18851
+ }
18852
+ return message;
18853
+ },
18854
+ fromJSON(object) {
18855
+ return {
18856
+ userValue: isSet8(object.userValue) ? globalThis.String(object.userValue) : void 0,
18857
+ sysValue: isSet8(object.sysValue) ? processStreamResponse_Partitions_Partition_SysValueFromJSON(object.sysValue) : void 0
18858
+ };
18859
+ },
18860
+ toJSON(message) {
18861
+ const obj = {};
18862
+ if (message.userValue !== void 0) {
18863
+ obj.userValue = message.userValue;
18864
+ }
18865
+ if (message.sysValue !== void 0) {
18866
+ obj.sysValue = processStreamResponse_Partitions_Partition_SysValueToJSON(message.sysValue);
18867
+ }
18868
+ return obj;
18869
+ },
18870
+ create(base) {
18871
+ return ProcessStreamResponse_Partitions_Partition.fromPartial(base ?? {});
18872
+ },
18873
+ fromPartial(object) {
18874
+ const message = createBaseProcessStreamResponse_Partitions_Partition();
18875
+ message.userValue = object.userValue ?? void 0;
18876
+ message.sysValue = object.sysValue ?? void 0;
18877
+ return message;
18878
+ }
18879
+ };
18880
+ function createBaseProcessStreamResponse_Partitions_PartitionsEntry() {
18881
+ return { key: 0, value: void 0 };
18882
+ }
18883
+ var ProcessStreamResponse_Partitions_PartitionsEntry = {
18884
+ encode(message, writer = import_minimal10.default.Writer.create()) {
18885
+ if (message.key !== 0) {
18886
+ writer.uint32(8).int32(message.key);
18887
+ }
18888
+ if (message.value !== void 0) {
18889
+ ProcessStreamResponse_Partitions_Partition.encode(message.value, writer.uint32(18).fork()).ldelim();
18890
+ }
18891
+ return writer;
18892
+ },
18893
+ decode(input, length) {
18894
+ const reader = input instanceof import_minimal10.default.Reader ? input : import_minimal10.default.Reader.create(input);
18895
+ let end = length === void 0 ? reader.len : reader.pos + length;
18896
+ const message = createBaseProcessStreamResponse_Partitions_PartitionsEntry();
18897
+ while (reader.pos < end) {
18898
+ const tag = reader.uint32();
18899
+ switch (tag >>> 3) {
18900
+ case 1:
18901
+ if (tag !== 8) {
18902
+ break;
18903
+ }
18904
+ message.key = reader.int32();
18905
+ continue;
18906
+ case 2:
18907
+ if (tag !== 18) {
18908
+ break;
18909
+ }
18910
+ message.value = ProcessStreamResponse_Partitions_Partition.decode(reader, reader.uint32());
18911
+ continue;
18912
+ }
18913
+ if ((tag & 7) === 4 || tag === 0) {
18914
+ break;
18915
+ }
18916
+ reader.skipType(tag & 7);
18917
+ }
18918
+ return message;
18919
+ },
18920
+ fromJSON(object) {
18921
+ return {
18922
+ key: isSet8(object.key) ? globalThis.Number(object.key) : 0,
18923
+ value: isSet8(object.value) ? ProcessStreamResponse_Partitions_Partition.fromJSON(object.value) : void 0
18924
+ };
18925
+ },
18926
+ toJSON(message) {
18927
+ const obj = {};
18928
+ if (message.key !== 0) {
18929
+ obj.key = Math.round(message.key);
18930
+ }
18931
+ if (message.value !== void 0) {
18932
+ obj.value = ProcessStreamResponse_Partitions_Partition.toJSON(message.value);
18933
+ }
18934
+ return obj;
18935
+ },
18936
+ create(base) {
18937
+ return ProcessStreamResponse_Partitions_PartitionsEntry.fromPartial(base ?? {});
18938
+ },
18939
+ fromPartial(object) {
18940
+ const message = createBaseProcessStreamResponse_Partitions_PartitionsEntry();
18941
+ message.key = object.key ?? 0;
18942
+ message.value = object.value !== void 0 && object.value !== null ? ProcessStreamResponse_Partitions_Partition.fromPartial(object.value) : void 0;
18654
18943
  return message;
18655
18944
  }
18656
18945
  };
@@ -23692,4 +23981,4 @@ long/index.js:
23692
23981
  * SPDX-License-Identifier: Apache-2.0
23693
23982
  *)
23694
23983
  */
23695
- //# sourceMappingURL=chunk-45FF2A6M.js.map
23984
+ //# sourceMappingURL=chunk-HMNYJB5K.js.map