@sentio/runtime 2.39.3 → 2.39.4-rc.1
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
@@ -1829,6 +1829,73 @@ export interface Notification_AttributesEntry {
|
|
1829
1829
|
value: string;
|
1830
1830
|
}
|
1831
1831
|
|
1832
|
+
export interface RichValue {
|
1833
|
+
nullValue?: RichValue_NullValue | undefined;
|
1834
|
+
intValue?: number | undefined;
|
1835
|
+
floatValue?: number | undefined;
|
1836
|
+
bytesValue?: Uint8Array | undefined;
|
1837
|
+
boolValue?: boolean | undefined;
|
1838
|
+
stringValue?: string | undefined;
|
1839
|
+
timestampValue?: Date | undefined;
|
1840
|
+
bigintValue?: BigInteger | undefined;
|
1841
|
+
bigdecimalValue?: BigDecimal | undefined;
|
1842
|
+
listValue?: RichValueList | undefined;
|
1843
|
+
}
|
1844
|
+
|
1845
|
+
export enum RichValue_NullValue {
|
1846
|
+
NULL_VALUE = 0,
|
1847
|
+
UNRECOGNIZED = -1,
|
1848
|
+
}
|
1849
|
+
|
1850
|
+
export function richValue_NullValueFromJSON(object: any): RichValue_NullValue {
|
1851
|
+
switch (object) {
|
1852
|
+
case 0:
|
1853
|
+
case "NULL_VALUE":
|
1854
|
+
return RichValue_NullValue.NULL_VALUE;
|
1855
|
+
case -1:
|
1856
|
+
case "UNRECOGNIZED":
|
1857
|
+
default:
|
1858
|
+
return RichValue_NullValue.UNRECOGNIZED;
|
1859
|
+
}
|
1860
|
+
}
|
1861
|
+
|
1862
|
+
export function richValue_NullValueToJSON(object: RichValue_NullValue): string {
|
1863
|
+
switch (object) {
|
1864
|
+
case RichValue_NullValue.NULL_VALUE:
|
1865
|
+
return "NULL_VALUE";
|
1866
|
+
case RichValue_NullValue.UNRECOGNIZED:
|
1867
|
+
default:
|
1868
|
+
return "UNRECOGNIZED";
|
1869
|
+
}
|
1870
|
+
}
|
1871
|
+
|
1872
|
+
export interface RichStruct {
|
1873
|
+
fields: { [key: string]: RichValue };
|
1874
|
+
}
|
1875
|
+
|
1876
|
+
export interface RichStruct_FieldsEntry {
|
1877
|
+
key: string;
|
1878
|
+
value: RichValue | undefined;
|
1879
|
+
}
|
1880
|
+
|
1881
|
+
export interface RichValueList {
|
1882
|
+
values: RichValue[];
|
1883
|
+
}
|
1884
|
+
|
1885
|
+
export interface RichStructList {
|
1886
|
+
entities: RichStruct[];
|
1887
|
+
}
|
1888
|
+
|
1889
|
+
export interface BigDecimal {
|
1890
|
+
value: BigInteger | undefined;
|
1891
|
+
exp: number;
|
1892
|
+
}
|
1893
|
+
|
1894
|
+
export interface BigInteger {
|
1895
|
+
negative: boolean;
|
1896
|
+
data: Uint8Array;
|
1897
|
+
}
|
1898
|
+
|
1832
1899
|
function createBaseUsageTracker(): UsageTracker {
|
1833
1900
|
return {
|
1834
1901
|
apiSku: "",
|
@@ -12461,6 +12528,666 @@ export const Notification_AttributesEntry = {
|
|
12461
12528
|
},
|
12462
12529
|
};
|
12463
12530
|
|
12531
|
+
function createBaseRichValue(): RichValue {
|
12532
|
+
return {
|
12533
|
+
nullValue: undefined,
|
12534
|
+
intValue: undefined,
|
12535
|
+
floatValue: undefined,
|
12536
|
+
bytesValue: undefined,
|
12537
|
+
boolValue: undefined,
|
12538
|
+
stringValue: undefined,
|
12539
|
+
timestampValue: undefined,
|
12540
|
+
bigintValue: undefined,
|
12541
|
+
bigdecimalValue: undefined,
|
12542
|
+
listValue: undefined,
|
12543
|
+
};
|
12544
|
+
}
|
12545
|
+
|
12546
|
+
export const RichValue = {
|
12547
|
+
encode(message: RichValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
12548
|
+
if (message.nullValue !== undefined) {
|
12549
|
+
writer.uint32(8).int32(message.nullValue);
|
12550
|
+
}
|
12551
|
+
if (message.intValue !== undefined) {
|
12552
|
+
writer.uint32(16).int32(message.intValue);
|
12553
|
+
}
|
12554
|
+
if (message.floatValue !== undefined) {
|
12555
|
+
writer.uint32(25).double(message.floatValue);
|
12556
|
+
}
|
12557
|
+
if (message.bytesValue !== undefined) {
|
12558
|
+
writer.uint32(34).bytes(message.bytesValue);
|
12559
|
+
}
|
12560
|
+
if (message.boolValue !== undefined) {
|
12561
|
+
writer.uint32(40).bool(message.boolValue);
|
12562
|
+
}
|
12563
|
+
if (message.stringValue !== undefined) {
|
12564
|
+
writer.uint32(50).string(message.stringValue);
|
12565
|
+
}
|
12566
|
+
if (message.timestampValue !== undefined) {
|
12567
|
+
Timestamp.encode(toTimestamp(message.timestampValue), writer.uint32(58).fork()).ldelim();
|
12568
|
+
}
|
12569
|
+
if (message.bigintValue !== undefined) {
|
12570
|
+
BigInteger.encode(message.bigintValue, writer.uint32(66).fork()).ldelim();
|
12571
|
+
}
|
12572
|
+
if (message.bigdecimalValue !== undefined) {
|
12573
|
+
BigDecimal.encode(message.bigdecimalValue, writer.uint32(74).fork()).ldelim();
|
12574
|
+
}
|
12575
|
+
if (message.listValue !== undefined) {
|
12576
|
+
RichValueList.encode(message.listValue, writer.uint32(82).fork()).ldelim();
|
12577
|
+
}
|
12578
|
+
return writer;
|
12579
|
+
},
|
12580
|
+
|
12581
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): RichValue {
|
12582
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
12583
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
12584
|
+
const message = createBaseRichValue();
|
12585
|
+
while (reader.pos < end) {
|
12586
|
+
const tag = reader.uint32();
|
12587
|
+
switch (tag >>> 3) {
|
12588
|
+
case 1:
|
12589
|
+
if (tag !== 8) {
|
12590
|
+
break;
|
12591
|
+
}
|
12592
|
+
|
12593
|
+
message.nullValue = reader.int32() as any;
|
12594
|
+
continue;
|
12595
|
+
case 2:
|
12596
|
+
if (tag !== 16) {
|
12597
|
+
break;
|
12598
|
+
}
|
12599
|
+
|
12600
|
+
message.intValue = reader.int32();
|
12601
|
+
continue;
|
12602
|
+
case 3:
|
12603
|
+
if (tag !== 25) {
|
12604
|
+
break;
|
12605
|
+
}
|
12606
|
+
|
12607
|
+
message.floatValue = reader.double();
|
12608
|
+
continue;
|
12609
|
+
case 4:
|
12610
|
+
if (tag !== 34) {
|
12611
|
+
break;
|
12612
|
+
}
|
12613
|
+
|
12614
|
+
message.bytesValue = reader.bytes();
|
12615
|
+
continue;
|
12616
|
+
case 5:
|
12617
|
+
if (tag !== 40) {
|
12618
|
+
break;
|
12619
|
+
}
|
12620
|
+
|
12621
|
+
message.boolValue = reader.bool();
|
12622
|
+
continue;
|
12623
|
+
case 6:
|
12624
|
+
if (tag !== 50) {
|
12625
|
+
break;
|
12626
|
+
}
|
12627
|
+
|
12628
|
+
message.stringValue = reader.string();
|
12629
|
+
continue;
|
12630
|
+
case 7:
|
12631
|
+
if (tag !== 58) {
|
12632
|
+
break;
|
12633
|
+
}
|
12634
|
+
|
12635
|
+
message.timestampValue = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
12636
|
+
continue;
|
12637
|
+
case 8:
|
12638
|
+
if (tag !== 66) {
|
12639
|
+
break;
|
12640
|
+
}
|
12641
|
+
|
12642
|
+
message.bigintValue = BigInteger.decode(reader, reader.uint32());
|
12643
|
+
continue;
|
12644
|
+
case 9:
|
12645
|
+
if (tag !== 74) {
|
12646
|
+
break;
|
12647
|
+
}
|
12648
|
+
|
12649
|
+
message.bigdecimalValue = BigDecimal.decode(reader, reader.uint32());
|
12650
|
+
continue;
|
12651
|
+
case 10:
|
12652
|
+
if (tag !== 82) {
|
12653
|
+
break;
|
12654
|
+
}
|
12655
|
+
|
12656
|
+
message.listValue = RichValueList.decode(reader, reader.uint32());
|
12657
|
+
continue;
|
12658
|
+
}
|
12659
|
+
if ((tag & 7) === 4 || tag === 0) {
|
12660
|
+
break;
|
12661
|
+
}
|
12662
|
+
reader.skipType(tag & 7);
|
12663
|
+
}
|
12664
|
+
return message;
|
12665
|
+
},
|
12666
|
+
|
12667
|
+
fromJSON(object: any): RichValue {
|
12668
|
+
return {
|
12669
|
+
nullValue: isSet(object.nullValue) ? richValue_NullValueFromJSON(object.nullValue) : undefined,
|
12670
|
+
intValue: isSet(object.intValue) ? globalThis.Number(object.intValue) : undefined,
|
12671
|
+
floatValue: isSet(object.floatValue) ? globalThis.Number(object.floatValue) : undefined,
|
12672
|
+
bytesValue: isSet(object.bytesValue) ? bytesFromBase64(object.bytesValue) : undefined,
|
12673
|
+
boolValue: isSet(object.boolValue) ? globalThis.Boolean(object.boolValue) : undefined,
|
12674
|
+
stringValue: isSet(object.stringValue) ? globalThis.String(object.stringValue) : undefined,
|
12675
|
+
timestampValue: isSet(object.timestampValue) ? fromJsonTimestamp(object.timestampValue) : undefined,
|
12676
|
+
bigintValue: isSet(object.bigintValue) ? BigInteger.fromJSON(object.bigintValue) : undefined,
|
12677
|
+
bigdecimalValue: isSet(object.bigdecimalValue) ? BigDecimal.fromJSON(object.bigdecimalValue) : undefined,
|
12678
|
+
listValue: isSet(object.listValue) ? RichValueList.fromJSON(object.listValue) : undefined,
|
12679
|
+
};
|
12680
|
+
},
|
12681
|
+
|
12682
|
+
toJSON(message: RichValue): unknown {
|
12683
|
+
const obj: any = {};
|
12684
|
+
if (message.nullValue !== undefined) {
|
12685
|
+
obj.nullValue = richValue_NullValueToJSON(message.nullValue);
|
12686
|
+
}
|
12687
|
+
if (message.intValue !== undefined) {
|
12688
|
+
obj.intValue = Math.round(message.intValue);
|
12689
|
+
}
|
12690
|
+
if (message.floatValue !== undefined) {
|
12691
|
+
obj.floatValue = message.floatValue;
|
12692
|
+
}
|
12693
|
+
if (message.bytesValue !== undefined) {
|
12694
|
+
obj.bytesValue = base64FromBytes(message.bytesValue);
|
12695
|
+
}
|
12696
|
+
if (message.boolValue !== undefined) {
|
12697
|
+
obj.boolValue = message.boolValue;
|
12698
|
+
}
|
12699
|
+
if (message.stringValue !== undefined) {
|
12700
|
+
obj.stringValue = message.stringValue;
|
12701
|
+
}
|
12702
|
+
if (message.timestampValue !== undefined) {
|
12703
|
+
obj.timestampValue = message.timestampValue.toISOString();
|
12704
|
+
}
|
12705
|
+
if (message.bigintValue !== undefined) {
|
12706
|
+
obj.bigintValue = BigInteger.toJSON(message.bigintValue);
|
12707
|
+
}
|
12708
|
+
if (message.bigdecimalValue !== undefined) {
|
12709
|
+
obj.bigdecimalValue = BigDecimal.toJSON(message.bigdecimalValue);
|
12710
|
+
}
|
12711
|
+
if (message.listValue !== undefined) {
|
12712
|
+
obj.listValue = RichValueList.toJSON(message.listValue);
|
12713
|
+
}
|
12714
|
+
return obj;
|
12715
|
+
},
|
12716
|
+
|
12717
|
+
create(base?: DeepPartial<RichValue>): RichValue {
|
12718
|
+
return RichValue.fromPartial(base ?? {});
|
12719
|
+
},
|
12720
|
+
fromPartial(object: DeepPartial<RichValue>): RichValue {
|
12721
|
+
const message = createBaseRichValue();
|
12722
|
+
message.nullValue = object.nullValue ?? undefined;
|
12723
|
+
message.intValue = object.intValue ?? undefined;
|
12724
|
+
message.floatValue = object.floatValue ?? undefined;
|
12725
|
+
message.bytesValue = object.bytesValue ?? undefined;
|
12726
|
+
message.boolValue = object.boolValue ?? undefined;
|
12727
|
+
message.stringValue = object.stringValue ?? undefined;
|
12728
|
+
message.timestampValue = object.timestampValue ?? undefined;
|
12729
|
+
message.bigintValue = (object.bigintValue !== undefined && object.bigintValue !== null)
|
12730
|
+
? BigInteger.fromPartial(object.bigintValue)
|
12731
|
+
: undefined;
|
12732
|
+
message.bigdecimalValue = (object.bigdecimalValue !== undefined && object.bigdecimalValue !== null)
|
12733
|
+
? BigDecimal.fromPartial(object.bigdecimalValue)
|
12734
|
+
: undefined;
|
12735
|
+
message.listValue = (object.listValue !== undefined && object.listValue !== null)
|
12736
|
+
? RichValueList.fromPartial(object.listValue)
|
12737
|
+
: undefined;
|
12738
|
+
return message;
|
12739
|
+
},
|
12740
|
+
};
|
12741
|
+
|
12742
|
+
function createBaseRichStruct(): RichStruct {
|
12743
|
+
return { fields: {} };
|
12744
|
+
}
|
12745
|
+
|
12746
|
+
export const RichStruct = {
|
12747
|
+
encode(message: RichStruct, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
12748
|
+
Object.entries(message.fields).forEach(([key, value]) => {
|
12749
|
+
RichStruct_FieldsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).ldelim();
|
12750
|
+
});
|
12751
|
+
return writer;
|
12752
|
+
},
|
12753
|
+
|
12754
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): RichStruct {
|
12755
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
12756
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
12757
|
+
const message = createBaseRichStruct();
|
12758
|
+
while (reader.pos < end) {
|
12759
|
+
const tag = reader.uint32();
|
12760
|
+
switch (tag >>> 3) {
|
12761
|
+
case 1:
|
12762
|
+
if (tag !== 10) {
|
12763
|
+
break;
|
12764
|
+
}
|
12765
|
+
|
12766
|
+
const entry1 = RichStruct_FieldsEntry.decode(reader, reader.uint32());
|
12767
|
+
if (entry1.value !== undefined) {
|
12768
|
+
message.fields[entry1.key] = entry1.value;
|
12769
|
+
}
|
12770
|
+
continue;
|
12771
|
+
}
|
12772
|
+
if ((tag & 7) === 4 || tag === 0) {
|
12773
|
+
break;
|
12774
|
+
}
|
12775
|
+
reader.skipType(tag & 7);
|
12776
|
+
}
|
12777
|
+
return message;
|
12778
|
+
},
|
12779
|
+
|
12780
|
+
fromJSON(object: any): RichStruct {
|
12781
|
+
return {
|
12782
|
+
fields: isObject(object.fields)
|
12783
|
+
? Object.entries(object.fields).reduce<{ [key: string]: RichValue }>((acc, [key, value]) => {
|
12784
|
+
acc[key] = RichValue.fromJSON(value);
|
12785
|
+
return acc;
|
12786
|
+
}, {})
|
12787
|
+
: {},
|
12788
|
+
};
|
12789
|
+
},
|
12790
|
+
|
12791
|
+
toJSON(message: RichStruct): unknown {
|
12792
|
+
const obj: any = {};
|
12793
|
+
if (message.fields) {
|
12794
|
+
const entries = Object.entries(message.fields);
|
12795
|
+
if (entries.length > 0) {
|
12796
|
+
obj.fields = {};
|
12797
|
+
entries.forEach(([k, v]) => {
|
12798
|
+
obj.fields[k] = RichValue.toJSON(v);
|
12799
|
+
});
|
12800
|
+
}
|
12801
|
+
}
|
12802
|
+
return obj;
|
12803
|
+
},
|
12804
|
+
|
12805
|
+
create(base?: DeepPartial<RichStruct>): RichStruct {
|
12806
|
+
return RichStruct.fromPartial(base ?? {});
|
12807
|
+
},
|
12808
|
+
fromPartial(object: DeepPartial<RichStruct>): RichStruct {
|
12809
|
+
const message = createBaseRichStruct();
|
12810
|
+
message.fields = Object.entries(object.fields ?? {}).reduce<{ [key: string]: RichValue }>((acc, [key, value]) => {
|
12811
|
+
if (value !== undefined) {
|
12812
|
+
acc[key] = RichValue.fromPartial(value);
|
12813
|
+
}
|
12814
|
+
return acc;
|
12815
|
+
}, {});
|
12816
|
+
return message;
|
12817
|
+
},
|
12818
|
+
};
|
12819
|
+
|
12820
|
+
function createBaseRichStruct_FieldsEntry(): RichStruct_FieldsEntry {
|
12821
|
+
return { key: "", value: undefined };
|
12822
|
+
}
|
12823
|
+
|
12824
|
+
export const RichStruct_FieldsEntry = {
|
12825
|
+
encode(message: RichStruct_FieldsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
12826
|
+
if (message.key !== "") {
|
12827
|
+
writer.uint32(10).string(message.key);
|
12828
|
+
}
|
12829
|
+
if (message.value !== undefined) {
|
12830
|
+
RichValue.encode(message.value, writer.uint32(18).fork()).ldelim();
|
12831
|
+
}
|
12832
|
+
return writer;
|
12833
|
+
},
|
12834
|
+
|
12835
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): RichStruct_FieldsEntry {
|
12836
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
12837
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
12838
|
+
const message = createBaseRichStruct_FieldsEntry();
|
12839
|
+
while (reader.pos < end) {
|
12840
|
+
const tag = reader.uint32();
|
12841
|
+
switch (tag >>> 3) {
|
12842
|
+
case 1:
|
12843
|
+
if (tag !== 10) {
|
12844
|
+
break;
|
12845
|
+
}
|
12846
|
+
|
12847
|
+
message.key = reader.string();
|
12848
|
+
continue;
|
12849
|
+
case 2:
|
12850
|
+
if (tag !== 18) {
|
12851
|
+
break;
|
12852
|
+
}
|
12853
|
+
|
12854
|
+
message.value = RichValue.decode(reader, reader.uint32());
|
12855
|
+
continue;
|
12856
|
+
}
|
12857
|
+
if ((tag & 7) === 4 || tag === 0) {
|
12858
|
+
break;
|
12859
|
+
}
|
12860
|
+
reader.skipType(tag & 7);
|
12861
|
+
}
|
12862
|
+
return message;
|
12863
|
+
},
|
12864
|
+
|
12865
|
+
fromJSON(object: any): RichStruct_FieldsEntry {
|
12866
|
+
return {
|
12867
|
+
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
12868
|
+
value: isSet(object.value) ? RichValue.fromJSON(object.value) : undefined,
|
12869
|
+
};
|
12870
|
+
},
|
12871
|
+
|
12872
|
+
toJSON(message: RichStruct_FieldsEntry): unknown {
|
12873
|
+
const obj: any = {};
|
12874
|
+
if (message.key !== "") {
|
12875
|
+
obj.key = message.key;
|
12876
|
+
}
|
12877
|
+
if (message.value !== undefined) {
|
12878
|
+
obj.value = RichValue.toJSON(message.value);
|
12879
|
+
}
|
12880
|
+
return obj;
|
12881
|
+
},
|
12882
|
+
|
12883
|
+
create(base?: DeepPartial<RichStruct_FieldsEntry>): RichStruct_FieldsEntry {
|
12884
|
+
return RichStruct_FieldsEntry.fromPartial(base ?? {});
|
12885
|
+
},
|
12886
|
+
fromPartial(object: DeepPartial<RichStruct_FieldsEntry>): RichStruct_FieldsEntry {
|
12887
|
+
const message = createBaseRichStruct_FieldsEntry();
|
12888
|
+
message.key = object.key ?? "";
|
12889
|
+
message.value = (object.value !== undefined && object.value !== null)
|
12890
|
+
? RichValue.fromPartial(object.value)
|
12891
|
+
: undefined;
|
12892
|
+
return message;
|
12893
|
+
},
|
12894
|
+
};
|
12895
|
+
|
12896
|
+
function createBaseRichValueList(): RichValueList {
|
12897
|
+
return { values: [] };
|
12898
|
+
}
|
12899
|
+
|
12900
|
+
export const RichValueList = {
|
12901
|
+
encode(message: RichValueList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
12902
|
+
for (const v of message.values) {
|
12903
|
+
RichValue.encode(v!, writer.uint32(10).fork()).ldelim();
|
12904
|
+
}
|
12905
|
+
return writer;
|
12906
|
+
},
|
12907
|
+
|
12908
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): RichValueList {
|
12909
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
12910
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
12911
|
+
const message = createBaseRichValueList();
|
12912
|
+
while (reader.pos < end) {
|
12913
|
+
const tag = reader.uint32();
|
12914
|
+
switch (tag >>> 3) {
|
12915
|
+
case 1:
|
12916
|
+
if (tag !== 10) {
|
12917
|
+
break;
|
12918
|
+
}
|
12919
|
+
|
12920
|
+
message.values.push(RichValue.decode(reader, reader.uint32()));
|
12921
|
+
continue;
|
12922
|
+
}
|
12923
|
+
if ((tag & 7) === 4 || tag === 0) {
|
12924
|
+
break;
|
12925
|
+
}
|
12926
|
+
reader.skipType(tag & 7);
|
12927
|
+
}
|
12928
|
+
return message;
|
12929
|
+
},
|
12930
|
+
|
12931
|
+
fromJSON(object: any): RichValueList {
|
12932
|
+
return {
|
12933
|
+
values: globalThis.Array.isArray(object?.values) ? object.values.map((e: any) => RichValue.fromJSON(e)) : [],
|
12934
|
+
};
|
12935
|
+
},
|
12936
|
+
|
12937
|
+
toJSON(message: RichValueList): unknown {
|
12938
|
+
const obj: any = {};
|
12939
|
+
if (message.values?.length) {
|
12940
|
+
obj.values = message.values.map((e) => RichValue.toJSON(e));
|
12941
|
+
}
|
12942
|
+
return obj;
|
12943
|
+
},
|
12944
|
+
|
12945
|
+
create(base?: DeepPartial<RichValueList>): RichValueList {
|
12946
|
+
return RichValueList.fromPartial(base ?? {});
|
12947
|
+
},
|
12948
|
+
fromPartial(object: DeepPartial<RichValueList>): RichValueList {
|
12949
|
+
const message = createBaseRichValueList();
|
12950
|
+
message.values = object.values?.map((e) => RichValue.fromPartial(e)) || [];
|
12951
|
+
return message;
|
12952
|
+
},
|
12953
|
+
};
|
12954
|
+
|
12955
|
+
function createBaseRichStructList(): RichStructList {
|
12956
|
+
return { entities: [] };
|
12957
|
+
}
|
12958
|
+
|
12959
|
+
export const RichStructList = {
|
12960
|
+
encode(message: RichStructList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
12961
|
+
for (const v of message.entities) {
|
12962
|
+
RichStruct.encode(v!, writer.uint32(10).fork()).ldelim();
|
12963
|
+
}
|
12964
|
+
return writer;
|
12965
|
+
},
|
12966
|
+
|
12967
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): RichStructList {
|
12968
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
12969
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
12970
|
+
const message = createBaseRichStructList();
|
12971
|
+
while (reader.pos < end) {
|
12972
|
+
const tag = reader.uint32();
|
12973
|
+
switch (tag >>> 3) {
|
12974
|
+
case 1:
|
12975
|
+
if (tag !== 10) {
|
12976
|
+
break;
|
12977
|
+
}
|
12978
|
+
|
12979
|
+
message.entities.push(RichStruct.decode(reader, reader.uint32()));
|
12980
|
+
continue;
|
12981
|
+
}
|
12982
|
+
if ((tag & 7) === 4 || tag === 0) {
|
12983
|
+
break;
|
12984
|
+
}
|
12985
|
+
reader.skipType(tag & 7);
|
12986
|
+
}
|
12987
|
+
return message;
|
12988
|
+
},
|
12989
|
+
|
12990
|
+
fromJSON(object: any): RichStructList {
|
12991
|
+
return {
|
12992
|
+
entities: globalThis.Array.isArray(object?.entities)
|
12993
|
+
? object.entities.map((e: any) => RichStruct.fromJSON(e))
|
12994
|
+
: [],
|
12995
|
+
};
|
12996
|
+
},
|
12997
|
+
|
12998
|
+
toJSON(message: RichStructList): unknown {
|
12999
|
+
const obj: any = {};
|
13000
|
+
if (message.entities?.length) {
|
13001
|
+
obj.entities = message.entities.map((e) => RichStruct.toJSON(e));
|
13002
|
+
}
|
13003
|
+
return obj;
|
13004
|
+
},
|
13005
|
+
|
13006
|
+
create(base?: DeepPartial<RichStructList>): RichStructList {
|
13007
|
+
return RichStructList.fromPartial(base ?? {});
|
13008
|
+
},
|
13009
|
+
fromPartial(object: DeepPartial<RichStructList>): RichStructList {
|
13010
|
+
const message = createBaseRichStructList();
|
13011
|
+
message.entities = object.entities?.map((e) => RichStruct.fromPartial(e)) || [];
|
13012
|
+
return message;
|
13013
|
+
},
|
13014
|
+
};
|
13015
|
+
|
13016
|
+
function createBaseBigDecimal(): BigDecimal {
|
13017
|
+
return { value: undefined, exp: 0 };
|
13018
|
+
}
|
13019
|
+
|
13020
|
+
export const BigDecimal = {
|
13021
|
+
encode(message: BigDecimal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
13022
|
+
if (message.value !== undefined) {
|
13023
|
+
BigInteger.encode(message.value, writer.uint32(10).fork()).ldelim();
|
13024
|
+
}
|
13025
|
+
if (message.exp !== 0) {
|
13026
|
+
writer.uint32(16).int32(message.exp);
|
13027
|
+
}
|
13028
|
+
return writer;
|
13029
|
+
},
|
13030
|
+
|
13031
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): BigDecimal {
|
13032
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
13033
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
13034
|
+
const message = createBaseBigDecimal();
|
13035
|
+
while (reader.pos < end) {
|
13036
|
+
const tag = reader.uint32();
|
13037
|
+
switch (tag >>> 3) {
|
13038
|
+
case 1:
|
13039
|
+
if (tag !== 10) {
|
13040
|
+
break;
|
13041
|
+
}
|
13042
|
+
|
13043
|
+
message.value = BigInteger.decode(reader, reader.uint32());
|
13044
|
+
continue;
|
13045
|
+
case 2:
|
13046
|
+
if (tag !== 16) {
|
13047
|
+
break;
|
13048
|
+
}
|
13049
|
+
|
13050
|
+
message.exp = reader.int32();
|
13051
|
+
continue;
|
13052
|
+
}
|
13053
|
+
if ((tag & 7) === 4 || tag === 0) {
|
13054
|
+
break;
|
13055
|
+
}
|
13056
|
+
reader.skipType(tag & 7);
|
13057
|
+
}
|
13058
|
+
return message;
|
13059
|
+
},
|
13060
|
+
|
13061
|
+
fromJSON(object: any): BigDecimal {
|
13062
|
+
return {
|
13063
|
+
value: isSet(object.value) ? BigInteger.fromJSON(object.value) : undefined,
|
13064
|
+
exp: isSet(object.exp) ? globalThis.Number(object.exp) : 0,
|
13065
|
+
};
|
13066
|
+
},
|
13067
|
+
|
13068
|
+
toJSON(message: BigDecimal): unknown {
|
13069
|
+
const obj: any = {};
|
13070
|
+
if (message.value !== undefined) {
|
13071
|
+
obj.value = BigInteger.toJSON(message.value);
|
13072
|
+
}
|
13073
|
+
if (message.exp !== 0) {
|
13074
|
+
obj.exp = Math.round(message.exp);
|
13075
|
+
}
|
13076
|
+
return obj;
|
13077
|
+
},
|
13078
|
+
|
13079
|
+
create(base?: DeepPartial<BigDecimal>): BigDecimal {
|
13080
|
+
return BigDecimal.fromPartial(base ?? {});
|
13081
|
+
},
|
13082
|
+
fromPartial(object: DeepPartial<BigDecimal>): BigDecimal {
|
13083
|
+
const message = createBaseBigDecimal();
|
13084
|
+
message.value = (object.value !== undefined && object.value !== null)
|
13085
|
+
? BigInteger.fromPartial(object.value)
|
13086
|
+
: undefined;
|
13087
|
+
message.exp = object.exp ?? 0;
|
13088
|
+
return message;
|
13089
|
+
},
|
13090
|
+
};
|
13091
|
+
|
13092
|
+
function createBaseBigInteger(): BigInteger {
|
13093
|
+
return { negative: false, data: new Uint8Array(0) };
|
13094
|
+
}
|
13095
|
+
|
13096
|
+
export const BigInteger = {
|
13097
|
+
encode(message: BigInteger, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
13098
|
+
if (message.negative !== false) {
|
13099
|
+
writer.uint32(8).bool(message.negative);
|
13100
|
+
}
|
13101
|
+
if (message.data.length !== 0) {
|
13102
|
+
writer.uint32(18).bytes(message.data);
|
13103
|
+
}
|
13104
|
+
return writer;
|
13105
|
+
},
|
13106
|
+
|
13107
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): BigInteger {
|
13108
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
13109
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
13110
|
+
const message = createBaseBigInteger();
|
13111
|
+
while (reader.pos < end) {
|
13112
|
+
const tag = reader.uint32();
|
13113
|
+
switch (tag >>> 3) {
|
13114
|
+
case 1:
|
13115
|
+
if (tag !== 8) {
|
13116
|
+
break;
|
13117
|
+
}
|
13118
|
+
|
13119
|
+
message.negative = reader.bool();
|
13120
|
+
continue;
|
13121
|
+
case 2:
|
13122
|
+
if (tag !== 18) {
|
13123
|
+
break;
|
13124
|
+
}
|
13125
|
+
|
13126
|
+
message.data = reader.bytes();
|
13127
|
+
continue;
|
13128
|
+
}
|
13129
|
+
if ((tag & 7) === 4 || tag === 0) {
|
13130
|
+
break;
|
13131
|
+
}
|
13132
|
+
reader.skipType(tag & 7);
|
13133
|
+
}
|
13134
|
+
return message;
|
13135
|
+
},
|
13136
|
+
|
13137
|
+
fromJSON(object: any): BigInteger {
|
13138
|
+
return {
|
13139
|
+
negative: isSet(object.negative) ? globalThis.Boolean(object.negative) : false,
|
13140
|
+
data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0),
|
13141
|
+
};
|
13142
|
+
},
|
13143
|
+
|
13144
|
+
toJSON(message: BigInteger): unknown {
|
13145
|
+
const obj: any = {};
|
13146
|
+
if (message.negative !== false) {
|
13147
|
+
obj.negative = message.negative;
|
13148
|
+
}
|
13149
|
+
if (message.data.length !== 0) {
|
13150
|
+
obj.data = base64FromBytes(message.data);
|
13151
|
+
}
|
13152
|
+
return obj;
|
13153
|
+
},
|
13154
|
+
|
13155
|
+
create(base?: DeepPartial<BigInteger>): BigInteger {
|
13156
|
+
return BigInteger.fromPartial(base ?? {});
|
13157
|
+
},
|
13158
|
+
fromPartial(object: DeepPartial<BigInteger>): BigInteger {
|
13159
|
+
const message = createBaseBigInteger();
|
13160
|
+
message.negative = object.negative ?? false;
|
13161
|
+
message.data = object.data ?? new Uint8Array(0);
|
13162
|
+
return message;
|
13163
|
+
},
|
13164
|
+
};
|
13165
|
+
|
13166
|
+
function bytesFromBase64(b64: string): Uint8Array {
|
13167
|
+
if ((globalThis as any).Buffer) {
|
13168
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
13169
|
+
} else {
|
13170
|
+
const bin = globalThis.atob(b64);
|
13171
|
+
const arr = new Uint8Array(bin.length);
|
13172
|
+
for (let i = 0; i < bin.length; ++i) {
|
13173
|
+
arr[i] = bin.charCodeAt(i);
|
13174
|
+
}
|
13175
|
+
return arr;
|
13176
|
+
}
|
13177
|
+
}
|
13178
|
+
|
13179
|
+
function base64FromBytes(arr: Uint8Array): string {
|
13180
|
+
if ((globalThis as any).Buffer) {
|
13181
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
13182
|
+
} else {
|
13183
|
+
const bin: string[] = [];
|
13184
|
+
arr.forEach((byte) => {
|
13185
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
13186
|
+
});
|
13187
|
+
return globalThis.btoa(bin.join(""));
|
13188
|
+
}
|
13189
|
+
}
|
13190
|
+
|
12464
13191
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
12465
13192
|
|
12466
13193
|
type DeepPartial<T> = T extends Builtin ? T
|