@sentio/runtime 2.50.1 → 2.50.2-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.
@@ -376,9 +376,12 @@ export interface Project {
376
376
  ownerName: string;
377
377
  notificationChannels: Channel[];
378
378
  views: ProjectView[];
379
+ /** @deprecated */
379
380
  supersetEnable: boolean;
381
+ /** @deprecated */
380
382
  superset: ProjectSuperset | undefined;
381
383
  enableDisk: boolean;
384
+ /** @deprecated */
382
385
  enableMaterializedView: boolean;
383
386
  }
384
387
 
@@ -470,9 +473,12 @@ export interface ProjectInfo {
470
473
  visibility: Project_Visibility;
471
474
  type: Project_Type;
472
475
  multiVersion: boolean;
476
+ /** @deprecated */
473
477
  supersetEnable: boolean;
478
+ /** @deprecated */
474
479
  superset: ProjectSuperset | undefined;
475
480
  enableDisk: boolean;
481
+ /** @deprecated */
476
482
  enableMaterializedView: boolean;
477
483
  }
478
484
 
@@ -553,6 +559,12 @@ export interface ApiKey {
553
559
  source: string;
554
560
  ownerType: string;
555
561
  revealable: boolean;
562
+ scopeProjects: { [key: string]: ProjectInfo };
563
+ }
564
+
565
+ export interface ApiKey_ScopeProjectsEntry {
566
+ key: string;
567
+ value: ProjectInfo | undefined;
556
568
  }
557
569
 
