@sentio/runtime 2.39.3 → 2.39.4-rc.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.
- package/lib/db-context.d.ts +55 -2
- package/lib/db-context.d.ts.map +1 -1
- package/lib/db-context.js +1 -4
- package/lib/db-context.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 +32 -15
- package/lib/gen/processor/protos/processor.d.ts.map +1 -1
- package/lib/gen/processor/protos/processor.js +226 -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/service.d.ts +55 -2
- package/lib/service.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/db-context.ts +1 -3
- package/src/gen/processor/protos/processor.ts +251 -103
- package/src/gen/service/common/protos/common.ts +727 -0
@@ -1104,6 +1104,31 @@ export function systemSQLQuery_Aggregation_AggregateProperties_AggregationTypeTo
|
|
1104
1104
|
return "UNRECOGNIZED";
|
1105
1105
|
}
|
1106
1106
|
}
|
1107
|
+
export var RichValue_NullValue;
|
1108
|
+
(function (RichValue_NullValue) {
|
1109
|
+
RichValue_NullValue[RichValue_NullValue["NULL_VALUE"] = 0] = "NULL_VALUE";
|
1110
|
+
RichValue_NullValue[RichValue_NullValue["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
1111
|
+
})(RichValue_NullValue || (RichValue_NullValue = {}));
|
1112
|
+
export function richValue_NullValueFromJSON(object) {
|
1113
|
+
switch (object) {
|
1114
|
+
case 0:
|
1115
|
+
case "NULL_VALUE":
|
1116
|
+
return RichValue_NullValue.NULL_VALUE;
|
1117
|
+
case -1:
|
1118
|
+
case "UNRECOGNIZED":
|
1119
|
+
default:
|
1120
|
+
return RichValue_NullValue.UNRECOGNIZED;
|
1121
|
+
}
|
1122
|
+
}
|
1123
|
+
export function richValue_NullValueToJSON(object) {
|
1124
|
+
switch (object) {
|
1125
|
+
case RichValue_NullValue.NULL_VALUE:
|
1126
|
+
return "NULL_VALUE";
|
1127
|
+
case RichValue_NullValue.UNRECOGNIZED:
|
1128
|
+
default:
|
1129
|
+
return "UNRECOGNIZED";
|
1130
|
+
}
|
1131
|
+
}
|
1107
1132
|
function createBaseUsageTracker() {
|
1108
1133
|
return {
|
1109
1134
|
apiSku: "",
|
@@ -10722,6 +10747,605 @@ export const Notification_AttributesEntry = {
|
|
10722
10747
|
return message;
|
10723
10748
|
},
|
10724
10749
|
};
|
10750
|
+
function createBaseRichValue() {
|
10751
|
+
return {
|
10752
|
+
nullValue: undefined,
|
10753
|
+
intValue: undefined,
|
10754
|
+
floatValue: undefined,
|
10755
|
+
bytesValue: undefined,
|
10756
|
+
boolValue: undefined,
|
10757
|
+
stringValue: undefined,
|
10758
|
+
timestampValue: undefined,
|
10759
|
+
bigintValue: undefined,
|
10760
|
+
bigdecimalValue: undefined,
|
10761
|
+
listValue: undefined,
|
10762
|
+
};
|
10763
|
+
}
|
10764
|
+
export const RichValue = {
|
10765
|
+
encode(message, writer = _m0.Writer.create()) {
|
10766
|
+
if (message.nullValue !== undefined) {
|
10767
|
+
writer.uint32(8).int32(message.nullValue);
|
10768
|
+
}
|
10769
|
+
if (message.intValue !== undefined) {
|
10770
|
+
writer.uint32(16).int32(message.intValue);
|
10771
|
+
}
|
10772
|
+
if (message.floatValue !== undefined) {
|
10773
|
+
writer.uint32(25).double(message.floatValue);
|
10774
|
+
}
|
10775
|
+
if (message.bytesValue !== undefined) {
|
10776
|
+
writer.uint32(34).bytes(message.bytesValue);
|
10777
|
+
}
|
10778
|
+
if (message.boolValue !== undefined) {
|
10779
|
+
writer.uint32(40).bool(message.boolValue);
|
10780
|
+
}
|
10781
|
+
if (message.stringValue !== undefined) {
|
10782
|
+
writer.uint32(50).string(message.stringValue);
|
10783
|
+
}
|
10784
|
+
if (message.timestampValue !== undefined) {
|
10785
|
+
Timestamp.encode(toTimestamp(message.timestampValue), writer.uint32(58).fork()).ldelim();
|
10786
|
+
}
|
10787
|
+
if (message.bigintValue !== undefined) {
|
10788
|
+
BigInteger.encode(message.bigintValue, writer.uint32(66).fork()).ldelim();
|
10789
|
+
}
|
10790
|
+
if (message.bigdecimalValue !== undefined) {
|
10791
|
+
BigDecimal.encode(message.bigdecimalValue, writer.uint32(74).fork()).ldelim();
|
10792
|
+
}
|
10793
|
+
if (message.listValue !== undefined) {
|
10794
|
+
RichValueList.encode(message.listValue, writer.uint32(82).fork()).ldelim();
|
10795
|
+
}
|
10796
|
+
return writer;
|
10797
|
+
},
|
10798
|
+
decode(input, length) {
|
10799
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
10800
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
10801
|
+
const message = createBaseRichValue();
|
10802
|
+
while (reader.pos < end) {
|
10803
|
+
const tag = reader.uint32();
|
10804
|
+
switch (tag >>> 3) {
|
10805
|
+
case 1:
|
10806
|
+
if (tag !== 8) {
|
10807
|
+
break;
|
10808
|
+
}
|
10809
|
+
message.nullValue = reader.int32();
|
10810
|
+
continue;
|
10811
|
+
case 2:
|
10812
|
+
if (tag !== 16) {
|
10813
|
+
break;
|
10814
|
+
}
|
10815
|
+
message.intValue = reader.int32();
|
10816
|
+
continue;
|
10817
|
+
case 3:
|
10818
|
+
if (tag !== 25) {
|
10819
|
+
break;
|
10820
|
+
}
|
10821
|
+
message.floatValue = reader.double();
|
10822
|
+
continue;
|
10823
|
+
case 4:
|
10824
|
+
if (tag !== 34) {
|
10825
|
+
break;
|
10826
|
+
}
|
10827
|
+
message.bytesValue = reader.bytes();
|
10828
|
+
continue;
|
10829
|
+
case 5:
|
10830
|
+
if (tag !== 40) {
|
10831
|
+
break;
|
10832
|
+
}
|
10833
|
+
message.boolValue = reader.bool();
|
10834
|
+
continue;
|
10835
|
+
case 6:
|
10836
|
+
if (tag !== 50) {
|
10837
|
+
break;
|
10838
|
+
}
|
10839
|
+
message.stringValue = reader.string();
|
10840
|
+
continue;
|
10841
|
+
case 7:
|
10842
|
+
if (tag !== 58) {
|
10843
|
+
break;
|
10844
|
+
}
|
10845
|
+
message.timestampValue = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
10846
|
+
continue;
|
10847
|
+
case 8:
|
10848
|
+
if (tag !== 66) {
|
10849
|
+
break;
|
10850
|
+
}
|
10851
|
+
message.bigintValue = BigInteger.decode(reader, reader.uint32());
|
10852
|
+
continue;
|
10853
|
+
case 9:
|
10854
|
+
if (tag !== 74) {
|
10855
|
+
break;
|
10856
|
+
}
|
10857
|
+
message.bigdecimalValue = BigDecimal.decode(reader, reader.uint32());
|
10858
|
+
continue;
|
10859
|
+
case 10:
|
10860
|
+
if (tag !== 82) {
|
10861
|
+
break;
|
10862
|
+
}
|
10863
|
+
message.listValue = RichValueList.decode(reader, reader.uint32());
|
10864
|
+
continue;
|
10865
|
+
}
|
10866
|
+
if ((tag & 7) === 4 || tag === 0) {
|
10867
|
+
break;
|
10868
|
+
}
|
10869
|
+
reader.skipType(tag & 7);
|
10870
|
+
}
|
10871
|
+
return message;
|
10872
|
+
},
|
10873
|
+
fromJSON(object) {
|
10874
|
+
return {
|
10875
|
+
nullValue: isSet(object.nullValue) ? richValue_NullValueFromJSON(object.nullValue) : undefined,
|
10876
|
+
intValue: isSet(object.intValue) ? globalThis.Number(object.intValue) : undefined,
|
10877
|
+
floatValue: isSet(object.floatValue) ? globalThis.Number(object.floatValue) : undefined,
|
10878
|
+
bytesValue: isSet(object.bytesValue) ? bytesFromBase64(object.bytesValue) : undefined,
|
10879
|
+
boolValue: isSet(object.boolValue) ? globalThis.Boolean(object.boolValue) : undefined,
|
10880
|
+
stringValue: isSet(object.stringValue) ? globalThis.String(object.stringValue) : undefined,
|
10881
|
+
timestampValue: isSet(object.timestampValue) ? fromJsonTimestamp(object.timestampValue) : undefined,
|
10882
|
+
bigintValue: isSet(object.bigintValue) ? BigInteger.fromJSON(object.bigintValue) : undefined,
|
10883
|
+
bigdecimalValue: isSet(object.bigdecimalValue) ? BigDecimal.fromJSON(object.bigdecimalValue) : undefined,
|
10884
|
+
listValue: isSet(object.listValue) ? RichValueList.fromJSON(object.listValue) : undefined,
|
10885
|
+
};
|
10886
|
+
},
|
10887
|
+
toJSON(message) {
|
10888
|
+
const obj = {};
|
10889
|
+
if (message.nullValue !== undefined) {
|
10890
|
+
obj.nullValue = richValue_NullValueToJSON(message.nullValue);
|
10891
|
+
}
|
10892
|
+
if (message.intValue !== undefined) {
|
10893
|
+
obj.intValue = Math.round(message.intValue);
|
10894
|
+
}
|
10895
|
+
if (message.floatValue !== undefined) {
|
10896
|
+
obj.floatValue = message.floatValue;
|
10897
|
+
}
|
10898
|
+
if (message.bytesValue !== undefined) {
|
10899
|
+
obj.bytesValue = base64FromBytes(message.bytesValue);
|
10900
|
+
}
|
10901
|
+
if (message.boolValue !== undefined) {
|
10902
|
+
obj.boolValue = message.boolValue;
|
10903
|
+
}
|
10904
|
+
if (message.stringValue !== undefined) {
|
10905
|
+
obj.stringValue = message.stringValue;
|
10906
|
+
}
|
10907
|
+
if (message.timestampValue !== undefined) {
|
10908
|
+
obj.timestampValue = message.timestampValue.toISOString();
|
10909
|
+
}
|
10910
|
+
if (message.bigintValue !== undefined) {
|
10911
|
+
obj.bigintValue = BigInteger.toJSON(message.bigintValue);
|
10912
|
+
}
|
10913
|
+
if (message.bigdecimalValue !== undefined) {
|
10914
|
+
obj.bigdecimalValue = BigDecimal.toJSON(message.bigdecimalValue);
|
10915
|
+
}
|
10916
|
+
if (message.listValue !== undefined) {
|
10917
|
+
obj.listValue = RichValueList.toJSON(message.listValue);
|
10918
|
+
}
|
10919
|
+
return obj;
|
10920
|
+
},
|
10921
|
+
create(base) {
|
10922
|
+
return RichValue.fromPartial(base ?? {});
|
10923
|
+
},
|
10924
|
+
fromPartial(object) {
|
10925
|
+
const message = createBaseRichValue();
|
10926
|
+
message.nullValue = object.nullValue ?? undefined;
|
10927
|
+
message.intValue = object.intValue ?? undefined;
|
10928
|
+
message.floatValue = object.floatValue ?? undefined;
|
10929
|
+
message.bytesValue = object.bytesValue ?? undefined;
|
10930
|
+
message.boolValue = object.boolValue ?? undefined;
|
10931
|
+
message.stringValue = object.stringValue ?? undefined;
|
10932
|
+
message.timestampValue = object.timestampValue ?? undefined;
|
10933
|
+
message.bigintValue = (object.bigintValue !== undefined && object.bigintValue !== null)
|
10934
|
+
? BigInteger.fromPartial(object.bigintValue)
|
10935
|
+
: undefined;
|
10936
|
+
message.bigdecimalValue = (object.bigdecimalValue !== undefined && object.bigdecimalValue !== null)
|
10937
|
+
? BigDecimal.fromPartial(object.bigdecimalValue)
|
10938
|
+
: undefined;
|
10939
|
+
message.listValue = (object.listValue !== undefined && object.listValue !== null)
|
10940
|
+
? RichValueList.fromPartial(object.listValue)
|
10941
|
+
: undefined;
|
10942
|
+
return message;
|
10943
|
+
},
|
10944
|
+
};
|
10945
|
+
function createBaseRichStruct() {
|
10946
|
+
return { fields: {} };
|
10947
|
+
}
|
10948
|
+
export const RichStruct = {
|
10949
|
+
encode(message, writer = _m0.Writer.create()) {
|
10950
|
+
Object.entries(message.fields).forEach(([key, value]) => {
|
10951
|
+
RichStruct_FieldsEntry.encode({ key: key, value }, writer.uint32(10).fork()).ldelim();
|
10952
|
+
});
|
10953
|
+
return writer;
|
10954
|
+
},
|
10955
|
+
decode(input, length) {
|
10956
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
10957
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
10958
|
+
const message = createBaseRichStruct();
|
10959
|
+
while (reader.pos < end) {
|
10960
|
+
const tag = reader.uint32();
|
10961
|
+
switch (tag >>> 3) {
|
10962
|
+
case 1:
|
10963
|
+
if (tag !== 10) {
|
10964
|
+
break;
|
10965
|
+
}
|
10966
|
+
const entry1 = RichStruct_FieldsEntry.decode(reader, reader.uint32());
|
10967
|
+
if (entry1.value !== undefined) {
|
10968
|
+
message.fields[entry1.key] = entry1.value;
|
10969
|
+
}
|
10970
|
+
continue;
|
10971
|
+
}
|
10972
|
+
if ((tag & 7) === 4 || tag === 0) {
|
10973
|
+
break;
|
10974
|
+
}
|
10975
|
+
reader.skipType(tag & 7);
|
10976
|
+
}
|
10977
|
+
return message;
|
10978
|
+
},
|
10979
|
+
fromJSON(object) {
|
10980
|
+
return {
|
10981
|
+
fields: isObject(object.fields)
|
10982
|
+
? Object.entries(object.fields).reduce((acc, [key, value]) => {
|
10983
|
+
acc[key] = RichValue.fromJSON(value);
|
10984
|
+
return acc;
|
10985
|
+
}, {})
|
10986
|
+
: {},
|
10987
|
+
};
|
10988
|
+
},
|
10989
|
+
toJSON(message) {
|
10990
|
+
const obj = {};
|
10991
|
+
if (message.fields) {
|
10992
|
+
const entries = Object.entries(message.fields);
|
10993
|
+
if (entries.length > 0) {
|
10994
|
+
obj.fields = {};
|
10995
|
+
entries.forEach(([k, v]) => {
|
10996
|
+
obj.fields[k] = RichValue.toJSON(v);
|
10997
|
+
});
|
10998
|
+
}
|
10999
|
+
}
|
11000
|
+
return obj;
|
11001
|
+
},
|
11002
|
+
create(base) {
|
11003
|
+
return RichStruct.fromPartial(base ?? {});
|
11004
|
+
},
|
11005
|
+
fromPartial(object) {
|
11006
|
+
const message = createBaseRichStruct();
|
11007
|
+
message.fields = Object.entries(object.fields ?? {}).reduce((acc, [key, value]) => {
|
11008
|
+
if (value !== undefined) {
|
11009
|
+
acc[key] = RichValue.fromPartial(value);
|
11010
|
+
}
|
11011
|
+
return acc;
|
11012
|
+
}, {});
|
11013
|
+
return message;
|
11014
|
+
},
|
11015
|
+
};
|
11016
|
+
function createBaseRichStruct_FieldsEntry() {
|
11017
|
+
return { key: "", value: undefined };
|
11018
|
+
}
|
11019
|
+
export const RichStruct_FieldsEntry = {
|
11020
|
+
encode(message, writer = _m0.Writer.create()) {
|
11021
|
+
if (message.key !== "") {
|
11022
|
+
writer.uint32(10).string(message.key);
|
11023
|
+
}
|
11024
|
+
if (message.value !== undefined) {
|
11025
|
+
RichValue.encode(message.value, writer.uint32(18).fork()).ldelim();
|
11026
|
+
}
|
11027
|
+
return writer;
|
11028
|
+
},
|
11029
|
+
decode(input, length) {
|
11030
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
11031
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
11032
|
+
const message = createBaseRichStruct_FieldsEntry();
|
11033
|
+
while (reader.pos < end) {
|
11034
|
+
const tag = reader.uint32();
|
11035
|
+
switch (tag >>> 3) {
|
11036
|
+
case 1:
|
11037
|
+
if (tag !== 10) {
|
11038
|
+
break;
|
11039
|
+
}
|
11040
|
+
message.key = reader.string();
|
11041
|
+
continue;
|
11042
|
+
case 2:
|
11043
|
+
if (tag !== 18) {
|
11044
|
+
break;
|
11045
|
+
}
|
11046
|
+
message.value = RichValue.decode(reader, reader.uint32());
|
11047
|
+
continue;
|
11048
|
+
}
|
11049
|
+
if ((tag & 7) === 4 || tag === 0) {
|
11050
|
+
break;
|
11051
|
+
}
|
11052
|
+
reader.skipType(tag & 7);
|
11053
|
+
}
|
11054
|
+
return message;
|
11055
|
+
},
|
11056
|
+
fromJSON(object) {
|
11057
|
+
return {
|
11058
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
11059
|
+
value: isSet(object.value) ? RichValue.fromJSON(object.value) : undefined,
|
11060
|
+
};
|
11061
|
+
},
|
11062
|
+
toJSON(message) {
|
11063
|
+
const obj = {};
|
11064
|
+
if (message.key !== "") {
|
11065
|
+
obj.key = message.key;
|
11066
|
+
}
|
11067
|
+
if (message.value !== undefined) {
|
11068
|
+
obj.value = RichValue.toJSON(message.value);
|
11069
|
+
}
|
11070
|
+
return obj;
|
11071
|
+
},
|
11072
|
+
create(base) {
|
11073
|
+
return RichStruct_FieldsEntry.fromPartial(base ?? {});
|
11074
|
+
},
|
11075
|
+
fromPartial(object) {
|
11076
|
+
const message = createBaseRichStruct_FieldsEntry();
|
11077
|
+
message.key = object.key ?? "";
|
11078
|
+
message.value = (object.value !== undefined && object.value !== null)
|
11079
|
+
? RichValue.fromPartial(object.value)
|
11080
|
+
: undefined;
|
11081
|
+
return message;
|
11082
|
+
},
|
11083
|
+
};
|
11084
|
+
function createBaseRichValueList() {
|
11085
|
+
return { values: [] };
|
11086
|
+
}
|
11087
|
+
export const RichValueList = {
|
11088
|
+
encode(message, writer = _m0.Writer.create()) {
|
11089
|
+
for (const v of message.values) {
|
11090
|
+
RichValue.encode(v, writer.uint32(10).fork()).ldelim();
|
11091
|
+
}
|
11092
|
+
return writer;
|
11093
|
+
},
|
11094
|
+
decode(input, length) {
|
11095
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
11096
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
11097
|
+
const message = createBaseRichValueList();
|
11098
|
+
while (reader.pos < end) {
|
11099
|
+
const tag = reader.uint32();
|
11100
|
+
switch (tag >>> 3) {
|
11101
|
+
case 1:
|
11102
|
+
if (tag !== 10) {
|
11103
|
+
break;
|
11104
|
+
}
|
11105
|
+
message.values.push(RichValue.decode(reader, reader.uint32()));
|
11106
|
+
continue;
|
11107
|
+
}
|
11108
|
+
if ((tag & 7) === 4 || tag === 0) {
|
11109
|
+
break;
|
11110
|
+
}
|
11111
|
+
reader.skipType(tag & 7);
|
11112
|
+
}
|
11113
|
+
return message;
|
11114
|
+
},
|
11115
|
+
fromJSON(object) {
|
11116
|
+
return {
|
11117
|
+
values: globalThis.Array.isArray(object?.values) ? object.values.map((e) => RichValue.fromJSON(e)) : [],
|
11118
|
+
};
|
11119
|
+
},
|
11120
|
+
toJSON(message) {
|
11121
|
+
const obj = {};
|
11122
|
+
if (message.values?.length) {
|
11123
|
+
obj.values = message.values.map((e) => RichValue.toJSON(e));
|
11124
|
+
}
|
11125
|
+
return obj;
|
11126
|
+
},
|
11127
|
+
create(base) {
|
11128
|
+
return RichValueList.fromPartial(base ?? {});
|
11129
|
+
},
|
11130
|
+
fromPartial(object) {
|
11131
|
+
const message = createBaseRichValueList();
|
11132
|
+
message.values = object.values?.map((e) => RichValue.fromPartial(e)) || [];
|
11133
|
+
return message;
|
11134
|
+
},
|
11135
|
+
};
|
11136
|
+
function createBaseRichStructList() {
|
11137
|
+
return { entities: [] };
|
11138
|
+
}
|
11139
|
+
export const RichStructList = {
|
11140
|
+
encode(message, writer = _m0.Writer.create()) {
|
11141
|
+
for (const v of message.entities) {
|
11142
|
+
RichStruct.encode(v, writer.uint32(10).fork()).ldelim();
|
11143
|
+
}
|
11144
|
+
return writer;
|
11145
|
+
},
|
11146
|
+
decode(input, length) {
|
11147
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
11148
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
11149
|
+
const message = createBaseRichStructList();
|
11150
|
+
while (reader.pos < end) {
|
11151
|
+
const tag = reader.uint32();
|
11152
|
+
switch (tag >>> 3) {
|
11153
|
+
case 1:
|
11154
|
+
if (tag !== 10) {
|
11155
|
+
break;
|
11156
|
+
}
|
11157
|
+
message.entities.push(RichStruct.decode(reader, reader.uint32()));
|
11158
|
+
continue;
|
11159
|
+
}
|
11160
|
+
if ((tag & 7) === 4 || tag === 0) {
|
11161
|
+
break;
|
11162
|
+
}
|
11163
|
+
reader.skipType(tag & 7);
|
11164
|
+
}
|
11165
|
+
return message;
|
11166
|
+
},
|
11167
|
+
fromJSON(object) {
|
11168
|
+
return {
|
11169
|
+
entities: globalThis.Array.isArray(object?.entities)
|
11170
|
+
? object.entities.map((e) => RichStruct.fromJSON(e))
|
11171
|
+
: [],
|
11172
|
+
};
|
11173
|
+
},
|
11174
|
+
toJSON(message) {
|
11175
|
+
const obj = {};
|
11176
|
+
if (message.entities?.length) {
|
11177
|
+
obj.entities = message.entities.map((e) => RichStruct.toJSON(e));
|
11178
|
+
}
|
11179
|
+
return obj;
|
11180
|
+
},
|
11181
|
+
create(base) {
|
11182
|
+
return RichStructList.fromPartial(base ?? {});
|
11183
|
+
},
|
11184
|
+
fromPartial(object) {
|
11185
|
+
const message = createBaseRichStructList();
|
11186
|
+
message.entities = object.entities?.map((e) => RichStruct.fromPartial(e)) || [];
|
11187
|
+
return message;
|
11188
|
+
},
|
11189
|
+
};
|
11190
|
+
function createBaseBigDecimal() {
|
11191
|
+
return { value: undefined, exp: 0 };
|
11192
|
+
}
|
11193
|
+
export const BigDecimal = {
|
11194
|
+
encode(message, writer = _m0.Writer.create()) {
|
11195
|
+
if (message.value !== undefined) {
|
11196
|
+
BigInteger.encode(message.value, writer.uint32(10).fork()).ldelim();
|
11197
|
+
}
|
11198
|
+
if (message.exp !== 0) {
|
11199
|
+
writer.uint32(16).int32(message.exp);
|
11200
|
+
}
|
11201
|
+
return writer;
|
11202
|
+
},
|
11203
|
+
decode(input, length) {
|
11204
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
11205
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
11206
|
+
const message = createBaseBigDecimal();
|
11207
|
+
while (reader.pos < end) {
|
11208
|
+
const tag = reader.uint32();
|
11209
|
+
switch (tag >>> 3) {
|
11210
|
+
case 1:
|
11211
|
+
if (tag !== 10) {
|
11212
|
+
break;
|
11213
|
+
}
|
11214
|
+
message.value = BigInteger.decode(reader, reader.uint32());
|
11215
|
+
continue;
|
11216
|
+
case 2:
|
11217
|
+
if (tag !== 16) {
|
11218
|
+
break;
|
11219
|
+
}
|
11220
|
+
message.exp = reader.int32();
|
11221
|
+
continue;
|
11222
|
+
}
|
11223
|
+
if ((tag & 7) === 4 || tag === 0) {
|
11224
|
+
break;
|
11225
|
+
}
|
11226
|
+
reader.skipType(tag & 7);
|
11227
|
+
}
|
11228
|
+
return message;
|
11229
|
+
},
|
11230
|
+
fromJSON(object) {
|
11231
|
+
return {
|
11232
|
+
value: isSet(object.value) ? BigInteger.fromJSON(object.value) : undefined,
|
11233
|
+
exp: isSet(object.exp) ? globalThis.Number(object.exp) : 0,
|
11234
|
+
};
|
11235
|
+
},
|
11236
|
+
toJSON(message) {
|
11237
|
+
const obj = {};
|
11238
|
+
if (message.value !== undefined) {
|
11239
|
+
obj.value = BigInteger.toJSON(message.value);
|
11240
|
+
}
|
11241
|
+
if (message.exp !== 0) {
|
11242
|
+
obj.exp = Math.round(message.exp);
|
11243
|
+
}
|
11244
|
+
return obj;
|
11245
|
+
},
|
11246
|
+
create(base) {
|
11247
|
+
return BigDecimal.fromPartial(base ?? {});
|
11248
|
+
},
|
11249
|
+
fromPartial(object) {
|
11250
|
+
const message = createBaseBigDecimal();
|
11251
|
+
message.value = (object.value !== undefined && object.value !== null)
|
11252
|
+
? BigInteger.fromPartial(object.value)
|
11253
|
+
: undefined;
|
11254
|
+
message.exp = object.exp ?? 0;
|
11255
|
+
return message;
|
11256
|
+
},
|
11257
|
+
};
|
11258
|
+
function createBaseBigInteger() {
|
11259
|
+
return { negative: false, data: new Uint8Array(0) };
|
11260
|
+
}
|
11261
|
+
export const BigInteger = {
|
11262
|
+
encode(message, writer = _m0.Writer.create()) {
|
11263
|
+
if (message.negative !== false) {
|
11264
|
+
writer.uint32(8).bool(message.negative);
|
11265
|
+
}
|
11266
|
+
if (message.data.length !== 0) {
|
11267
|
+
writer.uint32(18).bytes(message.data);
|
11268
|
+
}
|
11269
|
+
return writer;
|
11270
|
+
},
|
11271
|
+
decode(input, length) {
|
11272
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
11273
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
11274
|
+
const message = createBaseBigInteger();
|
11275
|
+
while (reader.pos < end) {
|
11276
|
+
const tag = reader.uint32();
|
11277
|
+
switch (tag >>> 3) {
|
11278
|
+
case 1:
|
11279
|
+
if (tag !== 8) {
|
11280
|
+
break;
|
11281
|
+
}
|
11282
|
+
message.negative = reader.bool();
|
11283
|
+
continue;
|
11284
|
+
case 2:
|
11285
|
+
if (tag !== 18) {
|
11286
|
+
break;
|
11287
|
+
}
|
11288
|
+
message.data = reader.bytes();
|
11289
|
+
continue;
|
11290
|
+
}
|
11291
|
+
if ((tag & 7) === 4 || tag === 0) {
|
11292
|
+
break;
|
11293
|
+
}
|
11294
|
+
reader.skipType(tag & 7);
|
11295
|
+
}
|
11296
|
+
return message;
|
11297
|
+
},
|
11298
|
+
fromJSON(object) {
|
11299
|
+
return {
|
11300
|
+
negative: isSet(object.negative) ? globalThis.Boolean(object.negative) : false,
|
11301
|
+
data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0),
|
11302
|
+
};
|
11303
|
+
},
|
11304
|
+
toJSON(message) {
|
11305
|
+
const obj = {};
|
11306
|
+
if (message.negative !== false) {
|
11307
|
+
obj.negative = message.negative;
|
11308
|
+
}
|
11309
|
+
if (message.data.length !== 0) {
|
11310
|
+
obj.data = base64FromBytes(message.data);
|
11311
|
+
}
|
11312
|
+
return obj;
|
11313
|
+
},
|
11314
|
+
create(base) {
|
11315
|
+
return BigInteger.fromPartial(base ?? {});
|
11316
|
+
},
|
11317
|
+
fromPartial(object) {
|
11318
|
+
const message = createBaseBigInteger();
|
11319
|
+
message.negative = object.negative ?? false;
|
11320
|
+
message.data = object.data ?? new Uint8Array(0);
|
11321
|
+
return message;
|
11322
|
+
},
|
11323
|
+
};
|
11324
|
+
function bytesFromBase64(b64) {
|
11325
|
+
if (globalThis.Buffer) {
|
11326
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
11327
|
+
}
|
11328
|
+
else {
|
11329
|
+
const bin = globalThis.atob(b64);
|
11330
|
+
const arr = new Uint8Array(bin.length);
|
11331
|
+
for (let i = 0; i < bin.length; ++i) {
|
11332
|
+
arr[i] = bin.charCodeAt(i);
|
11333
|
+
}
|
11334
|
+
return arr;
|
11335
|
+
}
|
11336
|
+
}
|
11337
|
+
function base64FromBytes(arr) {
|
11338
|
+
if (globalThis.Buffer) {
|
11339
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
11340
|
+
}
|
11341
|
+
else {
|
11342
|
+
const bin = [];
|
11343
|
+
arr.forEach((byte) => {
|
11344
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
11345
|
+
});
|
11346
|
+
return globalThis.btoa(bin.join(""));
|
11347
|
+
}
|
11348
|
+
}
|
10725
11349
|
function toTimestamp(date) {
|
10726
11350
|
const seconds = BigInt(Math.trunc(date.getTime() / 1_000));
|
10727
11351
|
const nanos = (date.getTime() % 1_000) * 1_000_000;
|