@sentio/runtime 2.39.3 → 2.39.4-rc.10
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.
- package/lib/db-context.d.ts +5 -131
- package/lib/db-context.d.ts.map +1 -1
- package/lib/db-context.js +11 -9
- package/lib/db-context.js.map +1 -1
- package/lib/endpoints.d.ts +1 -0
- package/lib/endpoints.d.ts.map +1 -1
- package/lib/endpoints.js +1 -0
- package/lib/endpoints.js.map +1 -1
- package/lib/full-service.d.ts +55 -2
- package/lib/full-service.d.ts.map +1 -1
- package/lib/gen/processor/protos/processor.d.ts +59 -15
- package/lib/gen/processor/protos/processor.d.ts.map +1 -1
- package/lib/gen/processor/protos/processor.js +408 -88
- package/lib/gen/processor/protos/processor.js.map +1 -1
- package/lib/gen/service/common/protos/common.d.ts +97 -0
- package/lib/gen/service/common/protos/common.d.ts.map +1 -1
- package/lib/gen/service/common/protos/common.js +624 -0
- package/lib/gen/service/common/protos/common.js.map +1 -1
- package/lib/processor-runner.js +2 -0
- package/lib/processor-runner.js.map +1 -1
- package/lib/service.d.ts +56 -2
- package/lib/service.d.ts.map +1 -1
- package/lib/service.js +36 -28
- package/lib/service.js.map +1 -1
- package/package.json +2 -2
- package/src/db-context.ts +9 -7
- package/src/endpoints.ts +2 -0
- package/src/gen/processor/protos/processor.ts +465 -103
- package/src/gen/service/common/protos/common.ts +727 -0
- package/src/processor-runner.ts +2 -0
- package/src/service.ts +44 -28
@@ -5,7 +5,7 @@ import _m0 from "protobufjs/minimal.js";
|
|
5
5
|
import { Empty } from "../../google/protobuf/empty.js";
|
6
6
|
import { ListValue, Struct } from "../../google/protobuf/struct.js";
|
7
7
|
import { Timestamp } from "../../google/protobuf/timestamp.js";
|
8
|
-
import { CoinID } from "../../service/common/protos/common.js";
|
8
|
+
import { BigInteger, CoinID, RichStruct, RichStructList, RichValueList } from "../../service/common/protos/common.js";
|
9
9
|
|
10
10
|
export enum MetricType {
|
11
11
|
UNKNOWN_TYPE = 0,
|
@@ -756,6 +756,21 @@ export interface DBResponse {
|
|
756
756
|
data?: { [key: string]: any } | undefined;
|
757
757
|
list?: Array<any> | undefined;
|
758
758
|
error?: string | undefined;
|
759
|
+
entities?: RichStructList | undefined;
|
760
|
+
entityList?: EntityList | undefined;
|
761
|
+
nextCursor?: string | undefined;
|
762
|
+
}
|
763
|
+
|
764
|
+
export interface Entity {
|
765
|
+
entity: string;
|
766
|
+
genBlockNumber: bigint;
|
767
|
+
genBlockChain: string;
|
768
|
+
genBlockTime: Date | undefined;
|
769
|
+
data: RichStruct | undefined;
|
770
|
+
}
|
771
|
+
|
772
|
+
export interface EntityList {
|
773
|
+
entities: Entity[];
|
759
774
|
}
|
760
775
|
|
761
776
|
export interface DBRequest {
|
@@ -766,6 +781,75 @@ export interface DBRequest {
|
|
766
781
|
list?: DBRequest_DBList | undefined;
|
767
782
|
}
|
768
783
|
|
784
|
+
export enum DBRequest_DBOperator {
|
785
|
+
EQ = 0,
|
786
|
+
NE = 1,
|
787
|
+
GT = 2,
|
788
|
+
GE = 3,
|
789
|
+
LT = 4,
|
790
|
+
LE = 5,
|
791
|
+
IN = 6,
|
792
|
+
NOT_IN = 7,
|
793
|
+
UNRECOGNIZED = -1,
|
794
|
+
}
|
795
|
+
|
796
|
+
export function dBRequest_DBOperatorFromJSON(object: any): DBRequest_DBOperator {
|
797
|
+
switch (object) {
|
798
|
+
case 0:
|
799
|
+
case "EQ":
|
800
|
+
return DBRequest_DBOperator.EQ;
|
801
|
+
case 1:
|
802
|
+
case "NE":
|
803
|
+
return DBRequest_DBOperator.NE;
|
804
|
+
case 2:
|
805
|
+
case "GT":
|
806
|
+
return DBRequest_DBOperator.GT;
|
807
|
+
case 3:
|
808
|
+
case "GE":
|
809
|
+
return DBRequest_DBOperator.GE;
|
810
|
+
case 4:
|
811
|
+
case "LT":
|
812
|
+
return DBRequest_DBOperator.LT;
|
813
|
+
case 5:
|
814
|
+
case "LE":
|
815
|
+
return DBRequest_DBOperator.LE;
|
816
|
+
case 6:
|
817
|
+
case "IN":
|
818
|
+
return DBRequest_DBOperator.IN;
|
819
|
+
case 7:
|
820
|
+
case "NOT_IN":
|
821
|
+
return DBRequest_DBOperator.NOT_IN;
|
822
|
+
case -1:
|
823
|
+
case "UNRECOGNIZED":
|
824
|
+
default:
|
825
|
+
return DBRequest_DBOperator.UNRECOGNIZED;
|
826
|
+
}
|
827
|
+
}
|
828
|
+
|
829
|
+
export function dBRequest_DBOperatorToJSON(object: DBRequest_DBOperator): string {
|
830
|
+
switch (object) {
|
831
|
+
case DBRequest_DBOperator.EQ:
|
832
|
+
return "EQ";
|
833
|
+
case DBRequest_DBOperator.NE:
|
834
|
+
return "NE";
|
835
|
+
case DBRequest_DBOperator.GT:
|
836
|
+
return "GT";
|
837
|
+
case DBRequest_DBOperator.GE:
|
838
|
+
return "GE";
|
839
|
+
case DBRequest_DBOperator.LT:
|
840
|
+
return "LT";
|
841
|
+
case DBRequest_DBOperator.LE:
|
842
|
+
return "LE";
|
843
|
+
case DBRequest_DBOperator.IN:
|
844
|
+
return "IN";
|
845
|
+
case DBRequest_DBOperator.NOT_IN:
|
846
|
+
return "NOT_IN";
|
847
|
+
case DBRequest_DBOperator.UNRECOGNIZED:
|
848
|
+
default:
|
849
|
+
return "UNRECOGNIZED";
|
850
|
+
}
|
851
|
+
}
|
852
|
+
|
769
853
|
export interface DBRequest_DBGet {
|
770
854
|
entity: string;
|
771
855
|
id: string;
|
@@ -773,14 +857,15 @@ export interface DBRequest_DBGet {
|
|
773
857
|
|
774
858
|
export interface DBRequest_DBList {
|
775
859
|
entity: string;
|
776
|
-
|
777
|
-
|
860
|
+
filters: DBRequest_DBFilter[];
|
861
|
+
cursor: string;
|
778
862
|
}
|
779
863
|
|
780
864
|
export interface DBRequest_DBUpsert {
|
781
865
|
entity: string[];
|
782
866
|
id: string[];
|
783
867
|
data: { [key: string]: any }[];
|
868
|
+
entityData: RichStruct[];
|
784
869
|
}
|
785
870
|
|
786
871
|
export interface DBRequest_DBDelete {
|
@@ -788,6 +873,12 @@ export interface DBRequest_DBDelete {
|
|
788
873
|
id: string[];
|
789
874
|
}
|
790
875
|
|
876
|
+
export interface DBRequest_DBFilter {
|
877
|
+
field: string;
|
878
|
+
op: DBRequest_DBOperator;
|
879
|
+
value: RichValueList | undefined;
|
880
|
+
}
|
881
|
+
|
791
882
|
export interface Data {
|
792
883
|
/** @deprecated */
|
793
884
|
raw: Uint8Array;
|
@@ -937,11 +1028,6 @@ export interface MetricValue {
|
|
937
1028
|
bigInteger?: BigInteger | undefined;
|
938
1029
|
}
|
939
1030
|
|
940
|
-
export interface BigInteger {
|
941
|
-
negative: boolean;
|
942
|
-
data: Uint8Array;
|
943
|
-
}
|
944
|
-
|
945
1031
|
export interface RuntimeInfo {
|
946
1032
|
from: HandlerType;
|
947
1033
|
}
|
@@ -5805,7 +5891,15 @@ export const ProcessStreamResponse = {
|
|
5805
5891
|
};
|
5806
5892
|
|
5807
5893
|
function createBaseDBResponse(): DBResponse {
|
5808
|
-
return {
|
5894
|
+
return {
|
5895
|
+
opId: BigInt("0"),
|
5896
|
+
data: undefined,
|
5897
|
+
list: undefined,
|
5898
|
+
error: undefined,
|
5899
|
+
entities: undefined,
|
5900
|
+
entityList: undefined,
|
5901
|
+
nextCursor: undefined,
|
5902
|
+
};
|
5809
5903
|
}
|
5810
5904
|
|
5811
5905
|
export const DBResponse = {
|
@@ -5825,6 +5919,15 @@ export const DBResponse = {
|
|
5825
5919
|
if (message.error !== undefined) {
|
5826
5920
|
writer.uint32(26).string(message.error);
|
5827
5921
|
}
|
5922
|
+
if (message.entities !== undefined) {
|
5923
|
+
RichStructList.encode(message.entities, writer.uint32(50).fork()).ldelim();
|
5924
|
+
}
|
5925
|
+
if (message.entityList !== undefined) {
|
5926
|
+
EntityList.encode(message.entityList, writer.uint32(58).fork()).ldelim();
|
5927
|
+
}
|
5928
|
+
if (message.nextCursor !== undefined) {
|
5929
|
+
writer.uint32(42).string(message.nextCursor);
|
5930
|
+
}
|
5828
5931
|
return writer;
|
5829
5932
|
},
|
5830
5933
|
|
@@ -5863,6 +5966,27 @@ export const DBResponse = {
|
|
5863
5966
|
|
5864
5967
|
message.error = reader.string();
|
5865
5968
|
continue;
|
5969
|
+
case 6:
|
5970
|
+
if (tag !== 50) {
|
5971
|
+
break;
|
5972
|
+
}
|
5973
|
+
|
5974
|
+
message.entities = RichStructList.decode(reader, reader.uint32());
|
5975
|
+
continue;
|
5976
|
+
case 7:
|
5977
|
+
if (tag !== 58) {
|
5978
|
+
break;
|
5979
|
+
}
|
5980
|
+
|
5981
|
+
message.entityList = EntityList.decode(reader, reader.uint32());
|
5982
|
+
continue;
|
5983
|
+
case 5:
|
5984
|
+
if (tag !== 42) {
|
5985
|
+
break;
|
5986
|
+
}
|
5987
|
+
|
5988
|
+
message.nextCursor = reader.string();
|
5989
|
+
continue;
|
5866
5990
|
}
|
5867
5991
|
if ((tag & 7) === 4 || tag === 0) {
|
5868
5992
|
break;
|
@@ -5878,6 +6002,9 @@ export const DBResponse = {
|
|
5878
6002
|
data: isObject(object.data) ? object.data : undefined,
|
5879
6003
|
list: globalThis.Array.isArray(object.list) ? [...object.list] : undefined,
|
5880
6004
|
error: isSet(object.error) ? globalThis.String(object.error) : undefined,
|
6005
|
+
entities: isSet(object.entities) ? RichStructList.fromJSON(object.entities) : undefined,
|
6006
|
+
entityList: isSet(object.entityList) ? EntityList.fromJSON(object.entityList) : undefined,
|
6007
|
+
nextCursor: isSet(object.nextCursor) ? globalThis.String(object.nextCursor) : undefined,
|
5881
6008
|
};
|
5882
6009
|
},
|
5883
6010
|
|
@@ -5895,6 +6022,15 @@ export const DBResponse = {
|
|
5895
6022
|
if (message.error !== undefined) {
|
5896
6023
|
obj.error = message.error;
|
5897
6024
|
}
|
6025
|
+
if (message.entities !== undefined) {
|
6026
|
+
obj.entities = RichStructList.toJSON(message.entities);
|
6027
|
+
}
|
6028
|
+
if (message.entityList !== undefined) {
|
6029
|
+
obj.entityList = EntityList.toJSON(message.entityList);
|
6030
|
+
}
|
6031
|
+
if (message.nextCursor !== undefined) {
|
6032
|
+
obj.nextCursor = message.nextCursor;
|
6033
|
+
}
|
5898
6034
|
return obj;
|
5899
6035
|
},
|
5900
6036
|
|
@@ -5907,6 +6043,196 @@ export const DBResponse = {
|
|
5907
6043
|
message.data = object.data ?? undefined;
|
5908
6044
|
message.list = object.list ?? undefined;
|
5909
6045
|
message.error = object.error ?? undefined;
|
6046
|
+
message.entities = (object.entities !== undefined && object.entities !== null)
|
6047
|
+
? RichStructList.fromPartial(object.entities)
|
6048
|
+
: undefined;
|
6049
|
+
message.entityList = (object.entityList !== undefined && object.entityList !== null)
|
6050
|
+
? EntityList.fromPartial(object.entityList)
|
6051
|
+
: undefined;
|
6052
|
+
message.nextCursor = object.nextCursor ?? undefined;
|
6053
|
+
return message;
|
6054
|
+
},
|
6055
|
+
};
|
6056
|
+
|
6057
|
+
function createBaseEntity(): Entity {
|
6058
|
+
return { entity: "", genBlockNumber: BigInt("0"), genBlockChain: "", genBlockTime: undefined, data: undefined };
|
6059
|
+
}
|
6060
|
+
|
6061
|
+
export const Entity = {
|
6062
|
+
encode(message: Entity, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
6063
|
+
if (message.entity !== "") {
|
6064
|
+
writer.uint32(10).string(message.entity);
|
6065
|
+
}
|
6066
|
+
if (message.genBlockNumber !== BigInt("0")) {
|
6067
|
+
if (BigInt.asUintN(64, message.genBlockNumber) !== message.genBlockNumber) {
|
6068
|
+
throw new globalThis.Error("value provided for field message.genBlockNumber of type uint64 too large");
|
6069
|
+
}
|
6070
|
+
writer.uint32(16).uint64(message.genBlockNumber.toString());
|
6071
|
+
}
|
6072
|
+
if (message.genBlockChain !== "") {
|
6073
|
+
writer.uint32(26).string(message.genBlockChain);
|
6074
|
+
}
|
6075
|
+
if (message.genBlockTime !== undefined) {
|
6076
|
+
Timestamp.encode(toTimestamp(message.genBlockTime), writer.uint32(34).fork()).ldelim();
|
6077
|
+
}
|
6078
|
+
if (message.data !== undefined) {
|
6079
|
+
RichStruct.encode(message.data, writer.uint32(42).fork()).ldelim();
|
6080
|
+
}
|
6081
|
+
return writer;
|
6082
|
+
},
|
6083
|
+
|
6084
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): Entity {
|
6085
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
6086
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
6087
|
+
const message = createBaseEntity();
|
6088
|
+
while (reader.pos < end) {
|
6089
|
+
const tag = reader.uint32();
|
6090
|
+
switch (tag >>> 3) {
|
6091
|
+
case 1:
|
6092
|
+
if (tag !== 10) {
|
6093
|
+
break;
|
6094
|
+
}
|
6095
|
+
|
6096
|
+
message.entity = reader.string();
|
6097
|
+
continue;
|
6098
|
+
case 2:
|
6099
|
+
if (tag !== 16) {
|
6100
|
+
break;
|
6101
|
+
}
|
6102
|
+
|
6103
|
+
message.genBlockNumber = longToBigint(reader.uint64() as Long);
|
6104
|
+
continue;
|
6105
|
+
case 3:
|
6106
|
+
if (tag !== 26) {
|
6107
|
+
break;
|
6108
|
+
}
|
6109
|
+
|
6110
|
+
message.genBlockChain = reader.string();
|
6111
|
+
continue;
|
6112
|
+
case 4:
|
6113
|
+
if (tag !== 34) {
|
6114
|
+
break;
|
6115
|
+
}
|
6116
|
+
|
6117
|
+
message.genBlockTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
6118
|
+
continue;
|
6119
|
+
case 5:
|
6120
|
+
if (tag !== 42) {
|
6121
|
+
break;
|
6122
|
+
}
|
6123
|
+
|
6124
|
+
message.data = RichStruct.decode(reader, reader.uint32());
|
6125
|
+
continue;
|
6126
|
+
}
|
6127
|
+
if ((tag & 7) === 4 || tag === 0) {
|
6128
|
+
break;
|
6129
|
+
}
|
6130
|
+
reader.skipType(tag & 7);
|
6131
|
+
}
|
6132
|
+
return message;
|
6133
|
+
},
|
6134
|
+
|
6135
|
+
fromJSON(object: any): Entity {
|
6136
|
+
return {
|
6137
|
+
entity: isSet(object.entity) ? globalThis.String(object.entity) : "",
|
6138
|
+
genBlockNumber: isSet(object.genBlockNumber) ? BigInt(object.genBlockNumber) : BigInt("0"),
|
6139
|
+
genBlockChain: isSet(object.genBlockChain) ? globalThis.String(object.genBlockChain) : "",
|
6140
|
+
genBlockTime: isSet(object.genBlockTime) ? fromJsonTimestamp(object.genBlockTime) : undefined,
|
6141
|
+
data: isSet(object.data) ? RichStruct.fromJSON(object.data) : undefined,
|
6142
|
+
};
|
6143
|
+
},
|
6144
|
+
|
6145
|
+
toJSON(message: Entity): unknown {
|
6146
|
+
const obj: any = {};
|
6147
|
+
if (message.entity !== "") {
|
6148
|
+
obj.entity = message.entity;
|
6149
|
+
}
|
6150
|
+
if (message.genBlockNumber !== BigInt("0")) {
|
6151
|
+
obj.genBlockNumber = message.genBlockNumber.toString();
|
6152
|
+
}
|
6153
|
+
if (message.genBlockChain !== "") {
|
6154
|
+
obj.genBlockChain = message.genBlockChain;
|
6155
|
+
}
|
6156
|
+
if (message.genBlockTime !== undefined) {
|
6157
|
+
obj.genBlockTime = message.genBlockTime.toISOString();
|
6158
|
+
}
|
6159
|
+
if (message.data !== undefined) {
|
6160
|
+
obj.data = RichStruct.toJSON(message.data);
|
6161
|
+
}
|
6162
|
+
return obj;
|
6163
|
+
},
|
6164
|
+
|
6165
|
+
create(base?: DeepPartial<Entity>): Entity {
|
6166
|
+
return Entity.fromPartial(base ?? {});
|
6167
|
+
},
|
6168
|
+
fromPartial(object: DeepPartial<Entity>): Entity {
|
6169
|
+
const message = createBaseEntity();
|
6170
|
+
message.entity = object.entity ?? "";
|
6171
|
+
message.genBlockNumber = object.genBlockNumber ?? BigInt("0");
|
6172
|
+
message.genBlockChain = object.genBlockChain ?? "";
|
6173
|
+
message.genBlockTime = object.genBlockTime ?? undefined;
|
6174
|
+
message.data = (object.data !== undefined && object.data !== null)
|
6175
|
+
? RichStruct.fromPartial(object.data)
|
6176
|
+
: undefined;
|
6177
|
+
return message;
|
6178
|
+
},
|
6179
|
+
};
|
6180
|
+
|
6181
|
+
function createBaseEntityList(): EntityList {
|
6182
|
+
return { entities: [] };
|
6183
|
+
}
|
6184
|
+
|
6185
|
+
export const EntityList = {
|
6186
|
+
encode(message: EntityList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
6187
|
+
for (const v of message.entities) {
|
6188
|
+
Entity.encode(v!, writer.uint32(10).fork()).ldelim();
|
6189
|
+
}
|
6190
|
+
return writer;
|
6191
|
+
},
|
6192
|
+
|
6193
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): EntityList {
|
6194
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
6195
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
6196
|
+
const message = createBaseEntityList();
|
6197
|
+
while (reader.pos < end) {
|
6198
|
+
const tag = reader.uint32();
|
6199
|
+
switch (tag >>> 3) {
|
6200
|
+
case 1:
|
6201
|
+
if (tag !== 10) {
|
6202
|
+
break;
|
6203
|
+
}
|
6204
|
+
|
6205
|
+
message.entities.push(Entity.decode(reader, reader.uint32()));
|
6206
|
+
continue;
|
6207
|
+
}
|
6208
|
+
if ((tag & 7) === 4 || tag === 0) {
|
6209
|
+
break;
|
6210
|
+
}
|
6211
|
+
reader.skipType(tag & 7);
|
6212
|
+
}
|
6213
|
+
return message;
|
6214
|
+
},
|
6215
|
+
|
6216
|
+
fromJSON(object: any): EntityList {
|
6217
|
+
return {
|
6218
|
+
entities: globalThis.Array.isArray(object?.entities) ? object.entities.map((e: any) => Entity.fromJSON(e)) : [],
|
6219
|
+
};
|
6220
|
+
},
|
6221
|
+
|
6222
|
+
toJSON(message: EntityList): unknown {
|
6223
|
+
const obj: any = {};
|
6224
|
+
if (message.entities?.length) {
|
6225
|
+
obj.entities = message.entities.map((e) => Entity.toJSON(e));
|
6226
|
+
}
|
6227
|
+
return obj;
|
6228
|
+
},
|
6229
|
+
|
6230
|
+
create(base?: DeepPartial<EntityList>): EntityList {
|
6231
|
+
return EntityList.fromPartial(base ?? {});
|
6232
|
+
},
|
6233
|
+
fromPartial(object: DeepPartial<EntityList>): EntityList {
|
6234
|
+
const message = createBaseEntityList();
|
6235
|
+
message.entities = object.entities?.map((e) => Entity.fromPartial(e)) || [];
|
5910
6236
|
return message;
|
5911
6237
|
},
|
5912
6238
|
};
|
@@ -6116,7 +6442,7 @@ export const DBRequest_DBGet = {
|
|
6116
6442
|
};
|
6117
6443
|
|
6118
6444
|
function createBaseDBRequest_DBList(): DBRequest_DBList {
|
6119
|
-
return { entity: "",
|
6445
|
+
return { entity: "", filters: [], cursor: "" };
|
6120
6446
|
}
|
6121
6447
|
|
6122
6448
|
export const DBRequest_DBList = {
|
@@ -6124,11 +6450,11 @@ export const DBRequest_DBList = {
|
|
6124
6450
|
if (message.entity !== "") {
|
6125
6451
|
writer.uint32(10).string(message.entity);
|
6126
6452
|
}
|
6127
|
-
|
6128
|
-
writer.uint32(
|
6453
|
+
for (const v of message.filters) {
|
6454
|
+
DBRequest_DBFilter.encode(v!, writer.uint32(34).fork()).ldelim();
|
6129
6455
|
}
|
6130
|
-
if (message.
|
6131
|
-
writer.uint32(
|
6456
|
+
if (message.cursor !== "") {
|
6457
|
+
writer.uint32(42).string(message.cursor);
|
6132
6458
|
}
|
6133
6459
|
return writer;
|
6134
6460
|
},
|
@@ -6147,19 +6473,19 @@ export const DBRequest_DBList = {
|
|
6147
6473
|
|
6148
6474
|
message.entity = reader.string();
|
6149
6475
|
continue;
|
6150
|
-
case
|
6151
|
-
if (tag !==
|
6476
|
+
case 4:
|
6477
|
+
if (tag !== 34) {
|
6152
6478
|
break;
|
6153
6479
|
}
|
6154
6480
|
|
6155
|
-
message.
|
6481
|
+
message.filters.push(DBRequest_DBFilter.decode(reader, reader.uint32()));
|
6156
6482
|
continue;
|
6157
|
-
case
|
6158
|
-
if (tag !==
|
6483
|
+
case 5:
|
6484
|
+
if (tag !== 42) {
|
6159
6485
|
break;
|
6160
6486
|
}
|
6161
6487
|
|
6162
|
-
message.
|
6488
|
+
message.cursor = reader.string();
|
6163
6489
|
continue;
|
6164
6490
|
}
|
6165
6491
|
if ((tag & 7) === 4 || tag === 0) {
|
@@ -6173,8 +6499,10 @@ export const DBRequest_DBList = {
|
|
6173
6499
|
fromJSON(object: any): DBRequest_DBList {
|
6174
6500
|
return {
|
6175
6501
|
entity: isSet(object.entity) ? globalThis.String(object.entity) : "",
|
6176
|
-
|
6177
|
-
|
6502
|
+
filters: globalThis.Array.isArray(object?.filters)
|
6503
|
+
? object.filters.map((e: any) => DBRequest_DBFilter.fromJSON(e))
|
6504
|
+
: [],
|
6505
|
+
cursor: isSet(object.cursor) ? globalThis.String(object.cursor) : "",
|
6178
6506
|
};
|
6179
6507
|
},
|
6180
6508
|
|
@@ -6183,11 +6511,11 @@ export const DBRequest_DBList = {
|
|
6183
6511
|
if (message.entity !== "") {
|
6184
6512
|
obj.entity = message.entity;
|
6185
6513
|
}
|
6186
|
-
if (message.
|
6187
|
-
obj.
|
6514
|
+
if (message.filters?.length) {
|
6515
|
+
obj.filters = message.filters.map((e) => DBRequest_DBFilter.toJSON(e));
|
6188
6516
|
}
|
6189
|
-
if (message.
|
6190
|
-
obj.
|
6517
|
+
if (message.cursor !== "") {
|
6518
|
+
obj.cursor = message.cursor;
|
6191
6519
|
}
|
6192
6520
|
return obj;
|
6193
6521
|
},
|
@@ -6198,14 +6526,14 @@ export const DBRequest_DBList = {
|
|
6198
6526
|
fromPartial(object: DeepPartial<DBRequest_DBList>): DBRequest_DBList {
|
6199
6527
|
const message = createBaseDBRequest_DBList();
|
6200
6528
|
message.entity = object.entity ?? "";
|
6201
|
-
message.
|
6202
|
-
message.
|
6529
|
+
message.filters = object.filters?.map((e) => DBRequest_DBFilter.fromPartial(e)) || [];
|
6530
|
+
message.cursor = object.cursor ?? "";
|
6203
6531
|
return message;
|
6204
6532
|
},
|
6205
6533
|
};
|
6206
6534
|
|
6207
6535
|
function createBaseDBRequest_DBUpsert(): DBRequest_DBUpsert {
|
6208
|
-
return { entity: [], id: [], data: [] };
|
6536
|
+
return { entity: [], id: [], data: [], entityData: [] };
|
6209
6537
|
}
|
6210
6538
|
|
6211
6539
|
export const DBRequest_DBUpsert = {
|
@@ -6219,6 +6547,9 @@ export const DBRequest_DBUpsert = {
|
|
6219
6547
|
for (const v of message.data) {
|
6220
6548
|
Struct.encode(Struct.wrap(v!), writer.uint32(26).fork()).ldelim();
|
6221
6549
|
}
|
6550
|
+
for (const v of message.entityData) {
|
6551
|
+
RichStruct.encode(v!, writer.uint32(34).fork()).ldelim();
|
6552
|
+
}
|
6222
6553
|
return writer;
|
6223
6554
|
},
|
6224
6555
|
|
@@ -6250,6 +6581,13 @@ export const DBRequest_DBUpsert = {
|
|
6250
6581
|
|
6251
6582
|
message.data.push(Struct.unwrap(Struct.decode(reader, reader.uint32())));
|
6252
6583
|
continue;
|
6584
|
+
case 4:
|
6585
|
+
if (tag !== 34) {
|
6586
|
+
break;
|
6587
|
+
}
|
6588
|
+
|
6589
|
+
message.entityData.push(RichStruct.decode(reader, reader.uint32()));
|
6590
|
+
continue;
|
6253
6591
|
}
|
6254
6592
|
if ((tag & 7) === 4 || tag === 0) {
|
6255
6593
|
break;
|
@@ -6264,6 +6602,9 @@ export const DBRequest_DBUpsert = {
|
|
6264
6602
|
entity: globalThis.Array.isArray(object?.entity) ? object.entity.map((e: any) => globalThis.String(e)) : [],
|
6265
6603
|
id: globalThis.Array.isArray(object?.id) ? object.id.map((e: any) => globalThis.String(e)) : [],
|
6266
6604
|
data: globalThis.Array.isArray(object?.data) ? [...object.data] : [],
|
6605
|
+
entityData: globalThis.Array.isArray(object?.entityData)
|
6606
|
+
? object.entityData.map((e: any) => RichStruct.fromJSON(e))
|
6607
|
+
: [],
|
6267
6608
|
};
|
6268
6609
|
},
|
6269
6610
|
|
@@ -6278,6 +6619,9 @@ export const DBRequest_DBUpsert = {
|
|
6278
6619
|
if (message.data?.length) {
|
6279
6620
|
obj.data = message.data;
|
6280
6621
|
}
|
6622
|
+
if (message.entityData?.length) {
|
6623
|
+
obj.entityData = message.entityData.map((e) => RichStruct.toJSON(e));
|
6624
|
+
}
|
6281
6625
|
return obj;
|
6282
6626
|
},
|
6283
6627
|
|
@@ -6289,6 +6633,7 @@ export const DBRequest_DBUpsert = {
|
|
6289
6633
|
message.entity = object.entity?.map((e) => e) || [];
|
6290
6634
|
message.id = object.id?.map((e) => e) || [];
|
6291
6635
|
message.data = object.data?.map((e) => e) || [];
|
6636
|
+
message.entityData = object.entityData?.map((e) => RichStruct.fromPartial(e)) || [];
|
6292
6637
|
return message;
|
6293
6638
|
},
|
6294
6639
|
};
|
@@ -6367,6 +6712,97 @@ export const DBRequest_DBDelete = {
|
|
6367
6712
|
},
|
6368
6713
|
};
|
6369
6714
|
|
6715
|
+
function createBaseDBRequest_DBFilter(): DBRequest_DBFilter {
|
6716
|
+
return { field: "", op: 0, value: undefined };
|
6717
|
+
}
|
6718
|
+
|
6719
|
+
export const DBRequest_DBFilter = {
|
6720
|
+
encode(message: DBRequest_DBFilter, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
6721
|
+
if (message.field !== "") {
|
6722
|
+
writer.uint32(10).string(message.field);
|
6723
|
+
}
|
6724
|
+
if (message.op !== 0) {
|
6725
|
+
writer.uint32(16).int32(message.op);
|
6726
|
+
}
|
6727
|
+
if (message.value !== undefined) {
|
6728
|
+
RichValueList.encode(message.value, writer.uint32(26).fork()).ldelim();
|
6729
|
+
}
|
6730
|
+
return writer;
|
6731
|
+
},
|
6732
|
+
|
6733
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): DBRequest_DBFilter {
|
6734
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
6735
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
6736
|
+
const message = createBaseDBRequest_DBFilter();
|
6737
|
+
while (reader.pos < end) {
|
6738
|
+
const tag = reader.uint32();
|
6739
|
+
switch (tag >>> 3) {
|
6740
|
+
case 1:
|
6741
|
+
if (tag !== 10) {
|
6742
|
+
break;
|
6743
|
+
}
|
6744
|
+
|
6745
|
+
message.field = reader.string();
|
6746
|
+
continue;
|
6747
|
+
case 2:
|
6748
|
+
if (tag !== 16) {
|
6749
|
+
break;
|
6750
|
+
}
|
6751
|
+
|
6752
|
+
message.op = reader.int32() as any;
|
6753
|
+
continue;
|
6754
|
+
case 3:
|
6755
|
+
if (tag !== 26) {
|
6756
|
+
break;
|
6757
|
+
}
|
6758
|
+
|
6759
|
+
message.value = RichValueList.decode(reader, reader.uint32());
|
6760
|
+
continue;
|
6761
|
+
}
|
6762
|
+
if ((tag & 7) === 4 || tag === 0) {
|
6763
|
+
break;
|
6764
|
+
}
|
6765
|
+
reader.skipType(tag & 7);
|
6766
|
+
}
|
6767
|
+
return message;
|
6768
|
+
},
|
6769
|
+
|
6770
|
+
fromJSON(object: any): DBRequest_DBFilter {
|
6771
|
+
return {
|
6772
|
+
field: isSet(object.field) ? globalThis.String(object.field) : "",
|
6773
|
+
op: isSet(object.op) ? dBRequest_DBOperatorFromJSON(object.op) : 0,
|
6774
|
+
value: isSet(object.value) ? RichValueList.fromJSON(object.value) : undefined,
|
6775
|
+
};
|
6776
|
+
},
|
6777
|
+
|
6778
|
+
toJSON(message: DBRequest_DBFilter): unknown {
|
6779
|
+
const obj: any = {};
|
6780
|
+
if (message.field !== "") {
|
6781
|
+
obj.field = message.field;
|
6782
|
+
}
|
6783
|
+
if (message.op !== 0) {
|
6784
|
+
obj.op = dBRequest_DBOperatorToJSON(message.op);
|
6785
|
+
}
|
6786
|
+
if (message.value !== undefined) {
|
6787
|
+
obj.value = RichValueList.toJSON(message.value);
|
6788
|
+
}
|
6789
|
+
return obj;
|
6790
|
+
},
|
6791
|
+
|
6792
|
+
create(base?: DeepPartial<DBRequest_DBFilter>): DBRequest_DBFilter {
|
6793
|
+
return DBRequest_DBFilter.fromPartial(base ?? {});
|
6794
|
+
},
|
6795
|
+
fromPartial(object: DeepPartial<DBRequest_DBFilter>): DBRequest_DBFilter {
|
6796
|
+
const message = createBaseDBRequest_DBFilter();
|
6797
|
+
message.field = object.field ?? "";
|
6798
|
+
message.op = object.op ?? 0;
|
6799
|
+
message.value = (object.value !== undefined && object.value !== null)
|
6800
|
+
? RichValueList.fromPartial(object.value)
|
6801
|
+
: undefined;
|
6802
|
+
return message;
|
6803
|
+
},
|
6804
|
+
};
|
6805
|
+
|
6370
6806
|
function createBaseData(): Data {
|
6371
6807
|
return {
|
6372
6808
|
raw: new Uint8Array(0),
|
@@ -8686,80 +9122,6 @@ export const MetricValue = {
|
|
8686
9122
|
},
|
8687
9123
|
};
|
8688
9124
|
|
8689
|
-
function createBaseBigInteger(): BigInteger {
|
8690
|
-
return { negative: false, data: new Uint8Array(0) };
|
8691
|
-
}
|
8692
|
-
|
8693
|
-
export const BigInteger = {
|
8694
|
-
encode(message: BigInteger, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
8695
|
-
if (message.negative !== false) {
|
8696
|
-
writer.uint32(8).bool(message.negative);
|
8697
|
-
}
|
8698
|
-
if (message.data.length !== 0) {
|
8699
|
-
writer.uint32(18).bytes(message.data);
|
8700
|
-
}
|
8701
|
-
return writer;
|
8702
|
-
},
|
8703
|
-
|
8704
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): BigInteger {
|
8705
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
8706
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
8707
|
-
const message = createBaseBigInteger();
|
8708
|
-
while (reader.pos < end) {
|
8709
|
-
const tag = reader.uint32();
|
8710
|
-
switch (tag >>> 3) {
|
8711
|
-
case 1:
|
8712
|
-
if (tag !== 8) {
|
8713
|
-
break;
|
8714
|
-
}
|
8715
|
-
|
8716
|
-
message.negative = reader.bool();
|
8717
|
-
continue;
|
8718
|
-
case 2:
|
8719
|
-
if (tag !== 18) {
|
8720
|
-
break;
|
8721
|
-
}
|
8722
|
-
|
8723
|
-
message.data = reader.bytes();
|
8724
|
-
continue;
|
8725
|
-
}
|
8726
|
-
if ((tag & 7) === 4 || tag === 0) {
|
8727
|
-
break;
|
8728
|
-
}
|
8729
|
-
reader.skipType(tag & 7);
|
8730
|
-
}
|
8731
|
-
return message;
|
8732
|
-
},
|
8733
|
-
|
8734
|
-
fromJSON(object: any): BigInteger {
|
8735
|
-
return {
|
8736
|
-
negative: isSet(object.negative) ? globalThis.Boolean(object.negative) : false,
|
8737
|
-
data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0),
|
8738
|
-
};
|
8739
|
-
},
|
8740
|
-
|
8741
|
-
toJSON(message: BigInteger): unknown {
|
8742
|
-
const obj: any = {};
|
8743
|
-
if (message.negative !== false) {
|
8744
|
-
obj.negative = message.negative;
|
8745
|
-
}
|
8746
|
-
if (message.data.length !== 0) {
|
8747
|
-
obj.data = base64FromBytes(message.data);
|
8748
|
-
}
|
8749
|
-
return obj;
|
8750
|
-
},
|
8751
|
-
|
8752
|
-
create(base?: DeepPartial<BigInteger>): BigInteger {
|
8753
|
-
return BigInteger.fromPartial(base ?? {});
|
8754
|
-
},
|
8755
|
-
fromPartial(object: DeepPartial<BigInteger>): BigInteger {
|
8756
|
-
const message = createBaseBigInteger();
|
8757
|
-
message.negative = object.negative ?? false;
|
8758
|
-
message.data = object.data ?? new Uint8Array(0);
|
8759
|
-
return message;
|
8760
|
-
},
|
8761
|
-
};
|
8762
|
-
|
8763
9125
|
function createBaseRuntimeInfo(): RuntimeInfo {
|
8764
9126
|
return { from: 0 };
|
8765
9127
|
}
|