558
570
  export interface TimeRangeLite {
@@ -1861,6 +1873,7 @@ export interface RichValue {
1861
1873
  bigdecimalValue?: BigDecimal | undefined;
1862
1874
  listValue?: RichValueList | undefined;
1863
1875
  structValue?: RichStruct | undefined;
1876
+ tokenValue?: TokenAmount | undefined;
1864
1877
  }
1865
1878
 
1866
1879
  export enum RichValue_NullValue {
@@ -1917,6 +1930,12 @@ export interface BigInteger {
1917
1930
  data: Uint8Array;
1918
1931
  }
1919
1932
 
1933
+ export interface TokenAmount {
1934
+ token: CoinID | undefined;
1935
+ amount: BigDecimal | undefined;
1936
+ specifiedAt: Date | undefined;
1937
+ }
1938
+
1920
1939
  function createBaseUsageTracker(): UsageTracker {
1921
1940
  return {
1922
1941
  apiSku: "",
@@ -4490,6 +4509,7 @@ function createBaseApiKey(): ApiKey {
4490
4509
  source: "",
4491
4510
  ownerType: "",
4492
4511
  revealable: false,
4512
+ scopeProjects: {},
4493
4513
  };
4494
4514
  }
4495
4515
 
@@ -4534,6 +4554,9 @@ export const ApiKey = {
4534
4554
  if (message.revealable !== false) {
4535
4555
  writer.uint32(88).bool(message.revealable);
4536
4556
  }
4557
+ Object.entries(message.scopeProjects).forEach(([key, value]) => {
4558
+ ApiKey_ScopeProjectsEntry.encode({ key: key as any, value }, writer.uint32(98).fork()).ldelim();
4559
+ });
4537
4560
  return writer;
4538
4561
  },
4539
4562
 
@@ -4614,6 +4637,16 @@ export const ApiKey = {
4614
4637
 
4615
4638
  message.revealable = reader.bool();
4616
4639
  continue;
4640
+ case 12:
4641
+ if (tag !== 98) {
4642
+ break;
4643
+ }
4644
+
4645
+ const entry12 = ApiKey_ScopeProjectsEntry.decode(reader, reader.uint32());
4646
+ if (entry12.value !== undefined) {
4647
+ message.scopeProjects[entry12.key] = entry12.value;
4648
+ }
4649
+ continue;
4617
4650
  }
4618
4651
  if ((tag & 7) === 4 || tag === 0) {
4619
4652
  break;
@@ -4635,6 +4668,12 @@ export const ApiKey = {
4635
4668
  source: isSet(object.source) ? globalThis.String(object.source) : "",
4636
4669
  ownerType: isSet(object.ownerType) ? globalThis.String(object.ownerType) : "",
4637
4670
  revealable: isSet(object.revealable) ? globalThis.Boolean(object.revealable) : false,
4671
+ scopeProjects: isObject(object.scopeProjects)
4672
+ ? Object.entries(object.scopeProjects).reduce<{ [key: string]: ProjectInfo }>((acc, [key, value]) => {
4673
+ acc[key] = ProjectInfo.fromJSON(value);
4674
+ return acc;
4675
+ }, {})
4676
+ : {},
4638
4677
  };
4639
4678
  },
4640
4679
 
@@ -4670,6 +4709,15 @@ export const ApiKey = {
4670
4709
  if (message.revealable !== false) {
4671
4710
  obj.revealable = message.revealable;
4672
4711
  }
4712
+ if (message.scopeProjects) {
4713
+ const entries = Object.entries(message.scopeProjects);
4714
+ if (entries.length > 0) {
4715
+ obj.scopeProjects = {};
4716
+ entries.forEach(([k, v]) => {
4717
+ obj.scopeProjects[k] = ProjectInfo.toJSON(v);
4718
+ });
4719
+ }
4720
+ }
4673
4721
  return obj;
4674
4722
  },
4675
4723
 
@@ -4688,6 +4736,91 @@ export const ApiKey = {
4688
4736
  message.source = object.source ?? "";
4689
4737
  message.ownerType = object.ownerType ?? "";
4690
4738
  message.revealable = object.revealable ?? false;
4739
+ message.scopeProjects = Object.entries(object.scopeProjects ?? {}).reduce<{ [key: string]: ProjectInfo }>(
4740
+ (acc, [key, value]) => {
4741
+ if (value !== undefined) {
4742
+ acc[key] = ProjectInfo.fromPartial(value);
4743
+ }
4744
+ return acc;
4745
+ },
4746
+ {},
4747
+ );
4748
+ return message;
4749
+ },
4750
+ };
4751
+
4752
+ function createBaseApiKey_ScopeProjectsEntry(): ApiKey_ScopeProjectsEntry {
4753
+ return { key: "", value: undefined };
4754
+ }
4755
+
4756
+ export const ApiKey_ScopeProjectsEntry = {
4757
+ encode(message: ApiKey_ScopeProjectsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
4758
+ if (message.key !== "") {
4759
+ writer.uint32(10).string(message.key);
4760
+ }
4761
+ if (message.value !== undefined) {
4762
+ ProjectInfo.encode(message.value, writer.uint32(18).fork()).ldelim();
4763
+ }
4764
+ return writer;
4765
+ },
4766
+
4767
+ decode(input: _m0.Reader | Uint8Array, length?: number): ApiKey_ScopeProjectsEntry {
4768
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
4769
+ let end = length === undefined ? reader.len : reader.pos + length;
4770
+ const message = createBaseApiKey_ScopeProjectsEntry();
4771
+ while (reader.pos < end) {
4772
+ const tag = reader.uint32();
4773
+ switch (tag >>> 3) {
4774
+ case 1:
4775
+ if (tag !== 10) {
4776
+ break;
4777
+ }
4778
+
4779
+ message.key = reader.string();
4780
+ continue;
4781
+ case 2:
4782
+ if (tag !== 18) {
4783
+ break;
4784
+ }
4785
+
4786
+ message.value = ProjectInfo.decode(reader, reader.uint32());
4787
+ continue;
4788
+ }
4789
+ if ((tag & 7) === 4 || tag === 0) {
4790
+ break;
4791
+ }
4792
+ reader.skipType(tag & 7);
4793
+ }
4794
+ return message;
4795
+ },
4796
+
4797
+ fromJSON(object: any): ApiKey_ScopeProjectsEntry {
4798
+ return {
4799
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
4800
+ value: isSet(object.value) ? ProjectInfo.fromJSON(object.value) : undefined,
4801
+ };
4802
+ },
4803
+
4804
+ toJSON(message: ApiKey_ScopeProjectsEntry): unknown {
4805
+ const obj: any = {};
4806
+ if (message.key !== "") {
4807
+ obj.key = message.key;
4808
+ }
4809
+ if (message.value !== undefined) {
4810
+ obj.value = ProjectInfo.toJSON(message.value);
4811
+ }
4812
+ return obj;
4813
+ },
4814
+
4815
+ create(base?: DeepPartial<ApiKey_ScopeProjectsEntry>): ApiKey_ScopeProjectsEntry {
4816
+ return ApiKey_ScopeProjectsEntry.fromPartial(base ?? {});
4817
+ },
4818
+ fromPartial(object: DeepPartial<ApiKey_ScopeProjectsEntry>): ApiKey_ScopeProjectsEntry {
4819
+ const message = createBaseApiKey_ScopeProjectsEntry();
4820
+ message.key = object.key ?? "";
4821
+ message.value = (object.value !== undefined && object.value !== null)
4822
+ ? ProjectInfo.fromPartial(object.value)
4823
+ : undefined;
4691
4824
  return message;
4692
4825
  },
4693
4826
  };
@@ -12801,6 +12934,7 @@ function createBaseRichValue(): RichValue {
12801
12934
  bigdecimalValue: undefined,
12802
12935
  listValue: undefined,
12803
12936
  structValue: undefined,
12937
+ tokenValue: undefined,
12804
12938
  };
12805
12939
  }
12806
12940
 
@@ -12839,6 +12973,9 @@ export const RichValue = {
12839
12973
  if (message.structValue !== undefined) {
12840
12974
  RichStruct.encode(message.structValue, writer.uint32(90).fork()).ldelim();
12841
12975
  }
12976
+ if (message.tokenValue !== undefined) {
12977
+ TokenAmount.encode(message.tokenValue, writer.uint32(98).fork()).ldelim();
12978
+ }
12842
12979
  return writer;
12843
12980
  },
12844
12981
 
@@ -12926,6 +13063,13 @@ export const RichValue = {
12926
13063
 
12927
13064
  message.structValue = RichStruct.decode(reader, reader.uint32());
12928
13065
  continue;
13066
+ case 12:
13067
+ if (tag !== 98) {
13068
+ break;
13069
+ }
13070
+
13071
+ message.tokenValue = TokenAmount.decode(reader, reader.uint32());
13072
+ continue;
12929
13073
  }
12930
13074
  if ((tag & 7) === 4 || tag === 0) {
12931
13075
  break;
@@ -12948,6 +13092,7 @@ export const RichValue = {
12948
13092
  bigdecimalValue: isSet(object.bigdecimalValue) ? BigDecimal.fromJSON(object.bigdecimalValue) : undefined,
12949
13093
  listValue: isSet(object.listValue) ? RichValueList.fromJSON(object.listValue) : undefined,
12950
13094
  structValue: isSet(object.structValue) ? RichStruct.fromJSON(object.structValue) : undefined,
13095
+ tokenValue: isSet(object.tokenValue) ? TokenAmount.fromJSON(object.tokenValue) : undefined,
12951
13096
  };
12952
13097
  },
12953
13098
 
@@ -12986,6 +13131,9 @@ export const RichValue = {
12986
13131
  if (message.structValue !== undefined) {
12987
13132
  obj.structValue = RichStruct.toJSON(message.structValue);
12988
13133
  }
13134
+ if (message.tokenValue !== undefined) {
13135
+ obj.tokenValue = TokenAmount.toJSON(message.tokenValue);
13136
+ }
12989
13137
  return obj;
12990
13138
  },
12991
13139
 
@@ -13013,6 +13161,9 @@ export const RichValue = {
13013
13161
  message.structValue = (object.structValue !== undefined && object.structValue !== null)
13014
13162
  ? RichStruct.fromPartial(object.structValue)
13015
13163
  : undefined;
13164
+ message.tokenValue = (object.tokenValue !== undefined && object.tokenValue !== null)
13165
+ ? TokenAmount.fromPartial(object.tokenValue)
13166
+ : undefined;
13016
13167
  return message;
13017
13168
  },
13018
13169
  };
@@ -13441,6 +13592,99 @@ export const BigInteger = {
13441
13592
  },
13442
13593
  };
13443
13594
 
13595
+ function createBaseTokenAmount(): TokenAmount {
13596
+ return { token: undefined, amount: undefined, specifiedAt: undefined };
13597
+ }
13598
+
13599
+ export const TokenAmount = {
13600
+ encode(message: TokenAmount, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
13601
+ if (message.token !== undefined) {
13602
+ CoinID.encode(message.token, writer.uint32(10).fork()).ldelim();
13603
+ }
13604
+ if (message.amount !== undefined) {
13605
+ BigDecimal.encode(message.amount, writer.uint32(18).fork()).ldelim();
13606
+ }
13607
+ if (message.specifiedAt !== undefined) {
13608
+ Timestamp.encode(toTimestamp(message.specifiedAt), writer.uint32(26).fork()).ldelim();
13609
+ }
13610
+ return writer;
13611
+ },
13612
+
13613
+ decode(input: _m0.Reader | Uint8Array, length?: number): TokenAmount {
13614
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
13615
+ let end = length === undefined ? reader.len : reader.pos + length;
13616
+ const message = createBaseTokenAmount();
13617
+ while (reader.pos < end) {
13618
+ const tag = reader.uint32();
13619
+ switch (tag >>> 3) {
13620
+ case 1:
13621
+ if (tag !== 10) {
13622
+ break;
13623
+ }
13624
+
13625
+ message.token = CoinID.decode(reader, reader.uint32());
13626
+ continue;
13627
+ case 2:
13628
+ if (tag !== 18) {
13629
+ break;
13630
+ }
13631
+
13632
+ message.amount = BigDecimal.decode(reader, reader.uint32());
13633
+ continue;
13634
+ case 3:
13635
+ if (tag !== 26) {
13636
+ break;
13637
+ }
13638
+
13639
+ message.specifiedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
13640
+ continue;
13641
+ }
13642
+ if ((tag & 7) === 4 || tag === 0) {
13643
+ break;
13644
+ }
13645
+ reader.skipType(tag & 7);
13646
+ }
13647
+ return message;
13648
+ },
13649
+
13650
+ fromJSON(object: any): TokenAmount {
13651
+ return {
13652
+ token: isSet(object.token) ? CoinID.fromJSON(object.token) : undefined,
13653
+ amount: isSet(object.amount) ? BigDecimal.fromJSON(object.amount) : undefined,
13654
+ specifiedAt: isSet(object.specifiedAt) ? fromJsonTimestamp(object.specifiedAt) : undefined,
13655
+ };
13656
+ },
13657
+
13658
+ toJSON(message: TokenAmount): unknown {
13659
+ const obj: any = {};
13660
+ if (message.token !== undefined) {
13661
+ obj.token = CoinID.toJSON(message.token);
13662
+ }
13663
+ if (message.amount !== undefined) {
13664
+ obj.amount = BigDecimal.toJSON(message.amount);
13665
+ }
13666
+ if (message.specifiedAt !== undefined) {
13667
+ obj.specifiedAt = message.specifiedAt.toISOString();
13668
+ }
13669
+ return obj;
13670
+ },
13671
+
13672
+ create(base?: DeepPartial<TokenAmount>): TokenAmount {
13673
+ return TokenAmount.fromPartial(base ?? {});
13674
+ },
13675
+ fromPartial(object: DeepPartial<TokenAmount>): TokenAmount {
13676
+ const message = createBaseTokenAmount();
13677
+ message.token = (object.token !== undefined && object.token !== null)
13678
+ ? CoinID.fromPartial(object.token)
13679
+ : undefined;
13680
+ message.amount = (object.amount !== undefined && object.amount !== null)
13681
+ ? BigDecimal.fromPartial(object.amount)
13682
+ : undefined;
13683
+ message.specifiedAt = object.specifiedAt ?? undefined;
13684
+ return message;
13685
+ },
13686
+ };
13687
+
13444
13688
  function bytesFromBase64(b64: string): Uint8Array {
13445
13689
  if ((globalThis as any).Buffer) {
13446
13690
  return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));